Repository: amplitude/Amplitude-TypeScript Branch: main Commit: 90ea3f608c97 Files: 1267 Total size: 9.5 MB Directory structure: gitextract_u_wkpk38/ ├── .cursor/ │ └── rules/ │ ├── code-style.mdc │ └── commit-and-pr-guidelines.mdc ├── .env.example ├── .eslintignore ├── .eslintrc.js ├── .github/ │ ├── CODEOWNERS │ ├── ISSUE_TEMPLATE/ │ │ ├── Bug_report.md │ │ ├── Feature_request.md │ │ └── Question.md │ ├── actions/ │ │ ├── build-and-test/ │ │ │ └── action.yml │ │ └── e2e-test/ │ │ └── action.yml │ ├── pull_request_template.md │ └── workflows/ │ ├── ci-nx.yml │ ├── ci.yml │ ├── docs.yml │ ├── e2e-session-replay.yml │ ├── e2e.yml │ ├── publish-single-package.yml │ ├── publish-v1.yml │ ├── publish-v2.yml │ ├── rn-smoke.yml │ └── semantic-pr.yml ├── .gitignore ├── .husky/ │ ├── commit-msg │ └── pre-commit ├── .npmrc ├── .nvmrc ├── .prettierignore ├── .prettierrc.json ├── AGENTS.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── commitlint.config.js ├── context7.json ├── example-proxy/ │ ├── .gitignore │ ├── README.md │ └── amplitude-proxy-server.js ├── examples/ │ ├── browser/ │ │ ├── chrome-ext/ │ │ │ ├── amplitude-min.js │ │ │ ├── background.js │ │ │ └── manifest.json │ │ ├── html-app/ │ │ │ ├── README.md │ │ │ ├── index.css │ │ │ ├── index.html │ │ │ └── package.json │ │ ├── next-app/ │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── eslint.config.mjs │ │ │ ├── next.config.js │ │ │ ├── package.json │ │ │ ├── pages/ │ │ │ │ ├── _app.tsx │ │ │ │ ├── api/ │ │ │ │ │ └── hello.ts │ │ │ │ └── index.tsx │ │ │ ├── styles/ │ │ │ │ ├── Home.module.css │ │ │ │ └── globals.css │ │ │ └── tsconfig.json │ │ ├── react-app/ │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── public/ │ │ │ │ ├── index.html │ │ │ │ ├── manifest.json │ │ │ │ └── robots.txt │ │ │ ├── src/ │ │ │ │ ├── App.css │ │ │ │ ├── App.test.tsx │ │ │ │ ├── App.tsx │ │ │ │ ├── index.css │ │ │ │ ├── index.tsx │ │ │ │ ├── reportWebVitals.ts │ │ │ │ └── setupTests.ts │ │ │ └── tsconfig.json │ │ └── vue-app/ │ │ ├── .browserslistrc │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── package.json │ │ ├── public/ │ │ │ └── index.html │ │ ├── src/ │ │ │ ├── App.vue │ │ │ ├── components/ │ │ │ │ └── HelloWorld.vue │ │ │ └── main.ts │ │ ├── tsconfig.json │ │ └── vue.config.js │ ├── node/ │ │ └── nest-app/ │ │ ├── .eslintrc.js │ │ ├── .gitignore │ │ ├── .prettierrc │ │ ├── README.md │ │ ├── nest-cli.json │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app.controller.ts │ │ │ ├── app.module.ts │ │ │ ├── app.service.ts │ │ │ ├── main.ts │ │ │ └── views/ │ │ │ └── index.hbs │ │ ├── tsconfig.build.json │ │ └── tsconfig.json │ ├── plugins/ │ │ ├── page-view-tracking-enrichment/ │ │ │ └── index.ts │ │ ├── react-native-idfa-plugin/ │ │ │ └── idfaPlugin.ts │ │ └── remove-event-key/ │ │ └── index.ts │ ├── react-native/ │ │ ├── app/ │ │ │ ├── .bundle/ │ │ │ │ └── config │ │ │ ├── .eslintrc.js │ │ │ ├── .gitignore │ │ │ ├── .maestro/ │ │ │ │ └── smoke.yaml │ │ │ ├── .prettierrc.js │ │ │ ├── .watchmanconfig │ │ │ ├── .yarn/ │ │ │ │ └── releases/ │ │ │ │ └── yarn-stable-temp.cjs │ │ │ ├── App.tsx │ │ │ ├── Gemfile │ │ │ ├── README.md │ │ │ ├── __tests__/ │ │ │ │ └── App.test.tsx │ │ │ ├── android/ │ │ │ │ ├── app/ │ │ │ │ │ ├── build.gradle │ │ │ │ │ ├── debug.keystore │ │ │ │ │ ├── proguard-rules.pro │ │ │ │ │ └── src/ │ │ │ │ │ ├── debug/ │ │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ │ └── main/ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── java/ │ │ │ │ │ │ └── com/ │ │ │ │ │ │ └── app/ │ │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ │ └── MainApplication.kt │ │ │ │ │ └── res/ │ │ │ │ │ ├── drawable/ │ │ │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ │ └── values/ │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── build.gradle │ │ │ │ ├── gradle/ │ │ │ │ │ └── wrapper/ │ │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ │ └── gradle-wrapper.properties │ │ │ │ ├── gradle.properties │ │ │ │ ├── gradlew │ │ │ │ ├── gradlew.bat │ │ │ │ └── settings.gradle │ │ │ ├── app.json │ │ │ ├── babel.config.js │ │ │ ├── index.js │ │ │ ├── ios/ │ │ │ │ ├── .xcode.env │ │ │ │ ├── Podfile │ │ │ │ ├── app/ │ │ │ │ │ ├── AppDelegate.h │ │ │ │ │ ├── AppDelegate.mm │ │ │ │ │ ├── Images.xcassets/ │ │ │ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── Info.plist │ │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ │ ├── PrivacyInfo.xcprivacy │ │ │ │ │ └── main.m │ │ │ │ ├── app.xcodeproj/ │ │ │ │ │ ├── project.pbxproj │ │ │ │ │ └── xcshareddata/ │ │ │ │ │ └── xcschemes/ │ │ │ │ │ └── app.xcscheme │ │ │ │ ├── app.xcworkspace/ │ │ │ │ │ ├── contents.xcworkspacedata │ │ │ │ │ └── xcshareddata/ │ │ │ │ │ └── IDEWorkspaceChecks.plist │ │ │ │ └── appTests/ │ │ │ │ ├── Info.plist │ │ │ │ └── appTests.m │ │ │ ├── jest.config.js │ │ │ ├── metro.config.js │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ └── expo-app/ │ │ ├── .expo-shared/ │ │ │ └── assets.json │ │ ├── .gitignore │ │ ├── App.tsx │ │ ├── README.md │ │ ├── android/ │ │ │ ├── .gitignore │ │ │ ├── app/ │ │ │ │ ├── BUCK │ │ │ │ ├── build.gradle │ │ │ │ ├── build_defs.bzl │ │ │ │ ├── debug.keystore │ │ │ │ ├── proguard-rules.pro │ │ │ │ └── src/ │ │ │ │ ├── debug/ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ └── java/ │ │ │ │ │ └── com/ │ │ │ │ │ └── amplitude/ │ │ │ │ │ └── expoapp/ │ │ │ │ │ └── ReactNativeFlipper.java │ │ │ │ └── main/ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ ├── java/ │ │ │ │ │ └── com/ │ │ │ │ │ └── amplitude/ │ │ │ │ │ └── expoapp/ │ │ │ │ │ ├── MainActivity.java │ │ │ │ │ ├── MainApplication.java │ │ │ │ │ └── newarchitecture/ │ │ │ │ │ ├── MainApplicationReactNativeHost.java │ │ │ │ │ ├── components/ │ │ │ │ │ │ └── MainComponentsRegistry.java │ │ │ │ │ └── modules/ │ │ │ │ │ └── MainApplicationTurboModuleManagerDelegate.java │ │ │ │ ├── jni/ │ │ │ │ │ ├── Android.mk │ │ │ │ │ ├── MainApplicationModuleProvider.cpp │ │ │ │ │ ├── MainApplicationModuleProvider.h │ │ │ │ │ ├── MainApplicationTurboModuleManagerDelegate.cpp │ │ │ │ │ ├── MainApplicationTurboModuleManagerDelegate.h │ │ │ │ │ ├── MainComponentsRegistry.cpp │ │ │ │ │ ├── MainComponentsRegistry.h │ │ │ │ │ └── OnLoad.cpp │ │ │ │ └── res/ │ │ │ │ ├── drawable/ │ │ │ │ │ ├── rn_edit_text_material.xml │ │ │ │ │ └── splashscreen.xml │ │ │ │ ├── mipmap-anydpi-v26/ │ │ │ │ │ ├── ic_launcher.xml │ │ │ │ │ └── ic_launcher_round.xml │ │ │ │ ├── values/ │ │ │ │ │ ├── colors.xml │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night/ │ │ │ │ └── colors.xml │ │ │ ├── build.gradle │ │ │ ├── gradle/ │ │ │ │ └── wrapper/ │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ └── gradle-wrapper.properties │ │ │ ├── gradle.properties │ │ │ ├── gradlew │ │ │ ├── gradlew.bat │ │ │ └── settings.gradle │ │ ├── app.json │ │ ├── babel.config.js │ │ ├── index.js │ │ ├── ios/ │ │ │ ├── .gitignore │ │ │ ├── Podfile │ │ │ ├── Podfile.properties.json │ │ │ ├── expoapp/ │ │ │ │ ├── AppDelegate.h │ │ │ │ ├── AppDelegate.mm │ │ │ │ ├── Images.xcassets/ │ │ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── Contents.json │ │ │ │ │ ├── SplashScreen.imageset/ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ └── SplashScreenBackground.imageset/ │ │ │ │ │ └── Contents.json │ │ │ │ ├── Info.plist │ │ │ │ ├── SplashScreen.storyboard │ │ │ │ ├── Supporting/ │ │ │ │ │ └── Expo.plist │ │ │ │ ├── expoapp.entitlements │ │ │ │ ├── main.m │ │ │ │ └── noop-file.swift │ │ │ ├── expoapp.xcodeproj/ │ │ │ │ ├── project.pbxproj │ │ │ │ └── xcshareddata/ │ │ │ │ └── xcschemes/ │ │ │ │ └── expoapp.xcscheme │ │ │ └── expoapp.xcworkspace/ │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata/ │ │ │ └── IDEWorkspaceChecks.plist │ │ ├── metro.config.js │ │ ├── package.json │ │ └── tsconfig.json │ └── unified/ │ └── react-app/ │ ├── .gitignore │ ├── README.md │ ├── package.json │ ├── public/ │ │ ├── index.html │ │ ├── manifest.json │ │ └── robots.txt │ ├── src/ │ │ ├── App.css │ │ ├── App.tsx │ │ ├── index.css │ │ ├── index.tsx │ │ ├── reportWebVitals.ts │ │ └── setupTests.ts │ └── tsconfig.json ├── jest.config.js ├── lerna.json ├── nx.json ├── package.json ├── packages/ │ ├── analytics-browser/ │ │ ├── .eslintignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── e2e/ │ │ │ ├── cookie-consent.spec.ts │ │ │ ├── cookies-is-enabled.spec.ts │ │ │ ├── events.spec.ts │ │ │ ├── helpers.ts │ │ │ ├── iframe-sandbox.spec.ts │ │ │ ├── proxy-server.spec.ts │ │ │ └── title.spec.ts │ │ ├── generated/ │ │ │ ├── amplitude-bookmarklet-snippet.js │ │ │ ├── amplitude-gtm-snippet.js │ │ │ └── amplitude-snippet.js │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── playground/ │ │ │ ├── html/ │ │ │ │ └── index.html │ │ │ └── react-spa/ │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── package.json │ │ │ ├── public/ │ │ │ │ ├── index.html │ │ │ │ ├── manifest.json │ │ │ │ └── robots.txt │ │ │ ├── src/ │ │ │ │ ├── App.css │ │ │ │ ├── App.test.tsx │ │ │ │ ├── App.tsx │ │ │ │ ├── Contact.tsx │ │ │ │ ├── Home.tsx │ │ │ │ ├── Other.tsx │ │ │ │ ├── index.css │ │ │ │ └── index.tsx │ │ │ └── tsconfig.json │ │ ├── playwright.config.ts │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── __mocks__/ │ │ │ │ └── det-notification.ts │ │ │ ├── attribution/ │ │ │ │ ├── helpers.ts │ │ │ │ ├── tracking-methods.ts │ │ │ │ └── web-attribution.ts │ │ │ ├── browser-client-factory.ts │ │ │ ├── browser-client.ts │ │ │ ├── config/ │ │ │ │ └── joined-config.ts │ │ │ ├── config.ts │ │ │ ├── constants.ts │ │ │ ├── cookie-migration/ │ │ │ │ └── index.ts │ │ │ ├── default-tracking.ts │ │ │ ├── det-notification.ts │ │ │ ├── gtm-snippet-index.ts │ │ │ ├── index.ts │ │ │ ├── lib-prefix.ts │ │ │ ├── plugins/ │ │ │ │ ├── context.ts │ │ │ │ ├── file-download-tracking.ts │ │ │ │ ├── form-interaction-tracking.ts │ │ │ │ └── network-connectivity-checker.ts │ │ │ ├── snippet-index.ts │ │ │ ├── storage/ │ │ │ │ ├── local-storage.ts │ │ │ │ └── session-storage.ts │ │ │ ├── transports/ │ │ │ │ ├── fetch.ts │ │ │ │ ├── send-beacon.ts │ │ │ │ └── xhr.ts │ │ │ ├── types.ts │ │ │ ├── utils/ │ │ │ │ └── snippet-helper.ts │ │ │ ├── version.ts │ │ │ └── video-capture/ │ │ │ └── video-capture.ts │ │ ├── test/ │ │ │ ├── attribution/ │ │ │ │ ├── helpers.test.ts │ │ │ │ ├── tracking-methods.test.ts │ │ │ │ └── web-attribution.test.ts │ │ │ ├── browser-client.test.ts │ │ │ ├── config/ │ │ │ │ └── joined-config.test.ts │ │ │ ├── config.test.ts │ │ │ ├── cookie-migration/ │ │ │ │ └── index.test.ts │ │ │ ├── default-tracking.test.ts │ │ │ ├── det-notification.test.ts │ │ │ ├── helpers/ │ │ │ │ ├── constants.ts │ │ │ │ └── mock.ts │ │ │ ├── index.test.ts │ │ │ ├── plugins/ │ │ │ │ ├── context.test.ts │ │ │ │ ├── file-download-tracking.test.ts │ │ │ │ ├── form-interaction-tracking.test.ts │ │ │ │ ├── network-connectivity-checker.test.ts │ │ │ │ ├── page-view-tracking-enrichment.test.ts │ │ │ │ ├── page-view-tracking-enrichment.ts │ │ │ │ ├── remove-event-key-enrichment.test.ts │ │ │ │ └── remove-event-key-enrichment.ts │ │ │ ├── setup.js │ │ │ ├── storage/ │ │ │ │ ├── local-storage.test.ts │ │ │ │ └── session-storage.test.ts │ │ │ ├── transport/ │ │ │ │ ├── fetch.test.ts │ │ │ │ ├── send-beacon.test.ts │ │ │ │ └── xhr.test.ts │ │ │ ├── types.test.ts │ │ │ ├── utils/ │ │ │ │ ├── fake-browser-client.ts │ │ │ │ └── snippet-helper.test.ts │ │ │ └── video-capture/ │ │ │ ├── mock-video-observer.ts │ │ │ └── video-capture.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── analytics-browser-test/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── test/ │ │ │ ├── constants.ts │ │ │ ├── helpers.ts │ │ │ ├── in-memory-storage.test.ts │ │ │ ├── index.test.ts │ │ │ ├── responses.ts │ │ │ ├── setup.ts │ │ │ └── web-attribution.test.ts │ │ └── tsconfig.json │ ├── analytics-client-common/ │ │ ├── CHANGELOG.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── analytics-connector.ts │ │ │ ├── attribution/ │ │ │ │ ├── campaign-parser.ts │ │ │ │ ├── campaign-tracker.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── helpers.ts │ │ │ │ └── web-attribution.ts │ │ │ ├── cookie-name.ts │ │ │ ├── default-tracking.ts │ │ │ ├── global-scope.ts │ │ │ ├── index.ts │ │ │ ├── language.ts │ │ │ ├── plugins/ │ │ │ │ └── identity.ts │ │ │ ├── query-params.ts │ │ │ ├── session.ts │ │ │ ├── storage/ │ │ │ │ ├── cookie.ts │ │ │ │ └── helpers.ts │ │ │ ├── transports/ │ │ │ │ └── fetch.ts │ │ │ └── types/ │ │ │ └── global.ts │ │ ├── test/ │ │ │ ├── analytics-connector.test.ts │ │ │ ├── attribution/ │ │ │ │ ├── campaign-parser.test.ts │ │ │ │ ├── campaign-tracker.test.ts │ │ │ │ ├── helpers.test.ts │ │ │ │ └── web-attribution.test.ts │ │ │ ├── cookie-name.test.ts │ │ │ ├── default-tracking.test.ts │ │ │ ├── global-scope.test.ts │ │ │ ├── helpers/ │ │ │ │ └── constants.ts │ │ │ ├── language.test.ts │ │ │ ├── plugins/ │ │ │ │ └── identity.test.ts │ │ │ ├── query-params.test.ts │ │ │ ├── session.test.ts │ │ │ ├── storage/ │ │ │ │ └── cookies.test.ts │ │ │ └── transports/ │ │ │ └── fetch.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── analytics-core/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── __mocks__/ │ │ │ │ └── logger.ts │ │ │ ├── analytics-connector.ts │ │ │ ├── campaign/ │ │ │ │ └── campaign-parser.ts │ │ │ ├── config.ts │ │ │ ├── cookie-name.ts │ │ │ ├── core-client.ts │ │ │ ├── diagnostics/ │ │ │ │ ├── diagnostics-client.ts │ │ │ │ ├── diagnostics-storage.ts │ │ │ │ └── uncaught-sdk-errors.ts │ │ │ ├── event-bridge/ │ │ │ │ ├── event-bridge-channel.ts │ │ │ │ ├── event-bridge-container.ts │ │ │ │ └── event-bridge.ts │ │ │ ├── global-scope.ts │ │ │ ├── identify.ts │ │ │ ├── index.ts │ │ │ ├── language.ts │ │ │ ├── logger.ts │ │ │ ├── messenger/ │ │ │ │ ├── background-capture.ts │ │ │ │ ├── base-window-messenger.ts │ │ │ │ ├── constants.ts │ │ │ │ └── utils.ts │ │ │ ├── network-request-event.ts │ │ │ ├── observers/ │ │ │ │ ├── console.ts │ │ │ │ ├── network.ts │ │ │ │ └── video.ts │ │ │ ├── plugins/ │ │ │ │ ├── destination.ts │ │ │ │ ├── helpers.ts │ │ │ │ └── identity.ts │ │ │ ├── query-params.ts │ │ │ ├── remote-config/ │ │ │ │ ├── remote-config-localstorage.ts │ │ │ │ └── remote-config.ts │ │ │ ├── revenue.ts │ │ │ ├── session.ts │ │ │ ├── storage/ │ │ │ │ ├── browser-storage.ts │ │ │ │ ├── cookie.ts │ │ │ │ ├── helpers.ts │ │ │ │ └── memory.ts │ │ │ ├── timeline.ts │ │ │ ├── transports/ │ │ │ │ ├── base.ts │ │ │ │ ├── fetch.ts │ │ │ │ └── gzip.ts │ │ │ ├── types/ │ │ │ │ ├── amplitude-context.ts │ │ │ │ ├── campaign.ts │ │ │ │ ├── client/ │ │ │ │ │ ├── analytics-client.ts │ │ │ │ │ ├── browser-client.ts │ │ │ │ │ ├── core-client.ts │ │ │ │ │ ├── node-client.ts │ │ │ │ │ └── react-native-client.ts │ │ │ │ ├── config/ │ │ │ │ │ ├── browser-config.ts │ │ │ │ │ ├── core-config.ts │ │ │ │ │ ├── node-config.ts │ │ │ │ │ └── react-native-config.ts │ │ │ │ ├── constants.ts │ │ │ │ ├── custom-enrichment.ts │ │ │ │ ├── element-interactions.ts │ │ │ │ ├── event/ │ │ │ │ │ ├── base-event.ts │ │ │ │ │ ├── event.ts │ │ │ │ │ ├── ingestion-metadata.ts │ │ │ │ │ └── plan.ts │ │ │ │ ├── event-callback.ts │ │ │ │ ├── form-interactions.ts │ │ │ │ ├── frustration-interactions.ts │ │ │ │ ├── loglevel.ts │ │ │ │ ├── messages.ts │ │ │ │ ├── network-tracking.ts │ │ │ │ ├── offline.ts │ │ │ │ ├── page-url-enrichment.ts │ │ │ │ ├── page-view-tracking.ts │ │ │ │ ├── payload.ts │ │ │ │ ├── performance-tracking.ts │ │ │ │ ├── plugin.ts │ │ │ │ ├── proxy.ts │ │ │ │ ├── response.ts │ │ │ │ ├── result.ts │ │ │ │ ├── server-zone.ts │ │ │ │ ├── status.ts │ │ │ │ ├── storage.ts │ │ │ │ ├── transport.ts │ │ │ │ └── user-session.ts │ │ │ ├── utils/ │ │ │ │ ├── chunk.ts │ │ │ │ ├── debug.ts │ │ │ │ ├── environment.ts │ │ │ │ ├── event-builder.ts │ │ │ │ ├── json-query.ts │ │ │ │ ├── observable.ts │ │ │ │ ├── omit-undefined.ts │ │ │ │ ├── result-builder.ts │ │ │ │ ├── return-wrapper.ts │ │ │ │ ├── safe-stringify.ts │ │ │ │ ├── sampling.ts │ │ │ │ ├── status-code.ts │ │ │ │ ├── url-utils.ts │ │ │ │ ├── uuid.ts │ │ │ │ └── valid-properties.ts │ │ │ └── video-analytics/ │ │ │ ├── track-video.ts │ │ │ └── types.ts │ │ ├── test/ │ │ │ ├── analytics-connector.test.ts │ │ │ ├── campaign/ │ │ │ │ └── campaign-parser.test.ts │ │ │ ├── config.test.ts │ │ │ ├── cookie-name.test.ts │ │ │ ├── core-client.test.ts │ │ │ ├── diagnostics/ │ │ │ │ ├── diagnostics-client.test.ts │ │ │ │ ├── diagnostics-storage.test.ts │ │ │ │ └── uncaught-sdk-errors.test.ts │ │ │ ├── event-bridge/ │ │ │ │ ├── event-bridge-channel.test.ts │ │ │ │ ├── event-bridge-container.test.ts │ │ │ │ └── event-bridge.test.ts │ │ │ ├── global-scope.test.ts │ │ │ ├── helpers/ │ │ │ │ ├── default.ts │ │ │ │ └── util.ts │ │ │ ├── identify.test.ts │ │ │ ├── index.test.ts │ │ │ ├── language.test.ts │ │ │ ├── logger.test.ts │ │ │ ├── messenger/ │ │ │ │ ├── background-capture.test.ts │ │ │ │ ├── base-window-messenger.test.ts │ │ │ │ └── utils.test.ts │ │ │ ├── network-observer.test.ts │ │ │ ├── observers/ │ │ │ │ ├── console.test.ts │ │ │ │ └── video.test.ts │ │ │ ├── plugins/ │ │ │ │ ├── destination.test.ts │ │ │ │ ├── helpers.test.ts │ │ │ │ └── identity.test.ts │ │ │ ├── query-params.test.ts │ │ │ ├── remote-config/ │ │ │ │ ├── remote-config-localstorage.test.ts │ │ │ │ └── remote-config.test.ts │ │ │ ├── revenue.test.ts │ │ │ ├── session.test.ts │ │ │ ├── setup.js │ │ │ ├── storage/ │ │ │ │ ├── browser-storage.test.ts │ │ │ │ ├── cookies.test.ts │ │ │ │ ├── helpers.test.ts │ │ │ │ └── memory.test.ts │ │ │ ├── timeline.test.ts │ │ │ ├── transports/ │ │ │ │ ├── base.test.ts │ │ │ │ ├── fetch.test.ts │ │ │ │ └── gzip.test.ts │ │ │ ├── tsconfig.json │ │ │ ├── utils/ │ │ │ │ ├── chunk.test.ts │ │ │ │ ├── debug.test.ts │ │ │ │ ├── environment.test.ts │ │ │ │ ├── event-builder.test.ts │ │ │ │ ├── json-query.test.ts │ │ │ │ ├── observable.test.ts │ │ │ │ ├── omit-undefined.test.ts │ │ │ │ ├── result-builder.test.ts │ │ │ │ ├── return-wrapper.test.ts │ │ │ │ ├── safe-stringify.test.ts │ │ │ │ ├── sampling.test.ts │ │ │ │ ├── url-utils.test.ts │ │ │ │ ├── uuid.test.ts │ │ │ │ └── valid-properties.test.ts │ │ │ └── video-analytics/ │ │ │ ├── mock-video.ts │ │ │ └── track-video.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── analytics-node/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── config.ts │ │ │ ├── index.ts │ │ │ ├── node-client.ts │ │ │ ├── plugins/ │ │ │ │ └── context.ts │ │ │ ├── transports/ │ │ │ │ └── http.ts │ │ │ ├── types.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── config.test.ts │ │ │ ├── helpers/ │ │ │ │ └── default.ts │ │ │ ├── index.test.ts │ │ │ ├── node-client.test.ts │ │ │ ├── plugins/ │ │ │ │ └── context.test.ts │ │ │ ├── transport/ │ │ │ │ └── http.test.ts │ │ │ └── types.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── analytics-node-test/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── test/ │ │ │ ├── constants.ts │ │ │ ├── index.test.ts │ │ │ └── responses.ts │ │ └── tsconfig.json │ ├── analytics-react-native/ │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── __mocks__/ │ │ │ └── @react-native-async-storage/ │ │ │ └── async-storage.ts │ │ ├── amplitude-react-native.podspec │ │ ├── android/ │ │ │ ├── build.gradle │ │ │ ├── gradle.properties │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── AndroidManifestNew.xml │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── amplitude/ │ │ │ └── reactnative/ │ │ │ ├── AmplitudeReactNativeModule.kt │ │ │ ├── AmplitudeReactNativePackage.java │ │ │ ├── AndroidContextProvider.kt │ │ │ ├── AndroidLogger.kt │ │ │ └── LegacyDatabaseStorage.kt │ │ ├── babel.config.js │ │ ├── ios/ │ │ │ ├── AmplitudeReactNative-Bridging-Header.h │ │ │ ├── AmplitudeReactNative.m │ │ │ ├── AmplitudeReactNative.swift │ │ │ ├── AmplitudeReactNative.xcodeproj/ │ │ │ │ └── project.pbxproj │ │ │ ├── AppleContextProvider.swift │ │ │ └── LegacyDatabaseStorage.swift │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── campaign/ │ │ │ │ ├── campaign-tracker.ts │ │ │ │ └── types.ts │ │ │ ├── config.ts │ │ │ ├── cookie-migration/ │ │ │ │ └── index.ts │ │ │ ├── index.ts │ │ │ ├── migration/ │ │ │ │ └── remnant-data-migration.ts │ │ │ ├── plugins/ │ │ │ │ └── context.ts │ │ │ ├── react-native-client.ts │ │ │ ├── storage/ │ │ │ │ └── local-storage.ts │ │ │ ├── types.ts │ │ │ ├── utils/ │ │ │ │ └── platform.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── config.test.ts │ │ │ ├── cookie-migration/ │ │ │ │ └── index.test.ts │ │ │ ├── helpers/ │ │ │ │ ├── constants.ts │ │ │ │ └── default.ts │ │ │ ├── index.test.ts │ │ │ ├── migration/ │ │ │ │ └── remnant-data-migration.test.ts │ │ │ ├── mock/ │ │ │ │ ├── @react-native-async-storage/ │ │ │ │ │ └── async-storage.js │ │ │ │ ├── setup-mobile.ts │ │ │ │ └── setup-web.ts │ │ │ ├── plugins/ │ │ │ │ └── context.test.ts │ │ │ ├── react-native-client.test.ts │ │ │ ├── react-native-sessions.test.ts │ │ │ ├── storage/ │ │ │ │ └── local-storage.test.ts │ │ │ ├── tsconfig.json │ │ │ └── types.test.ts │ │ ├── tsconfig.build.json │ │ └── tsconfig.json │ ├── analytics-types/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── package.json │ │ ├── src/ │ │ │ ├── amplitude-promise.ts │ │ │ ├── base-event.ts │ │ │ ├── campaign.ts │ │ │ ├── client/ │ │ │ │ ├── core-client.ts │ │ │ │ ├── index.ts │ │ │ │ ├── node-client.ts │ │ │ │ └── web-client.ts │ │ │ ├── config/ │ │ │ │ ├── browser.ts │ │ │ │ ├── core.ts │ │ │ │ ├── index.ts │ │ │ │ ├── node.ts │ │ │ │ └── react-native.ts │ │ │ ├── destination-context.ts │ │ │ ├── element-interactions.ts │ │ │ ├── event-bridge.ts │ │ │ ├── event-callback.ts │ │ │ ├── event.ts │ │ │ ├── index.ts │ │ │ ├── ingestion-metadata.ts │ │ │ ├── logger.ts │ │ │ ├── offline.ts │ │ │ ├── page-view-tracking.ts │ │ │ ├── payload.ts │ │ │ ├── plan.ts │ │ │ ├── plugin.ts │ │ │ ├── proxy.ts │ │ │ ├── response.ts │ │ │ ├── result.ts │ │ │ ├── server-zone.ts │ │ │ ├── status.ts │ │ │ ├── storage.ts │ │ │ ├── transport.ts │ │ │ ├── user-session.ts │ │ │ └── utm.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── e2e-remote-config/ │ │ ├── README.md │ │ ├── remote-config-test-staging.sh │ │ ├── remote-config-test.sh │ │ └── test/ │ │ └── e2e/ │ │ └── fetch-remote-config.spec.ts │ ├── gtm-snippet/ │ │ ├── CHANGELOG.md │ │ ├── amplitude-wrapper.js.ejs │ │ ├── e2e/ │ │ │ ├── gtm-snippet.spec.ts │ │ │ └── helpers.ts │ │ ├── package.json │ │ ├── playwright.config.ts │ │ ├── rollup.config.js │ │ ├── scripts/ │ │ │ ├── build-snippet.js │ │ │ ├── upload-to-s3.js │ │ │ └── version.js │ │ └── tsconfig.json │ ├── plugin-autocapture-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── e2e/ │ │ │ └── autocapture.spec.ts │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── playwright.config.ts │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── autocapture/ │ │ │ │ ├── track-action-click.ts │ │ │ │ ├── track-change.ts │ │ │ │ ├── track-click.ts │ │ │ │ ├── track-dead-click.ts │ │ │ │ ├── track-error-click.ts │ │ │ │ ├── track-exposure.ts │ │ │ │ ├── track-long-task.ts │ │ │ │ ├── track-rage-click.ts │ │ │ │ ├── track-scroll.ts │ │ │ │ ├── track-thrashed-cursor.ts │ │ │ │ └── track-viewport-content-updated.ts │ │ │ ├── autocapture-plugin.ts │ │ │ ├── constants.ts │ │ │ ├── data-extractor.ts │ │ │ ├── frustration-plugin.ts │ │ │ ├── helpers.ts │ │ │ ├── hierarchy.ts │ │ │ ├── index.ts │ │ │ ├── libs/ │ │ │ │ ├── element-path.ts │ │ │ │ └── messenger.ts │ │ │ ├── observables.ts │ │ │ ├── pageActions/ │ │ │ │ ├── actions.ts │ │ │ │ ├── matchEventToFilter.ts │ │ │ │ └── triggers.ts │ │ │ ├── performance-plugin.ts │ │ │ ├── typings/ │ │ │ │ └── autocapture.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── autocapture-plugin/ │ │ │ │ ├── actions.test.ts │ │ │ │ ├── frustration-plugin.test.ts │ │ │ │ ├── performance-plugin.test.ts │ │ │ │ ├── track-action-clicks.test.ts │ │ │ │ ├── track-dead-click.test.ts │ │ │ │ ├── track-error-click.test.ts │ │ │ │ ├── track-exposure.test.ts │ │ │ │ ├── track-long-task.test.ts │ │ │ │ ├── track-rage-click.test.ts │ │ │ │ ├── track-scroll.test.ts │ │ │ │ ├── track-thrashed-cursor.test.ts │ │ │ │ └── viewport-content-updated.test.ts │ │ │ ├── constants.test.ts │ │ │ ├── data-extractor.test.ts │ │ │ ├── default-event-tracking-advanced.test.ts │ │ │ ├── helpers.test.ts │ │ │ ├── hierarchy.test.ts │ │ │ ├── mock-browser-client.ts │ │ │ ├── observable.test.ts │ │ │ ├── observables-coverage.test.ts │ │ │ ├── observables.test.ts │ │ │ ├── pageActions/ │ │ │ │ ├── matchEventToFilter.test.ts │ │ │ │ └── triggers.test.ts │ │ │ ├── setup.ts │ │ │ └── utils.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-custom-enrichment-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── custom-enrichment.ts │ │ │ └── index.ts │ │ ├── test/ │ │ │ └── custom-enrichment.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-event-property-attribution-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── event-property-tracking.ts │ │ │ └── index.ts │ │ ├── test/ │ │ │ └── event-property-tracking.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-experiment-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── experiment.ts │ │ │ ├── index.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── experiment.test.ts │ │ │ └── version.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-global-user-properties/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── global-user-properties.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ └── typings/ │ │ │ └── global-user-properties.ts │ │ ├── test/ │ │ │ └── global-user-properties.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-network-capture-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── network-capture-plugin.ts │ │ │ ├── track-network-event.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── autocapture-plugin/ │ │ │ │ └── track-network-event.test.ts │ │ │ ├── e2e/ │ │ │ │ ├── fetch.spec.ts │ │ │ │ └── xhr.spec.ts │ │ │ ├── mock-browser-client.ts │ │ │ └── setup.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-page-url-enrichment-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── page-url-enrichment.ts │ │ │ └── typings/ │ │ │ └── page-url-enrichment.ts │ │ ├── test/ │ │ │ ├── mock-browser-client.ts │ │ │ └── page-url-enrichment.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-page-view-tracking-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── page-view-tracking.ts │ │ │ └── typings/ │ │ │ └── page-view-tracking.ts │ │ ├── test/ │ │ │ ├── mock-browser-client.ts │ │ │ └── page-view-tracking.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-session-replay-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── scripts/ │ │ │ └── publish/ │ │ │ └── upload-to-s3.js │ │ ├── src/ │ │ │ ├── constants.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── session-replay.ts │ │ │ ├── typings/ │ │ │ │ └── session-replay.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── integration/ │ │ │ │ ├── browser-sdk-integration.test.ts │ │ │ │ └── mockAPIHandlers.ts │ │ │ ├── jest-setup.js │ │ │ ├── jsdom-extended.js │ │ │ ├── plugin-helpers.test.ts │ │ │ └── session-replay.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-session-replay-react-native/ │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .nvmrc │ │ ├── .watchmanconfig │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── amplitude-plugin-session-replay-react-native.podspec │ │ ├── android/ │ │ │ ├── build.gradle │ │ │ ├── gradle.properties │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── AndroidManifestNew.xml │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── amplitude/ │ │ │ └── pluginsessionreplayreactnative/ │ │ │ ├── PluginSessionReplayReactNativeModule.kt │ │ │ ├── PluginSessionReplayReactNativePackage.kt │ │ │ └── PluginSessionReplayViewManager.kt │ │ ├── babel.config.js │ │ ├── example/ │ │ │ ├── .bundle/ │ │ │ │ └── config │ │ │ ├── .eslintrc.js │ │ │ ├── .gitignore │ │ │ ├── .prettierrc.js │ │ │ ├── .watchmanconfig │ │ │ ├── App.tsx │ │ │ ├── Gemfile │ │ │ ├── README.md │ │ │ ├── __tests__/ │ │ │ │ └── App.test.tsx │ │ │ ├── android/ │ │ │ │ ├── app/ │ │ │ │ │ ├── build.gradle │ │ │ │ │ ├── debug.keystore │ │ │ │ │ ├── proguard-rules.pro │ │ │ │ │ └── src/ │ │ │ │ │ ├── debug/ │ │ │ │ │ │ └── AndroidManifest.xml │ │ │ │ │ └── main/ │ │ │ │ │ ├── AndroidManifest.xml │ │ │ │ │ ├── java/ │ │ │ │ │ │ └── com/ │ │ │ │ │ │ └── example/ │ │ │ │ │ │ ├── MainActivity.kt │ │ │ │ │ │ └── MainApplication.kt │ │ │ │ │ └── res/ │ │ │ │ │ ├── drawable/ │ │ │ │ │ │ └── rn_edit_text_material.xml │ │ │ │ │ └── values/ │ │ │ │ │ ├── strings.xml │ │ │ │ │ └── styles.xml │ │ │ │ ├── build.gradle │ │ │ │ ├── gradle/ │ │ │ │ │ └── wrapper/ │ │ │ │ │ ├── gradle-wrapper.jar │ │ │ │ │ └── gradle-wrapper.properties │ │ │ │ ├── gradle.properties │ │ │ │ ├── gradlew │ │ │ │ ├── gradlew.bat │ │ │ │ └── settings.gradle │ │ │ ├── app.json │ │ │ ├── babel.config.js │ │ │ ├── index.js │ │ │ ├── ios/ │ │ │ │ ├── .xcode.env │ │ │ │ ├── Podfile │ │ │ │ ├── example/ │ │ │ │ │ ├── AppDelegate.h │ │ │ │ │ ├── AppDelegate.mm │ │ │ │ │ ├── Images.xcassets/ │ │ │ │ │ │ ├── AppIcon.appiconset/ │ │ │ │ │ │ │ └── Contents.json │ │ │ │ │ │ └── Contents.json │ │ │ │ │ ├── Info.plist │ │ │ │ │ ├── LaunchScreen.storyboard │ │ │ │ │ ├── PrivacyInfo.xcprivacy │ │ │ │ │ └── main.m │ │ │ │ ├── example.xcodeproj/ │ │ │ │ │ ├── project.pbxproj │ │ │ │ │ └── xcshareddata/ │ │ │ │ │ └── xcschemes/ │ │ │ │ │ └── example.xcscheme │ │ │ │ ├── example.xcworkspace/ │ │ │ │ │ └── contents.xcworkspacedata │ │ │ │ └── exampleTests/ │ │ │ │ ├── Info.plist │ │ │ │ └── exampleTests.m │ │ │ ├── jest.config.js │ │ │ ├── metro.config.js │ │ │ ├── package.json │ │ │ └── tsconfig.json │ │ ├── ios/ │ │ │ ├── ConsoleLogger.swift │ │ │ ├── PluginSessionReplayReactNative-Bridging-Header.h │ │ │ ├── PluginSessionReplayReactNative.mm │ │ │ ├── PluginSessionReplayReactNative.swift │ │ │ └── RCTAmpMaskViewManager.m │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── app-mask-view.tsx │ │ │ ├── index.tsx │ │ │ ├── native-module.tsx │ │ │ ├── session-replay-config.ts │ │ │ ├── session-replay.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── index.test.ts │ │ │ └── tsconfig.json │ │ ├── tsconfig.build.json │ │ └── tsconfig.json │ ├── plugin-stub-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── stub-plugin.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ └── index.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-web-attribution-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── typings/ │ │ │ │ └── web-attribution.ts │ │ │ └── web-attribution.ts │ │ ├── test/ │ │ │ └── web-attribution.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── plugin-web-vitals-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── constants.ts │ │ │ ├── index.ts │ │ │ ├── version.ts │ │ │ └── web-vitals-plugin.ts │ │ ├── test/ │ │ │ └── web-vitals-plugin.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── segment-session-replay-plugin/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── scripts/ │ │ │ └── publish/ │ │ │ └── upload-to-s3.js │ │ ├── src/ │ │ │ ├── constants.ts │ │ │ ├── helpers.ts │ │ │ ├── index.ts │ │ │ ├── typings/ │ │ │ │ └── wrapper.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── helpers.test.ts │ │ │ └── index.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ ├── segment-session-replay-plugin-react-native/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── babel.config.js │ │ ├── jest.config.js │ │ ├── jest.setup.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── segment-session-replay-plugin.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── segment-session-replay-plugin.test.ts │ │ │ └── tsconfig.json │ │ ├── tsconfig.build.json │ │ └── tsconfig.json │ ├── session-replay-browser/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── e2e/ │ │ │ ├── README.md │ │ │ ├── back-pressure.spec.ts │ │ │ ├── capture.spec.ts │ │ │ ├── cross-origin-iframe.spec.ts │ │ │ ├── guard.spec.ts │ │ │ ├── helpers.ts │ │ │ ├── idb.spec.ts │ │ │ ├── mutation-merge.spec.ts │ │ │ ├── playwright.config.ts │ │ │ ├── privacy.spec.ts │ │ │ ├── sampling.spec.ts │ │ │ ├── shadow-dom.spec.ts │ │ │ ├── size-limits.spec.ts │ │ │ └── trc-url-rule.spec.ts │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── playwright.config.ts │ │ ├── rollup.config.js │ │ ├── scripts/ │ │ │ └── publish/ │ │ │ └── upload-to-s3.js │ │ ├── src/ │ │ │ ├── beacon-transport.ts │ │ │ ├── config/ │ │ │ │ ├── joined-config.ts │ │ │ │ ├── local-config.ts │ │ │ │ └── types.ts │ │ │ ├── constants.ts │ │ │ ├── cross-origin-iframes.ts │ │ │ ├── events/ │ │ │ │ ├── base-events-store.ts │ │ │ │ ├── event-compressor.ts │ │ │ │ ├── events-idb-store.ts │ │ │ │ ├── events-manager.ts │ │ │ │ ├── events-memory-store.ts │ │ │ │ ├── merge-mutation-events.ts │ │ │ │ └── multi-manager.ts │ │ │ ├── helpers.ts │ │ │ ├── hooks/ │ │ │ │ ├── click.ts │ │ │ │ └── scroll.ts │ │ │ ├── identifiers.ts │ │ │ ├── index.ts │ │ │ ├── libs/ │ │ │ │ └── finder.ts │ │ │ ├── logger.ts │ │ │ ├── messages.ts │ │ │ ├── observers/ │ │ │ │ └── index.ts │ │ │ ├── observers.ts │ │ │ ├── plugins/ │ │ │ │ ├── index.ts │ │ │ │ └── url-tracking-plugin.ts │ │ │ ├── replay-start-time-store.ts │ │ │ ├── sampling.ts │ │ │ ├── session-replay-factory.ts │ │ │ ├── session-replay.ts │ │ │ ├── targeting/ │ │ │ │ ├── targeting-idb-store.ts │ │ │ │ └── targeting-manager.ts │ │ │ ├── track-destination.ts │ │ │ ├── typings/ │ │ │ │ └── session-replay.ts │ │ │ ├── utils/ │ │ │ │ ├── get-input-type.ts │ │ │ │ ├── gzip.ts │ │ │ │ ├── is-abort-error.ts │ │ │ │ ├── rrweb.ts │ │ │ │ └── server-url.ts │ │ │ ├── version.ts │ │ │ └── worker/ │ │ │ ├── compression.ts │ │ │ ├── index.ts │ │ │ └── track-destination.ts │ │ ├── test/ │ │ │ ├── __mocks__/ │ │ │ │ └── worker.ts │ │ │ ├── base-events-store.test.ts │ │ │ ├── config/ │ │ │ │ └── joined-config.test.ts │ │ │ ├── cross-origin-iframes.test.ts │ │ │ ├── event-compressor.test.ts │ │ │ ├── events-idb-store-multitab.test.ts │ │ │ ├── events-idb-store-timeout.test.ts │ │ │ ├── events-idb-store.test.ts │ │ │ ├── events-manager.test.ts │ │ │ ├── events-memory-store.test.ts │ │ │ ├── flag-config-data.ts │ │ │ ├── helpers.test.ts │ │ │ ├── hooks/ │ │ │ │ ├── beacon.test.ts │ │ │ │ ├── click.test.ts │ │ │ │ └── scroll.test.ts │ │ │ ├── index.test.ts │ │ │ ├── integration/ │ │ │ │ └── sampling.test.ts │ │ │ ├── integration.test.ts │ │ │ ├── jest-setup.js │ │ │ ├── logger.test.ts │ │ │ ├── merge-mutation-events.test.ts │ │ │ ├── observers.test.ts │ │ │ ├── replay-start-time-store.test.ts │ │ │ ├── sampling.test.ts │ │ │ ├── script/ │ │ │ │ └── test-script-tag.html │ │ │ ├── session-replay-factory.test.ts │ │ │ ├── session-replay.test.ts │ │ │ ├── targeting/ │ │ │ │ ├── targeting-idb-store.test.ts │ │ │ │ └── targeting-manager.test.ts │ │ │ ├── test-data.ts │ │ │ ├── track-destination.test.ts │ │ │ ├── tsconfig.json │ │ │ ├── url-tracking-plugin.test.ts │ │ │ ├── utils/ │ │ │ │ ├── get-input-type.test.ts │ │ │ │ ├── is-abort-error.test.ts │ │ │ │ └── rrweb.test.ts │ │ │ └── worker/ │ │ │ ├── compression.test.ts │ │ │ └── track-destination.test.ts │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ ├── tsconfig.json │ │ └── tsconfig.worker.json │ ├── session-replay-react-native/ │ │ ├── .gitattributes │ │ ├── .gitignore │ │ ├── .nvmrc │ │ ├── .watchmanconfig │ │ ├── AmplitudeSessionReplayReactNative.podspec │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── android/ │ │ │ ├── build.gradle │ │ │ ├── gradle.properties │ │ │ └── src/ │ │ │ └── main/ │ │ │ ├── AndroidManifest.xml │ │ │ ├── AndroidManifestNew.xml │ │ │ └── java/ │ │ │ └── com/ │ │ │ └── amplitude/ │ │ │ └── sessionreplayreactnative/ │ │ │ ├── SessionReplayReactNativeModule.kt │ │ │ ├── SessionReplayReactNativePackage.kt │ │ │ └── SessionReplayReactNativeViewManager.kt │ │ ├── babel.config.js │ │ ├── ios/ │ │ │ ├── AMPNativeSessionReplay.mm │ │ │ ├── NativeSessionReplay-Bridging-Header.h │ │ │ ├── NativeSessionReplay.swift │ │ │ └── RCTAmpMaskViewManager.m │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── src/ │ │ │ ├── amp-mask-view.tsx │ │ │ ├── index.tsx │ │ │ ├── logger.ts │ │ │ ├── native-module.ts │ │ │ ├── plugin-session-replay-config.ts │ │ │ ├── plugin-session-replay.ts │ │ │ ├── session-replay-config.ts │ │ │ ├── session-replay.ts │ │ │ └── version.ts │ │ ├── test/ │ │ │ ├── __mocks__/ │ │ │ │ └── react-native.ts │ │ │ ├── index.test.ts │ │ │ ├── logger.test.ts │ │ │ ├── plugin-session-replay.test.ts │ │ │ ├── session-replay.test.ts │ │ │ ├── tsconfig.json │ │ │ └── utils/ │ │ │ ├── logger.ts │ │ │ └── reactNativeClient.ts │ │ ├── tsconfig.build.json │ │ └── tsconfig.json │ ├── targeting/ │ │ ├── CHANGELOG.md │ │ ├── README.md │ │ ├── jest.config.js │ │ ├── package.json │ │ ├── rollup.config.js │ │ ├── src/ │ │ │ ├── index.ts │ │ │ ├── targeting-factory.ts │ │ │ ├── targeting-idb-store.ts │ │ │ ├── targeting.ts │ │ │ └── typings/ │ │ │ └── targeting.ts │ │ ├── test/ │ │ │ ├── flag-config-data/ │ │ │ │ ├── catch-all.ts │ │ │ │ ├── event-props.ts │ │ │ │ ├── multiple-conditions.ts │ │ │ │ ├── multiple-events.ts │ │ │ │ └── user-props.ts │ │ │ ├── jest-setup.js │ │ │ ├── targeting-factory.test.ts │ │ │ ├── targeting-idb-store.test.ts │ │ │ ├── targeting.test.ts │ │ │ └── tsconfig.json │ │ ├── tsconfig.es5.json │ │ ├── tsconfig.esm.json │ │ └── tsconfig.json │ └── unified/ │ ├── CHANGELOG.md │ ├── README.md │ ├── __mocks__/ │ │ └── @amplitude/ │ │ └── engagement-browser.js │ ├── jest.config.js │ ├── package.json │ ├── rollup.config.js │ ├── src/ │ │ ├── index.ts │ │ ├── library.ts │ │ ├── unified-client-factory.ts │ │ ├── unified.ts │ │ └── version.ts │ ├── test/ │ │ ├── index.test.ts │ │ ├── library.test.ts │ │ ├── unified-client-factory.test.ts │ │ ├── unified-constructor-coverage.test.ts │ │ └── unified.test.ts │ ├── tsconfig.es5.json │ ├── tsconfig.esm.json │ └── tsconfig.json ├── playwright.config.ts ├── pnpm-workspace.yaml ├── scripts/ │ ├── README.md │ ├── build/ │ │ └── rollup.config.js │ ├── check-deprecated-packages.sh │ ├── dev/ │ │ ├── generate-signed-cert.sh │ │ ├── setup-dev-ssh.sh │ │ └── setup-local-domain.sh │ ├── publish/ │ │ ├── check-ref-not-advanced.sh │ │ └── upload-to-s3.js │ ├── templates/ │ │ ├── browser-bookmarklet.template.js │ │ └── browser-snippet.template.js │ ├── utils.js │ └── version/ │ ├── create-bookmarklet-snippet.js │ ├── create-bookmarklet.js │ ├── create-snippet-instructions.js │ ├── create-snippet.js │ └── update-readme.js ├── test-server/ │ ├── .gitignore │ ├── README.md │ ├── analytics-browser-local.html │ ├── analytics-snippet/ │ │ └── index.html │ ├── attribution/ │ │ ├── default-tracking.html │ │ └── event-property-tracking.html │ ├── autocapture/ │ │ ├── element-interactions.html │ │ ├── error-click.html │ │ └── long-task.html │ ├── browser-sdk/ │ │ ├── cookie-consent.html │ │ ├── events-precision.html │ │ ├── index.html │ │ ├── page-url-enrichment-mpa-a.html │ │ ├── page-url-enrichment-mpa-b.html │ │ ├── page-url-enrichment-mpa-c.html │ │ ├── page-url-enrichment.html │ │ ├── page-view-history.html │ │ ├── request-compression.html │ │ ├── reset-test.html │ │ └── web-vitals.html │ ├── cookies/ │ │ ├── is-enabled.html │ │ └── transaction-test.html │ ├── diagnostics.html │ ├── form-test.html │ ├── gtm/ │ │ ├── browser-gtm-wrapper.html │ │ └── gtm.html │ ├── gtm-snippet/ │ │ └── gtm-snippet.html │ ├── helpers/ │ │ └── tough-cookie.js │ ├── iframe-sandbox/ │ │ ├── child.html │ │ └── parent.html │ ├── index.html │ ├── mock-api.js │ ├── network-capture/ │ │ ├── fetch.html │ │ └── xhr.html │ ├── observables/ │ │ ├── mouse-direction-change-observable.html │ │ ├── mouse-observables.html │ │ └── thrashed-cursor-observable.html │ ├── observers/ │ │ └── console.html │ ├── opt-out/ │ │ └── index.html │ ├── proxy-test.html │ ├── remote-config-test.html │ ├── sampling-test.html │ ├── scroll-test.html │ ├── segment.html │ ├── session-replay-browser/ │ │ ├── sr-capture-test.html │ │ ├── sr-cross-origin-iframe-child.html │ │ ├── sr-cross-origin-iframe-parent.html │ │ ├── sr-plugin-with-analytics-sdk.html │ │ ├── sr-privacy-test.html │ │ ├── sr-shadow-dom-test.html │ │ └── sr-standalone-sdk.html │ ├── snippets/ │ │ └── cookie-deduplication.html │ ├── spa-test.html │ ├── unified/ │ │ └── unified.html │ ├── unified-script.html │ ├── unminifier/ │ │ └── index.html │ └── video-analytics/ │ ├── track-embedded-video.html │ └── track-html-video.html ├── tsconfig.json ├── typedoc.json └── vite.config.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .cursor/rules/code-style.mdc ================================================ --- description: globs: alwaysApply: false --- # Code Style Guidelines This document outlines the code style and conventions for the Amplitude TypeScript SDK monorepo. ## TypeScript Conventions ### General Rules - Use TypeScript strict mode with all compiler checks enabled as defined in [tsconfig.json](mdc:tsconfig.json) - Always define explicit return types for public methods and functions - Use meaningful variable and function names that clearly describe their purpose - Prefer `const` over `let` when variables won't be reassigned - Use template literals instead of string concatenation - Avoid `any` type - use proper typing or generic constraints instead ### Interface and Type Definitions - Use `interface` for object shapes that might be extended - Use `type` for unions, intersections, and computed types - Export types that are used across package boundaries - Use PascalCase for interfaces and type names (e.g., `EventType`, `BrowserConfig`) ### Function and Method Conventions - Use camelCase for function and method names - Use async/await instead of raw Promises for better readability - Keep functions focused on a single responsibility - Use proper JSDoc comments for public APIs ### Import/Export Standards - Use named imports/exports over default exports for better tree-shaking - Group imports in this order: external libraries, internal packages, relative imports - Use absolute imports for cross-package references in the monorepo - Consistent barrel exports in `index.ts` files ## Code Organization ### File Structure - Follow the established pattern from [packages/analytics-browser/src](mdc:packages/analytics-browser/src) - Group related functionality in dedicated directories (config, plugins, utils, etc.) - Use descriptive file names that match their primary export ### Class Organization - Private methods and properties should be prefixed with underscore - Group methods logically: constructor, public methods, private methods - Use readonly properties where appropriate - Implement proper error handling and validation ## Formatting Rules The project uses Prettier with the following configuration from [.prettierrc.json](mdc:.prettierrc.json): - Line width: 120 characters - Single quotes for strings - Trailing commas in all contexts - Proper prose wrapping for markdown ## Linting Standards Follow the ESLint configuration defined in [.eslintrc.js](mdc:.eslintrc.js): - No unused variables (except function parameters) - Require explicit return types for TypeScript functions - No multiple empty lines - End files with newline - Avoid unsafe global access (window, globalThis, self) except in test files ## Package-Specific Conventions ### Browser Packages - Use feature detection instead of user agent sniffing - Implement proper error boundaries for browser APIs - Follow the established plugin architecture pattern - Ensure backwards compatibility with older browser versions ### Node.js Packages - Use appropriate Node.js APIs and avoid browser-specific code - Implement proper error handling for server environments - Follow semantic versioning for breaking changes ## Testing Conventions - Use Jest for unit testing as configured in [jest.config.js](mdc:jest.config.js) - Follow the naming pattern `*.test.ts` for test files - Write descriptive test names that explain the expected behavior - Use proper mocking for external dependencies - Maintain high test coverage for public APIs ## Error Handling - Use custom error classes with descriptive messages - Implement proper error boundaries in browser environments - Log errors with appropriate context for debugging - Provide meaningful error messages for developers ## Performance Guidelines - Avoid blocking operations in browser environments - Use lazy loading for optional features - Implement proper caching strategies - Consider bundle size impact for browser packages - Use tree-shaking friendly exports ================================================ FILE: .cursor/rules/commit-and-pr-guidelines.mdc ================================================ --- description: globs: alwaysApply: false --- # Commit and Pull Request Guidelines This document outlines the commit message standards and pull request guidelines for the Amplitude TypeScript SDK. ## Commit Message Standards Follow the [Conventional Commits](mdc:https:/www.conventionalcommits.org) specification as outlined in [CONTRIBUTING.md](mdc:CONTRIBUTING.md). ### Commit Types - **feat**: New features (triggers minor release) - **fix**: Bug fixes (triggers patch release) - **docs**: Documentation updates - **style**: Code style changes (formatting, missing semi-colons, etc.) - **refactor**: Code changes that neither fix bugs nor add features - **perf**: Performance improvements - **test**: Adding or updating tests - **build**: Changes to build system or dependencies - **ci**: Changes to CI configuration - **chore**: Other changes that don't modify src or test files - **revert**: Revert previous commits ### Breaking Changes - Any commit with `BREAKING CHANGE` in the body triggers a major release - Use `!` after the type/scope for breaking changes: `feat!: remove deprecated API` - Clearly document migration path in commit body ### Scope Guidelines Use package names as scopes when changes are package-specific: - `feat(analytics-browser): add new tracking method` - `fix(analytics-node): resolve memory leak issue` - `docs(session-replay): update installation guide` ### Examples of Good Commit Messages ``` feat(analytics-browser): add support for custom user properties This change allows users to set custom properties that persist across all events in a session. BREAKING CHANGE: The setUserProperties method now requires an explicit flush parameter. Use setUserProperties(props, true) to maintain previous behavior. Closes #123 ``` ``` fix(analytics-core): prevent duplicate event submission Added deduplication logic to prevent the same event from being sent multiple times when network issues cause retries. Fixes #456 ``` ``` docs: update installation instructions for v2 - Added Node.js version requirements - Updated package installation commands - Added migration guide from v1 ``` ## Pull Request Guidelines ### PR Title Standards - Use the same format as commit messages - Title should be descriptive and concise - Include scope when PR affects specific package - Examples: - `feat(analytics-browser): implement session tracking` - `fix: resolve TypeScript compilation errors` - `docs: update API documentation examples` ### PR Description Template Include the following sections in your PR description: ```markdown ## Summary Brief description of what this PR accomplishes. ## Changes - List of specific changes made - New features added - Bugs fixed - Dependencies updated ## Testing - [ ] Unit tests added/updated - [ ] Integration tests pass - [ ] Manual testing completed - [ ] Browser compatibility verified (if applicable) ## Breaking Changes Describe any breaking changes and migration steps required. ## Related Issues - Closes #123 - Related to #456 ## Checklist - [ ] Code follows project style guidelines - [ ] Self-review of code completed - [ ] Documentation updated - [ ] Tests added for new functionality - [ ] All tests pass - [ ] No new ESLint warnings ``` ================================================ FILE: .env.example ================================================ # Copy and paste this file to .env and fill in the values VITE_AMPLITUDE_API_KEY= VITE_AMPLITUDE_USER_ID= VITE_GTM_CONTAINER_ID= ================================================ FILE: .eslintignore ================================================ **/*.js examples/ playwright.config.ts ================================================ FILE: .eslintrc.js ================================================ module.exports = { root: true, env: { es6: true, 'jest/globals': true, }, parser: '@typescript-eslint/parser', parserOptions: { ecmaVersion: 2018, project: 'packages/*/tsconfig.json', sourceType: 'module', tsconfigRootDir: __dirname, }, plugins: ['@typescript-eslint', 'jest'], extends: [ 'eslint:recommended', 'plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking', 'plugin:jest/recommended', 'prettier', "plugin:import/recommended", ], settings: { 'import/resolver': { typescript: { alwaysTryTypes: true, project: 'packages/*/tsconfig.json', }, }, }, rules: { '@typescript-eslint/member-delimiter-style': 0, '@typescript-eslint/no-explicit-any': 0, '@typescript-eslint/no-unused-vars': ['error', { vars: 'all', args: 'none', ignoreRestSiblings: true }], '@typescript-eslint/semi': 0, '@typescript-eslint/space-before-function-paren': 0, '@typescript-eslint/require-await': 0, 'comma-dangle': 0, 'new-cap': 0, 'eol-last': [2, 'always'], 'no-multiple-empty-lines': [2, { max: 1, maxEOF: 0 }], 'no-restricted-globals': [ 'error', { name: 'globalThis', message: 'Unsafe access to `globalThis`.', }, { name: 'window', message: 'Unsafe access to `window`.', }, { name: 'self', message: 'Unsafe access to `self`.', }, ], 'import/no-extraneous-dependencies': [ 'error', { optionalDependencies: false, }, ], }, overrides: [ { // Allow test files and e2e helpers to access globals files: ['*.test.ts', '*.spec.ts', '**/e2e/**/*.ts'], rules: { 'no-restricted-globals': 'off', 'import/no-unresolved': 'off', 'import/named': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', 'import/no-extraneous-dependencies': 'off', 'import/no-unsafe-argument': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-argument': 'off', }, }, ], }; ================================================ FILE: .github/CODEOWNERS ================================================ # CODEOWNERS file for Amplitude TypeScript repository # This file defines code ownership for different parts of the repository. # When a pull request is opened that modifies files matching these patterns, # the specified teams/individuals will automatically be requested for review. # # More info: https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners # Session Replay Packages (Browser) # Owned by the Session Replay SDK team /packages/session-replay-browser/ @amplitude/session-replay-sdk /packages/plugin-session-replay-browser/ @amplitude/session-replay-sdk /packages/segment-session-replay-plugin/ @amplitude/session-replay-sdk /packages/targeting/ @amplitude/session-replay-sdk ================================================ FILE: .github/ISSUE_TEMPLATE/Bug_report.md ================================================ --- name: Bug report 🐛 about: You're having technical issues labels: 'bug' --- ## Expected Behavior ## Current Behavior ## Possible Solution ## Steps to Reproduce 1. 2. 3. 4. ## Environment - JS SDK Version: - Installation Method: - Browser and Version: ================================================ FILE: .github/ISSUE_TEMPLATE/Feature_request.md ================================================ --- name: Feature Request 🚀 about: You'd like something added to the SDK labels: 'enhancement' --- ## Summary ## Motivations ================================================ FILE: .github/ISSUE_TEMPLATE/Question.md ================================================ --- name: Question ❓ about: Ask a question labels: 'question' --- ## Summary ================================================ FILE: .github/actions/build-and-test/action.yml ================================================ name: 'Build and Test' description: 'Install dependencies, build, test, and lint packages' inputs: node-version: description: 'Node.js version to use' required: true runs: using: "composite" steps: - name: Setup pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - name: Setup Node.js ${{ inputs.node-version }} uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: ${{ inputs.node-version }} registry-url: 'https://registry.npmjs.org' cache: 'pnpm' - name: Install project dependencies run: | pnpm install --frozen-lockfile shell: bash - name: Build all packages run: | pnpm build shell: bash - name: Test all packages run: | pnpm test shell: bash - name: Lint all packages run: | pnpm lint shell: bash - name: Configure Git User run: | git config --global user.name amplitude-sdk-dev git config --global user.email 249154226+amplitude-sdk-dev@users.noreply.github.com shell: bash - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2 if: github.event.inputs.releaseType != 'dry-run' with: role-to-assume: arn:aws:iam::358203115967:role/github-actions-role aws-region: us-west-2 ================================================ FILE: .github/actions/e2e-test/action.yml ================================================ name: 'E2E Test' description: 'Setup environment, build packages, start dev server, and run Playwright E2E tests' inputs: amplitude-api-key: description: 'Amplitude API key for E2E tests' required: true amplitude-user-id: description: 'Amplitude user ID for E2E tests' required: false default: 'github-actions-sdk-user' server-port: description: 'Port for the dev server' required: false default: '5173' node-version: description: 'Node.js version to use' required: false default: '20.x' runs: using: 'composite' steps: - name: Cache dependencies uses: actions/cache@2f8e54208210a422b2efd51efaa6bd6d7ca8920f # v3 with: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/pnpm-lock.yaml') }} - name: Setup Node.js uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3 with: node-version: ${{ inputs.node-version }} - name: Setup pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - name: Install project dependencies shell: bash run: pnpm install --frozen-lockfile - name: Build all packages shell: bash run: pnpm build - name: Create .env file shell: bash run: | echo "VITE_AMPLITUDE_API_KEY=${{ inputs.amplitude-api-key }}" > .env echo "VITE_AMPLITUDE_USER_ID=${{ inputs.amplitude-user-id }}" >> .env - name: Start dev server shell: bash run: | pnpm build:vite pnpm start --port ${{ inputs.server-port }} & sleep 10 curl -f http://localhost:${{ inputs.server-port }} || exit 1 - name: Run Playwright tests shell: bash run: pnpm test:playwright:ci - name: Upload Playwright Report if: always() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: playwright-report path: playwright-report/ retention-days: 30 - name: Upload Test Results if: always() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: test-results path: test-results/ retention-days: 30 ================================================ FILE: .github/pull_request_template.md ================================================ ### Summary ### Checklist * [ ] Does your PR title have the correct [title format](https://github.com/amplitude/Amplitude-TypeScript/blob/main/CONTRIBUTING.md#pr-commit-title-conventions)? * Does your PR have a breaking change?: ================================================ FILE: .github/workflows/ci-nx.yml ================================================ name: Continuous Integration (Nx) on: pull_request: types: [opened, synchronize] jobs: check-deprecated-packages: name: Check Deprecated Packages runs-on: ubuntu-latest steps: - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: fetch-depth: 0 # Required to compare with base branch - name: Check for new usage of deprecated packages env: GITHUB_BASE_REF: ${{ github.base_ref }} run: | bash scripts/check-deprecated-packages.sh build-docs: name: Build Docs runs-on: ubuntu-latest steps: - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Setup pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - name: Setup Node.js 20 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: 20 cache: 'pnpm' - name: Install project dependencies run: pnpm install --frozen-lockfile - name: Build all packages run: pnpm build - name: Build docs run: pnpm docs:check build: name: Build strategy: fail-fast: false matrix: node-version: [20.x, 22.x, 24.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} env: NX_BASE: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || 'origin/main~1' }} NX_HEAD: ${{ github.sha }} steps: - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: fetch-depth: 0 # Required for NX affected commands - name: Setup pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install project dependencies run: pnpm install --frozen-lockfile - name: Set up NX base for affected commands run: | # Ensure we have the main branch reference for NX affected commands git fetch origin main:main --depth=1 || git fetch origin main --depth=1 - name: Build affected packages run: | pnpm build:nx-affected # https://github.com/amplitude/Amplitude-TypeScript/issues/281 - name: Check module dependencies run: | if grep -rnw 'packages/analytics-core/lib' -e '/// '; then exit 1 elif grep -rnw 'packages/analytics-browser/lib' -e '/// '; then exit 1 elif grep -rnw 'packages/analytics-marketing-analytics-browser/lib' -e '/// '; then exit 1 elif grep -rnw 'packages/analytics-react-native/lib' -e '/// '; then exit 1 fi - name: Test affected packages run: pnpm test:nx-affected - name: Lint affected packages run: pnpm lint:nx-affected ================================================ FILE: .github/workflows/ci.yml ================================================ name: Continuous Integration on: push: branches: - main - v1.x jobs: build: name: Build strategy: fail-fast: false matrix: node-version: [20.x, 22.x, 24.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Setup pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: ${{ matrix.node-version }} cache: 'pnpm' - name: Install project dependencies run: | pnpm install --frozen-lockfile - name: Build all packages run: | pnpm build # https://github.com/amplitude/Amplitude-TypeScript/issues/281 - name: Check module dependencies run: | if grep -rnw 'packages/analytics-core/lib' -e '/// '; then exit 1 elif grep -rnw 'packages/analytics-browser/lib' -e '/// '; then exit 1 elif grep -rnw 'packages/analytics-marketing-analytics-browser/lib' -e '/// '; then exit 1 elif grep -rnw 'packages/analytics-react-native/lib' -e '/// '; then exit 1 fi - name: Build docs run: | pnpm docs:check - name: Test all packages run: | pnpm test - name: Lint all packages run: | pnpm lint ================================================ FILE: .github/workflows/docs.yml ================================================ name: Generate Docs on: workflow_dispatch jobs: build-and-deploy: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Setup pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - name: Setup run: | pnpm install --frozen-lockfile pnpm build pnpm docs - name: Deploy uses: JamesIves/github-pages-deploy-action@0f24da7de3e7e135102609a4c9633b025be8411b # 4.1.5 with: branch: docs folder: docs ================================================ FILE: .github/workflows/e2e-session-replay.yml ================================================ name: Session Replay Browser E2E on: pull_request: types: [opened, synchronize] paths: - 'packages/session-replay-browser/**' - 'test-server/session-replay-browser/**' push: branches: - main paths: - 'packages/session-replay-browser/**' - 'test-server/session-replay-browser/**' # Non-blocking: failures are visible in the checks list but do not prevent merging. # Once the suite is stable this job can be added to required status checks. jobs: e2e-session-replay: name: Session Replay Browser E2E if: github.actor != 'dependabot[bot]' runs-on: ubuntu-latest continue-on-error: true permissions: pull-requests: write container: image: mcr.microsoft.com/playwright:v1.55.0 steps: - name: Check out repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Setup pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - name: Setup Node.js uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3 with: node-version: '20.x' - name: Install dependencies run: pnpm install --frozen-lockfile - name: Build session-replay-browser and workspace dependencies run: pnpm --filter @amplitude/session-replay-browser... build - name: Run e2e tests (Chromium only) working-directory: packages/session-replay-browser run: npx playwright test --project=chromium - name: Post test summary as PR comment if: always() && github.event_name == 'pull_request' uses: daun/playwright-report-summary@1229105480a2a4bdd91598d8a146fbab41343fce # v3 with: report-file: packages/session-replay-browser/e2e/results.json github-token: ${{ secrets.GITHUB_TOKEN }} comment-title: 'Session Replay Browser E2E Results' - name: Upload Playwright report if: always() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: sr-e2e-playwright-report path: packages/session-replay-browser/playwright-report/ retention-days: 14 - name: Upload test results if: always() uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 with: name: sr-e2e-test-results path: packages/session-replay-browser/test-results/ retention-days: 14 ================================================ FILE: .github/workflows/e2e.yml ================================================ name: E2E Tests on: push: branches: - main - v1.x pull_request: types: [opened, synchronize] jobs: e2e: name: E2E Tests if: github.actor != 'dependabot[bot]' runs-on: ubuntu-latest container: image: mcr.microsoft.com/playwright:v1.55.0 steps: - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: fetch-depth: 0 - name: Run E2E tests uses: ./.github/actions/e2e-test with: amplitude-api-key: ${{ secrets.AMPLITUDE_API_KEY }} ================================================ FILE: .github/workflows/publish-single-package.yml ================================================ # This workflow is for publishing NEW packages that are currently private # It's separate from the main publish-v2.yml workflow which handles stable releases # Use this workflow for new packages that will only have beta/alpha versions # The 'latest' tag will always point to the most recent version (even if beta/alpha) # since these packages don't have stable releases yet # # IMPORTANT: Once a stable (non-beta/alpha) version is published to latest, # this workflow will prevent further beta/alpha publishing to maintain stability name: Publish New Package (Beta/Alpha with Latest Tag) on: workflow_dispatch: inputs: packageName: type: string description: "Package name (e.g., unified, analytics-browser) - must be a valid package in packages/ directory" required: true releaseTag: type: choice description: "Release type - choose beta for testing releases or alpha for experimental releases (package will be published with latest tag, but only if no stable version exists)" required: true options: - beta - alpha dryRun: type: boolean description: "Dry run (skip changelog update and npm publish) - recommended to test first" required: true default: true jobs: # Authorization step - ensures only users with write permissions can trigger this workflow authorize: name: Authorize runs-on: ubuntu-latest steps: - name: ${{ github.actor }} permission check to do a release uses: "lannonbr/repo-permission-check-action@2bb8c89ba8bf115c4bfab344d6a6f442b24c9a1f" # 2.0.2 with: permission: "write" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Main publishing job - handles the actual package publishing process # This workflow is specifically for NEW packages that are currently private # It publishes beta/alpha versions but always uses 'latest' tag for the most recent version # since these packages don't have stable releases yet publish-package: name: Publish New Package (Beta/Alpha with Latest Tag) runs-on: ubuntu-latest needs: [authorize] permissions: id-token: write contents: write env: PACKAGE_NAME: ${{ github.event.inputs.packageName }} RELEASE_TAG: ${{ github.event.inputs.releaseTag }} DRY_RUN: ${{ github.event.inputs.dryRun }} PACKAGE_PATH: packages/${{ github.event.inputs.packageName }} strategy: matrix: node-version: [24.x] steps: # Checkout the repository with full history for version management - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: fetch-depth: 0 # Verify the specified package exists and has the required structure - name: Verify package exists run: | if [ ! -d "$PACKAGE_PATH" ]; then echo "❌ Package directory $PACKAGE_PATH does not exist" exit 1 fi if [ ! -f "$PACKAGE_PATH/package.json" ]; then echo "❌ package.json not found in $PACKAGE_PATH" exit 1 fi echo "✅ Package $PACKAGE_NAME found at $PACKAGE_PATH" # Check if latest published version is stable to prevent beta/alpha publishing - name: Validate version publishing rules run: | echo "🔍 Checking if package can publish beta/alpha versions..." # Get the package name from package.json PACKAGE_JSON_NAME=$(node -p "require('./$PACKAGE_PATH/package.json').name") echo "Package name: $PACKAGE_JSON_NAME" # Check if package exists on npm and get latest version if npm view "$PACKAGE_JSON_NAME" version 2>/dev/null; then LATEST_VERSION=$(npm view "$PACKAGE_JSON_NAME" version 2>/dev/null) echo "Latest published version: $LATEST_VERSION" # Check if latest version is stable (doesn't contain beta or alpha) if [[ "$LATEST_VERSION" == *"beta"* ]] || [[ "$LATEST_VERSION" == *"alpha"* ]]; then echo "✅ Latest version ($LATEST_VERSION) is pre-release, can publish beta/alpha" else echo "❌ ERROR: Latest version ($LATEST_VERSION) is stable (non-beta/alpha)" echo "Once a stable version is published to latest, you cannot publish beta/alpha versions anymore." echo "This prevents version regression and maintains package stability." echo "" echo "If you need to publish a new stable version, use the main publish workflow instead." echo "If this is a new package, ensure the first version is beta/alpha." exit 1 fi else echo "✅ Package not found on npm, this appears to be a new package" echo "New packages can publish beta/alpha versions with latest tag" fi - name: Setup PNPM uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 # Setup Node.js environment - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: ${{ matrix.node-version }} cache: "pnpm" # Install all project dependencies - name: Install project dependencies run: | pnpm install --frozen-lockfile # Configure Git for automated commits - name: Configure Git User run: | git config --global user.name amplitude-sdk-bot git config --global user.email amplitude-sdk-bot@users.noreply.github.com # Calculate new version and update package files # This increments the patch version for beta/alpha releases # For new packages, this will be the first version (e.g., 1.0.0-beta.1) # The 'latest' tag will always point to the most recent version - name: Calculate and update version run: | cd $PACKAGE_PATH # Get current version - use node to extract just the version value CURRENT_VERSION=$(node -p "require('./package.json').version") echo "Current version: $CURRENT_VERSION" # Simply increment the last digit of the version # Extract the last digit and increment it LAST_DIGIT=$(echo "$CURRENT_VERSION" | grep -o '[0-9][0-9]*$') NEW_LAST_DIGIT=$((LAST_DIGIT + 1)) # Replace the last digit with the incremented value NEW_VERSION=$(echo "$CURRENT_VERSION" | sed "s/[0-9][0-9]*$/$NEW_LAST_DIGIT/") echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV echo "✅ New version would be: $CURRENT_VERSION → $NEW_VERSION" # Update version in package.json immediately (needed for build) npm pkg set version="$NEW_VERSION" # Update version in src/version.ts - this file must exist if [ -f "src/version.ts" ]; then echo "Updating src/version.ts with new version" echo "// Autogenerated by \`pnpm version-file\`. DO NOT EDIT" > src/version.ts echo "export const VERSION = '$NEW_VERSION';" >> src/version.ts echo "✅ Updated src/version.ts to version $NEW_VERSION" else echo "❌ ERROR: src/version.ts not found in $PACKAGE_NAME package" echo "This file is required for version management. Please ensure the package has the correct structure." exit 1 fi # Dry run mode - shows what would be published without actually doing it # This is the default mode to prevent accidental publishes - name: Dry run summary and exit if: ${{ env.DRY_RUN == 'true' }} run: | cd $PACKAGE_PATH echo "🔍 DRY RUN SUMMARY:" echo "Package: $PACKAGE_NAME" echo "Current version: $CURRENT_VERSION" echo "New version would be: $NEW_VERSION" echo "Release tag: latest (always latest for new packages)" echo "Would publish: $PACKAGE_NAME@$NEW_VERSION with tag latest" echo "✅ Dry run completed successfully - exiting without making changes" exit 0 # Build the package to ensure it compiles correctly - name: Build package run: | pnpm build # Run tests to ensure package quality - name: Test package run: | pnpm test # Lint the code to ensure code quality standards - name: Lint package run: | pnpm lint # Configure NPM authentication for publishing - name: Configure NPM User if: ${{ env.DRY_RUN == 'false' }} run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" > ~/.npmrc npm whoami # Temporarily make package public for publishing (will be restored to private later) - name: Make package public for publishing if: ${{ env.DRY_RUN == 'false' }} run: | cd $PACKAGE_PATH echo "Making package public for publishing" # Set private to false (version already updated) npm pkg set private=false --json echo "✅ Made package public for publishing" echo "Current package.json settings:" cat package.json | grep -E '"(version|private)"' - name: Update changelog and publish if: ${{ env.DRY_RUN == 'false' }} run: | cd $PACKAGE_PATH # Generate changelog entry echo "Updating changelog for version $NEW_VERSION" # Check if CHANGELOG.md exists if [ ! -f "CHANGELOG.md" ]; then echo "# Changelog" > CHANGELOG.md echo "" >> CHANGELOG.md fi # Add new version entry to changelog TEMP_FILE=$(mktemp) echo "# Changelog" > $TEMP_FILE echo "" >> $TEMP_FILE echo "## $NEW_VERSION ($(date +%Y-%m-%d))" >> $TEMP_FILE echo "" >> $TEMP_FILE echo "- Release $NEW_VERSION" >> $TEMP_FILE echo "" >> $TEMP_FILE # Append existing changelog content (skip the first "# Changelog" line) if [ -f "CHANGELOG.md" ]; then tail -n +2 CHANGELOG.md >> $TEMP_FILE fi mv $TEMP_FILE CHANGELOG.md echo "✅ Updated CHANGELOG.md" # Publish to npm with latest tag (always latest for new packages) echo "Publishing $PACKAGE_NAME@$NEW_VERSION with tag latest" pnpm publish --tag latest --access=public echo "✅ Published $PACKAGE_NAME@$NEW_VERSION to npm with tag latest" # Restore package to private and commit all changes # This ensures the package remains private in the repository after publishing - name: Restore package to private and commit changes if: ${{ env.DRY_RUN == 'false' && always() }} run: | cd $PACKAGE_PATH npm pkg set private=true --json echo "✅ Set package back to private" # Update version in the restored package.json (but keep private: true) npm pkg set version="$NEW_VERSION" # Now commit the changes with the correct private setting echo "Committing version and changelog changes" git status git add package.json CHANGELOG.md src/version.ts git commit -m "chore(release): publish @amplitude/$PACKAGE_NAME@$NEW_VERSION" git tag "@amplitude/$PACKAGE_NAME@$NEW_VERSION" echo "✅ Committed changes and created tag" # Push all changes and tags back to the repository - name: Push changes if: ${{ env.DRY_RUN == 'false' }} run: | # Get current branch name and push to it CURRENT_BRANCH=$(git branch --show-current) echo "Pushing to current branch: $CURRENT_BRANCH" git push origin "$CURRENT_BRANCH" git push origin "@amplitude/$PACKAGE_NAME@$NEW_VERSION" echo "✅ Pushed changes and tags to repository" ================================================ FILE: .github/workflows/publish-v1.yml ================================================ name: Publish v1.x on: workflow_dispatch: inputs: releaseType: type: choice description: Release Type options: - release - prerelease - graduate jobs: authorize: name: Authorize runs-on: ubuntu-latest steps: - name: ${{ github.actor }} permission check to do a release uses: 'lannonbr/repo-permission-check-action@2bb8c89ba8bf115c4bfab344d6a6f442b24c9a1f' # 2.0.2 with: permission: 'write' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} deploy: name: Deploy runs-on: ubuntu-latest needs: [authorize] permissions: id-token: write contents: write env: RELEASE_TYPE: ${{ github.event.inputs.releaseType }} strategy: matrix: node-version: [18.15.x] steps: - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: fetch-depth: 0 ref: v1.x - name: Cache dependencies uses: actions/cache@6f8efc29b200d32929f49075959781ed54ec270c # v3 with: path: '**/node_modules' key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: ${{ matrix.node-version }} - name: Install project dependencies run: | yarn install --frozen-lockfile - name: Build all packages run: | yarn build - name: Test all packages run: | yarn test - name: Lint all packages run: | yarn lint - name: Configure Git User run: | git config --global user.name amplitude-sdk-bot git config --global user.email amplitude-sdk-bot@users.noreply.github.com - name: Configure NPM User run: | echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_PUBLISH_TOKEN }}" > ~/.npmrc npm whoami - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@5fd3084fc36e372ff1fff382a39b10d03659f355 # v2 with: role-to-assume: arn:aws:iam::358203115967:role/github-actions-role aws-region: us-west-2 # https://www.npmjs.com/package/@lerna/version#--conventional-prerelease # patch: 1.0.0 -> 1.0.1-alpha.0 # minor: 1.0.0 -> 1.1.0-alpha.0 # major: 1.0.0 -> 2.0.0-alpha.0 - name: Create pre-release version if: ${{ env.RELEASE_TYPE == 'prerelease'}} run: | GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} npm run deploy:version -- -y --conventional-prerelease --create-release github # https://www.npmjs.com/package/@lerna/version#--conventional-graduate # 1.0.0-alpha.0 -> 1.0.1 - name: Create graduate version if: ${{ env.RELEASE_TYPE == 'graduate'}} run: | GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} npm run deploy:version -- -y --conventional-graduate --create-release github # Use 'release' for the usual deployment # NOTE: You probably want this - name: Create release version if: ${{ env.RELEASE_TYPE == 'release'}} run: | GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} npm run deploy:version -- -y --create-release github # Use 'from git' option if `lerna version` has already been run - name: Publish Release to NPM run: | GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} npm run deploy:publish -- from-git -y --pre-dist-tag v1-beta env: S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} ================================================ FILE: .github/workflows/publish-v2.yml ================================================ name: Publish v2.x on: workflow_dispatch: inputs: releaseType: type: choice description: Release type (release for main branch, prerelease for feature branches) required: true default: prerelease options: - release - prerelease - dry-run branch: type: string description: Branch to create pre-release from (only applies to prerelease/dry-run). required: false skipLernaVersion: type: boolean description: Skip `lerna version` and E2E for release/prerelease recovery runs, then only run the publish step. Use this to recover from a partial npm publish where some packages were already released. required: false default: false jobs: authorize: name: Authorize runs-on: ubuntu-latest steps: - name: Check branch protection env: RELEASE_TYPE: ${{ github.event.inputs.releaseType }} REF_NAME: ${{ github.ref_name }} run: | if [ "$RELEASE_TYPE" = "dry-run" ]; then echo "✅ Branch check skipped: dry-run mode allows any branch" echo "Current branch: $REF_NAME" exit 0 fi case "$REF_NAME" in main|hotfix/*) echo "✅ Branch check passed: workflow is running from allowed branch ($REF_NAME)" ;; *) echo "❌ This workflow can only be triggered from main or hotfix/* branches." echo "Current branch: $REF_NAME" exit 1 ;; esac - name: ${{ github.actor }} permission check to do a release uses: 'lannonbr/repo-permission-check-action@2bb8c89ba8bf115c4bfab344d6a6f442b24c9a1f' with: permission: 'write' env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} e2e: name: E2E Tests runs-on: ubuntu-latest needs: [authorize] container: image: mcr.microsoft.com/playwright:v1.55.0 outputs: head_sha: ${{ steps.head-sha.outputs.sha }} steps: - name: Skip E2E for recovery publish if: ${{ github.event.inputs.skipLernaVersion == 'true' }} run: echo "Skipping E2E because skipLernaVersion is true" - name: Check out git repository if: ${{ github.event.inputs.skipLernaVersion != 'true' }} uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: fetch-depth: 0 ref: ${{ github.event.inputs.branch || github.ref_name }} - name: Capture E2E HEAD SHA id: head-sha if: ${{ github.event.inputs.skipLernaVersion != 'true' }} run: | git config --global --add safe.directory "$GITHUB_WORKSPACE" echo "sha=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT" - name: Run E2E tests if: ${{ github.event.inputs.skipLernaVersion != 'true' }} uses: ./.github/actions/e2e-test with: amplitude-api-key: ${{ secrets.AMPLITUDE_API_KEY }} deploy: name: Deploy runs-on: ubuntu-latest needs: [authorize, e2e] if: ${{ github.event.inputs.releaseType == 'release' }} permissions: id-token: write # Required for OIDC contents: write strategy: matrix: node-version: [24.x] # Ensure npm 11.5.1 or later is installed for OIDC, node 24.6 is minimal steps: - name: Validate protected branch run: | REF="${{ github.event.inputs.branch || github.ref_name }}" case "$REF" in main) echo "✅ Branch check passed: main" ;; hotfix/*) echo "✅ Branch check passed: hotfix branch ($REF)" ;; *) echo "❌ Deploy can only run from main or hotfix/* branches." echo "Current branch: $REF" exit 1 ;; esac - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: fetch-depth: 0 token: ${{ secrets.GH_PUBLISH_TOKEN }} ref: ${{ github.event.inputs.branch || github.ref_name }} - name: Build and Test uses: ./.github/actions/build-and-test with: node-version: ${{ matrix.node-version }} - name: Verify ref has not advanced since e2e checkout if: ${{ github.event.inputs.skipLernaVersion != 'true' }} env: EXPECTED_SHA: ${{ needs.e2e.outputs.head_sha }} REF: ${{ github.event.inputs.branch || github.ref_name }} run: bash scripts/publish/check-ref-not-advanced.sh # Only create release version when using from-git (default behavior) # from-package mode uses existing package.json versions and doesn't need git tags - name: Create release version if: ${{ github.event.inputs.skipLernaVersion != 'true' }} run: | echo "Running lerna version..." # Temporarily disable exit on error to capture output even when command fails set +e OUTPUT=$(GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} pnpm deploy:version -y --no-private --create-release github 2>&1) EXIT_CODE=$? set -e # Always display the output first echo "=== Lerna Version Output ===" echo "$OUTPUT" echo "=== End Output ===" # Now handle the exit code if [ $EXIT_CODE -ne 0 ]; then echo "❌ Command failed with exit code: $EXIT_CODE" exit $EXIT_CODE fi # Check if the output indicates no changed packages if echo "$OUTPUT" | grep -q "No changed packages to version"; then echo "❌ No changed packages found to version. Failing the job." exit 1 fi echo "✅ Successfully created release version" # Publish to NPM (also uploads minified JS and source maps to S3) - name: Publish Release to NPM run: | GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} pnpm deploy:publish env: S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} prerelease: name: Prerelease feature branch runs-on: ubuntu-latest needs: [authorize, e2e] if: ${{ github.event.inputs.releaseType == 'prerelease' || github.event.inputs.releaseType == 'dry-run' }} permissions: id-token: write # Required for OIDC contents: write strategy: matrix: node-version: [24.x] # Ensure npm 11.5.1 or later is installed for OIDC, node 24.6 is minimal steps: - name: Determine branch to use id: determine-branch run: | if [ -n "${{ github.event.inputs.branch }}" ]; then echo "branch=${{ github.event.inputs.branch }}" >> $GITHUB_OUTPUT else echo "❌ No branch specified. Please specify a branch to create pre-release from." exit 1 fi - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 with: ref: ${{ steps.determine-branch.outputs.branch }} fetch-depth: 0 token: ${{ secrets.GH_PUBLISH_TOKEN }} - name: Build and Test uses: ./.github/actions/build-and-test with: node-version: ${{ matrix.node-version }} # Keep alphanumeric characters and hyphens, remove other invalid characters # Examples: # - SR-1858 -> SR-1858 # - feature/my-branch -> featuremy-branch # - fix_bug_123 -> fixbug123 # - user@company.com -> usercompanycom - name: Transform feature branch name run: | echo "PREID=$(echo '${{ steps.determine-branch.outputs.branch }}' | tr -cd '[:alnum:]-')" >> $GITHUB_ENV # Use --no-push to prevent pushing to remote # Version example: 1.0.0 -> 1.1.0-{preid}.0 - name: Dry run pre-release version if: ${{ github.event.inputs.releaseType == 'dry-run' }} run: | GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} pnpm deploy:version:dry-run -y --preid ${{ env.PREID }} - name: Pre-release version if: ${{ github.event.inputs.releaseType == 'prerelease' && github.event.inputs.skipLernaVersion != 'true' }} run: | GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} pnpm deploy:version -y --no-private --conventional-prerelease --preid ${{ env.PREID }} --allow-branch ${{ steps.determine-branch.outputs.branch }} --create-release github # Publish to NPM (also uploads minified JS and source maps to S3) - name: Publish Pre-release to NPM if: ${{ github.event.inputs.releaseType == 'prerelease' }} run: | GH_TOKEN=${{ secrets.GH_PUBLISH_TOKEN }} pnpm deploy:publish --no-git-checks --ignore-scripts --tag ${{ env.PREID }} env: S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME }} - name: Dry run publish release to NPM if: ${{ github.event.inputs.releaseType == 'dry-run' }} env: DRY_RUN: true run: | pnpm deploy:publish:dry-run ================================================ FILE: .github/workflows/rn-smoke.yml ================================================ name: React Native Smoke Test on: pull_request: types: [opened, synchronize] push: branches: [main] jobs: ios-smoke: name: iOS Simulator Smoke (Maestro) runs-on: macos-14 timeout-minutes: 45 env: APP_DIR: examples/react-native/app BUNDLE_ID: org.reactjs.native.example.app SIM_NAME: iPhone 15 # CocoaPods 1.14.3 hits `ArgumentError - pathname contains null byte` in # Pathname#realdirpath on pnpm monorepos when the locale is not UTF-8 # (see https://github.com/CocoaPods/CocoaPods/issues/12866). macos-14 # runners default to an unset/C locale; pin it here. LANG: en_US.UTF-8 LC_ALL: en_US.UTF-8 steps: - name: Check out git repository uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 - name: Setup pnpm uses: pnpm/action-setup@b906affcce14559ad1aafd4ab0e942779e9f58b1 # v4 - name: Setup Node.js 20 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4 with: node-version: 20 cache: 'pnpm' - name: Setup Ruby for CocoaPods uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde # v1.307.0 with: ruby-version: '3.2' bundler-cache: true working-directory: ${{ env.APP_DIR }} - name: Install project dependencies run: pnpm install --frozen-lockfile - name: Build SDK and its workspace deps run: pnpm --filter @amplitude/analytics-react-native... build - name: Cache CocoaPods uses: actions/cache@d4323d4df104b026a6aa633fdb11d772146be0bf # v4 with: path: | ${{ env.APP_DIR }}/ios/Pods ~/Library/Caches/CocoaPods key: pods-${{ runner.os }}-${{ hashFiles(format('{0}/ios/Podfile.lock', env.APP_DIR)) }} restore-keys: | pods-${{ runner.os }}- - name: Pod install working-directory: ${{ env.APP_DIR }}/ios # Even with LANG/LC_ALL pinned, cocoapods 1.14.3 + pnpm intermittently # raises `ArgumentError - pathname contains null byte` in # Pathname#realdirpath (cocoapods/cocoapods#12866). Retry on failure # before giving up — failures so far have always passed on the next try. run: | for attempt in 1 2 3; do if bundle exec pod install; then exit 0 fi echo "::warning::pod install attempt $attempt failed, retrying..." sleep 5 done echo "::error::pod install failed 3 times" exit 1 - name: Build iOS app (Release, simulator) working-directory: ${{ env.APP_DIR }} # Raw xcodebuild output is noisy; xcpretty would be nicer but isn't # installed by default on macos-14 runners, and adding it as a Gemfile # dependency for cosmetics isn't worth the install time. run: | xcodebuild \ -workspace ios/app.xcworkspace \ -scheme app \ -configuration Release \ -sdk iphonesimulator \ -destination "generic/platform=iOS Simulator" \ -derivedDataPath build \ CODE_SIGN_IDENTITY="" \ CODE_SIGNING_REQUIRED=NO \ CODE_SIGNING_ALLOWED=NO test -d build/Build/Products/Release-iphonesimulator/app.app - name: Boot iOS simulator run: | UDID=$(xcrun simctl list devices "$SIM_NAME" available -j | node -e " const data = JSON.parse(require('fs').readFileSync(0, 'utf8')); const all = Object.values(data.devices).flat(); const match = all.find(d => d.name === process.env.SIM_NAME && d.isAvailable); if (!match) { console.error('No available', process.env.SIM_NAME); process.exit(1); } console.log(match.udid); ") echo "SIM_UDID=$UDID" >> $GITHUB_ENV xcrun simctl boot "$UDID" xcrun simctl bootstatus "$UDID" -b - name: Install app on simulator working-directory: ${{ env.APP_DIR }} run: xcrun simctl install "$SIM_UDID" build/Build/Products/Release-iphonesimulator/app.app - name: Install Maestro run: | curl -fsSL "https://get.maestro.mobile.dev" | bash echo "$HOME/.maestro/bin" >> $GITHUB_PATH - name: Run Maestro smoke flow working-directory: ${{ env.APP_DIR }} run: maestro test .maestro/smoke.yaml - name: Dump simulator logs on failure if: failure() run: | xcrun simctl spawn "$SIM_UDID" log show --last 5m --predicate 'process == "app"' || true ================================================ FILE: .github/workflows/semantic-pr.yml ================================================ name: Semantic PR Check on: pull_request: types: [opened, synchronize, edited] jobs: pr-title-check: name: Check PR for semantic title runs-on: ubuntu-latest steps: - name: PR title is valid if: > startsWith(github.event.pull_request.title, 'feat:') || startsWith(github.event.pull_request.title, 'feat(') || startsWith(github.event.pull_request.title, 'fix:') || startsWith(github.event.pull_request.title, 'fix(') || startsWith(github.event.pull_request.title, 'perf:') || startsWith(github.event.pull_request.title, 'perf(') || startsWith(github.event.pull_request.title, 'docs:') || startsWith(github.event.pull_request.title, 'docs(') || startsWith(github.event.pull_request.title, 'test:') || startsWith(github.event.pull_request.title, 'test(') || startsWith(github.event.pull_request.title, 'refactor:') || startsWith(github.event.pull_request.title, 'refactor(') || startsWith(github.event.pull_request.title, 'style:') || startsWith(github.event.pull_request.title, 'style(') || startsWith(github.event.pull_request.title, 'build:') || startsWith(github.event.pull_request.title, 'build(') || startsWith(github.event.pull_request.title, 'ci:') || startsWith(github.event.pull_request.title, 'ci(') || startsWith(github.event.pull_request.title, 'chore:') || startsWith(github.event.pull_request.title, 'chore(') || startsWith(github.event.pull_request.title, 'revert:') || startsWith(github.event.pull_request.title, 'revert(') run: | echo 'Title checks passed' - name: PR title is invalid if: > !startsWith(github.event.pull_request.title, 'feat:') && !startsWith(github.event.pull_request.title, 'feat(') && !startsWith(github.event.pull_request.title, 'fix:') && !startsWith(github.event.pull_request.title, 'fix(') && !startsWith(github.event.pull_request.title, 'perf:') && !startsWith(github.event.pull_request.title, 'perf(') && !startsWith(github.event.pull_request.title, 'docs:') && !startsWith(github.event.pull_request.title, 'docs(') && !startsWith(github.event.pull_request.title, 'test:') && !startsWith(github.event.pull_request.title, 'test(') && !startsWith(github.event.pull_request.title, 'refactor:') && !startsWith(github.event.pull_request.title, 'refactor(') && !startsWith(github.event.pull_request.title, 'style:') && !startsWith(github.event.pull_request.title, 'style(') && !startsWith(github.event.pull_request.title, 'build:') && !startsWith(github.event.pull_request.title, 'build(') && !startsWith(github.event.pull_request.title, 'ci:') && !startsWith(github.event.pull_request.title, 'ci(') && !startsWith(github.event.pull_request.title, 'chore:') && !startsWith(github.event.pull_request.title, 'chore(') && !startsWith(github.event.pull_request.title, 'revert:') && !startsWith(github.event.pull_request.title, 'revert(') run: | echo 'Pull request title is not valid. Please check https://github.com/amplitude/Amplitude-TypeScript/blob/main/CONTRIBUTING.md#pr-commit-title-conventions' exit 1 ================================================ FILE: .gitignore ================================================ node_modules/ .DS_Store lib/ *.tsbuildinfo coverage/ docs/ .idea/ # macos .DS_Store # debug npm-debug.log* yarn-debug.log* yarn-error.log* .pnpm-debug.log* # These files are automatically generated by the TypeScript compiler # during the build process and can be easily recreated. *.d.ts *.d.ts.map .env .env.* !.env.example *.pem *.key *.p12 *.pfx secrets.* lerna-debug.log # Playwright **/test-results/ **/playwright-report/ **/playwright/.cache/ **/playwright/.auth/ # Nx .nx/cache/ .nx/workspace-data/ # Playground packages/analytics-browser/playground/html/amplitude.js packages/analytics-browser/playground/react-spa/public/amplitude.js .nx/cache .cursor/rules/nx-rules.mdc .github/instructions/nx.instructions.md .pnpm-store/ ================================================ FILE: .husky/commit-msg ================================================ #!/bin/sh . "$(dirname "$0")/_/husky.sh" pnpm commitlint --edit $1 ================================================ FILE: .husky/pre-commit ================================================ #!/bin/sh . "$(dirname "$0")/_/husky.sh" pnpm install --frozen-lockfile pnpm lint:staged ================================================ FILE: .npmrc ================================================ # Hoist React Native / Metro / Babel packages so Metro can resolve them when # bundling the workspace example app (examples/react-native/app). Metro does # not understand pnpm's nested .pnpm store, so transitive deps of react-native # need to be visible from a flat node_modules. public-hoist-pattern[]=*react-native* public-hoist-pattern[]=@babel/* public-hoist-pattern[]=@react-native/* public-hoist-pattern[]=@react-native-community/* public-hoist-pattern[]=metro public-hoist-pattern[]=metro-* ================================================ FILE: .nvmrc ================================================ 18 ================================================ FILE: .prettierignore ================================================ *.md /.nx/workspace-data /.nx/cache ================================================ FILE: .prettierrc.json ================================================ { "printWidth": 120, "proseWrap": "always", "singleQuote": true, "trailingComma": "all" } ================================================ FILE: AGENTS.md ================================================ # Repository Guidelines This repository uses GitHub Actions for continuous integration. Contributors should replicate the CI steps locally before opening a pull request. ## Local Environment Setup Before running any tests or scripts, install dependencies and build the packages: ```bash pnpm install pnpm build ``` ## Testing and Linting 1. Install dependencies with `pnpm install`. 2. Build all packages with `pnpm build`. 3. Verify documentation with `pnpm docs:check`. 4. Run unit tests with `pnpm test` and example tests with `pnpm test:examples`. 5. Lint the code using `pnpm lint`. These steps must pass before you submit your PR. ## Pull Request Requirements - PR titles must follow the [conventional commit](https://www.conventionalcommits.org/ ) format and, when possible, include the affected module name. Examples: `feat(browser): add feature` or `fix(plugin): correct bug`. - The CI matrix runs on Node.js `18.17.x`, `20.x`, and `22.x`. Ensure your code is compatible with these versions. ================================================ FILE: CONTRIBUTING.md ================================================ # Contributing to the Amplitude-TypeScript 🎉 Thanks for your interest in contributing! 🎉 ## Getting Started ### Create a new issue If find issues while using this library or just reading through it, look to see if an issue has been created. If no issues are related, feel free to open a new one using the template. ### Solve an issue If you find any existing issues that you are interested in fixing, you are welcome to open a PR and we will gladly review your changes. ### Making Changes #### Setup locally Getting setup is quick and easy. Follow the steps below to get your your dev environment up. 1. Fork GitHub repo 2. Install dependencies 3. Build packages ``` $ git clone $ pnpm install $ pnpm build ``` This repo contains mutliple major versions of all packages. For contributions to version `1.x`, create a branch off `v1.x`. For contributions to the `2.x` (latest) version, create a branch off `main`. Refer to the table below for more infomation about the release status of each package. |Package|Version|Status|Dev Branch| |-|-|-|-| |Browser SDK| |`@amplitude/analytics-browser`|V2|Beta|`main`| |`@amplitude/analytics-browser`|V1|Current|`v1.x`| |`@amplitude/marketing-analytics-browser`|V1|Current|`v1.x`| |Node SDK| |`@amplitude/analytics-node`|V2|Unreleased|`main`| |`@amplitude/analytics-node`|V1|Current|`v1.x`| |ReactNative SDK| |`@amplitude/analytics-react-native`|V2|Unreleased|`main`| |`@amplitude/analytics-react-native`|V1|Current|`v1.x`| #### Test your changes Building quality software is one of our top priorities. We recommend getting your changes tested using manual and automated practices. ``` $ pnpm build $ pnpm test ``` When writing commit message, follow [PR Commit Title Conventions](#PR-Commit-Title-Conventions) for the format. A git hook will also run to verify that the format is followed. #### Deprecated Packages The following packages are deprecated and **should not be added as dependencies** in new code: - `@amplitude/analytics-types` - `@amplitude/analytics-client-common` - `@amplitude/analytics-remote-config` **Replacements:** - For `@amplitude/analytics-types` and `@amplitude/analytics-client-common`: Use `@amplitude/analytics-core` instead - For `@amplitude/analytics-remote-config`: Use the new remote config client in `@amplitude/analytics-core` instead These packages remain in the codebase for backward compatibility with existing code, but new dependencies on them are blocked by CI checks. If your PR fails the "Check Deprecated Packages" CI job, update your `package.json` to use the appropriate replacement from `@amplitude/analytics-core`. #### Open a PR Once you are finished with your changes and feel good about the proposed changes, create a pull request. A team member will assist in getting them reviewed. We are excited to work with you on this. For contributions to version `1.x`, open a pull request against `v1.x`. For contributions to the `2.x` (latest) version, open a pull request against `main`. #### Merge As soon as your changes are approved, a team member will merge your PR to main and will get published shortly after. #### Publishing NPM package for the first time Because the workflow uses Trusted Publishing, a new package can't be published from the publish workflow on the first try. To publish a package for the first time (administrators only): 1. run `pnpm install` from the route 2. navigate to the root of the new package 3. run `pnpm build` 4. run `pnpm publish` (requires admin credentials with 2FA) 5. navigate to the NPM homepage of the new package 6. open "Settings" and configure it to use Trusted Publishing 7. copy the same configuration used in [analytics browser](https://www.npmjs.com/package/@amplitude/analytics-browser/access). **case sensitive** 8. now that it's in NPM and Trusted Publishing is enabled, this package can now be published from workflows #### Recovering a partial `publish-v2` workflow run Use this only when a previous `Publish v2.x` workflow run already created the release version and partially published packages to npm, but the workflow failed before all packages finished publishing. To recover from that state: 1. Open the `Publish v2.x` workflow in GitHub Actions. 2. Click `Run workflow`. 3. Select the same `releaseType` that the failed run used. 4. Select the same branch that the failed run used, if applicable. 5. Enable the `skipLernaVersion` checkbox. 6. Run the workflow again. When `skipLernaVersion` is enabled, the workflow skips the `lerna version` step for `release` and `prerelease` runs and skips the E2E test step. This lets the workflow continue to the publish step without trying to create a second release version. Do not use `skipLernaVersion` for a normal release. It is only intended for recovery after a partial `publish-v2` run. ## Practices ### PR Commit Title Conventions PR titles should follow [conventional commit standards](https://www.conventionalcommits.org/en/v1.0.0/). This helps automate the release process. #### Commit Types - **Special Case**: Any commit with `BREAKING CHANGES` in the body: Creates major release - `feat()`: New features (minimum minor release) - `fix()`: Bug fixes (minimum patch release) - `perf()`: Performance improvement - `docs()`: Documentation updates - `test()`: Test updates - `refactor()`: Code change that neither fixes a bug nor adds a feature - `style()`: Code style changes (e.g. formatting, commas, semi-colons) - `build()`: Changes that affect the build system or external dependencies (e.g. pnpm, Npm) - `ci()`: Changes to our CI configuration files and scripts - `chore()`: Other changes that don't modify src or test files - `revert()`: Revert commit ================================================ FILE: LICENSE ================================================ MIT License Copyright (c) 2022 Amplitude Analytics Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: README.md ================================================


# Amplitude-TypeScript This is Amplitude's latest version of the JavaScript SDK, written in TypeScript. ## Development If you plan on contributing to this SDK, here's how you can start. 1. Clone GitHub repo 2. Install dependencies 3. Build and link packages ``` $ git clone git@github.com:amplitude/Amplitude-TypeScript.git $ nvm use $ pnpm --version $ pnpm install $ pnpm build ``` Check our guidelines for repo contributions on [CONTRIBUTING.md](https://github.com/amplitude/Amplitude-TypeScript/blob/main/CONTRIBUTING.md). ## Projects * Amplitude SDK for Web * [@amplitude/analytics-browser@^2](https://github.com/amplitude/Amplitude-TypeScript/tree/main/packages/analytics-browser) * [@amplitude/analytics-browser@^1](https://github.com/amplitude/Amplitude-TypeScript/tree/v1.x/packages/analytics-browser) * [Installation and Quick Start](https://www.docs.developers.amplitude.com/data/sdks/browser-2/) * Amplitude SDK for Node.js * [@amplitude/analytics-node](https://github.com/amplitude/Amplitude-TypeScript/tree/main/packages/analytics-node) * [Installation and Quick Start](https://www.docs.developers.amplitude.com/data/sdks/typescript-node/) * Amplitude SDK for React Native * [@amplitude/analytics-react-native](https://github.com/amplitude/Amplitude-TypeScript/tree/main/packages/analytics-react-native) * [Installation and Quick Start](https://www.docs.developers.amplitude.com/data/sdks/typescript-react-native/) ## Testing Locally To test the SDK locally, you can run our test server. Before running the test server for the first time, copy ".env.example" as ".env" and replace the variables in '.env' with your own variables. Run `pnpm dev` to run the test server. It will open up to the home page automatically in your default browser. For more details visit the [Test Server README.md](/test-server/README.md) ### Troubleshooting If you ever see an error that looks like this while running an Nx command (pnpm test, pnpm build, etc...): ``` Lerna (powered by Nx) DB transaction operation error: SqliteFailure(Error { code: SystemIoFailure, extended_code: 522 }, Some("disk I/O error")) ``` Run `npx nx reset` and try again ## Documentation See our [Typescript SDK](https://amplitude.github.io/Amplitude-TypeScript/) Reference for a list and description of all available SDK methods. ================================================ FILE: commitlint.config.js ================================================ module.exports = { extends: ['@commitlint/config-conventional'] }; ================================================ FILE: context7.json ================================================ { "url": "https://context7.com/amplitude/amplitude-typescript", "public_key": "pk_qGDvqFQPtTvDeSCjW3eUE" } ================================================ FILE: example-proxy/.gitignore ================================================ # Dependencies node_modules/ npm-debug.log* yarn-debug.log* yarn-error.log* # Environment variables .env .env.local .env.development.local .env.test.local .env.production.local # Logs logs *.log # Runtime data pids *.pid *.seed *.pid.lock # Coverage directory used by tools like istanbul coverage/ # nyc test coverage .nyc_output # Dependency directories jspm_packages/ # Optional npm cache directory .npm # Optional REPL history .node_repl_history # Output of 'npm pack' *.tgz # Yarn Integrity file .yarn-integrity # dotenv environment variables file .env # IDE files .vscode/ .idea/ *.swp *.swo # OS generated files .DS_Store .DS_Store? ._* .Spotlight-V100 .Trashes ehthumbs.db Thumbs.db ================================================ FILE: example-proxy/README.md ================================================ # Amplitude Proxy Server Example Express server acts as a proxy for Amplitude analytics, allowing you to intercept, log, and forward Amplitude tracking requests. ## Features - ✅ Proxy single Amplitude events - ✅ Proxy batch Amplitude events - ✅ CORS support for browser requests - ✅ Request logging and debugging - ✅ Health check endpoint - ✅ Test page for validation - ✅ Request monitoring and debugging ## Quick Start ### Option 1: Run from Root Directory ```bash # From the project root directory npm run proxy # Start the proxy server npm run proxy:dev # Start with auto-restart (development) ``` ================================================ FILE: example-proxy/amplitude-proxy-server.js ================================================ const express = require('express'); const cors = require('cors'); const axios = require('axios'); const morgan = require('morgan'); const app = express(); const PORT = process.env.PORT || 3001; // Middleware app.use(cors()); app.use(express.json()); app.use(express.urlencoded({ extended: true })); app.use(morgan('combined')); // Amplitude API endpoints const AMPLITUDE_API_BASE = 'https://api2.amplitude.com'; const AMPLITUDE_BATCH_API = 'https://api2.amplitude.com/batch'; // Store for tracking requests (in-memory for demo purposes) const requestLog = []; // Health check endpoint app.get('/health', (req, res) => { res.json({ status: 'ok', timestamp: new Date().toISOString() }); }); // Proxy endpoint for single events app.post('/2/httpapi', async (req, res) => { try { console.log('📊 Received Amplitude event:', JSON.stringify(req.body, null, 2)); // Log the request requestLog.push({ timestamp: new Date().toISOString(), type: 'single_event', data: req.body }); // Forward to Amplitude API const response = await axios.post(AMPLITUDE_API_BASE + '/2/httpapi', req.body, { headers: { 'Content-Type': 'application/json', 'User-Agent': 'Amplitude-Proxy-Server/1.0' } }); console.log('✅ Forwarded to Amplitude successfully'); res.status(response.status).json(response.data); } catch (error) { console.error('❌ Error forwarding to Amplitude:', error.response?.data || error.message); res.status(error.response?.status || 500).json({ error: 'Failed to forward to Amplitude', details: error.response?.data || error.message }); } }); // Proxy endpoint for batch events app.post('/batch', async (req, res) => { try { console.log('📦 Received Amplitude batch events:', JSON.stringify(req.body, null, 2)); // Log the request requestLog.push({ timestamp: new Date().toISOString(), type: 'batch_events', data: req.body }); // Forward to Amplitude batch API const response = await axios.post(AMPLITUDE_BATCH_API, req.body, { headers: { 'Content-Type': 'application/json', 'User-Agent': 'Amplitude-Proxy-Server/1.0' } }); console.log('✅ Forwarded batch to Amplitude successfully'); res.status(response.status).json(response.data); } catch (error) { console.error('❌ Error forwarding batch to Amplitude:', error.response?.data || error.message); res.status(error.response?.status || 500).json({ error: 'Failed to forward batch to Amplitude', details: error.response?.data || error.message }); } }); // Debug endpoint to view logged requests app.get('/debug/requests', (req, res) => { res.json({ total_requests: requestLog.length, requests: requestLog.slice(-50) // Last 50 requests }); }); // Clear debug logs app.delete('/debug/requests', (req, res) => { requestLog.length = 0; res.json({ message: 'Request log cleared' }); }); // Serve a simple test page app.get('/test', (req, res) => { res.send(` Amplitude Proxy Test

Amplitude Proxy Test Page

This page tests the Amplitude proxy server.

`); }); // Start server app.listen(PORT, () => { console.log(`🚀 Amplitude Proxy Server running on http://localhost:${PORT}`); console.log(`📊 Single events: http://localhost:${PORT}/2/httpapi`); console.log(`📦 Batch events: http://localhost:${PORT}/batch`); console.log(`🔍 Debug logs: http://localhost:${PORT}/debug/requests`); console.log(`🧪 Test page: http://localhost:${PORT}/test`); console.log(`❤️ Health check: http://localhost:${PORT}/health`); }); module.exports = app; ================================================ FILE: examples/browser/chrome-ext/amplitude-min.js ================================================ !function(){"use strict";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};function t(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}var n=function(){return n=Object.assign||function(e){for(var t,n=1,i=arguments.length;n0&&r[r.length-1])||6!==u[0]&&2!==u[0])){s=0;continue}if(3===u[0]&&(!r||u[1]>r[0]&&u[1]=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function u(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var i,r,o=n.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(i=o.next()).done;)s.push(i.value)}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return s}function a(e,t,n){if(n||2===arguments.length)for(var i,r=0,o=t.length;r1e3)return!1;for(var t in e){var n=e[t];if(!N(t,n))return!1}return!0},N=function(e,t){var n,i;if("string"!=typeof e)return!1;if(Array.isArray(t)){var r=!0;try{for(var o=s(t),u=o.next();!u.done;u=o.next()){var a=u.value;if(Array.isArray(a))return!1;if("object"==typeof a)r=r&&A(a);else if(!["number","string"].includes(typeof a))return!1;if(!r)return!1}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}}else{if(null==t)return!1;if("object"==typeof t)return A(t);if(!["number","string","boolean"].includes(typeof t))return!1}return!0},j=function(){function e(){this._propertySet=new Set,this._properties={}}return e.prototype.getUserProperties=function(){return n({},this._properties)},e.prototype.set=function(e,t){return this._safeSet(c.SET,e,t),this},e.prototype.setOnce=function(e,t){return this._safeSet(c.SET_ONCE,e,t),this},e.prototype.append=function(e,t){return this._safeSet(c.APPEND,e,t),this},e.prototype.prepend=function(e,t){return this._safeSet(c.PREPEND,e,t),this},e.prototype.postInsert=function(e,t){return this._safeSet(c.POSTINSERT,e,t),this},e.prototype.preInsert=function(e,t){return this._safeSet(c.PREINSERT,e,t),this},e.prototype.remove=function(e,t){return this._safeSet(c.REMOVE,e,t),this},e.prototype.add=function(e,t){return this._safeSet(c.ADD,e,t),this},e.prototype.unset=function(e){return this._safeSet(c.UNSET,e,"-"),this},e.prototype.clearAll=function(){return this._properties={},this._properties[c.CLEAR_ALL]="-",this},e.prototype._safeSet=function(e,t,n){if(this._validate(e,t,n)){var i=this._properties[e];return void 0===i&&(i={},this._properties[e]=i),i[t]=n,this._propertySet.add(t),!0}return!1},e.prototype._validate=function(e,t,n){return void 0===this._properties[c.CLEAR_ALL]&&(!this._propertySet.has(t)&&(e===c.ADD?"number"==typeof n:e===c.UNSET||e===c.REMOVE||N(t,n)))},e}(),C=function(e,t){return n(n({},t),{event_type:d.IDENTIFY,user_properties:e.getUserProperties()})},M=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=v.Unknown),{event:e,code:t,message:n}},V=function(e){return e?(e^16*Math.random()>>e/4).toString(16):(String(1e7)+String(-1e3)+String(-4e3)+String(-8e3)+String(-1e11)).replace(/[018]/g,V)},F=function(){function e(e){this.client=e,this.queue=[],this.applying=!1,this.plugins=[]}return e.prototype.register=function(e,t){var n,i,s;return r(this,void 0,void 0,(function(){return o(this,(function(r){switch(r.label){case 0:return e.name=null!==(n=e.name)&&void 0!==n?n:V(),e.type=null!==(i=e.type)&&void 0!==i?i:"enrichment",[4,null===(s=e.setup)||void 0===s?void 0:s.call(e,t,this.client)];case 1:return r.sent(),this.plugins.push(e),[2]}}))}))},e.prototype.deregister=function(e){return this.plugins.splice(this.plugins.findIndex((function(t){return t.name===e})),1),Promise.resolve()},e.prototype.reset=function(e){this.applying=!1,this.plugins=[],this.client=e},e.prototype.push=function(e){var t=this;return new Promise((function(n){t.queue.push([e,n]),t.scheduleApply(0)}))},e.prototype.scheduleApply=function(e){var t=this;this.applying||(this.applying=!0,setTimeout((function(){t.apply(t.queue.shift()).then((function(){t.applying=!1,t.queue.length>0&&t.scheduleApply(0)}))}),e))},e.prototype.apply=function(e){return r(this,void 0,void 0,(function(){var t,i,r,a,c,l,d,f,p,v,h,g,y,m,b,I,_,w,S,E;return o(this,(function(o){switch(o.label){case 0:if(!e)return[2];t=u(e,1),i=t[0],r=u(e,2),a=r[1],c=this.plugins.filter((function(e){return"before"===e.type})),o.label=1;case 1:o.trys.push([1,6,7,8]),l=s(c),d=l.next(),o.label=2;case 2:return d.done?[3,5]:(g=d.value).execute?[4,g.execute(n({},i))]:[3,4];case 3:if(null===(y=o.sent()))return a({event:i,code:0,message:""}),[2];i=y,o.label=4;case 4:return d=l.next(),[3,2];case 5:return[3,8];case 6:return f=o.sent(),_={error:f},[3,8];case 7:try{d&&!d.done&&(w=l.return)&&w.call(l)}finally{if(_)throw _.error}return[7];case 8:p=this.plugins.filter((function(e){return"enrichment"===e.type||void 0===e.type})),o.label=9;case 9:o.trys.push([9,14,15,16]),v=s(p),h=v.next(),o.label=10;case 10:return h.done?[3,13]:(g=h.value).execute?[4,g.execute(n({},i))]:[3,12];case 11:if(null===(y=o.sent()))return a({event:i,code:0,message:""}),[2];i=y,o.label=12;case 12:return h=v.next(),[3,10];case 13:return[3,16];case 14:return m=o.sent(),S={error:m},[3,16];case 15:try{h&&!h.done&&(E=v.return)&&E.call(v)}finally{if(S)throw S.error}return[7];case 16:return b=this.plugins.filter((function(e){return"destination"===e.type})),I=b.map((function(e){var t=n({},i);return e.execute(t).catch((function(e){return M(t,0,String(e))}))})),Promise.all(I).then((function(e){var t=u(e,1)[0];a(t)})),[2]}}))}))},e.prototype.flush=function(){return r(this,void 0,void 0,(function(){var e,t,n,i=this;return o(this,(function(r){switch(r.label){case 0:return e=this.queue,this.queue=[],[4,Promise.all(e.map((function(e){return i.apply(e)})))];case 1:return r.sent(),t=this.plugins.filter((function(e){return"destination"===e.type})),n=t.map((function(e){return e.flush&&e.flush()})),[4,Promise.all(n)];case 2:return r.sent(),[2]}}))}))},e}(),Q="Event rejected due to exceeded retry count",$=function(e){return{promise:e||Promise.resolve()}},K=function(){function e(e){void 0===e&&(e="$default"),this.initializing=!1,this.q=[],this.dispatchQ=[],this.logEvent=this.track.bind(this),this.timeline=new F(this),this.name=e}return e.prototype._init=function(e){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return this.config=e,this.timeline.reset(this),[4,this.runQueuedFunctions("q")];case 1:return t.sent(),[2]}}))}))},e.prototype.runQueuedFunctions=function(e){return r(this,void 0,void 0,(function(){var t,n,i,r,u,a;return o(this,(function(o){switch(o.label){case 0:t=this[e],this[e]=[],o.label=1;case 1:o.trys.push([1,6,7,8]),n=s(t),i=n.next(),o.label=2;case 2:return i.done?[3,5]:[4,(0,i.value)()];case 3:o.sent(),o.label=4;case 4:return i=n.next(),[3,2];case 5:return[3,8];case 6:return r=o.sent(),u={error:r},[3,8];case 7:try{i&&!i.done&&(a=n.return)&&a.call(n)}finally{if(u)throw u.error}return[7];case 8:return[2]}}))}))},e.prototype.track=function(e,t,i){var r=function(e,t,i){return n(n(n({},"string"==typeof e?{event_type:e}:e),i),t&&{event_properties:t})}(e,t,i);return $(this.dispatch(r))},e.prototype.identify=function(e,t){var n=C(e,t);return $(this.dispatch(n))},e.prototype.groupIdentify=function(e,t,i,r){var o=function(e,t,i,r){var o;return n(n({},r),{event_type:d.GROUP_IDENTIFY,group_properties:i.getUserProperties(),groups:(o={},o[e]=t,o)})}(e,t,i,r);return $(this.dispatch(o))},e.prototype.setGroup=function(e,t,i){var r=function(e,t,i){var r,o=new j;return o.set(e,t),n(n({},i),{event_type:d.IDENTIFY,user_properties:o.getUserProperties(),groups:(r={},r[e]=t,r)})}(e,t,i);return $(this.dispatch(r))},e.prototype.revenue=function(e,t){var i=function(e,t){return n(n({},t),{event_type:d.REVENUE,event_properties:e.getEventProperties()})}(e,t);return $(this.dispatch(i))},e.prototype.add=function(e){return this.config?$(this.timeline.register(e,this.config)):(this.q.push(this.add.bind(this,e)),$())},e.prototype.remove=function(e){return this.config?$(this.timeline.deregister(e)):(this.q.push(this.remove.bind(this,e)),$())},e.prototype.dispatchWithCallback=function(e,t){if(!this.config)return t(M(e,0,"Client not initialized"));this.process(e).then(t)},e.prototype.dispatch=function(e){return r(this,void 0,void 0,(function(){var t=this;return o(this,(function(n){return this.config?[2,this.process(e)]:[2,new Promise((function(n){t.dispatchQ.push(t.dispatchWithCallback.bind(t,e,n))}))]}))}))},e.prototype.process=function(e){return r(this,void 0,void 0,(function(){var t,n,i;return o(this,(function(r){switch(r.label){case 0:return r.trys.push([0,2,,3]),this.config.optOut?[2,M(e,0,"Event skipped due to optOut config")]:[4,this.timeline.push(e)];case 1:return 200===(i=r.sent()).code?this.config.loggerProvider.log(i.message):this.config.loggerProvider.error(i.message),[2,i];case 2:return t=r.sent(),n=String(t),this.config.loggerProvider.error(n),[2,i=M(e,0,n)];case 3:return[2]}}))}))},e.prototype.setOptOut=function(e){this.config?this.config.optOut=Boolean(e):this.q.push(this.setOptOut.bind(this,Boolean(e)))},e.prototype.flush=function(){return $(this.timeline.flush())},e}(),B=function(){function e(){this.productId="",this.quantity=1,this.price=0}return e.prototype.setProductId=function(e){return this.productId=e,this},e.prototype.setQuantity=function(e){return e>0&&(this.quantity=e),this},e.prototype.setPrice=function(e){return this.price=e,this},e.prototype.setRevenueType=function(e){return this.revenueType=e,this},e.prototype.setRevenue=function(e){return this.revenue=e,this},e.prototype.setEventProperties=function(e){return A(e)&&(this.properties=e),this},e.prototype.getEventProperties=function(){var e=this.properties?n({},this.properties):{};return e[l.REVENUE_PRODUCT_ID]=this.productId,e[l.REVENUE_QUANTITY]=this.quantity,e[l.REVENUE_PRICE]=this.price,e[l.REVENUE_TYPE]=this.revenueType,e[l.REVENUE]=this.revenue,e},e}(),z="Amplitude Logger ",W=function(){function e(){this.logLevel=f.None}return e.prototype.disable=function(){this.logLevel=f.None},e.prototype.enable=function(e){void 0===e&&(e=f.Warn),this.logLevel=e},e.prototype.log=function(){for(var e=[],t=0;t0&&Promise.all(n.map((function(e){return i.execute(e)}))).catch(),[2,Promise.resolve(void 0)]}}))}))},e.prototype.execute=function(e){var t=this;return new Promise((function(n){var i={event:e,attempts:0,callback:function(e){return n(e)},timeout:0};t.addToQueue(i)}))},e.prototype.addToQueue=function(){for(var e=this,t=[],n=0;n0&&t.schedule(e)}))}),e))},e.prototype.flush=function(e){return void 0===e&&(e=!1),r(this,void 0,void 0,(function(){var t,n,i,r=this;return o(this,(function(o){switch(o.label){case 0:return t=[],n=[],this.queue.forEach((function(e){return 0===e.timeout?t.push(e):n.push(e)})),this.queue=n,this.scheduled&&(clearTimeout(this.scheduled),this.scheduled=null),s=t,u=this.config.flushQueueSize,a=Math.max(u,1),i=s.reduce((function(e,t,n){var i=Math.floor(n/a);return e[i]||(e[i]=[]),e[i].push(t),e}),[]),[4,Promise.all(i.map((function(t){return r.send(t,e)})))];case 1:return o.sent(),[2]}var s,u,a}))}))},e.prototype.send=function(e,t){return void 0===t&&(t=!0),r(this,void 0,void 0,(function(){var n,r,s,u,a;return o(this,(function(o){switch(o.label){case 0:if(!this.config.apiKey)return[2,this.fulfillRequest(e,400,"Event rejected due to missing API key")];n={api_key:this.config.apiKey,events:e.map((function(e){var t=e.event;return t.extra,i(t,["extra"])})),options:{min_id_length:this.config.minIdLength}},o.label=1;case 1:return o.trys.push([1,3,,4]),r=Y(this.config.serverUrl,this.config.serverZone,this.config.useBatch).serverUrl,[4,this.config.transportProvider.send(r,n)];case 2:if(null===(s=o.sent()))return this.fulfillRequest(e,0,"Unexpected error occurred"),[2];if(!t){if("body"in s){u="";try{u=JSON.stringify(s.body,null,2)}catch(e){}this.fulfillRequest(e,s.statusCode,"".concat(s.status,": ").concat(u))}else this.fulfillRequest(e,s.statusCode,s.status);return[2]}return this.handleReponse(s,e),[3,4];case 3:return a=o.sent(),this.fulfillRequest(e,0,String(a)),[3,4];case 4:return[2]}}))}))},e.prototype.handleReponse=function(e,t){switch(e.status){case v.Success:this.handleSuccessResponse(e,t);break;case v.Invalid:this.handleInvalidResponse(e,t);break;case v.PayloadTooLarge:this.handlePayloadTooLargeResponse(e,t);break;case v.RateLimit:this.handleRateLimitResponse(e,t);break;default:this.handleOtherReponse(t)}},e.prototype.handleSuccessResponse=function(e,t){this.fulfillRequest(t,e.statusCode,"Event tracked successfully")},e.prototype.handleInvalidResponse=function(e,t){var n=this;if(e.body.missingField||e.body.error.startsWith("Invalid API key"))this.fulfillRequest(t,e.statusCode,e.body.error);else{var i=a(a(a(a([],u(Object.values(e.body.eventsWithInvalidFields)),!1),u(Object.values(e.body.eventsWithMissingFields)),!1),u(Object.values(e.body.eventsWithInvalidIdLengths)),!1),u(e.body.silencedEvents),!1).flat(),r=new Set(i),o=t.filter((function(t,i){if(!r.has(i))return!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,a([],u(o),!1))}},e.prototype.handlePayloadTooLargeResponse=function(e,t){1!==t.length?(this.config.flushQueueSize/=2,this.addToQueue.apply(this,a([],u(t),!1))):this.fulfillRequest(t,e.statusCode,e.body.error)},e.prototype.handleRateLimitResponse=function(e,t){var n=this,i=Object.keys(e.body.exceededDailyQuotaUsers),r=Object.keys(e.body.exceededDailyQuotaDevices),o=e.body.throttledEvents,s=new Set(i),c=new Set(r),l=new Set(o),d=t.filter((function(t,i){if(!(t.event.user_id&&s.has(t.event.user_id)||t.event.device_id&&c.has(t.event.device_id)))return l.has(i)&&(t.timeout=n.throttleTimeout),!0;n.fulfillRequest([t],e.statusCode,e.body.error)}));this.addToQueue.apply(this,a([],u(d),!1))},e.prototype.handleOtherReponse=function(e){var t=this;this.addToQueue.apply(this,a([],u(e.map((function(e){return e.timeout=e.attempts*t.retryTimeout,e}))),!1))},e.prototype.fulfillRequest=function(e,t,n){this.saveEvents(),e.forEach((function(e){return e.callback(M(e.event,t,n))}))},e.prototype.saveEvents=function(){if(this.config.storageProvider){var e=Array.from(this.queue.map((function(e){return e.event})));this.config.storageProvider.set(this.storageKey,e)}},e}(),X=function(e){return void 0===e&&(e=0),((new Error).stack||"").split("\n").slice(2+e).map((function(e){return e.trim()}))},ee=function(e){return function(){var t=n({},e.config);return{logger:t.loggerProvider,logLevel:t.logLevel}}},te=function(e,t){var n,i;t=(t=t.replace(/\[(\w+)\]/g,".$1")).replace(/^\./,"");try{for(var r=s(t.split(".")),o=r.next();!o.done;o=r.next()){var u=o.value;if(!(u in e))return;e=e[u]}}catch(e){n={error:e}}finally{try{o&&!o.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}return e},ne=function(e,t){return function(){var n,i,r={};try{for(var o=s(t),u=o.next();!u.done;u=o.next()){var a=u.value;r[a]=te(e,a)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return r}},ie=function(e,t,n,i,r){return void 0===r&&(r=null),function(){for(var o=[],s=0;s=200&&e<300?v.Success:429===e?v.RateLimit:413===e?v.PayloadTooLarge:408===e?v.Timeout:e>=400&&e<500?v.Invalid:e>=500?v.Failed:v.Unknown},e}(),se=function(e,t,n){return void 0===t&&(t=""),void 0===n&&(n=10),[q,t,e.substring(0,n)].filter(Boolean).join("_")},ue=function(){function e(e){this.options=n({},e)}return e.prototype.isEnabled=function(){return r(this,void 0,void 0,(function(){var t,n,i;return o(this,(function(r){switch(r.label){case 0:if(!h())return[2,!1];t=String(Date.now()),n=new e(this.options),i="AMP_TEST",r.label=1;case 1:return r.trys.push([1,4,5,7]),[4,n.set(i,t)];case 2:return r.sent(),[4,n.get(i)];case 3:return[2,r.sent()===t];case 4:return r.sent(),[2,!1];case 5:return[4,n.remove(i)];case 6:return r.sent(),[7];case 7:return[2]}}))}))},e.prototype.get=function(e){return r(this,void 0,void 0,(function(){var t;return o(this,(function(n){switch(n.label){case 0:return[4,this.getRaw(e)];case 1:if(!(t=n.sent()))return[2,void 0];try{try{t=decodeURIComponent(atob(t))}catch(e){}return[2,JSON.parse(t)]}catch(e){return[2,void 0]}return[2]}}))}))},e.prototype.getRaw=function(e){var t;return r(this,void 0,void 0,(function(){var n,i,r;return o(this,(function(o){return n=h(),i=null!==(t=null==n?void 0:n.document.cookie.split("; "))&&void 0!==t?t:[],(r=i.find((function(t){return 0===t.indexOf(e+"=")})))?[2,r.substring(e.length+1)]:[2,void 0]}))}))},e.prototype.set=function(e,t){var n;return r(this,void 0,void 0,(function(){var i,r,s,u,a,c;return o(this,(function(o){try{i=null!==(n=this.options.expirationDays)&&void 0!==n?n:0,s=void 0,(r=null!==t?i:-1)&&((u=new Date).setTime(u.getTime()+24*r*60*60*1e3),s=u),a="".concat(e,"=").concat(btoa(encodeURIComponent(JSON.stringify(t)))),s&&(a+="; expires=".concat(s.toUTCString())),a+="; path=/",this.options.domain&&(a+="; domain=".concat(this.options.domain)),this.options.secure&&(a+="; Secure"),this.options.sameSite&&(a+="; SameSite=".concat(this.options.sameSite)),(c=h())&&(c.document.cookie=a)}catch(e){}return[2]}))}))},e.prototype.remove=function(e){return r(this,void 0,void 0,(function(){return o(this,(function(t){switch(t.label){case 0:return[4,this.set(e,null)];case 1:return t.sent(),[2]}}))}))},e.prototype.reset=function(){return r(this,void 0,void 0,(function(){return o(this,(function(e){return[2]}))}))},e}(),ae=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.send=function(e,t){return r(this,void 0,void 0,(function(){var n,i;return o(this,(function(r){switch(r.label){case 0:if("undefined"==typeof fetch)throw new Error("FetchTransport is not supported");return n={headers:{"Content-Type":"application/json",Accept:"*/*"},body:JSON.stringify(t),method:"POST"},[4,fetch(e,n)];case 1:return[4,r.sent().json()];case 2:return i=r.sent(),[2,this.buildResponse(i)]}}))}))},n}(oe),ce=function(){function e(){}return e.prototype.getApplicationContext=function(){return{versionName:this.versionName,language:le(),platform:"Web",os:void 0,deviceModel:void 0}},e}(),le=function(){return"undefined"!=typeof navigator&&(navigator.languages&&navigator.languages[0]||navigator.language)||""},de=function(){function e(){this.queue=[]}return e.prototype.logEvent=function(e){this.receiver?this.receiver(e):this.queue.length<512&&this.queue.push(e)},e.prototype.setEventReceiver=function(e){this.receiver=e,this.queue.length>0&&(this.queue.forEach((function(t){e(t)})),this.queue=[])},e}(),fe=function(){return fe=Object.assign||function(e){for(var t,n=1,i=arguments.length;n=0;--s)i.push(n.slice(s).join("."));s=0,o.label=2;case 2:return se.sessionTimeout&&(t.setSessionId(i),n.session_id=t.getSessionId(),n.time=i),e.lastEventTime=i,[2,n])}))}))}}},at=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.prototype.init=function(e,t,i){var r,o;return void 0===e&&(e=""),arguments.length>2?(r=t,o=i):"string"==typeof t?(r=t,o=void 0):(r=null==t?void 0:t.userId,o=t),$(this._init(n(n({},o),{userId:r,apiKey:e})))},i.prototype._init=function(t){return r(this,void 0,void 0,(function(){var i,s,u,a,c=this;return o(this,(function(l){switch(l.label){case 0:return this.initializing?[2]:(this.initializing=!0,[4,Ze(t.apiKey,t,this)]);case 1:return i=l.sent(),[4,e.prototype._init.call(this,i)];case 2:return l.sent(),(!this.config.sessionId||this.config.lastEventTime&&Date.now()-this.config.lastEventTime>this.config.sessionTimeout)&&this.setSessionId(Date.now()),(s=ye()).identityStore.setIdentity({userId:this.config.userId,deviceId:this.config.deviceId}),[4,this.add(new H).promise];case 3:return l.sent(),[4,this.add(new Oe).promise];case 4:return l.sent(),[4,this.add(ut()).promise];case 5:return l.sent(),[4,this.add(new me).promise];case 6:return l.sent(),f=this.config.defaultTracking,Ie(f,"fileDownloads")?[4,this.add({name:"@amplitude/plugin-file-download-tracking-browser",type:"enrichment",setup:function(e,t){return r(void 0,void 0,void 0,(function(){var n,i;return o(this,(function(r){return t?(n=function(e){var n;try{n=new URL(e.href,window.location.href)}catch(e){return}var r=i.exec(n.href),o=null==r?void 0:r[1];o&&e.addEventListener("click",(function(){var i;o&&t.track(Ne,((i={})[Me]=o,i[Ve]=n.pathname,i[Fe]=e.id,i[Qe]=e.text,i[$e]=e.href,i))}))},i=/\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)$/,Array.from(document.getElementsByTagName("a")).forEach(n),"undefined"!=typeof MutationObserver&&new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){"A"===e.nodeName&&n(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("a")).map(n)}))}))})).observe(document.body,{subtree:!0,childList:!0}),[2]):(e.loggerProvider.warn("File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked."),[2])}))}))},execute:function(e){return r(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,e]}))}))}}).promise]:[3,8];case 7:l.sent(),l.label=8;case 8:return function(e){return Ie(e,"formInteractions")}(this.config.defaultTracking)?[4,this.add({name:"@amplitude/plugin-form-interaction-tracking-browser",type:"enrichment",setup:function(e,t){return r(void 0,void 0,void 0,(function(){var n;return o(this,(function(i){return t?(n=function(e){var n=!1;e.addEventListener("change",(function(){var i;n||t.track(Le,((i={})[Ke]=e.id,i[Be]=e.name,i[ze]=e.action,i)),n=!0}),{}),e.addEventListener("submit",(function(){var i,r;n||t.track(Le,((i={})[Ke]=e.id,i[Be]=e.name,i[ze]=e.action,i)),t.track(Ae,((r={})[Ke]=e.id,r[Be]=e.name,r[ze]=e.action,r)),n=!1}))},Array.from(document.getElementsByTagName("form")).forEach(n),"undefined"!=typeof MutationObserver&&new MutationObserver((function(e){e.forEach((function(e){e.addedNodes.forEach((function(e){"FORM"===e.nodeName&&n(e),"querySelectorAll"in e&&"function"==typeof e.querySelectorAll&&Array.from(e.querySelectorAll("form")).map(n)}))}))})).observe(document.body,{subtree:!0,childList:!0}),[2]):(e.loggerProvider.warn("Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked."),[2])}))}))},execute:function(e){return r(void 0,void 0,void 0,(function(){return o(this,(function(t){return[2,e]}))}))}}).promise]:[3,10];case 9:l.sent(),l.label=10;case 10:return _e(this.config.defaultTracking)?(d=this.config,u=_e(d.defaultTracking)&&d.defaultTracking&&"object"==typeof d.defaultTracking&&d.defaultTracking.attribution&&"object"==typeof d.defaultTracking.attribution?n({},d.defaultTracking.attribution):{},a=tt(u),[4,this.add(a).promise]):[3,12];case 11:l.sent(),l.label=12;case 12:return[4,this.add(it(we(this.config))).promise];case 13:return l.sent(),this.initializing=!1,[4,this.runQueuedFunctions("dispatchQ")];case 14:return l.sent(),s.eventBridge.setEventReceiver((function(e){c.track(e.eventType,e.eventProperties)})),[2]}var d,f}))}))},i.prototype.getUserId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.userId},i.prototype.setUserId=function(e){this.config?e===this.config.userId&&void 0!==e||(this.config.userId=e,this.setSessionId(Date.now()),function(e){ye().identityStore.editIdentity().setUserId(e).commit()}(e)):this.q.push(this.setUserId.bind(this,e))},i.prototype.getDeviceId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.deviceId},i.prototype.setDeviceId=function(e){this.config?(this.config.deviceId=e,function(e){ye().identityStore.editIdentity().setDeviceId(e).commit()}(e)):this.q.push(this.setDeviceId.bind(this,e))},i.prototype.reset=function(){this.setDeviceId(V()),this.setUserId(void 0)},i.prototype.getSessionId=function(){var e;return null===(e=this.config)||void 0===e?void 0:e.sessionId},i.prototype.setSessionId=function(e){if(this.config){var t,n=this.getSessionId(),i=this.config.lastEventTime;if(this.config.sessionId=e,this.config.lastEventTime=void 0,t=this.config.defaultTracking,Ie(t,"sessions")){if(n&&i){var r={session_id:n,time:i+1};r.device_id=this.previousSessionDeviceId,r.user_id=this.previousSessionUserId,this.track(Ce,void 0,r)}this.track(je,void 0,{session_id:e,time:e-1}),this.previousSessionDeviceId=this.config.deviceId,this.previousSessionUserId=this.config.userId}}else this.q.push(this.setSessionId.bind(this,e))},i.prototype.setTransport=function(e){this.config?this.config.transportProvider=Ye(e):this.q.push(this.setTransport.bind(this,e))},i.prototype.identify=function(t,n){if(Te(t)){var i=t._q;t._q=[],t=Ee(new j,i)}return(null==n?void 0:n.user_id)&&this.setUserId(n.user_id),(null==n?void 0:n.device_id)&&this.setDeviceId(n.device_id),e.prototype.identify.call(this,t,n)},i.prototype.groupIdentify=function(t,n,i,r){if(Te(i)){var o=i._q;i._q=[],i=Ee(new j,o)}return e.prototype.groupIdentify.call(this,t,n,i,r)},i.prototype.revenue=function(t,n){if(Te(t)){var i=t._q;t._q=[],t=Ee(new B,i)}return e.prototype.revenue.call(this,t,n)},i}(K),ct=function(){var e=new at;return{init:ie(e.init.bind(e),"init",ee(e),ne(e,["config"])),add:ie(e.add.bind(e),"add",ee(e),ne(e,["config.apiKey","timeline.plugins"])),remove:ie(e.remove.bind(e),"remove",ee(e),ne(e,["config.apiKey","timeline.plugins"])),track:ie(e.track.bind(e),"track",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),logEvent:ie(e.logEvent.bind(e),"logEvent",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),identify:ie(e.identify.bind(e),"identify",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),groupIdentify:ie(e.groupIdentify.bind(e),"groupIdentify",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),setGroup:ie(e.setGroup.bind(e),"setGroup",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),revenue:ie(e.revenue.bind(e),"revenue",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),flush:ie(e.flush.bind(e),"flush",ee(e),ne(e,["config.apiKey","timeline.queue.length"])),getUserId:ie(e.getUserId.bind(e),"getUserId",ee(e),ne(e,["config","config.userId"])),setUserId:ie(e.setUserId.bind(e),"setUserId",ee(e),ne(e,["config","config.userId"])),getDeviceId:ie(e.getDeviceId.bind(e),"getDeviceId",ee(e),ne(e,["config","config.deviceId"])),setDeviceId:ie(e.setDeviceId.bind(e),"setDeviceId",ee(e),ne(e,["config","config.deviceId"])),reset:ie(e.reset.bind(e),"reset",ee(e),ne(e,["config","config.userId","config.deviceId"])),getSessionId:ie(e.getSessionId.bind(e),"getSessionId",ee(e),ne(e,["config"])),setSessionId:ie(e.setSessionId.bind(e),"setSessionId",ee(e),ne(e,["config"])),setOptOut:ie(e.setOptOut.bind(e),"setOptOut",ee(e),ne(e,["config"])),setTransport:ie(e.setTransport.bind(e),"setTransport",ee(e),ne(e,["config"]))}},lt=ct(),dt=lt.add,ft=lt.flush,pt=lt.getDeviceId,vt=lt.getSessionId,ht=lt.getUserId,gt=lt.groupIdentify,yt=lt.identify,mt=lt.init,bt=lt.logEvent,It=lt.remove,_t=lt.reset,wt=lt.revenue,St=lt.setDeviceId,Et=lt.setGroup,Tt=lt.setOptOut,Ot=lt.setSessionId,kt=lt.setTransport,Pt=lt.setUserId,Rt=lt.track,Ut=Object.freeze({__proto__:null,add:dt,flush:ft,getDeviceId:pt,getSessionId:vt,getUserId:ht,groupIdentify:gt,identify:yt,init:mt,logEvent:bt,remove:It,reset:_t,revenue:wt,setDeviceId:St,setGroup:Et,setOptOut:Tt,setSessionId:Ot,setTransport:kt,setUserId:Pt,track:Rt,Types:x,createInstance:ct,runQueuedFunctions:Se,Revenue:B,Identify:j});!function(){var e=h();if(e){var t=function(e){var t=ct(),n=h();return n&&n.amplitude&&n.amplitude._iq&&e&&(n.amplitude._iq[e]=t),t};if(e.amplitude=Object.assign(e.amplitude||{},Ut,{createInstance:t}),e.amplitude.invoked){var n=e.amplitude._q;e.amplitude._q=[],Se(Ut,n);for(var i=Object.keys(e.amplitude._iq)||[],r=0;r { amplitude.track('Input Entered', { value: text }); var newURL = 'https://www.google.com/search?q=' + encodeURIComponent(text); chrome.tabs.update({ url: newURL }); }); chrome.omnibox.onDeleteSuggestion.addListener((text) => { amplitude.track('Delete Suggestion', { value: text }); }); chrome.omnibox.onInputCancelled.addListener((text) => { amplitude.track('Input Cancelled', { value: text }); }); chrome.omnibox.onInputChanged.addListener((text) => { amplitude.track('Input Changed', { value: text }); }); chrome.omnibox.onInputStarted.addListener((text) => { amplitude.track('Input Started', { value: text }); }); ================================================ FILE: examples/browser/chrome-ext/manifest.json ================================================ { "name": "Google Search Tracker", "description": "Type 'g' plus a search term into the Omnibox to seach in google.com", "version": "1.0", "manifest_version": 3, "background": { "service_worker": "background.js" }, "omnibox": { "keyword": "g" } } ================================================ FILE: examples/browser/html-app/README.md ================================================ This is a demo project for instrumenting events using Amplitude Analytics SDK in an basic HTML page. ## Getting Started First, run the development server: ```bash npm start # or pnpm start ``` Open [http://localhost:8080](http://localhost:8080) with your browser to see the result. ================================================ FILE: examples/browser/html-app/index.css ================================================ form { /* Just to center the form on the page */ margin: 20px 0px; width: 400px; /* To see the limits of the form */ padding: 1em; border: 1px solid #ccc; border-radius: 1em; } div + div { margin-top: 1em; } label { /* To make sure that all label have the same size and are properly align */ display: inline-block; width: 90px; text-align: right; } input, textarea { /* To make sure that all text field have the same font settings By default, textarea are set with a monospace font */ font: 1em sans-serif; /* To give the same size to all text field */ width: 300px; -moz-box-sizing: border-box; box-sizing: border-box; /* To harmonize the look & feel of text field border */ border: 1px solid #999; } input:focus, textarea:focus { /* To give a little highlight on active elements */ border-color: #000; } textarea { /* To properly align multiline text field with their label */ vertical-align: top; /* To give enough room to type some text */ height: 5em; /* To allow users to resize any textarea vertically It works only on Chrome, Firefox and Safari */ resize: vertical; } .button { /* To position the buttons to the same position of the text fields */ padding-left: 90px; /* same size as the label elements */ } button { /* This extra margin represent the same space as the space between the labels and their text fields */ margin-left: 0.5em; } ================================================ FILE: examples/browser/html-app/index.html ================================================ HTML 5 Boilerplate

Amplitude Analytics Browser Example with HTML

================================================ FILE: examples/browser/html-app/package.json ================================================ { "name": "html-app", "version": "1.0.0", "scripts": { "start": "npx http-server" } } ================================================ FILE: examples/browser/next-app/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # next.js /.next/ /out/ # production /build # misc .DS_Store *.pem # debug npm-debug.log* yarn-debug.log* yarn-error.log* .pnpm-debug.log* # local env files .env*.local # vercel .vercel # typescript *.tsbuildinfo ================================================ FILE: examples/browser/next-app/README.md ================================================ This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app). ## Getting Started First, run the development server: ```bash npm run dev # or pnpm dev ``` Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. You can start editing the page by modifying `pages/index.tsx`. The page auto-updates as you edit the file. [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.ts`. The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages. ## Learn More To learn more about Next.js, take a look at the following resources: - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! ## Deploy on Vercel The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. ================================================ FILE: examples/browser/next-app/eslint.config.mjs ================================================ import nextVitals from "eslint-config-next/core-web-vitals"; import nextTs from "eslint-config-next/typescript"; const eslintConfig = [ ...nextVitals, ...nextTs, { ignores: [".next/**", "out/**", "build/**", "next-env.d.ts"], }, ]; export default eslintConfig; ================================================ FILE: examples/browser/next-app/next.config.js ================================================ /** @type {import('next').NextConfig} */ const nextConfig = { reactStrictMode: true, } module.exports = nextConfig ================================================ FILE: examples/browser/next-app/package.json ================================================ { "name": "next-app", "version": "0.1.0", "private": true, "scripts": { "dev": "next dev", "build": "next build", "start": "next start", "lint": "eslint ." }, "dependencies": { "@amplitude/analytics-browser": "^2.0.0-beta", "next": "16.1.5", "react": "18.2.0", "react-dom": "18.2.0" }, "devDependencies": { "@types/node": "18.11.14", "@types/react": "18.0.26", "@types/react-dom": "18.0.9", "eslint": "9.7.0", "eslint-config-next": "16.1.5", "typescript": "5.0.2" } } ================================================ FILE: examples/browser/next-app/pages/_app.tsx ================================================ import '../styles/globals.css' import type { AppProps } from 'next/app' import * as amplitude from '@amplitude/analytics-browser'; /** * Start by calling amplitude.init(). This must be done before any event tracking * preferrably in the root file of the project. * * Calling init() requires an API key * ``` * amplitude.init(API_KEY) * ``` * * Optionally, a user id can be provided when calling init() * ``` * amplitude.init(API_KEY, 'example.next.user@amplitude.com') * ``` * * Optionally, a config object can be provided. Refer to https://amplitude.github.io/Amplitude-TypeScript/interfaces/Types.BrowserConfig.html * for object properties. */ amplitude.init('API_KEY', 'example.next.user@amplitude.com') function MyApp({ Component, pageProps }: AppProps) { return } export default MyApp ================================================ FILE: examples/browser/next-app/pages/api/hello.ts ================================================ // Next.js API route support: https://nextjs.org/docs/api-routes/introduction import type { NextApiRequest, NextApiResponse } from 'next'; type Data = { name: string; }; export default function handler(req: NextApiRequest, res: NextApiResponse) { res.status(200).json({ name: 'John Doe' }); } ================================================ FILE: examples/browser/next-app/pages/index.tsx ================================================ import type { NextPage } from 'next' import Head from 'next/head' import styles from '../styles/Home.module.css' import { identify, setGroup, groupIdentify, track, Identify } from '@amplitude/analytics-browser' const Home: NextPage = () => { return (
Create Next App

Amplitude Analytics Browser Example with Next

) } export default Home ================================================ FILE: examples/browser/next-app/styles/Home.module.css ================================================ .container { padding: 0 2rem; } .main { min-height: 100vh; padding: 4rem 0; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; } .footer { display: flex; flex: 1; padding: 2rem 0; border-top: 1px solid #eaeaea; justify-content: center; align-items: center; } .footer a { display: flex; justify-content: center; align-items: center; flex-grow: 1; } .title a { color: #0070f3; text-decoration: none; } .title a:hover, .title a:focus, .title a:active { text-decoration: underline; } .title { margin: 0; line-height: 1.15; font-size: 4rem; } .title, .description { text-align: center; } .description { margin: 4rem 0; line-height: 1.5; font-size: 1.5rem; } .code { background: #fafafa; border-radius: 5px; padding: 0.75rem; font-size: 1.1rem; font-family: Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace; } .grid { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; max-width: 800px; } .card { margin: 1rem; padding: 1.5rem; text-align: left; color: inherit; text-decoration: none; border: 1px solid #eaeaea; border-radius: 10px; transition: color 0.15s ease, border-color 0.15s ease; max-width: 300px; } .card:hover, .card:focus, .card:active { color: #0070f3; border-color: #0070f3; } .card h2 { margin: 0 0 1rem 0; font-size: 1.5rem; } .card p { margin: 0; font-size: 1.25rem; line-height: 1.5; } .logo { height: 1em; margin-left: 0.5rem; } @media (max-width: 600px) { .grid { width: 100%; flex-direction: column; } } ================================================ FILE: examples/browser/next-app/styles/globals.css ================================================ html, body { padding: 0; margin: 0; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; } a { color: inherit; text-decoration: none; } * { box-sizing: border-box; } ================================================ FILE: examples/browser/next-app/tsconfig.json ================================================ { "compilerOptions": { "target": "es5", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true, "strict": true, "forceConsistentCasingInFileNames": true, "noEmit": true, "esModuleInterop": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "jsx": "preserve", "incremental": true }, "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "exclude": ["node_modules"] } ================================================ FILE: examples/browser/react-app/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # production /build # misc .DS_Store .env.local .env.development.local .env.test.local .env.production.local npm-debug.log* yarn-debug.log* yarn-error.log* ================================================ FILE: examples/browser/react-app/README.md ================================================ # Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ## Available Scripts In the project directory, you can run: ### `pnpm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. ### `pnpm test` Launches the test runner in the interactive watch mode.\ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. ### `pnpm run build` Builds the app for production to the `build` folder.\ It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.\ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. ### `pnpm run eject` **Note: this is a one-way operation. Once you `eject`, you can’t go back!** If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). ================================================ FILE: examples/browser/react-app/package.json ================================================ { "name": "react-app", "version": "0.1.0", "private": true, "dependencies": { "@amplitude/analytics-browser": "^2.0.0-beta", "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.2.4", "@types/node": "^18.11.14", "@types/react": "^18.0.26", "@types/react-dom": "^18.0.9", "react": "^18.2.0", "react-dom": "^18.2.0", "react-scripts": "5.0.1", "typescript": "^4.6.3", "web-vitals": "^3.1.0" }, "scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } } ================================================ FILE: examples/browser/react-app/public/index.html ================================================ React App
================================================ FILE: examples/browser/react-app/public/manifest.json ================================================ { "short_name": "React App", "name": "Create React App Sample", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" }, { "src": "logo192.png", "type": "image/png", "sizes": "192x192" }, { "src": "logo512.png", "type": "image/png", "sizes": "512x512" } ], "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" } ================================================ FILE: examples/browser/react-app/public/robots.txt ================================================ # https://www.robotstxt.org/robotstxt.html User-agent: * Disallow: ================================================ FILE: examples/browser/react-app/src/App.css ================================================ .App { text-align: center; } .App-logo { height: 40vmin; pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .App-logo { animation: App-logo-spin infinite 20s linear; } } .App-header { background-color: #282c34; min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin); color: white; } .App-link { color: #61dafb; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } ================================================ FILE: examples/browser/react-app/src/App.test.tsx ================================================ import React from 'react'; import { render, screen } from '@testing-library/react'; import App from './App'; test('renders learn react link', () => { render(); const linkElement = screen.getByText(/learn react/i); expect(linkElement).toBeInTheDocument(); }); ================================================ FILE: examples/browser/react-app/src/App.tsx ================================================ import React, { useEffect } from 'react'; import logo from './logo.svg'; import './App.css'; import { track, identify, setGroup, groupIdentify, Identify } from '@amplitude/analytics-browser'; function App() { useEffect(() => { track('Page View', { name: 'App', }); }, []); return (
logo

Amplitude Analytics Browser Example with React

); } export default App; ================================================ FILE: examples/browser/react-app/src/index.css ================================================ body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } ================================================ FILE: examples/browser/react-app/src/index.tsx ================================================ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; import * as amplitude from '@amplitude/analytics-browser'; /** * Start by calling amplitude.init(). This must be done before any event tracking * preferrably in the root file of the project. * * Calling init() requires an API key * ``` * amplitude.init(API_KEY) * ``` * * Optionally, a user id can be provided when calling init() * ``` * amplitude.init(API_KEY, 'example.react.user@amplitude.com') * ``` * * Optionally, a config object can be provided. Refer to https://amplitude.github.io/Amplitude-TypeScript/interfaces/Types.BrowserConfig.html * for object properties. */ amplitude.init('API_KEY', 'example.react.user@amplitude.com'); const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); root.render( ); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals reportWebVitals(); ================================================ FILE: examples/browser/react-app/src/reportWebVitals.ts ================================================ import { ReportHandler } from 'web-vitals'; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); getFID(onPerfEntry); getFCP(onPerfEntry); getLCP(onPerfEntry); getTTFB(onPerfEntry); }); } }; export default reportWebVitals; ================================================ FILE: examples/browser/react-app/src/setupTests.ts ================================================ // jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom'; ================================================ FILE: examples/browser/react-app/tsconfig.json ================================================ { "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx" }, "include": [ "src" ] } ================================================ FILE: examples/browser/vue-app/.browserslistrc ================================================ > 1% last 2 versions not dead not ie 11 ================================================ FILE: examples/browser/vue-app/.eslintrc.js ================================================ module.exports = { root: true, env: { node: true }, 'extends': [ 'plugin:vue/vue3-essential', 'eslint:recommended', '@vue/typescript/recommended' ], parserOptions: { ecmaVersion: 2020 }, rules: { 'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off', 'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off' } } ================================================ FILE: examples/browser/vue-app/.gitignore ================================================ .DS_Store node_modules /dist # local env files .env.local .env.*.local # Log files npm-debug.log* yarn-debug.log* yarn-error.log* pnpm-debug.log* # Editor directories and files .idea .vscode *.suo *.ntvs* *.njsproj *.sln *.sw? ================================================ FILE: examples/browser/vue-app/README.md ================================================ # vue-app ## Project setup ``` pnpm install ``` ### Compiles and hot-reloads for development ``` pnpm serve ``` ### Compiles and minifies for production ``` pnpm build ``` ### Lints and fixes files ``` pnpm lint ``` ### Customize configuration See [Configuration Reference](https://cli.vuejs.org/config/). ================================================ FILE: examples/browser/vue-app/babel.config.js ================================================ module.exports = { presets: [ '@vue/cli-plugin-babel/preset' ] } ================================================ FILE: examples/browser/vue-app/package.json ================================================ { "name": "vue-app", "version": "0.1.0", "private": true, "scripts": { "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { "@amplitude/analytics-browser": "^2.0.0-beta", "core-js": "^3.26.1", "vue": "^3.2.45", "vue-class-component": "^8.0.0-rc.1" }, "devDependencies": { "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "@vue/cli-plugin-babel": "~5.0.0", "@vue/cli-plugin-eslint": "~5.0.0", "@vue/cli-plugin-typescript": "~5.0.0", "@vue/cli-service": "~5.0.0", "@vue/eslint-config-typescript": "^9.1.0", "eslint": "^8.29.0", "eslint-plugin-vue": "^9.8.0", "typescript": "~4.5.5" } } ================================================ FILE: examples/browser/vue-app/public/index.html ================================================ <%= htmlWebpackPlugin.options.title %>
================================================ FILE: examples/browser/vue-app/src/App.vue ================================================ ================================================ FILE: examples/browser/vue-app/src/components/HelloWorld.vue ================================================ ================================================ FILE: examples/browser/vue-app/src/main.ts ================================================ import { createApp } from 'vue'; import App from './App.vue'; import * as amplitude from '@amplitude/analytics-browser'; /** * Start by calling amplitude.init(). This must be done before any event tracking * preferrably in the root file of the project. * * Calling init() requires an API key * ``` * amplitude.init(API_KEY) * ``` * * Optionally, a user id can be provided when calling init() * ``` * amplitude.init(API_KEY, 'example.vue.user@amplitude.com') * ``` * * Optionally, a config object can be provided. Refer to https://amplitude.github.io/Amplitude-TypeScript/interfaces/Types.BrowserConfig.html * for object properties. */ amplitude.init('API_KEY', 'example.vue.user@amplitude.com'); createApp(App).mount('#app'); ================================================ FILE: examples/browser/vue-app/tsconfig.json ================================================ { "compilerOptions": { "target": "esnext", "module": "esnext", "strict": true, "jsx": "preserve", "moduleResolution": "node", "experimentalDecorators": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "forceConsistentCasingInFileNames": true, "useDefineForClassFields": true, "sourceMap": true, "baseUrl": ".", "types": [ "webpack-env" ], "paths": { "@/*": [ "src/*" ] }, "lib": [ "esnext", "dom", "dom.iterable", "scripthost" ] }, "include": [ "src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "tests/**/*.ts", "tests/**/*.tsx" ], "exclude": [ "node_modules" ] } ================================================ FILE: examples/browser/vue-app/vue.config.js ================================================ const { defineConfig } = require('@vue/cli-service') module.exports = defineConfig({ transpileDependencies: true, lintOnSave: false }) ================================================ FILE: examples/node/nest-app/.eslintrc.js ================================================ module.exports = { parser: '@typescript-eslint/parser', parserOptions: { project: 'tsconfig.json', tsconfigRootDir : __dirname, sourceType: 'module', }, plugins: ['@typescript-eslint/eslint-plugin'], extends: [ 'plugin:@typescript-eslint/recommended', 'plugin:prettier/recommended', ], root: true, env: { node: true, jest: true, }, ignorePatterns: ['.eslintrc.js'], rules: { '@typescript-eslint/interface-name-prefix': 'off', '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-explicit-any': 'off', }, }; ================================================ FILE: examples/node/nest-app/.gitignore ================================================ # compiled output /dist /node_modules # Logs logs *.log npm-debug.log* pnpm-debug.log* yarn-debug.log* yarn-error.log* lerna-debug.log* # OS .DS_Store # Tests /coverage /.nyc_output # IDEs and editors /.idea .project .classpath .c9/ *.launch .settings/ *.sublime-workspace # IDE - VSCode .vscode/* !.vscode/settings.json !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json ================================================ FILE: examples/node/nest-app/.prettierrc ================================================ { "singleQuote": true, "trailingComma": "all" } ================================================ FILE: examples/node/nest-app/README.md ================================================ ## Description This is an example Nest app generated with Nest CLI, with Amplitude TypeScript Node SDK integrated. [Nest](https://github.com/nestjs/nest) framework TypeScript starter repository. ## Installation ```bash $ npm install ``` ## Running the app Update the Amplitude API key before running the app. ```bash # development $ npm run start # watch mode $ npm run start:dev # production mode $ npm run start:prod ``` Open `http://localhost:3000/` in browser to view the available options. ## Test ```bash # unit tests $ npm run test # e2e tests $ npm run test:e2e # test coverage $ npm run test:cov ``` ================================================ FILE: examples/node/nest-app/nest-cli.json ================================================ { "$schema": "https://json.schemastore.org/nest-cli", "collection": "@nestjs/schematics", "sourceRoot": "src" } ================================================ FILE: examples/node/nest-app/package.json ================================================ { "name": "nest-app", "version": "0.0.1", "description": "", "author": "", "private": true, "license": "UNLICENSED", "scripts": { "prebuild": "rimraf dist", "build": "nest build", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "start": "nest start", "start:dev": "nest start --watch", "start:debug": "nest start --debug --watch", "start:prod": "node dist/main", "lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix" }, "dependencies": { "@amplitude/analytics-node": "^1.0.0", "@nestjs/common": "^9.2.1", "@nestjs/core": "^9.2.1", "@nestjs/platform-express": "^9.2.1", "hbs": "^4.2.0", "reflect-metadata": "^0.1.13", "rimraf": "^3.0.2", "rxjs": "^7.6.0" }, "devDependencies": { "@nestjs/cli": "^9.1.5", "@nestjs/schematics": "^9.0.3", "@types/express": "^4.17.14", "@types/jest": "29.2.4", "@types/node": "^18.11.14", "@types/supertest": "^2.0.12", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "eslint": "^8.29.0", "eslint-config-prettier": "^8.5.0", "eslint-plugin-prettier": "^4.2.1", "jest": "29.3.1", "prettier": "^2.8.1", "source-map-support": "^0.5.21", "ts-jest": "29.0.3", "ts-loader": "^9.4.2", "ts-node": "^10.9.1", "tsconfig-paths": "4.1.1", "typescript": "^4.7.4" }, "jest": { "moduleFileExtensions": [ "js", "json", "ts" ], "rootDir": "src", "testRegex": ".*\\.spec\\.ts$", "transform": { "^.+\\.(t|j)s$": "ts-jest" }, "collectCoverageFrom": [ "**/*.(t|j)s" ], "coverageDirectory": "../coverage", "testEnvironment": "node" } } ================================================ FILE: examples/node/nest-app/src/app.controller.ts ================================================ import { Controller, Get, Render } from '@nestjs/common'; import { AppService } from './app.service'; import * as amplitude from '@amplitude/analytics-node'; const AMPLITUDE_API_KEY = '9f0e4a9f1c1233088b254e30ba3c80e1'; @Controller() export class AppController { constructor(private readonly appService: AppService) { amplitude.init(AMPLITUDE_API_KEY, { logLevel: amplitude.Types.LogLevel.Debug, }); } @Get() @Render('index') getOptions(): any { return this.appService.getOptions(); } @Get('track') async track(): Promise { await amplitude.track( 'nest-app example event', { property1: '1' }, { user_id: 'test_user' }, ).promise; return 'Triggered, check console output...'; } @Get('identify') async identify(): Promise { const identifyObj = new amplitude.Identify(); identifyObj.set('email', 'test_user@email.com'); identifyObj.set('role', 'test'); await amplitude.identify(identifyObj, { user_id: 'test_user' }).promise; return 'Triggered, check console output...'; } @Get('group') async group(): Promise { await amplitude.setGroup('org', 'engineering', { user_id: 'test_user' }) .promise; return 'Triggered, check console output...'; } @Get('group-identify') async groupIdentify(): Promise { await amplitude.groupIdentify( 'org', 'engineering', new amplitude.Identify().set('technology', 'nest.js'), { user_id: 'test_user' }, ).promise; return 'Triggered, check console output...'; } @Get('test') async test(): Promise { const identifyObj = new amplitude.Identify(); identifyObj.set('email', 'marvin@test.com'); identifyObj.set('env', 'dev'); amplitude.identify(identifyObj); amplitude.track('some event', undefined, { user_id: 'marvin' }); await amplitude.flush().promise; return 'Triggered, check console output...'; } } ================================================ FILE: examples/node/nest-app/src/app.module.ts ================================================ import { Module } from '@nestjs/common'; import { AppController } from './app.controller'; import { AppService } from './app.service'; @Module({ imports: [], controllers: [AppController], providers: [AppService], }) export class AppModule {} ================================================ FILE: examples/node/nest-app/src/app.service.ts ================================================ import { Injectable } from '@nestjs/common'; @Injectable() export class AppService { getOptions(): any { return { prerequisite: 'update AMPLITUDE_API_KEY before sending the event', options: [ 'GET "/", check the options', 'GET "/track", send track event', 'GET "/identify", send identify event, send a new track event to see the updated properties', 'GET "/group", send group event, send a new track event to see the updated properties', 'GET "/group-identify", send groupIdentify event, send a new track event to see the updated properties', ], }; } } ================================================ FILE: examples/node/nest-app/src/main.ts ================================================ import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { NestExpressApplication } from '@nestjs/platform-express'; import { resolve } from 'path'; async function bootstrap() { const app = await NestFactory.create(AppModule); app.useStaticAssets(resolve('./src/public')); app.setBaseViewsDir(resolve('./src/views')); app.setViewEngine('hbs'); await app.listen(3000); } bootstrap(); ================================================ FILE: examples/node/nest-app/src/views/index.hbs ================================================ App Prerequisite: {{ prerequisite }}
    {{#each options as |option|}}
  • {{option}}
  • {{/each}}
================================================ FILE: examples/node/nest-app/tsconfig.build.json ================================================ { "extends": "./tsconfig.json", "exclude": ["node_modules", "test", "dist", "**/*spec.ts"] } ================================================ FILE: examples/node/nest-app/tsconfig.json ================================================ { "compilerOptions": { "module": "commonjs", "declaration": true, "removeComments": true, "emitDecoratorMetadata": true, "experimentalDecorators": true, "allowSyntheticDefaultImports": true, "target": "es2017", "sourceMap": true, "outDir": "./dist", "baseUrl": "./", "incremental": true, "skipLibCheck": true, "strictNullChecks": false, "noImplicitAny": false, "strictBindCallApply": false, "forceConsistentCasingInFileNames": false, "noFallthroughCasesInSwitch": false } } ================================================ FILE: examples/plugins/page-view-tracking-enrichment/index.ts ================================================ import { createInstance } from '@amplitude/analytics-browser'; import { EnrichmentPlugin } from '@amplitude/analytics-types'; /** * This is an example plugin that enriches events with event_type "Page View" by adding * more event_properties on top of what @amplitude/analytics-browser provides out of the box * * @returns EnrichmentPlugin */ export const pageViewTrackingEnrichment = (): EnrichmentPlugin => { return { name: 'page-view-tracking-enrichment', type: 'enrichment', setup: async () => undefined, execute: async (event) => { if (event.event_type !== '[Amplitude] Page Viewed') { // event name format if using Autocapture Pageviews return event; } event.event_properties = { ...event.event_properties, // TODO: Add new event properties here new_property: 'new_value', }; return event; }, }; }; const instance = createInstance(); /** * IMPORTANT: install plugin before calling init to make sure plugin is added by the time * init function sends out the "Page View" event */ instance.add(pageViewTrackingEnrichment()); // initialize sdk instance.init('API_KEY'); ================================================ FILE: examples/plugins/react-native-idfa-plugin/idfaPlugin.ts ================================================ import { Types } from '@amplitude/analytics-react-native'; import ReactNativeIdfaAaid from '@sparkfabrik/react-native-idfa-aaid'; export default class IdfaPlugin implements Types.BeforePlugin { name = 'idfa'; type = 'before' as const; idfa: string | null = null; async setup(_config: Types.Config): Promise { try { const info = await ReactNativeIdfaAaid.getAdvertisingInfo(); this.idfa = info.id; } catch (e) { console.log(e); } return undefined; } async execute(context: Types.Event): Promise { if (this.idfa) { context.idfa = this.idfa; } return context; } } ================================================ FILE: examples/plugins/remove-event-key/index.ts ================================================ import { createInstance } from '@amplitude/analytics-browser'; import { EnrichmentPlugin } from '@amplitude/analytics-types'; import { BaseEvent } from '@amplitude/analytics-types/src'; type KeyOfEvent = keyof BaseEvent; /** * This is an example plugin that enriches all events by removing a list of keys from the * event payload. This plugin is helpful in cases where users prefer not to use default * values set by the @amplitude/analytics-browser library, for example: * - `event.time` * - `event.idfa` * - `event.idva` * - `event.ip` * * @param keysToRemove * @returns EnrichmentPlugin */ export const removeEventKeyEnrichment = (keysToRemove: KeyOfEvent[] = []): EnrichmentPlugin => { return { name: 'remove-event-key-enrichment', type: 'enrichment', setup: async () => undefined, execute: async (event) => { for (var key of keysToRemove) { delete event[key]; } return event; }, }; }; /** * This is an example plugin that enriches all events by removing `event.time` from all events. * `event.time` uses `Date.now()` which is controlled by the device where the browser runs on. * The device clock can be easily manipulated yielding events having unreasonable time values. * With `event.time` being `undefined`, the time of the event is determined when the event was sent * successfully by the browser ("Client Upload Time"), determined by the server clock, rather than * when the event actually occurred. On majority of the cases, "Client Upload Time" can be * off by up to the configured `config.flushIntervalMillis`. By default `config.flushIntervalMillis` * is set to 1000 milliseconds. In rare cases where initial request to Amplitude fails due to * bad payload, throttled request, server error, etc, the time difference can be extended. */ const removeTimeEnrichment = removeEventKeyEnrichment(['time']); const instance = createInstance(); /** * IMPORTANT: install plugin before calling init to make sure plugin is added by the time * init function is called, and events are flushed. */ instance.add(removeTimeEnrichment); // initialize sdk instance.init('API_KEY'); ================================================ FILE: examples/react-native/app/.bundle/config ================================================ BUNDLE_PATH: "vendor/bundle" BUNDLE_FORCE_RUBY_PLATFORM: 1 ================================================ FILE: examples/react-native/app/.eslintrc.js ================================================ module.exports = { root: true, extends: '@react-native', }; ================================================ FILE: examples/react-native/app/.gitignore ================================================ # OSX # .DS_Store # Xcode # build/ *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata *.xccheckout *.moved-aside DerivedData *.hmap *.ipa *.xcuserstate **/.xcode.env.local # Android/IntelliJ # build/ .idea .gradle local.properties *.iml *.hprof .cxx/ *.keystore !debug.keystore # node.js # node_modules/ npm-debug.log yarn-error.log # fastlane # # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the # screenshots whenever they are needed. # For more information about the recommended setup visit: # https://docs.fastlane.tools/best-practices/source-control/ **/fastlane/report.xml **/fastlane/Preview.html **/fastlane/screenshots **/fastlane/test_output # Bundle artifact *.jsbundle # Ruby / CocoaPods **/Pods/ /vendor/bundle/ # Temporary files created by Metro to check the health of the file watcher .metro-health-check* # testing /coverage # Yarn .yarn/* !.yarn/patches !.yarn/plugins !.yarn/releases !.yarn/sdks !.yarn/versions ================================================ FILE: examples/react-native/app/.maestro/smoke.yaml ================================================ appId: org.reactjs.native.example.app --- - launchApp - extendedWaitUntil: visible: text: "Test Amplitude App" timeout: 15000 ================================================ FILE: examples/react-native/app/.prettierrc.js ================================================ module.exports = { arrowParens: 'avoid', bracketSameLine: true, bracketSpacing: false, singleQuote: true, trailingComma: 'all', }; ================================================ FILE: examples/react-native/app/.watchmanconfig ================================================ {} ================================================ FILE: examples/react-native/app/.yarn/releases/yarn-stable-temp.cjs ================================================ #!/usr/bin/env node /* eslint-disable */ //prettier-ignore (()=>{var $3e=Object.create;var LR=Object.defineProperty;var e_e=Object.getOwnPropertyDescriptor;var t_e=Object.getOwnPropertyNames;var r_e=Object.getPrototypeOf,n_e=Object.prototype.hasOwnProperty;var ve=(t=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(t,{get:(e,r)=>(typeof require<"u"?require:e)[r]}):t)(function(t){if(typeof require<"u")return require.apply(this,arguments);throw new Error('Dynamic require of "'+t+'" is not supported')});var Et=(t,e)=>()=>(t&&(e=t(t=0)),e);var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),zt=(t,e)=>{for(var r in e)LR(t,r,{get:e[r],enumerable:!0})},i_e=(t,e,r,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of t_e(e))!n_e.call(t,a)&&a!==r&&LR(t,a,{get:()=>e[a],enumerable:!(o=e_e(e,a))||o.enumerable});return t};var $e=(t,e,r)=>(r=t!=null?$3e(r_e(t)):{},i_e(e||!t||!t.__esModule?LR(r,"default",{value:t,enumerable:!0}):r,t));var vi={};zt(vi,{SAFE_TIME:()=>x7,S_IFDIR:()=>wD,S_IFLNK:()=>ID,S_IFMT:()=>Mu,S_IFREG:()=>qw});var Mu,wD,qw,ID,x7,k7=Et(()=>{Mu=61440,wD=16384,qw=32768,ID=40960,x7=456789e3});var tr={};zt(tr,{EBADF:()=>Io,EBUSY:()=>s_e,EEXIST:()=>A_e,EINVAL:()=>a_e,EISDIR:()=>u_e,ENOENT:()=>l_e,ENOSYS:()=>o_e,ENOTDIR:()=>c_e,ENOTEMPTY:()=>p_e,EOPNOTSUPP:()=>h_e,EROFS:()=>f_e,ERR_DIR_CLOSED:()=>NR});function Ll(t,e){return Object.assign(new Error(`${t}: ${e}`),{code:t})}function s_e(t){return Ll("EBUSY",t)}function o_e(t,e){return Ll("ENOSYS",`${t}, ${e}`)}function a_e(t){return Ll("EINVAL",`invalid argument, ${t}`)}function Io(t){return Ll("EBADF",`bad file descriptor, ${t}`)}function l_e(t){return Ll("ENOENT",`no such file or directory, ${t}`)}function c_e(t){return Ll("ENOTDIR",`not a directory, ${t}`)}function u_e(t){return Ll("EISDIR",`illegal operation on a directory, ${t}`)}function A_e(t){return Ll("EEXIST",`file already exists, ${t}`)}function f_e(t){return Ll("EROFS",`read-only filesystem, ${t}`)}function p_e(t){return Ll("ENOTEMPTY",`directory not empty, ${t}`)}function h_e(t){return Ll("EOPNOTSUPP",`operation not supported, ${t}`)}function NR(){return Ll("ERR_DIR_CLOSED","Directory handle was closed")}var BD=Et(()=>{});var Ea={};zt(Ea,{BigIntStatsEntry:()=>ty,DEFAULT_MODE:()=>UR,DirEntry:()=>OR,StatEntry:()=>ey,areStatsEqual:()=>_R,clearStats:()=>vD,convertToBigIntStats:()=>d_e,makeDefaultStats:()=>Q7,makeEmptyStats:()=>g_e});function Q7(){return new ey}function g_e(){return vD(Q7())}function vD(t){for(let e in t)if(Object.hasOwn(t,e)){let r=t[e];typeof r=="number"?t[e]=0:typeof r=="bigint"?t[e]=BigInt(0):MR.types.isDate(r)&&(t[e]=new Date(0))}return t}function d_e(t){let e=new ty;for(let r in t)if(Object.hasOwn(t,r)){let o=t[r];typeof o=="number"?e[r]=BigInt(o):MR.types.isDate(o)&&(e[r]=new Date(o))}return e.atimeNs=e.atimeMs*BigInt(1e6),e.mtimeNs=e.mtimeMs*BigInt(1e6),e.ctimeNs=e.ctimeMs*BigInt(1e6),e.birthtimeNs=e.birthtimeMs*BigInt(1e6),e}function _R(t,e){if(t.atimeMs!==e.atimeMs||t.birthtimeMs!==e.birthtimeMs||t.blksize!==e.blksize||t.blocks!==e.blocks||t.ctimeMs!==e.ctimeMs||t.dev!==e.dev||t.gid!==e.gid||t.ino!==e.ino||t.isBlockDevice()!==e.isBlockDevice()||t.isCharacterDevice()!==e.isCharacterDevice()||t.isDirectory()!==e.isDirectory()||t.isFIFO()!==e.isFIFO()||t.isFile()!==e.isFile()||t.isSocket()!==e.isSocket()||t.isSymbolicLink()!==e.isSymbolicLink()||t.mode!==e.mode||t.mtimeMs!==e.mtimeMs||t.nlink!==e.nlink||t.rdev!==e.rdev||t.size!==e.size||t.uid!==e.uid)return!1;let r=t,o=e;return!(r.atimeNs!==o.atimeNs||r.mtimeNs!==o.mtimeNs||r.ctimeNs!==o.ctimeNs||r.birthtimeNs!==o.birthtimeNs)}var MR,UR,OR,ey,ty,HR=Et(()=>{MR=$e(ve("util")),UR=33188,OR=class{constructor(){this.name="";this.path="";this.mode=0}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},ey=class{constructor(){this.uid=0;this.gid=0;this.size=0;this.blksize=0;this.atimeMs=0;this.mtimeMs=0;this.ctimeMs=0;this.birthtimeMs=0;this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=0;this.ino=0;this.mode=UR;this.nlink=1;this.rdev=0;this.blocks=1}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&61440)===16384}isFIFO(){return!1}isFile(){return(this.mode&61440)===32768}isSocket(){return!1}isSymbolicLink(){return(this.mode&61440)===40960}},ty=class{constructor(){this.uid=BigInt(0);this.gid=BigInt(0);this.size=BigInt(0);this.blksize=BigInt(0);this.atimeMs=BigInt(0);this.mtimeMs=BigInt(0);this.ctimeMs=BigInt(0);this.birthtimeMs=BigInt(0);this.atimeNs=BigInt(0);this.mtimeNs=BigInt(0);this.ctimeNs=BigInt(0);this.birthtimeNs=BigInt(0);this.atime=new Date(0);this.mtime=new Date(0);this.ctime=new Date(0);this.birthtime=new Date(0);this.dev=BigInt(0);this.ino=BigInt(0);this.mode=BigInt(UR);this.nlink=BigInt(1);this.rdev=BigInt(0);this.blocks=BigInt(1)}isBlockDevice(){return!1}isCharacterDevice(){return!1}isDirectory(){return(this.mode&BigInt(61440))===BigInt(16384)}isFIFO(){return!1}isFile(){return(this.mode&BigInt(61440))===BigInt(32768)}isSocket(){return!1}isSymbolicLink(){return(this.mode&BigInt(61440))===BigInt(40960)}}});function w_e(t){let e,r;if(e=t.match(E_e))t=e[1];else if(r=t.match(C_e))t=`\\\\${r[1]?".\\":""}${r[2]}`;else return t;return t.replace(/\//g,"\\")}function I_e(t){t=t.replace(/\\/g,"/");let e,r;return(e=t.match(m_e))?t=`/${e[1]}`:(r=t.match(y_e))&&(t=`/unc/${r[1]?".dot/":""}${r[2]}`),t}function DD(t,e){return t===le?R7(e):qR(e)}var Gw,Bt,dr,le,z,F7,m_e,y_e,E_e,C_e,qR,R7,Ca=Et(()=>{Gw=$e(ve("path")),Bt={root:"/",dot:".",parent:".."},dr={home:"~",nodeModules:"node_modules",manifest:"package.json",lockfile:"yarn.lock",virtual:"__virtual__",pnpJs:".pnp.js",pnpCjs:".pnp.cjs",pnpData:".pnp.data.json",pnpEsmLoader:".pnp.loader.mjs",rc:".yarnrc.yml",env:".env"},le=Object.create(Gw.default),z=Object.create(Gw.default.posix);le.cwd=()=>process.cwd();z.cwd=process.platform==="win32"?()=>qR(process.cwd()):process.cwd;process.platform==="win32"&&(z.resolve=(...t)=>t.length>0&&z.isAbsolute(t[0])?Gw.default.posix.resolve(...t):Gw.default.posix.resolve(z.cwd(),...t));F7=function(t,e,r){return e=t.normalize(e),r=t.normalize(r),e===r?".":(e.endsWith(t.sep)||(e=e+t.sep),r.startsWith(e)?r.slice(e.length):null)};le.contains=(t,e)=>F7(le,t,e);z.contains=(t,e)=>F7(z,t,e);m_e=/^([a-zA-Z]:.*)$/,y_e=/^\/\/(\.\/)?(.*)$/,E_e=/^\/([a-zA-Z]:.*)$/,C_e=/^\/unc\/(\.dot\/)?(.*)$/;qR=process.platform==="win32"?I_e:t=>t,R7=process.platform==="win32"?w_e:t=>t;le.fromPortablePath=R7;le.toPortablePath=qR});async function PD(t,e){let r="0123456789abcdef";await t.mkdirPromise(e.indexPath,{recursive:!0});let o=[];for(let a of r)for(let n of r)o.push(t.mkdirPromise(t.pathUtils.join(e.indexPath,`${a}${n}`),{recursive:!0}));return await Promise.all(o),e.indexPath}async function T7(t,e,r,o,a){let n=t.pathUtils.normalize(e),u=r.pathUtils.normalize(o),A=[],p=[],{atime:h,mtime:E}=a.stableTime?{atime:Mg,mtime:Mg}:await r.lstatPromise(u);await t.mkdirpPromise(t.pathUtils.dirname(e),{utimes:[h,E]}),await GR(A,p,t,n,r,u,{...a,didParentExist:!0});for(let I of A)await I();await Promise.all(p.map(I=>I()))}async function GR(t,e,r,o,a,n,u){let A=u.didParentExist?await L7(r,o):null,p=await a.lstatPromise(n),{atime:h,mtime:E}=u.stableTime?{atime:Mg,mtime:Mg}:p,I;switch(!0){case p.isDirectory():I=await v_e(t,e,r,o,A,a,n,p,u);break;case p.isFile():I=await S_e(t,e,r,o,A,a,n,p,u);break;case p.isSymbolicLink():I=await b_e(t,e,r,o,A,a,n,p,u);break;default:throw new Error(`Unsupported file type (${p.mode})`)}return(u.linkStrategy?.type!=="HardlinkFromIndex"||!p.isFile())&&((I||A?.mtime?.getTime()!==E.getTime()||A?.atime?.getTime()!==h.getTime())&&(e.push(()=>r.lutimesPromise(o,h,E)),I=!0),(A===null||(A.mode&511)!==(p.mode&511))&&(e.push(()=>r.chmodPromise(o,p.mode&511)),I=!0)),I}async function L7(t,e){try{return await t.lstatPromise(e)}catch{return null}}async function v_e(t,e,r,o,a,n,u,A,p){if(a!==null&&!a.isDirectory())if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1;let h=!1;a===null&&(t.push(async()=>{try{await r.mkdirPromise(o,{mode:A.mode})}catch(v){if(v.code!=="EEXIST")throw v}}),h=!0);let E=await n.readdirPromise(u),I=p.didParentExist&&!a?{...p,didParentExist:!1}:p;if(p.stableSort)for(let v of E.sort())await GR(t,e,r,r.pathUtils.join(o,v),n,n.pathUtils.join(u,v),I)&&(h=!0);else(await Promise.all(E.map(async x=>{await GR(t,e,r,r.pathUtils.join(o,x),n,n.pathUtils.join(u,x),I)}))).some(x=>x)&&(h=!0);return h}async function D_e(t,e,r,o,a,n,u,A,p,h){let E=await n.checksumFilePromise(u,{algorithm:"sha1"}),I=420,v=A.mode&511,x=`${E}${v!==I?v.toString(8):""}`,C=r.pathUtils.join(h.indexPath,E.slice(0,2),`${x}.dat`),R;(ue=>(ue[ue.Lock=0]="Lock",ue[ue.Rename=1]="Rename"))(R||={});let N=1,U=await L7(r,C);if(a){let ae=U&&a.dev===U.dev&&a.ino===U.ino,fe=U?.mtimeMs!==B_e;if(ae&&fe&&h.autoRepair&&(N=0,U=null),!ae)if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1}let V=!U&&N===1?`${C}.${Math.floor(Math.random()*4294967296).toString(16).padStart(8,"0")}`:null,te=!1;return t.push(async()=>{if(!U&&(N===0&&await r.lockPromise(C,async()=>{let ae=await n.readFilePromise(u);await r.writeFilePromise(C,ae)}),N===1&&V)){let ae=await n.readFilePromise(u);await r.writeFilePromise(V,ae);try{await r.linkPromise(V,C)}catch(fe){if(fe.code==="EEXIST")te=!0,await r.unlinkPromise(V);else throw fe}}a||await r.linkPromise(C,o)}),e.push(async()=>{U||(await r.lutimesPromise(C,Mg,Mg),v!==I&&await r.chmodPromise(C,v)),V&&!te&&await r.unlinkPromise(V)}),!1}async function P_e(t,e,r,o,a,n,u,A,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1;return t.push(async()=>{let h=await n.readFilePromise(u);await r.writeFilePromise(o,h)}),!0}async function S_e(t,e,r,o,a,n,u,A,p){return p.linkStrategy?.type==="HardlinkFromIndex"?D_e(t,e,r,o,a,n,u,A,p,p.linkStrategy):P_e(t,e,r,o,a,n,u,A,p)}async function b_e(t,e,r,o,a,n,u,A,p){if(a!==null)if(p.overwrite)t.push(async()=>r.removePromise(o)),a=null;else return!1;return t.push(async()=>{await r.symlinkPromise(DD(r.pathUtils,await n.readlinkPromise(u)),o)}),!0}var Mg,B_e,jR=Et(()=>{Ca();Mg=new Date(456789e3*1e3),B_e=Mg.getTime()});function SD(t,e,r,o){let a=()=>{let n=r.shift();if(typeof n>"u")return null;let u=t.pathUtils.join(e,n);return Object.assign(t.statSync(u),{name:n,path:void 0})};return new jw(e,a,o)}var jw,N7=Et(()=>{BD();jw=class{constructor(e,r,o={}){this.path=e;this.nextDirent=r;this.opts=o;this.closed=!1}throwIfClosed(){if(this.closed)throw NR()}async*[Symbol.asyncIterator](){try{let e;for(;(e=await this.read())!==null;)yield e}finally{await this.close()}}read(e){let r=this.readSync();return typeof e<"u"?e(null,r):Promise.resolve(r)}readSync(){return this.throwIfClosed(),this.nextDirent()}close(e){return this.closeSync(),typeof e<"u"?e(null):Promise.resolve()}closeSync(){this.throwIfClosed(),this.opts.onClose?.(),this.closed=!0}}});function O7(t,e){if(t!==e)throw new Error(`Invalid StatWatcher status: expected '${e}', got '${t}'`)}var M7,ry,U7=Et(()=>{M7=ve("events");HR();ry=class extends M7.EventEmitter{constructor(r,o,{bigint:a=!1}={}){super();this.status="ready";this.changeListeners=new Map;this.startTimeout=null;this.fakeFs=r,this.path=o,this.bigint=a,this.lastStats=this.stat()}static create(r,o,a){let n=new ry(r,o,a);return n.start(),n}start(){O7(this.status,"ready"),this.status="running",this.startTimeout=setTimeout(()=>{this.startTimeout=null,this.fakeFs.existsSync(this.path)||this.emit("change",this.lastStats,this.lastStats)},3)}stop(){O7(this.status,"running"),this.status="stopped",this.startTimeout!==null&&(clearTimeout(this.startTimeout),this.startTimeout=null),this.emit("stop")}stat(){try{return this.fakeFs.statSync(this.path,{bigint:this.bigint})}catch{let o=this.bigint?new ty:new ey;return vD(o)}}makeInterval(r){let o=setInterval(()=>{let a=this.stat(),n=this.lastStats;_R(a,n)||(this.lastStats=a,this.emit("change",a,n))},r.interval);return r.persistent?o:o.unref()}registerChangeListener(r,o){this.addListener("change",r),this.changeListeners.set(r,this.makeInterval(o))}unregisterChangeListener(r){this.removeListener("change",r);let o=this.changeListeners.get(r);typeof o<"u"&&clearInterval(o),this.changeListeners.delete(r)}unregisterAllChangeListeners(){for(let r of this.changeListeners.keys())this.unregisterChangeListener(r)}hasChangeListeners(){return this.changeListeners.size>0}ref(){for(let r of this.changeListeners.values())r.ref();return this}unref(){for(let r of this.changeListeners.values())r.unref();return this}}});function ny(t,e,r,o){let a,n,u,A;switch(typeof r){case"function":a=!1,n=!0,u=5007,A=r;break;default:({bigint:a=!1,persistent:n=!0,interval:u=5007}=r),A=o;break}let p=bD.get(t);typeof p>"u"&&bD.set(t,p=new Map);let h=p.get(e);return typeof h>"u"&&(h=ry.create(t,e,{bigint:a}),p.set(e,h)),h.registerChangeListener(A,{persistent:n,interval:u}),h}function Ug(t,e,r){let o=bD.get(t);if(typeof o>"u")return;let a=o.get(e);typeof a>"u"||(typeof r>"u"?a.unregisterAllChangeListeners():a.unregisterChangeListener(r),a.hasChangeListeners()||(a.stop(),o.delete(e)))}function _g(t){let e=bD.get(t);if(!(typeof e>"u"))for(let r of e.keys())Ug(t,r)}var bD,YR=Et(()=>{U7();bD=new WeakMap});function x_e(t){let e=t.match(/\r?\n/g);if(e===null)return H7.EOL;let r=e.filter(a=>a===`\r `).length,o=e.length-r;return r>o?`\r `:` `}function Hg(t,e){return e.replace(/\r?\n/g,x_e(t))}var _7,H7,gf,Uu,qg=Et(()=>{_7=ve("crypto"),H7=ve("os");jR();Ca();gf=class{constructor(e){this.pathUtils=e}async*genTraversePromise(e,{stableSort:r=!1}={}){let o=[e];for(;o.length>0;){let a=o.shift();if((await this.lstatPromise(a)).isDirectory()){let u=await this.readdirPromise(a);if(r)for(let A of u.sort())o.push(this.pathUtils.join(a,A));else throw new Error("Not supported")}else yield a}}async checksumFilePromise(e,{algorithm:r="sha512"}={}){let o=await this.openPromise(e,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,_7.createHash)(r),A=0;for(;(A=await this.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await this.closePromise(o)}}async removePromise(e,{recursive:r=!0,maxRetries:o=5}={}){let a;try{a=await this.lstatPromise(e)}catch(n){if(n.code==="ENOENT")return;throw n}if(a.isDirectory()){if(r){let n=await this.readdirPromise(e);await Promise.all(n.map(u=>this.removePromise(this.pathUtils.resolve(e,u))))}for(let n=0;n<=o;n++)try{await this.rmdirPromise(e);break}catch(u){if(u.code!=="EBUSY"&&u.code!=="ENOTEMPTY")throw u;nsetTimeout(A,n*100))}}else await this.unlinkPromise(e)}removeSync(e,{recursive:r=!0}={}){let o;try{o=this.lstatSync(e)}catch(a){if(a.code==="ENOENT")return;throw a}if(o.isDirectory()){if(r)for(let a of this.readdirSync(e))this.removeSync(this.pathUtils.resolve(e,a));this.rmdirSync(e)}else this.unlinkSync(e)}async mkdirpPromise(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{await this.mkdirPromise(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&await this.chmodPromise(A,r),o!=null)await this.utimesPromise(A,o[0],o[1]);else{let p=await this.statPromise(this.pathUtils.dirname(A));await this.utimesPromise(A,p.atime,p.mtime)}}}return n}mkdirpSync(e,{chmod:r,utimes:o}={}){if(e=this.resolve(e),e===this.pathUtils.dirname(e))return;let a=e.split(this.pathUtils.sep),n;for(let u=2;u<=a.length;++u){let A=a.slice(0,u).join(this.pathUtils.sep);if(!this.existsSync(A)){try{this.mkdirSync(A)}catch(p){if(p.code==="EEXIST")continue;throw p}if(n??=A,r!=null&&this.chmodSync(A,r),o!=null)this.utimesSync(A,o[0],o[1]);else{let p=this.statSync(this.pathUtils.dirname(A));this.utimesSync(A,p.atime,p.mtime)}}}return n}async copyPromise(e,r,{baseFs:o=this,overwrite:a=!0,stableSort:n=!1,stableTime:u=!1,linkStrategy:A=null}={}){return await T7(this,e,o,r,{overwrite:a,stableSort:n,stableTime:u,linkStrategy:A})}copySync(e,r,{baseFs:o=this,overwrite:a=!0}={}){let n=o.lstatSync(r),u=this.existsSync(e);if(n.isDirectory()){this.mkdirpSync(e);let p=o.readdirSync(r);for(let h of p)this.copySync(this.pathUtils.join(e,h),o.pathUtils.join(r,h),{baseFs:o,overwrite:a})}else if(n.isFile()){if(!u||a){u&&this.removeSync(e);let p=o.readFileSync(r);this.writeFileSync(e,p)}}else if(n.isSymbolicLink()){if(!u||a){u&&this.removeSync(e);let p=o.readlinkSync(r);this.symlinkSync(DD(this.pathUtils,p),e)}}else throw new Error(`Unsupported file type (file: ${r}, mode: 0o${n.mode.toString(8).padStart(6,"0")})`);let A=n.mode&511;this.chmodSync(e,A)}async changeFilePromise(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferPromise(e,r,o):this.changeFileTextPromise(e,r,o)}async changeFileBufferPromise(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=await this.readFilePromise(e)}catch{}Buffer.compare(a,r)!==0&&await this.writeFilePromise(e,r,{mode:o})}async changeFileTextPromise(e,r,{automaticNewlines:o,mode:a}={}){let n="";try{n=await this.readFilePromise(e,"utf8")}catch{}let u=o?Hg(n,r):r;n!==u&&await this.writeFilePromise(e,u,{mode:a})}changeFileSync(e,r,o={}){return Buffer.isBuffer(r)?this.changeFileBufferSync(e,r,o):this.changeFileTextSync(e,r,o)}changeFileBufferSync(e,r,{mode:o}={}){let a=Buffer.alloc(0);try{a=this.readFileSync(e)}catch{}Buffer.compare(a,r)!==0&&this.writeFileSync(e,r,{mode:o})}changeFileTextSync(e,r,{automaticNewlines:o=!1,mode:a}={}){let n="";try{n=this.readFileSync(e,"utf8")}catch{}let u=o?Hg(n,r):r;n!==u&&this.writeFileSync(e,u,{mode:a})}async movePromise(e,r){try{await this.renamePromise(e,r)}catch(o){if(o.code==="EXDEV")await this.copyPromise(r,e),await this.removePromise(e);else throw o}}moveSync(e,r){try{this.renameSync(e,r)}catch(o){if(o.code==="EXDEV")this.copySync(r,e),this.removeSync(e);else throw o}}async lockPromise(e,r){let o=`${e}.flock`,a=1e3/60,n=Date.now(),u=null,A=async()=>{let p;try{[p]=await this.readJsonPromise(o)}catch{return Date.now()-n<500}try{return process.kill(p,0),!0}catch{return!1}};for(;u===null;)try{u=await this.openPromise(o,"wx")}catch(p){if(p.code==="EEXIST"){if(!await A())try{await this.unlinkPromise(o);continue}catch{}if(Date.now()-n<60*1e3)await new Promise(h=>setTimeout(h,a));else throw new Error(`Couldn't acquire a lock in a reasonable time (via ${o})`)}else throw p}await this.writePromise(u,JSON.stringify([process.pid]));try{return await r()}finally{try{await this.closePromise(u),await this.unlinkPromise(o)}catch{}}}async readJsonPromise(e){let r=await this.readFilePromise(e,"utf8");try{return JSON.parse(r)}catch(o){throw o.message+=` (in ${e})`,o}}readJsonSync(e){let r=this.readFileSync(e,"utf8");try{return JSON.parse(r)}catch(o){throw o.message+=` (in ${e})`,o}}async writeJsonPromise(e,r,{compact:o=!1}={}){let a=o?0:2;return await this.writeFilePromise(e,`${JSON.stringify(r,null,a)} `)}writeJsonSync(e,r,{compact:o=!1}={}){let a=o?0:2;return this.writeFileSync(e,`${JSON.stringify(r,null,a)} `)}async preserveTimePromise(e,r){let o=await this.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await this.lutimesPromise(e,o.atime,o.mtime)}async preserveTimeSync(e,r){let o=this.lstatSync(e),a=r();typeof a<"u"&&(e=a),this.lutimesSync(e,o.atime,o.mtime)}},Uu=class extends gf{constructor(){super(z)}}});var Ps,df=Et(()=>{qg();Ps=class extends gf{getExtractHint(e){return this.baseFs.getExtractHint(e)}resolve(e){return this.mapFromBase(this.baseFs.resolve(this.mapToBase(e)))}getRealPath(){return this.mapFromBase(this.baseFs.getRealPath())}async openPromise(e,r,o){return this.baseFs.openPromise(this.mapToBase(e),r,o)}openSync(e,r,o){return this.baseFs.openSync(this.mapToBase(e),r,o)}async opendirPromise(e,r){return Object.assign(await this.baseFs.opendirPromise(this.mapToBase(e),r),{path:e})}opendirSync(e,r){return Object.assign(this.baseFs.opendirSync(this.mapToBase(e),r),{path:e})}async readPromise(e,r,o,a,n){return await this.baseFs.readPromise(e,r,o,a,n)}readSync(e,r,o,a,n){return this.baseFs.readSync(e,r,o,a,n)}async writePromise(e,r,o,a,n){return typeof r=="string"?await this.baseFs.writePromise(e,r,o):await this.baseFs.writePromise(e,r,o,a,n)}writeSync(e,r,o,a,n){return typeof r=="string"?this.baseFs.writeSync(e,r,o):this.baseFs.writeSync(e,r,o,a,n)}async closePromise(e){return this.baseFs.closePromise(e)}closeSync(e){this.baseFs.closeSync(e)}createReadStream(e,r){return this.baseFs.createReadStream(e!==null?this.mapToBase(e):e,r)}createWriteStream(e,r){return this.baseFs.createWriteStream(e!==null?this.mapToBase(e):e,r)}async realpathPromise(e){return this.mapFromBase(await this.baseFs.realpathPromise(this.mapToBase(e)))}realpathSync(e){return this.mapFromBase(this.baseFs.realpathSync(this.mapToBase(e)))}async existsPromise(e){return this.baseFs.existsPromise(this.mapToBase(e))}existsSync(e){return this.baseFs.existsSync(this.mapToBase(e))}accessSync(e,r){return this.baseFs.accessSync(this.mapToBase(e),r)}async accessPromise(e,r){return this.baseFs.accessPromise(this.mapToBase(e),r)}async statPromise(e,r){return this.baseFs.statPromise(this.mapToBase(e),r)}statSync(e,r){return this.baseFs.statSync(this.mapToBase(e),r)}async fstatPromise(e,r){return this.baseFs.fstatPromise(e,r)}fstatSync(e,r){return this.baseFs.fstatSync(e,r)}lstatPromise(e,r){return this.baseFs.lstatPromise(this.mapToBase(e),r)}lstatSync(e,r){return this.baseFs.lstatSync(this.mapToBase(e),r)}async fchmodPromise(e,r){return this.baseFs.fchmodPromise(e,r)}fchmodSync(e,r){return this.baseFs.fchmodSync(e,r)}async chmodPromise(e,r){return this.baseFs.chmodPromise(this.mapToBase(e),r)}chmodSync(e,r){return this.baseFs.chmodSync(this.mapToBase(e),r)}async fchownPromise(e,r,o){return this.baseFs.fchownPromise(e,r,o)}fchownSync(e,r,o){return this.baseFs.fchownSync(e,r,o)}async chownPromise(e,r,o){return this.baseFs.chownPromise(this.mapToBase(e),r,o)}chownSync(e,r,o){return this.baseFs.chownSync(this.mapToBase(e),r,o)}async renamePromise(e,r){return this.baseFs.renamePromise(this.mapToBase(e),this.mapToBase(r))}renameSync(e,r){return this.baseFs.renameSync(this.mapToBase(e),this.mapToBase(r))}async copyFilePromise(e,r,o=0){return this.baseFs.copyFilePromise(this.mapToBase(e),this.mapToBase(r),o)}copyFileSync(e,r,o=0){return this.baseFs.copyFileSync(this.mapToBase(e),this.mapToBase(r),o)}async appendFilePromise(e,r,o){return this.baseFs.appendFilePromise(this.fsMapToBase(e),r,o)}appendFileSync(e,r,o){return this.baseFs.appendFileSync(this.fsMapToBase(e),r,o)}async writeFilePromise(e,r,o){return this.baseFs.writeFilePromise(this.fsMapToBase(e),r,o)}writeFileSync(e,r,o){return this.baseFs.writeFileSync(this.fsMapToBase(e),r,o)}async unlinkPromise(e){return this.baseFs.unlinkPromise(this.mapToBase(e))}unlinkSync(e){return this.baseFs.unlinkSync(this.mapToBase(e))}async utimesPromise(e,r,o){return this.baseFs.utimesPromise(this.mapToBase(e),r,o)}utimesSync(e,r,o){return this.baseFs.utimesSync(this.mapToBase(e),r,o)}async lutimesPromise(e,r,o){return this.baseFs.lutimesPromise(this.mapToBase(e),r,o)}lutimesSync(e,r,o){return this.baseFs.lutimesSync(this.mapToBase(e),r,o)}async mkdirPromise(e,r){return this.baseFs.mkdirPromise(this.mapToBase(e),r)}mkdirSync(e,r){return this.baseFs.mkdirSync(this.mapToBase(e),r)}async rmdirPromise(e,r){return this.baseFs.rmdirPromise(this.mapToBase(e),r)}rmdirSync(e,r){return this.baseFs.rmdirSync(this.mapToBase(e),r)}async rmPromise(e,r){return this.baseFs.rmPromise(this.mapToBase(e),r)}rmSync(e,r){return this.baseFs.rmSync(this.mapToBase(e),r)}async linkPromise(e,r){return this.baseFs.linkPromise(this.mapToBase(e),this.mapToBase(r))}linkSync(e,r){return this.baseFs.linkSync(this.mapToBase(e),this.mapToBase(r))}async symlinkPromise(e,r,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkPromise(this.mapToBase(e),a,o);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),u=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkPromise(u,a,o)}symlinkSync(e,r,o){let a=this.mapToBase(r);if(this.pathUtils.isAbsolute(e))return this.baseFs.symlinkSync(this.mapToBase(e),a,o);let n=this.mapToBase(this.pathUtils.join(this.pathUtils.dirname(r),e)),u=this.baseFs.pathUtils.relative(this.baseFs.pathUtils.dirname(a),n);return this.baseFs.symlinkSync(u,a,o)}async readFilePromise(e,r){return this.baseFs.readFilePromise(this.fsMapToBase(e),r)}readFileSync(e,r){return this.baseFs.readFileSync(this.fsMapToBase(e),r)}readdirPromise(e,r){return this.baseFs.readdirPromise(this.mapToBase(e),r)}readdirSync(e,r){return this.baseFs.readdirSync(this.mapToBase(e),r)}async readlinkPromise(e){return this.mapFromBase(await this.baseFs.readlinkPromise(this.mapToBase(e)))}readlinkSync(e){return this.mapFromBase(this.baseFs.readlinkSync(this.mapToBase(e)))}async truncatePromise(e,r){return this.baseFs.truncatePromise(this.mapToBase(e),r)}truncateSync(e,r){return this.baseFs.truncateSync(this.mapToBase(e),r)}async ftruncatePromise(e,r){return this.baseFs.ftruncatePromise(e,r)}ftruncateSync(e,r){return this.baseFs.ftruncateSync(e,r)}watch(e,r,o){return this.baseFs.watch(this.mapToBase(e),r,o)}watchFile(e,r,o){return this.baseFs.watchFile(this.mapToBase(e),r,o)}unwatchFile(e,r){return this.baseFs.unwatchFile(this.mapToBase(e),r)}fsMapToBase(e){return typeof e=="number"?e:this.mapToBase(e)}}});var _u,q7=Et(()=>{df();_u=class extends Ps{constructor(r,{baseFs:o,pathUtils:a}){super(a);this.target=r,this.baseFs=o}getRealPath(){return this.target}getBaseFs(){return this.baseFs}mapFromBase(r){return r}mapToBase(r){return r}}});function G7(t){let e=t;return typeof t.path=="string"&&(e.path=le.toPortablePath(t.path)),e}var j7,Tn,Gg=Et(()=>{j7=$e(ve("fs"));qg();Ca();Tn=class extends Uu{constructor(r=j7.default){super();this.realFs=r}getExtractHint(){return!1}getRealPath(){return Bt.root}resolve(r){return z.resolve(r)}async openPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.open(le.fromPortablePath(r),o,a,this.makeCallback(n,u))})}openSync(r,o,a){return this.realFs.openSync(le.fromPortablePath(r),o,a)}async opendirPromise(r,o){return await new Promise((a,n)=>{typeof o<"u"?this.realFs.opendir(le.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.opendir(le.fromPortablePath(r),this.makeCallback(a,n))}).then(a=>{let n=a;return Object.defineProperty(n,"path",{value:r,configurable:!0,writable:!0}),n})}opendirSync(r,o){let n=typeof o<"u"?this.realFs.opendirSync(le.fromPortablePath(r),o):this.realFs.opendirSync(le.fromPortablePath(r));return Object.defineProperty(n,"path",{value:r,configurable:!0,writable:!0}),n}async readPromise(r,o,a=0,n=0,u=-1){return await new Promise((A,p)=>{this.realFs.read(r,o,a,n,u,(h,E)=>{h?p(h):A(E)})})}readSync(r,o,a,n,u){return this.realFs.readSync(r,o,a,n,u)}async writePromise(r,o,a,n,u){return await new Promise((A,p)=>typeof o=="string"?this.realFs.write(r,o,a,this.makeCallback(A,p)):this.realFs.write(r,o,a,n,u,this.makeCallback(A,p)))}writeSync(r,o,a,n,u){return typeof o=="string"?this.realFs.writeSync(r,o,a):this.realFs.writeSync(r,o,a,n,u)}async closePromise(r){await new Promise((o,a)=>{this.realFs.close(r,this.makeCallback(o,a))})}closeSync(r){this.realFs.closeSync(r)}createReadStream(r,o){let a=r!==null?le.fromPortablePath(r):r;return this.realFs.createReadStream(a,o)}createWriteStream(r,o){let a=r!==null?le.fromPortablePath(r):r;return this.realFs.createWriteStream(a,o)}async realpathPromise(r){return await new Promise((o,a)=>{this.realFs.realpath(le.fromPortablePath(r),{},this.makeCallback(o,a))}).then(o=>le.toPortablePath(o))}realpathSync(r){return le.toPortablePath(this.realFs.realpathSync(le.fromPortablePath(r),{}))}async existsPromise(r){return await new Promise(o=>{this.realFs.exists(le.fromPortablePath(r),o)})}accessSync(r,o){return this.realFs.accessSync(le.fromPortablePath(r),o)}async accessPromise(r,o){return await new Promise((a,n)=>{this.realFs.access(le.fromPortablePath(r),o,this.makeCallback(a,n))})}existsSync(r){return this.realFs.existsSync(le.fromPortablePath(r))}async statPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.stat(le.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.stat(le.fromPortablePath(r),this.makeCallback(a,n))})}statSync(r,o){return o?this.realFs.statSync(le.fromPortablePath(r),o):this.realFs.statSync(le.fromPortablePath(r))}async fstatPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.fstat(r,o,this.makeCallback(a,n)):this.realFs.fstat(r,this.makeCallback(a,n))})}fstatSync(r,o){return o?this.realFs.fstatSync(r,o):this.realFs.fstatSync(r)}async lstatPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.lstat(le.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.lstat(le.fromPortablePath(r),this.makeCallback(a,n))})}lstatSync(r,o){return o?this.realFs.lstatSync(le.fromPortablePath(r),o):this.realFs.lstatSync(le.fromPortablePath(r))}async fchmodPromise(r,o){return await new Promise((a,n)=>{this.realFs.fchmod(r,o,this.makeCallback(a,n))})}fchmodSync(r,o){return this.realFs.fchmodSync(r,o)}async chmodPromise(r,o){return await new Promise((a,n)=>{this.realFs.chmod(le.fromPortablePath(r),o,this.makeCallback(a,n))})}chmodSync(r,o){return this.realFs.chmodSync(le.fromPortablePath(r),o)}async fchownPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.fchown(r,o,a,this.makeCallback(n,u))})}fchownSync(r,o,a){return this.realFs.fchownSync(r,o,a)}async chownPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.chown(le.fromPortablePath(r),o,a,this.makeCallback(n,u))})}chownSync(r,o,a){return this.realFs.chownSync(le.fromPortablePath(r),o,a)}async renamePromise(r,o){return await new Promise((a,n)=>{this.realFs.rename(le.fromPortablePath(r),le.fromPortablePath(o),this.makeCallback(a,n))})}renameSync(r,o){return this.realFs.renameSync(le.fromPortablePath(r),le.fromPortablePath(o))}async copyFilePromise(r,o,a=0){return await new Promise((n,u)=>{this.realFs.copyFile(le.fromPortablePath(r),le.fromPortablePath(o),a,this.makeCallback(n,u))})}copyFileSync(r,o,a=0){return this.realFs.copyFileSync(le.fromPortablePath(r),le.fromPortablePath(o),a)}async appendFilePromise(r,o,a){return await new Promise((n,u)=>{let A=typeof r=="string"?le.fromPortablePath(r):r;a?this.realFs.appendFile(A,o,a,this.makeCallback(n,u)):this.realFs.appendFile(A,o,this.makeCallback(n,u))})}appendFileSync(r,o,a){let n=typeof r=="string"?le.fromPortablePath(r):r;a?this.realFs.appendFileSync(n,o,a):this.realFs.appendFileSync(n,o)}async writeFilePromise(r,o,a){return await new Promise((n,u)=>{let A=typeof r=="string"?le.fromPortablePath(r):r;a?this.realFs.writeFile(A,o,a,this.makeCallback(n,u)):this.realFs.writeFile(A,o,this.makeCallback(n,u))})}writeFileSync(r,o,a){let n=typeof r=="string"?le.fromPortablePath(r):r;a?this.realFs.writeFileSync(n,o,a):this.realFs.writeFileSync(n,o)}async unlinkPromise(r){return await new Promise((o,a)=>{this.realFs.unlink(le.fromPortablePath(r),this.makeCallback(o,a))})}unlinkSync(r){return this.realFs.unlinkSync(le.fromPortablePath(r))}async utimesPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.utimes(le.fromPortablePath(r),o,a,this.makeCallback(n,u))})}utimesSync(r,o,a){this.realFs.utimesSync(le.fromPortablePath(r),o,a)}async lutimesPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.lutimes(le.fromPortablePath(r),o,a,this.makeCallback(n,u))})}lutimesSync(r,o,a){this.realFs.lutimesSync(le.fromPortablePath(r),o,a)}async mkdirPromise(r,o){return await new Promise((a,n)=>{this.realFs.mkdir(le.fromPortablePath(r),o,this.makeCallback(a,n))})}mkdirSync(r,o){return this.realFs.mkdirSync(le.fromPortablePath(r),o)}async rmdirPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.rmdir(le.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.rmdir(le.fromPortablePath(r),this.makeCallback(a,n))})}rmdirSync(r,o){return this.realFs.rmdirSync(le.fromPortablePath(r),o)}async rmPromise(r,o){return await new Promise((a,n)=>{o?this.realFs.rm(le.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.rm(le.fromPortablePath(r),this.makeCallback(a,n))})}rmSync(r,o){return this.realFs.rmSync(le.fromPortablePath(r),o)}async linkPromise(r,o){return await new Promise((a,n)=>{this.realFs.link(le.fromPortablePath(r),le.fromPortablePath(o),this.makeCallback(a,n))})}linkSync(r,o){return this.realFs.linkSync(le.fromPortablePath(r),le.fromPortablePath(o))}async symlinkPromise(r,o,a){return await new Promise((n,u)=>{this.realFs.symlink(le.fromPortablePath(r.replace(/\/+$/,"")),le.fromPortablePath(o),a,this.makeCallback(n,u))})}symlinkSync(r,o,a){return this.realFs.symlinkSync(le.fromPortablePath(r.replace(/\/+$/,"")),le.fromPortablePath(o),a)}async readFilePromise(r,o){return await new Promise((a,n)=>{let u=typeof r=="string"?le.fromPortablePath(r):r;this.realFs.readFile(u,o,this.makeCallback(a,n))})}readFileSync(r,o){let a=typeof r=="string"?le.fromPortablePath(r):r;return this.realFs.readFileSync(a,o)}async readdirPromise(r,o){return await new Promise((a,n)=>{o?o.recursive&&process.platform==="win32"?o.withFileTypes?this.realFs.readdir(le.fromPortablePath(r),o,this.makeCallback(u=>a(u.map(G7)),n)):this.realFs.readdir(le.fromPortablePath(r),o,this.makeCallback(u=>a(u.map(le.toPortablePath)),n)):this.realFs.readdir(le.fromPortablePath(r),o,this.makeCallback(a,n)):this.realFs.readdir(le.fromPortablePath(r),this.makeCallback(a,n))})}readdirSync(r,o){return o?o.recursive&&process.platform==="win32"?o.withFileTypes?this.realFs.readdirSync(le.fromPortablePath(r),o).map(G7):this.realFs.readdirSync(le.fromPortablePath(r),o).map(le.toPortablePath):this.realFs.readdirSync(le.fromPortablePath(r),o):this.realFs.readdirSync(le.fromPortablePath(r))}async readlinkPromise(r){return await new Promise((o,a)=>{this.realFs.readlink(le.fromPortablePath(r),this.makeCallback(o,a))}).then(o=>le.toPortablePath(o))}readlinkSync(r){return le.toPortablePath(this.realFs.readlinkSync(le.fromPortablePath(r)))}async truncatePromise(r,o){return await new Promise((a,n)=>{this.realFs.truncate(le.fromPortablePath(r),o,this.makeCallback(a,n))})}truncateSync(r,o){return this.realFs.truncateSync(le.fromPortablePath(r),o)}async ftruncatePromise(r,o){return await new Promise((a,n)=>{this.realFs.ftruncate(r,o,this.makeCallback(a,n))})}ftruncateSync(r,o){return this.realFs.ftruncateSync(r,o)}watch(r,o,a){return this.realFs.watch(le.fromPortablePath(r),o,a)}watchFile(r,o,a){return this.realFs.watchFile(le.fromPortablePath(r),o,a)}unwatchFile(r,o){return this.realFs.unwatchFile(le.fromPortablePath(r),o)}makeCallback(r,o){return(a,n)=>{a?o(a):r(n)}}}});var gn,Y7=Et(()=>{Gg();df();Ca();gn=class extends Ps{constructor(r,{baseFs:o=new Tn}={}){super(z);this.target=this.pathUtils.normalize(r),this.baseFs=o}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.target)}resolve(r){return this.pathUtils.isAbsolute(r)?z.normalize(r):this.baseFs.resolve(z.join(this.target,r))}mapFromBase(r){return r}mapToBase(r){return this.pathUtils.isAbsolute(r)?r:this.pathUtils.join(this.target,r)}}});var W7,Hu,K7=Et(()=>{Gg();df();Ca();W7=Bt.root,Hu=class extends Ps{constructor(r,{baseFs:o=new Tn}={}){super(z);this.target=this.pathUtils.resolve(Bt.root,r),this.baseFs=o}getRealPath(){return this.pathUtils.resolve(this.baseFs.getRealPath(),this.pathUtils.relative(Bt.root,this.target))}getTarget(){return this.target}getBaseFs(){return this.baseFs}mapToBase(r){let o=this.pathUtils.normalize(r);if(this.pathUtils.isAbsolute(r))return this.pathUtils.resolve(this.target,this.pathUtils.relative(W7,r));if(o.match(/^\.\.\/?/))throw new Error(`Resolving this path (${r}) would escape the jail`);return this.pathUtils.resolve(this.target,r)}mapFromBase(r){return this.pathUtils.resolve(W7,this.pathUtils.relative(this.target,r))}}});var iy,z7=Et(()=>{df();iy=class extends Ps{constructor(r,o){super(o);this.instance=null;this.factory=r}get baseFs(){return this.instance||(this.instance=this.factory()),this.instance}set baseFs(r){this.instance=r}mapFromBase(r){return r}mapToBase(r){return r}}});var jg,wa,qp,V7=Et(()=>{jg=ve("fs");qg();Gg();YR();BD();Ca();wa=4278190080,qp=class extends Uu{constructor({baseFs:r=new Tn,filter:o=null,magicByte:a=42,maxOpenFiles:n=1/0,useCache:u=!0,maxAge:A=5e3,typeCheck:p=jg.constants.S_IFREG,getMountPoint:h,factoryPromise:E,factorySync:I}){if(Math.floor(a)!==a||!(a>1&&a<=127))throw new Error("The magic byte must be set to a round value between 1 and 127 included");super();this.fdMap=new Map;this.nextFd=3;this.isMount=new Set;this.notMount=new Set;this.realPaths=new Map;this.limitOpenFilesTimeout=null;this.baseFs=r,this.mountInstances=u?new Map:null,this.factoryPromise=E,this.factorySync=I,this.filter=o,this.getMountPoint=h,this.magic=a<<24,this.maxAge=A,this.maxOpenFiles=n,this.typeCheck=p}getExtractHint(r){return this.baseFs.getExtractHint(r)}getRealPath(){return this.baseFs.getRealPath()}saveAndClose(){if(_g(this),this.mountInstances)for(let[r,{childFs:o}]of this.mountInstances.entries())o.saveAndClose?.(),this.mountInstances.delete(r)}discardAndClose(){if(_g(this),this.mountInstances)for(let[r,{childFs:o}]of this.mountInstances.entries())o.discardAndClose?.(),this.mountInstances.delete(r)}resolve(r){return this.baseFs.resolve(r)}remapFd(r,o){let a=this.nextFd++|this.magic;return this.fdMap.set(a,[r,o]),a}async openPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.openPromise(r,o,a),async(n,{subPath:u})=>this.remapFd(n,await n.openPromise(u,o,a)))}openSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.openSync(r,o,a),(n,{subPath:u})=>this.remapFd(n,n.openSync(u,o,a)))}async opendirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.opendirPromise(r,o),async(a,{subPath:n})=>await a.opendirPromise(n,o),{requireSubpath:!1})}opendirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.opendirSync(r,o),(a,{subPath:n})=>a.opendirSync(n,o),{requireSubpath:!1})}async readPromise(r,o,a,n,u){if((r&wa)!==this.magic)return await this.baseFs.readPromise(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Io("read");let[p,h]=A;return await p.readPromise(h,o,a,n,u)}readSync(r,o,a,n,u){if((r&wa)!==this.magic)return this.baseFs.readSync(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Io("readSync");let[p,h]=A;return p.readSync(h,o,a,n,u)}async writePromise(r,o,a,n,u){if((r&wa)!==this.magic)return typeof o=="string"?await this.baseFs.writePromise(r,o,a):await this.baseFs.writePromise(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Io("write");let[p,h]=A;return typeof o=="string"?await p.writePromise(h,o,a):await p.writePromise(h,o,a,n,u)}writeSync(r,o,a,n,u){if((r&wa)!==this.magic)return typeof o=="string"?this.baseFs.writeSync(r,o,a):this.baseFs.writeSync(r,o,a,n,u);let A=this.fdMap.get(r);if(typeof A>"u")throw Io("writeSync");let[p,h]=A;return typeof o=="string"?p.writeSync(h,o,a):p.writeSync(h,o,a,n,u)}async closePromise(r){if((r&wa)!==this.magic)return await this.baseFs.closePromise(r);let o=this.fdMap.get(r);if(typeof o>"u")throw Io("close");this.fdMap.delete(r);let[a,n]=o;return await a.closePromise(n)}closeSync(r){if((r&wa)!==this.magic)return this.baseFs.closeSync(r);let o=this.fdMap.get(r);if(typeof o>"u")throw Io("closeSync");this.fdMap.delete(r);let[a,n]=o;return a.closeSync(n)}createReadStream(r,o){return r===null?this.baseFs.createReadStream(r,o):this.makeCallSync(r,()=>this.baseFs.createReadStream(r,o),(a,{archivePath:n,subPath:u})=>{let A=a.createReadStream(u,o);return A.path=le.fromPortablePath(this.pathUtils.join(n,u)),A})}createWriteStream(r,o){return r===null?this.baseFs.createWriteStream(r,o):this.makeCallSync(r,()=>this.baseFs.createWriteStream(r,o),(a,{subPath:n})=>a.createWriteStream(n,o))}async realpathPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.realpathPromise(r),async(o,{archivePath:a,subPath:n})=>{let u=this.realPaths.get(a);return typeof u>"u"&&(u=await this.baseFs.realpathPromise(a),this.realPaths.set(a,u)),this.pathUtils.join(u,this.pathUtils.relative(Bt.root,await o.realpathPromise(n)))})}realpathSync(r){return this.makeCallSync(r,()=>this.baseFs.realpathSync(r),(o,{archivePath:a,subPath:n})=>{let u=this.realPaths.get(a);return typeof u>"u"&&(u=this.baseFs.realpathSync(a),this.realPaths.set(a,u)),this.pathUtils.join(u,this.pathUtils.relative(Bt.root,o.realpathSync(n)))})}async existsPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.existsPromise(r),async(o,{subPath:a})=>await o.existsPromise(a))}existsSync(r){return this.makeCallSync(r,()=>this.baseFs.existsSync(r),(o,{subPath:a})=>o.existsSync(a))}async accessPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.accessPromise(r,o),async(a,{subPath:n})=>await a.accessPromise(n,o))}accessSync(r,o){return this.makeCallSync(r,()=>this.baseFs.accessSync(r,o),(a,{subPath:n})=>a.accessSync(n,o))}async statPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.statPromise(r,o),async(a,{subPath:n})=>await a.statPromise(n,o))}statSync(r,o){return this.makeCallSync(r,()=>this.baseFs.statSync(r,o),(a,{subPath:n})=>a.statSync(n,o))}async fstatPromise(r,o){if((r&wa)!==this.magic)return this.baseFs.fstatPromise(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("fstat");let[n,u]=a;return n.fstatPromise(u,o)}fstatSync(r,o){if((r&wa)!==this.magic)return this.baseFs.fstatSync(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("fstatSync");let[n,u]=a;return n.fstatSync(u,o)}async lstatPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.lstatPromise(r,o),async(a,{subPath:n})=>await a.lstatPromise(n,o))}lstatSync(r,o){return this.makeCallSync(r,()=>this.baseFs.lstatSync(r,o),(a,{subPath:n})=>a.lstatSync(n,o))}async fchmodPromise(r,o){if((r&wa)!==this.magic)return this.baseFs.fchmodPromise(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("fchmod");let[n,u]=a;return n.fchmodPromise(u,o)}fchmodSync(r,o){if((r&wa)!==this.magic)return this.baseFs.fchmodSync(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("fchmodSync");let[n,u]=a;return n.fchmodSync(u,o)}async chmodPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.chmodPromise(r,o),async(a,{subPath:n})=>await a.chmodPromise(n,o))}chmodSync(r,o){return this.makeCallSync(r,()=>this.baseFs.chmodSync(r,o),(a,{subPath:n})=>a.chmodSync(n,o))}async fchownPromise(r,o,a){if((r&wa)!==this.magic)return this.baseFs.fchownPromise(r,o,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Io("fchown");let[u,A]=n;return u.fchownPromise(A,o,a)}fchownSync(r,o,a){if((r&wa)!==this.magic)return this.baseFs.fchownSync(r,o,a);let n=this.fdMap.get(r);if(typeof n>"u")throw Io("fchownSync");let[u,A]=n;return u.fchownSync(A,o,a)}async chownPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.chownPromise(r,o,a),async(n,{subPath:u})=>await n.chownPromise(u,o,a))}chownSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.chownSync(r,o,a),(n,{subPath:u})=>n.chownSync(u,o,a))}async renamePromise(r,o){return await this.makeCallPromise(r,async()=>await this.makeCallPromise(o,async()=>await this.baseFs.renamePromise(r,o),async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),async(a,{subPath:n})=>await this.makeCallPromise(o,async()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},async(u,{subPath:A})=>{if(a!==u)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return await a.renamePromise(n,A)}))}renameSync(r,o){return this.makeCallSync(r,()=>this.makeCallSync(o,()=>this.baseFs.renameSync(r,o),()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})}),(a,{subPath:n})=>this.makeCallSync(o,()=>{throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"})},(u,{subPath:A})=>{if(a!==u)throw Object.assign(new Error("EEXDEV: cross-device link not permitted"),{code:"EEXDEV"});return a.renameSync(n,A)}))}async copyFilePromise(r,o,a=0){let n=async(u,A,p,h)=>{if((a&jg.constants.COPYFILE_FICLONE_FORCE)!==0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${A}' -> ${h}'`),{code:"EXDEV"});if(a&jg.constants.COPYFILE_EXCL&&await this.existsPromise(A))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${A}' -> '${h}'`),{code:"EEXIST"});let E;try{E=await u.readFilePromise(A)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${A}' -> '${h}'`),{code:"EINVAL"})}await p.writeFilePromise(h,E)};return await this.makeCallPromise(r,async()=>await this.makeCallPromise(o,async()=>await this.baseFs.copyFilePromise(r,o,a),async(u,{subPath:A})=>await n(this.baseFs,r,u,A)),async(u,{subPath:A})=>await this.makeCallPromise(o,async()=>await n(u,A,this.baseFs,o),async(p,{subPath:h})=>u!==p?await n(u,A,p,h):await u.copyFilePromise(A,h,a)))}copyFileSync(r,o,a=0){let n=(u,A,p,h)=>{if((a&jg.constants.COPYFILE_FICLONE_FORCE)!==0)throw Object.assign(new Error(`EXDEV: cross-device clone not permitted, copyfile '${A}' -> ${h}'`),{code:"EXDEV"});if(a&jg.constants.COPYFILE_EXCL&&this.existsSync(A))throw Object.assign(new Error(`EEXIST: file already exists, copyfile '${A}' -> '${h}'`),{code:"EEXIST"});let E;try{E=u.readFileSync(A)}catch{throw Object.assign(new Error(`EINVAL: invalid argument, copyfile '${A}' -> '${h}'`),{code:"EINVAL"})}p.writeFileSync(h,E)};return this.makeCallSync(r,()=>this.makeCallSync(o,()=>this.baseFs.copyFileSync(r,o,a),(u,{subPath:A})=>n(this.baseFs,r,u,A)),(u,{subPath:A})=>this.makeCallSync(o,()=>n(u,A,this.baseFs,o),(p,{subPath:h})=>u!==p?n(u,A,p,h):u.copyFileSync(A,h,a)))}async appendFilePromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.appendFilePromise(r,o,a),async(n,{subPath:u})=>await n.appendFilePromise(u,o,a))}appendFileSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.appendFileSync(r,o,a),(n,{subPath:u})=>n.appendFileSync(u,o,a))}async writeFilePromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.writeFilePromise(r,o,a),async(n,{subPath:u})=>await n.writeFilePromise(u,o,a))}writeFileSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.writeFileSync(r,o,a),(n,{subPath:u})=>n.writeFileSync(u,o,a))}async unlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.unlinkPromise(r),async(o,{subPath:a})=>await o.unlinkPromise(a))}unlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.unlinkSync(r),(o,{subPath:a})=>o.unlinkSync(a))}async utimesPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.utimesPromise(r,o,a),async(n,{subPath:u})=>await n.utimesPromise(u,o,a))}utimesSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.utimesSync(r,o,a),(n,{subPath:u})=>n.utimesSync(u,o,a))}async lutimesPromise(r,o,a){return await this.makeCallPromise(r,async()=>await this.baseFs.lutimesPromise(r,o,a),async(n,{subPath:u})=>await n.lutimesPromise(u,o,a))}lutimesSync(r,o,a){return this.makeCallSync(r,()=>this.baseFs.lutimesSync(r,o,a),(n,{subPath:u})=>n.lutimesSync(u,o,a))}async mkdirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.mkdirPromise(r,o),async(a,{subPath:n})=>await a.mkdirPromise(n,o))}mkdirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.mkdirSync(r,o),(a,{subPath:n})=>a.mkdirSync(n,o))}async rmdirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.rmdirPromise(r,o),async(a,{subPath:n})=>await a.rmdirPromise(n,o))}rmdirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.rmdirSync(r,o),(a,{subPath:n})=>a.rmdirSync(n,o))}async rmPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.rmPromise(r,o),async(a,{subPath:n})=>await a.rmPromise(n,o))}rmSync(r,o){return this.makeCallSync(r,()=>this.baseFs.rmSync(r,o),(a,{subPath:n})=>a.rmSync(n,o))}async linkPromise(r,o){return await this.makeCallPromise(o,async()=>await this.baseFs.linkPromise(r,o),async(a,{subPath:n})=>await a.linkPromise(r,n))}linkSync(r,o){return this.makeCallSync(o,()=>this.baseFs.linkSync(r,o),(a,{subPath:n})=>a.linkSync(r,n))}async symlinkPromise(r,o,a){return await this.makeCallPromise(o,async()=>await this.baseFs.symlinkPromise(r,o,a),async(n,{subPath:u})=>await n.symlinkPromise(r,u))}symlinkSync(r,o,a){return this.makeCallSync(o,()=>this.baseFs.symlinkSync(r,o,a),(n,{subPath:u})=>n.symlinkSync(r,u))}async readFilePromise(r,o){return this.makeCallPromise(r,async()=>await this.baseFs.readFilePromise(r,o),async(a,{subPath:n})=>await a.readFilePromise(n,o))}readFileSync(r,o){return this.makeCallSync(r,()=>this.baseFs.readFileSync(r,o),(a,{subPath:n})=>a.readFileSync(n,o))}async readdirPromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.readdirPromise(r,o),async(a,{subPath:n})=>await a.readdirPromise(n,o),{requireSubpath:!1})}readdirSync(r,o){return this.makeCallSync(r,()=>this.baseFs.readdirSync(r,o),(a,{subPath:n})=>a.readdirSync(n,o),{requireSubpath:!1})}async readlinkPromise(r){return await this.makeCallPromise(r,async()=>await this.baseFs.readlinkPromise(r),async(o,{subPath:a})=>await o.readlinkPromise(a))}readlinkSync(r){return this.makeCallSync(r,()=>this.baseFs.readlinkSync(r),(o,{subPath:a})=>o.readlinkSync(a))}async truncatePromise(r,o){return await this.makeCallPromise(r,async()=>await this.baseFs.truncatePromise(r,o),async(a,{subPath:n})=>await a.truncatePromise(n,o))}truncateSync(r,o){return this.makeCallSync(r,()=>this.baseFs.truncateSync(r,o),(a,{subPath:n})=>a.truncateSync(n,o))}async ftruncatePromise(r,o){if((r&wa)!==this.magic)return this.baseFs.ftruncatePromise(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("ftruncate");let[n,u]=a;return n.ftruncatePromise(u,o)}ftruncateSync(r,o){if((r&wa)!==this.magic)return this.baseFs.ftruncateSync(r,o);let a=this.fdMap.get(r);if(typeof a>"u")throw Io("ftruncateSync");let[n,u]=a;return n.ftruncateSync(u,o)}watch(r,o,a){return this.makeCallSync(r,()=>this.baseFs.watch(r,o,a),(n,{subPath:u})=>n.watch(u,o,a))}watchFile(r,o,a){return this.makeCallSync(r,()=>this.baseFs.watchFile(r,o,a),()=>ny(this,r,o,a))}unwatchFile(r,o){return this.makeCallSync(r,()=>this.baseFs.unwatchFile(r,o),()=>Ug(this,r,o))}async makeCallPromise(r,o,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return await o();let u=this.resolve(r),A=this.findMount(u);return A?n&&A.subPath==="/"?await o():await this.getMountPromise(A.archivePath,async p=>await a(p,A)):await o()}makeCallSync(r,o,a,{requireSubpath:n=!0}={}){if(typeof r!="string")return o();let u=this.resolve(r),A=this.findMount(u);return!A||n&&A.subPath==="/"?o():this.getMountSync(A.archivePath,p=>a(p,A))}findMount(r){if(this.filter&&!this.filter.test(r))return null;let o="";for(;;){let a=r.substring(o.length),n=this.getMountPoint(a,o);if(!n)return null;if(o=this.pathUtils.join(o,n),!this.isMount.has(o)){if(this.notMount.has(o))continue;try{if(this.typeCheck!==null&&(this.baseFs.lstatSync(o).mode&jg.constants.S_IFMT)!==this.typeCheck){this.notMount.add(o);continue}}catch{return null}this.isMount.add(o)}return{archivePath:o,subPath:this.pathUtils.join(Bt.root,r.substring(o.length))}}}limitOpenFiles(r){if(this.mountInstances===null)return;let o=Date.now(),a=o+this.maxAge,n=r===null?0:this.mountInstances.size-r;for(let[u,{childFs:A,expiresAt:p,refCount:h}]of this.mountInstances.entries())if(!(h!==0||A.hasOpenFileHandles?.())){if(o>=p){A.saveAndClose?.(),this.mountInstances.delete(u),n-=1;continue}else if(r===null||n<=0){a=p;break}A.saveAndClose?.(),this.mountInstances.delete(u),n-=1}this.limitOpenFilesTimeout===null&&(r===null&&this.mountInstances.size>0||r!==null)&&isFinite(a)&&(this.limitOpenFilesTimeout=setTimeout(()=>{this.limitOpenFilesTimeout=null,this.limitOpenFiles(null)},a-o).unref())}async getMountPromise(r,o){if(this.mountInstances){let a=this.mountInstances.get(r);if(!a){let n=await this.factoryPromise(this.baseFs,r);a=this.mountInstances.get(r),a||(a={childFs:n(),expiresAt:0,refCount:0})}this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,a.refCount+=1;try{return await o(a.childFs)}finally{a.refCount-=1}}else{let a=(await this.factoryPromise(this.baseFs,r))();try{return await o(a)}finally{a.saveAndClose?.()}}}getMountSync(r,o){if(this.mountInstances){let a=this.mountInstances.get(r);return a||(a={childFs:this.factorySync(this.baseFs,r),expiresAt:0,refCount:0}),this.mountInstances.delete(r),this.limitOpenFiles(this.maxOpenFiles-1),this.mountInstances.set(r,a),a.expiresAt=Date.now()+this.maxAge,o(a.childFs)}else{let a=this.factorySync(this.baseFs,r);try{return o(a)}finally{a.saveAndClose?.()}}}}});var Zt,WR,Yw,J7=Et(()=>{qg();Ca();Zt=()=>Object.assign(new Error("ENOSYS: unsupported filesystem access"),{code:"ENOSYS"}),WR=class extends gf{constructor(){super(z)}getExtractHint(){throw Zt()}getRealPath(){throw Zt()}resolve(){throw Zt()}async openPromise(){throw Zt()}openSync(){throw Zt()}async opendirPromise(){throw Zt()}opendirSync(){throw Zt()}async readPromise(){throw Zt()}readSync(){throw Zt()}async writePromise(){throw Zt()}writeSync(){throw Zt()}async closePromise(){throw Zt()}closeSync(){throw Zt()}createWriteStream(){throw Zt()}createReadStream(){throw Zt()}async realpathPromise(){throw Zt()}realpathSync(){throw Zt()}async readdirPromise(){throw Zt()}readdirSync(){throw Zt()}async existsPromise(e){throw Zt()}existsSync(e){throw Zt()}async accessPromise(){throw Zt()}accessSync(){throw Zt()}async statPromise(){throw Zt()}statSync(){throw Zt()}async fstatPromise(e){throw Zt()}fstatSync(e){throw Zt()}async lstatPromise(e){throw Zt()}lstatSync(e){throw Zt()}async fchmodPromise(){throw Zt()}fchmodSync(){throw Zt()}async chmodPromise(){throw Zt()}chmodSync(){throw Zt()}async fchownPromise(){throw Zt()}fchownSync(){throw Zt()}async chownPromise(){throw Zt()}chownSync(){throw Zt()}async mkdirPromise(){throw Zt()}mkdirSync(){throw Zt()}async rmdirPromise(){throw Zt()}rmdirSync(){throw Zt()}async rmPromise(){throw Zt()}rmSync(){throw Zt()}async linkPromise(){throw Zt()}linkSync(){throw Zt()}async symlinkPromise(){throw Zt()}symlinkSync(){throw Zt()}async renamePromise(){throw Zt()}renameSync(){throw Zt()}async copyFilePromise(){throw Zt()}copyFileSync(){throw Zt()}async appendFilePromise(){throw Zt()}appendFileSync(){throw Zt()}async writeFilePromise(){throw Zt()}writeFileSync(){throw Zt()}async unlinkPromise(){throw Zt()}unlinkSync(){throw Zt()}async utimesPromise(){throw Zt()}utimesSync(){throw Zt()}async lutimesPromise(){throw Zt()}lutimesSync(){throw Zt()}async readFilePromise(){throw Zt()}readFileSync(){throw Zt()}async readlinkPromise(){throw Zt()}readlinkSync(){throw Zt()}async truncatePromise(){throw Zt()}truncateSync(){throw Zt()}async ftruncatePromise(e,r){throw Zt()}ftruncateSync(e,r){throw Zt()}watch(){throw Zt()}watchFile(){throw Zt()}unwatchFile(){throw Zt()}},Yw=WR;Yw.instance=new WR});var Gp,X7=Et(()=>{df();Ca();Gp=class extends Ps{constructor(r){super(le);this.baseFs=r}mapFromBase(r){return le.fromPortablePath(r)}mapToBase(r){return le.toPortablePath(r)}}});var k_e,KR,Q_e,mi,Z7=Et(()=>{Gg();df();Ca();k_e=/^[0-9]+$/,KR=/^(\/(?:[^/]+\/)*?(?:\$\$virtual|__virtual__))((?:\/((?:[^/]+-)?[a-f0-9]+)(?:\/([^/]+))?)?((?:\/.*)?))$/,Q_e=/^([^/]+-)?[a-f0-9]+$/,mi=class extends Ps{constructor({baseFs:r=new Tn}={}){super(z);this.baseFs=r}static makeVirtualPath(r,o,a){if(z.basename(r)!=="__virtual__")throw new Error('Assertion failed: Virtual folders must be named "__virtual__"');if(!z.basename(o).match(Q_e))throw new Error("Assertion failed: Virtual components must be ended by an hexadecimal hash");let u=z.relative(z.dirname(r),a).split("/"),A=0;for(;A{zR=$e(ve("buffer")),$7=ve("url"),eY=ve("util");df();Ca();xD=class extends Ps{constructor(r){super(le);this.baseFs=r}mapFromBase(r){return r}mapToBase(r){if(typeof r=="string")return r;if(r instanceof URL)return(0,$7.fileURLToPath)(r);if(Buffer.isBuffer(r)){let o=r.toString();if(!F_e(r,o))throw new Error("Non-utf8 buffers are not supported at the moment. Please upvote the following issue if you encounter this error: https://github.com/yarnpkg/berry/issues/4942");return o}throw new Error(`Unsupported path type: ${(0,eY.inspect)(r)}`)}}});var rY,Bo,mf,jp,kD,QD,sy,Lc,Nc,R_e,T_e,L_e,N_e,Ww,nY=Et(()=>{rY=ve("readline"),Bo=Symbol("kBaseFs"),mf=Symbol("kFd"),jp=Symbol("kClosePromise"),kD=Symbol("kCloseResolve"),QD=Symbol("kCloseReject"),sy=Symbol("kRefs"),Lc=Symbol("kRef"),Nc=Symbol("kUnref"),Ww=class{constructor(e,r){this[R_e]=1;this[T_e]=void 0;this[L_e]=void 0;this[N_e]=void 0;this[Bo]=r,this[mf]=e}get fd(){return this[mf]}async appendFile(e,r){try{this[Lc](this.appendFile);let o=(typeof r=="string"?r:r?.encoding)??void 0;return await this[Bo].appendFilePromise(this.fd,e,o?{encoding:o}:void 0)}finally{this[Nc]()}}async chown(e,r){try{return this[Lc](this.chown),await this[Bo].fchownPromise(this.fd,e,r)}finally{this[Nc]()}}async chmod(e){try{return this[Lc](this.chmod),await this[Bo].fchmodPromise(this.fd,e)}finally{this[Nc]()}}createReadStream(e){return this[Bo].createReadStream(null,{...e,fd:this.fd})}createWriteStream(e){return this[Bo].createWriteStream(null,{...e,fd:this.fd})}datasync(){throw new Error("Method not implemented.")}sync(){throw new Error("Method not implemented.")}async read(e,r,o,a){try{this[Lc](this.read);let n;return Buffer.isBuffer(e)?n=e:(e??={},n=e.buffer??Buffer.alloc(16384),r=e.offset||0,o=e.length??n.byteLength,a=e.position??null),r??=0,o??=0,o===0?{bytesRead:o,buffer:n}:{bytesRead:await this[Bo].readPromise(this.fd,n,r,o,a),buffer:n}}finally{this[Nc]()}}async readFile(e){try{this[Lc](this.readFile);let r=(typeof e=="string"?e:e?.encoding)??void 0;return await this[Bo].readFilePromise(this.fd,r)}finally{this[Nc]()}}readLines(e){return(0,rY.createInterface)({input:this.createReadStream(e),crlfDelay:1/0})}async stat(e){try{return this[Lc](this.stat),await this[Bo].fstatPromise(this.fd,e)}finally{this[Nc]()}}async truncate(e){try{return this[Lc](this.truncate),await this[Bo].ftruncatePromise(this.fd,e)}finally{this[Nc]()}}utimes(e,r){throw new Error("Method not implemented.")}async writeFile(e,r){try{this[Lc](this.writeFile);let o=(typeof r=="string"?r:r?.encoding)??void 0;await this[Bo].writeFilePromise(this.fd,e,o)}finally{this[Nc]()}}async write(...e){try{if(this[Lc](this.write),ArrayBuffer.isView(e[0])){let[r,o,a,n]=e;return{bytesWritten:await this[Bo].writePromise(this.fd,r,o??void 0,a??void 0,n??void 0),buffer:r}}else{let[r,o,a]=e;return{bytesWritten:await this[Bo].writePromise(this.fd,r,o,a),buffer:r}}}finally{this[Nc]()}}async writev(e,r){try{this[Lc](this.writev);let o=0;if(typeof r<"u")for(let a of e){let n=await this.write(a,void 0,void 0,r);o+=n.bytesWritten,r+=n.bytesWritten}else for(let a of e){let n=await this.write(a);o+=n.bytesWritten}return{buffers:e,bytesWritten:o}}finally{this[Nc]()}}readv(e,r){throw new Error("Method not implemented.")}close(){if(this[mf]===-1)return Promise.resolve();if(this[jp])return this[jp];if(this[sy]--,this[sy]===0){let e=this[mf];this[mf]=-1,this[jp]=this[Bo].closePromise(e).finally(()=>{this[jp]=void 0})}else this[jp]=new Promise((e,r)=>{this[kD]=e,this[QD]=r}).finally(()=>{this[jp]=void 0,this[QD]=void 0,this[kD]=void 0});return this[jp]}[(Bo,mf,R_e=sy,T_e=jp,L_e=kD,N_e=QD,Lc)](e){if(this[mf]===-1){let r=new Error("file closed");throw r.code="EBADF",r.syscall=e.name,r}this[sy]++}[Nc](){if(this[sy]--,this[sy]===0){let e=this[mf];this[mf]=-1,this[Bo].closePromise(e).then(this[kD],this[QD])}}}});function Kw(t,e){e=new xD(e);let r=(o,a,n)=>{let u=o[a];o[a]=n,typeof u?.[oy.promisify.custom]<"u"&&(n[oy.promisify.custom]=u[oy.promisify.custom])};{r(t,"exists",(o,...a)=>{let u=typeof a[a.length-1]=="function"?a.pop():()=>{};process.nextTick(()=>{e.existsPromise(o).then(A=>{u(A)},()=>{u(!1)})})}),r(t,"read",(...o)=>{let[a,n,u,A,p,h]=o;if(o.length<=3){let E={};o.length<3?h=o[1]:(E=o[1],h=o[2]),{buffer:n=Buffer.alloc(16384),offset:u=0,length:A=n.byteLength,position:p}=E}if(u==null&&(u=0),A|=0,A===0){process.nextTick(()=>{h(null,0,n)});return}p==null&&(p=-1),process.nextTick(()=>{e.readPromise(a,n,u,A,p).then(E=>{h(null,E,n)},E=>{h(E,0,n)})})});for(let o of iY){let a=o.replace(/Promise$/,"");if(typeof t[a]>"u")continue;let n=e[o];if(typeof n>"u")continue;r(t,a,(...A)=>{let h=typeof A[A.length-1]=="function"?A.pop():()=>{};process.nextTick(()=>{n.apply(e,A).then(E=>{h(null,E)},E=>{h(E)})})})}t.realpath.native=t.realpath}{r(t,"existsSync",o=>{try{return e.existsSync(o)}catch{return!1}}),r(t,"readSync",(...o)=>{let[a,n,u,A,p]=o;return o.length<=3&&({offset:u=0,length:A=n.byteLength,position:p}=o[2]||{}),u==null&&(u=0),A|=0,A===0?0:(p==null&&(p=-1),e.readSync(a,n,u,A,p))});for(let o of O_e){let a=o;if(typeof t[a]>"u")continue;let n=e[o];typeof n>"u"||r(t,a,n.bind(e))}t.realpathSync.native=t.realpathSync}{let o=t.promises;for(let a of iY){let n=a.replace(/Promise$/,"");if(typeof o[n]>"u")continue;let u=e[a];typeof u>"u"||a!=="open"&&r(o,n,(A,...p)=>A instanceof Ww?A[n].apply(A,p):u.call(e,A,...p))}r(o,"open",async(...a)=>{let n=await e.openPromise(...a);return new Ww(n,e)})}t.read[oy.promisify.custom]=async(o,a,...n)=>({bytesRead:await e.readPromise(o,a,...n),buffer:a}),t.write[oy.promisify.custom]=async(o,a,...n)=>({bytesWritten:await e.writePromise(o,a,...n),buffer:a})}function FD(t,e){let r=Object.create(t);return Kw(r,e),r}var oy,O_e,iY,sY=Et(()=>{oy=ve("util");tY();nY();O_e=new Set(["accessSync","appendFileSync","createReadStream","createWriteStream","chmodSync","fchmodSync","chownSync","fchownSync","closeSync","copyFileSync","linkSync","lstatSync","fstatSync","lutimesSync","mkdirSync","openSync","opendirSync","readlinkSync","readFileSync","readdirSync","readlinkSync","realpathSync","renameSync","rmdirSync","rmSync","statSync","symlinkSync","truncateSync","ftruncateSync","unlinkSync","unwatchFile","utimesSync","watch","watchFile","writeFileSync","writeSync"]),iY=new Set(["accessPromise","appendFilePromise","fchmodPromise","chmodPromise","fchownPromise","chownPromise","closePromise","copyFilePromise","linkPromise","fstatPromise","lstatPromise","lutimesPromise","mkdirPromise","openPromise","opendirPromise","readdirPromise","realpathPromise","readFilePromise","readdirPromise","readlinkPromise","renamePromise","rmdirPromise","rmPromise","statPromise","symlinkPromise","truncatePromise","ftruncatePromise","unlinkPromise","utimesPromise","writeFilePromise","writeSync"])});function oY(t){let e=Math.ceil(Math.random()*4294967296).toString(16).padStart(8,"0");return`${t}${e}`}function aY(){if(VR)return VR;let t=le.toPortablePath(lY.default.tmpdir()),e=oe.realpathSync(t);return process.once("exit",()=>{oe.rmtempSync()}),VR={tmpdir:t,realTmpdir:e}}var lY,Oc,VR,oe,cY=Et(()=>{lY=$e(ve("os"));Gg();Ca();Oc=new Set,VR=null;oe=Object.assign(new Tn,{detachTemp(t){Oc.delete(t)},mktempSync(t){let{tmpdir:e,realTmpdir:r}=aY();for(;;){let o=oY("xfs-");try{this.mkdirSync(z.join(e,o))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=z.join(r,o);if(Oc.add(a),typeof t>"u")return a;try{return t(a)}finally{if(Oc.has(a)){Oc.delete(a);try{this.removeSync(a)}catch{}}}}},async mktempPromise(t){let{tmpdir:e,realTmpdir:r}=aY();for(;;){let o=oY("xfs-");try{await this.mkdirPromise(z.join(e,o))}catch(n){if(n.code==="EEXIST")continue;throw n}let a=z.join(r,o);if(Oc.add(a),typeof t>"u")return a;try{return await t(a)}finally{if(Oc.has(a)){Oc.delete(a);try{await this.removePromise(a)}catch{}}}}},async rmtempPromise(){await Promise.all(Array.from(Oc.values()).map(async t=>{try{await oe.removePromise(t,{maxRetries:0}),Oc.delete(t)}catch{}}))},rmtempSync(){for(let t of Oc)try{oe.removeSync(t),Oc.delete(t)}catch{}}})});var zw={};zt(zw,{AliasFS:()=>_u,BasePortableFakeFS:()=>Uu,CustomDir:()=>jw,CwdFS:()=>gn,FakeFS:()=>gf,Filename:()=>dr,JailFS:()=>Hu,LazyFS:()=>iy,MountFS:()=>qp,NoFS:()=>Yw,NodeFS:()=>Tn,PortablePath:()=>Bt,PosixFS:()=>Gp,ProxiedFS:()=>Ps,VirtualFS:()=>mi,constants:()=>vi,errors:()=>tr,extendFs:()=>FD,normalizeLineEndings:()=>Hg,npath:()=>le,opendir:()=>SD,patchFs:()=>Kw,ppath:()=>z,setupCopyIndex:()=>PD,statUtils:()=>Ea,unwatchAllFiles:()=>_g,unwatchFile:()=>Ug,watchFile:()=>ny,xfs:()=>oe});var Pt=Et(()=>{k7();BD();HR();jR();N7();YR();qg();Ca();Ca();q7();qg();Y7();K7();z7();V7();J7();Gg();X7();df();Z7();sY();cY()});var hY=_((abt,pY)=>{pY.exports=fY;fY.sync=U_e;var uY=ve("fs");function M_e(t,e){var r=e.pathExt!==void 0?e.pathExt:process.env.PATHEXT;if(!r||(r=r.split(";"),r.indexOf("")!==-1))return!0;for(var o=0;o{yY.exports=dY;dY.sync=__e;var gY=ve("fs");function dY(t,e,r){gY.stat(t,function(o,a){r(o,o?!1:mY(a,e))})}function __e(t,e){return mY(gY.statSync(t),e)}function mY(t,e){return t.isFile()&&H_e(t,e)}function H_e(t,e){var r=t.mode,o=t.uid,a=t.gid,n=e.uid!==void 0?e.uid:process.getuid&&process.getuid(),u=e.gid!==void 0?e.gid:process.getgid&&process.getgid(),A=parseInt("100",8),p=parseInt("010",8),h=parseInt("001",8),E=A|p,I=r&h||r&p&&a===u||r&A&&o===n||r&E&&n===0;return I}});var wY=_((ubt,CY)=>{var cbt=ve("fs"),RD;process.platform==="win32"||global.TESTING_WINDOWS?RD=hY():RD=EY();CY.exports=JR;JR.sync=q_e;function JR(t,e,r){if(typeof e=="function"&&(r=e,e={}),!r){if(typeof Promise!="function")throw new TypeError("callback not provided");return new Promise(function(o,a){JR(t,e||{},function(n,u){n?a(n):o(u)})})}RD(t,e||{},function(o,a){o&&(o.code==="EACCES"||e&&e.ignoreErrors)&&(o=null,a=!1),r(o,a)})}function q_e(t,e){try{return RD.sync(t,e||{})}catch(r){if(e&&e.ignoreErrors||r.code==="EACCES")return!1;throw r}}});var bY=_((Abt,SY)=>{var ay=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",IY=ve("path"),G_e=ay?";":":",BY=wY(),vY=t=>Object.assign(new Error(`not found: ${t}`),{code:"ENOENT"}),DY=(t,e)=>{let r=e.colon||G_e,o=t.match(/\//)||ay&&t.match(/\\/)?[""]:[...ay?[process.cwd()]:[],...(e.path||process.env.PATH||"").split(r)],a=ay?e.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",n=ay?a.split(r):[""];return ay&&t.indexOf(".")!==-1&&n[0]!==""&&n.unshift(""),{pathEnv:o,pathExt:n,pathExtExe:a}},PY=(t,e,r)=>{typeof e=="function"&&(r=e,e={}),e||(e={});let{pathEnv:o,pathExt:a,pathExtExe:n}=DY(t,e),u=[],A=h=>new Promise((E,I)=>{if(h===o.length)return e.all&&u.length?E(u):I(vY(t));let v=o[h],x=/^".*"$/.test(v)?v.slice(1,-1):v,C=IY.join(x,t),R=!x&&/^\.[\\\/]/.test(t)?t.slice(0,2)+C:C;E(p(R,h,0))}),p=(h,E,I)=>new Promise((v,x)=>{if(I===a.length)return v(A(E+1));let C=a[I];BY(h+C,{pathExt:n},(R,N)=>{if(!R&&N)if(e.all)u.push(h+C);else return v(h+C);return v(p(h,E,I+1))})});return r?A(0).then(h=>r(null,h),r):A(0)},j_e=(t,e)=>{e=e||{};let{pathEnv:r,pathExt:o,pathExtExe:a}=DY(t,e),n=[];for(let u=0;u{"use strict";var xY=(t={})=>{let e=t.env||process.env;return(t.platform||process.platform)!=="win32"?"PATH":Object.keys(e).reverse().find(o=>o.toUpperCase()==="PATH")||"Path"};XR.exports=xY;XR.exports.default=xY});var TY=_((pbt,RY)=>{"use strict";var QY=ve("path"),Y_e=bY(),W_e=kY();function FY(t,e){let r=t.options.env||process.env,o=process.cwd(),a=t.options.cwd!=null,n=a&&process.chdir!==void 0&&!process.chdir.disabled;if(n)try{process.chdir(t.options.cwd)}catch{}let u;try{u=Y_e.sync(t.command,{path:r[W_e({env:r})],pathExt:e?QY.delimiter:void 0})}catch{}finally{n&&process.chdir(o)}return u&&(u=QY.resolve(a?t.options.cwd:"",u)),u}function K_e(t){return FY(t)||FY(t,!0)}RY.exports=K_e});var LY=_((hbt,$R)=>{"use strict";var ZR=/([()\][%!^"`<>&|;, *?])/g;function z_e(t){return t=t.replace(ZR,"^$1"),t}function V_e(t,e){return t=`${t}`,t=t.replace(/(\\*)"/g,'$1$1\\"'),t=t.replace(/(\\*)$/,"$1$1"),t=`"${t}"`,t=t.replace(ZR,"^$1"),e&&(t=t.replace(ZR,"^$1")),t}$R.exports.command=z_e;$R.exports.argument=V_e});var OY=_((gbt,NY)=>{"use strict";NY.exports=/^#!(.*)/});var UY=_((dbt,MY)=>{"use strict";var J_e=OY();MY.exports=(t="")=>{let e=t.match(J_e);if(!e)return null;let[r,o]=e[0].replace(/#! ?/,"").split(" "),a=r.split("/").pop();return a==="env"?o:o?`${a} ${o}`:a}});var HY=_((mbt,_Y)=>{"use strict";var eT=ve("fs"),X_e=UY();function Z_e(t){let r=Buffer.alloc(150),o;try{o=eT.openSync(t,"r"),eT.readSync(o,r,0,150,0),eT.closeSync(o)}catch{}return X_e(r.toString())}_Y.exports=Z_e});var YY=_((ybt,jY)=>{"use strict";var $_e=ve("path"),qY=TY(),GY=LY(),e8e=HY(),t8e=process.platform==="win32",r8e=/\.(?:com|exe)$/i,n8e=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function i8e(t){t.file=qY(t);let e=t.file&&e8e(t.file);return e?(t.args.unshift(t.file),t.command=e,qY(t)):t.file}function s8e(t){if(!t8e)return t;let e=i8e(t),r=!r8e.test(e);if(t.options.forceShell||r){let o=n8e.test(e);t.command=$_e.normalize(t.command),t.command=GY.command(t.command),t.args=t.args.map(n=>GY.argument(n,o));let a=[t.command].concat(t.args).join(" ");t.args=["/d","/s","/c",`"${a}"`],t.command=process.env.comspec||"cmd.exe",t.options.windowsVerbatimArguments=!0}return t}function o8e(t,e,r){e&&!Array.isArray(e)&&(r=e,e=null),e=e?e.slice(0):[],r=Object.assign({},r);let o={command:t,args:e,options:r,file:void 0,original:{command:t,args:e}};return r.shell?o:s8e(o)}jY.exports=o8e});var zY=_((Ebt,KY)=>{"use strict";var tT=process.platform==="win32";function rT(t,e){return Object.assign(new Error(`${e} ${t.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${e} ${t.command}`,path:t.command,spawnargs:t.args})}function a8e(t,e){if(!tT)return;let r=t.emit;t.emit=function(o,a){if(o==="exit"){let n=WY(a,e,"spawn");if(n)return r.call(t,"error",n)}return r.apply(t,arguments)}}function WY(t,e){return tT&&t===1&&!e.file?rT(e.original,"spawn"):null}function l8e(t,e){return tT&&t===1&&!e.file?rT(e.original,"spawnSync"):null}KY.exports={hookChildProcess:a8e,verifyENOENT:WY,verifyENOENTSync:l8e,notFoundError:rT}});var sT=_((Cbt,ly)=>{"use strict";var VY=ve("child_process"),nT=YY(),iT=zY();function JY(t,e,r){let o=nT(t,e,r),a=VY.spawn(o.command,o.args,o.options);return iT.hookChildProcess(a,o),a}function c8e(t,e,r){let o=nT(t,e,r),a=VY.spawnSync(o.command,o.args,o.options);return a.error=a.error||iT.verifyENOENTSync(a.status,o),a}ly.exports=JY;ly.exports.spawn=JY;ly.exports.sync=c8e;ly.exports._parse=nT;ly.exports._enoent=iT});var ZY=_((wbt,XY)=>{"use strict";function u8e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Yg(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Yg)}u8e(Yg,Error);Yg.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",I;for(I=0;I0){for(I=1,v=1;I>",S=Br(">>",!1),y=">&",F=Br(">&",!1),J=">",X=Br(">",!1),Z="<<<",ie=Br("<<<",!1),be="<&",Le=Br("<&",!1),ot="<",dt=Br("<",!1),Gt=function(L){return{type:"argument",segments:[].concat(...L)}},$t=function(L){return L},bt="$'",an=Br("$'",!1),Qr="'",mr=Br("'",!1),br=function(L){return[{type:"text",text:L}]},Wr='""',Kn=Br('""',!1),Ls=function(){return{type:"text",text:""}},Ti='"',ps=Br('"',!1),io=function(L){return L},Si=function(L){return{type:"arithmetic",arithmetic:L,quoted:!0}},Ns=function(L){return{type:"shell",shell:L,quoted:!0}},so=function(L){return{type:"variable",...L,quoted:!0}},uc=function(L){return{type:"text",text:L}},uu=function(L){return{type:"arithmetic",arithmetic:L,quoted:!1}},cp=function(L){return{type:"shell",shell:L,quoted:!1}},up=function(L){return{type:"variable",...L,quoted:!1}},Os=function(L){return{type:"glob",pattern:L}},Dn=/^[^']/,oo=Cs(["'"],!0,!1),Ms=function(L){return L.join("")},yl=/^[^$"]/,El=Cs(["$",'"'],!0,!1),ao=`\\ `,zn=Br(`\\ `,!1),On=function(){return""},Li="\\",Mn=Br("\\",!1),_i=/^[\\$"`]/,rr=Cs(["\\","$",'"',"`"],!1,!1),Oe=function(L){return L},ii="\\a",Ua=Br("\\a",!1),hr=function(){return"a"},Ac="\\b",Au=Br("\\b",!1),fc=function(){return"\b"},Cl=/^[Ee]/,DA=Cs(["E","e"],!1,!1),fu=function(){return"\x1B"},Ce="\\f",Rt=Br("\\f",!1),pc=function(){return"\f"},Hi="\\n",pu=Br("\\n",!1),Yt=function(){return` `},wl="\\r",PA=Br("\\r",!1),Ap=function(){return"\r"},hc="\\t",SA=Br("\\t",!1),Qn=function(){return" "},hi="\\v",gc=Br("\\v",!1),bA=function(){return"\v"},sa=/^[\\'"?]/,Ni=Cs(["\\","'",'"',"?"],!1,!1),_o=function(L){return String.fromCharCode(parseInt(L,16))},Ze="\\x",lo=Br("\\x",!1),dc="\\u",hu=Br("\\u",!1),qi="\\U",gu=Br("\\U",!1),xA=function(L){return String.fromCodePoint(parseInt(L,16))},Ha=/^[0-7]/,mc=Cs([["0","7"]],!1,!1),hs=/^[0-9a-fA-f]/,Ht=Cs([["0","9"],["a","f"],["A","f"]],!1,!1),Fn=Ag(),Ci="{}",oa=Br("{}",!1),co=function(){return"{}"},Us="-",aa=Br("-",!1),la="+",Ho=Br("+",!1),wi=".",gs=Br(".",!1),ds=function(L,K,re){return{type:"number",value:(L==="-"?-1:1)*parseFloat(K.join("")+"."+re.join(""))}},ms=function(L,K){return{type:"number",value:(L==="-"?-1:1)*parseInt(K.join(""))}},_s=function(L){return{type:"variable",...L}},Un=function(L){return{type:"variable",name:L}},Pn=function(L){return L},ys="*",We=Br("*",!1),tt="/",It=Br("/",!1),ir=function(L,K,re){return{type:K==="*"?"multiplication":"division",right:re}},$=function(L,K){return K.reduce((re,pe)=>({left:re,...pe}),L)},ye=function(L,K,re){return{type:K==="+"?"addition":"subtraction",right:re}},Ne="$((",pt=Br("$((",!1),ht="))",Tt=Br("))",!1),er=function(L){return L},$r="$(",Gi=Br("$(",!1),es=function(L){return L},bi="${",qo=Br("${",!1),kA=":-",QA=Br(":-",!1),fp=function(L,K){return{name:L,defaultValue:K}},sg=":-}",du=Br(":-}",!1),og=function(L){return{name:L,defaultValue:[]}},mu=":+",uo=Br(":+",!1),FA=function(L,K){return{name:L,alternativeValue:K}},yc=":+}",ca=Br(":+}",!1),ag=function(L){return{name:L,alternativeValue:[]}},Ec=function(L){return{name:L}},Sm="$",lg=Br("$",!1),ei=function(L){return e.isGlobPattern(L)},pp=function(L){return L},cg=/^[a-zA-Z0-9_]/,RA=Cs([["a","z"],["A","Z"],["0","9"],"_"],!1,!1),Hs=function(){return ug()},yu=/^[$@*?#a-zA-Z0-9_\-]/,qa=Cs(["$","@","*","?","#",["a","z"],["A","Z"],["0","9"],"_","-"],!1,!1),ji=/^[()}<>$|&; \t"']/,ua=Cs(["(",")","}","<",">","$","|","&",";"," "," ",'"',"'"],!1,!1),Eu=/^[<>&; \t"']/,Es=Cs(["<",">","&",";"," "," ",'"',"'"],!1,!1),Cc=/^[ \t]/,wc=Cs([" "," "],!1,!1),j=0,Dt=0,Il=[{line:1,column:1}],xi=0,Ic=[],ct=0,Cu;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function ug(){return t.substring(Dt,j)}function yw(){return Bc(Dt,j)}function TA(L,K){throw K=K!==void 0?K:Bc(Dt,j),hg([pg(L)],t.substring(Dt,j),K)}function hp(L,K){throw K=K!==void 0?K:Bc(Dt,j),bm(L,K)}function Br(L,K){return{type:"literal",text:L,ignoreCase:K}}function Cs(L,K,re){return{type:"class",parts:L,inverted:K,ignoreCase:re}}function Ag(){return{type:"any"}}function fg(){return{type:"end"}}function pg(L){return{type:"other",description:L}}function gp(L){var K=Il[L],re;if(K)return K;for(re=L-1;!Il[re];)re--;for(K=Il[re],K={line:K.line,column:K.column};rexi&&(xi=j,Ic=[]),Ic.push(L))}function bm(L,K){return new Yg(L,null,null,K)}function hg(L,K,re){return new Yg(Yg.buildMessage(L,K),L,K,re)}function gg(){var L,K,re;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();return K!==r?(re=wu(),re===r&&(re=null),re!==r?(Dt=L,K=n(re),L=K):(j=L,L=r)):(j=L,L=r),L}function wu(){var L,K,re,pe,Je;if(L=j,K=Iu(),K!==r){for(re=[],pe=Qt();pe!==r;)re.push(pe),pe=Qt();re!==r?(pe=dg(),pe!==r?(Je=xm(),Je===r&&(Je=null),Je!==r?(Dt=L,K=u(K,pe,Je),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r)}else j=L,L=r;if(L===r)if(L=j,K=Iu(),K!==r){for(re=[],pe=Qt();pe!==r;)re.push(pe),pe=Qt();re!==r?(pe=dg(),pe===r&&(pe=null),pe!==r?(Dt=L,K=A(K,pe),L=K):(j=L,L=r)):(j=L,L=r)}else j=L,L=r;return L}function xm(){var L,K,re,pe,Je;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r)if(re=wu(),re!==r){for(pe=[],Je=Qt();Je!==r;)pe.push(Je),Je=Qt();pe!==r?(Dt=L,K=p(re),L=K):(j=L,L=r)}else j=L,L=r;else j=L,L=r;return L}function dg(){var L;return t.charCodeAt(j)===59?(L=h,j++):(L=r,ct===0&&Ct(E)),L===r&&(t.charCodeAt(j)===38?(L=I,j++):(L=r,ct===0&&Ct(v))),L}function Iu(){var L,K,re;return L=j,K=Aa(),K!==r?(re=Ew(),re===r&&(re=null),re!==r?(Dt=L,K=x(K,re),L=K):(j=L,L=r)):(j=L,L=r),L}function Ew(){var L,K,re,pe,Je,mt,fr;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r)if(re=km(),re!==r){for(pe=[],Je=Qt();Je!==r;)pe.push(Je),Je=Qt();if(pe!==r)if(Je=Iu(),Je!==r){for(mt=[],fr=Qt();fr!==r;)mt.push(fr),fr=Qt();mt!==r?(Dt=L,K=C(re,Je),L=K):(j=L,L=r)}else j=L,L=r;else j=L,L=r}else j=L,L=r;else j=L,L=r;return L}function km(){var L;return t.substr(j,2)===R?(L=R,j+=2):(L=r,ct===0&&Ct(N)),L===r&&(t.substr(j,2)===U?(L=U,j+=2):(L=r,ct===0&&Ct(V))),L}function Aa(){var L,K,re;return L=j,K=mg(),K!==r?(re=vc(),re===r&&(re=null),re!==r?(Dt=L,K=te(K,re),L=K):(j=L,L=r)):(j=L,L=r),L}function vc(){var L,K,re,pe,Je,mt,fr;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r)if(re=Bl(),re!==r){for(pe=[],Je=Qt();Je!==r;)pe.push(Je),Je=Qt();if(pe!==r)if(Je=Aa(),Je!==r){for(mt=[],fr=Qt();fr!==r;)mt.push(fr),fr=Qt();mt!==r?(Dt=L,K=ae(re,Je),L=K):(j=L,L=r)}else j=L,L=r;else j=L,L=r}else j=L,L=r;else j=L,L=r;return L}function Bl(){var L;return t.substr(j,2)===fe?(L=fe,j+=2):(L=r,ct===0&&Ct(ue)),L===r&&(t.charCodeAt(j)===124?(L=me,j++):(L=r,ct===0&&Ct(he))),L}function Bu(){var L,K,re,pe,Je,mt;if(L=j,K=wg(),K!==r)if(t.charCodeAt(j)===61?(re=Be,j++):(re=r,ct===0&&Ct(we)),re!==r)if(pe=Go(),pe!==r){for(Je=[],mt=Qt();mt!==r;)Je.push(mt),mt=Qt();Je!==r?(Dt=L,K=g(K,pe),L=K):(j=L,L=r)}else j=L,L=r;else j=L,L=r;else j=L,L=r;if(L===r)if(L=j,K=wg(),K!==r)if(t.charCodeAt(j)===61?(re=Be,j++):(re=r,ct===0&&Ct(we)),re!==r){for(pe=[],Je=Qt();Je!==r;)pe.push(Je),Je=Qt();pe!==r?(Dt=L,K=Ee(K),L=K):(j=L,L=r)}else j=L,L=r;else j=L,L=r;return L}function mg(){var L,K,re,pe,Je,mt,fr,Cr,yn,oi,Oi;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r)if(t.charCodeAt(j)===40?(re=Pe,j++):(re=r,ct===0&&Ct(ce)),re!==r){for(pe=[],Je=Qt();Je!==r;)pe.push(Je),Je=Qt();if(pe!==r)if(Je=wu(),Je!==r){for(mt=[],fr=Qt();fr!==r;)mt.push(fr),fr=Qt();if(mt!==r)if(t.charCodeAt(j)===41?(fr=ne,j++):(fr=r,ct===0&&Ct(ee)),fr!==r){for(Cr=[],yn=Qt();yn!==r;)Cr.push(yn),yn=Qt();if(Cr!==r){for(yn=[],oi=Ga();oi!==r;)yn.push(oi),oi=Ga();if(yn!==r){for(oi=[],Oi=Qt();Oi!==r;)oi.push(Oi),Oi=Qt();oi!==r?(Dt=L,K=Ie(Je,yn),L=K):(j=L,L=r)}else j=L,L=r}else j=L,L=r}else j=L,L=r;else j=L,L=r}else j=L,L=r;else j=L,L=r}else j=L,L=r;else j=L,L=r;if(L===r){for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r)if(t.charCodeAt(j)===123?(re=Fe,j++):(re=r,ct===0&&Ct(At)),re!==r){for(pe=[],Je=Qt();Je!==r;)pe.push(Je),Je=Qt();if(pe!==r)if(Je=wu(),Je!==r){for(mt=[],fr=Qt();fr!==r;)mt.push(fr),fr=Qt();if(mt!==r)if(t.charCodeAt(j)===125?(fr=H,j++):(fr=r,ct===0&&Ct(at)),fr!==r){for(Cr=[],yn=Qt();yn!==r;)Cr.push(yn),yn=Qt();if(Cr!==r){for(yn=[],oi=Ga();oi!==r;)yn.push(oi),oi=Ga();if(yn!==r){for(oi=[],Oi=Qt();Oi!==r;)oi.push(Oi),Oi=Qt();oi!==r?(Dt=L,K=Re(Je,yn),L=K):(j=L,L=r)}else j=L,L=r}else j=L,L=r}else j=L,L=r;else j=L,L=r}else j=L,L=r;else j=L,L=r}else j=L,L=r;else j=L,L=r;if(L===r){for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r){for(re=[],pe=Bu();pe!==r;)re.push(pe),pe=Bu();if(re!==r){for(pe=[],Je=Qt();Je!==r;)pe.push(Je),Je=Qt();if(pe!==r){if(Je=[],mt=dp(),mt!==r)for(;mt!==r;)Je.push(mt),mt=dp();else Je=r;if(Je!==r){for(mt=[],fr=Qt();fr!==r;)mt.push(fr),fr=Qt();mt!==r?(Dt=L,K=ke(re,Je),L=K):(j=L,L=r)}else j=L,L=r}else j=L,L=r}else j=L,L=r}else j=L,L=r;if(L===r){for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r){if(re=[],pe=Bu(),pe!==r)for(;pe!==r;)re.push(pe),pe=Bu();else re=r;if(re!==r){for(pe=[],Je=Qt();Je!==r;)pe.push(Je),Je=Qt();pe!==r?(Dt=L,K=xe(re),L=K):(j=L,L=r)}else j=L,L=r}else j=L,L=r}}}return L}function LA(){var L,K,re,pe,Je;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r){if(re=[],pe=mp(),pe!==r)for(;pe!==r;)re.push(pe),pe=mp();else re=r;if(re!==r){for(pe=[],Je=Qt();Je!==r;)pe.push(Je),Je=Qt();pe!==r?(Dt=L,K=He(re),L=K):(j=L,L=r)}else j=L,L=r}else j=L,L=r;return L}function dp(){var L,K,re;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();if(K!==r?(re=Ga(),re!==r?(Dt=L,K=Te(re),L=K):(j=L,L=r)):(j=L,L=r),L===r){for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();K!==r?(re=mp(),re!==r?(Dt=L,K=Te(re),L=K):(j=L,L=r)):(j=L,L=r)}return L}function Ga(){var L,K,re,pe,Je;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();return K!==r?(Ve.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(qe)),re===r&&(re=null),re!==r?(pe=yg(),pe!==r?(Je=mp(),Je!==r?(Dt=L,K=b(re,pe,Je),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r)):(j=L,L=r),L}function yg(){var L;return t.substr(j,2)===w?(L=w,j+=2):(L=r,ct===0&&Ct(S)),L===r&&(t.substr(j,2)===y?(L=y,j+=2):(L=r,ct===0&&Ct(F)),L===r&&(t.charCodeAt(j)===62?(L=J,j++):(L=r,ct===0&&Ct(X)),L===r&&(t.substr(j,3)===Z?(L=Z,j+=3):(L=r,ct===0&&Ct(ie)),L===r&&(t.substr(j,2)===be?(L=be,j+=2):(L=r,ct===0&&Ct(Le)),L===r&&(t.charCodeAt(j)===60?(L=ot,j++):(L=r,ct===0&&Ct(dt))))))),L}function mp(){var L,K,re;for(L=j,K=[],re=Qt();re!==r;)K.push(re),re=Qt();return K!==r?(re=Go(),re!==r?(Dt=L,K=Te(re),L=K):(j=L,L=r)):(j=L,L=r),L}function Go(){var L,K,re;if(L=j,K=[],re=ws(),re!==r)for(;re!==r;)K.push(re),re=ws();else K=r;return K!==r&&(Dt=L,K=Gt(K)),L=K,L}function ws(){var L,K;return L=j,K=Ii(),K!==r&&(Dt=L,K=$t(K)),L=K,L===r&&(L=j,K=Qm(),K!==r&&(Dt=L,K=$t(K)),L=K,L===r&&(L=j,K=Fm(),K!==r&&(Dt=L,K=$t(K)),L=K,L===r&&(L=j,K=jo(),K!==r&&(Dt=L,K=$t(K)),L=K))),L}function Ii(){var L,K,re,pe;return L=j,t.substr(j,2)===bt?(K=bt,j+=2):(K=r,ct===0&&Ct(an)),K!==r?(re=ln(),re!==r?(t.charCodeAt(j)===39?(pe=Qr,j++):(pe=r,ct===0&&Ct(mr)),pe!==r?(Dt=L,K=br(re),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r),L}function Qm(){var L,K,re,pe;return L=j,t.charCodeAt(j)===39?(K=Qr,j++):(K=r,ct===0&&Ct(mr)),K!==r?(re=Ep(),re!==r?(t.charCodeAt(j)===39?(pe=Qr,j++):(pe=r,ct===0&&Ct(mr)),pe!==r?(Dt=L,K=br(re),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r),L}function Fm(){var L,K,re,pe;if(L=j,t.substr(j,2)===Wr?(K=Wr,j+=2):(K=r,ct===0&&Ct(Kn)),K!==r&&(Dt=L,K=Ls()),L=K,L===r)if(L=j,t.charCodeAt(j)===34?(K=Ti,j++):(K=r,ct===0&&Ct(ps)),K!==r){for(re=[],pe=NA();pe!==r;)re.push(pe),pe=NA();re!==r?(t.charCodeAt(j)===34?(pe=Ti,j++):(pe=r,ct===0&&Ct(ps)),pe!==r?(Dt=L,K=io(re),L=K):(j=L,L=r)):(j=L,L=r)}else j=L,L=r;return L}function jo(){var L,K,re;if(L=j,K=[],re=yp(),re!==r)for(;re!==r;)K.push(re),re=yp();else K=r;return K!==r&&(Dt=L,K=io(K)),L=K,L}function NA(){var L,K;return L=j,K=jr(),K!==r&&(Dt=L,K=Si(K)),L=K,L===r&&(L=j,K=Cp(),K!==r&&(Dt=L,K=Ns(K)),L=K,L===r&&(L=j,K=Pc(),K!==r&&(Dt=L,K=so(K)),L=K,L===r&&(L=j,K=Eg(),K!==r&&(Dt=L,K=uc(K)),L=K))),L}function yp(){var L,K;return L=j,K=jr(),K!==r&&(Dt=L,K=uu(K)),L=K,L===r&&(L=j,K=Cp(),K!==r&&(Dt=L,K=cp(K)),L=K,L===r&&(L=j,K=Pc(),K!==r&&(Dt=L,K=up(K)),L=K,L===r&&(L=j,K=Cw(),K!==r&&(Dt=L,K=Os(K)),L=K,L===r&&(L=j,K=pa(),K!==r&&(Dt=L,K=uc(K)),L=K)))),L}function Ep(){var L,K,re;for(L=j,K=[],Dn.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(oo));re!==r;)K.push(re),Dn.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(oo));return K!==r&&(Dt=L,K=Ms(K)),L=K,L}function Eg(){var L,K,re;if(L=j,K=[],re=fa(),re===r&&(yl.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(El))),re!==r)for(;re!==r;)K.push(re),re=fa(),re===r&&(yl.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(El)));else K=r;return K!==r&&(Dt=L,K=Ms(K)),L=K,L}function fa(){var L,K,re;return L=j,t.substr(j,2)===ao?(K=ao,j+=2):(K=r,ct===0&&Ct(zn)),K!==r&&(Dt=L,K=On()),L=K,L===r&&(L=j,t.charCodeAt(j)===92?(K=Li,j++):(K=r,ct===0&&Ct(Mn)),K!==r?(_i.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(rr)),re!==r?(Dt=L,K=Oe(re),L=K):(j=L,L=r)):(j=L,L=r)),L}function ln(){var L,K,re;for(L=j,K=[],re=Ao(),re===r&&(Dn.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(oo)));re!==r;)K.push(re),re=Ao(),re===r&&(Dn.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(oo)));return K!==r&&(Dt=L,K=Ms(K)),L=K,L}function Ao(){var L,K,re;return L=j,t.substr(j,2)===ii?(K=ii,j+=2):(K=r,ct===0&&Ct(Ua)),K!==r&&(Dt=L,K=hr()),L=K,L===r&&(L=j,t.substr(j,2)===Ac?(K=Ac,j+=2):(K=r,ct===0&&Ct(Au)),K!==r&&(Dt=L,K=fc()),L=K,L===r&&(L=j,t.charCodeAt(j)===92?(K=Li,j++):(K=r,ct===0&&Ct(Mn)),K!==r?(Cl.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(DA)),re!==r?(Dt=L,K=fu(),L=K):(j=L,L=r)):(j=L,L=r),L===r&&(L=j,t.substr(j,2)===Ce?(K=Ce,j+=2):(K=r,ct===0&&Ct(Rt)),K!==r&&(Dt=L,K=pc()),L=K,L===r&&(L=j,t.substr(j,2)===Hi?(K=Hi,j+=2):(K=r,ct===0&&Ct(pu)),K!==r&&(Dt=L,K=Yt()),L=K,L===r&&(L=j,t.substr(j,2)===wl?(K=wl,j+=2):(K=r,ct===0&&Ct(PA)),K!==r&&(Dt=L,K=Ap()),L=K,L===r&&(L=j,t.substr(j,2)===hc?(K=hc,j+=2):(K=r,ct===0&&Ct(SA)),K!==r&&(Dt=L,K=Qn()),L=K,L===r&&(L=j,t.substr(j,2)===hi?(K=hi,j+=2):(K=r,ct===0&&Ct(gc)),K!==r&&(Dt=L,K=bA()),L=K,L===r&&(L=j,t.charCodeAt(j)===92?(K=Li,j++):(K=r,ct===0&&Ct(Mn)),K!==r?(sa.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(Ni)),re!==r?(Dt=L,K=Oe(re),L=K):(j=L,L=r)):(j=L,L=r),L===r&&(L=OA()))))))))),L}function OA(){var L,K,re,pe,Je,mt,fr,Cr,yn,oi,Oi,Bg;return L=j,t.charCodeAt(j)===92?(K=Li,j++):(K=r,ct===0&&Ct(Mn)),K!==r?(re=ja(),re!==r?(Dt=L,K=_o(re),L=K):(j=L,L=r)):(j=L,L=r),L===r&&(L=j,t.substr(j,2)===Ze?(K=Ze,j+=2):(K=r,ct===0&&Ct(lo)),K!==r?(re=j,pe=j,Je=ja(),Je!==r?(mt=si(),mt!==r?(Je=[Je,mt],pe=Je):(j=pe,pe=r)):(j=pe,pe=r),pe===r&&(pe=ja()),pe!==r?re=t.substring(re,j):re=pe,re!==r?(Dt=L,K=_o(re),L=K):(j=L,L=r)):(j=L,L=r),L===r&&(L=j,t.substr(j,2)===dc?(K=dc,j+=2):(K=r,ct===0&&Ct(hu)),K!==r?(re=j,pe=j,Je=si(),Je!==r?(mt=si(),mt!==r?(fr=si(),fr!==r?(Cr=si(),Cr!==r?(Je=[Je,mt,fr,Cr],pe=Je):(j=pe,pe=r)):(j=pe,pe=r)):(j=pe,pe=r)):(j=pe,pe=r),pe!==r?re=t.substring(re,j):re=pe,re!==r?(Dt=L,K=_o(re),L=K):(j=L,L=r)):(j=L,L=r),L===r&&(L=j,t.substr(j,2)===qi?(K=qi,j+=2):(K=r,ct===0&&Ct(gu)),K!==r?(re=j,pe=j,Je=si(),Je!==r?(mt=si(),mt!==r?(fr=si(),fr!==r?(Cr=si(),Cr!==r?(yn=si(),yn!==r?(oi=si(),oi!==r?(Oi=si(),Oi!==r?(Bg=si(),Bg!==r?(Je=[Je,mt,fr,Cr,yn,oi,Oi,Bg],pe=Je):(j=pe,pe=r)):(j=pe,pe=r)):(j=pe,pe=r)):(j=pe,pe=r)):(j=pe,pe=r)):(j=pe,pe=r)):(j=pe,pe=r)):(j=pe,pe=r),pe!==r?re=t.substring(re,j):re=pe,re!==r?(Dt=L,K=xA(re),L=K):(j=L,L=r)):(j=L,L=r)))),L}function ja(){var L;return Ha.test(t.charAt(j))?(L=t.charAt(j),j++):(L=r,ct===0&&Ct(mc)),L}function si(){var L;return hs.test(t.charAt(j))?(L=t.charAt(j),j++):(L=r,ct===0&&Ct(Ht)),L}function pa(){var L,K,re,pe,Je;if(L=j,K=[],re=j,t.charCodeAt(j)===92?(pe=Li,j++):(pe=r,ct===0&&Ct(Mn)),pe!==r?(t.length>j?(Je=t.charAt(j),j++):(Je=r,ct===0&&Ct(Fn)),Je!==r?(Dt=re,pe=Oe(Je),re=pe):(j=re,re=r)):(j=re,re=r),re===r&&(re=j,t.substr(j,2)===Ci?(pe=Ci,j+=2):(pe=r,ct===0&&Ct(oa)),pe!==r&&(Dt=re,pe=co()),re=pe,re===r&&(re=j,pe=j,ct++,Je=Rm(),ct--,Je===r?pe=void 0:(j=pe,pe=r),pe!==r?(t.length>j?(Je=t.charAt(j),j++):(Je=r,ct===0&&Ct(Fn)),Je!==r?(Dt=re,pe=Oe(Je),re=pe):(j=re,re=r)):(j=re,re=r))),re!==r)for(;re!==r;)K.push(re),re=j,t.charCodeAt(j)===92?(pe=Li,j++):(pe=r,ct===0&&Ct(Mn)),pe!==r?(t.length>j?(Je=t.charAt(j),j++):(Je=r,ct===0&&Ct(Fn)),Je!==r?(Dt=re,pe=Oe(Je),re=pe):(j=re,re=r)):(j=re,re=r),re===r&&(re=j,t.substr(j,2)===Ci?(pe=Ci,j+=2):(pe=r,ct===0&&Ct(oa)),pe!==r&&(Dt=re,pe=co()),re=pe,re===r&&(re=j,pe=j,ct++,Je=Rm(),ct--,Je===r?pe=void 0:(j=pe,pe=r),pe!==r?(t.length>j?(Je=t.charAt(j),j++):(Je=r,ct===0&&Ct(Fn)),Je!==r?(Dt=re,pe=Oe(Je),re=pe):(j=re,re=r)):(j=re,re=r)));else K=r;return K!==r&&(Dt=L,K=Ms(K)),L=K,L}function Dc(){var L,K,re,pe,Je,mt;if(L=j,t.charCodeAt(j)===45?(K=Us,j++):(K=r,ct===0&&Ct(aa)),K===r&&(t.charCodeAt(j)===43?(K=la,j++):(K=r,ct===0&&Ct(Ho))),K===r&&(K=null),K!==r){if(re=[],Ve.test(t.charAt(j))?(pe=t.charAt(j),j++):(pe=r,ct===0&&Ct(qe)),pe!==r)for(;pe!==r;)re.push(pe),Ve.test(t.charAt(j))?(pe=t.charAt(j),j++):(pe=r,ct===0&&Ct(qe));else re=r;if(re!==r)if(t.charCodeAt(j)===46?(pe=wi,j++):(pe=r,ct===0&&Ct(gs)),pe!==r){if(Je=[],Ve.test(t.charAt(j))?(mt=t.charAt(j),j++):(mt=r,ct===0&&Ct(qe)),mt!==r)for(;mt!==r;)Je.push(mt),Ve.test(t.charAt(j))?(mt=t.charAt(j),j++):(mt=r,ct===0&&Ct(qe));else Je=r;Je!==r?(Dt=L,K=ds(K,re,Je),L=K):(j=L,L=r)}else j=L,L=r;else j=L,L=r}else j=L,L=r;if(L===r){if(L=j,t.charCodeAt(j)===45?(K=Us,j++):(K=r,ct===0&&Ct(aa)),K===r&&(t.charCodeAt(j)===43?(K=la,j++):(K=r,ct===0&&Ct(Ho))),K===r&&(K=null),K!==r){if(re=[],Ve.test(t.charAt(j))?(pe=t.charAt(j),j++):(pe=r,ct===0&&Ct(qe)),pe!==r)for(;pe!==r;)re.push(pe),Ve.test(t.charAt(j))?(pe=t.charAt(j),j++):(pe=r,ct===0&&Ct(qe));else re=r;re!==r?(Dt=L,K=ms(K,re),L=K):(j=L,L=r)}else j=L,L=r;if(L===r&&(L=j,K=Pc(),K!==r&&(Dt=L,K=_s(K)),L=K,L===r&&(L=j,K=Ya(),K!==r&&(Dt=L,K=Un(K)),L=K,L===r)))if(L=j,t.charCodeAt(j)===40?(K=Pe,j++):(K=r,ct===0&&Ct(ce)),K!==r){for(re=[],pe=Qt();pe!==r;)re.push(pe),pe=Qt();if(re!==r)if(pe=ts(),pe!==r){for(Je=[],mt=Qt();mt!==r;)Je.push(mt),mt=Qt();Je!==r?(t.charCodeAt(j)===41?(mt=ne,j++):(mt=r,ct===0&&Ct(ee)),mt!==r?(Dt=L,K=Pn(pe),L=K):(j=L,L=r)):(j=L,L=r)}else j=L,L=r;else j=L,L=r}else j=L,L=r}return L}function vl(){var L,K,re,pe,Je,mt,fr,Cr;if(L=j,K=Dc(),K!==r){for(re=[],pe=j,Je=[],mt=Qt();mt!==r;)Je.push(mt),mt=Qt();if(Je!==r)if(t.charCodeAt(j)===42?(mt=ys,j++):(mt=r,ct===0&&Ct(We)),mt===r&&(t.charCodeAt(j)===47?(mt=tt,j++):(mt=r,ct===0&&Ct(It))),mt!==r){for(fr=[],Cr=Qt();Cr!==r;)fr.push(Cr),Cr=Qt();fr!==r?(Cr=Dc(),Cr!==r?(Dt=pe,Je=ir(K,mt,Cr),pe=Je):(j=pe,pe=r)):(j=pe,pe=r)}else j=pe,pe=r;else j=pe,pe=r;for(;pe!==r;){for(re.push(pe),pe=j,Je=[],mt=Qt();mt!==r;)Je.push(mt),mt=Qt();if(Je!==r)if(t.charCodeAt(j)===42?(mt=ys,j++):(mt=r,ct===0&&Ct(We)),mt===r&&(t.charCodeAt(j)===47?(mt=tt,j++):(mt=r,ct===0&&Ct(It))),mt!==r){for(fr=[],Cr=Qt();Cr!==r;)fr.push(Cr),Cr=Qt();fr!==r?(Cr=Dc(),Cr!==r?(Dt=pe,Je=ir(K,mt,Cr),pe=Je):(j=pe,pe=r)):(j=pe,pe=r)}else j=pe,pe=r;else j=pe,pe=r}re!==r?(Dt=L,K=$(K,re),L=K):(j=L,L=r)}else j=L,L=r;return L}function ts(){var L,K,re,pe,Je,mt,fr,Cr;if(L=j,K=vl(),K!==r){for(re=[],pe=j,Je=[],mt=Qt();mt!==r;)Je.push(mt),mt=Qt();if(Je!==r)if(t.charCodeAt(j)===43?(mt=la,j++):(mt=r,ct===0&&Ct(Ho)),mt===r&&(t.charCodeAt(j)===45?(mt=Us,j++):(mt=r,ct===0&&Ct(aa))),mt!==r){for(fr=[],Cr=Qt();Cr!==r;)fr.push(Cr),Cr=Qt();fr!==r?(Cr=vl(),Cr!==r?(Dt=pe,Je=ye(K,mt,Cr),pe=Je):(j=pe,pe=r)):(j=pe,pe=r)}else j=pe,pe=r;else j=pe,pe=r;for(;pe!==r;){for(re.push(pe),pe=j,Je=[],mt=Qt();mt!==r;)Je.push(mt),mt=Qt();if(Je!==r)if(t.charCodeAt(j)===43?(mt=la,j++):(mt=r,ct===0&&Ct(Ho)),mt===r&&(t.charCodeAt(j)===45?(mt=Us,j++):(mt=r,ct===0&&Ct(aa))),mt!==r){for(fr=[],Cr=Qt();Cr!==r;)fr.push(Cr),Cr=Qt();fr!==r?(Cr=vl(),Cr!==r?(Dt=pe,Je=ye(K,mt,Cr),pe=Je):(j=pe,pe=r)):(j=pe,pe=r)}else j=pe,pe=r;else j=pe,pe=r}re!==r?(Dt=L,K=$(K,re),L=K):(j=L,L=r)}else j=L,L=r;return L}function jr(){var L,K,re,pe,Je,mt;if(L=j,t.substr(j,3)===Ne?(K=Ne,j+=3):(K=r,ct===0&&Ct(pt)),K!==r){for(re=[],pe=Qt();pe!==r;)re.push(pe),pe=Qt();if(re!==r)if(pe=ts(),pe!==r){for(Je=[],mt=Qt();mt!==r;)Je.push(mt),mt=Qt();Je!==r?(t.substr(j,2)===ht?(mt=ht,j+=2):(mt=r,ct===0&&Ct(Tt)),mt!==r?(Dt=L,K=er(pe),L=K):(j=L,L=r)):(j=L,L=r)}else j=L,L=r;else j=L,L=r}else j=L,L=r;return L}function Cp(){var L,K,re,pe;return L=j,t.substr(j,2)===$r?(K=$r,j+=2):(K=r,ct===0&&Ct(Gi)),K!==r?(re=wu(),re!==r?(t.charCodeAt(j)===41?(pe=ne,j++):(pe=r,ct===0&&Ct(ee)),pe!==r?(Dt=L,K=es(re),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r),L}function Pc(){var L,K,re,pe,Je,mt;return L=j,t.substr(j,2)===bi?(K=bi,j+=2):(K=r,ct===0&&Ct(qo)),K!==r?(re=Ya(),re!==r?(t.substr(j,2)===kA?(pe=kA,j+=2):(pe=r,ct===0&&Ct(QA)),pe!==r?(Je=LA(),Je!==r?(t.charCodeAt(j)===125?(mt=H,j++):(mt=r,ct===0&&Ct(at)),mt!==r?(Dt=L,K=fp(re,Je),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r)):(j=L,L=r)):(j=L,L=r),L===r&&(L=j,t.substr(j,2)===bi?(K=bi,j+=2):(K=r,ct===0&&Ct(qo)),K!==r?(re=Ya(),re!==r?(t.substr(j,3)===sg?(pe=sg,j+=3):(pe=r,ct===0&&Ct(du)),pe!==r?(Dt=L,K=og(re),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r),L===r&&(L=j,t.substr(j,2)===bi?(K=bi,j+=2):(K=r,ct===0&&Ct(qo)),K!==r?(re=Ya(),re!==r?(t.substr(j,2)===mu?(pe=mu,j+=2):(pe=r,ct===0&&Ct(uo)),pe!==r?(Je=LA(),Je!==r?(t.charCodeAt(j)===125?(mt=H,j++):(mt=r,ct===0&&Ct(at)),mt!==r?(Dt=L,K=FA(re,Je),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r)):(j=L,L=r)):(j=L,L=r),L===r&&(L=j,t.substr(j,2)===bi?(K=bi,j+=2):(K=r,ct===0&&Ct(qo)),K!==r?(re=Ya(),re!==r?(t.substr(j,3)===yc?(pe=yc,j+=3):(pe=r,ct===0&&Ct(ca)),pe!==r?(Dt=L,K=ag(re),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r),L===r&&(L=j,t.substr(j,2)===bi?(K=bi,j+=2):(K=r,ct===0&&Ct(qo)),K!==r?(re=Ya(),re!==r?(t.charCodeAt(j)===125?(pe=H,j++):(pe=r,ct===0&&Ct(at)),pe!==r?(Dt=L,K=Ec(re),L=K):(j=L,L=r)):(j=L,L=r)):(j=L,L=r),L===r&&(L=j,t.charCodeAt(j)===36?(K=Sm,j++):(K=r,ct===0&&Ct(lg)),K!==r?(re=Ya(),re!==r?(Dt=L,K=Ec(re),L=K):(j=L,L=r)):(j=L,L=r)))))),L}function Cw(){var L,K,re;return L=j,K=Cg(),K!==r?(Dt=j,re=ei(K),re?re=void 0:re=r,re!==r?(Dt=L,K=pp(K),L=K):(j=L,L=r)):(j=L,L=r),L}function Cg(){var L,K,re,pe,Je;if(L=j,K=[],re=j,pe=j,ct++,Je=Ig(),ct--,Je===r?pe=void 0:(j=pe,pe=r),pe!==r?(t.length>j?(Je=t.charAt(j),j++):(Je=r,ct===0&&Ct(Fn)),Je!==r?(Dt=re,pe=Oe(Je),re=pe):(j=re,re=r)):(j=re,re=r),re!==r)for(;re!==r;)K.push(re),re=j,pe=j,ct++,Je=Ig(),ct--,Je===r?pe=void 0:(j=pe,pe=r),pe!==r?(t.length>j?(Je=t.charAt(j),j++):(Je=r,ct===0&&Ct(Fn)),Je!==r?(Dt=re,pe=Oe(Je),re=pe):(j=re,re=r)):(j=re,re=r);else K=r;return K!==r&&(Dt=L,K=Ms(K)),L=K,L}function wg(){var L,K,re;if(L=j,K=[],cg.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(RA)),re!==r)for(;re!==r;)K.push(re),cg.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(RA));else K=r;return K!==r&&(Dt=L,K=Hs()),L=K,L}function Ya(){var L,K,re;if(L=j,K=[],yu.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(qa)),re!==r)for(;re!==r;)K.push(re),yu.test(t.charAt(j))?(re=t.charAt(j),j++):(re=r,ct===0&&Ct(qa));else K=r;return K!==r&&(Dt=L,K=Hs()),L=K,L}function Rm(){var L;return ji.test(t.charAt(j))?(L=t.charAt(j),j++):(L=r,ct===0&&Ct(ua)),L}function Ig(){var L;return Eu.test(t.charAt(j))?(L=t.charAt(j),j++):(L=r,ct===0&&Ct(Es)),L}function Qt(){var L,K;if(L=[],Cc.test(t.charAt(j))?(K=t.charAt(j),j++):(K=r,ct===0&&Ct(wc)),K!==r)for(;K!==r;)L.push(K),Cc.test(t.charAt(j))?(K=t.charAt(j),j++):(K=r,ct===0&&Ct(wc));else L=r;return L}if(Cu=a(),Cu!==r&&j===t.length)return Cu;throw Cu!==r&&j!1}){try{return(0,$Y.parse)(t,e)}catch(r){throw r.location&&(r.message=r.message.replace(/(\.)?$/,` (line ${r.location.start.line}, column ${r.location.start.column})$1`)),r}}function cy(t,{endSemicolon:e=!1}={}){return t.map(({command:r,type:o},a)=>`${ND(r)}${o===";"?a!==t.length-1||e?";":"":" &"}`).join(" ")}function ND(t){return`${uy(t.chain)}${t.then?` ${oT(t.then)}`:""}`}function oT(t){return`${t.type} ${ND(t.line)}`}function uy(t){return`${lT(t)}${t.then?` ${aT(t.then)}`:""}`}function aT(t){return`${t.type} ${uy(t.chain)}`}function lT(t){switch(t.type){case"command":return`${t.envs.length>0?`${t.envs.map(e=>TD(e)).join(" ")} `:""}${t.args.map(e=>cT(e)).join(" ")}`;case"subshell":return`(${cy(t.subshell)})${t.args.length>0?` ${t.args.map(e=>Vw(e)).join(" ")}`:""}`;case"group":return`{ ${cy(t.group,{endSemicolon:!0})} }${t.args.length>0?` ${t.args.map(e=>Vw(e)).join(" ")}`:""}`;case"envs":return t.envs.map(e=>TD(e)).join(" ");default:throw new Error(`Unsupported command type: "${t.type}"`)}}function TD(t){return`${t.name}=${t.args[0]?Wg(t.args[0]):""}`}function cT(t){switch(t.type){case"redirection":return Vw(t);case"argument":return Wg(t);default:throw new Error(`Unsupported argument type: "${t.type}"`)}}function Vw(t){return`${t.subtype} ${t.args.map(e=>Wg(e)).join(" ")}`}function Wg(t){return t.segments.map(e=>uT(e)).join("")}function uT(t){let e=(o,a)=>a?`"${o}"`:o,r=o=>o===""?"''":o.match(/[()}<>$|&;"'\n\t ]/)?o.match(/['\t\p{C}]/u)?o.match(/'/)?`"${o.replace(/["$\t\p{C}]/u,p8e)}"`:`$'${o.replace(/[\t\p{C}]/u,tW)}'`:`'${o}'`:o;switch(t.type){case"text":return r(t.text);case"glob":return t.pattern;case"shell":return e(`$(${cy(t.shell)})`,t.quoted);case"variable":return e(typeof t.defaultValue>"u"?typeof t.alternativeValue>"u"?`\${${t.name}}`:t.alternativeValue.length===0?`\${${t.name}:+}`:`\${${t.name}:+${t.alternativeValue.map(o=>Wg(o)).join(" ")}}`:t.defaultValue.length===0?`\${${t.name}:-}`:`\${${t.name}:-${t.defaultValue.map(o=>Wg(o)).join(" ")}}`,t.quoted);case"arithmetic":return`$(( ${OD(t.arithmetic)} ))`;default:throw new Error(`Unsupported argument segment type: "${t.type}"`)}}function OD(t){let e=a=>{switch(a){case"addition":return"+";case"subtraction":return"-";case"multiplication":return"*";case"division":return"/";default:throw new Error(`Can't extract operator from arithmetic expression of type "${a}"`)}},r=(a,n)=>n?`( ${a} )`:a,o=a=>r(OD(a),!["number","variable"].includes(a.type));switch(t.type){case"number":return String(t.value);case"variable":return t.name;default:return`${o(t.left)} ${e(t.type)} ${o(t.right)}`}}var $Y,eW,f8e,tW,p8e,rW=Et(()=>{$Y=$e(ZY());eW=new Map([["\f","\\f"],[` `,"\\n"],["\r","\\r"],[" ","\\t"],["\v","\\v"],["\0","\\0"]]),f8e=new Map([["\\","\\\\"],["$","\\$"],['"','\\"'],...Array.from(eW,([t,e])=>[t,`"$'${e}'"`])]),tW=t=>eW.get(t)??`\\x${t.charCodeAt(0).toString(16).padStart(2,"0")}`,p8e=t=>f8e.get(t)??`"$'${tW(t)}'"`});var iW=_((Lbt,nW)=>{"use strict";function h8e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Kg(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Kg)}h8e(Kg,Error);Kg.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",I;for(I=0;I0){for(I=1,v=1;Ife&&(fe=V,ue=[]),ue.push(qe))}function at(qe,b){return new Kg(qe,null,null,b)}function Re(qe,b,w){return new Kg(Kg.buildMessage(qe,b),qe,b,w)}function ke(){var qe,b,w,S;return qe=V,b=xe(),b!==r?(t.charCodeAt(V)===47?(w=n,V++):(w=r,me===0&&H(u)),w!==r?(S=xe(),S!==r?(te=qe,b=A(b,S),qe=b):(V=qe,qe=r)):(V=qe,qe=r)):(V=qe,qe=r),qe===r&&(qe=V,b=xe(),b!==r&&(te=qe,b=p(b)),qe=b),qe}function xe(){var qe,b,w,S;return qe=V,b=He(),b!==r?(t.charCodeAt(V)===64?(w=h,V++):(w=r,me===0&&H(E)),w!==r?(S=Ve(),S!==r?(te=qe,b=I(b,S),qe=b):(V=qe,qe=r)):(V=qe,qe=r)):(V=qe,qe=r),qe===r&&(qe=V,b=He(),b!==r&&(te=qe,b=v(b)),qe=b),qe}function He(){var qe,b,w,S,y;return qe=V,t.charCodeAt(V)===64?(b=h,V++):(b=r,me===0&&H(E)),b!==r?(w=Te(),w!==r?(t.charCodeAt(V)===47?(S=n,V++):(S=r,me===0&&H(u)),S!==r?(y=Te(),y!==r?(te=qe,b=x(),qe=b):(V=qe,qe=r)):(V=qe,qe=r)):(V=qe,qe=r)):(V=qe,qe=r),qe===r&&(qe=V,b=Te(),b!==r&&(te=qe,b=x()),qe=b),qe}function Te(){var qe,b,w;if(qe=V,b=[],C.test(t.charAt(V))?(w=t.charAt(V),V++):(w=r,me===0&&H(R)),w!==r)for(;w!==r;)b.push(w),C.test(t.charAt(V))?(w=t.charAt(V),V++):(w=r,me===0&&H(R));else b=r;return b!==r&&(te=qe,b=x()),qe=b,qe}function Ve(){var qe,b,w;if(qe=V,b=[],N.test(t.charAt(V))?(w=t.charAt(V),V++):(w=r,me===0&&H(U)),w!==r)for(;w!==r;)b.push(w),N.test(t.charAt(V))?(w=t.charAt(V),V++):(w=r,me===0&&H(U));else b=r;return b!==r&&(te=qe,b=x()),qe=b,qe}if(he=a(),he!==r&&V===t.length)return he;throw he!==r&&V{sW=$e(iW())});var Vg=_((Obt,zg)=>{"use strict";function aW(t){return typeof t>"u"||t===null}function d8e(t){return typeof t=="object"&&t!==null}function m8e(t){return Array.isArray(t)?t:aW(t)?[]:[t]}function y8e(t,e){var r,o,a,n;if(e)for(n=Object.keys(e),r=0,o=n.length;r{"use strict";function Jw(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Jw.prototype=Object.create(Error.prototype);Jw.prototype.constructor=Jw;Jw.prototype.toString=function(e){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!e&&this.mark&&(r+=" "+this.mark.toString()),r};lW.exports=Jw});var AW=_((Ubt,uW)=>{"use strict";var cW=Vg();function AT(t,e,r,o,a){this.name=t,this.buffer=e,this.position=r,this.line=o,this.column=a}AT.prototype.getSnippet=function(e,r){var o,a,n,u,A;if(!this.buffer)return null;for(e=e||4,r=r||75,o="",a=this.position;a>0&&`\0\r \x85\u2028\u2029`.indexOf(this.buffer.charAt(a-1))===-1;)if(a-=1,this.position-a>r/2-1){o=" ... ",a+=5;break}for(n="",u=this.position;ur/2-1){n=" ... ",u-=5;break}return A=this.buffer.slice(a,u),cW.repeat(" ",e)+o+A+n+` `+cW.repeat(" ",e+this.position-a+o.length)+"^"};AT.prototype.toString=function(e){var r,o="";return this.name&&(o+='in "'+this.name+'" '),o+="at line "+(this.line+1)+", column "+(this.column+1),e||(r=this.getSnippet(),r&&(o+=`: `+r)),o};uW.exports=AT});var os=_((_bt,pW)=>{"use strict";var fW=Ay(),w8e=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],I8e=["scalar","sequence","mapping"];function B8e(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(o){e[String(o)]=r})}),e}function v8e(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(w8e.indexOf(r)===-1)throw new fW('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.defaultStyle=e.defaultStyle||null,this.styleAliases=B8e(e.styleAliases||null),I8e.indexOf(this.kind)===-1)throw new fW('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}pW.exports=v8e});var Jg=_((Hbt,gW)=>{"use strict";var hW=Vg(),_D=Ay(),D8e=os();function fT(t,e,r){var o=[];return t.include.forEach(function(a){r=fT(a,e,r)}),t[e].forEach(function(a){r.forEach(function(n,u){n.tag===a.tag&&n.kind===a.kind&&o.push(u)}),r.push(a)}),r.filter(function(a,n){return o.indexOf(n)===-1})}function P8e(){var t={scalar:{},sequence:{},mapping:{},fallback:{}},e,r;function o(a){t[a.kind][a.tag]=t.fallback[a.tag]=a}for(e=0,r=arguments.length;e{"use strict";var S8e=os();dW.exports=new S8e("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}})});var EW=_((Gbt,yW)=>{"use strict";var b8e=os();yW.exports=new b8e("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}})});var wW=_((jbt,CW)=>{"use strict";var x8e=os();CW.exports=new x8e("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}})});var HD=_((Ybt,IW)=>{"use strict";var k8e=Jg();IW.exports=new k8e({explicit:[mW(),EW(),wW()]})});var vW=_((Wbt,BW)=>{"use strict";var Q8e=os();function F8e(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function R8e(){return null}function T8e(t){return t===null}BW.exports=new Q8e("tag:yaml.org,2002:null",{kind:"scalar",resolve:F8e,construct:R8e,predicate:T8e,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var PW=_((Kbt,DW)=>{"use strict";var L8e=os();function N8e(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function O8e(t){return t==="true"||t==="True"||t==="TRUE"}function M8e(t){return Object.prototype.toString.call(t)==="[object Boolean]"}DW.exports=new L8e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:N8e,construct:O8e,predicate:M8e,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"})});var bW=_((zbt,SW)=>{"use strict";var U8e=Vg(),_8e=os();function H8e(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function q8e(t){return 48<=t&&t<=55}function G8e(t){return 48<=t&&t<=57}function j8e(t){if(t===null)return!1;var e=t.length,r=0,o=!1,a;if(!e)return!1;if(a=t[r],(a==="-"||a==="+")&&(a=t[++r]),a==="0"){if(r+1===e)return!0;if(a=t[++r],a==="b"){for(r++;r=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0"+t.toString(8):"-0"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var QW=_((Vbt,kW)=>{"use strict";var xW=Vg(),K8e=os(),z8e=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function V8e(t){return!(t===null||!z8e.test(t)||t[t.length-1]==="_")}function J8e(t){var e,r,o,a;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,a=[],"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:e.indexOf(":")>=0?(e.split(":").forEach(function(n){a.unshift(parseFloat(n,10))}),e=0,o=1,a.forEach(function(n){e+=n*o,o*=60}),r*e):r*parseFloat(e,10)}var X8e=/^[-+]?[0-9]+e/;function Z8e(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(xW.isNegativeZero(t))return"-0.0";return r=t.toString(10),X8e.test(r)?r.replace("e",".e"):r}function $8e(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||xW.isNegativeZero(t))}kW.exports=new K8e("tag:yaml.org,2002:float",{kind:"scalar",resolve:V8e,construct:J8e,predicate:$8e,represent:Z8e,defaultStyle:"lowercase"})});var pT=_((Jbt,FW)=>{"use strict";var eHe=Jg();FW.exports=new eHe({include:[HD()],implicit:[vW(),PW(),bW(),QW()]})});var hT=_((Xbt,RW)=>{"use strict";var tHe=Jg();RW.exports=new tHe({include:[pT()]})});var OW=_((Zbt,NW)=>{"use strict";var rHe=os(),TW=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),LW=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function nHe(t){return t===null?!1:TW.exec(t)!==null||LW.exec(t)!==null}function iHe(t){var e,r,o,a,n,u,A,p=0,h=null,E,I,v;if(e=TW.exec(t),e===null&&(e=LW.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],o=+e[2]-1,a=+e[3],!e[4])return new Date(Date.UTC(r,o,a));if(n=+e[4],u=+e[5],A=+e[6],e[7]){for(p=e[7].slice(0,3);p.length<3;)p+="0";p=+p}return e[9]&&(E=+e[10],I=+(e[11]||0),h=(E*60+I)*6e4,e[9]==="-"&&(h=-h)),v=new Date(Date.UTC(r,o,a,n,u,A,p)),h&&v.setTime(v.getTime()-h),v}function sHe(t){return t.toISOString()}NW.exports=new rHe("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:nHe,construct:iHe,instanceOf:Date,represent:sHe})});var UW=_(($bt,MW)=>{"use strict";var oHe=os();function aHe(t){return t==="<<"||t===null}MW.exports=new oHe("tag:yaml.org,2002:merge",{kind:"scalar",resolve:aHe})});var qW=_((ext,HW)=>{"use strict";var Xg;try{_W=ve,Xg=_W("buffer").Buffer}catch{}var _W,lHe=os(),gT=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= \r`;function cHe(t){if(t===null)return!1;var e,r,o=0,a=t.length,n=gT;for(r=0;r64)){if(e<0)return!1;o+=6}return o%8===0}function uHe(t){var e,r,o=t.replace(/[\r\n=]/g,""),a=o.length,n=gT,u=0,A=[];for(e=0;e>16&255),A.push(u>>8&255),A.push(u&255)),u=u<<6|n.indexOf(o.charAt(e));return r=a%4*6,r===0?(A.push(u>>16&255),A.push(u>>8&255),A.push(u&255)):r===18?(A.push(u>>10&255),A.push(u>>2&255)):r===12&&A.push(u>>4&255),Xg?Xg.from?Xg.from(A):new Xg(A):A}function AHe(t){var e="",r=0,o,a,n=t.length,u=gT;for(o=0;o>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]),r=(r<<8)+t[o];return a=n%3,a===0?(e+=u[r>>18&63],e+=u[r>>12&63],e+=u[r>>6&63],e+=u[r&63]):a===2?(e+=u[r>>10&63],e+=u[r>>4&63],e+=u[r<<2&63],e+=u[64]):a===1&&(e+=u[r>>2&63],e+=u[r<<4&63],e+=u[64],e+=u[64]),e}function fHe(t){return Xg&&Xg.isBuffer(t)}HW.exports=new lHe("tag:yaml.org,2002:binary",{kind:"scalar",resolve:cHe,construct:uHe,predicate:fHe,represent:AHe})});var jW=_((rxt,GW)=>{"use strict";var pHe=os(),hHe=Object.prototype.hasOwnProperty,gHe=Object.prototype.toString;function dHe(t){if(t===null)return!0;var e=[],r,o,a,n,u,A=t;for(r=0,o=A.length;r{"use strict";var yHe=os(),EHe=Object.prototype.toString;function CHe(t){if(t===null)return!0;var e,r,o,a,n,u=t;for(n=new Array(u.length),e=0,r=u.length;e{"use strict";var IHe=os(),BHe=Object.prototype.hasOwnProperty;function vHe(t){if(t===null)return!0;var e,r=t;for(e in r)if(BHe.call(r,e)&&r[e]!==null)return!1;return!0}function DHe(t){return t!==null?t:{}}KW.exports=new IHe("tag:yaml.org,2002:set",{kind:"mapping",resolve:vHe,construct:DHe})});var py=_((sxt,VW)=>{"use strict";var PHe=Jg();VW.exports=new PHe({include:[hT()],implicit:[OW(),UW()],explicit:[qW(),jW(),WW(),zW()]})});var XW=_((oxt,JW)=>{"use strict";var SHe=os();function bHe(){return!0}function xHe(){}function kHe(){return""}function QHe(t){return typeof t>"u"}JW.exports=new SHe("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:bHe,construct:xHe,predicate:QHe,represent:kHe})});var $W=_((axt,ZW)=>{"use strict";var FHe=os();function RHe(t){if(t===null||t.length===0)return!1;var e=t,r=/\/([gim]*)$/.exec(t),o="";return!(e[0]==="/"&&(r&&(o=r[1]),o.length>3||e[e.length-o.length-1]!=="/"))}function THe(t){var e=t,r=/\/([gim]*)$/.exec(t),o="";return e[0]==="/"&&(r&&(o=r[1]),e=e.slice(1,e.length-o.length-1)),new RegExp(e,o)}function LHe(t){var e="/"+t.source+"/";return t.global&&(e+="g"),t.multiline&&(e+="m"),t.ignoreCase&&(e+="i"),e}function NHe(t){return Object.prototype.toString.call(t)==="[object RegExp]"}ZW.exports=new FHe("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:RHe,construct:THe,predicate:NHe,represent:LHe})});var rK=_((lxt,tK)=>{"use strict";var qD;try{eK=ve,qD=eK("esprima")}catch{typeof window<"u"&&(qD=window.esprima)}var eK,OHe=os();function MHe(t){if(t===null)return!1;try{var e="("+t+")",r=qD.parse(e,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch{return!1}}function UHe(t){var e="("+t+")",r=qD.parse(e,{range:!0}),o=[],a;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(n){o.push(n.name)}),a=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(o,e.slice(a[0]+1,a[1]-1)):new Function(o,"return "+e.slice(a[0],a[1]))}function _He(t){return t.toString()}function HHe(t){return Object.prototype.toString.call(t)==="[object Function]"}tK.exports=new OHe("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:MHe,construct:UHe,predicate:HHe,represent:_He})});var Xw=_((uxt,iK)=>{"use strict";var nK=Jg();iK.exports=nK.DEFAULT=new nK({include:[py()],explicit:[XW(),$W(),rK()]})});var BK=_((Axt,Zw)=>{"use strict";var yf=Vg(),AK=Ay(),qHe=AW(),fK=py(),GHe=Xw(),Wp=Object.prototype.hasOwnProperty,GD=1,pK=2,hK=3,jD=4,dT=1,jHe=2,sK=3,YHe=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,WHe=/[\x85\u2028\u2029]/,KHe=/[,\[\]\{\}]/,gK=/^(?:!|!!|![a-z\-]+!)$/i,dK=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function oK(t){return Object.prototype.toString.call(t)}function qu(t){return t===10||t===13}function $g(t){return t===9||t===32}function Ia(t){return t===9||t===32||t===10||t===13}function hy(t){return t===44||t===91||t===93||t===123||t===125}function zHe(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function VHe(t){return t===120?2:t===117?4:t===85?8:0}function JHe(t){return 48<=t&&t<=57?t-48:-1}function aK(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?` `:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"\x85":t===95?"\xA0":t===76?"\u2028":t===80?"\u2029":""}function XHe(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var mK=new Array(256),yK=new Array(256);for(Zg=0;Zg<256;Zg++)mK[Zg]=aK(Zg)?1:0,yK[Zg]=aK(Zg);var Zg;function ZHe(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||GHe,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function EK(t,e){return new AK(e,new qHe(t.filename,t.input,t.position,t.line,t.position-t.lineStart))}function Sr(t,e){throw EK(t,e)}function YD(t,e){t.onWarning&&t.onWarning.call(null,EK(t,e))}var lK={YAML:function(e,r,o){var a,n,u;e.version!==null&&Sr(e,"duplication of %YAML directive"),o.length!==1&&Sr(e,"YAML directive accepts exactly one argument"),a=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),a===null&&Sr(e,"ill-formed argument of the YAML directive"),n=parseInt(a[1],10),u=parseInt(a[2],10),n!==1&&Sr(e,"unacceptable YAML version of the document"),e.version=o[0],e.checkLineBreaks=u<2,u!==1&&u!==2&&YD(e,"unsupported YAML version of the document")},TAG:function(e,r,o){var a,n;o.length!==2&&Sr(e,"TAG directive accepts exactly two arguments"),a=o[0],n=o[1],gK.test(a)||Sr(e,"ill-formed tag handle (first argument) of the TAG directive"),Wp.call(e.tagMap,a)&&Sr(e,'there is a previously declared suffix for "'+a+'" tag handle'),dK.test(n)||Sr(e,"ill-formed tag prefix (second argument) of the TAG directive"),e.tagMap[a]=n}};function Yp(t,e,r,o){var a,n,u,A;if(e1&&(t.result+=yf.repeat(` `,e-1))}function $He(t,e,r){var o,a,n,u,A,p,h,E,I=t.kind,v=t.result,x;if(x=t.input.charCodeAt(t.position),Ia(x)||hy(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(a=t.input.charCodeAt(t.position+1),Ia(a)||r&&hy(a)))return!1;for(t.kind="scalar",t.result="",n=u=t.position,A=!1;x!==0;){if(x===58){if(a=t.input.charCodeAt(t.position+1),Ia(a)||r&&hy(a))break}else if(x===35){if(o=t.input.charCodeAt(t.position-1),Ia(o))break}else{if(t.position===t.lineStart&&WD(t)||r&&hy(x))break;if(qu(x))if(p=t.line,h=t.lineStart,E=t.lineIndent,Wi(t,!1,-1),t.lineIndent>=e){A=!0,x=t.input.charCodeAt(t.position);continue}else{t.position=u,t.line=p,t.lineStart=h,t.lineIndent=E;break}}A&&(Yp(t,n,u,!1),yT(t,t.line-p),n=u=t.position,A=!1),$g(x)||(u=t.position+1),x=t.input.charCodeAt(++t.position)}return Yp(t,n,u,!1),t.result?!0:(t.kind=I,t.result=v,!1)}function e6e(t,e){var r,o,a;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,o=a=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(Yp(t,o,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)o=t.position,t.position++,a=t.position;else return!0;else qu(r)?(Yp(t,o,a,!0),yT(t,Wi(t,!1,e)),o=a=t.position):t.position===t.lineStart&&WD(t)?Sr(t,"unexpected end of the document within a single quoted scalar"):(t.position++,a=t.position);Sr(t,"unexpected end of the stream within a single quoted scalar")}function t6e(t,e){var r,o,a,n,u,A;if(A=t.input.charCodeAt(t.position),A!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=o=t.position;(A=t.input.charCodeAt(t.position))!==0;){if(A===34)return Yp(t,r,t.position,!0),t.position++,!0;if(A===92){if(Yp(t,r,t.position,!0),A=t.input.charCodeAt(++t.position),qu(A))Wi(t,!1,e);else if(A<256&&mK[A])t.result+=yK[A],t.position++;else if((u=VHe(A))>0){for(a=u,n=0;a>0;a--)A=t.input.charCodeAt(++t.position),(u=zHe(A))>=0?n=(n<<4)+u:Sr(t,"expected hexadecimal character");t.result+=XHe(n),t.position++}else Sr(t,"unknown escape sequence");r=o=t.position}else qu(A)?(Yp(t,r,o,!0),yT(t,Wi(t,!1,e)),r=o=t.position):t.position===t.lineStart&&WD(t)?Sr(t,"unexpected end of the document within a double quoted scalar"):(t.position++,o=t.position)}Sr(t,"unexpected end of the stream within a double quoted scalar")}function r6e(t,e){var r=!0,o,a=t.tag,n,u=t.anchor,A,p,h,E,I,v={},x,C,R,N;if(N=t.input.charCodeAt(t.position),N===91)p=93,I=!1,n=[];else if(N===123)p=125,I=!0,n={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=n),N=t.input.charCodeAt(++t.position);N!==0;){if(Wi(t,!0,e),N=t.input.charCodeAt(t.position),N===p)return t.position++,t.tag=a,t.anchor=u,t.kind=I?"mapping":"sequence",t.result=n,!0;r||Sr(t,"missed comma between flow collection entries"),C=x=R=null,h=E=!1,N===63&&(A=t.input.charCodeAt(t.position+1),Ia(A)&&(h=E=!0,t.position++,Wi(t,!0,e))),o=t.line,dy(t,e,GD,!1,!0),C=t.tag,x=t.result,Wi(t,!0,e),N=t.input.charCodeAt(t.position),(E||t.line===o)&&N===58&&(h=!0,N=t.input.charCodeAt(++t.position),Wi(t,!0,e),dy(t,e,GD,!1,!0),R=t.result),I?gy(t,n,v,C,x,R):h?n.push(gy(t,null,v,C,x,R)):n.push(x),Wi(t,!0,e),N=t.input.charCodeAt(t.position),N===44?(r=!0,N=t.input.charCodeAt(++t.position)):r=!1}Sr(t,"unexpected end of the stream within a flow collection")}function n6e(t,e){var r,o,a=dT,n=!1,u=!1,A=e,p=0,h=!1,E,I;if(I=t.input.charCodeAt(t.position),I===124)o=!1;else if(I===62)o=!0;else return!1;for(t.kind="scalar",t.result="";I!==0;)if(I=t.input.charCodeAt(++t.position),I===43||I===45)dT===a?a=I===43?sK:jHe:Sr(t,"repeat of a chomping mode identifier");else if((E=JHe(I))>=0)E===0?Sr(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):u?Sr(t,"repeat of an indentation width identifier"):(A=e+E-1,u=!0);else break;if($g(I)){do I=t.input.charCodeAt(++t.position);while($g(I));if(I===35)do I=t.input.charCodeAt(++t.position);while(!qu(I)&&I!==0)}for(;I!==0;){for(mT(t),t.lineIndent=0,I=t.input.charCodeAt(t.position);(!u||t.lineIndentA&&(A=t.lineIndent),qu(I)){p++;continue}if(t.lineIndente)&&p!==0)Sr(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(dy(t,e,jD,!0,a)&&(C?v=t.result:x=t.result),C||(gy(t,h,E,I,v,x,n,u),I=v=x=null),Wi(t,!0,-1),N=t.input.charCodeAt(t.position)),t.lineIndent>e&&N!==0)Sr(t,"bad indentation of a mapping entry");else if(t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndente?p=1:t.lineIndent===e?p=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),I=0,v=t.implicitTypes.length;I tag; it should be "'+x.kind+'", not "'+t.kind+'"'),x.resolve(t.result)?(t.result=x.construct(t.result),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Sr(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")):Sr(t,"unknown tag !<"+t.tag+">");return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||E}function l6e(t){var e=t.position,r,o,a,n=!1,u;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap={},t.anchorMap={};(u=t.input.charCodeAt(t.position))!==0&&(Wi(t,!0,-1),u=t.input.charCodeAt(t.position),!(t.lineIndent>0||u!==37));){for(n=!0,u=t.input.charCodeAt(++t.position),r=t.position;u!==0&&!Ia(u);)u=t.input.charCodeAt(++t.position);for(o=t.input.slice(r,t.position),a=[],o.length<1&&Sr(t,"directive name must not be less than one character in length");u!==0;){for(;$g(u);)u=t.input.charCodeAt(++t.position);if(u===35){do u=t.input.charCodeAt(++t.position);while(u!==0&&!qu(u));break}if(qu(u))break;for(r=t.position;u!==0&&!Ia(u);)u=t.input.charCodeAt(++t.position);a.push(t.input.slice(r,t.position))}u!==0&&mT(t),Wp.call(lK,o)?lK[o](t,o,a):YD(t,'unknown document directive "'+o+'"')}if(Wi(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,Wi(t,!0,-1)):n&&Sr(t,"directives end mark is expected"),dy(t,t.lineIndent-1,jD,!1,!0),Wi(t,!0,-1),t.checkLineBreaks&&WHe.test(t.input.slice(e,t.position))&&YD(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&WD(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,Wi(t,!0,-1));return}if(t.position"u"&&(r=e,e=null);var o=CK(t,r);if(typeof e!="function")return o;for(var a=0,n=o.length;a"u"&&(r=e,e=null),wK(t,e,yf.extend({schema:fK},r))}function u6e(t,e){return IK(t,yf.extend({schema:fK},e))}Zw.exports.loadAll=wK;Zw.exports.load=IK;Zw.exports.safeLoadAll=c6e;Zw.exports.safeLoad=u6e});var WK=_((fxt,IT)=>{"use strict";var eI=Vg(),tI=Ay(),A6e=Xw(),f6e=py(),QK=Object.prototype.toString,FK=Object.prototype.hasOwnProperty,p6e=9,$w=10,h6e=13,g6e=32,d6e=33,m6e=34,RK=35,y6e=37,E6e=38,C6e=39,w6e=42,TK=44,I6e=45,LK=58,B6e=61,v6e=62,D6e=63,P6e=64,NK=91,OK=93,S6e=96,MK=123,b6e=124,UK=125,vo={};vo[0]="\\0";vo[7]="\\a";vo[8]="\\b";vo[9]="\\t";vo[10]="\\n";vo[11]="\\v";vo[12]="\\f";vo[13]="\\r";vo[27]="\\e";vo[34]='\\"';vo[92]="\\\\";vo[133]="\\N";vo[160]="\\_";vo[8232]="\\L";vo[8233]="\\P";var x6e=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function k6e(t,e){var r,o,a,n,u,A,p;if(e===null)return{};for(r={},o=Object.keys(e),a=0,n=o.length;a0?t.charCodeAt(n-1):null,v=v&&PK(u,A)}else{for(n=0;no&&t[I+1]!==" ",I=n);else if(!my(u))return KD;A=n>0?t.charCodeAt(n-1):null,v=v&&PK(u,A)}h=h||E&&n-I-1>o&&t[I+1]!==" "}return!p&&!h?v&&!a(t)?HK:qK:r>9&&_K(t)?KD:h?jK:GK}function N6e(t,e,r,o){t.dump=function(){if(e.length===0)return"''";if(!t.noCompatMode&&x6e.indexOf(e)!==-1)return"'"+e+"'";var a=t.indent*Math.max(1,r),n=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-a),u=o||t.flowLevel>-1&&r>=t.flowLevel;function A(p){return F6e(t,p)}switch(L6e(e,u,t.indent,n,A)){case HK:return e;case qK:return"'"+e.replace(/'/g,"''")+"'";case GK:return"|"+SK(e,t.indent)+bK(DK(e,a));case jK:return">"+SK(e,t.indent)+bK(DK(O6e(e,n),a));case KD:return'"'+M6e(e,n)+'"';default:throw new tI("impossible error: invalid scalar style")}}()}function SK(t,e){var r=_K(t)?String(e):"",o=t[t.length-1]===` `,a=o&&(t[t.length-2]===` `||t===` `),n=a?"+":o?"":"-";return r+n+` `}function bK(t){return t[t.length-1]===` `?t.slice(0,-1):t}function O6e(t,e){for(var r=/(\n+)([^\n]*)/g,o=function(){var h=t.indexOf(` `);return h=h!==-1?h:t.length,r.lastIndex=h,xK(t.slice(0,h),e)}(),a=t[0]===` `||t[0]===" ",n,u;u=r.exec(t);){var A=u[1],p=u[2];n=p[0]===" ",o+=A+(!a&&!n&&p!==""?` `:"")+xK(p,e),a=n}return o}function xK(t,e){if(t===""||t[0]===" ")return t;for(var r=/ [^ ]/g,o,a=0,n,u=0,A=0,p="";o=r.exec(t);)A=o.index,A-a>e&&(n=u>a?u:A,p+=` `+t.slice(a,n),a=n+1),u=A;return p+=` `,t.length-a>e&&u>a?p+=t.slice(a,u)+` `+t.slice(u+1):p+=t.slice(a),p.slice(1)}function M6e(t){for(var e="",r,o,a,n=0;n=55296&&r<=56319&&(o=t.charCodeAt(n+1),o>=56320&&o<=57343)){e+=vK((r-55296)*1024+o-56320+65536),n++;continue}a=vo[r],e+=!a&&my(r)?t[n]:a||vK(r)}return e}function U6e(t,e,r){var o="",a=t.tag,n,u;for(n=0,u=r.length;n1024&&(E+="? "),E+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),ed(t,e,h,!1,!1)&&(E+=t.dump,o+=E));t.tag=a,t.dump="{"+o+"}"}function q6e(t,e,r,o){var a="",n=t.tag,u=Object.keys(r),A,p,h,E,I,v;if(t.sortKeys===!0)u.sort();else if(typeof t.sortKeys=="function")u.sort(t.sortKeys);else if(t.sortKeys)throw new tI("sortKeys must be a boolean or a function");for(A=0,p=u.length;A1024,I&&(t.dump&&$w===t.dump.charCodeAt(0)?v+="?":v+="? "),v+=t.dump,I&&(v+=ET(t,e)),ed(t,e+1,E,!0,I)&&(t.dump&&$w===t.dump.charCodeAt(0)?v+=":":v+=": ",v+=t.dump,a+=v));t.tag=n,t.dump=a||"{}"}function kK(t,e,r){var o,a,n,u,A,p;for(a=r?t.explicitTypes:t.implicitTypes,n=0,u=a.length;n tag resolver accepts not "'+p+'" style');t.dump=o}return!0}return!1}function ed(t,e,r,o,a,n){t.tag=null,t.dump=r,kK(t,r,!1)||kK(t,r,!0);var u=QK.call(t.dump);o&&(o=t.flowLevel<0||t.flowLevel>e);var A=u==="[object Object]"||u==="[object Array]",p,h;if(A&&(p=t.duplicates.indexOf(r),h=p!==-1),(t.tag!==null&&t.tag!=="?"||h||t.indent!==2&&e>0)&&(a=!1),h&&t.usedDuplicates[p])t.dump="*ref_"+p;else{if(A&&h&&!t.usedDuplicates[p]&&(t.usedDuplicates[p]=!0),u==="[object Object]")o&&Object.keys(t.dump).length!==0?(q6e(t,e,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(H6e(t,e,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump));else if(u==="[object Array]"){var E=t.noArrayIndent&&e>0?e-1:e;o&&t.dump.length!==0?(_6e(t,E,t.dump,a),h&&(t.dump="&ref_"+p+t.dump)):(U6e(t,E,t.dump),h&&(t.dump="&ref_"+p+" "+t.dump))}else if(u==="[object String]")t.tag!=="?"&&N6e(t,t.dump,e,n);else{if(t.skipInvalid)return!1;throw new tI("unacceptable kind of an object to dump "+u)}t.tag!==null&&t.tag!=="?"&&(t.dump="!<"+t.tag+"> "+t.dump)}return!0}function G6e(t,e){var r=[],o=[],a,n;for(CT(t,r,o),a=0,n=o.length;a{"use strict";var zD=BK(),KK=WK();function VD(t){return function(){throw new Error("Function "+t+" is deprecated and cannot be used.")}}ki.exports.Type=os();ki.exports.Schema=Jg();ki.exports.FAILSAFE_SCHEMA=HD();ki.exports.JSON_SCHEMA=pT();ki.exports.CORE_SCHEMA=hT();ki.exports.DEFAULT_SAFE_SCHEMA=py();ki.exports.DEFAULT_FULL_SCHEMA=Xw();ki.exports.load=zD.load;ki.exports.loadAll=zD.loadAll;ki.exports.safeLoad=zD.safeLoad;ki.exports.safeLoadAll=zD.safeLoadAll;ki.exports.dump=KK.dump;ki.exports.safeDump=KK.safeDump;ki.exports.YAMLException=Ay();ki.exports.MINIMAL_SCHEMA=HD();ki.exports.SAFE_SCHEMA=py();ki.exports.DEFAULT_SCHEMA=Xw();ki.exports.scan=VD("scan");ki.exports.parse=VD("parse");ki.exports.compose=VD("compose");ki.exports.addConstructor=VD("addConstructor")});var JK=_((hxt,VK)=>{"use strict";var Y6e=zK();VK.exports=Y6e});var ZK=_((gxt,XK)=>{"use strict";function W6e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function td(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,td)}W6e(td,Error);td.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",I;for(I=0;I0){for(I=1,v=1;I({[pt]:Ne})))},fe=function($){return $},ue=function($){return $},me=sa("correct indentation"),he=" ",Be=Qn(" ",!1),we=function($){return $.length===ir*It},g=function($){return $.length===(ir+1)*It},Ee=function(){return ir++,!0},Pe=function(){return ir--,!0},ce=function(){return PA()},ne=sa("pseudostring"),ee=/^[^\r\n\t ?:,\][{}#&*!|>'"%@`\-]/,Ie=hi(["\r",` `," "," ","?",":",",","]","[","{","}","#","&","*","!","|",">","'",'"',"%","@","`","-"],!0,!1),Fe=/^[^\r\n\t ,\][{}:#"']/,At=hi(["\r",` `," "," ",",","]","[","{","}",":","#",'"',"'"],!0,!1),H=function(){return PA().replace(/^ *| *$/g,"")},at="--",Re=Qn("--",!1),ke=/^[a-zA-Z\/0-9]/,xe=hi([["a","z"],["A","Z"],"/",["0","9"]],!1,!1),He=/^[^\r\n\t :,]/,Te=hi(["\r",` `," "," ",":",","],!0,!1),Ve="null",qe=Qn("null",!1),b=function(){return null},w="true",S=Qn("true",!1),y=function(){return!0},F="false",J=Qn("false",!1),X=function(){return!1},Z=sa("string"),ie='"',be=Qn('"',!1),Le=function(){return""},ot=function($){return $},dt=function($){return $.join("")},Gt=/^[^"\\\0-\x1F\x7F]/,$t=hi(['"',"\\",["\0",""],"\x7F"],!0,!1),bt='\\"',an=Qn('\\"',!1),Qr=function(){return'"'},mr="\\\\",br=Qn("\\\\",!1),Wr=function(){return"\\"},Kn="\\/",Ls=Qn("\\/",!1),Ti=function(){return"/"},ps="\\b",io=Qn("\\b",!1),Si=function(){return"\b"},Ns="\\f",so=Qn("\\f",!1),uc=function(){return"\f"},uu="\\n",cp=Qn("\\n",!1),up=function(){return` `},Os="\\r",Dn=Qn("\\r",!1),oo=function(){return"\r"},Ms="\\t",yl=Qn("\\t",!1),El=function(){return" "},ao="\\u",zn=Qn("\\u",!1),On=function($,ye,Ne,pt){return String.fromCharCode(parseInt(`0x${$}${ye}${Ne}${pt}`))},Li=/^[0-9a-fA-F]/,Mn=hi([["0","9"],["a","f"],["A","F"]],!1,!1),_i=sa("blank space"),rr=/^[ \t]/,Oe=hi([" "," "],!1,!1),ii=sa("white space"),Ua=/^[ \t\n\r]/,hr=hi([" "," ",` `,"\r"],!1,!1),Ac=`\r `,Au=Qn(`\r `,!1),fc=` `,Cl=Qn(` `,!1),DA="\r",fu=Qn("\r",!1),Ce=0,Rt=0,pc=[{line:1,column:1}],Hi=0,pu=[],Yt=0,wl;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function PA(){return t.substring(Rt,Ce)}function Ap(){return _o(Rt,Ce)}function hc($,ye){throw ye=ye!==void 0?ye:_o(Rt,Ce),dc([sa($)],t.substring(Rt,Ce),ye)}function SA($,ye){throw ye=ye!==void 0?ye:_o(Rt,Ce),lo($,ye)}function Qn($,ye){return{type:"literal",text:$,ignoreCase:ye}}function hi($,ye,Ne){return{type:"class",parts:$,inverted:ye,ignoreCase:Ne}}function gc(){return{type:"any"}}function bA(){return{type:"end"}}function sa($){return{type:"other",description:$}}function Ni($){var ye=pc[$],Ne;if(ye)return ye;for(Ne=$-1;!pc[Ne];)Ne--;for(ye=pc[Ne],ye={line:ye.line,column:ye.column};Ne<$;)t.charCodeAt(Ne)===10?(ye.line++,ye.column=1):ye.column++,Ne++;return pc[$]=ye,ye}function _o($,ye){var Ne=Ni($),pt=Ni(ye);return{start:{offset:$,line:Ne.line,column:Ne.column},end:{offset:ye,line:pt.line,column:pt.column}}}function Ze($){CeHi&&(Hi=Ce,pu=[]),pu.push($))}function lo($,ye){return new td($,null,null,ye)}function dc($,ye,Ne){return new td(td.buildMessage($,ye),$,ye,Ne)}function hu(){var $;return $=xA(),$}function qi(){var $,ye,Ne;for($=Ce,ye=[],Ne=gu();Ne!==r;)ye.push(Ne),Ne=gu();return ye!==r&&(Rt=$,ye=n(ye)),$=ye,$}function gu(){var $,ye,Ne,pt,ht;return $=Ce,ye=hs(),ye!==r?(t.charCodeAt(Ce)===45?(Ne=u,Ce++):(Ne=r,Yt===0&&Ze(A)),Ne!==r?(pt=Pn(),pt!==r?(ht=mc(),ht!==r?(Rt=$,ye=p(ht),$=ye):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$}function xA(){var $,ye,Ne;for($=Ce,ye=[],Ne=Ha();Ne!==r;)ye.push(Ne),Ne=Ha();return ye!==r&&(Rt=$,ye=h(ye)),$=ye,$}function Ha(){var $,ye,Ne,pt,ht,Tt,er,$r,Gi;if($=Ce,ye=Pn(),ye===r&&(ye=null),ye!==r){if(Ne=Ce,t.charCodeAt(Ce)===35?(pt=E,Ce++):(pt=r,Yt===0&&Ze(I)),pt!==r){if(ht=[],Tt=Ce,er=Ce,Yt++,$r=tt(),Yt--,$r===r?er=void 0:(Ce=er,er=r),er!==r?(t.length>Ce?($r=t.charAt(Ce),Ce++):($r=r,Yt===0&&Ze(v)),$r!==r?(er=[er,$r],Tt=er):(Ce=Tt,Tt=r)):(Ce=Tt,Tt=r),Tt!==r)for(;Tt!==r;)ht.push(Tt),Tt=Ce,er=Ce,Yt++,$r=tt(),Yt--,$r===r?er=void 0:(Ce=er,er=r),er!==r?(t.length>Ce?($r=t.charAt(Ce),Ce++):($r=r,Yt===0&&Ze(v)),$r!==r?(er=[er,$r],Tt=er):(Ce=Tt,Tt=r)):(Ce=Tt,Tt=r);else ht=r;ht!==r?(pt=[pt,ht],Ne=pt):(Ce=Ne,Ne=r)}else Ce=Ne,Ne=r;if(Ne===r&&(Ne=null),Ne!==r){if(pt=[],ht=We(),ht!==r)for(;ht!==r;)pt.push(ht),ht=We();else pt=r;pt!==r?(Rt=$,ye=x(),$=ye):(Ce=$,$=r)}else Ce=$,$=r}else Ce=$,$=r;if($===r&&($=Ce,ye=hs(),ye!==r?(Ne=oa(),Ne!==r?(pt=Pn(),pt===r&&(pt=null),pt!==r?(t.charCodeAt(Ce)===58?(ht=C,Ce++):(ht=r,Yt===0&&Ze(R)),ht!==r?(Tt=Pn(),Tt===r&&(Tt=null),Tt!==r?(er=mc(),er!==r?(Rt=$,ye=N(Ne,er),$=ye):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r&&($=Ce,ye=hs(),ye!==r?(Ne=co(),Ne!==r?(pt=Pn(),pt===r&&(pt=null),pt!==r?(t.charCodeAt(Ce)===58?(ht=C,Ce++):(ht=r,Yt===0&&Ze(R)),ht!==r?(Tt=Pn(),Tt===r&&(Tt=null),Tt!==r?(er=mc(),er!==r?(Rt=$,ye=N(Ne,er),$=ye):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r))){if($=Ce,ye=hs(),ye!==r)if(Ne=co(),Ne!==r)if(pt=Pn(),pt!==r)if(ht=aa(),ht!==r){if(Tt=[],er=We(),er!==r)for(;er!==r;)Tt.push(er),er=We();else Tt=r;Tt!==r?(Rt=$,ye=N(Ne,ht),$=ye):(Ce=$,$=r)}else Ce=$,$=r;else Ce=$,$=r;else Ce=$,$=r;else Ce=$,$=r;if($===r)if($=Ce,ye=hs(),ye!==r)if(Ne=co(),Ne!==r){if(pt=[],ht=Ce,Tt=Pn(),Tt===r&&(Tt=null),Tt!==r?(t.charCodeAt(Ce)===44?(er=U,Ce++):(er=r,Yt===0&&Ze(V)),er!==r?($r=Pn(),$r===r&&($r=null),$r!==r?(Gi=co(),Gi!==r?(Rt=ht,Tt=te(Ne,Gi),ht=Tt):(Ce=ht,ht=r)):(Ce=ht,ht=r)):(Ce=ht,ht=r)):(Ce=ht,ht=r),ht!==r)for(;ht!==r;)pt.push(ht),ht=Ce,Tt=Pn(),Tt===r&&(Tt=null),Tt!==r?(t.charCodeAt(Ce)===44?(er=U,Ce++):(er=r,Yt===0&&Ze(V)),er!==r?($r=Pn(),$r===r&&($r=null),$r!==r?(Gi=co(),Gi!==r?(Rt=ht,Tt=te(Ne,Gi),ht=Tt):(Ce=ht,ht=r)):(Ce=ht,ht=r)):(Ce=ht,ht=r)):(Ce=ht,ht=r);else pt=r;pt!==r?(ht=Pn(),ht===r&&(ht=null),ht!==r?(t.charCodeAt(Ce)===58?(Tt=C,Ce++):(Tt=r,Yt===0&&Ze(R)),Tt!==r?(er=Pn(),er===r&&(er=null),er!==r?($r=mc(),$r!==r?(Rt=$,ye=ae(Ne,pt,$r),$=ye):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)}else Ce=$,$=r;else Ce=$,$=r}return $}function mc(){var $,ye,Ne,pt,ht,Tt,er;if($=Ce,ye=Ce,Yt++,Ne=Ce,pt=tt(),pt!==r?(ht=Ht(),ht!==r?(t.charCodeAt(Ce)===45?(Tt=u,Ce++):(Tt=r,Yt===0&&Ze(A)),Tt!==r?(er=Pn(),er!==r?(pt=[pt,ht,Tt,er],Ne=pt):(Ce=Ne,Ne=r)):(Ce=Ne,Ne=r)):(Ce=Ne,Ne=r)):(Ce=Ne,Ne=r),Yt--,Ne!==r?(Ce=ye,ye=void 0):ye=r,ye!==r?(Ne=We(),Ne!==r?(pt=Fn(),pt!==r?(ht=qi(),ht!==r?(Tt=Ci(),Tt!==r?(Rt=$,ye=fe(ht),$=ye):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r&&($=Ce,ye=tt(),ye!==r?(Ne=Fn(),Ne!==r?(pt=xA(),pt!==r?(ht=Ci(),ht!==r?(Rt=$,ye=fe(pt),$=ye):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r),$===r))if($=Ce,ye=Us(),ye!==r){if(Ne=[],pt=We(),pt!==r)for(;pt!==r;)Ne.push(pt),pt=We();else Ne=r;Ne!==r?(Rt=$,ye=ue(ye),$=ye):(Ce=$,$=r)}else Ce=$,$=r;return $}function hs(){var $,ye,Ne;for(Yt++,$=Ce,ye=[],t.charCodeAt(Ce)===32?(Ne=he,Ce++):(Ne=r,Yt===0&&Ze(Be));Ne!==r;)ye.push(Ne),t.charCodeAt(Ce)===32?(Ne=he,Ce++):(Ne=r,Yt===0&&Ze(Be));return ye!==r?(Rt=Ce,Ne=we(ye),Ne?Ne=void 0:Ne=r,Ne!==r?(ye=[ye,Ne],$=ye):(Ce=$,$=r)):(Ce=$,$=r),Yt--,$===r&&(ye=r,Yt===0&&Ze(me)),$}function Ht(){var $,ye,Ne;for($=Ce,ye=[],t.charCodeAt(Ce)===32?(Ne=he,Ce++):(Ne=r,Yt===0&&Ze(Be));Ne!==r;)ye.push(Ne),t.charCodeAt(Ce)===32?(Ne=he,Ce++):(Ne=r,Yt===0&&Ze(Be));return ye!==r?(Rt=Ce,Ne=g(ye),Ne?Ne=void 0:Ne=r,Ne!==r?(ye=[ye,Ne],$=ye):(Ce=$,$=r)):(Ce=$,$=r),$}function Fn(){var $;return Rt=Ce,$=Ee(),$?$=void 0:$=r,$}function Ci(){var $;return Rt=Ce,$=Pe(),$?$=void 0:$=r,$}function oa(){var $;return $=ds(),$===r&&($=la()),$}function co(){var $,ye,Ne;if($=ds(),$===r){if($=Ce,ye=[],Ne=Ho(),Ne!==r)for(;Ne!==r;)ye.push(Ne),Ne=Ho();else ye=r;ye!==r&&(Rt=$,ye=ce()),$=ye}return $}function Us(){var $;return $=wi(),$===r&&($=gs(),$===r&&($=ds(),$===r&&($=la()))),$}function aa(){var $;return $=wi(),$===r&&($=ds(),$===r&&($=Ho())),$}function la(){var $,ye,Ne,pt,ht,Tt;if(Yt++,$=Ce,ee.test(t.charAt(Ce))?(ye=t.charAt(Ce),Ce++):(ye=r,Yt===0&&Ze(Ie)),ye!==r){for(Ne=[],pt=Ce,ht=Pn(),ht===r&&(ht=null),ht!==r?(Fe.test(t.charAt(Ce))?(Tt=t.charAt(Ce),Ce++):(Tt=r,Yt===0&&Ze(At)),Tt!==r?(ht=[ht,Tt],pt=ht):(Ce=pt,pt=r)):(Ce=pt,pt=r);pt!==r;)Ne.push(pt),pt=Ce,ht=Pn(),ht===r&&(ht=null),ht!==r?(Fe.test(t.charAt(Ce))?(Tt=t.charAt(Ce),Ce++):(Tt=r,Yt===0&&Ze(At)),Tt!==r?(ht=[ht,Tt],pt=ht):(Ce=pt,pt=r)):(Ce=pt,pt=r);Ne!==r?(Rt=$,ye=H(),$=ye):(Ce=$,$=r)}else Ce=$,$=r;return Yt--,$===r&&(ye=r,Yt===0&&Ze(ne)),$}function Ho(){var $,ye,Ne,pt,ht;if($=Ce,t.substr(Ce,2)===at?(ye=at,Ce+=2):(ye=r,Yt===0&&Ze(Re)),ye===r&&(ye=null),ye!==r)if(ke.test(t.charAt(Ce))?(Ne=t.charAt(Ce),Ce++):(Ne=r,Yt===0&&Ze(xe)),Ne!==r){for(pt=[],He.test(t.charAt(Ce))?(ht=t.charAt(Ce),Ce++):(ht=r,Yt===0&&Ze(Te));ht!==r;)pt.push(ht),He.test(t.charAt(Ce))?(ht=t.charAt(Ce),Ce++):(ht=r,Yt===0&&Ze(Te));pt!==r?(Rt=$,ye=H(),$=ye):(Ce=$,$=r)}else Ce=$,$=r;else Ce=$,$=r;return $}function wi(){var $,ye;return $=Ce,t.substr(Ce,4)===Ve?(ye=Ve,Ce+=4):(ye=r,Yt===0&&Ze(qe)),ye!==r&&(Rt=$,ye=b()),$=ye,$}function gs(){var $,ye;return $=Ce,t.substr(Ce,4)===w?(ye=w,Ce+=4):(ye=r,Yt===0&&Ze(S)),ye!==r&&(Rt=$,ye=y()),$=ye,$===r&&($=Ce,t.substr(Ce,5)===F?(ye=F,Ce+=5):(ye=r,Yt===0&&Ze(J)),ye!==r&&(Rt=$,ye=X()),$=ye),$}function ds(){var $,ye,Ne,pt;return Yt++,$=Ce,t.charCodeAt(Ce)===34?(ye=ie,Ce++):(ye=r,Yt===0&&Ze(be)),ye!==r?(t.charCodeAt(Ce)===34?(Ne=ie,Ce++):(Ne=r,Yt===0&&Ze(be)),Ne!==r?(Rt=$,ye=Le(),$=ye):(Ce=$,$=r)):(Ce=$,$=r),$===r&&($=Ce,t.charCodeAt(Ce)===34?(ye=ie,Ce++):(ye=r,Yt===0&&Ze(be)),ye!==r?(Ne=ms(),Ne!==r?(t.charCodeAt(Ce)===34?(pt=ie,Ce++):(pt=r,Yt===0&&Ze(be)),pt!==r?(Rt=$,ye=ot(Ne),$=ye):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)),Yt--,$===r&&(ye=r,Yt===0&&Ze(Z)),$}function ms(){var $,ye,Ne;if($=Ce,ye=[],Ne=_s(),Ne!==r)for(;Ne!==r;)ye.push(Ne),Ne=_s();else ye=r;return ye!==r&&(Rt=$,ye=dt(ye)),$=ye,$}function _s(){var $,ye,Ne,pt,ht,Tt;return Gt.test(t.charAt(Ce))?($=t.charAt(Ce),Ce++):($=r,Yt===0&&Ze($t)),$===r&&($=Ce,t.substr(Ce,2)===bt?(ye=bt,Ce+=2):(ye=r,Yt===0&&Ze(an)),ye!==r&&(Rt=$,ye=Qr()),$=ye,$===r&&($=Ce,t.substr(Ce,2)===mr?(ye=mr,Ce+=2):(ye=r,Yt===0&&Ze(br)),ye!==r&&(Rt=$,ye=Wr()),$=ye,$===r&&($=Ce,t.substr(Ce,2)===Kn?(ye=Kn,Ce+=2):(ye=r,Yt===0&&Ze(Ls)),ye!==r&&(Rt=$,ye=Ti()),$=ye,$===r&&($=Ce,t.substr(Ce,2)===ps?(ye=ps,Ce+=2):(ye=r,Yt===0&&Ze(io)),ye!==r&&(Rt=$,ye=Si()),$=ye,$===r&&($=Ce,t.substr(Ce,2)===Ns?(ye=Ns,Ce+=2):(ye=r,Yt===0&&Ze(so)),ye!==r&&(Rt=$,ye=uc()),$=ye,$===r&&($=Ce,t.substr(Ce,2)===uu?(ye=uu,Ce+=2):(ye=r,Yt===0&&Ze(cp)),ye!==r&&(Rt=$,ye=up()),$=ye,$===r&&($=Ce,t.substr(Ce,2)===Os?(ye=Os,Ce+=2):(ye=r,Yt===0&&Ze(Dn)),ye!==r&&(Rt=$,ye=oo()),$=ye,$===r&&($=Ce,t.substr(Ce,2)===Ms?(ye=Ms,Ce+=2):(ye=r,Yt===0&&Ze(yl)),ye!==r&&(Rt=$,ye=El()),$=ye,$===r&&($=Ce,t.substr(Ce,2)===ao?(ye=ao,Ce+=2):(ye=r,Yt===0&&Ze(zn)),ye!==r?(Ne=Un(),Ne!==r?(pt=Un(),pt!==r?(ht=Un(),ht!==r?(Tt=Un(),Tt!==r?(Rt=$,ye=On(Ne,pt,ht,Tt),$=ye):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)):(Ce=$,$=r)))))))))),$}function Un(){var $;return Li.test(t.charAt(Ce))?($=t.charAt(Ce),Ce++):($=r,Yt===0&&Ze(Mn)),$}function Pn(){var $,ye;if(Yt++,$=[],rr.test(t.charAt(Ce))?(ye=t.charAt(Ce),Ce++):(ye=r,Yt===0&&Ze(Oe)),ye!==r)for(;ye!==r;)$.push(ye),rr.test(t.charAt(Ce))?(ye=t.charAt(Ce),Ce++):(ye=r,Yt===0&&Ze(Oe));else $=r;return Yt--,$===r&&(ye=r,Yt===0&&Ze(_i)),$}function ys(){var $,ye;if(Yt++,$=[],Ua.test(t.charAt(Ce))?(ye=t.charAt(Ce),Ce++):(ye=r,Yt===0&&Ze(hr)),ye!==r)for(;ye!==r;)$.push(ye),Ua.test(t.charAt(Ce))?(ye=t.charAt(Ce),Ce++):(ye=r,Yt===0&&Ze(hr));else $=r;return Yt--,$===r&&(ye=r,Yt===0&&Ze(ii)),$}function We(){var $,ye,Ne,pt,ht,Tt;if($=Ce,ye=tt(),ye!==r){for(Ne=[],pt=Ce,ht=Pn(),ht===r&&(ht=null),ht!==r?(Tt=tt(),Tt!==r?(ht=[ht,Tt],pt=ht):(Ce=pt,pt=r)):(Ce=pt,pt=r);pt!==r;)Ne.push(pt),pt=Ce,ht=Pn(),ht===r&&(ht=null),ht!==r?(Tt=tt(),Tt!==r?(ht=[ht,Tt],pt=ht):(Ce=pt,pt=r)):(Ce=pt,pt=r);Ne!==r?(ye=[ye,Ne],$=ye):(Ce=$,$=r)}else Ce=$,$=r;return $}function tt(){var $;return t.substr(Ce,2)===Ac?($=Ac,Ce+=2):($=r,Yt===0&&Ze(Au)),$===r&&(t.charCodeAt(Ce)===10?($=fc,Ce++):($=r,Yt===0&&Ze(Cl)),$===r&&(t.charCodeAt(Ce)===13?($=DA,Ce++):($=r,Yt===0&&Ze(fu)))),$}let It=2,ir=0;if(wl=a(),wl!==r&&Ce===t.length)return wl;throw wl!==r&&Ce"u"?!0:typeof t=="object"&&t!==null&&!Array.isArray(t)?Object.keys(t).every(e=>rz(t[e])):!1}function BT(t,e,r){if(t===null)return`null `;if(typeof t=="number"||typeof t=="boolean")return`${t.toString()} `;if(typeof t=="string")return`${ez(t)} `;if(Array.isArray(t)){if(t.length===0)return`[] `;let o=" ".repeat(e);return` ${t.map(n=>`${o}- ${BT(n,e+1,!1)}`).join("")}`}if(typeof t=="object"&&t){let[o,a]=t instanceof JD?[t.data,!1]:[t,!0],n=" ".repeat(e),u=Object.keys(o);a&&u.sort((p,h)=>{let E=$K.indexOf(p),I=$K.indexOf(h);return E===-1&&I===-1?ph?1:0:E!==-1&&I===-1?-1:E===-1&&I!==-1?1:E-I});let A=u.filter(p=>!rz(o[p])).map((p,h)=>{let E=o[p],I=ez(p),v=BT(E,e+1,!0),x=h>0||r?n:"",C=I.length>1024?`? ${I} ${x}:`:`${I}:`,R=v.startsWith(` `)?v:` ${v}`;return`${x}${C}${R}`}).join(e===0?` `:"")||` `;return r?` ${A}`:`${A}`}throw new Error(`Unsupported value type (${t})`)}function Ba(t){try{let e=BT(t,0,!1);return e!==` `?e:""}catch(e){throw e.location&&(e.message=e.message.replace(/(\.)?$/,` (line ${e.location.start.line}, column ${e.location.start.column})$1`)),e}}function V6e(t){return t.endsWith(` `)||(t+=` `),(0,tz.parse)(t)}function X6e(t){if(J6e.test(t))return V6e(t);let e=(0,XD.safeLoad)(t,{schema:XD.FAILSAFE_SCHEMA,json:!0});if(e==null)return{};if(typeof e!="object")throw new Error(`Expected an indexed object, got a ${typeof e} instead. Does your file follow Yaml's rules?`);if(Array.isArray(e))throw new Error("Expected an indexed object, got an array instead. Does your file follow Yaml's rules?");return e}function Ki(t){return X6e(t)}var XD,tz,z6e,$K,JD,J6e,nz=Et(()=>{XD=$e(JK()),tz=$e(ZK()),z6e=/^(?![-?:,\][{}#&*!|>'"%@` \t\r\n]).([ \t]*(?![,\][{}:# \t\r\n]).)*$/,$K=["__metadata","version","resolution","dependencies","peerDependencies","dependenciesMeta","peerDependenciesMeta","binaries"],JD=class{constructor(e){this.data=e}};Ba.PreserveOrdering=JD;J6e=/^(#.*(\r?\n))*?#\s+yarn\s+lockfile\s+v1\r?\n/i});var rI={};zt(rI,{parseResolution:()=>MD,parseShell:()=>LD,parseSyml:()=>Ki,stringifyArgument:()=>cT,stringifyArgumentSegment:()=>uT,stringifyArithmeticExpression:()=>OD,stringifyCommand:()=>lT,stringifyCommandChain:()=>uy,stringifyCommandChainThen:()=>aT,stringifyCommandLine:()=>ND,stringifyCommandLineThen:()=>oT,stringifyEnvSegment:()=>TD,stringifyRedirectArgument:()=>Vw,stringifyResolution:()=>UD,stringifyShell:()=>cy,stringifyShellLine:()=>cy,stringifySyml:()=>Ba,stringifyValueArgument:()=>Wg});var Nl=Et(()=>{rW();oW();nz()});var sz=_((Cxt,vT)=>{"use strict";var Z6e=t=>{let e=!1,r=!1,o=!1;for(let a=0;a{if(!(typeof t=="string"||Array.isArray(t)))throw new TypeError("Expected the input to be `string | string[]`");e=Object.assign({pascalCase:!1},e);let r=a=>e.pascalCase?a.charAt(0).toUpperCase()+a.slice(1):a;return Array.isArray(t)?t=t.map(a=>a.trim()).filter(a=>a.length).join("-"):t=t.trim(),t.length===0?"":t.length===1?e.pascalCase?t.toUpperCase():t.toLowerCase():(t!==t.toLowerCase()&&(t=Z6e(t)),t=t.replace(/^[_.\- ]+/,"").toLowerCase().replace(/[_.\- ]+(\w|$)/g,(a,n)=>n.toUpperCase()).replace(/\d+(\w|$)/g,a=>a.toUpperCase()),r(t))};vT.exports=iz;vT.exports.default=iz});var oz=_((wxt,$6e)=>{$6e.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vercel",constant:"VERCEL",env:"NOW_BUILDER"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"}]});var rd=_(Za=>{"use strict";var lz=oz(),Gu=process.env;Object.defineProperty(Za,"_vendors",{value:lz.map(function(t){return t.constant})});Za.name=null;Za.isPR=null;lz.forEach(function(t){let r=(Array.isArray(t.env)?t.env:[t.env]).every(function(o){return az(o)});if(Za[t.constant]=r,r)switch(Za.name=t.name,typeof t.pr){case"string":Za.isPR=!!Gu[t.pr];break;case"object":"env"in t.pr?Za.isPR=t.pr.env in Gu&&Gu[t.pr.env]!==t.pr.ne:"any"in t.pr?Za.isPR=t.pr.any.some(function(o){return!!Gu[o]}):Za.isPR=az(t.pr);break;default:Za.isPR=null}});Za.isCI=!!(Gu.CI||Gu.CONTINUOUS_INTEGRATION||Gu.BUILD_NUMBER||Gu.RUN_ID||Za.name);function az(t){return typeof t=="string"?!!Gu[t]:Object.keys(t).every(function(e){return Gu[e]===t[e]})}});var Hn,cn,nd,DT,ZD,cz,PT,ST,$D=Et(()=>{(function(t){t.StartOfInput="\0",t.EndOfInput="",t.EndOfPartialInput=""})(Hn||(Hn={}));(function(t){t[t.InitialNode=0]="InitialNode",t[t.SuccessNode=1]="SuccessNode",t[t.ErrorNode=2]="ErrorNode",t[t.CustomNode=3]="CustomNode"})(cn||(cn={}));nd=-1,DT=/^(-h|--help)(?:=([0-9]+))?$/,ZD=/^(--[a-z]+(?:-[a-z]+)*|-[a-zA-Z]+)$/,cz=/^-[a-zA-Z]{2,}$/,PT=/^([^=]+)=([\s\S]*)$/,ST=process.env.DEBUG_CLI==="1"});var it,yy,eP,bT,tP=Et(()=>{$D();it=class extends Error{constructor(e){super(e),this.clipanion={type:"usage"},this.name="UsageError"}},yy=class extends Error{constructor(e,r){if(super(),this.input=e,this.candidates=r,this.clipanion={type:"none"},this.name="UnknownSyntaxError",this.candidates.length===0)this.message="Command not found, but we're not sure what's the alternative.";else if(this.candidates.every(o=>o.reason!==null&&o.reason===r[0].reason)){let[{reason:o}]=this.candidates;this.message=`${o} ${this.candidates.map(({usage:a})=>`$ ${a}`).join(` `)}`}else if(this.candidates.length===1){let[{usage:o}]=this.candidates;this.message=`Command not found; did you mean: $ ${o} ${bT(e)}`}else this.message=`Command not found; did you mean one of: ${this.candidates.map(({usage:o},a)=>`${`${a}.`.padStart(4)} ${o}`).join(` `)} ${bT(e)}`}},eP=class extends Error{constructor(e,r){super(),this.input=e,this.usages=r,this.clipanion={type:"none"},this.name="AmbiguousSyntaxError",this.message=`Cannot find which to pick amongst the following alternatives: ${this.usages.map((o,a)=>`${`${a}.`.padStart(4)} ${o}`).join(` `)} ${bT(e)}`}},bT=t=>`While running ${t.filter(e=>e!==Hn.EndOfInput&&e!==Hn.EndOfPartialInput).map(e=>{let r=JSON.stringify(e);return e.match(/\s/)||e.length===0||r!==`"${e}"`?r:e}).join(" ")}`});function eqe(t){let e=t.split(` `),r=e.filter(a=>a.match(/\S/)),o=r.length>0?r.reduce((a,n)=>Math.min(a,n.length-n.trimStart().length),Number.MAX_VALUE):0;return e.map(a=>a.slice(o).trimRight()).join(` `)}function Do(t,{format:e,paragraphs:r}){return t=t.replace(/\r\n?/g,` `),t=eqe(t),t=t.replace(/^\n+|\n+$/g,""),t=t.replace(/^(\s*)-([^\n]*?)\n+/gm,`$1-$2 `),t=t.replace(/\n(\n)?\n*/g,(o,a)=>a||" "),r&&(t=t.split(/\n/).map(o=>{let a=o.match(/^\s*[*-][\t ]+(.*)/);if(!a)return o.match(/(.{1,80})(?: |$)/g).join(` `);let n=o.length-o.trimStart().length;return a[1].match(new RegExp(`(.{1,${78-n}})(?: |$)`,"g")).map((u,A)=>" ".repeat(n)+(A===0?"- ":" ")+u).join(` `)}).join(` `)),t=t.replace(/(`+)((?:.|[\n])*?)\1/g,(o,a,n)=>e.code(a+n+a)),t=t.replace(/(\*\*)((?:.|[\n])*?)\1/g,(o,a,n)=>e.bold(a+n+a)),t?`${t} `:""}var xT,uz,Az,kT=Et(()=>{xT=Array(80).fill("\u2501");for(let t=0;t<=24;++t)xT[xT.length-t]=`\x1B[38;5;${232+t}m\u2501`;uz={header:t=>`\x1B[1m\u2501\u2501\u2501 ${t}${t.length<80-5?` ${xT.slice(t.length+5).join("")}`:":"}\x1B[0m`,bold:t=>`\x1B[1m${t}\x1B[22m`,error:t=>`\x1B[31m\x1B[1m${t}\x1B[22m\x1B[39m`,code:t=>`\x1B[36m${t}\x1B[39m`},Az={header:t=>t,bold:t=>t,error:t=>t,code:t=>t}});function Ko(t){return{...t,[nI]:!0}}function ju(t,e){return typeof t>"u"?[t,e]:typeof t=="object"&&t!==null&&!Array.isArray(t)?[void 0,t]:[t,e]}function rP(t,{mergeName:e=!1}={}){let r=t.match(/^([^:]+): (.*)$/m);if(!r)return"validation failed";let[,o,a]=r;return e&&(a=a[0].toLowerCase()+a.slice(1)),a=o!=="."||!e?`${o.replace(/^\.(\[|$)/,"$1")}: ${a}`:`: ${a}`,a}function iI(t,e){return e.length===1?new it(`${t}${rP(e[0],{mergeName:!0})}`):new it(`${t}: ${e.map(r=>` - ${rP(r)}`).join("")}`)}function id(t,e,r){if(typeof r>"u")return e;let o=[],a=[],n=A=>{let p=e;return e=A,n.bind(null,p)};if(!r(e,{errors:o,coercions:a,coercion:n}))throw iI(`Invalid value for ${t}`,o);for(let[,A]of a)A();return e}var nI,Ef=Et(()=>{tP();nI=Symbol("clipanion/isOption")});var zo={};zt(zo,{KeyRelationship:()=>Yu,TypeAssertionError:()=>zp,applyCascade:()=>aI,as:()=>Eqe,assert:()=>dqe,assertWithErrors:()=>mqe,cascade:()=>oP,fn:()=>Cqe,hasAtLeastOneKey:()=>OT,hasExactLength:()=>dz,hasForbiddenKeys:()=>Uqe,hasKeyRelationship:()=>cI,hasMaxLength:()=>Iqe,hasMinLength:()=>wqe,hasMutuallyExclusiveKeys:()=>_qe,hasRequiredKeys:()=>Mqe,hasUniqueItems:()=>Bqe,isArray:()=>nP,isAtLeast:()=>LT,isAtMost:()=>Pqe,isBase64:()=>Tqe,isBoolean:()=>lqe,isDate:()=>uqe,isDict:()=>pqe,isEnum:()=>Ks,isHexColor:()=>Rqe,isISO8601:()=>Fqe,isInExclusiveRange:()=>bqe,isInInclusiveRange:()=>Sqe,isInstanceOf:()=>gqe,isInteger:()=>NT,isJSON:()=>Lqe,isLiteral:()=>pz,isLowerCase:()=>xqe,isMap:()=>fqe,isNegative:()=>vqe,isNullable:()=>Oqe,isNumber:()=>RT,isObject:()=>hz,isOneOf:()=>TT,isOptional:()=>Nqe,isPartial:()=>hqe,isPayload:()=>cqe,isPositive:()=>Dqe,isRecord:()=>sP,isSet:()=>Aqe,isString:()=>Cy,isTuple:()=>iP,isUUID4:()=>Qqe,isUnknown:()=>FT,isUpperCase:()=>kqe,makeTrait:()=>gz,makeValidator:()=>Hr,matchesRegExp:()=>oI,softAssert:()=>yqe});function qn(t){return t===null?"null":t===void 0?"undefined":t===""?"an empty string":typeof t=="symbol"?`<${t.toString()}>`:Array.isArray(t)?"an array":JSON.stringify(t)}function Ey(t,e){if(t.length===0)return"nothing";if(t.length===1)return qn(t[0]);let r=t.slice(0,-1),o=t[t.length-1],a=t.length>2?`, ${e} `:` ${e} `;return`${r.map(n=>qn(n)).join(", ")}${a}${qn(o)}`}function Kp(t,e){var r,o,a;return typeof e=="number"?`${(r=t?.p)!==null&&r!==void 0?r:"."}[${e}]`:tqe.test(e)?`${(o=t?.p)!==null&&o!==void 0?o:""}.${e}`:`${(a=t?.p)!==null&&a!==void 0?a:"."}[${JSON.stringify(e)}]`}function QT(t,e,r){return t===1?e:r}function pr({errors:t,p:e}={},r){return t?.push(`${e??"."}: ${r}`),!1}function oqe(t,e){return r=>{t[e]=r}}function Wu(t,e){return r=>{let o=t[e];return t[e]=r,Wu(t,e).bind(null,o)}}function sI(t,e,r){let o=()=>(t(r()),a),a=()=>(t(e),o);return o}function FT(){return Hr({test:(t,e)=>!0})}function pz(t){return Hr({test:(e,r)=>e!==t?pr(r,`Expected ${qn(t)} (got ${qn(e)})`):!0})}function Cy(){return Hr({test:(t,e)=>typeof t!="string"?pr(e,`Expected a string (got ${qn(t)})`):!0})}function Ks(t){let e=Array.isArray(t)?t:Object.values(t),r=e.every(a=>typeof a=="string"||typeof a=="number"),o=new Set(e);return o.size===1?pz([...o][0]):Hr({test:(a,n)=>o.has(a)?!0:r?pr(n,`Expected one of ${Ey(e,"or")} (got ${qn(a)})`):pr(n,`Expected a valid enumeration value (got ${qn(a)})`)})}function lqe(){return Hr({test:(t,e)=>{var r;if(typeof t!="boolean"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return pr(e,"Unbound coercion result");let o=aqe.get(t);if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return pr(e,`Expected a boolean (got ${qn(t)})`)}return!0}})}function RT(){return Hr({test:(t,e)=>{var r;if(typeof t!="number"){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return pr(e,"Unbound coercion result");let o;if(typeof t=="string"){let a;try{a=JSON.parse(t)}catch{}if(typeof a=="number")if(JSON.stringify(a)===t)o=a;else return pr(e,`Received a number that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return pr(e,`Expected a number (got ${qn(t)})`)}return!0}})}function cqe(t){return Hr({test:(e,r)=>{var o;if(typeof r?.coercions>"u")return pr(r,"The isPayload predicate can only be used with coercion enabled");if(typeof r.coercion>"u")return pr(r,"Unbound coercion result");if(typeof e!="string")return pr(r,`Expected a string (got ${qn(e)})`);let a;try{a=JSON.parse(e)}catch{return pr(r,`Expected a JSON string (got ${qn(e)})`)}let n={value:a};return t(a,Object.assign(Object.assign({},r),{coercion:Wu(n,"value")}))?(r.coercions.push([(o=r.p)!==null&&o!==void 0?o:".",r.coercion.bind(null,n.value)]),!0):!1}})}function uqe(){return Hr({test:(t,e)=>{var r;if(!(t instanceof Date)){if(typeof e?.coercions<"u"){if(typeof e?.coercion>"u")return pr(e,"Unbound coercion result");let o;if(typeof t=="string"&&fz.test(t))o=new Date(t);else{let a;if(typeof t=="string"){let n;try{n=JSON.parse(t)}catch{}typeof n=="number"&&(a=n)}else typeof t=="number"&&(a=t);if(typeof a<"u")if(Number.isSafeInteger(a)||!Number.isSafeInteger(a*1e3))o=new Date(a*1e3);else return pr(e,`Received a timestamp that can't be safely represented by the runtime (${t})`)}if(typeof o<"u")return e.coercions.push([(r=e.p)!==null&&r!==void 0?r:".",e.coercion.bind(null,o)]),!0}return pr(e,`Expected a date (got ${qn(t)})`)}return!0}})}function nP(t,{delimiter:e}={}){return Hr({test:(r,o)=>{var a;let n=r;if(typeof r=="string"&&typeof e<"u"&&typeof o?.coercions<"u"){if(typeof o?.coercion>"u")return pr(o,"Unbound coercion result");r=r.split(e)}if(!Array.isArray(r))return pr(o,`Expected an array (got ${qn(r)})`);let u=!0;for(let A=0,p=r.length;A{var n,u;if(Object.getPrototypeOf(o).toString()==="[object Set]")if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return pr(a,"Unbound coercion result");let A=[...o],p=[...o];if(!r(p,Object.assign(Object.assign({},a),{coercion:void 0})))return!1;let h=()=>p.some((E,I)=>E!==A[I])?new Set(p):o;return a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",sI(a.coercion,o,h)]),!0}else{let A=!0;for(let p of o)if(A=t(p,Object.assign({},a))&&A,!A&&a?.errors==null)break;return A}if(typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return pr(a,"Unbound coercion result");let A={value:o};return r(o,Object.assign(Object.assign({},a),{coercion:Wu(A,"value")}))?(a.coercions.push([(u=a.p)!==null&&u!==void 0?u:".",sI(a.coercion,o,()=>new Set(A.value))]),!0):!1}return pr(a,`Expected a set (got ${qn(o)})`)}})}function fqe(t,e){let r=nP(iP([t,e])),o=sP(e,{keys:t});return Hr({test:(a,n)=>{var u,A,p;if(Object.getPrototypeOf(a).toString()==="[object Map]")if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return pr(n,"Unbound coercion result");let h=[...a],E=[...a];if(!r(E,Object.assign(Object.assign({},n),{coercion:void 0})))return!1;let I=()=>E.some((v,x)=>v[0]!==h[x][0]||v[1]!==h[x][1])?new Map(E):a;return n.coercions.push([(u=n.p)!==null&&u!==void 0?u:".",sI(n.coercion,a,I)]),!0}else{let h=!0;for(let[E,I]of a)if(h=t(E,Object.assign({},n))&&h,!h&&n?.errors==null||(h=e(I,Object.assign(Object.assign({},n),{p:Kp(n,E)}))&&h,!h&&n?.errors==null))break;return h}if(typeof n?.coercions<"u"){if(typeof n?.coercion>"u")return pr(n,"Unbound coercion result");let h={value:a};return Array.isArray(a)?r(a,Object.assign(Object.assign({},n),{coercion:void 0}))?(n.coercions.push([(A=n.p)!==null&&A!==void 0?A:".",sI(n.coercion,a,()=>new Map(h.value))]),!0):!1:o(a,Object.assign(Object.assign({},n),{coercion:Wu(h,"value")}))?(n.coercions.push([(p=n.p)!==null&&p!==void 0?p:".",sI(n.coercion,a,()=>new Map(Object.entries(h.value)))]),!0):!1}return pr(n,`Expected a map (got ${qn(a)})`)}})}function iP(t,{delimiter:e}={}){let r=dz(t.length);return Hr({test:(o,a)=>{var n;if(typeof o=="string"&&typeof e<"u"&&typeof a?.coercions<"u"){if(typeof a?.coercion>"u")return pr(a,"Unbound coercion result");o=o.split(e),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,o)])}if(!Array.isArray(o))return pr(a,`Expected a tuple (got ${qn(o)})`);let u=r(o,Object.assign({},a));for(let A=0,p=o.length;A{var n;if(Array.isArray(o)&&typeof a?.coercions<"u")return typeof a?.coercion>"u"?pr(a,"Unbound coercion result"):r(o,Object.assign(Object.assign({},a),{coercion:void 0}))?(o=Object.fromEntries(o),a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,o)]),!0):!1;if(typeof o!="object"||o===null)return pr(a,`Expected an object (got ${qn(o)})`);let u=Object.keys(o),A=!0;for(let p=0,h=u.length;p{if(typeof a!="object"||a===null)return pr(n,`Expected an object (got ${qn(a)})`);let u=new Set([...r,...Object.keys(a)]),A={},p=!0;for(let h of u){if(h==="constructor"||h==="__proto__")p=pr(Object.assign(Object.assign({},n),{p:Kp(n,h)}),"Unsafe property name");else{let E=Object.prototype.hasOwnProperty.call(t,h)?t[h]:void 0,I=Object.prototype.hasOwnProperty.call(a,h)?a[h]:void 0;typeof E<"u"?p=E(I,Object.assign(Object.assign({},n),{p:Kp(n,h),coercion:Wu(a,h)}))&&p:e===null?p=pr(Object.assign(Object.assign({},n),{p:Kp(n,h)}),`Extraneous property (got ${qn(I)})`):Object.defineProperty(A,h,{enumerable:!0,get:()=>I,set:oqe(a,h)})}if(!p&&n?.errors==null)break}return e!==null&&(p||n?.errors!=null)&&(p=e(A,n)&&p),p}});return Object.assign(o,{properties:t})}function hqe(t){return hz(t,{extra:sP(FT())})}function gz(t){return()=>t}function Hr({test:t}){return gz(t)()}function dqe(t,e){if(!e(t))throw new zp}function mqe(t,e){let r=[];if(!e(t,{errors:r}))throw new zp({errors:r})}function yqe(t,e){}function Eqe(t,e,{coerce:r=!1,errors:o,throw:a}={}){let n=o?[]:void 0;if(!r){if(e(t,{errors:n}))return a?t:{value:t,errors:void 0};if(a)throw new zp({errors:n});return{value:void 0,errors:n??!0}}let u={value:t},A=Wu(u,"value"),p=[];if(!e(t,{errors:n,coercion:A,coercions:p})){if(a)throw new zp({errors:n});return{value:void 0,errors:n??!0}}for(let[,h]of p)h();return a?u.value:{value:u.value,errors:void 0}}function Cqe(t,e){let r=iP(t);return(...o)=>{if(!r(o))throw new zp;return e(...o)}}function wqe(t){return Hr({test:(e,r)=>e.length>=t?!0:pr(r,`Expected to have a length of at least ${t} elements (got ${e.length})`)})}function Iqe(t){return Hr({test:(e,r)=>e.length<=t?!0:pr(r,`Expected to have a length of at most ${t} elements (got ${e.length})`)})}function dz(t){return Hr({test:(e,r)=>e.length!==t?pr(r,`Expected to have a length of exactly ${t} elements (got ${e.length})`):!0})}function Bqe({map:t}={}){return Hr({test:(e,r)=>{let o=new Set,a=new Set;for(let n=0,u=e.length;nt<=0?!0:pr(e,`Expected to be negative (got ${t})`)})}function Dqe(){return Hr({test:(t,e)=>t>=0?!0:pr(e,`Expected to be positive (got ${t})`)})}function LT(t){return Hr({test:(e,r)=>e>=t?!0:pr(r,`Expected to be at least ${t} (got ${e})`)})}function Pqe(t){return Hr({test:(e,r)=>e<=t?!0:pr(r,`Expected to be at most ${t} (got ${e})`)})}function Sqe(t,e){return Hr({test:(r,o)=>r>=t&&r<=e?!0:pr(o,`Expected to be in the [${t}; ${e}] range (got ${r})`)})}function bqe(t,e){return Hr({test:(r,o)=>r>=t&&re!==Math.round(e)?pr(r,`Expected to be an integer (got ${e})`):!t&&!Number.isSafeInteger(e)?pr(r,`Expected to be a safe integer (got ${e})`):!0})}function oI(t){return Hr({test:(e,r)=>t.test(e)?!0:pr(r,`Expected to match the pattern ${t.toString()} (got ${qn(e)})`)})}function xqe(){return Hr({test:(t,e)=>t!==t.toLowerCase()?pr(e,`Expected to be all-lowercase (got ${t})`):!0})}function kqe(){return Hr({test:(t,e)=>t!==t.toUpperCase()?pr(e,`Expected to be all-uppercase (got ${t})`):!0})}function Qqe(){return Hr({test:(t,e)=>sqe.test(t)?!0:pr(e,`Expected to be a valid UUID v4 (got ${qn(t)})`)})}function Fqe(){return Hr({test:(t,e)=>fz.test(t)?!0:pr(e,`Expected to be a valid ISO 8601 date string (got ${qn(t)})`)})}function Rqe({alpha:t=!1}){return Hr({test:(e,r)=>(t?rqe.test(e):nqe.test(e))?!0:pr(r,`Expected to be a valid hexadecimal color string (got ${qn(e)})`)})}function Tqe(){return Hr({test:(t,e)=>iqe.test(t)?!0:pr(e,`Expected to be a valid base 64 string (got ${qn(t)})`)})}function Lqe(t=FT()){return Hr({test:(e,r)=>{let o;try{o=JSON.parse(e)}catch{return pr(r,`Expected to be a valid JSON string (got ${qn(e)})`)}return t(o,r)}})}function oP(t,...e){let r=Array.isArray(e[0])?e[0]:e;return Hr({test:(o,a)=>{var n,u;let A={value:o},p=typeof a?.coercions<"u"?Wu(A,"value"):void 0,h=typeof a?.coercions<"u"?[]:void 0;if(!t(o,Object.assign(Object.assign({},a),{coercion:p,coercions:h})))return!1;let E=[];if(typeof h<"u")for(let[,I]of h)E.push(I());try{if(typeof a?.coercions<"u"){if(A.value!==o){if(typeof a?.coercion>"u")return pr(a,"Unbound coercion result");a.coercions.push([(n=a.p)!==null&&n!==void 0?n:".",a.coercion.bind(null,A.value)])}(u=a?.coercions)===null||u===void 0||u.push(...h)}return r.every(I=>I(A.value,a))}finally{for(let I of E)I()}}})}function aI(t,...e){let r=Array.isArray(e[0])?e[0]:e;return oP(t,r)}function Nqe(t){return Hr({test:(e,r)=>typeof e>"u"?!0:t(e,r)})}function Oqe(t){return Hr({test:(e,r)=>e===null?!0:t(e,r)})}function Mqe(t,e){var r;let o=new Set(t),a=lI[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Hr({test:(n,u)=>{let A=new Set(Object.keys(n)),p=[];for(let h of o)a(A,h,n)||p.push(h);return p.length>0?pr(u,`Missing required ${QT(p.length,"property","properties")} ${Ey(p,"and")}`):!0}})}function OT(t,e){var r;let o=new Set(t),a=lI[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Hr({test:(n,u)=>Object.keys(n).some(h=>a(o,h,n))?!0:pr(u,`Missing at least one property from ${Ey(Array.from(o),"or")}`)})}function Uqe(t,e){var r;let o=new Set(t),a=lI[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Hr({test:(n,u)=>{let A=new Set(Object.keys(n)),p=[];for(let h of o)a(A,h,n)&&p.push(h);return p.length>0?pr(u,`Forbidden ${QT(p.length,"property","properties")} ${Ey(p,"and")}`):!0}})}function _qe(t,e){var r;let o=new Set(t),a=lI[(r=e?.missingIf)!==null&&r!==void 0?r:"missing"];return Hr({test:(n,u)=>{let A=new Set(Object.keys(n)),p=[];for(let h of o)a(A,h,n)&&p.push(h);return p.length>1?pr(u,`Mutually exclusive properties ${Ey(p,"and")}`):!0}})}function cI(t,e,r,o){var a,n;let u=new Set((a=o?.ignore)!==null&&a!==void 0?a:[]),A=lI[(n=o?.missingIf)!==null&&n!==void 0?n:"missing"],p=new Set(r),h=Hqe[e],E=e===Yu.Forbids?"or":"and";return Hr({test:(I,v)=>{let x=new Set(Object.keys(I));if(!A(x,t,I)||u.has(I[t]))return!0;let C=[];for(let R of p)(A(x,R,I)&&!u.has(I[R]))!==h.expect&&C.push(R);return C.length>=1?pr(v,`Property "${t}" ${h.message} ${QT(C.length,"property","properties")} ${Ey(C,E)}`):!0}})}var tqe,rqe,nqe,iqe,sqe,fz,aqe,gqe,TT,zp,lI,Yu,Hqe,$a=Et(()=>{tqe=/^[a-zA-Z_][a-zA-Z0-9_]*$/;rqe=/^#[0-9a-f]{6}$/i,nqe=/^#[0-9a-f]{6}([0-9a-f]{2})?$/i,iqe=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/,sqe=/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}$/i,fz=/^(?:[1-9]\d{3}(-?)(?:(?:0[1-9]|1[0-2])\1(?:0[1-9]|1\d|2[0-8])|(?:0[13-9]|1[0-2])\1(?:29|30)|(?:0[13578]|1[02])(?:\1)31|00[1-9]|0[1-9]\d|[12]\d{2}|3(?:[0-5]\d|6[0-5]))|(?:[1-9]\d(?:0[48]|[2468][048]|[13579][26])|(?:[2468][048]|[13579][26])00)(?:(-?)02(?:\2)29|-?366))T(?:[01]\d|2[0-3])(:?)[0-5]\d(?:\3[0-5]\d)?(?:Z|[+-][01]\d(?:\3[0-5]\d)?)$/;aqe=new Map([["true",!0],["True",!0],["1",!0],[1,!0],["false",!1],["False",!1],["0",!1],[0,!1]]);gqe=t=>Hr({test:(e,r)=>e instanceof t?!0:pr(r,`Expected an instance of ${t.name} (got ${qn(e)})`)}),TT=(t,{exclusive:e=!1}={})=>Hr({test:(r,o)=>{var a,n,u;let A=[],p=typeof o?.errors<"u"?[]:void 0;for(let h=0,E=t.length;h1?pr(o,`Expected to match exactly a single predicate (matched ${A.join(", ")})`):(u=o?.errors)===null||u===void 0||u.push(...p),!1}});zp=class extends Error{constructor({errors:e}={}){let r="Type mismatch";if(e&&e.length>0){r+=` `;for(let o of e)r+=` - ${o}`}super(r)}};lI={missing:(t,e)=>t.has(e),undefined:(t,e,r)=>t.has(e)&&typeof r[e]<"u",nil:(t,e,r)=>t.has(e)&&r[e]!=null,falsy:(t,e,r)=>t.has(e)&&!!r[e]};(function(t){t.Forbids="Forbids",t.Requires="Requires"})(Yu||(Yu={}));Hqe={[Yu.Forbids]:{expect:!1,message:"forbids using"},[Yu.Requires]:{expect:!0,message:"requires using"}}});var nt,Vp=Et(()=>{Ef();nt=class{constructor(){this.help=!1}static Usage(e){return e}async catch(e){throw e}async validateAndExecute(){let r=this.constructor.schema;if(Array.isArray(r)){let{isDict:a,isUnknown:n,applyCascade:u}=await Promise.resolve().then(()=>($a(),zo)),A=u(a(n()),r),p=[],h=[];if(!A(this,{errors:p,coercions:h}))throw iI("Invalid option schema",p);for(let[,I]of h)I()}else if(r!=null)throw new Error("Invalid command schema");let o=await this.execute();return typeof o<"u"?o:0}};nt.isOption=nI;nt.Default=[]});function va(t){ST&&console.log(t)}function yz(){let t={nodes:[]};for(let e=0;e{if(e.has(o))return;e.add(o);let a=t.nodes[o];for(let u of Object.values(a.statics))for(let{to:A}of u)r(A);for(let[,{to:u}]of a.dynamics)r(u);for(let{to:u}of a.shortcuts)r(u);let n=new Set(a.shortcuts.map(({to:u})=>u));for(;a.shortcuts.length>0;){let{to:u}=a.shortcuts.shift(),A=t.nodes[u];for(let[p,h]of Object.entries(A.statics)){let E=Object.prototype.hasOwnProperty.call(a.statics,p)?a.statics[p]:a.statics[p]=[];for(let I of h)E.some(({to:v})=>I.to===v)||E.push(I)}for(let[p,h]of A.dynamics)a.dynamics.some(([E,{to:I}])=>p===E&&h.to===I)||a.dynamics.push([p,h]);for(let p of A.shortcuts)n.has(p.to)||(a.shortcuts.push(p),n.add(p.to))}};r(cn.InitialNode)}function jqe(t,{prefix:e=""}={}){if(ST){va(`${e}Nodes are:`);for(let r=0;rE!==cn.ErrorNode).map(({state:E})=>({usage:E.candidateUsage,reason:null})));if(h.every(({node:E})=>E===cn.ErrorNode))throw new yy(e,h.map(({state:E})=>({usage:E.candidateUsage,reason:E.errorMessage})));o=Kqe(h)}if(o.length>0){va(" Results:");for(let n of o)va(` - ${n.node} -> ${JSON.stringify(n.state)}`)}else va(" No results");return o}function Wqe(t,e,{endToken:r=Hn.EndOfInput}={}){let o=Yqe(t,[...e,r]);return zqe(e,o.map(({state:a})=>a))}function Kqe(t){let e=0;for(let{state:r}of t)r.path.length>e&&(e=r.path.length);return t.filter(({state:r})=>r.path.length===e)}function zqe(t,e){let r=e.filter(v=>v.selectedIndex!==null),o=r.filter(v=>!v.partial);if(o.length>0&&(r=o),r.length===0)throw new Error;let a=r.filter(v=>v.selectedIndex===nd||v.requiredOptions.every(x=>x.some(C=>v.options.find(R=>R.name===C))));if(a.length===0)throw new yy(t,r.map(v=>({usage:v.candidateUsage,reason:null})));let n=0;for(let v of a)v.path.length>n&&(n=v.path.length);let u=a.filter(v=>v.path.length===n),A=v=>v.positionals.filter(({extra:x})=>!x).length+v.options.length,p=u.map(v=>({state:v,positionalCount:A(v)})),h=0;for(let{positionalCount:v}of p)v>h&&(h=v);let E=p.filter(({positionalCount:v})=>v===h).map(({state:v})=>v),I=Vqe(E);if(I.length>1)throw new eP(t,I.map(v=>v.candidateUsage));return I[0]}function Vqe(t){let e=[],r=[];for(let o of t)o.selectedIndex===nd?r.push(o):e.push(o);return r.length>0&&e.push({...mz,path:Ez(...r.map(o=>o.path)),options:r.reduce((o,a)=>o.concat(a.options),[])}),e}function Ez(t,e,...r){return e===void 0?Array.from(t):Ez(t.filter((o,a)=>o===e[a]),...r)}function el(){return{dynamics:[],shortcuts:[],statics:{}}}function Cz(t){return t===cn.SuccessNode||t===cn.ErrorNode}function MT(t,e=0){return{to:Cz(t.to)?t.to:t.to>=cn.CustomNode?t.to+e-cn.CustomNode+1:t.to+e,reducer:t.reducer}}function Jqe(t,e=0){let r=el();for(let[o,a]of t.dynamics)r.dynamics.push([o,MT(a,e)]);for(let o of t.shortcuts)r.shortcuts.push(MT(o,e));for(let[o,a]of Object.entries(t.statics))r.statics[o]=a.map(n=>MT(n,e));return r}function Ss(t,e,r,o,a){t.nodes[e].dynamics.push([r,{to:o,reducer:a}])}function wy(t,e,r,o){t.nodes[e].shortcuts.push({to:r,reducer:o})}function Vo(t,e,r,o,a){(Object.prototype.hasOwnProperty.call(t.nodes[e].statics,r)?t.nodes[e].statics[r]:t.nodes[e].statics[r]=[]).push({to:o,reducer:a})}function aP(t,e,r,o,a){if(Array.isArray(e)){let[n,...u]=e;return t[n](r,o,a,...u)}else return t[e](r,o,a)}var mz,Xqe,UT,tl,_T,Iy,lP=Et(()=>{$D();tP();mz={candidateUsage:null,requiredOptions:[],errorMessage:null,ignoreOptions:!1,path:[],positionals:[],options:[],remainder:null,selectedIndex:nd,partial:!1,tokens:[]};Xqe={always:()=>!0,isOptionLike:(t,e)=>!t.ignoreOptions&&e!=="-"&&e.startsWith("-"),isNotOptionLike:(t,e)=>t.ignoreOptions||e==="-"||!e.startsWith("-"),isOption:(t,e,r,o)=>!t.ignoreOptions&&e===o,isBatchOption:(t,e,r,o)=>!t.ignoreOptions&&cz.test(e)&&[...e.slice(1)].every(a=>o.has(`-${a}`)),isBoundOption:(t,e,r,o,a)=>{let n=e.match(PT);return!t.ignoreOptions&&!!n&&ZD.test(n[1])&&o.has(n[1])&&a.filter(u=>u.nameSet.includes(n[1])).every(u=>u.allowBinding)},isNegatedOption:(t,e,r,o)=>!t.ignoreOptions&&e===`--no-${o.slice(2)}`,isHelp:(t,e)=>!t.ignoreOptions&&DT.test(e),isUnsupportedOption:(t,e,r,o)=>!t.ignoreOptions&&e.startsWith("-")&&ZD.test(e)&&!o.has(e),isInvalidOption:(t,e)=>!t.ignoreOptions&&e.startsWith("-")&&!ZD.test(e)},UT={setCandidateState:(t,e,r,o)=>({...t,...o}),setSelectedIndex:(t,e,r,o)=>({...t,selectedIndex:o}),setPartialIndex:(t,e,r,o)=>({...t,selectedIndex:o,partial:!0}),pushBatch:(t,e,r,o)=>{let a=t.options.slice(),n=t.tokens.slice();for(let u=1;u{let[,o,a]=e.match(PT),n=t.options.concat({name:o,value:a}),u=t.tokens.concat([{segmentIndex:r,type:"option",slice:[0,o.length],option:o},{segmentIndex:r,type:"assign",slice:[o.length,o.length+1]},{segmentIndex:r,type:"value",slice:[o.length+1,o.length+a.length+1]}]);return{...t,options:n,tokens:u}},pushPath:(t,e,r)=>{let o=t.path.concat(e),a=t.tokens.concat({segmentIndex:r,type:"path"});return{...t,path:o,tokens:a}},pushPositional:(t,e,r)=>{let o=t.positionals.concat({value:e,extra:!1}),a=t.tokens.concat({segmentIndex:r,type:"positional"});return{...t,positionals:o,tokens:a}},pushExtra:(t,e,r)=>{let o=t.positionals.concat({value:e,extra:!0}),a=t.tokens.concat({segmentIndex:r,type:"positional"});return{...t,positionals:o,tokens:a}},pushExtraNoLimits:(t,e,r)=>{let o=t.positionals.concat({value:e,extra:tl}),a=t.tokens.concat({segmentIndex:r,type:"positional"});return{...t,positionals:o,tokens:a}},pushTrue:(t,e,r,o)=>{let a=t.options.concat({name:o,value:!0}),n=t.tokens.concat({segmentIndex:r,type:"option",option:o});return{...t,options:a,tokens:n}},pushFalse:(t,e,r,o)=>{let a=t.options.concat({name:o,value:!1}),n=t.tokens.concat({segmentIndex:r,type:"option",option:o});return{...t,options:a,tokens:n}},pushUndefined:(t,e,r,o)=>{let a=t.options.concat({name:e,value:void 0}),n=t.tokens.concat({segmentIndex:r,type:"option",option:e});return{...t,options:a,tokens:n}},pushStringValue:(t,e,r)=>{var o;let a=t.options[t.options.length-1],n=t.options.slice(),u=t.tokens.concat({segmentIndex:r,type:"value"});return a.value=((o=a.value)!==null&&o!==void 0?o:[]).concat([e]),{...t,options:n,tokens:u}},setStringValue:(t,e,r)=>{let o=t.options[t.options.length-1],a=t.options.slice(),n=t.tokens.concat({segmentIndex:r,type:"value"});return o.value=e,{...t,options:a,tokens:n}},inhibateOptions:t=>({...t,ignoreOptions:!0}),useHelp:(t,e,r,o)=>{let[,,a]=e.match(DT);return typeof a<"u"?{...t,options:[{name:"-c",value:String(o)},{name:"-i",value:a}]}:{...t,options:[{name:"-c",value:String(o)}]}},setError:(t,e,r,o)=>e===Hn.EndOfInput||e===Hn.EndOfPartialInput?{...t,errorMessage:`${o}.`}:{...t,errorMessage:`${o} ("${e}").`},setOptionArityError:(t,e)=>{let r=t.options[t.options.length-1];return{...t,errorMessage:`Not enough arguments to option ${r.name}.`}}},tl=Symbol(),_T=class{constructor(e,r){this.allOptionNames=new Map,this.arity={leading:[],trailing:[],extra:[],proxy:!1},this.options=[],this.paths=[],this.cliIndex=e,this.cliOpts=r}addPath(e){this.paths.push(e)}setArity({leading:e=this.arity.leading,trailing:r=this.arity.trailing,extra:o=this.arity.extra,proxy:a=this.arity.proxy}){Object.assign(this.arity,{leading:e,trailing:r,extra:o,proxy:a})}addPositional({name:e="arg",required:r=!0}={}){if(!r&&this.arity.extra===tl)throw new Error("Optional parameters cannot be declared when using .rest() or .proxy()");if(!r&&this.arity.trailing.length>0)throw new Error("Optional parameters cannot be declared after the required trailing positional arguments");!r&&this.arity.extra!==tl?this.arity.extra.push(e):this.arity.extra!==tl&&this.arity.extra.length===0?this.arity.leading.push(e):this.arity.trailing.push(e)}addRest({name:e="arg",required:r=0}={}){if(this.arity.extra===tl)throw new Error("Infinite lists cannot be declared multiple times in the same command");if(this.arity.trailing.length>0)throw new Error("Infinite lists cannot be declared after the required trailing positional arguments");for(let o=0;o1)throw new Error("The arity cannot be higher than 1 when the option only supports the --arg=value syntax");if(!Number.isInteger(o))throw new Error(`The arity must be an integer, got ${o}`);if(o<0)throw new Error(`The arity must be positive, got ${o}`);let A=e.reduce((p,h)=>h.length>p.length?h:p,"");for(let p of e)this.allOptionNames.set(p,A);this.options.push({preferredName:A,nameSet:e,description:r,arity:o,hidden:a,required:n,allowBinding:u})}setContext(e){this.context=e}usage({detailed:e=!0,inlineOptions:r=!0}={}){let o=[this.cliOpts.binaryName],a=[];if(this.paths.length>0&&o.push(...this.paths[0]),e){for(let{preferredName:u,nameSet:A,arity:p,hidden:h,description:E,required:I}of this.options){if(h)continue;let v=[];for(let C=0;C`:`[${x}]`)}o.push(...this.arity.leading.map(u=>`<${u}>`)),this.arity.extra===tl?o.push("..."):o.push(...this.arity.extra.map(u=>`[${u}]`)),o.push(...this.arity.trailing.map(u=>`<${u}>`))}return{usage:o.join(" "),options:a}}compile(){if(typeof this.context>"u")throw new Error("Assertion failed: No context attached");let e=yz(),r=cn.InitialNode,o=this.usage().usage,a=this.options.filter(A=>A.required).map(A=>A.nameSet);r=Mc(e,el()),Vo(e,cn.InitialNode,Hn.StartOfInput,r,["setCandidateState",{candidateUsage:o,requiredOptions:a}]);let n=this.arity.proxy?"always":"isNotOptionLike",u=this.paths.length>0?this.paths:[[]];for(let A of u){let p=r;if(A.length>0){let v=Mc(e,el());wy(e,p,v),this.registerOptions(e,v),p=v}for(let v=0;v0||!this.arity.proxy){let v=Mc(e,el());Ss(e,p,"isHelp",v,["useHelp",this.cliIndex]),Ss(e,v,"always",v,"pushExtra"),Vo(e,v,Hn.EndOfInput,cn.SuccessNode,["setSelectedIndex",nd]),this.registerOptions(e,p)}this.arity.leading.length>0&&(Vo(e,p,Hn.EndOfInput,cn.ErrorNode,["setError","Not enough positional arguments"]),Vo(e,p,Hn.EndOfPartialInput,cn.SuccessNode,["setPartialIndex",this.cliIndex]));let h=p;for(let v=0;v0||v+1!==this.arity.leading.length)&&(Vo(e,x,Hn.EndOfInput,cn.ErrorNode,["setError","Not enough positional arguments"]),Vo(e,x,Hn.EndOfPartialInput,cn.SuccessNode,["setPartialIndex",this.cliIndex])),Ss(e,h,"isNotOptionLike",x,"pushPositional"),h=x}let E=h;if(this.arity.extra===tl||this.arity.extra.length>0){let v=Mc(e,el());if(wy(e,h,v),this.arity.extra===tl){let x=Mc(e,el());this.arity.proxy||this.registerOptions(e,x),Ss(e,h,n,x,"pushExtraNoLimits"),Ss(e,x,n,x,"pushExtraNoLimits"),wy(e,x,v)}else for(let x=0;x0)&&this.registerOptions(e,C),Ss(e,E,n,C,"pushExtra"),wy(e,C,v),E=C}E=v}this.arity.trailing.length>0&&(Vo(e,E,Hn.EndOfInput,cn.ErrorNode,["setError","Not enough positional arguments"]),Vo(e,E,Hn.EndOfPartialInput,cn.SuccessNode,["setPartialIndex",this.cliIndex]));let I=E;for(let v=0;v=0&&e{let u=n?Hn.EndOfPartialInput:Hn.EndOfInput;return Wqe(o,a,{endToken:u})}}}}});function Iz(){return cP.default&&"getColorDepth"in cP.default.WriteStream.prototype?cP.default.WriteStream.prototype.getColorDepth():process.env.FORCE_COLOR==="0"?1:process.env.FORCE_COLOR==="1"||typeof process.stdout<"u"&&process.stdout.isTTY?8:1}function Bz(t){let e=wz;if(typeof e>"u"){if(t.stdout===process.stdout&&t.stderr===process.stderr)return null;let{AsyncLocalStorage:r}=ve("async_hooks");e=wz=new r;let o=process.stdout._write;process.stdout._write=function(n,u,A){let p=e.getStore();return typeof p>"u"?o.call(this,n,u,A):p.stdout.write(n,u,A)};let a=process.stderr._write;process.stderr._write=function(n,u,A){let p=e.getStore();return typeof p>"u"?a.call(this,n,u,A):p.stderr.write(n,u,A)}}return r=>e.run(t,r)}var cP,wz,vz=Et(()=>{cP=$e(ve("tty"),1)});var By,Dz=Et(()=>{Vp();By=class extends nt{constructor(e){super(),this.contexts=e,this.commands=[]}static from(e,r){let o=new By(r);o.path=e.path;for(let a of e.options)switch(a.name){case"-c":o.commands.push(Number(a.value));break;case"-i":o.index=Number(a.value);break}return o}async execute(){let e=this.commands;if(typeof this.index<"u"&&this.index>=0&&this.index1){this.context.stdout.write(`Multiple commands match your selection: `),this.context.stdout.write(` `);let r=0;for(let o of this.commands)this.context.stdout.write(this.cli.usage(this.contexts[o].commandClass,{prefix:`${r++}. `.padStart(5)}));this.context.stdout.write(` `),this.context.stdout.write(`Run again with -h= to see the longer details of any of those commands. `)}}}});async function bz(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=kz(t);return as.from(r,e).runExit(o,a)}async function xz(...t){let{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}=kz(t);return as.from(r,e).run(o,a)}function kz(t){let e,r,o,a;switch(typeof process<"u"&&typeof process.argv<"u"&&(o=process.argv.slice(2)),t.length){case 1:r=t[0];break;case 2:t[0]&&t[0].prototype instanceof nt||Array.isArray(t[0])?(r=t[0],Array.isArray(t[1])?o=t[1]:a=t[1]):(e=t[0],r=t[1]);break;case 3:Array.isArray(t[2])?(e=t[0],r=t[1],o=t[2]):t[0]&&t[0].prototype instanceof nt||Array.isArray(t[0])?(r=t[0],o=t[1],a=t[2]):(e=t[0],r=t[1],a=t[2]);break;default:e=t[0],r=t[1],o=t[2],a=t[3];break}if(typeof o>"u")throw new Error("The argv parameter must be provided when running Clipanion outside of a Node context");return{resolvedOptions:e,resolvedCommandClasses:r,resolvedArgv:o,resolvedContext:a}}function Sz(t){return t()}var Pz,as,Qz=Et(()=>{$D();lP();kT();vz();Vp();Dz();Pz=Symbol("clipanion/errorCommand");as=class{constructor({binaryLabel:e,binaryName:r="...",binaryVersion:o,enableCapture:a=!1,enableColors:n}={}){this.registrations=new Map,this.builder=new Iy({binaryName:r}),this.binaryLabel=e,this.binaryName=r,this.binaryVersion=o,this.enableCapture=a,this.enableColors=n}static from(e,r={}){let o=new as(r),a=Array.isArray(e)?e:[e];for(let n of a)o.register(n);return o}register(e){var r;let o=new Map,a=new e;for(let p in a){let h=a[p];typeof h=="object"&&h!==null&&h[nt.isOption]&&o.set(p,h)}let n=this.builder.command(),u=n.cliIndex,A=(r=e.paths)!==null&&r!==void 0?r:a.paths;if(typeof A<"u")for(let p of A)n.addPath(p);this.registrations.set(e,{specs:o,builder:n,index:u});for(let[p,{definition:h}]of o.entries())h(n,p);n.setContext({commandClass:e})}process(e,r){let{input:o,context:a,partial:n}=typeof e=="object"&&Array.isArray(e)?{input:e,context:r}:e,{contexts:u,process:A}=this.builder.compile(),p=A(o,{partial:n}),h={...as.defaultContext,...a};switch(p.selectedIndex){case nd:{let E=By.from(p,u);return E.context=h,E.tokens=p.tokens,E}default:{let{commandClass:E}=u[p.selectedIndex],I=this.registrations.get(E);if(typeof I>"u")throw new Error("Assertion failed: Expected the command class to have been registered.");let v=new E;v.context=h,v.tokens=p.tokens,v.path=p.path;try{for(let[x,{transformer:C}]of I.specs.entries())v[x]=C(I.builder,x,p,h);return v}catch(x){throw x[Pz]=v,x}}break}}async run(e,r){var o,a;let n,u={...as.defaultContext,...r},A=(o=this.enableColors)!==null&&o!==void 0?o:u.colorDepth>1;if(!Array.isArray(e))n=e;else try{n=this.process(e,u)}catch(E){return u.stdout.write(this.error(E,{colored:A})),1}if(n.help)return u.stdout.write(this.usage(n,{colored:A,detailed:!0})),0;n.context=u,n.cli={binaryLabel:this.binaryLabel,binaryName:this.binaryName,binaryVersion:this.binaryVersion,enableCapture:this.enableCapture,enableColors:this.enableColors,definitions:()=>this.definitions(),definition:E=>this.definition(E),error:(E,I)=>this.error(E,I),format:E=>this.format(E),process:(E,I)=>this.process(E,{...u,...I}),run:(E,I)=>this.run(E,{...u,...I}),usage:(E,I)=>this.usage(E,I)};let p=this.enableCapture&&(a=Bz(u))!==null&&a!==void 0?a:Sz,h;try{h=await p(()=>n.validateAndExecute().catch(E=>n.catch(E).then(()=>0)))}catch(E){return u.stdout.write(this.error(E,{colored:A,command:n})),1}return h}async runExit(e,r){process.exitCode=await this.run(e,r)}definition(e,{colored:r=!1}={}){if(!e.usage)return null;let{usage:o}=this.getUsageByRegistration(e,{detailed:!1}),{usage:a,options:n}=this.getUsageByRegistration(e,{detailed:!0,inlineOptions:!1}),u=typeof e.usage.category<"u"?Do(e.usage.category,{format:this.format(r),paragraphs:!1}):void 0,A=typeof e.usage.description<"u"?Do(e.usage.description,{format:this.format(r),paragraphs:!1}):void 0,p=typeof e.usage.details<"u"?Do(e.usage.details,{format:this.format(r),paragraphs:!0}):void 0,h=typeof e.usage.examples<"u"?e.usage.examples.map(([E,I])=>[Do(E,{format:this.format(r),paragraphs:!1}),I.replace(/\$0/g,this.binaryName)]):void 0;return{path:o,usage:a,category:u,description:A,details:p,examples:h,options:n}}definitions({colored:e=!1}={}){let r=[];for(let o of this.registrations.keys()){let a=this.definition(o,{colored:e});!a||r.push(a)}return r}usage(e=null,{colored:r,detailed:o=!1,prefix:a="$ "}={}){var n;if(e===null){for(let p of this.registrations.keys()){let h=p.paths,E=typeof p.usage<"u";if(!h||h.length===0||h.length===1&&h[0].length===0||((n=h?.some(x=>x.length===0))!==null&&n!==void 0?n:!1))if(e){e=null;break}else e=p;else if(E){e=null;continue}}e&&(o=!0)}let u=e!==null&&e instanceof nt?e.constructor:e,A="";if(u)if(o){let{description:p="",details:h="",examples:E=[]}=u.usage||{};p!==""&&(A+=Do(p,{format:this.format(r),paragraphs:!1}).replace(/^./,x=>x.toUpperCase()),A+=` `),(h!==""||E.length>0)&&(A+=`${this.format(r).header("Usage")} `,A+=` `);let{usage:I,options:v}=this.getUsageByRegistration(u,{inlineOptions:!1});if(A+=`${this.format(r).bold(a)}${I} `,v.length>0){A+=` `,A+=`${this.format(r).header("Options")} `;let x=v.reduce((C,R)=>Math.max(C,R.definition.length),0);A+=` `;for(let{definition:C,description:R}of v)A+=` ${this.format(r).bold(C.padEnd(x))} ${Do(R,{format:this.format(r),paragraphs:!1})}`}if(h!==""&&(A+=` `,A+=`${this.format(r).header("Details")} `,A+=` `,A+=Do(h,{format:this.format(r),paragraphs:!0})),E.length>0){A+=` `,A+=`${this.format(r).header("Examples")} `;for(let[x,C]of E)A+=` `,A+=Do(x,{format:this.format(r),paragraphs:!1}),A+=`${C.replace(/^/m,` ${this.format(r).bold(a)}`).replace(/\$0/g,this.binaryName)} `}}else{let{usage:p}=this.getUsageByRegistration(u);A+=`${this.format(r).bold(a)}${p} `}else{let p=new Map;for(let[v,{index:x}]of this.registrations.entries()){if(typeof v.usage>"u")continue;let C=typeof v.usage.category<"u"?Do(v.usage.category,{format:this.format(r),paragraphs:!1}):null,R=p.get(C);typeof R>"u"&&p.set(C,R=[]);let{usage:N}=this.getUsageByIndex(x);R.push({commandClass:v,usage:N})}let h=Array.from(p.keys()).sort((v,x)=>v===null?-1:x===null?1:v.localeCompare(x,"en",{usage:"sort",caseFirst:"upper"})),E=typeof this.binaryLabel<"u",I=typeof this.binaryVersion<"u";E||I?(E&&I?A+=`${this.format(r).header(`${this.binaryLabel} - ${this.binaryVersion}`)} `:E?A+=`${this.format(r).header(`${this.binaryLabel}`)} `:A+=`${this.format(r).header(`${this.binaryVersion}`)} `,A+=` ${this.format(r).bold(a)}${this.binaryName} `):A+=`${this.format(r).bold(a)}${this.binaryName} `;for(let v of h){let x=p.get(v).slice().sort((R,N)=>R.usage.localeCompare(N.usage,"en",{usage:"sort",caseFirst:"upper"})),C=v!==null?v.trim():"General commands";A+=` `,A+=`${this.format(r).header(`${C}`)} `;for(let{commandClass:R,usage:N}of x){let U=R.usage.description||"undocumented";A+=` `,A+=` ${this.format(r).bold(N)} `,A+=` ${Do(U,{format:this.format(r),paragraphs:!1})}`}}A+=` `,A+=Do("You can also print more details about any of these commands by calling them with the `-h,--help` flag right after the command name.",{format:this.format(r),paragraphs:!0})}return A}error(e,r){var o,{colored:a,command:n=(o=e[Pz])!==null&&o!==void 0?o:null}=r===void 0?{}:r;(!e||typeof e!="object"||!("stack"in e))&&(e=new Error(`Execution failed with a non-error rejection (rejected value: ${JSON.stringify(e)})`));let u="",A=e.name.replace(/([a-z])([A-Z])/g,"$1 $2");A==="Error"&&(A="Internal Error"),u+=`${this.format(a).error(A)}: ${e.message} `;let p=e.clipanion;return typeof p<"u"?p.type==="usage"&&(u+=` `,u+=this.usage(n)):e.stack&&(u+=`${e.stack.replace(/^.*\n/,"")} `),u}format(e){var r;return((r=e??this.enableColors)!==null&&r!==void 0?r:as.defaultContext.colorDepth>1)?uz:Az}getUsageByRegistration(e,r){let o=this.registrations.get(e);if(typeof o>"u")throw new Error("Assertion failed: Unregistered command");return this.getUsageByIndex(o.index,r)}getUsageByIndex(e,r){return this.builder.getBuilderByIndex(e).usage(r)}};as.defaultContext={env:process.env,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr,colorDepth:Iz()}});var uI,Fz=Et(()=>{Vp();uI=class extends nt{async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.definitions(),null,2)} `)}};uI.paths=[["--clipanion=definitions"]]});var AI,Rz=Et(()=>{Vp();AI=class extends nt{async execute(){this.context.stdout.write(this.cli.usage())}};AI.paths=[["-h"],["--help"]]});function uP(t={}){return Ko({definition(e,r){var o;e.addProxy({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){return o.positionals.map(({value:a})=>a)}})}var HT=Et(()=>{Ef()});var fI,Tz=Et(()=>{Vp();HT();fI=class extends nt{constructor(){super(...arguments),this.args=uP()}async execute(){this.context.stdout.write(`${JSON.stringify(this.cli.process(this.args).tokens,null,2)} `)}};fI.paths=[["--clipanion=tokens"]]});var pI,Lz=Et(()=>{Vp();pI=class extends nt{async execute(){var e;this.context.stdout.write(`${(e=this.cli.binaryVersion)!==null&&e!==void 0?e:""} `)}};pI.paths=[["-v"],["--version"]]});var qT={};zt(qT,{DefinitionsCommand:()=>uI,HelpCommand:()=>AI,TokensCommand:()=>fI,VersionCommand:()=>pI});var Nz=Et(()=>{Fz();Rz();Tz();Lz()});function Oz(t,e,r){let[o,a]=ju(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Ko({definition(p){p.addOption({names:u,arity:n,hidden:a?.hidden,description:a?.description,required:a.required})},transformer(p,h,E){let I,v=typeof o<"u"?[...o]:void 0;for(let{name:x,value:C}of E.options)!A.has(x)||(I=x,v=v??[],v.push(C));return typeof v<"u"?id(I??h,v,a.validator):v}})}var Mz=Et(()=>{Ef()});function Uz(t,e,r){let[o,a]=ju(e,r??{}),n=t.split(","),u=new Set(n);return Ko({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let E=o;for(let{name:I,value:v}of h.options)!u.has(I)||(E=v);return E}})}var _z=Et(()=>{Ef()});function Hz(t,e,r){let[o,a]=ju(e,r??{}),n=t.split(","),u=new Set(n);return Ko({definition(A){A.addOption({names:n,allowBinding:!1,arity:0,hidden:a.hidden,description:a.description,required:a.required})},transformer(A,p,h){let E=o;for(let{name:I,value:v}of h.options)!u.has(I)||(E??(E=0),v?E+=1:E=0);return E}})}var qz=Et(()=>{Ef()});function Gz(t={}){return Ko({definition(e,r){var o;e.addRest({name:(o=t.name)!==null&&o!==void 0?o:r,required:t.required})},transformer(e,r,o){let a=u=>{let A=o.positionals[u];return A.extra===tl||A.extra===!1&&uu)}})}var jz=Et(()=>{lP();Ef()});function Zqe(t,e,r){let[o,a]=ju(e,r??{}),{arity:n=1}=a,u=t.split(","),A=new Set(u);return Ko({definition(p){p.addOption({names:u,arity:a.tolerateBoolean?0:n,hidden:a.hidden,description:a.description,required:a.required})},transformer(p,h,E,I){let v,x=o;typeof a.env<"u"&&I.env[a.env]&&(v=a.env,x=I.env[a.env]);for(let{name:C,value:R}of E.options)!A.has(C)||(v=C,x=R);return typeof x=="string"?id(v??h,x,a.validator):x}})}function $qe(t={}){let{required:e=!0}=t;return Ko({definition(r,o){var a;r.addPositional({name:(a=t.name)!==null&&a!==void 0?a:o,required:t.required})},transformer(r,o,a){var n;for(let u=0;u{lP();Ef()});var ge={};zt(ge,{Array:()=>Oz,Boolean:()=>Uz,Counter:()=>Hz,Proxy:()=>uP,Rest:()=>Gz,String:()=>Yz,applyValidator:()=>id,cleanValidationError:()=>rP,formatError:()=>iI,isOptionSymbol:()=>nI,makeCommandOption:()=>Ko,rerouteArguments:()=>ju});var Kz=Et(()=>{Ef();HT();Mz();_z();qz();jz();Wz()});var hI={};zt(hI,{Builtins:()=>qT,Cli:()=>as,Command:()=>nt,Option:()=>ge,UsageError:()=>it,formatMarkdownish:()=>Do,run:()=>xz,runExit:()=>bz});var qt=Et(()=>{tP();kT();Vp();Qz();Nz();Kz()});var zz=_((bkt,eGe)=>{eGe.exports={name:"dotenv",version:"16.3.1",description:"Loads environment variables from .env file",main:"lib/main.js",types:"lib/main.d.ts",exports:{".":{types:"./lib/main.d.ts",require:"./lib/main.js",default:"./lib/main.js"},"./config":"./config.js","./config.js":"./config.js","./lib/env-options":"./lib/env-options.js","./lib/env-options.js":"./lib/env-options.js","./lib/cli-options":"./lib/cli-options.js","./lib/cli-options.js":"./lib/cli-options.js","./package.json":"./package.json"},scripts:{"dts-check":"tsc --project tests/types/tsconfig.json",lint:"standard","lint-readme":"standard-markdown",pretest:"npm run lint && npm run dts-check",test:"tap tests/*.js --100 -Rspec",prerelease:"npm test",release:"standard-version"},repository:{type:"git",url:"git://github.com/motdotla/dotenv.git"},funding:"https://github.com/motdotla/dotenv?sponsor=1",keywords:["dotenv","env",".env","environment","variables","config","settings"],readmeFilename:"README.md",license:"BSD-2-Clause",devDependencies:{"@definitelytyped/dtslint":"^0.0.133","@types/node":"^18.11.3",decache:"^4.6.1",sinon:"^14.0.1",standard:"^17.0.0","standard-markdown":"^7.1.0","standard-version":"^9.5.0",tap:"^16.3.0",tar:"^6.1.11",typescript:"^4.8.4"},engines:{node:">=12"},browser:{fs:!1}}});var Zz=_((xkt,Cf)=>{var Vz=ve("fs"),jT=ve("path"),tGe=ve("os"),rGe=ve("crypto"),nGe=zz(),YT=nGe.version,iGe=/(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/mg;function sGe(t){let e={},r=t.toString();r=r.replace(/\r\n?/mg,` `);let o;for(;(o=iGe.exec(r))!=null;){let a=o[1],n=o[2]||"";n=n.trim();let u=n[0];n=n.replace(/^(['"`])([\s\S]*)\1$/mg,"$2"),u==='"'&&(n=n.replace(/\\n/g,` `),n=n.replace(/\\r/g,"\r")),e[a]=n}return e}function oGe(t){let e=Xz(t),r=bs.configDotenv({path:e});if(!r.parsed)throw new Error(`MISSING_DATA: Cannot parse ${e} for an unknown reason`);let o=Jz(t).split(","),a=o.length,n;for(let u=0;u=a)throw A}return bs.parse(n)}function aGe(t){console.log(`[dotenv@${YT}][INFO] ${t}`)}function lGe(t){console.log(`[dotenv@${YT}][WARN] ${t}`)}function GT(t){console.log(`[dotenv@${YT}][DEBUG] ${t}`)}function Jz(t){return t&&t.DOTENV_KEY&&t.DOTENV_KEY.length>0?t.DOTENV_KEY:process.env.DOTENV_KEY&&process.env.DOTENV_KEY.length>0?process.env.DOTENV_KEY:""}function cGe(t,e){let r;try{r=new URL(e)}catch(A){throw A.code==="ERR_INVALID_URL"?new Error("INVALID_DOTENV_KEY: Wrong format. Must be in valid uri format like dotenv://:key_1234@dotenv.org/vault/.env.vault?environment=development"):A}let o=r.password;if(!o)throw new Error("INVALID_DOTENV_KEY: Missing key part");let a=r.searchParams.get("environment");if(!a)throw new Error("INVALID_DOTENV_KEY: Missing environment part");let n=`DOTENV_VAULT_${a.toUpperCase()}`,u=t.parsed[n];if(!u)throw new Error(`NOT_FOUND_DOTENV_ENVIRONMENT: Cannot locate environment ${n} in your .env.vault file.`);return{ciphertext:u,key:o}}function Xz(t){let e=jT.resolve(process.cwd(),".env");return t&&t.path&&t.path.length>0&&(e=t.path),e.endsWith(".vault")?e:`${e}.vault`}function uGe(t){return t[0]==="~"?jT.join(tGe.homedir(),t.slice(1)):t}function AGe(t){aGe("Loading env from encrypted .env.vault");let e=bs._parseVault(t),r=process.env;return t&&t.processEnv!=null&&(r=t.processEnv),bs.populate(r,e,t),{parsed:e}}function fGe(t){let e=jT.resolve(process.cwd(),".env"),r="utf8",o=Boolean(t&&t.debug);t&&(t.path!=null&&(e=uGe(t.path)),t.encoding!=null&&(r=t.encoding));try{let a=bs.parse(Vz.readFileSync(e,{encoding:r})),n=process.env;return t&&t.processEnv!=null&&(n=t.processEnv),bs.populate(n,a,t),{parsed:a}}catch(a){return o&>(`Failed to load ${e} ${a.message}`),{error:a}}}function pGe(t){let e=Xz(t);return Jz(t).length===0?bs.configDotenv(t):Vz.existsSync(e)?bs._configVault(t):(lGe(`You set DOTENV_KEY but you are missing a .env.vault file at ${e}. Did you forget to build it?`),bs.configDotenv(t))}function hGe(t,e){let r=Buffer.from(e.slice(-64),"hex"),o=Buffer.from(t,"base64"),a=o.slice(0,12),n=o.slice(-16);o=o.slice(12,-16);try{let u=rGe.createDecipheriv("aes-256-gcm",r,a);return u.setAuthTag(n),`${u.update(o)}${u.final()}`}catch(u){let A=u instanceof RangeError,p=u.message==="Invalid key length",h=u.message==="Unsupported state or unable to authenticate data";if(A||p){let E="INVALID_DOTENV_KEY: It must be 64 characters long (or more)";throw new Error(E)}else if(h){let E="DECRYPTION_FAILED: Please check your DOTENV_KEY";throw new Error(E)}else throw console.error("Error: ",u.code),console.error("Error: ",u.message),u}}function gGe(t,e,r={}){let o=Boolean(r&&r.debug),a=Boolean(r&&r.override);if(typeof e!="object")throw new Error("OBJECT_REQUIRED: Please check the processEnv argument being passed to populate");for(let n of Object.keys(e))Object.prototype.hasOwnProperty.call(t,n)?(a===!0&&(t[n]=e[n]),o&>(a===!0?`"${n}" is already defined and WAS overwritten`:`"${n}" is already defined and was NOT overwritten`)):t[n]=e[n]}var bs={configDotenv:fGe,_configVault:AGe,_parseVault:oGe,config:pGe,decrypt:hGe,parse:sGe,populate:gGe};Cf.exports.configDotenv=bs.configDotenv;Cf.exports._configVault=bs._configVault;Cf.exports._parseVault=bs._parseVault;Cf.exports.config=bs.config;Cf.exports.decrypt=bs.decrypt;Cf.exports.parse=bs.parse;Cf.exports.populate=bs.populate;Cf.exports=bs});var eV=_((kkt,$z)=>{"use strict";$z.exports=(t,...e)=>new Promise(r=>{r(t(...e))})});var sd=_((Qkt,WT)=>{"use strict";var dGe=eV(),tV=t=>{if(t<1)throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=[],r=0,o=()=>{r--,e.length>0&&e.shift()()},a=(A,p,...h)=>{r++;let E=dGe(A,...h);p(E),E.then(o,o)},n=(A,p,...h)=>{rnew Promise(h=>n(A,h,...p));return Object.defineProperties(u,{activeCount:{get:()=>r},pendingCount:{get:()=>e.length}}),u};WT.exports=tV;WT.exports.default=tV});function Ku(t){return`YN${t.toString(10).padStart(4,"0")}`}function AP(t){let e=Number(t.slice(2));if(typeof wr[e]>"u")throw new Error(`Unknown message name: "${t}"`);return e}var wr,fP=Et(()=>{wr=(Oe=>(Oe[Oe.UNNAMED=0]="UNNAMED",Oe[Oe.EXCEPTION=1]="EXCEPTION",Oe[Oe.MISSING_PEER_DEPENDENCY=2]="MISSING_PEER_DEPENDENCY",Oe[Oe.CYCLIC_DEPENDENCIES=3]="CYCLIC_DEPENDENCIES",Oe[Oe.DISABLED_BUILD_SCRIPTS=4]="DISABLED_BUILD_SCRIPTS",Oe[Oe.BUILD_DISABLED=5]="BUILD_DISABLED",Oe[Oe.SOFT_LINK_BUILD=6]="SOFT_LINK_BUILD",Oe[Oe.MUST_BUILD=7]="MUST_BUILD",Oe[Oe.MUST_REBUILD=8]="MUST_REBUILD",Oe[Oe.BUILD_FAILED=9]="BUILD_FAILED",Oe[Oe.RESOLVER_NOT_FOUND=10]="RESOLVER_NOT_FOUND",Oe[Oe.FETCHER_NOT_FOUND=11]="FETCHER_NOT_FOUND",Oe[Oe.LINKER_NOT_FOUND=12]="LINKER_NOT_FOUND",Oe[Oe.FETCH_NOT_CACHED=13]="FETCH_NOT_CACHED",Oe[Oe.YARN_IMPORT_FAILED=14]="YARN_IMPORT_FAILED",Oe[Oe.REMOTE_INVALID=15]="REMOTE_INVALID",Oe[Oe.REMOTE_NOT_FOUND=16]="REMOTE_NOT_FOUND",Oe[Oe.RESOLUTION_PACK=17]="RESOLUTION_PACK",Oe[Oe.CACHE_CHECKSUM_MISMATCH=18]="CACHE_CHECKSUM_MISMATCH",Oe[Oe.UNUSED_CACHE_ENTRY=19]="UNUSED_CACHE_ENTRY",Oe[Oe.MISSING_LOCKFILE_ENTRY=20]="MISSING_LOCKFILE_ENTRY",Oe[Oe.WORKSPACE_NOT_FOUND=21]="WORKSPACE_NOT_FOUND",Oe[Oe.TOO_MANY_MATCHING_WORKSPACES=22]="TOO_MANY_MATCHING_WORKSPACES",Oe[Oe.CONSTRAINTS_MISSING_DEPENDENCY=23]="CONSTRAINTS_MISSING_DEPENDENCY",Oe[Oe.CONSTRAINTS_INCOMPATIBLE_DEPENDENCY=24]="CONSTRAINTS_INCOMPATIBLE_DEPENDENCY",Oe[Oe.CONSTRAINTS_EXTRANEOUS_DEPENDENCY=25]="CONSTRAINTS_EXTRANEOUS_DEPENDENCY",Oe[Oe.CONSTRAINTS_INVALID_DEPENDENCY=26]="CONSTRAINTS_INVALID_DEPENDENCY",Oe[Oe.CANT_SUGGEST_RESOLUTIONS=27]="CANT_SUGGEST_RESOLUTIONS",Oe[Oe.FROZEN_LOCKFILE_EXCEPTION=28]="FROZEN_LOCKFILE_EXCEPTION",Oe[Oe.CROSS_DRIVE_VIRTUAL_LOCAL=29]="CROSS_DRIVE_VIRTUAL_LOCAL",Oe[Oe.FETCH_FAILED=30]="FETCH_FAILED",Oe[Oe.DANGEROUS_NODE_MODULES=31]="DANGEROUS_NODE_MODULES",Oe[Oe.NODE_GYP_INJECTED=32]="NODE_GYP_INJECTED",Oe[Oe.AUTHENTICATION_NOT_FOUND=33]="AUTHENTICATION_NOT_FOUND",Oe[Oe.INVALID_CONFIGURATION_KEY=34]="INVALID_CONFIGURATION_KEY",Oe[Oe.NETWORK_ERROR=35]="NETWORK_ERROR",Oe[Oe.LIFECYCLE_SCRIPT=36]="LIFECYCLE_SCRIPT",Oe[Oe.CONSTRAINTS_MISSING_FIELD=37]="CONSTRAINTS_MISSING_FIELD",Oe[Oe.CONSTRAINTS_INCOMPATIBLE_FIELD=38]="CONSTRAINTS_INCOMPATIBLE_FIELD",Oe[Oe.CONSTRAINTS_EXTRANEOUS_FIELD=39]="CONSTRAINTS_EXTRANEOUS_FIELD",Oe[Oe.CONSTRAINTS_INVALID_FIELD=40]="CONSTRAINTS_INVALID_FIELD",Oe[Oe.AUTHENTICATION_INVALID=41]="AUTHENTICATION_INVALID",Oe[Oe.PROLOG_UNKNOWN_ERROR=42]="PROLOG_UNKNOWN_ERROR",Oe[Oe.PROLOG_SYNTAX_ERROR=43]="PROLOG_SYNTAX_ERROR",Oe[Oe.PROLOG_EXISTENCE_ERROR=44]="PROLOG_EXISTENCE_ERROR",Oe[Oe.STACK_OVERFLOW_RESOLUTION=45]="STACK_OVERFLOW_RESOLUTION",Oe[Oe.AUTOMERGE_FAILED_TO_PARSE=46]="AUTOMERGE_FAILED_TO_PARSE",Oe[Oe.AUTOMERGE_IMMUTABLE=47]="AUTOMERGE_IMMUTABLE",Oe[Oe.AUTOMERGE_SUCCESS=48]="AUTOMERGE_SUCCESS",Oe[Oe.AUTOMERGE_REQUIRED=49]="AUTOMERGE_REQUIRED",Oe[Oe.DEPRECATED_CLI_SETTINGS=50]="DEPRECATED_CLI_SETTINGS",Oe[Oe.PLUGIN_NAME_NOT_FOUND=51]="PLUGIN_NAME_NOT_FOUND",Oe[Oe.INVALID_PLUGIN_REFERENCE=52]="INVALID_PLUGIN_REFERENCE",Oe[Oe.CONSTRAINTS_AMBIGUITY=53]="CONSTRAINTS_AMBIGUITY",Oe[Oe.CACHE_OUTSIDE_PROJECT=54]="CACHE_OUTSIDE_PROJECT",Oe[Oe.IMMUTABLE_INSTALL=55]="IMMUTABLE_INSTALL",Oe[Oe.IMMUTABLE_CACHE=56]="IMMUTABLE_CACHE",Oe[Oe.INVALID_MANIFEST=57]="INVALID_MANIFEST",Oe[Oe.PACKAGE_PREPARATION_FAILED=58]="PACKAGE_PREPARATION_FAILED",Oe[Oe.INVALID_RANGE_PEER_DEPENDENCY=59]="INVALID_RANGE_PEER_DEPENDENCY",Oe[Oe.INCOMPATIBLE_PEER_DEPENDENCY=60]="INCOMPATIBLE_PEER_DEPENDENCY",Oe[Oe.DEPRECATED_PACKAGE=61]="DEPRECATED_PACKAGE",Oe[Oe.INCOMPATIBLE_OS=62]="INCOMPATIBLE_OS",Oe[Oe.INCOMPATIBLE_CPU=63]="INCOMPATIBLE_CPU",Oe[Oe.FROZEN_ARTIFACT_EXCEPTION=64]="FROZEN_ARTIFACT_EXCEPTION",Oe[Oe.TELEMETRY_NOTICE=65]="TELEMETRY_NOTICE",Oe[Oe.PATCH_HUNK_FAILED=66]="PATCH_HUNK_FAILED",Oe[Oe.INVALID_CONFIGURATION_VALUE=67]="INVALID_CONFIGURATION_VALUE",Oe[Oe.UNUSED_PACKAGE_EXTENSION=68]="UNUSED_PACKAGE_EXTENSION",Oe[Oe.REDUNDANT_PACKAGE_EXTENSION=69]="REDUNDANT_PACKAGE_EXTENSION",Oe[Oe.AUTO_NM_SUCCESS=70]="AUTO_NM_SUCCESS",Oe[Oe.NM_CANT_INSTALL_EXTERNAL_SOFT_LINK=71]="NM_CANT_INSTALL_EXTERNAL_SOFT_LINK",Oe[Oe.NM_PRESERVE_SYMLINKS_REQUIRED=72]="NM_PRESERVE_SYMLINKS_REQUIRED",Oe[Oe.UPDATE_LOCKFILE_ONLY_SKIP_LINK=73]="UPDATE_LOCKFILE_ONLY_SKIP_LINK",Oe[Oe.NM_HARDLINKS_MODE_DOWNGRADED=74]="NM_HARDLINKS_MODE_DOWNGRADED",Oe[Oe.PROLOG_INSTANTIATION_ERROR=75]="PROLOG_INSTANTIATION_ERROR",Oe[Oe.INCOMPATIBLE_ARCHITECTURE=76]="INCOMPATIBLE_ARCHITECTURE",Oe[Oe.GHOST_ARCHITECTURE=77]="GHOST_ARCHITECTURE",Oe[Oe.RESOLUTION_MISMATCH=78]="RESOLUTION_MISMATCH",Oe[Oe.PROLOG_LIMIT_EXCEEDED=79]="PROLOG_LIMIT_EXCEEDED",Oe[Oe.NETWORK_DISABLED=80]="NETWORK_DISABLED",Oe[Oe.NETWORK_UNSAFE_HTTP=81]="NETWORK_UNSAFE_HTTP",Oe[Oe.RESOLUTION_FAILED=82]="RESOLUTION_FAILED",Oe[Oe.AUTOMERGE_GIT_ERROR=83]="AUTOMERGE_GIT_ERROR",Oe[Oe.CONSTRAINTS_CHECK_FAILED=84]="CONSTRAINTS_CHECK_FAILED",Oe[Oe.UPDATED_RESOLUTION_RECORD=85]="UPDATED_RESOLUTION_RECORD",Oe[Oe.EXPLAIN_PEER_DEPENDENCIES_CTA=86]="EXPLAIN_PEER_DEPENDENCIES_CTA",Oe[Oe.MIGRATION_SUCCESS=87]="MIGRATION_SUCCESS",Oe[Oe.VERSION_NOTICE=88]="VERSION_NOTICE",Oe[Oe.TIPS_NOTICE=89]="TIPS_NOTICE",Oe[Oe.OFFLINE_MODE_ENABLED=90]="OFFLINE_MODE_ENABLED",Oe))(wr||{})});var gI=_((Rkt,rV)=>{var mGe="2.0.0",yGe=Number.MAX_SAFE_INTEGER||9007199254740991,EGe=16,CGe=256-6,wGe=["major","premajor","minor","preminor","patch","prepatch","prerelease"];rV.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:EGe,MAX_SAFE_BUILD_LENGTH:CGe,MAX_SAFE_INTEGER:yGe,RELEASE_TYPES:wGe,SEMVER_SPEC_VERSION:mGe,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}});var dI=_((Tkt,nV)=>{var IGe=typeof process=="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};nV.exports=IGe});var vy=_((wf,iV)=>{var{MAX_SAFE_COMPONENT_LENGTH:KT,MAX_SAFE_BUILD_LENGTH:BGe,MAX_LENGTH:vGe}=gI(),DGe=dI();wf=iV.exports={};var PGe=wf.re=[],SGe=wf.safeRe=[],lr=wf.src=[],cr=wf.t={},bGe=0,zT="[a-zA-Z0-9-]",xGe=[["\\s",1],["\\d",vGe],[zT,BGe]],kGe=t=>{for(let[e,r]of xGe)t=t.split(`${e}*`).join(`${e}{0,${r}}`).split(`${e}+`).join(`${e}{1,${r}}`);return t},Vr=(t,e,r)=>{let o=kGe(e),a=bGe++;DGe(t,a,e),cr[t]=a,lr[a]=e,PGe[a]=new RegExp(e,r?"g":void 0),SGe[a]=new RegExp(o,r?"g":void 0)};Vr("NUMERICIDENTIFIER","0|[1-9]\\d*");Vr("NUMERICIDENTIFIERLOOSE","\\d+");Vr("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${zT}*`);Vr("MAINVERSION",`(${lr[cr.NUMERICIDENTIFIER]})\\.(${lr[cr.NUMERICIDENTIFIER]})\\.(${lr[cr.NUMERICIDENTIFIER]})`);Vr("MAINVERSIONLOOSE",`(${lr[cr.NUMERICIDENTIFIERLOOSE]})\\.(${lr[cr.NUMERICIDENTIFIERLOOSE]})\\.(${lr[cr.NUMERICIDENTIFIERLOOSE]})`);Vr("PRERELEASEIDENTIFIER",`(?:${lr[cr.NUMERICIDENTIFIER]}|${lr[cr.NONNUMERICIDENTIFIER]})`);Vr("PRERELEASEIDENTIFIERLOOSE",`(?:${lr[cr.NUMERICIDENTIFIERLOOSE]}|${lr[cr.NONNUMERICIDENTIFIER]})`);Vr("PRERELEASE",`(?:-(${lr[cr.PRERELEASEIDENTIFIER]}(?:\\.${lr[cr.PRERELEASEIDENTIFIER]})*))`);Vr("PRERELEASELOOSE",`(?:-?(${lr[cr.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${lr[cr.PRERELEASEIDENTIFIERLOOSE]})*))`);Vr("BUILDIDENTIFIER",`${zT}+`);Vr("BUILD",`(?:\\+(${lr[cr.BUILDIDENTIFIER]}(?:\\.${lr[cr.BUILDIDENTIFIER]})*))`);Vr("FULLPLAIN",`v?${lr[cr.MAINVERSION]}${lr[cr.PRERELEASE]}?${lr[cr.BUILD]}?`);Vr("FULL",`^${lr[cr.FULLPLAIN]}$`);Vr("LOOSEPLAIN",`[v=\\s]*${lr[cr.MAINVERSIONLOOSE]}${lr[cr.PRERELEASELOOSE]}?${lr[cr.BUILD]}?`);Vr("LOOSE",`^${lr[cr.LOOSEPLAIN]}$`);Vr("GTLT","((?:<|>)?=?)");Vr("XRANGEIDENTIFIERLOOSE",`${lr[cr.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);Vr("XRANGEIDENTIFIER",`${lr[cr.NUMERICIDENTIFIER]}|x|X|\\*`);Vr("XRANGEPLAIN",`[v=\\s]*(${lr[cr.XRANGEIDENTIFIER]})(?:\\.(${lr[cr.XRANGEIDENTIFIER]})(?:\\.(${lr[cr.XRANGEIDENTIFIER]})(?:${lr[cr.PRERELEASE]})?${lr[cr.BUILD]}?)?)?`);Vr("XRANGEPLAINLOOSE",`[v=\\s]*(${lr[cr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${lr[cr.XRANGEIDENTIFIERLOOSE]})(?:\\.(${lr[cr.XRANGEIDENTIFIERLOOSE]})(?:${lr[cr.PRERELEASELOOSE]})?${lr[cr.BUILD]}?)?)?`);Vr("XRANGE",`^${lr[cr.GTLT]}\\s*${lr[cr.XRANGEPLAIN]}$`);Vr("XRANGELOOSE",`^${lr[cr.GTLT]}\\s*${lr[cr.XRANGEPLAINLOOSE]}$`);Vr("COERCE",`(^|[^\\d])(\\d{1,${KT}})(?:\\.(\\d{1,${KT}}))?(?:\\.(\\d{1,${KT}}))?(?:$|[^\\d])`);Vr("COERCERTL",lr[cr.COERCE],!0);Vr("LONETILDE","(?:~>?)");Vr("TILDETRIM",`(\\s*)${lr[cr.LONETILDE]}\\s+`,!0);wf.tildeTrimReplace="$1~";Vr("TILDE",`^${lr[cr.LONETILDE]}${lr[cr.XRANGEPLAIN]}$`);Vr("TILDELOOSE",`^${lr[cr.LONETILDE]}${lr[cr.XRANGEPLAINLOOSE]}$`);Vr("LONECARET","(?:\\^)");Vr("CARETTRIM",`(\\s*)${lr[cr.LONECARET]}\\s+`,!0);wf.caretTrimReplace="$1^";Vr("CARET",`^${lr[cr.LONECARET]}${lr[cr.XRANGEPLAIN]}$`);Vr("CARETLOOSE",`^${lr[cr.LONECARET]}${lr[cr.XRANGEPLAINLOOSE]}$`);Vr("COMPARATORLOOSE",`^${lr[cr.GTLT]}\\s*(${lr[cr.LOOSEPLAIN]})$|^$`);Vr("COMPARATOR",`^${lr[cr.GTLT]}\\s*(${lr[cr.FULLPLAIN]})$|^$`);Vr("COMPARATORTRIM",`(\\s*)${lr[cr.GTLT]}\\s*(${lr[cr.LOOSEPLAIN]}|${lr[cr.XRANGEPLAIN]})`,!0);wf.comparatorTrimReplace="$1$2$3";Vr("HYPHENRANGE",`^\\s*(${lr[cr.XRANGEPLAIN]})\\s+-\\s+(${lr[cr.XRANGEPLAIN]})\\s*$`);Vr("HYPHENRANGELOOSE",`^\\s*(${lr[cr.XRANGEPLAINLOOSE]})\\s+-\\s+(${lr[cr.XRANGEPLAINLOOSE]})\\s*$`);Vr("STAR","(<|>)?=?\\s*\\*");Vr("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");Vr("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")});var pP=_((Lkt,sV)=>{var QGe=Object.freeze({loose:!0}),FGe=Object.freeze({}),RGe=t=>t?typeof t!="object"?QGe:t:FGe;sV.exports=RGe});var VT=_((Nkt,lV)=>{var oV=/^[0-9]+$/,aV=(t,e)=>{let r=oV.test(t),o=oV.test(e);return r&&o&&(t=+t,e=+e),t===e?0:r&&!o?-1:o&&!r?1:taV(e,t);lV.exports={compareIdentifiers:aV,rcompareIdentifiers:TGe}});var Po=_((Okt,fV)=>{var hP=dI(),{MAX_LENGTH:cV,MAX_SAFE_INTEGER:gP}=gI(),{safeRe:uV,t:AV}=vy(),LGe=pP(),{compareIdentifiers:Dy}=VT(),rl=class{constructor(e,r){if(r=LGe(r),e instanceof rl){if(e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease)return e;e=e.version}else if(typeof e!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>cV)throw new TypeError(`version is longer than ${cV} characters`);hP("SemVer",e,r),this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease;let o=e.trim().match(r.loose?uV[AV.LOOSE]:uV[AV.FULL]);if(!o)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+o[1],this.minor=+o[2],this.patch=+o[3],this.major>gP||this.major<0)throw new TypeError("Invalid major version");if(this.minor>gP||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>gP||this.patch<0)throw new TypeError("Invalid patch version");o[4]?this.prerelease=o[4].split(".").map(a=>{if(/^[0-9]+$/.test(a)){let n=+a;if(n>=0&&n=0;)typeof this.prerelease[n]=="number"&&(this.prerelease[n]++,n=-2);if(n===-1){if(r===this.prerelease.join(".")&&o===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(a)}}if(r){let n=[r,a];o===!1&&(n=[r]),Dy(this.prerelease[0],r)===0?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}};fV.exports=rl});var od=_((Mkt,hV)=>{var pV=Po(),NGe=(t,e,r=!1)=>{if(t instanceof pV)return t;try{return new pV(t,e)}catch(o){if(!r)return null;throw o}};hV.exports=NGe});var dV=_((Ukt,gV)=>{var OGe=od(),MGe=(t,e)=>{let r=OGe(t,e);return r?r.version:null};gV.exports=MGe});var yV=_((_kt,mV)=>{var UGe=od(),_Ge=(t,e)=>{let r=UGe(t.trim().replace(/^[=v]+/,""),e);return r?r.version:null};mV.exports=_Ge});var wV=_((Hkt,CV)=>{var EV=Po(),HGe=(t,e,r,o,a)=>{typeof r=="string"&&(a=o,o=r,r=void 0);try{return new EV(t instanceof EV?t.version:t,r).inc(e,o,a).version}catch{return null}};CV.exports=HGe});var vV=_((qkt,BV)=>{var IV=od(),qGe=(t,e)=>{let r=IV(t,null,!0),o=IV(e,null,!0),a=r.compare(o);if(a===0)return null;let n=a>0,u=n?r:o,A=n?o:r,p=!!u.prerelease.length;if(!!A.prerelease.length&&!p)return!A.patch&&!A.minor?"major":u.patch?"patch":u.minor?"minor":"major";let E=p?"pre":"";return r.major!==o.major?E+"major":r.minor!==o.minor?E+"minor":r.patch!==o.patch?E+"patch":"prerelease"};BV.exports=qGe});var PV=_((Gkt,DV)=>{var GGe=Po(),jGe=(t,e)=>new GGe(t,e).major;DV.exports=jGe});var bV=_((jkt,SV)=>{var YGe=Po(),WGe=(t,e)=>new YGe(t,e).minor;SV.exports=WGe});var kV=_((Ykt,xV)=>{var KGe=Po(),zGe=(t,e)=>new KGe(t,e).patch;xV.exports=zGe});var FV=_((Wkt,QV)=>{var VGe=od(),JGe=(t,e)=>{let r=VGe(t,e);return r&&r.prerelease.length?r.prerelease:null};QV.exports=JGe});var Ol=_((Kkt,TV)=>{var RV=Po(),XGe=(t,e,r)=>new RV(t,r).compare(new RV(e,r));TV.exports=XGe});var NV=_((zkt,LV)=>{var ZGe=Ol(),$Ge=(t,e,r)=>ZGe(e,t,r);LV.exports=$Ge});var MV=_((Vkt,OV)=>{var eje=Ol(),tje=(t,e)=>eje(t,e,!0);OV.exports=tje});var dP=_((Jkt,_V)=>{var UV=Po(),rje=(t,e,r)=>{let o=new UV(t,r),a=new UV(e,r);return o.compare(a)||o.compareBuild(a)};_V.exports=rje});var qV=_((Xkt,HV)=>{var nje=dP(),ije=(t,e)=>t.sort((r,o)=>nje(r,o,e));HV.exports=ije});var jV=_((Zkt,GV)=>{var sje=dP(),oje=(t,e)=>t.sort((r,o)=>sje(o,r,e));GV.exports=oje});var mI=_(($kt,YV)=>{var aje=Ol(),lje=(t,e,r)=>aje(t,e,r)>0;YV.exports=lje});var mP=_((eQt,WV)=>{var cje=Ol(),uje=(t,e,r)=>cje(t,e,r)<0;WV.exports=uje});var JT=_((tQt,KV)=>{var Aje=Ol(),fje=(t,e,r)=>Aje(t,e,r)===0;KV.exports=fje});var XT=_((rQt,zV)=>{var pje=Ol(),hje=(t,e,r)=>pje(t,e,r)!==0;zV.exports=hje});var yP=_((nQt,VV)=>{var gje=Ol(),dje=(t,e,r)=>gje(t,e,r)>=0;VV.exports=dje});var EP=_((iQt,JV)=>{var mje=Ol(),yje=(t,e,r)=>mje(t,e,r)<=0;JV.exports=yje});var ZT=_((sQt,XV)=>{var Eje=JT(),Cje=XT(),wje=mI(),Ije=yP(),Bje=mP(),vje=EP(),Dje=(t,e,r,o)=>{switch(e){case"===":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t===r;case"!==":return typeof t=="object"&&(t=t.version),typeof r=="object"&&(r=r.version),t!==r;case"":case"=":case"==":return Eje(t,r,o);case"!=":return Cje(t,r,o);case">":return wje(t,r,o);case">=":return Ije(t,r,o);case"<":return Bje(t,r,o);case"<=":return vje(t,r,o);default:throw new TypeError(`Invalid operator: ${e}`)}};XV.exports=Dje});var $V=_((oQt,ZV)=>{var Pje=Po(),Sje=od(),{safeRe:CP,t:wP}=vy(),bje=(t,e)=>{if(t instanceof Pje)return t;if(typeof t=="number"&&(t=String(t)),typeof t!="string")return null;e=e||{};let r=null;if(!e.rtl)r=t.match(CP[wP.COERCE]);else{let o;for(;(o=CP[wP.COERCERTL].exec(t))&&(!r||r.index+r[0].length!==t.length);)(!r||o.index+o[0].length!==r.index+r[0].length)&&(r=o),CP[wP.COERCERTL].lastIndex=o.index+o[1].length+o[2].length;CP[wP.COERCERTL].lastIndex=-1}return r===null?null:Sje(`${r[2]}.${r[3]||"0"}.${r[4]||"0"}`,e)};ZV.exports=bje});var tJ=_((aQt,eJ)=>{"use strict";eJ.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}});var IP=_((lQt,rJ)=>{"use strict";rJ.exports=Cn;Cn.Node=ad;Cn.create=Cn;function Cn(t){var e=this;if(e instanceof Cn||(e=new Cn),e.tail=null,e.head=null,e.length=0,t&&typeof t.forEach=="function")t.forEach(function(a){e.push(a)});else if(arguments.length>0)for(var r=0,o=arguments.length;r1)r=e;else if(this.head)o=this.head.next,r=this.head.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=0;o!==null;a++)r=t(r,o.value,a),o=o.next;return r};Cn.prototype.reduceReverse=function(t,e){var r,o=this.tail;if(arguments.length>1)r=e;else if(this.tail)o=this.tail.prev,r=this.tail.value;else throw new TypeError("Reduce of empty list with no initial value");for(var a=this.length-1;o!==null;a--)r=t(r,o.value,a),o=o.prev;return r};Cn.prototype.toArray=function(){for(var t=new Array(this.length),e=0,r=this.head;r!==null;e++)t[e]=r.value,r=r.next;return t};Cn.prototype.toArrayReverse=function(){for(var t=new Array(this.length),e=0,r=this.tail;r!==null;e++)t[e]=r.value,r=r.prev;return t};Cn.prototype.slice=function(t,e){e=e||this.length,e<0&&(e+=this.length),t=t||0,t<0&&(t+=this.length);var r=new Cn;if(ethis.length&&(e=this.length);for(var o=0,a=this.head;a!==null&&othis.length&&(e=this.length);for(var o=this.length,a=this.tail;a!==null&&o>e;o--)a=a.prev;for(;a!==null&&o>t;o--,a=a.prev)r.push(a.value);return r};Cn.prototype.splice=function(t,e,...r){t>this.length&&(t=this.length-1),t<0&&(t=this.length+t);for(var o=0,a=this.head;a!==null&&o{"use strict";var Fje=IP(),ld=Symbol("max"),Bf=Symbol("length"),Py=Symbol("lengthCalculator"),EI=Symbol("allowStale"),cd=Symbol("maxAge"),If=Symbol("dispose"),nJ=Symbol("noDisposeOnSet"),xs=Symbol("lruList"),Uc=Symbol("cache"),sJ=Symbol("updateAgeOnGet"),$T=()=>1,tL=class{constructor(e){if(typeof e=="number"&&(e={max:e}),e||(e={}),e.max&&(typeof e.max!="number"||e.max<0))throw new TypeError("max must be a non-negative number");let r=this[ld]=e.max||1/0,o=e.length||$T;if(this[Py]=typeof o!="function"?$T:o,this[EI]=e.stale||!1,e.maxAge&&typeof e.maxAge!="number")throw new TypeError("maxAge must be a number");this[cd]=e.maxAge||0,this[If]=e.dispose,this[nJ]=e.noDisposeOnSet||!1,this[sJ]=e.updateAgeOnGet||!1,this.reset()}set max(e){if(typeof e!="number"||e<0)throw new TypeError("max must be a non-negative number");this[ld]=e||1/0,yI(this)}get max(){return this[ld]}set allowStale(e){this[EI]=!!e}get allowStale(){return this[EI]}set maxAge(e){if(typeof e!="number")throw new TypeError("maxAge must be a non-negative number");this[cd]=e,yI(this)}get maxAge(){return this[cd]}set lengthCalculator(e){typeof e!="function"&&(e=$T),e!==this[Py]&&(this[Py]=e,this[Bf]=0,this[xs].forEach(r=>{r.length=this[Py](r.value,r.key),this[Bf]+=r.length})),yI(this)}get lengthCalculator(){return this[Py]}get length(){return this[Bf]}get itemCount(){return this[xs].length}rforEach(e,r){r=r||this;for(let o=this[xs].tail;o!==null;){let a=o.prev;iJ(this,e,o,r),o=a}}forEach(e,r){r=r||this;for(let o=this[xs].head;o!==null;){let a=o.next;iJ(this,e,o,r),o=a}}keys(){return this[xs].toArray().map(e=>e.key)}values(){return this[xs].toArray().map(e=>e.value)}reset(){this[If]&&this[xs]&&this[xs].length&&this[xs].forEach(e=>this[If](e.key,e.value)),this[Uc]=new Map,this[xs]=new Fje,this[Bf]=0}dump(){return this[xs].map(e=>BP(this,e)?!1:{k:e.key,v:e.value,e:e.now+(e.maxAge||0)}).toArray().filter(e=>e)}dumpLru(){return this[xs]}set(e,r,o){if(o=o||this[cd],o&&typeof o!="number")throw new TypeError("maxAge must be a number");let a=o?Date.now():0,n=this[Py](r,e);if(this[Uc].has(e)){if(n>this[ld])return Sy(this,this[Uc].get(e)),!1;let p=this[Uc].get(e).value;return this[If]&&(this[nJ]||this[If](e,p.value)),p.now=a,p.maxAge=o,p.value=r,this[Bf]+=n-p.length,p.length=n,this.get(e),yI(this),!0}let u=new rL(e,r,n,a,o);return u.length>this[ld]?(this[If]&&this[If](e,r),!1):(this[Bf]+=u.length,this[xs].unshift(u),this[Uc].set(e,this[xs].head),yI(this),!0)}has(e){if(!this[Uc].has(e))return!1;let r=this[Uc].get(e).value;return!BP(this,r)}get(e){return eL(this,e,!0)}peek(e){return eL(this,e,!1)}pop(){let e=this[xs].tail;return e?(Sy(this,e),e.value):null}del(e){Sy(this,this[Uc].get(e))}load(e){this.reset();let r=Date.now();for(let o=e.length-1;o>=0;o--){let a=e[o],n=a.e||0;if(n===0)this.set(a.k,a.v);else{let u=n-r;u>0&&this.set(a.k,a.v,u)}}}prune(){this[Uc].forEach((e,r)=>eL(this,r,!1))}},eL=(t,e,r)=>{let o=t[Uc].get(e);if(o){let a=o.value;if(BP(t,a)){if(Sy(t,o),!t[EI])return}else r&&(t[sJ]&&(o.value.now=Date.now()),t[xs].unshiftNode(o));return a.value}},BP=(t,e)=>{if(!e||!e.maxAge&&!t[cd])return!1;let r=Date.now()-e.now;return e.maxAge?r>e.maxAge:t[cd]&&r>t[cd]},yI=t=>{if(t[Bf]>t[ld])for(let e=t[xs].tail;t[Bf]>t[ld]&&e!==null;){let r=e.prev;Sy(t,e),e=r}},Sy=(t,e)=>{if(e){let r=e.value;t[If]&&t[If](r.key,r.value),t[Bf]-=r.length,t[Uc].delete(r.key),t[xs].removeNode(e)}},rL=class{constructor(e,r,o,a,n){this.key=e,this.value=r,this.length=o,this.now=a,this.maxAge=n||0}},iJ=(t,e,r,o)=>{let a=r.value;BP(t,a)&&(Sy(t,r),t[EI]||(a=void 0)),a&&e.call(o,a.value,a.key,t)};oJ.exports=tL});var Ml=_((uQt,AJ)=>{var ud=class{constructor(e,r){if(r=Tje(r),e instanceof ud)return e.loose===!!r.loose&&e.includePrerelease===!!r.includePrerelease?e:new ud(e.raw,r);if(e instanceof nL)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=r,this.loose=!!r.loose,this.includePrerelease=!!r.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map(o=>this.parseRange(o.trim())).filter(o=>o.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let o=this.set[0];if(this.set=this.set.filter(a=>!cJ(a[0])),this.set.length===0)this.set=[o];else if(this.set.length>1){for(let a of this.set)if(a.length===1&&Hje(a[0])){this.set=[a];break}}}this.format()}format(){return this.range=this.set.map(e=>e.join(" ").trim()).join("||").trim(),this.range}toString(){return this.range}parseRange(e){let o=((this.options.includePrerelease&&Uje)|(this.options.loose&&_je))+":"+e,a=lJ.get(o);if(a)return a;let n=this.options.loose,u=n?Da[Jo.HYPHENRANGELOOSE]:Da[Jo.HYPHENRANGE];e=e.replace(u,Xje(this.options.includePrerelease)),ci("hyphen replace",e),e=e.replace(Da[Jo.COMPARATORTRIM],Nje),ci("comparator trim",e),e=e.replace(Da[Jo.TILDETRIM],Oje),ci("tilde trim",e),e=e.replace(Da[Jo.CARETTRIM],Mje),ci("caret trim",e);let A=e.split(" ").map(I=>qje(I,this.options)).join(" ").split(/\s+/).map(I=>Jje(I,this.options));n&&(A=A.filter(I=>(ci("loose invalid filter",I,this.options),!!I.match(Da[Jo.COMPARATORLOOSE])))),ci("range list",A);let p=new Map,h=A.map(I=>new nL(I,this.options));for(let I of h){if(cJ(I))return[I];p.set(I.value,I)}p.size>1&&p.has("")&&p.delete("");let E=[...p.values()];return lJ.set(o,E),E}intersects(e,r){if(!(e instanceof ud))throw new TypeError("a Range is required");return this.set.some(o=>uJ(o,r)&&e.set.some(a=>uJ(a,r)&&o.every(n=>a.every(u=>n.intersects(u,r)))))}test(e){if(!e)return!1;if(typeof e=="string")try{e=new Lje(e,this.options)}catch{return!1}for(let r=0;rt.value==="<0.0.0-0",Hje=t=>t.value==="",uJ=(t,e)=>{let r=!0,o=t.slice(),a=o.pop();for(;r&&o.length;)r=o.every(n=>a.intersects(n,e)),a=o.pop();return r},qje=(t,e)=>(ci("comp",t,e),t=Yje(t,e),ci("caret",t),t=Gje(t,e),ci("tildes",t),t=Kje(t,e),ci("xrange",t),t=Vje(t,e),ci("stars",t),t),Xo=t=>!t||t.toLowerCase()==="x"||t==="*",Gje=(t,e)=>t.trim().split(/\s+/).map(r=>jje(r,e)).join(" "),jje=(t,e)=>{let r=e.loose?Da[Jo.TILDELOOSE]:Da[Jo.TILDE];return t.replace(r,(o,a,n,u,A)=>{ci("tilde",t,o,a,n,u,A);let p;return Xo(a)?p="":Xo(n)?p=`>=${a}.0.0 <${+a+1}.0.0-0`:Xo(u)?p=`>=${a}.${n}.0 <${a}.${+n+1}.0-0`:A?(ci("replaceTilde pr",A),p=`>=${a}.${n}.${u}-${A} <${a}.${+n+1}.0-0`):p=`>=${a}.${n}.${u} <${a}.${+n+1}.0-0`,ci("tilde return",p),p})},Yje=(t,e)=>t.trim().split(/\s+/).map(r=>Wje(r,e)).join(" "),Wje=(t,e)=>{ci("caret",t,e);let r=e.loose?Da[Jo.CARETLOOSE]:Da[Jo.CARET],o=e.includePrerelease?"-0":"";return t.replace(r,(a,n,u,A,p)=>{ci("caret",t,a,n,u,A,p);let h;return Xo(n)?h="":Xo(u)?h=`>=${n}.0.0${o} <${+n+1}.0.0-0`:Xo(A)?n==="0"?h=`>=${n}.${u}.0${o} <${n}.${+u+1}.0-0`:h=`>=${n}.${u}.0${o} <${+n+1}.0.0-0`:p?(ci("replaceCaret pr",p),n==="0"?u==="0"?h=`>=${n}.${u}.${A}-${p} <${n}.${u}.${+A+1}-0`:h=`>=${n}.${u}.${A}-${p} <${n}.${+u+1}.0-0`:h=`>=${n}.${u}.${A}-${p} <${+n+1}.0.0-0`):(ci("no pr"),n==="0"?u==="0"?h=`>=${n}.${u}.${A}${o} <${n}.${u}.${+A+1}-0`:h=`>=${n}.${u}.${A}${o} <${n}.${+u+1}.0-0`:h=`>=${n}.${u}.${A} <${+n+1}.0.0-0`),ci("caret return",h),h})},Kje=(t,e)=>(ci("replaceXRanges",t,e),t.split(/\s+/).map(r=>zje(r,e)).join(" ")),zje=(t,e)=>{t=t.trim();let r=e.loose?Da[Jo.XRANGELOOSE]:Da[Jo.XRANGE];return t.replace(r,(o,a,n,u,A,p)=>{ci("xRange",t,o,a,n,u,A,p);let h=Xo(n),E=h||Xo(u),I=E||Xo(A),v=I;return a==="="&&v&&(a=""),p=e.includePrerelease?"-0":"",h?a===">"||a==="<"?o="<0.0.0-0":o="*":a&&v?(E&&(u=0),A=0,a===">"?(a=">=",E?(n=+n+1,u=0,A=0):(u=+u+1,A=0)):a==="<="&&(a="<",E?n=+n+1:u=+u+1),a==="<"&&(p="-0"),o=`${a+n}.${u}.${A}${p}`):E?o=`>=${n}.0.0${p} <${+n+1}.0.0-0`:I&&(o=`>=${n}.${u}.0${p} <${n}.${+u+1}.0-0`),ci("xRange return",o),o})},Vje=(t,e)=>(ci("replaceStars",t,e),t.trim().replace(Da[Jo.STAR],"")),Jje=(t,e)=>(ci("replaceGTE0",t,e),t.trim().replace(Da[e.includePrerelease?Jo.GTE0PRE:Jo.GTE0],"")),Xje=t=>(e,r,o,a,n,u,A,p,h,E,I,v,x)=>(Xo(o)?r="":Xo(a)?r=`>=${o}.0.0${t?"-0":""}`:Xo(n)?r=`>=${o}.${a}.0${t?"-0":""}`:u?r=`>=${r}`:r=`>=${r}${t?"-0":""}`,Xo(h)?p="":Xo(E)?p=`<${+h+1}.0.0-0`:Xo(I)?p=`<${h}.${+E+1}.0-0`:v?p=`<=${h}.${E}.${I}-${v}`:t?p=`<${h}.${E}.${+I+1}-0`:p=`<=${p}`,`${r} ${p}`.trim()),Zje=(t,e,r)=>{for(let o=0;o0){let a=t[o].semver;if(a.major===e.major&&a.minor===e.minor&&a.patch===e.patch)return!0}return!1}return!0}});var CI=_((AQt,mJ)=>{var wI=Symbol("SemVer ANY"),by=class{static get ANY(){return wI}constructor(e,r){if(r=fJ(r),e instanceof by){if(e.loose===!!r.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),sL("comparator",e,r),this.options=r,this.loose=!!r.loose,this.parse(e),this.semver===wI?this.value="":this.value=this.operator+this.semver.version,sL("comp",this)}parse(e){let r=this.options.loose?pJ[hJ.COMPARATORLOOSE]:pJ[hJ.COMPARATOR],o=e.match(r);if(!o)throw new TypeError(`Invalid comparator: ${e}`);this.operator=o[1]!==void 0?o[1]:"",this.operator==="="&&(this.operator=""),o[2]?this.semver=new gJ(o[2],this.options.loose):this.semver=wI}toString(){return this.value}test(e){if(sL("Comparator.test",e,this.options.loose),this.semver===wI||e===wI)return!0;if(typeof e=="string")try{e=new gJ(e,this.options)}catch{return!1}return iL(e,this.operator,this.semver,this.options)}intersects(e,r){if(!(e instanceof by))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new dJ(e.value,r).test(this.value):e.operator===""?e.value===""?!0:new dJ(this.value,r).test(e.semver):(r=fJ(r),r.includePrerelease&&(this.value==="<0.0.0-0"||e.value==="<0.0.0-0")||!r.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&e.operator.startsWith(">")||this.operator.startsWith("<")&&e.operator.startsWith("<")||this.semver.version===e.semver.version&&this.operator.includes("=")&&e.operator.includes("=")||iL(this.semver,"<",e.semver,r)&&this.operator.startsWith(">")&&e.operator.startsWith("<")||iL(this.semver,">",e.semver,r)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))}};mJ.exports=by;var fJ=pP(),{safeRe:pJ,t:hJ}=vy(),iL=ZT(),sL=dI(),gJ=Po(),dJ=Ml()});var II=_((fQt,yJ)=>{var $je=Ml(),e9e=(t,e,r)=>{try{e=new $je(e,r)}catch{return!1}return e.test(t)};yJ.exports=e9e});var CJ=_((pQt,EJ)=>{var t9e=Ml(),r9e=(t,e)=>new t9e(t,e).set.map(r=>r.map(o=>o.value).join(" ").trim().split(" "));EJ.exports=r9e});var IJ=_((hQt,wJ)=>{var n9e=Po(),i9e=Ml(),s9e=(t,e,r)=>{let o=null,a=null,n=null;try{n=new i9e(e,r)}catch{return null}return t.forEach(u=>{n.test(u)&&(!o||a.compare(u)===-1)&&(o=u,a=new n9e(o,r))}),o};wJ.exports=s9e});var vJ=_((gQt,BJ)=>{var o9e=Po(),a9e=Ml(),l9e=(t,e,r)=>{let o=null,a=null,n=null;try{n=new a9e(e,r)}catch{return null}return t.forEach(u=>{n.test(u)&&(!o||a.compare(u)===1)&&(o=u,a=new o9e(o,r))}),o};BJ.exports=l9e});var SJ=_((dQt,PJ)=>{var oL=Po(),c9e=Ml(),DJ=mI(),u9e=(t,e)=>{t=new c9e(t,e);let r=new oL("0.0.0");if(t.test(r)||(r=new oL("0.0.0-0"),t.test(r)))return r;r=null;for(let o=0;o{let A=new oL(u.semver.version);switch(u.operator){case">":A.prerelease.length===0?A.patch++:A.prerelease.push(0),A.raw=A.format();case"":case">=":(!n||DJ(A,n))&&(n=A);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),n&&(!r||DJ(r,n))&&(r=n)}return r&&t.test(r)?r:null};PJ.exports=u9e});var xJ=_((mQt,bJ)=>{var A9e=Ml(),f9e=(t,e)=>{try{return new A9e(t,e).range||"*"}catch{return null}};bJ.exports=f9e});var vP=_((yQt,RJ)=>{var p9e=Po(),FJ=CI(),{ANY:h9e}=FJ,g9e=Ml(),d9e=II(),kJ=mI(),QJ=mP(),m9e=EP(),y9e=yP(),E9e=(t,e,r,o)=>{t=new p9e(t,o),e=new g9e(e,o);let a,n,u,A,p;switch(r){case">":a=kJ,n=m9e,u=QJ,A=">",p=">=";break;case"<":a=QJ,n=y9e,u=kJ,A="<",p="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(d9e(t,e,o))return!1;for(let h=0;h{x.semver===h9e&&(x=new FJ(">=0.0.0")),I=I||x,v=v||x,a(x.semver,I.semver,o)?I=x:u(x.semver,v.semver,o)&&(v=x)}),I.operator===A||I.operator===p||(!v.operator||v.operator===A)&&n(t,v.semver))return!1;if(v.operator===p&&u(t,v.semver))return!1}return!0};RJ.exports=E9e});var LJ=_((EQt,TJ)=>{var C9e=vP(),w9e=(t,e,r)=>C9e(t,e,">",r);TJ.exports=w9e});var OJ=_((CQt,NJ)=>{var I9e=vP(),B9e=(t,e,r)=>I9e(t,e,"<",r);NJ.exports=B9e});var _J=_((wQt,UJ)=>{var MJ=Ml(),v9e=(t,e,r)=>(t=new MJ(t,r),e=new MJ(e,r),t.intersects(e,r));UJ.exports=v9e});var qJ=_((IQt,HJ)=>{var D9e=II(),P9e=Ol();HJ.exports=(t,e,r)=>{let o=[],a=null,n=null,u=t.sort((E,I)=>P9e(E,I,r));for(let E of u)D9e(E,e,r)?(n=E,a||(a=E)):(n&&o.push([a,n]),n=null,a=null);a&&o.push([a,null]);let A=[];for(let[E,I]of o)E===I?A.push(E):!I&&E===u[0]?A.push("*"):I?E===u[0]?A.push(`<=${I}`):A.push(`${E} - ${I}`):A.push(`>=${E}`);let p=A.join(" || "),h=typeof e.raw=="string"?e.raw:String(e);return p.length{var GJ=Ml(),lL=CI(),{ANY:aL}=lL,BI=II(),cL=Ol(),S9e=(t,e,r={})=>{if(t===e)return!0;t=new GJ(t,r),e=new GJ(e,r);let o=!1;e:for(let a of t.set){for(let n of e.set){let u=x9e(a,n,r);if(o=o||u!==null,u)continue e}if(o)return!1}return!0},b9e=[new lL(">=0.0.0-0")],jJ=[new lL(">=0.0.0")],x9e=(t,e,r)=>{if(t===e)return!0;if(t.length===1&&t[0].semver===aL){if(e.length===1&&e[0].semver===aL)return!0;r.includePrerelease?t=b9e:t=jJ}if(e.length===1&&e[0].semver===aL){if(r.includePrerelease)return!0;e=jJ}let o=new Set,a,n;for(let x of t)x.operator===">"||x.operator===">="?a=YJ(a,x,r):x.operator==="<"||x.operator==="<="?n=WJ(n,x,r):o.add(x.semver);if(o.size>1)return null;let u;if(a&&n){if(u=cL(a.semver,n.semver,r),u>0)return null;if(u===0&&(a.operator!==">="||n.operator!=="<="))return null}for(let x of o){if(a&&!BI(x,String(a),r)||n&&!BI(x,String(n),r))return null;for(let C of e)if(!BI(x,String(C),r))return!1;return!0}let A,p,h,E,I=n&&!r.includePrerelease&&n.semver.prerelease.length?n.semver:!1,v=a&&!r.includePrerelease&&a.semver.prerelease.length?a.semver:!1;I&&I.prerelease.length===1&&n.operator==="<"&&I.prerelease[0]===0&&(I=!1);for(let x of e){if(E=E||x.operator===">"||x.operator===">=",h=h||x.operator==="<"||x.operator==="<=",a){if(v&&x.semver.prerelease&&x.semver.prerelease.length&&x.semver.major===v.major&&x.semver.minor===v.minor&&x.semver.patch===v.patch&&(v=!1),x.operator===">"||x.operator===">="){if(A=YJ(a,x,r),A===x&&A!==a)return!1}else if(a.operator===">="&&!BI(a.semver,String(x),r))return!1}if(n){if(I&&x.semver.prerelease&&x.semver.prerelease.length&&x.semver.major===I.major&&x.semver.minor===I.minor&&x.semver.patch===I.patch&&(I=!1),x.operator==="<"||x.operator==="<="){if(p=WJ(n,x,r),p===x&&p!==n)return!1}else if(n.operator==="<="&&!BI(n.semver,String(x),r))return!1}if(!x.operator&&(n||a)&&u!==0)return!1}return!(a&&h&&!n&&u!==0||n&&E&&!a&&u!==0||v||I)},YJ=(t,e,r)=>{if(!t)return e;let o=cL(t.semver,e.semver,r);return o>0?t:o<0||e.operator===">"&&t.operator===">="?e:t},WJ=(t,e,r)=>{if(!t)return e;let o=cL(t.semver,e.semver,r);return o<0?t:o>0||e.operator==="<"&&t.operator==="<="?e:t};KJ.exports=S9e});var Jn=_((vQt,XJ)=>{var uL=vy(),VJ=gI(),k9e=Po(),JJ=VT(),Q9e=od(),F9e=dV(),R9e=yV(),T9e=wV(),L9e=vV(),N9e=PV(),O9e=bV(),M9e=kV(),U9e=FV(),_9e=Ol(),H9e=NV(),q9e=MV(),G9e=dP(),j9e=qV(),Y9e=jV(),W9e=mI(),K9e=mP(),z9e=JT(),V9e=XT(),J9e=yP(),X9e=EP(),Z9e=ZT(),$9e=$V(),e5e=CI(),t5e=Ml(),r5e=II(),n5e=CJ(),i5e=IJ(),s5e=vJ(),o5e=SJ(),a5e=xJ(),l5e=vP(),c5e=LJ(),u5e=OJ(),A5e=_J(),f5e=qJ(),p5e=zJ();XJ.exports={parse:Q9e,valid:F9e,clean:R9e,inc:T9e,diff:L9e,major:N9e,minor:O9e,patch:M9e,prerelease:U9e,compare:_9e,rcompare:H9e,compareLoose:q9e,compareBuild:G9e,sort:j9e,rsort:Y9e,gt:W9e,lt:K9e,eq:z9e,neq:V9e,gte:J9e,lte:X9e,cmp:Z9e,coerce:$9e,Comparator:e5e,Range:t5e,satisfies:r5e,toComparators:n5e,maxSatisfying:i5e,minSatisfying:s5e,minVersion:o5e,validRange:a5e,outside:l5e,gtr:c5e,ltr:u5e,intersects:A5e,simplifyRange:f5e,subset:p5e,SemVer:k9e,re:uL.re,src:uL.src,tokens:uL.t,SEMVER_SPEC_VERSION:VJ.SEMVER_SPEC_VERSION,RELEASE_TYPES:VJ.RELEASE_TYPES,compareIdentifiers:JJ.compareIdentifiers,rcompareIdentifiers:JJ.rcompareIdentifiers}});var $J=_((DQt,ZJ)=>{"use strict";function h5e(t,e){function r(){this.constructor=t}r.prototype=e.prototype,t.prototype=new r}function Ad(t,e,r,o){this.message=t,this.expected=e,this.found=r,this.location=o,this.name="SyntaxError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,Ad)}h5e(Ad,Error);Ad.buildMessage=function(t,e){var r={literal:function(h){return'"'+a(h.text)+'"'},class:function(h){var E="",I;for(I=0;I0){for(I=1,v=1;I{switch(Le[1]){case"|":return be|Le[3];case"&":return be&Le[3];case"^":return be^Le[3]}},Z)},v="!",x=Re("!",!1),C=function(Z){return!Z},R="(",N=Re("(",!1),U=")",V=Re(")",!1),te=function(Z){return Z},ae=/^[^ \t\n\r()!|&\^]/,fe=ke([" "," ",` `,"\r","(",")","!","|","&","^"],!0,!1),ue=function(Z){return e.queryPattern.test(Z)},me=function(Z){return e.checkFn(Z)},he=Te("whitespace"),Be=/^[ \t\n\r]/,we=ke([" "," ",` `,"\r"],!1,!1),g=0,Ee=0,Pe=[{line:1,column:1}],ce=0,ne=[],ee=0,Ie;if("startRule"in e){if(!(e.startRule in o))throw new Error(`Can't start parsing from rule "`+e.startRule+'".');a=o[e.startRule]}function Fe(){return t.substring(Ee,g)}function At(){return qe(Ee,g)}function H(Z,ie){throw ie=ie!==void 0?ie:qe(Ee,g),S([Te(Z)],t.substring(Ee,g),ie)}function at(Z,ie){throw ie=ie!==void 0?ie:qe(Ee,g),w(Z,ie)}function Re(Z,ie){return{type:"literal",text:Z,ignoreCase:ie}}function ke(Z,ie,be){return{type:"class",parts:Z,inverted:ie,ignoreCase:be}}function xe(){return{type:"any"}}function He(){return{type:"end"}}function Te(Z){return{type:"other",description:Z}}function Ve(Z){var ie=Pe[Z],be;if(ie)return ie;for(be=Z-1;!Pe[be];)be--;for(ie=Pe[be],ie={line:ie.line,column:ie.column};bece&&(ce=g,ne=[]),ne.push(Z))}function w(Z,ie){return new Ad(Z,null,null,ie)}function S(Z,ie,be){return new Ad(Ad.buildMessage(Z,ie),Z,ie,be)}function y(){var Z,ie,be,Le,ot,dt,Gt,$t;if(Z=g,ie=F(),ie!==r){for(be=[],Le=g,ot=X(),ot!==r?(t.charCodeAt(g)===124?(dt=n,g++):(dt=r,ee===0&&b(u)),dt===r&&(t.charCodeAt(g)===38?(dt=A,g++):(dt=r,ee===0&&b(p)),dt===r&&(t.charCodeAt(g)===94?(dt=h,g++):(dt=r,ee===0&&b(E)))),dt!==r?(Gt=X(),Gt!==r?($t=F(),$t!==r?(ot=[ot,dt,Gt,$t],Le=ot):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r);Le!==r;)be.push(Le),Le=g,ot=X(),ot!==r?(t.charCodeAt(g)===124?(dt=n,g++):(dt=r,ee===0&&b(u)),dt===r&&(t.charCodeAt(g)===38?(dt=A,g++):(dt=r,ee===0&&b(p)),dt===r&&(t.charCodeAt(g)===94?(dt=h,g++):(dt=r,ee===0&&b(E)))),dt!==r?(Gt=X(),Gt!==r?($t=F(),$t!==r?(ot=[ot,dt,Gt,$t],Le=ot):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r)):(g=Le,Le=r);be!==r?(Ee=Z,ie=I(ie,be),Z=ie):(g=Z,Z=r)}else g=Z,Z=r;return Z}function F(){var Z,ie,be,Le,ot,dt;return Z=g,t.charCodeAt(g)===33?(ie=v,g++):(ie=r,ee===0&&b(x)),ie!==r?(be=F(),be!==r?(Ee=Z,ie=C(be),Z=ie):(g=Z,Z=r)):(g=Z,Z=r),Z===r&&(Z=g,t.charCodeAt(g)===40?(ie=R,g++):(ie=r,ee===0&&b(N)),ie!==r?(be=X(),be!==r?(Le=y(),Le!==r?(ot=X(),ot!==r?(t.charCodeAt(g)===41?(dt=U,g++):(dt=r,ee===0&&b(V)),dt!==r?(Ee=Z,ie=te(Le),Z=ie):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r)):(g=Z,Z=r),Z===r&&(Z=J())),Z}function J(){var Z,ie,be,Le,ot;if(Z=g,ie=X(),ie!==r){if(be=g,Le=[],ae.test(t.charAt(g))?(ot=t.charAt(g),g++):(ot=r,ee===0&&b(fe)),ot!==r)for(;ot!==r;)Le.push(ot),ae.test(t.charAt(g))?(ot=t.charAt(g),g++):(ot=r,ee===0&&b(fe));else Le=r;Le!==r?be=t.substring(be,g):be=Le,be!==r?(Ee=g,Le=ue(be),Le?Le=void 0:Le=r,Le!==r?(Ee=Z,ie=me(be),Z=ie):(g=Z,Z=r)):(g=Z,Z=r)}else g=Z,Z=r;return Z}function X(){var Z,ie;for(ee++,Z=[],Be.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,ee===0&&b(we));ie!==r;)Z.push(ie),Be.test(t.charAt(g))?(ie=t.charAt(g),g++):(ie=r,ee===0&&b(we));return ee--,Z===r&&(ie=r,ee===0&&b(he)),Z}if(Ie=a(),Ie!==r&&g===t.length)return Ie;throw Ie!==r&&g{var{parse:d5e}=$J();DP.makeParser=(t=/[a-z]+/)=>(e,r)=>d5e(e,{queryPattern:t,checkFn:r});DP.parse=DP.makeParser()});var rX=_((SQt,tX)=>{"use strict";tX.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}});var AL=_((bQt,iX)=>{var vI=rX(),nX={};for(let t of Object.keys(vI))nX[vI[t]]=t;var Ar={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};iX.exports=Ar;for(let t of Object.keys(Ar)){if(!("channels"in Ar[t]))throw new Error("missing channels property: "+t);if(!("labels"in Ar[t]))throw new Error("missing channel labels property: "+t);if(Ar[t].labels.length!==Ar[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:r}=Ar[t];delete Ar[t].channels,delete Ar[t].labels,Object.defineProperty(Ar[t],"channels",{value:e}),Object.defineProperty(Ar[t],"labels",{value:r})}Ar.rgb.hsl=function(t){let e=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(e,r,o),n=Math.max(e,r,o),u=n-a,A,p;n===a?A=0:e===n?A=(r-o)/u:r===n?A=2+(o-e)/u:o===n&&(A=4+(e-r)/u),A=Math.min(A*60,360),A<0&&(A+=360);let h=(a+n)/2;return n===a?p=0:h<=.5?p=u/(n+a):p=u/(2-n-a),[A,p*100,h*100]};Ar.rgb.hsv=function(t){let e,r,o,a,n,u=t[0]/255,A=t[1]/255,p=t[2]/255,h=Math.max(u,A,p),E=h-Math.min(u,A,p),I=function(v){return(h-v)/6/E+1/2};return E===0?(a=0,n=0):(n=E/h,e=I(u),r=I(A),o=I(p),u===h?a=o-r:A===h?a=1/3+e-o:p===h&&(a=2/3+r-e),a<0?a+=1:a>1&&(a-=1)),[a*360,n*100,h*100]};Ar.rgb.hwb=function(t){let e=t[0],r=t[1],o=t[2],a=Ar.rgb.hsl(t)[0],n=1/255*Math.min(e,Math.min(r,o));return o=1-1/255*Math.max(e,Math.max(r,o)),[a,n*100,o*100]};Ar.rgb.cmyk=function(t){let e=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.min(1-e,1-r,1-o),n=(1-e-a)/(1-a)||0,u=(1-r-a)/(1-a)||0,A=(1-o-a)/(1-a)||0;return[n*100,u*100,A*100,a*100]};function m5e(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}Ar.rgb.keyword=function(t){let e=nX[t];if(e)return e;let r=1/0,o;for(let a of Object.keys(vI)){let n=vI[a],u=m5e(t,n);u.04045?((e+.055)/1.055)**2.4:e/12.92,r=r>.04045?((r+.055)/1.055)**2.4:r/12.92,o=o>.04045?((o+.055)/1.055)**2.4:o/12.92;let a=e*.4124+r*.3576+o*.1805,n=e*.2126+r*.7152+o*.0722,u=e*.0193+r*.1192+o*.9505;return[a*100,n*100,u*100]};Ar.rgb.lab=function(t){let e=Ar.rgb.xyz(t),r=e[0],o=e[1],a=e[2];r/=95.047,o/=100,a/=108.883,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116,a=a>.008856?a**(1/3):7.787*a+16/116;let n=116*o-16,u=500*(r-o),A=200*(o-a);return[n,u,A]};Ar.hsl.rgb=function(t){let e=t[0]/360,r=t[1]/100,o=t[2]/100,a,n,u;if(r===0)return u=o*255,[u,u,u];o<.5?a=o*(1+r):a=o+r-o*r;let A=2*o-a,p=[0,0,0];for(let h=0;h<3;h++)n=e+1/3*-(h-1),n<0&&n++,n>1&&n--,6*n<1?u=A+(a-A)*6*n:2*n<1?u=a:3*n<2?u=A+(a-A)*(2/3-n)*6:u=A,p[h]=u*255;return p};Ar.hsl.hsv=function(t){let e=t[0],r=t[1]/100,o=t[2]/100,a=r,n=Math.max(o,.01);o*=2,r*=o<=1?o:2-o,a*=n<=1?n:2-n;let u=(o+r)/2,A=o===0?2*a/(n+a):2*r/(o+r);return[e,A*100,u*100]};Ar.hsv.rgb=function(t){let e=t[0]/60,r=t[1]/100,o=t[2]/100,a=Math.floor(e)%6,n=e-Math.floor(e),u=255*o*(1-r),A=255*o*(1-r*n),p=255*o*(1-r*(1-n));switch(o*=255,a){case 0:return[o,p,u];case 1:return[A,o,u];case 2:return[u,o,p];case 3:return[u,A,o];case 4:return[p,u,o];case 5:return[o,u,A]}};Ar.hsv.hsl=function(t){let e=t[0],r=t[1]/100,o=t[2]/100,a=Math.max(o,.01),n,u;u=(2-r)*o;let A=(2-r)*a;return n=r*a,n/=A<=1?A:2-A,n=n||0,u/=2,[e,n*100,u*100]};Ar.hwb.rgb=function(t){let e=t[0]/360,r=t[1]/100,o=t[2]/100,a=r+o,n;a>1&&(r/=a,o/=a);let u=Math.floor(6*e),A=1-o;n=6*e-u,(u&1)!==0&&(n=1-n);let p=r+n*(A-r),h,E,I;switch(u){default:case 6:case 0:h=A,E=p,I=r;break;case 1:h=p,E=A,I=r;break;case 2:h=r,E=A,I=p;break;case 3:h=r,E=p,I=A;break;case 4:h=p,E=r,I=A;break;case 5:h=A,E=r,I=p;break}return[h*255,E*255,I*255]};Ar.cmyk.rgb=function(t){let e=t[0]/100,r=t[1]/100,o=t[2]/100,a=t[3]/100,n=1-Math.min(1,e*(1-a)+a),u=1-Math.min(1,r*(1-a)+a),A=1-Math.min(1,o*(1-a)+a);return[n*255,u*255,A*255]};Ar.xyz.rgb=function(t){let e=t[0]/100,r=t[1]/100,o=t[2]/100,a,n,u;return a=e*3.2406+r*-1.5372+o*-.4986,n=e*-.9689+r*1.8758+o*.0415,u=e*.0557+r*-.204+o*1.057,a=a>.0031308?1.055*a**(1/2.4)-.055:a*12.92,n=n>.0031308?1.055*n**(1/2.4)-.055:n*12.92,u=u>.0031308?1.055*u**(1/2.4)-.055:u*12.92,a=Math.min(Math.max(0,a),1),n=Math.min(Math.max(0,n),1),u=Math.min(Math.max(0,u),1),[a*255,n*255,u*255]};Ar.xyz.lab=function(t){let e=t[0],r=t[1],o=t[2];e/=95.047,r/=100,o/=108.883,e=e>.008856?e**(1/3):7.787*e+16/116,r=r>.008856?r**(1/3):7.787*r+16/116,o=o>.008856?o**(1/3):7.787*o+16/116;let a=116*r-16,n=500*(e-r),u=200*(r-o);return[a,n,u]};Ar.lab.xyz=function(t){let e=t[0],r=t[1],o=t[2],a,n,u;n=(e+16)/116,a=r/500+n,u=n-o/200;let A=n**3,p=a**3,h=u**3;return n=A>.008856?A:(n-16/116)/7.787,a=p>.008856?p:(a-16/116)/7.787,u=h>.008856?h:(u-16/116)/7.787,a*=95.047,n*=100,u*=108.883,[a,n,u]};Ar.lab.lch=function(t){let e=t[0],r=t[1],o=t[2],a;a=Math.atan2(o,r)*360/2/Math.PI,a<0&&(a+=360);let u=Math.sqrt(r*r+o*o);return[e,u,a]};Ar.lch.lab=function(t){let e=t[0],r=t[1],a=t[2]/360*2*Math.PI,n=r*Math.cos(a),u=r*Math.sin(a);return[e,n,u]};Ar.rgb.ansi16=function(t,e=null){let[r,o,a]=t,n=e===null?Ar.rgb.hsv(t)[2]:e;if(n=Math.round(n/50),n===0)return 30;let u=30+(Math.round(a/255)<<2|Math.round(o/255)<<1|Math.round(r/255));return n===2&&(u+=60),u};Ar.hsv.ansi16=function(t){return Ar.rgb.ansi16(Ar.hsv.rgb(t),t[2])};Ar.rgb.ansi256=function(t){let e=t[0],r=t[1],o=t[2];return e===r&&r===o?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(r/255*5)+Math.round(o/255*5)};Ar.ansi16.rgb=function(t){let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let r=(~~(t>50)+1)*.5,o=(e&1)*r*255,a=(e>>1&1)*r*255,n=(e>>2&1)*r*255;return[o,a,n]};Ar.ansi256.rgb=function(t){if(t>=232){let n=(t-232)*10+8;return[n,n,n]}t-=16;let e,r=Math.floor(t/36)/5*255,o=Math.floor((e=t%36)/6)/5*255,a=e%6/5*255;return[r,o,a]};Ar.rgb.hex=function(t){let r=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".substring(r.length)+r};Ar.hex.rgb=function(t){let e=t.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!e)return[0,0,0];let r=e[0];e[0].length===3&&(r=r.split("").map(A=>A+A).join(""));let o=parseInt(r,16),a=o>>16&255,n=o>>8&255,u=o&255;return[a,n,u]};Ar.rgb.hcg=function(t){let e=t[0]/255,r=t[1]/255,o=t[2]/255,a=Math.max(Math.max(e,r),o),n=Math.min(Math.min(e,r),o),u=a-n,A,p;return u<1?A=n/(1-u):A=0,u<=0?p=0:a===e?p=(r-o)/u%6:a===r?p=2+(o-e)/u:p=4+(e-r)/u,p/=6,p%=1,[p*360,u*100,A*100]};Ar.hsl.hcg=function(t){let e=t[1]/100,r=t[2]/100,o=r<.5?2*e*r:2*e*(1-r),a=0;return o<1&&(a=(r-.5*o)/(1-o)),[t[0],o*100,a*100]};Ar.hsv.hcg=function(t){let e=t[1]/100,r=t[2]/100,o=e*r,a=0;return o<1&&(a=(r-o)/(1-o)),[t[0],o*100,a*100]};Ar.hcg.rgb=function(t){let e=t[0]/360,r=t[1]/100,o=t[2]/100;if(r===0)return[o*255,o*255,o*255];let a=[0,0,0],n=e%1*6,u=n%1,A=1-u,p=0;switch(Math.floor(n)){case 0:a[0]=1,a[1]=u,a[2]=0;break;case 1:a[0]=A,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=u;break;case 3:a[0]=0,a[1]=A,a[2]=1;break;case 4:a[0]=u,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=A}return p=(1-r)*o,[(r*a[0]+p)*255,(r*a[1]+p)*255,(r*a[2]+p)*255]};Ar.hcg.hsv=function(t){let e=t[1]/100,r=t[2]/100,o=e+r*(1-e),a=0;return o>0&&(a=e/o),[t[0],a*100,o*100]};Ar.hcg.hsl=function(t){let e=t[1]/100,o=t[2]/100*(1-e)+.5*e,a=0;return o>0&&o<.5?a=e/(2*o):o>=.5&&o<1&&(a=e/(2*(1-o))),[t[0],a*100,o*100]};Ar.hcg.hwb=function(t){let e=t[1]/100,r=t[2]/100,o=e+r*(1-e);return[t[0],(o-e)*100,(1-o)*100]};Ar.hwb.hcg=function(t){let e=t[1]/100,o=1-t[2]/100,a=o-e,n=0;return a<1&&(n=(o-a)/(1-a)),[t[0],a*100,n*100]};Ar.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};Ar.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};Ar.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};Ar.gray.hsl=function(t){return[0,0,t[0]]};Ar.gray.hsv=Ar.gray.hsl;Ar.gray.hwb=function(t){return[0,100,t[0]]};Ar.gray.cmyk=function(t){return[0,0,0,t[0]]};Ar.gray.lab=function(t){return[t[0],0,0]};Ar.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,o=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".substring(o.length)+o};Ar.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]}});var oX=_((xQt,sX)=>{var PP=AL();function y5e(){let t={},e=Object.keys(PP);for(let r=e.length,o=0;o{var fL=AL(),I5e=oX(),xy={},B5e=Object.keys(fL);function v5e(t){let e=function(...r){let o=r[0];return o==null?o:(o.length>1&&(r=o),t(r))};return"conversion"in t&&(e.conversion=t.conversion),e}function D5e(t){let e=function(...r){let o=r[0];if(o==null)return o;o.length>1&&(r=o);let a=t(r);if(typeof a=="object")for(let n=a.length,u=0;u{xy[t]={},Object.defineProperty(xy[t],"channels",{value:fL[t].channels}),Object.defineProperty(xy[t],"labels",{value:fL[t].labels});let e=I5e(t);Object.keys(e).forEach(o=>{let a=e[o];xy[t][o]=D5e(a),xy[t][o].raw=v5e(a)})});aX.exports=xy});var DI=_((QQt,pX)=>{"use strict";var cX=(t,e)=>(...r)=>`\x1B[${t(...r)+e}m`,uX=(t,e)=>(...r)=>{let o=t(...r);return`\x1B[${38+e};5;${o}m`},AX=(t,e)=>(...r)=>{let o=t(...r);return`\x1B[${38+e};2;${o[0]};${o[1]};${o[2]}m`},SP=t=>t,fX=(t,e,r)=>[t,e,r],ky=(t,e,r)=>{Object.defineProperty(t,e,{get:()=>{let o=r();return Object.defineProperty(t,e,{value:o,enumerable:!0,configurable:!0}),o},enumerable:!0,configurable:!0})},pL,Qy=(t,e,r,o)=>{pL===void 0&&(pL=lX());let a=o?10:0,n={};for(let[u,A]of Object.entries(pL)){let p=u==="ansi16"?"ansi":u;u===e?n[p]=t(r,a):typeof A=="object"&&(n[p]=t(A[e],a))}return n};function P5e(){let t=new Map,e={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}};e.color.gray=e.color.blackBright,e.bgColor.bgGray=e.bgColor.bgBlackBright,e.color.grey=e.color.blackBright,e.bgColor.bgGrey=e.bgColor.bgBlackBright;for(let[r,o]of Object.entries(e)){for(let[a,n]of Object.entries(o))e[a]={open:`\x1B[${n[0]}m`,close:`\x1B[${n[1]}m`},o[a]=e[a],t.set(n[0],n[1]);Object.defineProperty(e,r,{value:o,enumerable:!1})}return Object.defineProperty(e,"codes",{value:t,enumerable:!1}),e.color.close="\x1B[39m",e.bgColor.close="\x1B[49m",ky(e.color,"ansi",()=>Qy(cX,"ansi16",SP,!1)),ky(e.color,"ansi256",()=>Qy(uX,"ansi256",SP,!1)),ky(e.color,"ansi16m",()=>Qy(AX,"rgb",fX,!1)),ky(e.bgColor,"ansi",()=>Qy(cX,"ansi16",SP,!0)),ky(e.bgColor,"ansi256",()=>Qy(uX,"ansi256",SP,!0)),ky(e.bgColor,"ansi16m",()=>Qy(AX,"rgb",fX,!0)),e}Object.defineProperty(pX,"exports",{enumerable:!0,get:P5e})});var gX=_((FQt,hX)=>{"use strict";hX.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",o=e.indexOf(r+t),a=e.indexOf("--");return o!==-1&&(a===-1||o{"use strict";var S5e=ve("os"),dX=ve("tty"),Ul=gX(),{env:ls}=process,Jp;Ul("no-color")||Ul("no-colors")||Ul("color=false")||Ul("color=never")?Jp=0:(Ul("color")||Ul("colors")||Ul("color=true")||Ul("color=always"))&&(Jp=1);"FORCE_COLOR"in ls&&(ls.FORCE_COLOR==="true"?Jp=1:ls.FORCE_COLOR==="false"?Jp=0:Jp=ls.FORCE_COLOR.length===0?1:Math.min(parseInt(ls.FORCE_COLOR,10),3));function hL(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function gL(t,e){if(Jp===0)return 0;if(Ul("color=16m")||Ul("color=full")||Ul("color=truecolor"))return 3;if(Ul("color=256"))return 2;if(t&&!e&&Jp===void 0)return 0;let r=Jp||0;if(ls.TERM==="dumb")return r;if(process.platform==="win32"){let o=S5e.release().split(".");return Number(o[0])>=10&&Number(o[2])>=10586?Number(o[2])>=14931?3:2:1}if("CI"in ls)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI"].some(o=>o in ls)||ls.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in ls)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ls.TEAMCITY_VERSION)?1:0;if("GITHUB_ACTIONS"in ls)return 1;if(ls.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ls){let o=parseInt((ls.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ls.TERM_PROGRAM){case"iTerm.app":return o>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(ls.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ls.TERM)||"COLORTERM"in ls?1:r}function b5e(t){let e=gL(t,t&&t.isTTY);return hL(e)}mX.exports={supportsColor:b5e,stdout:hL(gL(!0,dX.isatty(1))),stderr:hL(gL(!0,dX.isatty(2)))}});var EX=_((TQt,yX)=>{"use strict";var x5e=(t,e,r)=>{let o=t.indexOf(e);if(o===-1)return t;let a=e.length,n=0,u="";do u+=t.substr(n,o-n)+e+r,n=o+a,o=t.indexOf(e,n);while(o!==-1);return u+=t.substr(n),u},k5e=(t,e,r,o)=>{let a=0,n="";do{let u=t[o-1]==="\r";n+=t.substr(a,(u?o-1:o)-a)+e+(u?`\r `:` `)+r,a=o+1,o=t.indexOf(` `,a)}while(o!==-1);return n+=t.substr(a),n};yX.exports={stringReplaceAll:x5e,stringEncaseCRLFWithFirstIndex:k5e}});var vX=_((LQt,BX)=>{"use strict";var Q5e=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,CX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,F5e=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,R5e=/\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.)|([^\\])/gi,T5e=new Map([["n",` `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function IX(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):T5e.get(t)||t}function L5e(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(F5e))r.push(a[2].replace(R5e,(A,p,h)=>p?IX(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function N5e(t){CX.lastIndex=0;let e=[],r;for(;(r=CX.exec(t))!==null;){let o=r[1];if(r[2]){let a=L5e(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function wX(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}BX.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(Q5e,(n,u,A,p,h,E)=>{if(u)a.push(IX(u));else if(p){let I=a.join("");a=[],o.push(r.length===0?I:wX(t,r)(I)),r.push({inverse:A,styles:N5e(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(wX(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var IL=_((NQt,bX)=>{"use strict";var PI=DI(),{stdout:yL,stderr:EL}=dL(),{stringReplaceAll:O5e,stringEncaseCRLFWithFirstIndex:M5e}=EX(),DX=["ansi","ansi","ansi256","ansi16m"],Fy=Object.create(null),U5e=(t,e={})=>{if(e.level>3||e.level<0)throw new Error("The `level` option should be an integer from 0 to 3");let r=yL?yL.level:0;t.level=e.level===void 0?r:e.level},CL=class{constructor(e){return PX(e)}},PX=t=>{let e={};return U5e(e,t),e.template=(...r)=>q5e(e.template,...r),Object.setPrototypeOf(e,bP.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=CL,e.template};function bP(t){return PX(t)}for(let[t,e]of Object.entries(PI))Fy[t]={get(){let r=xP(this,wL(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Fy.visible={get(){let t=xP(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var SX=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of SX)Fy[t]={get(){let{level:e}=this;return function(...r){let o=wL(PI.color[DX[e]][t](...r),PI.color.close,this._styler);return xP(this,o,this._isEmpty)}}};for(let t of SX){let e="bg"+t[0].toUpperCase()+t.slice(1);Fy[e]={get(){let{level:r}=this;return function(...o){let a=wL(PI.bgColor[DX[r]][t](...o),PI.bgColor.close,this._styler);return xP(this,a,this._isEmpty)}}}}var _5e=Object.defineProperties(()=>{},{...Fy,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),wL=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},xP=(t,e,r)=>{let o=(...a)=>H5e(o,a.length===1?""+a[0]:a.join(" "));return o.__proto__=_5e,o._generator=t,o._styler=e,o._isEmpty=r,o},H5e=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=O5e(e,r.close,r.open),r=r.parent;let n=e.indexOf(` `);return n!==-1&&(e=M5e(e,a,o,n)),o+e+a},mL,q5e=(t,...e)=>{let[r]=e;if(!Array.isArray(r))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n{"use strict";_l.isInteger=t=>typeof t=="number"?Number.isInteger(t):typeof t=="string"&&t.trim()!==""?Number.isInteger(Number(t)):!1;_l.find=(t,e)=>t.nodes.find(r=>r.type===e);_l.exceedsLimit=(t,e,r=1,o)=>o===!1||!_l.isInteger(t)||!_l.isInteger(e)?!1:(Number(e)-Number(t))/Number(r)>=o;_l.escapeNode=(t,e=0,r)=>{let o=t.nodes[e];!o||(r&&o.type===r||o.type==="open"||o.type==="close")&&o.escaped!==!0&&(o.value="\\"+o.value,o.escaped=!0)};_l.encloseBrace=t=>t.type!=="brace"?!1:t.commas>>0+t.ranges>>0===0?(t.invalid=!0,!0):!1;_l.isInvalidBrace=t=>t.type!=="brace"?!1:t.invalid===!0||t.dollar?!0:t.commas>>0+t.ranges>>0===0||t.open!==!0||t.close!==!0?(t.invalid=!0,!0):!1;_l.isOpenOrClose=t=>t.type==="open"||t.type==="close"?!0:t.open===!0||t.close===!0;_l.reduce=t=>t.reduce((e,r)=>(r.type==="text"&&e.push(r.value),r.type==="range"&&(r.type="text"),e),[]);_l.flatten=(...t)=>{let e=[],r=o=>{for(let a=0;a{"use strict";var xX=kP();kX.exports=(t,e={})=>{let r=(o,a={})=>{let n=e.escapeInvalid&&xX.isInvalidBrace(a),u=o.invalid===!0&&e.escapeInvalid===!0,A="";if(o.value)return(n||u)&&xX.isOpenOrClose(o)?"\\"+o.value:o.value;if(o.value)return o.value;if(o.nodes)for(let p of o.nodes)A+=r(p);return A};return r(t)}});var FX=_((UQt,QX)=>{"use strict";QX.exports=function(t){return typeof t=="number"?t-t===0:typeof t=="string"&&t.trim()!==""?Number.isFinite?Number.isFinite(+t):isFinite(+t):!1}});var HX=_((_Qt,_X)=>{"use strict";var RX=FX(),fd=(t,e,r)=>{if(RX(t)===!1)throw new TypeError("toRegexRange: expected the first argument to be a number");if(e===void 0||t===e)return String(t);if(RX(e)===!1)throw new TypeError("toRegexRange: expected the second argument to be a number.");let o={relaxZeros:!0,...r};typeof o.strictZeros=="boolean"&&(o.relaxZeros=o.strictZeros===!1);let a=String(o.relaxZeros),n=String(o.shorthand),u=String(o.capture),A=String(o.wrap),p=t+":"+e+"="+a+n+u+A;if(fd.cache.hasOwnProperty(p))return fd.cache[p].result;let h=Math.min(t,e),E=Math.max(t,e);if(Math.abs(h-E)===1){let R=t+"|"+e;return o.capture?`(${R})`:o.wrap===!1?R:`(?:${R})`}let I=UX(t)||UX(e),v={min:t,max:e,a:h,b:E},x=[],C=[];if(I&&(v.isPadded=I,v.maxLen=String(v.max).length),h<0){let R=E<0?Math.abs(E):1;C=TX(R,Math.abs(h),v,o),h=v.a=0}return E>=0&&(x=TX(h,E,v,o)),v.negatives=C,v.positives=x,v.result=G5e(C,x,o),o.capture===!0?v.result=`(${v.result})`:o.wrap!==!1&&x.length+C.length>1&&(v.result=`(?:${v.result})`),fd.cache[p]=v,v.result};function G5e(t,e,r){let o=BL(t,e,"-",!1,r)||[],a=BL(e,t,"",!1,r)||[],n=BL(t,e,"-?",!0,r)||[];return o.concat(n).concat(a).join("|")}function j5e(t,e){let r=1,o=1,a=NX(t,r),n=new Set([e]);for(;t<=a&&a<=e;)n.add(a),r+=1,a=NX(t,r);for(a=OX(e+1,o)-1;t1&&A.count.pop(),A.count.push(E.count[0]),A.string=A.pattern+MX(A.count),u=h+1;continue}r.isPadded&&(I=V5e(h,r,o)),E.string=I+E.pattern+MX(E.count),n.push(E),u=h+1,A=E}return n}function BL(t,e,r,o,a){let n=[];for(let u of t){let{string:A}=u;!o&&!LX(e,"string",A)&&n.push(r+A),o&&LX(e,"string",A)&&n.push(r+A)}return n}function W5e(t,e){let r=[];for(let o=0;oe?1:e>t?-1:0}function LX(t,e,r){return t.some(o=>o[e]===r)}function NX(t,e){return Number(String(t).slice(0,-e)+"9".repeat(e))}function OX(t,e){return t-t%Math.pow(10,e)}function MX(t){let[e=0,r=""]=t;return r||e>1?`{${e+(r?","+r:"")}}`:""}function z5e(t,e,r){return`[${t}${e-t===1?"":"-"}${e}]`}function UX(t){return/^-?(0+)\d/.test(t)}function V5e(t,e,r){if(!e.isPadded)return t;let o=Math.abs(e.maxLen-String(t).length),a=r.relaxZeros!==!1;switch(o){case 0:return"";case 1:return a?"0?":"0";case 2:return a?"0{0,2}":"00";default:return a?`0{0,${o}}`:`0{${o}}`}}fd.cache={};fd.clearCache=()=>fd.cache={};_X.exports=fd});var PL=_((HQt,VX)=>{"use strict";var J5e=ve("util"),jX=HX(),qX=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),X5e=t=>e=>t===!0?Number(e):String(e),vL=t=>typeof t=="number"||typeof t=="string"&&t!=="",bI=t=>Number.isInteger(+t),DL=t=>{let e=`${t}`,r=-1;if(e[0]==="-"&&(e=e.slice(1)),e==="0")return!1;for(;e[++r]==="0";);return r>0},Z5e=(t,e,r)=>typeof t=="string"||typeof e=="string"?!0:r.stringify===!0,$5e=(t,e,r)=>{if(e>0){let o=t[0]==="-"?"-":"";o&&(t=t.slice(1)),t=o+t.padStart(o?e-1:e,"0")}return r===!1?String(t):t},GX=(t,e)=>{let r=t[0]==="-"?"-":"";for(r&&(t=t.slice(1),e--);t.length{t.negatives.sort((u,A)=>uA?1:0),t.positives.sort((u,A)=>uA?1:0);let r=e.capture?"":"?:",o="",a="",n;return t.positives.length&&(o=t.positives.join("|")),t.negatives.length&&(a=`-(${r}${t.negatives.join("|")})`),o&&a?n=`${o}|${a}`:n=o||a,e.wrap?`(${r}${n})`:n},YX=(t,e,r,o)=>{if(r)return jX(t,e,{wrap:!1,...o});let a=String.fromCharCode(t);if(t===e)return a;let n=String.fromCharCode(e);return`[${a}-${n}]`},WX=(t,e,r)=>{if(Array.isArray(t)){let o=r.wrap===!0,a=r.capture?"":"?:";return o?`(${a}${t.join("|")})`:t.join("|")}return jX(t,e,r)},KX=(...t)=>new RangeError("Invalid range arguments: "+J5e.inspect(...t)),zX=(t,e,r)=>{if(r.strictRanges===!0)throw KX([t,e]);return[]},t7e=(t,e)=>{if(e.strictRanges===!0)throw new TypeError(`Expected step "${t}" to be a number`);return[]},r7e=(t,e,r=1,o={})=>{let a=Number(t),n=Number(e);if(!Number.isInteger(a)||!Number.isInteger(n)){if(o.strictRanges===!0)throw KX([t,e]);return[]}a===0&&(a=0),n===0&&(n=0);let u=a>n,A=String(t),p=String(e),h=String(r);r=Math.max(Math.abs(r),1);let E=DL(A)||DL(p)||DL(h),I=E?Math.max(A.length,p.length,h.length):0,v=E===!1&&Z5e(t,e,o)===!1,x=o.transform||X5e(v);if(o.toRegex&&r===1)return YX(GX(t,I),GX(e,I),!0,o);let C={negatives:[],positives:[]},R=V=>C[V<0?"negatives":"positives"].push(Math.abs(V)),N=[],U=0;for(;u?a>=n:a<=n;)o.toRegex===!0&&r>1?R(a):N.push($5e(x(a,U),I,v)),a=u?a-r:a+r,U++;return o.toRegex===!0?r>1?e7e(C,o):WX(N,null,{wrap:!1,...o}):N},n7e=(t,e,r=1,o={})=>{if(!bI(t)&&t.length>1||!bI(e)&&e.length>1)return zX(t,e,o);let a=o.transform||(v=>String.fromCharCode(v)),n=`${t}`.charCodeAt(0),u=`${e}`.charCodeAt(0),A=n>u,p=Math.min(n,u),h=Math.max(n,u);if(o.toRegex&&r===1)return YX(p,h,!1,o);let E=[],I=0;for(;A?n>=u:n<=u;)E.push(a(n,I)),n=A?n-r:n+r,I++;return o.toRegex===!0?WX(E,null,{wrap:!1,options:o}):E},FP=(t,e,r,o={})=>{if(e==null&&vL(t))return[t];if(!vL(t)||!vL(e))return zX(t,e,o);if(typeof r=="function")return FP(t,e,1,{transform:r});if(qX(r))return FP(t,e,0,r);let a={...o};return a.capture===!0&&(a.wrap=!0),r=r||a.step||1,bI(r)?bI(t)&&bI(e)?r7e(t,e,r,a):n7e(t,e,Math.max(Math.abs(r),1),a):r!=null&&!qX(r)?t7e(r,a):FP(t,e,1,r)};VX.exports=FP});var ZX=_((qQt,XX)=>{"use strict";var i7e=PL(),JX=kP(),s7e=(t,e={})=>{let r=(o,a={})=>{let n=JX.isInvalidBrace(a),u=o.invalid===!0&&e.escapeInvalid===!0,A=n===!0||u===!0,p=e.escapeInvalid===!0?"\\":"",h="";if(o.isOpen===!0||o.isClose===!0)return p+o.value;if(o.type==="open")return A?p+o.value:"(";if(o.type==="close")return A?p+o.value:")";if(o.type==="comma")return o.prev.type==="comma"?"":A?o.value:"|";if(o.value)return o.value;if(o.nodes&&o.ranges>0){let E=JX.reduce(o.nodes),I=i7e(...E,{...e,wrap:!1,toRegex:!0});if(I.length!==0)return E.length>1&&I.length>1?`(${I})`:I}if(o.nodes)for(let E of o.nodes)h+=r(E,o);return h};return r(t)};XX.exports=s7e});var tZ=_((GQt,eZ)=>{"use strict";var o7e=PL(),$X=QP(),Ry=kP(),pd=(t="",e="",r=!1)=>{let o=[];if(t=[].concat(t),e=[].concat(e),!e.length)return t;if(!t.length)return r?Ry.flatten(e).map(a=>`{${a}}`):e;for(let a of t)if(Array.isArray(a))for(let n of a)o.push(pd(n,e,r));else for(let n of e)r===!0&&typeof n=="string"&&(n=`{${n}}`),o.push(Array.isArray(n)?pd(a,n,r):a+n);return Ry.flatten(o)},a7e=(t,e={})=>{let r=e.rangeLimit===void 0?1e3:e.rangeLimit,o=(a,n={})=>{a.queue=[];let u=n,A=n.queue;for(;u.type!=="brace"&&u.type!=="root"&&u.parent;)u=u.parent,A=u.queue;if(a.invalid||a.dollar){A.push(pd(A.pop(),$X(a,e)));return}if(a.type==="brace"&&a.invalid!==!0&&a.nodes.length===2){A.push(pd(A.pop(),["{}"]));return}if(a.nodes&&a.ranges>0){let I=Ry.reduce(a.nodes);if(Ry.exceedsLimit(...I,e.step,r))throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.");let v=o7e(...I,e);v.length===0&&(v=$X(a,e)),A.push(pd(A.pop(),v)),a.nodes=[];return}let p=Ry.encloseBrace(a),h=a.queue,E=a;for(;E.type!=="brace"&&E.type!=="root"&&E.parent;)E=E.parent,h=E.queue;for(let I=0;I{"use strict";rZ.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:` `,CHAR_NO_BREAK_SPACE:"\xA0",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:" ",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\uFEFF"}});var lZ=_((YQt,aZ)=>{"use strict";var l7e=QP(),{MAX_LENGTH:iZ,CHAR_BACKSLASH:SL,CHAR_BACKTICK:c7e,CHAR_COMMA:u7e,CHAR_DOT:A7e,CHAR_LEFT_PARENTHESES:f7e,CHAR_RIGHT_PARENTHESES:p7e,CHAR_LEFT_CURLY_BRACE:h7e,CHAR_RIGHT_CURLY_BRACE:g7e,CHAR_LEFT_SQUARE_BRACKET:sZ,CHAR_RIGHT_SQUARE_BRACKET:oZ,CHAR_DOUBLE_QUOTE:d7e,CHAR_SINGLE_QUOTE:m7e,CHAR_NO_BREAK_SPACE:y7e,CHAR_ZERO_WIDTH_NOBREAK_SPACE:E7e}=nZ(),C7e=(t,e={})=>{if(typeof t!="string")throw new TypeError("Expected a string");let r=e||{},o=typeof r.maxLength=="number"?Math.min(iZ,r.maxLength):iZ;if(t.length>o)throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${o})`);let a={type:"root",input:t,nodes:[]},n=[a],u=a,A=a,p=0,h=t.length,E=0,I=0,v,x={},C=()=>t[E++],R=N=>{if(N.type==="text"&&A.type==="dot"&&(A.type="text"),A&&A.type==="text"&&N.type==="text"){A.value+=N.value;return}return u.nodes.push(N),N.parent=u,N.prev=A,A=N,N};for(R({type:"bos"});E0){if(u.ranges>0){u.ranges=0;let N=u.nodes.shift();u.nodes=[N,{type:"text",value:l7e(u)}]}R({type:"comma",value:v}),u.commas++;continue}if(v===A7e&&I>0&&u.commas===0){let N=u.nodes;if(I===0||N.length===0){R({type:"text",value:v});continue}if(A.type==="dot"){if(u.range=[],A.value+=v,A.type="range",u.nodes.length!==3&&u.nodes.length!==5){u.invalid=!0,u.ranges=0,A.type="text";continue}u.ranges++,u.args=[];continue}if(A.type==="range"){N.pop();let U=N[N.length-1];U.value+=A.value+v,A=U,u.ranges--;continue}R({type:"dot",value:v});continue}R({type:"text",value:v})}do if(u=n.pop(),u.type!=="root"){u.nodes.forEach(V=>{V.nodes||(V.type==="open"&&(V.isOpen=!0),V.type==="close"&&(V.isClose=!0),V.nodes||(V.type="text"),V.invalid=!0)});let N=n[n.length-1],U=N.nodes.indexOf(u);N.nodes.splice(U,1,...u.nodes)}while(n.length>0);return R({type:"eos"}),a};aZ.exports=C7e});var AZ=_((WQt,uZ)=>{"use strict";var cZ=QP(),w7e=ZX(),I7e=tZ(),B7e=lZ(),nl=(t,e={})=>{let r=[];if(Array.isArray(t))for(let o of t){let a=nl.create(o,e);Array.isArray(a)?r.push(...a):r.push(a)}else r=[].concat(nl.create(t,e));return e&&e.expand===!0&&e.nodupes===!0&&(r=[...new Set(r)]),r};nl.parse=(t,e={})=>B7e(t,e);nl.stringify=(t,e={})=>cZ(typeof t=="string"?nl.parse(t,e):t,e);nl.compile=(t,e={})=>(typeof t=="string"&&(t=nl.parse(t,e)),w7e(t,e));nl.expand=(t,e={})=>{typeof t=="string"&&(t=nl.parse(t,e));let r=I7e(t,e);return e.noempty===!0&&(r=r.filter(Boolean)),e.nodupes===!0&&(r=[...new Set(r)]),r};nl.create=(t,e={})=>t===""||t.length<3?[t]:e.expand!==!0?nl.compile(t,e):nl.expand(t,e);uZ.exports=nl});var xI=_((KQt,dZ)=>{"use strict";var v7e=ve("path"),zu="\\\\/",fZ=`[^${zu}]`,vf="\\.",D7e="\\+",P7e="\\?",RP="\\/",S7e="(?=.)",pZ="[^/]",bL=`(?:${RP}|$)`,hZ=`(?:^|${RP})`,xL=`${vf}{1,2}${bL}`,b7e=`(?!${vf})`,x7e=`(?!${hZ}${xL})`,k7e=`(?!${vf}{0,1}${bL})`,Q7e=`(?!${xL})`,F7e=`[^.${RP}]`,R7e=`${pZ}*?`,gZ={DOT_LITERAL:vf,PLUS_LITERAL:D7e,QMARK_LITERAL:P7e,SLASH_LITERAL:RP,ONE_CHAR:S7e,QMARK:pZ,END_ANCHOR:bL,DOTS_SLASH:xL,NO_DOT:b7e,NO_DOTS:x7e,NO_DOT_SLASH:k7e,NO_DOTS_SLASH:Q7e,QMARK_NO_DOT:F7e,STAR:R7e,START_ANCHOR:hZ},T7e={...gZ,SLASH_LITERAL:`[${zu}]`,QMARK:fZ,STAR:`${fZ}*?`,DOTS_SLASH:`${vf}{1,2}(?:[${zu}]|$)`,NO_DOT:`(?!${vf})`,NO_DOTS:`(?!(?:^|[${zu}])${vf}{1,2}(?:[${zu}]|$))`,NO_DOT_SLASH:`(?!${vf}{0,1}(?:[${zu}]|$))`,NO_DOTS_SLASH:`(?!${vf}{1,2}(?:[${zu}]|$))`,QMARK_NO_DOT:`[^.${zu}]`,START_ANCHOR:`(?:^|[${zu}])`,END_ANCHOR:`(?:[${zu}]|$)`},L7e={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};dZ.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:L7e,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:v7e.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===!0?T7e:gZ}}});var kI=_(Pa=>{"use strict";var N7e=ve("path"),O7e=process.platform==="win32",{REGEX_BACKSLASH:M7e,REGEX_REMOVE_BACKSLASH:U7e,REGEX_SPECIAL_CHARS:_7e,REGEX_SPECIAL_CHARS_GLOBAL:H7e}=xI();Pa.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);Pa.hasRegexChars=t=>_7e.test(t);Pa.isRegexChar=t=>t.length===1&&Pa.hasRegexChars(t);Pa.escapeRegex=t=>t.replace(H7e,"\\$1");Pa.toPosixSlashes=t=>t.replace(M7e,"/");Pa.removeBackslashes=t=>t.replace(U7e,e=>e==="\\"?"":e);Pa.supportsLookbehinds=()=>{let t=process.version.slice(1).split(".").map(Number);return t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10};Pa.isWindows=t=>t&&typeof t.windows=="boolean"?t.windows:O7e===!0||N7e.sep==="\\";Pa.escapeLast=(t,e,r)=>{let o=t.lastIndexOf(e,r);return o===-1?t:t[o-1]==="\\"?Pa.escapeLast(t,e,o-1):`${t.slice(0,o)}\\${t.slice(o)}`};Pa.removePrefix=(t,e={})=>{let r=t;return r.startsWith("./")&&(r=r.slice(2),e.prefix="./"),r};Pa.wrapOutput=(t,e={},r={})=>{let o=r.contains?"":"^",a=r.contains?"":"$",n=`${o}(?:${t})${a}`;return e.negated===!0&&(n=`(?:^(?!${n}).*$)`),n}});var vZ=_((VQt,BZ)=>{"use strict";var mZ=kI(),{CHAR_ASTERISK:kL,CHAR_AT:q7e,CHAR_BACKWARD_SLASH:QI,CHAR_COMMA:G7e,CHAR_DOT:QL,CHAR_EXCLAMATION_MARK:FL,CHAR_FORWARD_SLASH:IZ,CHAR_LEFT_CURLY_BRACE:RL,CHAR_LEFT_PARENTHESES:TL,CHAR_LEFT_SQUARE_BRACKET:j7e,CHAR_PLUS:Y7e,CHAR_QUESTION_MARK:yZ,CHAR_RIGHT_CURLY_BRACE:W7e,CHAR_RIGHT_PARENTHESES:EZ,CHAR_RIGHT_SQUARE_BRACKET:K7e}=xI(),CZ=t=>t===IZ||t===QI,wZ=t=>{t.isPrefix!==!0&&(t.depth=t.isGlobstar?1/0:1)},z7e=(t,e)=>{let r=e||{},o=t.length-1,a=r.parts===!0||r.scanToEnd===!0,n=[],u=[],A=[],p=t,h=-1,E=0,I=0,v=!1,x=!1,C=!1,R=!1,N=!1,U=!1,V=!1,te=!1,ae=!1,fe=!1,ue=0,me,he,Be={value:"",depth:0,isGlob:!1},we=()=>h>=o,g=()=>p.charCodeAt(h+1),Ee=()=>(me=he,p.charCodeAt(++h));for(;h0&&(ce=p.slice(0,E),p=p.slice(E),I-=E),Pe&&C===!0&&I>0?(Pe=p.slice(0,I),ne=p.slice(I)):C===!0?(Pe="",ne=p):Pe=p,Pe&&Pe!==""&&Pe!=="/"&&Pe!==p&&CZ(Pe.charCodeAt(Pe.length-1))&&(Pe=Pe.slice(0,-1)),r.unescape===!0&&(ne&&(ne=mZ.removeBackslashes(ne)),Pe&&V===!0&&(Pe=mZ.removeBackslashes(Pe)));let ee={prefix:ce,input:t,start:E,base:Pe,glob:ne,isBrace:v,isBracket:x,isGlob:C,isExtglob:R,isGlobstar:N,negated:te,negatedExtglob:ae};if(r.tokens===!0&&(ee.maxDepth=0,CZ(he)||u.push(Be),ee.tokens=u),r.parts===!0||r.tokens===!0){let Ie;for(let Fe=0;Fe{"use strict";var TP=xI(),il=kI(),{MAX_LENGTH:LP,POSIX_REGEX_SOURCE:V7e,REGEX_NON_SPECIAL_CHARS:J7e,REGEX_SPECIAL_CHARS_BACKREF:X7e,REPLACEMENTS:DZ}=TP,Z7e=(t,e)=>{if(typeof e.expandRange=="function")return e.expandRange(...t,e);t.sort();let r=`[${t.join("-")}]`;try{new RegExp(r)}catch{return t.map(a=>il.escapeRegex(a)).join("..")}return r},Ty=(t,e)=>`Missing ${t}: "${e}" - use "\\\\${e}" to match literal characters`,LL=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");t=DZ[t]||t;let r={...e},o=typeof r.maxLength=="number"?Math.min(LP,r.maxLength):LP,a=t.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);let n={type:"bos",value:"",output:r.prepend||""},u=[n],A=r.capture?"":"?:",p=il.isWindows(e),h=TP.globChars(p),E=TP.extglobChars(h),{DOT_LITERAL:I,PLUS_LITERAL:v,SLASH_LITERAL:x,ONE_CHAR:C,DOTS_SLASH:R,NO_DOT:N,NO_DOT_SLASH:U,NO_DOTS_SLASH:V,QMARK:te,QMARK_NO_DOT:ae,STAR:fe,START_ANCHOR:ue}=h,me=b=>`(${A}(?:(?!${ue}${b.dot?R:I}).)*?)`,he=r.dot?"":N,Be=r.dot?te:ae,we=r.bash===!0?me(r):fe;r.capture&&(we=`(${we})`),typeof r.noext=="boolean"&&(r.noextglob=r.noext);let g={input:t,index:-1,start:0,dot:r.dot===!0,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:u};t=il.removePrefix(t,g),a=t.length;let Ee=[],Pe=[],ce=[],ne=n,ee,Ie=()=>g.index===a-1,Fe=g.peek=(b=1)=>t[g.index+b],At=g.advance=()=>t[++g.index]||"",H=()=>t.slice(g.index+1),at=(b="",w=0)=>{g.consumed+=b,g.index+=w},Re=b=>{g.output+=b.output!=null?b.output:b.value,at(b.value)},ke=()=>{let b=1;for(;Fe()==="!"&&(Fe(2)!=="("||Fe(3)==="?");)At(),g.start++,b++;return b%2===0?!1:(g.negated=!0,g.start++,!0)},xe=b=>{g[b]++,ce.push(b)},He=b=>{g[b]--,ce.pop()},Te=b=>{if(ne.type==="globstar"){let w=g.braces>0&&(b.type==="comma"||b.type==="brace"),S=b.extglob===!0||Ee.length&&(b.type==="pipe"||b.type==="paren");b.type!=="slash"&&b.type!=="paren"&&!w&&!S&&(g.output=g.output.slice(0,-ne.output.length),ne.type="star",ne.value="*",ne.output=we,g.output+=ne.output)}if(Ee.length&&b.type!=="paren"&&(Ee[Ee.length-1].inner+=b.value),(b.value||b.output)&&Re(b),ne&&ne.type==="text"&&b.type==="text"){ne.value+=b.value,ne.output=(ne.output||"")+b.value;return}b.prev=ne,u.push(b),ne=b},Ve=(b,w)=>{let S={...E[w],conditions:1,inner:""};S.prev=ne,S.parens=g.parens,S.output=g.output;let y=(r.capture?"(":"")+S.open;xe("parens"),Te({type:b,value:w,output:g.output?"":C}),Te({type:"paren",extglob:!0,value:At(),output:y}),Ee.push(S)},qe=b=>{let w=b.close+(r.capture?")":""),S;if(b.type==="negate"){let y=we;if(b.inner&&b.inner.length>1&&b.inner.includes("/")&&(y=me(r)),(y!==we||Ie()||/^\)+$/.test(H()))&&(w=b.close=`)$))${y}`),b.inner.includes("*")&&(S=H())&&/^\.[^\\/.]+$/.test(S)){let F=LL(S,{...e,fastpaths:!1}).output;w=b.close=`)${F})${y})`}b.prev.type==="bos"&&(g.negatedExtglob=!0)}Te({type:"paren",extglob:!0,value:ee,output:w}),He("parens")};if(r.fastpaths!==!1&&!/(^[*!]|[/()[\]{}"])/.test(t)){let b=!1,w=t.replace(X7e,(S,y,F,J,X,Z)=>J==="\\"?(b=!0,S):J==="?"?y?y+J+(X?te.repeat(X.length):""):Z===0?Be+(X?te.repeat(X.length):""):te.repeat(F.length):J==="."?I.repeat(F.length):J==="*"?y?y+J+(X?we:""):we:y?S:`\\${S}`);return b===!0&&(r.unescape===!0?w=w.replace(/\\/g,""):w=w.replace(/\\+/g,S=>S.length%2===0?"\\\\":S?"\\":"")),w===t&&r.contains===!0?(g.output=t,g):(g.output=il.wrapOutput(w,g,e),g)}for(;!Ie();){if(ee=At(),ee==="\0")continue;if(ee==="\\"){let S=Fe();if(S==="/"&&r.bash!==!0||S==="."||S===";")continue;if(!S){ee+="\\",Te({type:"text",value:ee});continue}let y=/^\\+/.exec(H()),F=0;if(y&&y[0].length>2&&(F=y[0].length,g.index+=F,F%2!==0&&(ee+="\\")),r.unescape===!0?ee=At():ee+=At(),g.brackets===0){Te({type:"text",value:ee});continue}}if(g.brackets>0&&(ee!=="]"||ne.value==="["||ne.value==="[^")){if(r.posix!==!1&&ee===":"){let S=ne.value.slice(1);if(S.includes("[")&&(ne.posix=!0,S.includes(":"))){let y=ne.value.lastIndexOf("["),F=ne.value.slice(0,y),J=ne.value.slice(y+2),X=V7e[J];if(X){ne.value=F+X,g.backtrack=!0,At(),!n.output&&u.indexOf(ne)===1&&(n.output=C);continue}}}(ee==="["&&Fe()!==":"||ee==="-"&&Fe()==="]")&&(ee=`\\${ee}`),ee==="]"&&(ne.value==="["||ne.value==="[^")&&(ee=`\\${ee}`),r.posix===!0&&ee==="!"&&ne.value==="["&&(ee="^"),ne.value+=ee,Re({value:ee});continue}if(g.quotes===1&&ee!=='"'){ee=il.escapeRegex(ee),ne.value+=ee,Re({value:ee});continue}if(ee==='"'){g.quotes=g.quotes===1?0:1,r.keepQuotes===!0&&Te({type:"text",value:ee});continue}if(ee==="("){xe("parens"),Te({type:"paren",value:ee});continue}if(ee===")"){if(g.parens===0&&r.strictBrackets===!0)throw new SyntaxError(Ty("opening","("));let S=Ee[Ee.length-1];if(S&&g.parens===S.parens+1){qe(Ee.pop());continue}Te({type:"paren",value:ee,output:g.parens?")":"\\)"}),He("parens");continue}if(ee==="["){if(r.nobracket===!0||!H().includes("]")){if(r.nobracket!==!0&&r.strictBrackets===!0)throw new SyntaxError(Ty("closing","]"));ee=`\\${ee}`}else xe("brackets");Te({type:"bracket",value:ee});continue}if(ee==="]"){if(r.nobracket===!0||ne&&ne.type==="bracket"&&ne.value.length===1){Te({type:"text",value:ee,output:`\\${ee}`});continue}if(g.brackets===0){if(r.strictBrackets===!0)throw new SyntaxError(Ty("opening","["));Te({type:"text",value:ee,output:`\\${ee}`});continue}He("brackets");let S=ne.value.slice(1);if(ne.posix!==!0&&S[0]==="^"&&!S.includes("/")&&(ee=`/${ee}`),ne.value+=ee,Re({value:ee}),r.literalBrackets===!1||il.hasRegexChars(S))continue;let y=il.escapeRegex(ne.value);if(g.output=g.output.slice(0,-ne.value.length),r.literalBrackets===!0){g.output+=y,ne.value=y;continue}ne.value=`(${A}${y}|${ne.value})`,g.output+=ne.value;continue}if(ee==="{"&&r.nobrace!==!0){xe("braces");let S={type:"brace",value:ee,output:"(",outputIndex:g.output.length,tokensIndex:g.tokens.length};Pe.push(S),Te(S);continue}if(ee==="}"){let S=Pe[Pe.length-1];if(r.nobrace===!0||!S){Te({type:"text",value:ee,output:ee});continue}let y=")";if(S.dots===!0){let F=u.slice(),J=[];for(let X=F.length-1;X>=0&&(u.pop(),F[X].type!=="brace");X--)F[X].type!=="dots"&&J.unshift(F[X].value);y=Z7e(J,r),g.backtrack=!0}if(S.comma!==!0&&S.dots!==!0){let F=g.output.slice(0,S.outputIndex),J=g.tokens.slice(S.tokensIndex);S.value=S.output="\\{",ee=y="\\}",g.output=F;for(let X of J)g.output+=X.output||X.value}Te({type:"brace",value:ee,output:y}),He("braces"),Pe.pop();continue}if(ee==="|"){Ee.length>0&&Ee[Ee.length-1].conditions++,Te({type:"text",value:ee});continue}if(ee===","){let S=ee,y=Pe[Pe.length-1];y&&ce[ce.length-1]==="braces"&&(y.comma=!0,S="|"),Te({type:"comma",value:ee,output:S});continue}if(ee==="/"){if(ne.type==="dot"&&g.index===g.start+1){g.start=g.index+1,g.consumed="",g.output="",u.pop(),ne=n;continue}Te({type:"slash",value:ee,output:x});continue}if(ee==="."){if(g.braces>0&&ne.type==="dot"){ne.value==="."&&(ne.output=I);let S=Pe[Pe.length-1];ne.type="dots",ne.output+=ee,ne.value+=ee,S.dots=!0;continue}if(g.braces+g.parens===0&&ne.type!=="bos"&&ne.type!=="slash"){Te({type:"text",value:ee,output:I});continue}Te({type:"dot",value:ee,output:I});continue}if(ee==="?"){if(!(ne&&ne.value==="(")&&r.noextglob!==!0&&Fe()==="("&&Fe(2)!=="?"){Ve("qmark",ee);continue}if(ne&&ne.type==="paren"){let y=Fe(),F=ee;if(y==="<"&&!il.supportsLookbehinds())throw new Error("Node.js v10 or higher is required for regex lookbehinds");(ne.value==="("&&!/[!=<:]/.test(y)||y==="<"&&!/<([!=]|\w+>)/.test(H()))&&(F=`\\${ee}`),Te({type:"text",value:ee,output:F});continue}if(r.dot!==!0&&(ne.type==="slash"||ne.type==="bos")){Te({type:"qmark",value:ee,output:ae});continue}Te({type:"qmark",value:ee,output:te});continue}if(ee==="!"){if(r.noextglob!==!0&&Fe()==="("&&(Fe(2)!=="?"||!/[!=<:]/.test(Fe(3)))){Ve("negate",ee);continue}if(r.nonegate!==!0&&g.index===0){ke();continue}}if(ee==="+"){if(r.noextglob!==!0&&Fe()==="("&&Fe(2)!=="?"){Ve("plus",ee);continue}if(ne&&ne.value==="("||r.regex===!1){Te({type:"plus",value:ee,output:v});continue}if(ne&&(ne.type==="bracket"||ne.type==="paren"||ne.type==="brace")||g.parens>0){Te({type:"plus",value:ee});continue}Te({type:"plus",value:v});continue}if(ee==="@"){if(r.noextglob!==!0&&Fe()==="("&&Fe(2)!=="?"){Te({type:"at",extglob:!0,value:ee,output:""});continue}Te({type:"text",value:ee});continue}if(ee!=="*"){(ee==="$"||ee==="^")&&(ee=`\\${ee}`);let S=J7e.exec(H());S&&(ee+=S[0],g.index+=S[0].length),Te({type:"text",value:ee});continue}if(ne&&(ne.type==="globstar"||ne.star===!0)){ne.type="star",ne.star=!0,ne.value+=ee,ne.output=we,g.backtrack=!0,g.globstar=!0,at(ee);continue}let b=H();if(r.noextglob!==!0&&/^\([^?]/.test(b)){Ve("star",ee);continue}if(ne.type==="star"){if(r.noglobstar===!0){at(ee);continue}let S=ne.prev,y=S.prev,F=S.type==="slash"||S.type==="bos",J=y&&(y.type==="star"||y.type==="globstar");if(r.bash===!0&&(!F||b[0]&&b[0]!=="/")){Te({type:"star",value:ee,output:""});continue}let X=g.braces>0&&(S.type==="comma"||S.type==="brace"),Z=Ee.length&&(S.type==="pipe"||S.type==="paren");if(!F&&S.type!=="paren"&&!X&&!Z){Te({type:"star",value:ee,output:""});continue}for(;b.slice(0,3)==="/**";){let ie=t[g.index+4];if(ie&&ie!=="/")break;b=b.slice(3),at("/**",3)}if(S.type==="bos"&&Ie()){ne.type="globstar",ne.value+=ee,ne.output=me(r),g.output=ne.output,g.globstar=!0,at(ee);continue}if(S.type==="slash"&&S.prev.type!=="bos"&&!J&&Ie()){g.output=g.output.slice(0,-(S.output+ne.output).length),S.output=`(?:${S.output}`,ne.type="globstar",ne.output=me(r)+(r.strictSlashes?")":"|$)"),ne.value+=ee,g.globstar=!0,g.output+=S.output+ne.output,at(ee);continue}if(S.type==="slash"&&S.prev.type!=="bos"&&b[0]==="/"){let ie=b[1]!==void 0?"|$":"";g.output=g.output.slice(0,-(S.output+ne.output).length),S.output=`(?:${S.output}`,ne.type="globstar",ne.output=`${me(r)}${x}|${x}${ie})`,ne.value+=ee,g.output+=S.output+ne.output,g.globstar=!0,at(ee+At()),Te({type:"slash",value:"/",output:""});continue}if(S.type==="bos"&&b[0]==="/"){ne.type="globstar",ne.value+=ee,ne.output=`(?:^|${x}|${me(r)}${x})`,g.output=ne.output,g.globstar=!0,at(ee+At()),Te({type:"slash",value:"/",output:""});continue}g.output=g.output.slice(0,-ne.output.length),ne.type="globstar",ne.output=me(r),ne.value+=ee,g.output+=ne.output,g.globstar=!0,at(ee);continue}let w={type:"star",value:ee,output:we};if(r.bash===!0){w.output=".*?",(ne.type==="bos"||ne.type==="slash")&&(w.output=he+w.output),Te(w);continue}if(ne&&(ne.type==="bracket"||ne.type==="paren")&&r.regex===!0){w.output=ee,Te(w);continue}(g.index===g.start||ne.type==="slash"||ne.type==="dot")&&(ne.type==="dot"?(g.output+=U,ne.output+=U):r.dot===!0?(g.output+=V,ne.output+=V):(g.output+=he,ne.output+=he),Fe()!=="*"&&(g.output+=C,ne.output+=C)),Te(w)}for(;g.brackets>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ty("closing","]"));g.output=il.escapeLast(g.output,"["),He("brackets")}for(;g.parens>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ty("closing",")"));g.output=il.escapeLast(g.output,"("),He("parens")}for(;g.braces>0;){if(r.strictBrackets===!0)throw new SyntaxError(Ty("closing","}"));g.output=il.escapeLast(g.output,"{"),He("braces")}if(r.strictSlashes!==!0&&(ne.type==="star"||ne.type==="bracket")&&Te({type:"maybe_slash",value:"",output:`${x}?`}),g.backtrack===!0){g.output="";for(let b of g.tokens)g.output+=b.output!=null?b.output:b.value,b.suffix&&(g.output+=b.suffix)}return g};LL.fastpaths=(t,e)=>{let r={...e},o=typeof r.maxLength=="number"?Math.min(LP,r.maxLength):LP,a=t.length;if(a>o)throw new SyntaxError(`Input length: ${a}, exceeds maximum allowed length: ${o}`);t=DZ[t]||t;let n=il.isWindows(e),{DOT_LITERAL:u,SLASH_LITERAL:A,ONE_CHAR:p,DOTS_SLASH:h,NO_DOT:E,NO_DOTS:I,NO_DOTS_SLASH:v,STAR:x,START_ANCHOR:C}=TP.globChars(n),R=r.dot?I:E,N=r.dot?v:E,U=r.capture?"":"?:",V={negated:!1,prefix:""},te=r.bash===!0?".*?":x;r.capture&&(te=`(${te})`);let ae=he=>he.noglobstar===!0?te:`(${U}(?:(?!${C}${he.dot?h:u}).)*?)`,fe=he=>{switch(he){case"*":return`${R}${p}${te}`;case".*":return`${u}${p}${te}`;case"*.*":return`${R}${te}${u}${p}${te}`;case"*/*":return`${R}${te}${A}${p}${N}${te}`;case"**":return R+ae(r);case"**/*":return`(?:${R}${ae(r)}${A})?${N}${p}${te}`;case"**/*.*":return`(?:${R}${ae(r)}${A})?${N}${te}${u}${p}${te}`;case"**/.*":return`(?:${R}${ae(r)}${A})?${u}${p}${te}`;default:{let Be=/^(.*?)\.(\w+)$/.exec(he);if(!Be)return;let we=fe(Be[1]);return we?we+u+Be[2]:void 0}}},ue=il.removePrefix(t,V),me=fe(ue);return me&&r.strictSlashes!==!0&&(me+=`${A}?`),me};PZ.exports=LL});var xZ=_((XQt,bZ)=>{"use strict";var $7e=ve("path"),eYe=vZ(),NL=SZ(),OL=kI(),tYe=xI(),rYe=t=>t&&typeof t=="object"&&!Array.isArray(t),Mi=(t,e,r=!1)=>{if(Array.isArray(t)){let E=t.map(v=>Mi(v,e,r));return v=>{for(let x of E){let C=x(v);if(C)return C}return!1}}let o=rYe(t)&&t.tokens&&t.input;if(t===""||typeof t!="string"&&!o)throw new TypeError("Expected pattern to be a non-empty string");let a=e||{},n=OL.isWindows(e),u=o?Mi.compileRe(t,e):Mi.makeRe(t,e,!1,!0),A=u.state;delete u.state;let p=()=>!1;if(a.ignore){let E={...e,ignore:null,onMatch:null,onResult:null};p=Mi(a.ignore,E,r)}let h=(E,I=!1)=>{let{isMatch:v,match:x,output:C}=Mi.test(E,u,e,{glob:t,posix:n}),R={glob:t,state:A,regex:u,posix:n,input:E,output:C,match:x,isMatch:v};return typeof a.onResult=="function"&&a.onResult(R),v===!1?(R.isMatch=!1,I?R:!1):p(E)?(typeof a.onIgnore=="function"&&a.onIgnore(R),R.isMatch=!1,I?R:!1):(typeof a.onMatch=="function"&&a.onMatch(R),I?R:!0)};return r&&(h.state=A),h};Mi.test=(t,e,r,{glob:o,posix:a}={})=>{if(typeof t!="string")throw new TypeError("Expected input to be a string");if(t==="")return{isMatch:!1,output:""};let n=r||{},u=n.format||(a?OL.toPosixSlashes:null),A=t===o,p=A&&u?u(t):t;return A===!1&&(p=u?u(t):t,A=p===o),(A===!1||n.capture===!0)&&(n.matchBase===!0||n.basename===!0?A=Mi.matchBase(t,e,r,a):A=e.exec(p)),{isMatch:Boolean(A),match:A,output:p}};Mi.matchBase=(t,e,r,o=OL.isWindows(r))=>(e instanceof RegExp?e:Mi.makeRe(e,r)).test($7e.basename(t));Mi.isMatch=(t,e,r)=>Mi(e,r)(t);Mi.parse=(t,e)=>Array.isArray(t)?t.map(r=>Mi.parse(r,e)):NL(t,{...e,fastpaths:!1});Mi.scan=(t,e)=>eYe(t,e);Mi.compileRe=(t,e,r=!1,o=!1)=>{if(r===!0)return t.output;let a=e||{},n=a.contains?"":"^",u=a.contains?"":"$",A=`${n}(?:${t.output})${u}`;t&&t.negated===!0&&(A=`^(?!${A}).*$`);let p=Mi.toRegex(A,e);return o===!0&&(p.state=t),p};Mi.makeRe=(t,e={},r=!1,o=!1)=>{if(!t||typeof t!="string")throw new TypeError("Expected a non-empty string");let a={negated:!1,fastpaths:!0};return e.fastpaths!==!1&&(t[0]==="."||t[0]==="*")&&(a.output=NL.fastpaths(t,e)),a.output||(a=NL(t,e)),Mi.compileRe(a,e,r,o)};Mi.toRegex=(t,e)=>{try{let r=e||{};return new RegExp(t,r.flags||(r.nocase?"i":""))}catch(r){if(e&&e.debug===!0)throw r;return/$^/}};Mi.constants=tYe;bZ.exports=Mi});var QZ=_((ZQt,kZ)=>{"use strict";kZ.exports=xZ()});var Zo=_(($Qt,LZ)=>{"use strict";var RZ=ve("util"),TZ=AZ(),Vu=QZ(),ML=kI(),FZ=t=>t===""||t==="./",yi=(t,e,r)=>{e=[].concat(e),t=[].concat(t);let o=new Set,a=new Set,n=new Set,u=0,A=E=>{n.add(E.output),r&&r.onResult&&r.onResult(E)};for(let E=0;E!o.has(E));if(r&&h.length===0){if(r.failglob===!0)throw new Error(`No matches found for "${e.join(", ")}"`);if(r.nonull===!0||r.nullglob===!0)return r.unescape?e.map(E=>E.replace(/\\/g,"")):e}return h};yi.match=yi;yi.matcher=(t,e)=>Vu(t,e);yi.isMatch=(t,e,r)=>Vu(e,r)(t);yi.any=yi.isMatch;yi.not=(t,e,r={})=>{e=[].concat(e).map(String);let o=new Set,a=[],n=A=>{r.onResult&&r.onResult(A),a.push(A.output)},u=new Set(yi(t,e,{...r,onResult:n}));for(let A of a)u.has(A)||o.add(A);return[...o]};yi.contains=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${RZ.inspect(t)}"`);if(Array.isArray(e))return e.some(o=>yi.contains(t,o,r));if(typeof e=="string"){if(FZ(t)||FZ(e))return!1;if(t.includes(e)||t.startsWith("./")&&t.slice(2).includes(e))return!0}return yi.isMatch(t,e,{...r,contains:!0})};yi.matchKeys=(t,e,r)=>{if(!ML.isObject(t))throw new TypeError("Expected the first argument to be an object");let o=yi(Object.keys(t),e,r),a={};for(let n of o)a[n]=t[n];return a};yi.some=(t,e,r)=>{let o=[].concat(t);for(let a of[].concat(e)){let n=Vu(String(a),r);if(o.some(u=>n(u)))return!0}return!1};yi.every=(t,e,r)=>{let o=[].concat(t);for(let a of[].concat(e)){let n=Vu(String(a),r);if(!o.every(u=>n(u)))return!1}return!0};yi.all=(t,e,r)=>{if(typeof t!="string")throw new TypeError(`Expected a string: "${RZ.inspect(t)}"`);return[].concat(e).every(o=>Vu(o,r)(t))};yi.capture=(t,e,r)=>{let o=ML.isWindows(r),n=Vu.makeRe(String(t),{...r,capture:!0}).exec(o?ML.toPosixSlashes(e):e);if(n)return n.slice(1).map(u=>u===void 0?"":u)};yi.makeRe=(...t)=>Vu.makeRe(...t);yi.scan=(...t)=>Vu.scan(...t);yi.parse=(t,e)=>{let r=[];for(let o of[].concat(t||[]))for(let a of TZ(String(o),e))r.push(Vu.parse(a,e));return r};yi.braces=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return e&&e.nobrace===!0||!/\{.*\}/.test(t)?[t]:TZ(t,e)};yi.braceExpand=(t,e)=>{if(typeof t!="string")throw new TypeError("Expected a string");return yi.braces(t,{...e,expand:!0})};LZ.exports=yi});var OZ=_((eFt,NZ)=>{"use strict";NZ.exports=({onlyFirst:t=!1}={})=>{let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t?void 0:"g")}});var NP=_((tFt,MZ)=>{"use strict";var nYe=OZ();MZ.exports=t=>typeof t=="string"?t.replace(nYe(),""):t});var _Z=_((rFt,UZ)=>{function iYe(){this.__data__=[],this.size=0}UZ.exports=iYe});var Ly=_((nFt,HZ)=>{function sYe(t,e){return t===e||t!==t&&e!==e}HZ.exports=sYe});var FI=_((iFt,qZ)=>{var oYe=Ly();function aYe(t,e){for(var r=t.length;r--;)if(oYe(t[r][0],e))return r;return-1}qZ.exports=aYe});var jZ=_((sFt,GZ)=>{var lYe=FI(),cYe=Array.prototype,uYe=cYe.splice;function AYe(t){var e=this.__data__,r=lYe(e,t);if(r<0)return!1;var o=e.length-1;return r==o?e.pop():uYe.call(e,r,1),--this.size,!0}GZ.exports=AYe});var WZ=_((oFt,YZ)=>{var fYe=FI();function pYe(t){var e=this.__data__,r=fYe(e,t);return r<0?void 0:e[r][1]}YZ.exports=pYe});var zZ=_((aFt,KZ)=>{var hYe=FI();function gYe(t){return hYe(this.__data__,t)>-1}KZ.exports=gYe});var JZ=_((lFt,VZ)=>{var dYe=FI();function mYe(t,e){var r=this.__data__,o=dYe(r,t);return o<0?(++this.size,r.push([t,e])):r[o][1]=e,this}VZ.exports=mYe});var RI=_((cFt,XZ)=>{var yYe=_Z(),EYe=jZ(),CYe=WZ(),wYe=zZ(),IYe=JZ();function Ny(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var BYe=RI();function vYe(){this.__data__=new BYe,this.size=0}ZZ.exports=vYe});var t$=_((AFt,e$)=>{function DYe(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}e$.exports=DYe});var n$=_((fFt,r$)=>{function PYe(t){return this.__data__.get(t)}r$.exports=PYe});var s$=_((pFt,i$)=>{function SYe(t){return this.__data__.has(t)}i$.exports=SYe});var UL=_((hFt,o$)=>{var bYe=typeof global=="object"&&global&&global.Object===Object&&global;o$.exports=bYe});var Hl=_((gFt,a$)=>{var xYe=UL(),kYe=typeof self=="object"&&self&&self.Object===Object&&self,QYe=xYe||kYe||Function("return this")();a$.exports=QYe});var hd=_((dFt,l$)=>{var FYe=Hl(),RYe=FYe.Symbol;l$.exports=RYe});var f$=_((mFt,A$)=>{var c$=hd(),u$=Object.prototype,TYe=u$.hasOwnProperty,LYe=u$.toString,TI=c$?c$.toStringTag:void 0;function NYe(t){var e=TYe.call(t,TI),r=t[TI];try{t[TI]=void 0;var o=!0}catch{}var a=LYe.call(t);return o&&(e?t[TI]=r:delete t[TI]),a}A$.exports=NYe});var h$=_((yFt,p$)=>{var OYe=Object.prototype,MYe=OYe.toString;function UYe(t){return MYe.call(t)}p$.exports=UYe});var gd=_((EFt,m$)=>{var g$=hd(),_Ye=f$(),HYe=h$(),qYe="[object Null]",GYe="[object Undefined]",d$=g$?g$.toStringTag:void 0;function jYe(t){return t==null?t===void 0?GYe:qYe:d$&&d$ in Object(t)?_Ye(t):HYe(t)}m$.exports=jYe});var sl=_((CFt,y$)=>{function YYe(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}y$.exports=YYe});var OP=_((wFt,E$)=>{var WYe=gd(),KYe=sl(),zYe="[object AsyncFunction]",VYe="[object Function]",JYe="[object GeneratorFunction]",XYe="[object Proxy]";function ZYe(t){if(!KYe(t))return!1;var e=WYe(t);return e==VYe||e==JYe||e==zYe||e==XYe}E$.exports=ZYe});var w$=_((IFt,C$)=>{var $Ye=Hl(),eWe=$Ye["__core-js_shared__"];C$.exports=eWe});var v$=_((BFt,B$)=>{var _L=w$(),I$=function(){var t=/[^.]+$/.exec(_L&&_L.keys&&_L.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function tWe(t){return!!I$&&I$ in t}B$.exports=tWe});var HL=_((vFt,D$)=>{var rWe=Function.prototype,nWe=rWe.toString;function iWe(t){if(t!=null){try{return nWe.call(t)}catch{}try{return t+""}catch{}}return""}D$.exports=iWe});var S$=_((DFt,P$)=>{var sWe=OP(),oWe=v$(),aWe=sl(),lWe=HL(),cWe=/[\\^$.*+?()[\]{}|]/g,uWe=/^\[object .+?Constructor\]$/,AWe=Function.prototype,fWe=Object.prototype,pWe=AWe.toString,hWe=fWe.hasOwnProperty,gWe=RegExp("^"+pWe.call(hWe).replace(cWe,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function dWe(t){if(!aWe(t)||oWe(t))return!1;var e=sWe(t)?gWe:uWe;return e.test(lWe(t))}P$.exports=dWe});var x$=_((PFt,b$)=>{function mWe(t,e){return t?.[e]}b$.exports=mWe});var Xp=_((SFt,k$)=>{var yWe=S$(),EWe=x$();function CWe(t,e){var r=EWe(t,e);return yWe(r)?r:void 0}k$.exports=CWe});var MP=_((bFt,Q$)=>{var wWe=Xp(),IWe=Hl(),BWe=wWe(IWe,"Map");Q$.exports=BWe});var LI=_((xFt,F$)=>{var vWe=Xp(),DWe=vWe(Object,"create");F$.exports=DWe});var L$=_((kFt,T$)=>{var R$=LI();function PWe(){this.__data__=R$?R$(null):{},this.size=0}T$.exports=PWe});var O$=_((QFt,N$)=>{function SWe(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}N$.exports=SWe});var U$=_((FFt,M$)=>{var bWe=LI(),xWe="__lodash_hash_undefined__",kWe=Object.prototype,QWe=kWe.hasOwnProperty;function FWe(t){var e=this.__data__;if(bWe){var r=e[t];return r===xWe?void 0:r}return QWe.call(e,t)?e[t]:void 0}M$.exports=FWe});var H$=_((RFt,_$)=>{var RWe=LI(),TWe=Object.prototype,LWe=TWe.hasOwnProperty;function NWe(t){var e=this.__data__;return RWe?e[t]!==void 0:LWe.call(e,t)}_$.exports=NWe});var G$=_((TFt,q$)=>{var OWe=LI(),MWe="__lodash_hash_undefined__";function UWe(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=OWe&&e===void 0?MWe:e,this}q$.exports=UWe});var Y$=_((LFt,j$)=>{var _We=L$(),HWe=O$(),qWe=U$(),GWe=H$(),jWe=G$();function Oy(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var W$=Y$(),YWe=RI(),WWe=MP();function KWe(){this.size=0,this.__data__={hash:new W$,map:new(WWe||YWe),string:new W$}}K$.exports=KWe});var J$=_((OFt,V$)=>{function zWe(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}V$.exports=zWe});var NI=_((MFt,X$)=>{var VWe=J$();function JWe(t,e){var r=t.__data__;return VWe(e)?r[typeof e=="string"?"string":"hash"]:r.map}X$.exports=JWe});var $$=_((UFt,Z$)=>{var XWe=NI();function ZWe(t){var e=XWe(this,t).delete(t);return this.size-=e?1:0,e}Z$.exports=ZWe});var tee=_((_Ft,eee)=>{var $We=NI();function eKe(t){return $We(this,t).get(t)}eee.exports=eKe});var nee=_((HFt,ree)=>{var tKe=NI();function rKe(t){return tKe(this,t).has(t)}ree.exports=rKe});var see=_((qFt,iee)=>{var nKe=NI();function iKe(t,e){var r=nKe(this,t),o=r.size;return r.set(t,e),this.size+=r.size==o?0:1,this}iee.exports=iKe});var UP=_((GFt,oee)=>{var sKe=z$(),oKe=$$(),aKe=tee(),lKe=nee(),cKe=see();function My(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e{var uKe=RI(),AKe=MP(),fKe=UP(),pKe=200;function hKe(t,e){var r=this.__data__;if(r instanceof uKe){var o=r.__data__;if(!AKe||o.length{var gKe=RI(),dKe=$Z(),mKe=t$(),yKe=n$(),EKe=s$(),CKe=lee();function Uy(t){var e=this.__data__=new gKe(t);this.size=e.size}Uy.prototype.clear=dKe;Uy.prototype.delete=mKe;Uy.prototype.get=yKe;Uy.prototype.has=EKe;Uy.prototype.set=CKe;cee.exports=Uy});var Aee=_((WFt,uee)=>{var wKe="__lodash_hash_undefined__";function IKe(t){return this.__data__.set(t,wKe),this}uee.exports=IKe});var pee=_((KFt,fee)=>{function BKe(t){return this.__data__.has(t)}fee.exports=BKe});var gee=_((zFt,hee)=>{var vKe=UP(),DKe=Aee(),PKe=pee();function HP(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new vKe;++e{function SKe(t,e){for(var r=-1,o=t==null?0:t.length;++r{function bKe(t,e){return t.has(e)}yee.exports=bKe});var qL=_((XFt,Cee)=>{var xKe=gee(),kKe=mee(),QKe=Eee(),FKe=1,RKe=2;function TKe(t,e,r,o,a,n){var u=r&FKe,A=t.length,p=e.length;if(A!=p&&!(u&&p>A))return!1;var h=n.get(t),E=n.get(e);if(h&&E)return h==e&&E==t;var I=-1,v=!0,x=r&RKe?new xKe:void 0;for(n.set(t,e),n.set(e,t);++I{var LKe=Hl(),NKe=LKe.Uint8Array;wee.exports=NKe});var Bee=_(($Ft,Iee)=>{function OKe(t){var e=-1,r=Array(t.size);return t.forEach(function(o,a){r[++e]=[a,o]}),r}Iee.exports=OKe});var Dee=_((eRt,vee)=>{function MKe(t){var e=-1,r=Array(t.size);return t.forEach(function(o){r[++e]=o}),r}vee.exports=MKe});var kee=_((tRt,xee)=>{var Pee=hd(),See=jL(),UKe=Ly(),_Ke=qL(),HKe=Bee(),qKe=Dee(),GKe=1,jKe=2,YKe="[object Boolean]",WKe="[object Date]",KKe="[object Error]",zKe="[object Map]",VKe="[object Number]",JKe="[object RegExp]",XKe="[object Set]",ZKe="[object String]",$Ke="[object Symbol]",eze="[object ArrayBuffer]",tze="[object DataView]",bee=Pee?Pee.prototype:void 0,YL=bee?bee.valueOf:void 0;function rze(t,e,r,o,a,n,u){switch(r){case tze:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case eze:return!(t.byteLength!=e.byteLength||!n(new See(t),new See(e)));case YKe:case WKe:case VKe:return UKe(+t,+e);case KKe:return t.name==e.name&&t.message==e.message;case JKe:case ZKe:return t==e+"";case zKe:var A=HKe;case XKe:var p=o&GKe;if(A||(A=qKe),t.size!=e.size&&!p)return!1;var h=u.get(t);if(h)return h==e;o|=jKe,u.set(t,e);var E=_Ke(A(t),A(e),o,a,n,u);return u.delete(t),E;case $Ke:if(YL)return YL.call(t)==YL.call(e)}return!1}xee.exports=rze});var qP=_((rRt,Qee)=>{function nze(t,e){for(var r=-1,o=e.length,a=t.length;++r{var ize=Array.isArray;Fee.exports=ize});var WL=_((iRt,Ree)=>{var sze=qP(),oze=ql();function aze(t,e,r){var o=e(t);return oze(t)?o:sze(o,r(t))}Ree.exports=aze});var Lee=_((sRt,Tee)=>{function lze(t,e){for(var r=-1,o=t==null?0:t.length,a=0,n=[];++r{function cze(){return[]}Nee.exports=cze});var GP=_((aRt,Mee)=>{var uze=Lee(),Aze=KL(),fze=Object.prototype,pze=fze.propertyIsEnumerable,Oee=Object.getOwnPropertySymbols,hze=Oee?function(t){return t==null?[]:(t=Object(t),uze(Oee(t),function(e){return pze.call(t,e)}))}:Aze;Mee.exports=hze});var _ee=_((lRt,Uee)=>{function gze(t,e){for(var r=-1,o=Array(t);++r{function dze(t){return t!=null&&typeof t=="object"}Hee.exports=dze});var Gee=_((uRt,qee)=>{var mze=gd(),yze=Ju(),Eze="[object Arguments]";function Cze(t){return yze(t)&&mze(t)==Eze}qee.exports=Cze});var OI=_((ARt,Wee)=>{var jee=Gee(),wze=Ju(),Yee=Object.prototype,Ize=Yee.hasOwnProperty,Bze=Yee.propertyIsEnumerable,vze=jee(function(){return arguments}())?jee:function(t){return wze(t)&&Ize.call(t,"callee")&&!Bze.call(t,"callee")};Wee.exports=vze});var zee=_((fRt,Kee)=>{function Dze(){return!1}Kee.exports=Dze});var UI=_((MI,_y)=>{var Pze=Hl(),Sze=zee(),Xee=typeof MI=="object"&&MI&&!MI.nodeType&&MI,Vee=Xee&&typeof _y=="object"&&_y&&!_y.nodeType&&_y,bze=Vee&&Vee.exports===Xee,Jee=bze?Pze.Buffer:void 0,xze=Jee?Jee.isBuffer:void 0,kze=xze||Sze;_y.exports=kze});var _I=_((pRt,Zee)=>{var Qze=9007199254740991,Fze=/^(?:0|[1-9]\d*)$/;function Rze(t,e){var r=typeof t;return e=e??Qze,!!e&&(r=="number"||r!="symbol"&&Fze.test(t))&&t>-1&&t%1==0&&t{var Tze=9007199254740991;function Lze(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Tze}$ee.exports=Lze});var tte=_((gRt,ete)=>{var Nze=gd(),Oze=jP(),Mze=Ju(),Uze="[object Arguments]",_ze="[object Array]",Hze="[object Boolean]",qze="[object Date]",Gze="[object Error]",jze="[object Function]",Yze="[object Map]",Wze="[object Number]",Kze="[object Object]",zze="[object RegExp]",Vze="[object Set]",Jze="[object String]",Xze="[object WeakMap]",Zze="[object ArrayBuffer]",$ze="[object DataView]",eVe="[object Float32Array]",tVe="[object Float64Array]",rVe="[object Int8Array]",nVe="[object Int16Array]",iVe="[object Int32Array]",sVe="[object Uint8Array]",oVe="[object Uint8ClampedArray]",aVe="[object Uint16Array]",lVe="[object Uint32Array]",ui={};ui[eVe]=ui[tVe]=ui[rVe]=ui[nVe]=ui[iVe]=ui[sVe]=ui[oVe]=ui[aVe]=ui[lVe]=!0;ui[Uze]=ui[_ze]=ui[Zze]=ui[Hze]=ui[$ze]=ui[qze]=ui[Gze]=ui[jze]=ui[Yze]=ui[Wze]=ui[Kze]=ui[zze]=ui[Vze]=ui[Jze]=ui[Xze]=!1;function cVe(t){return Mze(t)&&Oze(t.length)&&!!ui[Nze(t)]}ete.exports=cVe});var YP=_((dRt,rte)=>{function uVe(t){return function(e){return t(e)}}rte.exports=uVe});var WP=_((HI,Hy)=>{var AVe=UL(),nte=typeof HI=="object"&&HI&&!HI.nodeType&&HI,qI=nte&&typeof Hy=="object"&&Hy&&!Hy.nodeType&&Hy,fVe=qI&&qI.exports===nte,zL=fVe&&AVe.process,pVe=function(){try{var t=qI&&qI.require&&qI.require("util").types;return t||zL&&zL.binding&&zL.binding("util")}catch{}}();Hy.exports=pVe});var KP=_((mRt,ote)=>{var hVe=tte(),gVe=YP(),ite=WP(),ste=ite&&ite.isTypedArray,dVe=ste?gVe(ste):hVe;ote.exports=dVe});var VL=_((yRt,ate)=>{var mVe=_ee(),yVe=OI(),EVe=ql(),CVe=UI(),wVe=_I(),IVe=KP(),BVe=Object.prototype,vVe=BVe.hasOwnProperty;function DVe(t,e){var r=EVe(t),o=!r&&yVe(t),a=!r&&!o&&CVe(t),n=!r&&!o&&!a&&IVe(t),u=r||o||a||n,A=u?mVe(t.length,String):[],p=A.length;for(var h in t)(e||vVe.call(t,h))&&!(u&&(h=="length"||a&&(h=="offset"||h=="parent")||n&&(h=="buffer"||h=="byteLength"||h=="byteOffset")||wVe(h,p)))&&A.push(h);return A}ate.exports=DVe});var zP=_((ERt,lte)=>{var PVe=Object.prototype;function SVe(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||PVe;return t===r}lte.exports=SVe});var JL=_((CRt,cte)=>{function bVe(t,e){return function(r){return t(e(r))}}cte.exports=bVe});var Ate=_((wRt,ute)=>{var xVe=JL(),kVe=xVe(Object.keys,Object);ute.exports=kVe});var pte=_((IRt,fte)=>{var QVe=zP(),FVe=Ate(),RVe=Object.prototype,TVe=RVe.hasOwnProperty;function LVe(t){if(!QVe(t))return FVe(t);var e=[];for(var r in Object(t))TVe.call(t,r)&&r!="constructor"&&e.push(r);return e}fte.exports=LVe});var GI=_((BRt,hte)=>{var NVe=OP(),OVe=jP();function MVe(t){return t!=null&&OVe(t.length)&&!NVe(t)}hte.exports=MVe});var VP=_((vRt,gte)=>{var UVe=VL(),_Ve=pte(),HVe=GI();function qVe(t){return HVe(t)?UVe(t):_Ve(t)}gte.exports=qVe});var XL=_((DRt,dte)=>{var GVe=WL(),jVe=GP(),YVe=VP();function WVe(t){return GVe(t,YVe,jVe)}dte.exports=WVe});var Ete=_((PRt,yte)=>{var mte=XL(),KVe=1,zVe=Object.prototype,VVe=zVe.hasOwnProperty;function JVe(t,e,r,o,a,n){var u=r&KVe,A=mte(t),p=A.length,h=mte(e),E=h.length;if(p!=E&&!u)return!1;for(var I=p;I--;){var v=A[I];if(!(u?v in e:VVe.call(e,v)))return!1}var x=n.get(t),C=n.get(e);if(x&&C)return x==e&&C==t;var R=!0;n.set(t,e),n.set(e,t);for(var N=u;++I{var XVe=Xp(),ZVe=Hl(),$Ve=XVe(ZVe,"DataView");Cte.exports=$Ve});var Bte=_((bRt,Ite)=>{var eJe=Xp(),tJe=Hl(),rJe=eJe(tJe,"Promise");Ite.exports=rJe});var Dte=_((xRt,vte)=>{var nJe=Xp(),iJe=Hl(),sJe=nJe(iJe,"Set");vte.exports=sJe});var Ste=_((kRt,Pte)=>{var oJe=Xp(),aJe=Hl(),lJe=oJe(aJe,"WeakMap");Pte.exports=lJe});var jI=_((QRt,Tte)=>{var ZL=wte(),$L=MP(),eN=Bte(),tN=Dte(),rN=Ste(),Rte=gd(),qy=HL(),bte="[object Map]",cJe="[object Object]",xte="[object Promise]",kte="[object Set]",Qte="[object WeakMap]",Fte="[object DataView]",uJe=qy(ZL),AJe=qy($L),fJe=qy(eN),pJe=qy(tN),hJe=qy(rN),dd=Rte;(ZL&&dd(new ZL(new ArrayBuffer(1)))!=Fte||$L&&dd(new $L)!=bte||eN&&dd(eN.resolve())!=xte||tN&&dd(new tN)!=kte||rN&&dd(new rN)!=Qte)&&(dd=function(t){var e=Rte(t),r=e==cJe?t.constructor:void 0,o=r?qy(r):"";if(o)switch(o){case uJe:return Fte;case AJe:return bte;case fJe:return xte;case pJe:return kte;case hJe:return Qte}return e});Tte.exports=dd});var qte=_((FRt,Hte)=>{var nN=_P(),gJe=qL(),dJe=kee(),mJe=Ete(),Lte=jI(),Nte=ql(),Ote=UI(),yJe=KP(),EJe=1,Mte="[object Arguments]",Ute="[object Array]",JP="[object Object]",CJe=Object.prototype,_te=CJe.hasOwnProperty;function wJe(t,e,r,o,a,n){var u=Nte(t),A=Nte(e),p=u?Ute:Lte(t),h=A?Ute:Lte(e);p=p==Mte?JP:p,h=h==Mte?JP:h;var E=p==JP,I=h==JP,v=p==h;if(v&&Ote(t)){if(!Ote(e))return!1;u=!0,E=!1}if(v&&!E)return n||(n=new nN),u||yJe(t)?gJe(t,e,r,o,a,n):dJe(t,e,p,r,o,a,n);if(!(r&EJe)){var x=E&&_te.call(t,"__wrapped__"),C=I&&_te.call(e,"__wrapped__");if(x||C){var R=x?t.value():t,N=C?e.value():e;return n||(n=new nN),a(R,N,r,o,n)}}return v?(n||(n=new nN),mJe(t,e,r,o,a,n)):!1}Hte.exports=wJe});var Wte=_((RRt,Yte)=>{var IJe=qte(),Gte=Ju();function jte(t,e,r,o,a){return t===e?!0:t==null||e==null||!Gte(t)&&!Gte(e)?t!==t&&e!==e:IJe(t,e,r,o,jte,a)}Yte.exports=jte});var zte=_((TRt,Kte)=>{var BJe=Wte();function vJe(t,e){return BJe(t,e)}Kte.exports=vJe});var iN=_((LRt,Vte)=>{var DJe=Xp(),PJe=function(){try{var t=DJe(Object,"defineProperty");return t({},"",{}),t}catch{}}();Vte.exports=PJe});var XP=_((NRt,Xte)=>{var Jte=iN();function SJe(t,e,r){e=="__proto__"&&Jte?Jte(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}Xte.exports=SJe});var sN=_((ORt,Zte)=>{var bJe=XP(),xJe=Ly();function kJe(t,e,r){(r!==void 0&&!xJe(t[e],r)||r===void 0&&!(e in t))&&bJe(t,e,r)}Zte.exports=kJe});var ere=_((MRt,$te)=>{function QJe(t){return function(e,r,o){for(var a=-1,n=Object(e),u=o(e),A=u.length;A--;){var p=u[t?A:++a];if(r(n[p],p,n)===!1)break}return e}}$te.exports=QJe});var rre=_((URt,tre)=>{var FJe=ere(),RJe=FJe();tre.exports=RJe});var oN=_((YI,Gy)=>{var TJe=Hl(),ore=typeof YI=="object"&&YI&&!YI.nodeType&&YI,nre=ore&&typeof Gy=="object"&&Gy&&!Gy.nodeType&&Gy,LJe=nre&&nre.exports===ore,ire=LJe?TJe.Buffer:void 0,sre=ire?ire.allocUnsafe:void 0;function NJe(t,e){if(e)return t.slice();var r=t.length,o=sre?sre(r):new t.constructor(r);return t.copy(o),o}Gy.exports=NJe});var ZP=_((_Rt,lre)=>{var are=jL();function OJe(t){var e=new t.constructor(t.byteLength);return new are(e).set(new are(t)),e}lre.exports=OJe});var aN=_((HRt,cre)=>{var MJe=ZP();function UJe(t,e){var r=e?MJe(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}cre.exports=UJe});var $P=_((qRt,ure)=>{function _Je(t,e){var r=-1,o=t.length;for(e||(e=Array(o));++r{var HJe=sl(),Are=Object.create,qJe=function(){function t(){}return function(e){if(!HJe(e))return{};if(Are)return Are(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();fre.exports=qJe});var eS=_((jRt,hre)=>{var GJe=JL(),jJe=GJe(Object.getPrototypeOf,Object);hre.exports=jJe});var lN=_((YRt,gre)=>{var YJe=pre(),WJe=eS(),KJe=zP();function zJe(t){return typeof t.constructor=="function"&&!KJe(t)?YJe(WJe(t)):{}}gre.exports=zJe});var mre=_((WRt,dre)=>{var VJe=GI(),JJe=Ju();function XJe(t){return JJe(t)&&VJe(t)}dre.exports=XJe});var cN=_((KRt,Ere)=>{var ZJe=gd(),$Je=eS(),eXe=Ju(),tXe="[object Object]",rXe=Function.prototype,nXe=Object.prototype,yre=rXe.toString,iXe=nXe.hasOwnProperty,sXe=yre.call(Object);function oXe(t){if(!eXe(t)||ZJe(t)!=tXe)return!1;var e=$Je(t);if(e===null)return!0;var r=iXe.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&yre.call(r)==sXe}Ere.exports=oXe});var uN=_((zRt,Cre)=>{function aXe(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}Cre.exports=aXe});var tS=_((VRt,wre)=>{var lXe=XP(),cXe=Ly(),uXe=Object.prototype,AXe=uXe.hasOwnProperty;function fXe(t,e,r){var o=t[e];(!(AXe.call(t,e)&&cXe(o,r))||r===void 0&&!(e in t))&&lXe(t,e,r)}wre.exports=fXe});var md=_((JRt,Ire)=>{var pXe=tS(),hXe=XP();function gXe(t,e,r,o){var a=!r;r||(r={});for(var n=-1,u=e.length;++n{function dXe(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}Bre.exports=dXe});var Pre=_((ZRt,Dre)=>{var mXe=sl(),yXe=zP(),EXe=vre(),CXe=Object.prototype,wXe=CXe.hasOwnProperty;function IXe(t){if(!mXe(t))return EXe(t);var e=yXe(t),r=[];for(var o in t)o=="constructor"&&(e||!wXe.call(t,o))||r.push(o);return r}Dre.exports=IXe});var jy=_(($Rt,Sre)=>{var BXe=VL(),vXe=Pre(),DXe=GI();function PXe(t){return DXe(t)?BXe(t,!0):vXe(t)}Sre.exports=PXe});var xre=_((eTt,bre)=>{var SXe=md(),bXe=jy();function xXe(t){return SXe(t,bXe(t))}bre.exports=xXe});var Lre=_((tTt,Tre)=>{var kre=sN(),kXe=oN(),QXe=aN(),FXe=$P(),RXe=lN(),Qre=OI(),Fre=ql(),TXe=mre(),LXe=UI(),NXe=OP(),OXe=sl(),MXe=cN(),UXe=KP(),Rre=uN(),_Xe=xre();function HXe(t,e,r,o,a,n,u){var A=Rre(t,r),p=Rre(e,r),h=u.get(p);if(h){kre(t,r,h);return}var E=n?n(A,p,r+"",t,e,u):void 0,I=E===void 0;if(I){var v=Fre(p),x=!v&&LXe(p),C=!v&&!x&&UXe(p);E=p,v||x||C?Fre(A)?E=A:TXe(A)?E=FXe(A):x?(I=!1,E=kXe(p,!0)):C?(I=!1,E=QXe(p,!0)):E=[]:MXe(p)||Qre(p)?(E=A,Qre(A)?E=_Xe(A):(!OXe(A)||NXe(A))&&(E=RXe(p))):I=!1}I&&(u.set(p,E),a(E,p,o,n,u),u.delete(p)),kre(t,r,E)}Tre.exports=HXe});var Mre=_((rTt,Ore)=>{var qXe=_P(),GXe=sN(),jXe=rre(),YXe=Lre(),WXe=sl(),KXe=jy(),zXe=uN();function Nre(t,e,r,o,a){t!==e&&jXe(e,function(n,u){if(a||(a=new qXe),WXe(n))YXe(t,e,u,r,Nre,o,a);else{var A=o?o(zXe(t,u),n,u+"",t,e,a):void 0;A===void 0&&(A=n),GXe(t,u,A)}},KXe)}Ore.exports=Nre});var AN=_((nTt,Ure)=>{function VXe(t){return t}Ure.exports=VXe});var Hre=_((iTt,_re)=>{function JXe(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}_re.exports=JXe});var fN=_((sTt,Gre)=>{var XXe=Hre(),qre=Math.max;function ZXe(t,e,r){return e=qre(e===void 0?t.length-1:e,0),function(){for(var o=arguments,a=-1,n=qre(o.length-e,0),u=Array(n);++a{function $Xe(t){return function(){return t}}jre.exports=$Xe});var zre=_((aTt,Kre)=>{var eZe=Yre(),Wre=iN(),tZe=AN(),rZe=Wre?function(t,e){return Wre(t,"toString",{configurable:!0,enumerable:!1,value:eZe(e),writable:!0})}:tZe;Kre.exports=rZe});var Jre=_((lTt,Vre)=>{var nZe=800,iZe=16,sZe=Date.now;function oZe(t){var e=0,r=0;return function(){var o=sZe(),a=iZe-(o-r);if(r=o,a>0){if(++e>=nZe)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}Vre.exports=oZe});var pN=_((cTt,Xre)=>{var aZe=zre(),lZe=Jre(),cZe=lZe(aZe);Xre.exports=cZe});var $re=_((uTt,Zre)=>{var uZe=AN(),AZe=fN(),fZe=pN();function pZe(t,e){return fZe(AZe(t,e,uZe),t+"")}Zre.exports=pZe});var tne=_((ATt,ene)=>{var hZe=Ly(),gZe=GI(),dZe=_I(),mZe=sl();function yZe(t,e,r){if(!mZe(r))return!1;var o=typeof e;return(o=="number"?gZe(r)&&dZe(e,r.length):o=="string"&&e in r)?hZe(r[e],t):!1}ene.exports=yZe});var nne=_((fTt,rne)=>{var EZe=$re(),CZe=tne();function wZe(t){return EZe(function(e,r){var o=-1,a=r.length,n=a>1?r[a-1]:void 0,u=a>2?r[2]:void 0;for(n=t.length>3&&typeof n=="function"?(a--,n):void 0,u&&CZe(r[0],r[1],u)&&(n=a<3?void 0:n,a=1),e=Object(e);++o{var IZe=Mre(),BZe=nne(),vZe=BZe(function(t,e,r,o){IZe(t,e,r,o)});ine.exports=vZe});var _e={};zt(_e,{AsyncActions:()=>dN,BufferStream:()=>gN,CachingStrategy:()=>mne,DefaultStream:()=>mN,allSettledSafe:()=>_c,assertNever:()=>EN,bufferStream:()=>zy,buildIgnorePattern:()=>QZe,convertMapsToIndexableObjects:()=>nS,dynamicRequire:()=>Df,escapeRegExp:()=>PZe,getArrayWithDefault:()=>Yy,getFactoryWithDefault:()=>al,getMapWithDefault:()=>Wy,getSetWithDefault:()=>yd,groupBy:()=>IN,isIndexableObject:()=>hN,isPathLike:()=>FZe,isTaggedYarnVersion:()=>DZe,makeDeferred:()=>hne,mapAndFilter:()=>ol,mapAndFind:()=>KI,mergeIntoTarget:()=>Ene,overrideType:()=>SZe,parseBoolean:()=>zI,parseInt:()=>Vy,parseOptionalBoolean:()=>yne,plural:()=>rS,prettifyAsyncErrors:()=>Ky,prettifySyncErrors:()=>CN,releaseAfterUseAsync:()=>xZe,replaceEnvVariables:()=>iS,sortMap:()=>ks,toMerged:()=>RZe,tryParseOptionalBoolean:()=>wN,validateEnum:()=>bZe});function DZe(t){return!!(Ane.default.valid(t)&&t.match(/^[^-]+(-rc\.[0-9]+)?$/))}function rS(t,{one:e,more:r,zero:o=r}){return t===0?o:t===1?e:r}function PZe(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function SZe(t){}function EN(t){throw new Error(`Assertion failed: Unexpected object '${t}'`)}function bZe(t,e){let r=Object.values(t);if(!r.includes(e))throw new it(`Invalid value for enumeration: ${JSON.stringify(e)} (expected one of ${r.map(o=>JSON.stringify(o)).join(", ")})`);return e}function ol(t,e){let r=[];for(let o of t){let a=e(o);a!==fne&&r.push(a)}return r}function KI(t,e){for(let r of t){let o=e(r);if(o!==pne)return o}}function hN(t){return typeof t=="object"&&t!==null}async function _c(t){let e=await Promise.allSettled(t),r=[];for(let o of e){if(o.status==="rejected")throw o.reason;r.push(o.value)}return r}function nS(t){if(t instanceof Map&&(t=Object.fromEntries(t)),hN(t))for(let e of Object.keys(t)){let r=t[e];hN(r)&&(t[e]=nS(r))}return t}function al(t,e,r){let o=t.get(e);return typeof o>"u"&&t.set(e,o=r()),o}function Yy(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=[]),r}function yd(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=new Set),r}function Wy(t,e){let r=t.get(e);return typeof r>"u"&&t.set(e,r=new Map),r}async function xZe(t,e){if(e==null)return await t();try{return await t()}finally{await e()}}async function Ky(t,e){try{return await t()}catch(r){throw r.message=e(r.message),r}}function CN(t,e){try{return t()}catch(r){throw r.message=e(r.message),r}}async function zy(t){return await new Promise((e,r)=>{let o=[];t.on("error",a=>{r(a)}),t.on("data",a=>{o.push(a)}),t.on("end",()=>{e(Buffer.concat(o))})})}function hne(){let t,e;return{promise:new Promise((o,a)=>{t=o,e=a}),resolve:t,reject:e}}function gne(t){return WI(le.fromPortablePath(t))}function dne(path){let physicalPath=le.fromPortablePath(path),currentCacheEntry=WI.cache[physicalPath];delete WI.cache[physicalPath];let result;try{result=gne(physicalPath);let freshCacheEntry=WI.cache[physicalPath],dynamicModule=eval("module"),freshCacheIndex=dynamicModule.children.indexOf(freshCacheEntry);freshCacheIndex!==-1&&dynamicModule.children.splice(freshCacheIndex,1)}finally{WI.cache[physicalPath]=currentCacheEntry}return result}function kZe(t){let e=one.get(t),r=oe.statSync(t);if(e?.mtime===r.mtimeMs)return e.instance;let o=dne(t);return one.set(t,{mtime:r.mtimeMs,instance:o}),o}function Df(t,{cachingStrategy:e=2}={}){switch(e){case 0:return dne(t);case 1:return kZe(t);case 2:return gne(t);default:throw new Error("Unsupported caching strategy")}}function ks(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let o=[];for(let n of e)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function QZe(t){return t.length===0?null:t.map(e=>`(${cne.default.makeRe(e,{windows:!1,dot:!0}).source})`).join("|")}function iS(t,{env:e}){let r=/\${(?[\d\w_]+)(?:)?(?:-(?[^}]*))?}/g;return t.replace(r,(...o)=>{let{variableName:a,colon:n,fallback:u}=o[o.length-1],A=Object.hasOwn(e,a),p=e[a];if(p||A&&!n)return p;if(u!=null)return u;throw new it(`Environment variable not found (${a})`)})}function zI(t){switch(t){case"true":case"1":case 1:case!0:return!0;case"false":case"0":case 0:case!1:return!1;default:throw new Error(`Couldn't parse "${t}" as a boolean`)}}function yne(t){return typeof t>"u"?t:zI(t)}function wN(t){try{return yne(t)}catch{return null}}function FZe(t){return!!(le.isAbsolute(t)||t.match(/^(\.{1,2}|~)\//))}function Ene(t,...e){let r=u=>({value:u}),o=r(t),a=e.map(u=>r(u)),{value:n}=(0,lne.default)(o,...a,(u,A)=>{if(Array.isArray(u)&&Array.isArray(A)){for(let p of A)u.find(h=>(0,ane.default)(h,p))||u.push(p);return u}});return n}function RZe(...t){return Ene({},...t)}function IN(t,e){let r=Object.create(null);for(let o of t){let a=o[e];r[a]??=[],r[a].push(o)}return r}function Vy(t){return typeof t=="string"?Number.parseInt(t,10):t}var ane,lne,cne,une,Ane,yN,fne,pne,gN,dN,mN,WI,one,mne,Gl=Et(()=>{Pt();qt();ane=$e(zte()),lne=$e(sne()),cne=$e(Zo()),une=$e(sd()),Ane=$e(Jn()),yN=ve("stream");fne=Symbol();ol.skip=fne;pne=Symbol();KI.skip=pne;gN=class extends yN.Transform{constructor(){super(...arguments);this.chunks=[]}_transform(r,o,a){if(o!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: BufferStream only accept buffers");this.chunks.push(r),a(null,null)}_flush(r){r(null,Buffer.concat(this.chunks))}};dN=class{constructor(e){this.deferred=new Map;this.promises=new Map;this.limit=(0,une.default)(e)}set(e,r){let o=this.deferred.get(e);typeof o>"u"&&this.deferred.set(e,o=hne());let a=this.limit(()=>r());return this.promises.set(e,a),a.then(()=>{this.promises.get(e)===a&&o.resolve()},n=>{this.promises.get(e)===a&&o.reject(n)}),o.promise}reduce(e,r){let o=this.promises.get(e)??Promise.resolve();this.set(e,()=>r(o))}async wait(){await Promise.all(this.promises.values())}},mN=class extends yN.Transform{constructor(r=Buffer.alloc(0)){super();this.active=!0;this.ifEmpty=r}_transform(r,o,a){if(o!=="buffer"||!Buffer.isBuffer(r))throw new Error("Assertion failed: DefaultStream only accept buffers");this.active=!1,a(null,r)}_flush(r){this.active&&this.ifEmpty.length>0?r(null,this.ifEmpty):r(null)}},WI=eval("require");one=new Map;mne=(o=>(o[o.NoCache=0]="NoCache",o[o.FsTime=1]="FsTime",o[o.Node=2]="Node",o))(mne||{})});var Jy,BN,vN,Cne=Et(()=>{Jy=(r=>(r.HARD="HARD",r.SOFT="SOFT",r))(Jy||{}),BN=(o=>(o.Dependency="Dependency",o.PeerDependency="PeerDependency",o.PeerDependencyMeta="PeerDependencyMeta",o))(BN||{}),vN=(o=>(o.Inactive="inactive",o.Redundant="redundant",o.Active="active",o))(vN||{})});var de={};zt(de,{LogLevel:()=>cS,Style:()=>oS,Type:()=>yt,addLogFilterSupport:()=>XI,applyColor:()=>zs,applyHyperlink:()=>Zy,applyStyle:()=>Ed,json:()=>Cd,jsonOrPretty:()=>NZe,mark:()=>xN,pretty:()=>Ut,prettyField:()=>Xu,prettyList:()=>bN,prettyTruncatedLocatorList:()=>lS,stripAnsi:()=>Xy.default,supportsColor:()=>aS,supportsHyperlinks:()=>SN,tuple:()=>Hc});function wne(t){let e=["KiB","MiB","GiB","TiB"],r=e.length;for(;r>1&&t<1024**r;)r-=1;let o=1024**r;return`${Math.floor(t*100/o)/100} ${e[r-1]}`}function Hc(t,e){return[e,t]}function Ed(t,e,r){return t.get("enableColors")&&r&2&&(e=JI.default.bold(e)),e}function zs(t,e,r){if(!t.get("enableColors"))return e;let o=TZe.get(r);if(o===null)return e;let a=typeof o>"u"?r:PN.level>=3?o[0]:o[1],n=typeof a=="number"?DN.ansi256(a):a.startsWith("#")?DN.hex(a):DN[a];if(typeof n!="function")throw new Error(`Invalid format type ${a}`);return n(e)}function Zy(t,e,r){return t.get("enableHyperlinks")?LZe?`\x1B]8;;${r}\x1B\\${e}\x1B]8;;\x1B\\`:`\x1B]8;;${r}\x07${e}\x1B]8;;\x07`:e}function Ut(t,e,r){if(e===null)return zs(t,"null",yt.NULL);if(Object.hasOwn(sS,r))return sS[r].pretty(t,e);if(typeof e!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof e}`);return zs(t,e,r)}function bN(t,e,r,{separator:o=", "}={}){return[...e].map(a=>Ut(t,a,r)).join(o)}function Cd(t,e){if(t===null)return null;if(Object.hasOwn(sS,e))return sS[e].json(t);if(typeof t!="string")throw new Error(`Assertion failed: Expected the value to be a string, got ${typeof t}`);return t}function NZe(t,e,[r,o]){return t?Cd(r,o):Ut(e,r,o)}function xN(t){return{Check:zs(t,"\u2713","green"),Cross:zs(t,"\u2718","red"),Question:zs(t,"?","cyan")}}function Xu(t,{label:e,value:[r,o]}){return`${Ut(t,e,yt.CODE)}: ${Ut(t,r,o)}`}function lS(t,e,r){let o=[],a=[...e],n=r;for(;a.length>0;){let h=a[0],E=`${qr(t,h)}, `,I=kN(h).length+2;if(o.length>0&&nh).join("").slice(0,-2);let u="X".repeat(a.length.toString().length),A=`and ${u} more.`,p=a.length;for(;o.length>1&&nh).join(""),A.replace(u,Ut(t,p,yt.NUMBER))].join("")}function XI(t,{configuration:e}){let r=e.get("logFilters"),o=new Map,a=new Map,n=[];for(let I of r){let v=I.get("level");if(typeof v>"u")continue;let x=I.get("code");typeof x<"u"&&o.set(x,v);let C=I.get("text");typeof C<"u"&&a.set(C,v);let R=I.get("pattern");typeof R<"u"&&n.push([Ine.default.matcher(R,{contains:!0}),v])}n.reverse();let u=(I,v,x)=>{if(I===null||I===0)return x;let C=a.size>0||n.length>0?(0,Xy.default)(v):v;if(a.size>0){let R=a.get(C);if(typeof R<"u")return R??x}if(n.length>0){for(let[R,N]of n)if(R(C))return N??x}if(o.size>0){let R=o.get(Ku(I));if(typeof R<"u")return R??x}return x},A=t.reportInfo,p=t.reportWarning,h=t.reportError,E=function(I,v,x,C){switch(u(v,x,C)){case"info":A.call(I,v,x);break;case"warning":p.call(I,v??0,x);break;case"error":h.call(I,v??0,x);break}};t.reportInfo=function(...I){return E(this,...I,"info")},t.reportWarning=function(...I){return E(this,...I,"warning")},t.reportError=function(...I){return E(this,...I,"error")}}var JI,VI,Ine,Xy,Bne,yt,oS,PN,aS,SN,DN,TZe,So,sS,LZe,cS,jl=Et(()=>{Pt();JI=$e(IL()),VI=$e(rd());qt();Ine=$e(Zo()),Xy=$e(NP()),Bne=ve("util");fP();bo();yt={NO_HINT:"NO_HINT",ID:"ID",NULL:"NULL",SCOPE:"SCOPE",NAME:"NAME",RANGE:"RANGE",REFERENCE:"REFERENCE",NUMBER:"NUMBER",PATH:"PATH",URL:"URL",ADDED:"ADDED",REMOVED:"REMOVED",CODE:"CODE",INSPECT:"INSPECT",DURATION:"DURATION",SIZE:"SIZE",SIZE_DIFF:"SIZE_DIFF",IDENT:"IDENT",DESCRIPTOR:"DESCRIPTOR",LOCATOR:"LOCATOR",RESOLUTION:"RESOLUTION",DEPENDENT:"DEPENDENT",PACKAGE_EXTENSION:"PACKAGE_EXTENSION",SETTING:"SETTING",MARKDOWN:"MARKDOWN",MARKDOWN_INLINE:"MARKDOWN_INLINE"},oS=(e=>(e[e.BOLD=2]="BOLD",e))(oS||{}),PN=VI.default.GITHUB_ACTIONS?{level:2}:JI.default.supportsColor?{level:JI.default.supportsColor.level}:{level:0},aS=PN.level!==0,SN=aS&&!VI.default.GITHUB_ACTIONS&&!VI.default.CIRCLE&&!VI.default.GITLAB,DN=new JI.default.Instance(PN),TZe=new Map([[yt.NO_HINT,null],[yt.NULL,["#a853b5",129]],[yt.SCOPE,["#d75f00",166]],[yt.NAME,["#d7875f",173]],[yt.RANGE,["#00afaf",37]],[yt.REFERENCE,["#87afff",111]],[yt.NUMBER,["#ffd700",220]],[yt.PATH,["#d75fd7",170]],[yt.URL,["#d75fd7",170]],[yt.ADDED,["#5faf00",70]],[yt.REMOVED,["#ff3131",160]],[yt.CODE,["#87afff",111]],[yt.SIZE,["#ffd700",220]]]),So=t=>t;sS={[yt.ID]:So({pretty:(t,e)=>typeof e=="number"?zs(t,`${e}`,yt.NUMBER):zs(t,e,yt.CODE),json:t=>t}),[yt.INSPECT]:So({pretty:(t,e)=>(0,Bne.inspect)(e,{depth:1/0,colors:t.get("enableColors"),compact:!0,breakLength:1/0}),json:t=>t}),[yt.NUMBER]:So({pretty:(t,e)=>zs(t,`${e}`,yt.NUMBER),json:t=>t}),[yt.IDENT]:So({pretty:(t,e)=>cs(t,e),json:t=>fn(t)}),[yt.LOCATOR]:So({pretty:(t,e)=>qr(t,e),json:t=>ba(t)}),[yt.DESCRIPTOR]:So({pretty:(t,e)=>Gn(t,e),json:t=>Sa(t)}),[yt.RESOLUTION]:So({pretty:(t,{descriptor:e,locator:r})=>ZI(t,e,r),json:({descriptor:t,locator:e})=>({descriptor:Sa(t),locator:e!==null?ba(e):null})}),[yt.DEPENDENT]:So({pretty:(t,{locator:e,descriptor:r})=>QN(t,e,r),json:({locator:t,descriptor:e})=>({locator:ba(t),descriptor:Sa(e)})}),[yt.PACKAGE_EXTENSION]:So({pretty:(t,e)=>{switch(e.type){case"Dependency":return`${cs(t,e.parentDescriptor)} \u27A4 ${zs(t,"dependencies",yt.CODE)} \u27A4 ${cs(t,e.descriptor)}`;case"PeerDependency":return`${cs(t,e.parentDescriptor)} \u27A4 ${zs(t,"peerDependencies",yt.CODE)} \u27A4 ${cs(t,e.descriptor)}`;case"PeerDependencyMeta":return`${cs(t,e.parentDescriptor)} \u27A4 ${zs(t,"peerDependenciesMeta",yt.CODE)} \u27A4 ${cs(t,Vs(e.selector))} \u27A4 ${zs(t,e.key,yt.CODE)}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${e.type}`)}},json:t=>{switch(t.type){case"Dependency":return`${fn(t.parentDescriptor)} > ${fn(t.descriptor)}`;case"PeerDependency":return`${fn(t.parentDescriptor)} >> ${fn(t.descriptor)}`;case"PeerDependencyMeta":return`${fn(t.parentDescriptor)} >> ${t.selector} / ${t.key}`;default:throw new Error(`Assertion failed: Unsupported package extension type: ${t.type}`)}}}),[yt.SETTING]:So({pretty:(t,e)=>(t.get(e),Zy(t,zs(t,e,yt.CODE),`https://yarnpkg.com/configuration/yarnrc#${e}`)),json:t=>t}),[yt.DURATION]:So({pretty:(t,e)=>{if(e>1e3*60){let r=Math.floor(e/1e3/60),o=Math.ceil((e-r*60*1e3)/1e3);return o===0?`${r}m`:`${r}m ${o}s`}else{let r=Math.floor(e/1e3),o=e-r*1e3;return o===0?`${r}s`:`${r}s ${o}ms`}},json:t=>t}),[yt.SIZE]:So({pretty:(t,e)=>zs(t,wne(e),yt.NUMBER),json:t=>t}),[yt.SIZE_DIFF]:So({pretty:(t,e)=>{let r=e>=0?"+":"-",o=r==="+"?yt.REMOVED:yt.ADDED;return zs(t,`${r} ${wne(Math.max(Math.abs(e),1))}`,o)},json:t=>t}),[yt.PATH]:So({pretty:(t,e)=>zs(t,le.fromPortablePath(e),yt.PATH),json:t=>le.fromPortablePath(t)}),[yt.MARKDOWN]:So({pretty:(t,{text:e,format:r,paragraphs:o})=>Do(e,{format:r,paragraphs:o}),json:({text:t})=>t}),[yt.MARKDOWN_INLINE]:So({pretty:(t,e)=>(e=e.replace(/(`+)((?:.|[\n])*?)\1/g,(r,o,a)=>Ut(t,o+a+o,yt.CODE)),e=e.replace(/(\*\*)((?:.|[\n])*?)\1/g,(r,o,a)=>Ed(t,a,2)),e),json:t=>t})};LZe=!!process.env.KONSOLE_VERSION;cS=(a=>(a.Error="error",a.Warning="warning",a.Info="info",a.Discard="discard",a))(cS||{})});var vne=_($y=>{"use strict";Object.defineProperty($y,"__esModule",{value:!0});$y.splitWhen=$y.flatten=void 0;function OZe(t){return t.reduce((e,r)=>[].concat(e,r),[])}$y.flatten=OZe;function MZe(t,e){let r=[[]],o=0;for(let a of t)e(a)?(o++,r[o]=[]):r[o].push(a);return r}$y.splitWhen=MZe});var Dne=_(uS=>{"use strict";Object.defineProperty(uS,"__esModule",{value:!0});uS.isEnoentCodeError=void 0;function UZe(t){return t.code==="ENOENT"}uS.isEnoentCodeError=UZe});var Pne=_(AS=>{"use strict";Object.defineProperty(AS,"__esModule",{value:!0});AS.createDirentFromStats=void 0;var FN=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function _Ze(t,e){return new FN(t,e)}AS.createDirentFromStats=_Ze});var Sne=_(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.removeLeadingDotSegment=Zu.escape=Zu.makeAbsolute=Zu.unixify=void 0;var HZe=ve("path"),qZe=2,GZe=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;function jZe(t){return t.replace(/\\/g,"/")}Zu.unixify=jZe;function YZe(t,e){return HZe.resolve(t,e)}Zu.makeAbsolute=YZe;function WZe(t){return t.replace(GZe,"\\$2")}Zu.escape=WZe;function KZe(t){if(t.charAt(0)==="."){let e=t.charAt(1);if(e==="/"||e==="\\")return t.slice(qZe)}return t}Zu.removeLeadingDotSegment=KZe});var xne=_((bTt,bne)=>{bne.exports=function(e){if(typeof e!="string"||e==="")return!1;for(var r;r=/(\\).|([@?!+*]\(.*\))/g.exec(e);){if(r[2])return!0;e=e.slice(r.index+r[0].length)}return!1}});var Fne=_((xTt,Qne)=>{var zZe=xne(),kne={"{":"}","(":")","[":"]"},VZe=function(t){if(t[0]==="!")return!0;for(var e=0,r=-2,o=-2,a=-2,n=-2,u=-2;ee&&(u===-1||u>o||(u=t.indexOf("\\",e),u===-1||u>o)))||a!==-1&&t[e]==="{"&&t[e+1]!=="}"&&(a=t.indexOf("}",e),a>e&&(u=t.indexOf("\\",e),u===-1||u>a))||n!==-1&&t[e]==="("&&t[e+1]==="?"&&/[:!=]/.test(t[e+2])&&t[e+3]!==")"&&(n=t.indexOf(")",e),n>e&&(u=t.indexOf("\\",e),u===-1||u>n))||r!==-1&&t[e]==="("&&t[e+1]!=="|"&&(rr&&(u=t.indexOf("\\",r),u===-1||u>n))))return!0;if(t[e]==="\\"){var A=t[e+1];e+=2;var p=kne[A];if(p){var h=t.indexOf(p,e);h!==-1&&(e=h+1)}if(t[e]==="!")return!0}else e++}return!1},JZe=function(t){if(t[0]==="!")return!0;for(var e=0;e{"use strict";var XZe=Fne(),ZZe=ve("path").posix.dirname,$Ze=ve("os").platform()==="win32",RN="/",e$e=/\\/g,t$e=/[\{\[].*[\}\]]$/,r$e=/(^|[^\\])([\{\[]|\([^\)]+$)/,n$e=/\\([\!\*\?\|\[\]\(\)\{\}])/g;Rne.exports=function(e,r){var o=Object.assign({flipBackslashes:!0},r);o.flipBackslashes&&$Ze&&e.indexOf(RN)<0&&(e=e.replace(e$e,RN)),t$e.test(e)&&(e+=RN),e+="a";do e=ZZe(e);while(XZe(e)||r$e.test(e));return e.replace(n$e,"$1")}});var qne=_(Gr=>{"use strict";Object.defineProperty(Gr,"__esModule",{value:!0});Gr.matchAny=Gr.convertPatternsToRe=Gr.makeRe=Gr.getPatternParts=Gr.expandBraceExpansion=Gr.expandPatternsWithBraceExpansion=Gr.isAffectDepthOfReadingPattern=Gr.endsWithSlashGlobStar=Gr.hasGlobStar=Gr.getBaseDirectory=Gr.isPatternRelatedToParentDirectory=Gr.getPatternsOutsideCurrentDirectory=Gr.getPatternsInsideCurrentDirectory=Gr.getPositivePatterns=Gr.getNegativePatterns=Gr.isPositivePattern=Gr.isNegativePattern=Gr.convertToNegativePattern=Gr.convertToPositivePattern=Gr.isDynamicPattern=Gr.isStaticPattern=void 0;var i$e=ve("path"),s$e=Tne(),TN=Zo(),Lne="**",o$e="\\",a$e=/[*?]|^!/,l$e=/\[[^[]*]/,c$e=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/,u$e=/[!*+?@]\([^(]*\)/,A$e=/,|\.\./;function Nne(t,e={}){return!One(t,e)}Gr.isStaticPattern=Nne;function One(t,e={}){return t===""?!1:!!(e.caseSensitiveMatch===!1||t.includes(o$e)||a$e.test(t)||l$e.test(t)||c$e.test(t)||e.extglob!==!1&&u$e.test(t)||e.braceExpansion!==!1&&f$e(t))}Gr.isDynamicPattern=One;function f$e(t){let e=t.indexOf("{");if(e===-1)return!1;let r=t.indexOf("}",e+1);if(r===-1)return!1;let o=t.slice(e,r);return A$e.test(o)}function p$e(t){return fS(t)?t.slice(1):t}Gr.convertToPositivePattern=p$e;function h$e(t){return"!"+t}Gr.convertToNegativePattern=h$e;function fS(t){return t.startsWith("!")&&t[1]!=="("}Gr.isNegativePattern=fS;function Mne(t){return!fS(t)}Gr.isPositivePattern=Mne;function g$e(t){return t.filter(fS)}Gr.getNegativePatterns=g$e;function d$e(t){return t.filter(Mne)}Gr.getPositivePatterns=d$e;function m$e(t){return t.filter(e=>!LN(e))}Gr.getPatternsInsideCurrentDirectory=m$e;function y$e(t){return t.filter(LN)}Gr.getPatternsOutsideCurrentDirectory=y$e;function LN(t){return t.startsWith("..")||t.startsWith("./..")}Gr.isPatternRelatedToParentDirectory=LN;function E$e(t){return s$e(t,{flipBackslashes:!1})}Gr.getBaseDirectory=E$e;function C$e(t){return t.includes(Lne)}Gr.hasGlobStar=C$e;function Une(t){return t.endsWith("/"+Lne)}Gr.endsWithSlashGlobStar=Une;function w$e(t){let e=i$e.basename(t);return Une(t)||Nne(e)}Gr.isAffectDepthOfReadingPattern=w$e;function I$e(t){return t.reduce((e,r)=>e.concat(_ne(r)),[])}Gr.expandPatternsWithBraceExpansion=I$e;function _ne(t){return TN.braces(t,{expand:!0,nodupes:!0})}Gr.expandBraceExpansion=_ne;function B$e(t,e){let{parts:r}=TN.scan(t,Object.assign(Object.assign({},e),{parts:!0}));return r.length===0&&(r=[t]),r[0].startsWith("/")&&(r[0]=r[0].slice(1),r.unshift("")),r}Gr.getPatternParts=B$e;function Hne(t,e){return TN.makeRe(t,e)}Gr.makeRe=Hne;function v$e(t,e){return t.map(r=>Hne(r,e))}Gr.convertPatternsToRe=v$e;function D$e(t,e){return e.some(r=>r.test(t))}Gr.matchAny=D$e});var Wne=_((FTt,Yne)=>{"use strict";var P$e=ve("stream"),Gne=P$e.PassThrough,S$e=Array.prototype.slice;Yne.exports=b$e;function b$e(){let t=[],e=S$e.call(arguments),r=!1,o=e[e.length-1];o&&!Array.isArray(o)&&o.pipe==null?e.pop():o={};let a=o.end!==!1,n=o.pipeError===!0;o.objectMode==null&&(o.objectMode=!0),o.highWaterMark==null&&(o.highWaterMark=64*1024);let u=Gne(o);function A(){for(let E=0,I=arguments.length;E0||(r=!1,p())}function x(C){function R(){C.removeListener("merge2UnpipeEnd",R),C.removeListener("end",R),n&&C.removeListener("error",N),v()}function N(U){u.emit("error",U)}if(C._readableState.endEmitted)return v();C.on("merge2UnpipeEnd",R),C.on("end",R),n&&C.on("error",N),C.pipe(u,{end:!1}),C.resume()}for(let C=0;C{"use strict";Object.defineProperty(pS,"__esModule",{value:!0});pS.merge=void 0;var x$e=Wne();function k$e(t){let e=x$e(t);return t.forEach(r=>{r.once("error",o=>e.emit("error",o))}),e.once("close",()=>Kne(t)),e.once("end",()=>Kne(t)),e}pS.merge=k$e;function Kne(t){t.forEach(e=>e.emit("close"))}});var Vne=_(eE=>{"use strict";Object.defineProperty(eE,"__esModule",{value:!0});eE.isEmpty=eE.isString=void 0;function Q$e(t){return typeof t=="string"}eE.isString=Q$e;function F$e(t){return t===""}eE.isEmpty=F$e});var Pf=_(xo=>{"use strict";Object.defineProperty(xo,"__esModule",{value:!0});xo.string=xo.stream=xo.pattern=xo.path=xo.fs=xo.errno=xo.array=void 0;var R$e=vne();xo.array=R$e;var T$e=Dne();xo.errno=T$e;var L$e=Pne();xo.fs=L$e;var N$e=Sne();xo.path=N$e;var O$e=qne();xo.pattern=O$e;var M$e=zne();xo.stream=M$e;var U$e=Vne();xo.string=U$e});var Zne=_(ko=>{"use strict";Object.defineProperty(ko,"__esModule",{value:!0});ko.convertPatternGroupToTask=ko.convertPatternGroupsToTasks=ko.groupPatternsByBaseDirectory=ko.getNegativePatternsAsPositive=ko.getPositivePatterns=ko.convertPatternsToTasks=ko.generate=void 0;var Sf=Pf();function _$e(t,e){let r=Jne(t),o=Xne(t,e.ignore),a=r.filter(p=>Sf.pattern.isStaticPattern(p,e)),n=r.filter(p=>Sf.pattern.isDynamicPattern(p,e)),u=NN(a,o,!1),A=NN(n,o,!0);return u.concat(A)}ko.generate=_$e;function NN(t,e,r){let o=[],a=Sf.pattern.getPatternsOutsideCurrentDirectory(t),n=Sf.pattern.getPatternsInsideCurrentDirectory(t),u=ON(a),A=ON(n);return o.push(...MN(u,e,r)),"."in A?o.push(UN(".",n,e,r)):o.push(...MN(A,e,r)),o}ko.convertPatternsToTasks=NN;function Jne(t){return Sf.pattern.getPositivePatterns(t)}ko.getPositivePatterns=Jne;function Xne(t,e){return Sf.pattern.getNegativePatterns(t).concat(e).map(Sf.pattern.convertToPositivePattern)}ko.getNegativePatternsAsPositive=Xne;function ON(t){let e={};return t.reduce((r,o)=>{let a=Sf.pattern.getBaseDirectory(o);return a in r?r[a].push(o):r[a]=[o],r},e)}ko.groupPatternsByBaseDirectory=ON;function MN(t,e,r){return Object.keys(t).map(o=>UN(o,t[o],e,r))}ko.convertPatternGroupsToTasks=MN;function UN(t,e,r,o){return{dynamic:o,positive:e,negative:r,base:t,patterns:[].concat(e,r.map(Sf.pattern.convertToNegativePattern))}}ko.convertPatternGroupToTask=UN});var eie=_(tE=>{"use strict";Object.defineProperty(tE,"__esModule",{value:!0});tE.removeDuplicateSlashes=tE.transform=void 0;var H$e=/(?!^)\/{2,}/g;function q$e(t){return t.map(e=>$ne(e))}tE.transform=q$e;function $ne(t){return t.replace(H$e,"/")}tE.removeDuplicateSlashes=$ne});var rie=_(hS=>{"use strict";Object.defineProperty(hS,"__esModule",{value:!0});hS.read=void 0;function G$e(t,e,r){e.fs.lstat(t,(o,a)=>{if(o!==null){tie(r,o);return}if(!a.isSymbolicLink()||!e.followSymbolicLink){_N(r,a);return}e.fs.stat(t,(n,u)=>{if(n!==null){if(e.throwErrorOnBrokenSymbolicLink){tie(r,n);return}_N(r,a);return}e.markSymbolicLink&&(u.isSymbolicLink=()=>!0),_N(r,u)})})}hS.read=G$e;function tie(t,e){t(e)}function _N(t,e){t(null,e)}});var nie=_(gS=>{"use strict";Object.defineProperty(gS,"__esModule",{value:!0});gS.read=void 0;function j$e(t,e){let r=e.fs.lstatSync(t);if(!r.isSymbolicLink()||!e.followSymbolicLink)return r;try{let o=e.fs.statSync(t);return e.markSymbolicLink&&(o.isSymbolicLink=()=>!0),o}catch(o){if(!e.throwErrorOnBrokenSymbolicLink)return r;throw o}}gS.read=j$e});var iie=_(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.createFileSystemAdapter=Zp.FILE_SYSTEM_ADAPTER=void 0;var dS=ve("fs");Zp.FILE_SYSTEM_ADAPTER={lstat:dS.lstat,stat:dS.stat,lstatSync:dS.lstatSync,statSync:dS.statSync};function Y$e(t){return t===void 0?Zp.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},Zp.FILE_SYSTEM_ADAPTER),t)}Zp.createFileSystemAdapter=Y$e});var sie=_(qN=>{"use strict";Object.defineProperty(qN,"__esModule",{value:!0});var W$e=iie(),HN=class{constructor(e={}){this._options=e,this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,!0),this.fs=W$e.createFileSystemAdapter(this._options.fs),this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0)}_getValue(e,r){return e??r}};qN.default=HN});var wd=_($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});$p.statSync=$p.stat=$p.Settings=void 0;var oie=rie(),K$e=nie(),GN=sie();$p.Settings=GN.default;function z$e(t,e,r){if(typeof e=="function"){oie.read(t,jN(),e);return}oie.read(t,jN(e),r)}$p.stat=z$e;function V$e(t,e){let r=jN(e);return K$e.read(t,r)}$p.statSync=V$e;function jN(t={}){return t instanceof GN.default?t:new GN.default(t)}});var lie=_((GTt,aie)=>{aie.exports=J$e;function J$e(t,e){var r,o,a,n=!0;Array.isArray(t)?(r=[],o=t.length):(a=Object.keys(t),r={},o=a.length);function u(p){function h(){e&&e(p,r),e=null}n?process.nextTick(h):h()}function A(p,h,E){r[p]=E,(--o===0||h)&&u(h)}o?a?a.forEach(function(p){t[p](function(h,E){A(p,h,E)})}):t.forEach(function(p,h){p(function(E,I){A(h,E,I)})}):u(null),n=!1}});var YN=_(yS=>{"use strict";Object.defineProperty(yS,"__esModule",{value:!0});yS.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;var mS=process.versions.node.split(".");if(mS[0]===void 0||mS[1]===void 0)throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);var cie=Number.parseInt(mS[0],10),X$e=Number.parseInt(mS[1],10),uie=10,Z$e=10,$$e=cie>uie,eet=cie===uie&&X$e>=Z$e;yS.IS_SUPPORT_READDIR_WITH_FILE_TYPES=$$e||eet});var Aie=_(ES=>{"use strict";Object.defineProperty(ES,"__esModule",{value:!0});ES.createDirentFromStats=void 0;var WN=class{constructor(e,r){this.name=e,this.isBlockDevice=r.isBlockDevice.bind(r),this.isCharacterDevice=r.isCharacterDevice.bind(r),this.isDirectory=r.isDirectory.bind(r),this.isFIFO=r.isFIFO.bind(r),this.isFile=r.isFile.bind(r),this.isSocket=r.isSocket.bind(r),this.isSymbolicLink=r.isSymbolicLink.bind(r)}};function tet(t,e){return new WN(t,e)}ES.createDirentFromStats=tet});var KN=_(CS=>{"use strict";Object.defineProperty(CS,"__esModule",{value:!0});CS.fs=void 0;var ret=Aie();CS.fs=ret});var zN=_(wS=>{"use strict";Object.defineProperty(wS,"__esModule",{value:!0});wS.joinPathSegments=void 0;function net(t,e,r){return t.endsWith(r)?t+e:t+r+e}wS.joinPathSegments=net});var mie=_(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});eh.readdir=eh.readdirWithFileTypes=eh.read=void 0;var iet=wd(),fie=lie(),set=YN(),pie=KN(),hie=zN();function oet(t,e,r){if(!e.stats&&set.IS_SUPPORT_READDIR_WITH_FILE_TYPES){gie(t,e,r);return}die(t,e,r)}eh.read=oet;function gie(t,e,r){e.fs.readdir(t,{withFileTypes:!0},(o,a)=>{if(o!==null){IS(r,o);return}let n=a.map(A=>({dirent:A,name:A.name,path:hie.joinPathSegments(t,A.name,e.pathSegmentSeparator)}));if(!e.followSymbolicLinks){VN(r,n);return}let u=n.map(A=>aet(A,e));fie(u,(A,p)=>{if(A!==null){IS(r,A);return}VN(r,p)})})}eh.readdirWithFileTypes=gie;function aet(t,e){return r=>{if(!t.dirent.isSymbolicLink()){r(null,t);return}e.fs.stat(t.path,(o,a)=>{if(o!==null){if(e.throwErrorOnBrokenSymbolicLink){r(o);return}r(null,t);return}t.dirent=pie.fs.createDirentFromStats(t.name,a),r(null,t)})}}function die(t,e,r){e.fs.readdir(t,(o,a)=>{if(o!==null){IS(r,o);return}let n=a.map(u=>{let A=hie.joinPathSegments(t,u,e.pathSegmentSeparator);return p=>{iet.stat(A,e.fsStatSettings,(h,E)=>{if(h!==null){p(h);return}let I={name:u,path:A,dirent:pie.fs.createDirentFromStats(u,E)};e.stats&&(I.stats=E),p(null,I)})}});fie(n,(u,A)=>{if(u!==null){IS(r,u);return}VN(r,A)})})}eh.readdir=die;function IS(t,e){t(e)}function VN(t,e){t(null,e)}});var Iie=_(th=>{"use strict";Object.defineProperty(th,"__esModule",{value:!0});th.readdir=th.readdirWithFileTypes=th.read=void 0;var cet=wd(),uet=YN(),yie=KN(),Eie=zN();function Aet(t,e){return!e.stats&&uet.IS_SUPPORT_READDIR_WITH_FILE_TYPES?Cie(t,e):wie(t,e)}th.read=Aet;function Cie(t,e){return e.fs.readdirSync(t,{withFileTypes:!0}).map(o=>{let a={dirent:o,name:o.name,path:Eie.joinPathSegments(t,o.name,e.pathSegmentSeparator)};if(a.dirent.isSymbolicLink()&&e.followSymbolicLinks)try{let n=e.fs.statSync(a.path);a.dirent=yie.fs.createDirentFromStats(a.name,n)}catch(n){if(e.throwErrorOnBrokenSymbolicLink)throw n}return a})}th.readdirWithFileTypes=Cie;function wie(t,e){return e.fs.readdirSync(t).map(o=>{let a=Eie.joinPathSegments(t,o,e.pathSegmentSeparator),n=cet.statSync(a,e.fsStatSettings),u={name:o,path:a,dirent:yie.fs.createDirentFromStats(o,n)};return e.stats&&(u.stats=n),u})}th.readdir=wie});var Bie=_(rh=>{"use strict";Object.defineProperty(rh,"__esModule",{value:!0});rh.createFileSystemAdapter=rh.FILE_SYSTEM_ADAPTER=void 0;var rE=ve("fs");rh.FILE_SYSTEM_ADAPTER={lstat:rE.lstat,stat:rE.stat,lstatSync:rE.lstatSync,statSync:rE.statSync,readdir:rE.readdir,readdirSync:rE.readdirSync};function fet(t){return t===void 0?rh.FILE_SYSTEM_ADAPTER:Object.assign(Object.assign({},rh.FILE_SYSTEM_ADAPTER),t)}rh.createFileSystemAdapter=fet});var vie=_(XN=>{"use strict";Object.defineProperty(XN,"__esModule",{value:!0});var pet=ve("path"),het=wd(),get=Bie(),JN=class{constructor(e={}){this._options=e,this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!1),this.fs=get.createFileSystemAdapter(this._options.fs),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,pet.sep),this.stats=this._getValue(this._options.stats,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!0),this.fsStatSettings=new het.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};XN.default=JN});var BS=_(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});nh.Settings=nh.scandirSync=nh.scandir=void 0;var Die=mie(),det=Iie(),ZN=vie();nh.Settings=ZN.default;function met(t,e,r){if(typeof e=="function"){Die.read(t,$N(),e);return}Die.read(t,$N(e),r)}nh.scandir=met;function yet(t,e){let r=$N(e);return det.read(t,r)}nh.scandirSync=yet;function $N(t={}){return t instanceof ZN.default?t:new ZN.default(t)}});var Sie=_(($Tt,Pie)=>{"use strict";function Eet(t){var e=new t,r=e;function o(){var n=e;return n.next?e=n.next:(e=new t,r=e),n.next=null,n}function a(n){r.next=n,r=n}return{get:o,release:a}}Pie.exports=Eet});var xie=_((eLt,eO)=>{"use strict";var Cet=Sie();function bie(t,e,r){if(typeof t=="function"&&(r=e,e=t,t=null),r<1)throw new Error("fastqueue concurrency must be greater than 1");var o=Cet(wet),a=null,n=null,u=0,A=null,p={push:R,drain:Yl,saturated:Yl,pause:E,paused:!1,concurrency:r,running:h,resume:x,idle:C,length:I,getQueue:v,unshift:N,empty:Yl,kill:V,killAndDrain:te,error:ae};return p;function h(){return u}function E(){p.paused=!0}function I(){for(var fe=a,ue=0;fe;)fe=fe.next,ue++;return ue}function v(){for(var fe=a,ue=[];fe;)ue.push(fe.value),fe=fe.next;return ue}function x(){if(!!p.paused){p.paused=!1;for(var fe=0;fe{"use strict";Object.defineProperty($u,"__esModule",{value:!0});$u.joinPathSegments=$u.replacePathSegmentSeparator=$u.isAppliedFilter=$u.isFatalError=void 0;function Bet(t,e){return t.errorFilter===null?!0:!t.errorFilter(e)}$u.isFatalError=Bet;function vet(t,e){return t===null||t(e)}$u.isAppliedFilter=vet;function Det(t,e){return t.split(/[/\\]/).join(e)}$u.replacePathSegmentSeparator=Det;function Pet(t,e,r){return t===""?e:t.endsWith(r)?t+e:t+r+e}$u.joinPathSegments=Pet});var nO=_(rO=>{"use strict";Object.defineProperty(rO,"__esModule",{value:!0});var bet=vS(),tO=class{constructor(e,r){this._root=e,this._settings=r,this._root=bet.replacePathSegmentSeparator(e,r.pathSegmentSeparator)}};rO.default=tO});var oO=_(sO=>{"use strict";Object.defineProperty(sO,"__esModule",{value:!0});var xet=ve("events"),ket=BS(),Qet=xie(),DS=vS(),Fet=nO(),iO=class extends Fet.default{constructor(e,r){super(e,r),this._settings=r,this._scandir=ket.scandir,this._emitter=new xet.EventEmitter,this._queue=Qet(this._worker.bind(this),this._settings.concurrency),this._isFatalError=!1,this._isDestroyed=!1,this._queue.drain=()=>{this._isFatalError||this._emitter.emit("end")}}read(){return this._isFatalError=!1,this._isDestroyed=!1,setImmediate(()=>{this._pushToQueue(this._root,this._settings.basePath)}),this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed)throw new Error("The reader is already destroyed");this._isDestroyed=!0,this._queue.killAndDrain()}onEntry(e){this._emitter.on("entry",e)}onError(e){this._emitter.once("error",e)}onEnd(e){this._emitter.once("end",e)}_pushToQueue(e,r){let o={directory:e,base:r};this._queue.push(o,a=>{a!==null&&this._handleError(a)})}_worker(e,r){this._scandir(e.directory,this._settings.fsScandirSettings,(o,a)=>{if(o!==null){r(o,void 0);return}for(let n of a)this._handleEntry(n,e.base);r(null,void 0)})}_handleError(e){this._isDestroyed||!DS.isFatalError(this._settings,e)||(this._isFatalError=!0,this._isDestroyed=!0,this._emitter.emit("error",e))}_handleEntry(e,r){if(this._isDestroyed||this._isFatalError)return;let o=e.path;r!==void 0&&(e.path=DS.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),DS.isAppliedFilter(this._settings.entryFilter,e)&&this._emitEntry(e),e.dirent.isDirectory()&&DS.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(o,r===void 0?void 0:e.path)}_emitEntry(e){this._emitter.emit("entry",e)}};sO.default=iO});var kie=_(lO=>{"use strict";Object.defineProperty(lO,"__esModule",{value:!0});var Ret=oO(),aO=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Ret.default(this._root,this._settings),this._storage=[]}read(e){this._reader.onError(r=>{Tet(e,r)}),this._reader.onEntry(r=>{this._storage.push(r)}),this._reader.onEnd(()=>{Let(e,this._storage)}),this._reader.read()}};lO.default=aO;function Tet(t,e){t(e)}function Let(t,e){t(null,e)}});var Qie=_(uO=>{"use strict";Object.defineProperty(uO,"__esModule",{value:!0});var Net=ve("stream"),Oet=oO(),cO=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new Oet.default(this._root,this._settings),this._stream=new Net.Readable({objectMode:!0,read:()=>{},destroy:()=>{this._reader.isDestroyed||this._reader.destroy()}})}read(){return this._reader.onError(e=>{this._stream.emit("error",e)}),this._reader.onEntry(e=>{this._stream.push(e)}),this._reader.onEnd(()=>{this._stream.push(null)}),this._reader.read(),this._stream}};uO.default=cO});var Fie=_(fO=>{"use strict";Object.defineProperty(fO,"__esModule",{value:!0});var Met=BS(),PS=vS(),Uet=nO(),AO=class extends Uet.default{constructor(){super(...arguments),this._scandir=Met.scandirSync,this._storage=[],this._queue=new Set}read(){return this._pushToQueue(this._root,this._settings.basePath),this._handleQueue(),this._storage}_pushToQueue(e,r){this._queue.add({directory:e,base:r})}_handleQueue(){for(let e of this._queue.values())this._handleDirectory(e.directory,e.base)}_handleDirectory(e,r){try{let o=this._scandir(e,this._settings.fsScandirSettings);for(let a of o)this._handleEntry(a,r)}catch(o){this._handleError(o)}}_handleError(e){if(!!PS.isFatalError(this._settings,e))throw e}_handleEntry(e,r){let o=e.path;r!==void 0&&(e.path=PS.joinPathSegments(r,e.name,this._settings.pathSegmentSeparator)),PS.isAppliedFilter(this._settings.entryFilter,e)&&this._pushToStorage(e),e.dirent.isDirectory()&&PS.isAppliedFilter(this._settings.deepFilter,e)&&this._pushToQueue(o,r===void 0?void 0:e.path)}_pushToStorage(e){this._storage.push(e)}};fO.default=AO});var Rie=_(hO=>{"use strict";Object.defineProperty(hO,"__esModule",{value:!0});var _et=Fie(),pO=class{constructor(e,r){this._root=e,this._settings=r,this._reader=new _et.default(this._root,this._settings)}read(){return this._reader.read()}};hO.default=pO});var Tie=_(dO=>{"use strict";Object.defineProperty(dO,"__esModule",{value:!0});var Het=ve("path"),qet=BS(),gO=class{constructor(e={}){this._options=e,this.basePath=this._getValue(this._options.basePath,void 0),this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY),this.deepFilter=this._getValue(this._options.deepFilter,null),this.entryFilter=this._getValue(this._options.entryFilter,null),this.errorFilter=this._getValue(this._options.errorFilter,null),this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,Het.sep),this.fsScandirSettings=new qet.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(e,r){return e??r}};dO.default=gO});var bS=_(eA=>{"use strict";Object.defineProperty(eA,"__esModule",{value:!0});eA.Settings=eA.walkStream=eA.walkSync=eA.walk=void 0;var Lie=kie(),Get=Qie(),jet=Rie(),mO=Tie();eA.Settings=mO.default;function Yet(t,e,r){if(typeof e=="function"){new Lie.default(t,SS()).read(e);return}new Lie.default(t,SS(e)).read(r)}eA.walk=Yet;function Wet(t,e){let r=SS(e);return new jet.default(t,r).read()}eA.walkSync=Wet;function Ket(t,e){let r=SS(e);return new Get.default(t,r).read()}eA.walkStream=Ket;function SS(t={}){return t instanceof mO.default?t:new mO.default(t)}});var xS=_(EO=>{"use strict";Object.defineProperty(EO,"__esModule",{value:!0});var zet=ve("path"),Vet=wd(),Nie=Pf(),yO=class{constructor(e){this._settings=e,this._fsStatSettings=new Vet.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(e){return zet.resolve(this._settings.cwd,e)}_makeEntry(e,r){let o={name:r,path:r,dirent:Nie.fs.createDirentFromStats(r,e)};return this._settings.stats&&(o.stats=e),o}_isFatalError(e){return!Nie.errno.isEnoentCodeError(e)&&!this._settings.suppressErrors}};EO.default=yO});var IO=_(wO=>{"use strict";Object.defineProperty(wO,"__esModule",{value:!0});var Jet=ve("stream"),Xet=wd(),Zet=bS(),$et=xS(),CO=class extends $et.default{constructor(){super(...arguments),this._walkStream=Zet.walkStream,this._stat=Xet.stat}dynamic(e,r){return this._walkStream(e,r)}static(e,r){let o=e.map(this._getFullEntryPath,this),a=new Jet.PassThrough({objectMode:!0});a._write=(n,u,A)=>this._getEntry(o[n],e[n],r).then(p=>{p!==null&&r.entryFilter(p)&&a.push(p),n===o.length-1&&a.end(),A()}).catch(A);for(let n=0;nthis._makeEntry(a,r)).catch(a=>{if(o.errorFilter(a))return null;throw a})}_getStat(e){return new Promise((r,o)=>{this._stat(e,this._fsStatSettings,(a,n)=>a===null?r(n):o(a))})}};wO.default=CO});var Oie=_(vO=>{"use strict";Object.defineProperty(vO,"__esModule",{value:!0});var ett=bS(),ttt=xS(),rtt=IO(),BO=class extends ttt.default{constructor(){super(...arguments),this._walkAsync=ett.walk,this._readerStream=new rtt.default(this._settings)}dynamic(e,r){return new Promise((o,a)=>{this._walkAsync(e,r,(n,u)=>{n===null?o(u):a(n)})})}async static(e,r){let o=[],a=this._readerStream.static(e,r);return new Promise((n,u)=>{a.once("error",u),a.on("data",A=>o.push(A)),a.once("end",()=>n(o))})}};vO.default=BO});var Mie=_(PO=>{"use strict";Object.defineProperty(PO,"__esModule",{value:!0});var nE=Pf(),DO=class{constructor(e,r,o){this._patterns=e,this._settings=r,this._micromatchOptions=o,this._storage=[],this._fillStorage()}_fillStorage(){let e=nE.pattern.expandPatternsWithBraceExpansion(this._patterns);for(let r of e){let o=this._getPatternSegments(r),a=this._splitSegmentsIntoSections(o);this._storage.push({complete:a.length<=1,pattern:r,segments:o,sections:a})}}_getPatternSegments(e){return nE.pattern.getPatternParts(e,this._micromatchOptions).map(o=>nE.pattern.isDynamicPattern(o,this._settings)?{dynamic:!0,pattern:o,patternRe:nE.pattern.makeRe(o,this._micromatchOptions)}:{dynamic:!1,pattern:o})}_splitSegmentsIntoSections(e){return nE.array.splitWhen(e,r=>r.dynamic&&nE.pattern.hasGlobStar(r.pattern))}};PO.default=DO});var Uie=_(bO=>{"use strict";Object.defineProperty(bO,"__esModule",{value:!0});var ntt=Mie(),SO=class extends ntt.default{match(e){let r=e.split("/"),o=r.length,a=this._storage.filter(n=>!n.complete||n.segments.length>o);for(let n of a){let u=n.sections[0];if(!n.complete&&o>u.length||r.every((p,h)=>{let E=n.segments[h];return!!(E.dynamic&&E.patternRe.test(p)||!E.dynamic&&E.pattern===p)}))return!0}return!1}};bO.default=SO});var _ie=_(kO=>{"use strict";Object.defineProperty(kO,"__esModule",{value:!0});var kS=Pf(),itt=Uie(),xO=class{constructor(e,r){this._settings=e,this._micromatchOptions=r}getFilter(e,r,o){let a=this._getMatcher(r),n=this._getNegativePatternsRe(o);return u=>this._filter(e,u,a,n)}_getMatcher(e){return new itt.default(e,this._settings,this._micromatchOptions)}_getNegativePatternsRe(e){let r=e.filter(kS.pattern.isAffectDepthOfReadingPattern);return kS.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(e,r,o,a){if(this._isSkippedByDeep(e,r.path)||this._isSkippedSymbolicLink(r))return!1;let n=kS.path.removeLeadingDotSegment(r.path);return this._isSkippedByPositivePatterns(n,o)?!1:this._isSkippedByNegativePatterns(n,a)}_isSkippedByDeep(e,r){return this._settings.deep===1/0?!1:this._getEntryLevel(e,r)>=this._settings.deep}_getEntryLevel(e,r){let o=r.split("/").length;if(e==="")return o;let a=e.split("/").length;return o-a}_isSkippedSymbolicLink(e){return!this._settings.followSymbolicLinks&&e.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(e,r){return!this._settings.baseNameMatch&&!r.match(e)}_isSkippedByNegativePatterns(e,r){return!kS.pattern.matchAny(e,r)}};kO.default=xO});var Hie=_(FO=>{"use strict";Object.defineProperty(FO,"__esModule",{value:!0});var Id=Pf(),QO=class{constructor(e,r){this._settings=e,this._micromatchOptions=r,this.index=new Map}getFilter(e,r){let o=Id.pattern.convertPatternsToRe(e,this._micromatchOptions),a=Id.pattern.convertPatternsToRe(r,this._micromatchOptions);return n=>this._filter(n,o,a)}_filter(e,r,o){if(this._settings.unique&&this._isDuplicateEntry(e)||this._onlyFileFilter(e)||this._onlyDirectoryFilter(e)||this._isSkippedByAbsoluteNegativePatterns(e.path,o))return!1;let a=this._settings.baseNameMatch?e.name:e.path,n=e.dirent.isDirectory(),u=this._isMatchToPatterns(a,r,n)&&!this._isMatchToPatterns(e.path,o,n);return this._settings.unique&&u&&this._createIndexRecord(e),u}_isDuplicateEntry(e){return this.index.has(e.path)}_createIndexRecord(e){this.index.set(e.path,void 0)}_onlyFileFilter(e){return this._settings.onlyFiles&&!e.dirent.isFile()}_onlyDirectoryFilter(e){return this._settings.onlyDirectories&&!e.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(e,r){if(!this._settings.absolute)return!1;let o=Id.path.makeAbsolute(this._settings.cwd,e);return Id.pattern.matchAny(o,r)}_isMatchToPatterns(e,r,o){let a=Id.path.removeLeadingDotSegment(e),n=Id.pattern.matchAny(a,r);return!n&&o?Id.pattern.matchAny(a+"/",r):n}};FO.default=QO});var qie=_(TO=>{"use strict";Object.defineProperty(TO,"__esModule",{value:!0});var stt=Pf(),RO=class{constructor(e){this._settings=e}getFilter(){return e=>this._isNonFatalError(e)}_isNonFatalError(e){return stt.errno.isEnoentCodeError(e)||this._settings.suppressErrors}};TO.default=RO});var jie=_(NO=>{"use strict";Object.defineProperty(NO,"__esModule",{value:!0});var Gie=Pf(),LO=class{constructor(e){this._settings=e}getTransformer(){return e=>this._transform(e)}_transform(e){let r=e.path;return this._settings.absolute&&(r=Gie.path.makeAbsolute(this._settings.cwd,r),r=Gie.path.unixify(r)),this._settings.markDirectories&&e.dirent.isDirectory()&&(r+="/"),this._settings.objectMode?Object.assign(Object.assign({},e),{path:r}):r}};NO.default=LO});var QS=_(MO=>{"use strict";Object.defineProperty(MO,"__esModule",{value:!0});var ott=ve("path"),att=_ie(),ltt=Hie(),ctt=qie(),utt=jie(),OO=class{constructor(e){this._settings=e,this.errorFilter=new ctt.default(this._settings),this.entryFilter=new ltt.default(this._settings,this._getMicromatchOptions()),this.deepFilter=new att.default(this._settings,this._getMicromatchOptions()),this.entryTransformer=new utt.default(this._settings)}_getRootDirectory(e){return ott.resolve(this._settings.cwd,e.base)}_getReaderOptions(e){let r=e.base==="."?"":e.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,e.positive,e.negative),entryFilter:this.entryFilter.getFilter(e.positive,e.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:!0,strictSlashes:!1}}};MO.default=OO});var Yie=_(_O=>{"use strict";Object.defineProperty(_O,"__esModule",{value:!0});var Att=Oie(),ftt=QS(),UO=class extends ftt.default{constructor(){super(...arguments),this._reader=new Att.default(this._settings)}async read(e){let r=this._getRootDirectory(e),o=this._getReaderOptions(e);return(await this.api(r,e,o)).map(n=>o.transform(n))}api(e,r,o){return r.dynamic?this._reader.dynamic(e,o):this._reader.static(r.patterns,o)}};_O.default=UO});var Wie=_(qO=>{"use strict";Object.defineProperty(qO,"__esModule",{value:!0});var ptt=ve("stream"),htt=IO(),gtt=QS(),HO=class extends gtt.default{constructor(){super(...arguments),this._reader=new htt.default(this._settings)}read(e){let r=this._getRootDirectory(e),o=this._getReaderOptions(e),a=this.api(r,e,o),n=new ptt.Readable({objectMode:!0,read:()=>{}});return a.once("error",u=>n.emit("error",u)).on("data",u=>n.emit("data",o.transform(u))).once("end",()=>n.emit("end")),n.once("close",()=>a.destroy()),n}api(e,r,o){return r.dynamic?this._reader.dynamic(e,o):this._reader.static(r.patterns,o)}};qO.default=HO});var Kie=_(jO=>{"use strict";Object.defineProperty(jO,"__esModule",{value:!0});var dtt=wd(),mtt=bS(),ytt=xS(),GO=class extends ytt.default{constructor(){super(...arguments),this._walkSync=mtt.walkSync,this._statSync=dtt.statSync}dynamic(e,r){return this._walkSync(e,r)}static(e,r){let o=[];for(let a of e){let n=this._getFullEntryPath(a),u=this._getEntry(n,a,r);u===null||!r.entryFilter(u)||o.push(u)}return o}_getEntry(e,r,o){try{let a=this._getStat(e);return this._makeEntry(a,r)}catch(a){if(o.errorFilter(a))return null;throw a}}_getStat(e){return this._statSync(e,this._fsStatSettings)}};jO.default=GO});var zie=_(WO=>{"use strict";Object.defineProperty(WO,"__esModule",{value:!0});var Ett=Kie(),Ctt=QS(),YO=class extends Ctt.default{constructor(){super(...arguments),this._reader=new Ett.default(this._settings)}read(e){let r=this._getRootDirectory(e),o=this._getReaderOptions(e);return this.api(r,e,o).map(o.transform)}api(e,r,o){return r.dynamic?this._reader.dynamic(e,o):this._reader.static(r.patterns,o)}};WO.default=YO});var Vie=_(sE=>{"use strict";Object.defineProperty(sE,"__esModule",{value:!0});sE.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;var iE=ve("fs"),wtt=ve("os"),Itt=Math.max(wtt.cpus().length,1);sE.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:iE.lstat,lstatSync:iE.lstatSync,stat:iE.stat,statSync:iE.statSync,readdir:iE.readdir,readdirSync:iE.readdirSync};var KO=class{constructor(e={}){this._options=e,this.absolute=this._getValue(this._options.absolute,!1),this.baseNameMatch=this._getValue(this._options.baseNameMatch,!1),this.braceExpansion=this._getValue(this._options.braceExpansion,!0),this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,!0),this.concurrency=this._getValue(this._options.concurrency,Itt),this.cwd=this._getValue(this._options.cwd,process.cwd()),this.deep=this._getValue(this._options.deep,1/0),this.dot=this._getValue(this._options.dot,!1),this.extglob=this._getValue(this._options.extglob,!0),this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,!0),this.fs=this._getFileSystemMethods(this._options.fs),this.globstar=this._getValue(this._options.globstar,!0),this.ignore=this._getValue(this._options.ignore,[]),this.markDirectories=this._getValue(this._options.markDirectories,!1),this.objectMode=this._getValue(this._options.objectMode,!1),this.onlyDirectories=this._getValue(this._options.onlyDirectories,!1),this.onlyFiles=this._getValue(this._options.onlyFiles,!0),this.stats=this._getValue(this._options.stats,!1),this.suppressErrors=this._getValue(this._options.suppressErrors,!1),this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,!1),this.unique=this._getValue(this._options.unique,!0),this.onlyDirectories&&(this.onlyFiles=!1),this.stats&&(this.objectMode=!0)}_getValue(e,r){return e===void 0?r:e}_getFileSystemMethods(e={}){return Object.assign(Object.assign({},sE.DEFAULT_FILE_SYSTEM_ADAPTER),e)}};sE.default=KO});var RS=_((DLt,Zie)=>{"use strict";var Jie=Zne(),Xie=eie(),Btt=Yie(),vtt=Wie(),Dtt=zie(),zO=Vie(),Bd=Pf();async function VO(t,e){oE(t);let r=JO(t,Btt.default,e),o=await Promise.all(r);return Bd.array.flatten(o)}(function(t){function e(u,A){oE(u);let p=JO(u,Dtt.default,A);return Bd.array.flatten(p)}t.sync=e;function r(u,A){oE(u);let p=JO(u,vtt.default,A);return Bd.stream.merge(p)}t.stream=r;function o(u,A){oE(u);let p=Xie.transform([].concat(u)),h=new zO.default(A);return Jie.generate(p,h)}t.generateTasks=o;function a(u,A){oE(u);let p=new zO.default(A);return Bd.pattern.isDynamicPattern(u,p)}t.isDynamicPattern=a;function n(u){return oE(u),Bd.path.escape(u)}t.escapePath=n})(VO||(VO={}));function JO(t,e,r){let o=Xie.transform([].concat(t)),a=new zO.default(r),n=Jie.generate(o,a),u=new e(a);return n.map(u.read,u)}function oE(t){if(![].concat(t).every(o=>Bd.string.isString(o)&&!Bd.string.isEmpty(o)))throw new TypeError("Patterns must be a string (non empty) or an array of strings")}Zie.exports=VO});var wn={};zt(wn,{checksumFile:()=>LS,checksumPattern:()=>NS,makeHash:()=>Js});function Js(...t){let e=(0,TS.createHash)("sha512"),r="";for(let o of t)typeof o=="string"?r+=o:o&&(r&&(e.update(r),r=""),e.update(o));return r&&e.update(r),e.digest("hex")}async function LS(t,{baseFs:e,algorithm:r}={baseFs:oe,algorithm:"sha512"}){let o=await e.openPromise(t,"r");try{let n=Buffer.allocUnsafeSlow(65536),u=(0,TS.createHash)(r),A=0;for(;(A=await e.readPromise(o,n,0,65536))!==0;)u.update(A===65536?n:n.slice(0,A));return u.digest("hex")}finally{await e.closePromise(o)}}async function NS(t,{cwd:e}){let o=(await(0,XO.default)(t,{cwd:le.fromPortablePath(e),onlyDirectories:!0})).map(A=>`${A}/**/*`),a=await(0,XO.default)([t,...o],{cwd:le.fromPortablePath(e),onlyFiles:!1});a.sort();let n=await Promise.all(a.map(async A=>{let p=[Buffer.from(A)],h=le.toPortablePath(A),E=await oe.lstatPromise(h);return E.isSymbolicLink()?p.push(Buffer.from(await oe.readlinkPromise(h))):E.isFile()&&p.push(await oe.readFilePromise(h)),p.join("\0")})),u=(0,TS.createHash)("sha512");for(let A of n)u.update(A);return u.digest("hex")}var TS,XO,ih=Et(()=>{Pt();TS=ve("crypto"),XO=$e(RS())});var W={};zt(W,{areDescriptorsEqual:()=>nse,areIdentsEqual:()=>n1,areLocatorsEqual:()=>i1,areVirtualPackagesEquivalent:()=>Ttt,bindDescriptor:()=>Ftt,bindLocator:()=>Rtt,convertDescriptorToLocator:()=>OS,convertLocatorToDescriptor:()=>$O,convertPackageToLocator:()=>xtt,convertToIdent:()=>btt,convertToManifestRange:()=>jtt,copyPackage:()=>e1,devirtualizeDescriptor:()=>t1,devirtualizeLocator:()=>r1,ensureDevirtualizedDescriptor:()=>ktt,ensureDevirtualizedLocator:()=>Qtt,getIdentVendorPath:()=>nM,isPackageCompatible:()=>qS,isVirtualDescriptor:()=>bf,isVirtualLocator:()=>qc,makeDescriptor:()=>In,makeIdent:()=>tA,makeLocator:()=>Qs,makeRange:()=>_S,parseDescriptor:()=>sh,parseFileStyleRange:()=>qtt,parseIdent:()=>Vs,parseLocator:()=>xf,parseRange:()=>vd,prettyDependent:()=>QN,prettyDescriptor:()=>Gn,prettyIdent:()=>cs,prettyLocator:()=>qr,prettyLocatorNoColors:()=>kN,prettyRange:()=>cE,prettyReference:()=>o1,prettyResolution:()=>ZI,prettyWorkspace:()=>a1,renamePackage:()=>eM,slugifyIdent:()=>ZO,slugifyLocator:()=>lE,sortDescriptors:()=>uE,stringifyDescriptor:()=>Sa,stringifyIdent:()=>fn,stringifyLocator:()=>ba,tryParseDescriptor:()=>s1,tryParseIdent:()=>ise,tryParseLocator:()=>US,tryParseRange:()=>Htt,virtualizeDescriptor:()=>tM,virtualizePackage:()=>rM});function tA(t,e){if(t?.startsWith("@"))throw new Error("Invalid scope: don't prefix it with '@'");return{identHash:Js(t,e),scope:t,name:e}}function In(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:Js(t.identHash,e),range:e}}function Qs(t,e){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:Js(t.identHash,e),reference:e}}function btt(t){return{identHash:t.identHash,scope:t.scope,name:t.name}}function OS(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.descriptorHash,reference:t.range}}function $O(t){return{identHash:t.identHash,scope:t.scope,name:t.name,descriptorHash:t.locatorHash,range:t.reference}}function xtt(t){return{identHash:t.identHash,scope:t.scope,name:t.name,locatorHash:t.locatorHash,reference:t.reference}}function eM(t,e){return{identHash:e.identHash,scope:e.scope,name:e.name,locatorHash:e.locatorHash,reference:e.reference,version:t.version,languageName:t.languageName,linkType:t.linkType,conditions:t.conditions,dependencies:new Map(t.dependencies),peerDependencies:new Map(t.peerDependencies),dependenciesMeta:new Map(t.dependenciesMeta),peerDependenciesMeta:new Map(t.peerDependenciesMeta),bin:new Map(t.bin)}}function e1(t){return eM(t,t)}function tM(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return In(t,`virtual:${e}#${t.range}`)}function rM(t,e){if(e.includes("#"))throw new Error("Invalid entropy");return eM(t,Qs(t,`virtual:${e}#${t.reference}`))}function bf(t){return t.range.startsWith($I)}function qc(t){return t.reference.startsWith($I)}function t1(t){if(!bf(t))throw new Error("Not a virtual descriptor");return In(t,t.range.replace(MS,""))}function r1(t){if(!qc(t))throw new Error("Not a virtual descriptor");return Qs(t,t.reference.replace(MS,""))}function ktt(t){return bf(t)?In(t,t.range.replace(MS,"")):t}function Qtt(t){return qc(t)?Qs(t,t.reference.replace(MS,"")):t}function Ftt(t,e){return t.range.includes("::")?t:In(t,`${t.range}::${aE.default.stringify(e)}`)}function Rtt(t,e){return t.reference.includes("::")?t:Qs(t,`${t.reference}::${aE.default.stringify(e)}`)}function n1(t,e){return t.identHash===e.identHash}function nse(t,e){return t.descriptorHash===e.descriptorHash}function i1(t,e){return t.locatorHash===e.locatorHash}function Ttt(t,e){if(!qc(t))throw new Error("Invalid package type");if(!qc(e))throw new Error("Invalid package type");if(!n1(t,e)||t.dependencies.size!==e.dependencies.size)return!1;for(let r of t.dependencies.values()){let o=e.dependencies.get(r.identHash);if(!o||!nse(r,o))return!1}return!0}function Vs(t){let e=ise(t);if(!e)throw new Error(`Invalid ident (${t})`);return e}function ise(t){let e=t.match(Ltt);if(!e)return null;let[,r,o]=e;return tA(typeof r<"u"?r:null,o)}function sh(t,e=!1){let r=s1(t,e);if(!r)throw new Error(`Invalid descriptor (${t})`);return r}function s1(t,e=!1){let r=e?t.match(Ntt):t.match(Ott);if(!r)return null;let[,o,a,n]=r;if(n==="unknown")throw new Error(`Invalid range (${t})`);let u=typeof o<"u"?o:null,A=typeof n<"u"?n:"unknown";return In(tA(u,a),A)}function xf(t,e=!1){let r=US(t,e);if(!r)throw new Error(`Invalid locator (${t})`);return r}function US(t,e=!1){let r=e?t.match(Mtt):t.match(Utt);if(!r)return null;let[,o,a,n]=r;if(n==="unknown")throw new Error(`Invalid reference (${t})`);let u=typeof o<"u"?o:null,A=typeof n<"u"?n:"unknown";return Qs(tA(u,a),A)}function vd(t,e){let r=t.match(_tt);if(r===null)throw new Error(`Invalid range (${t})`);let o=typeof r[1]<"u"?r[1]:null;if(typeof e?.requireProtocol=="string"&&o!==e.requireProtocol)throw new Error(`Invalid protocol (${o})`);if(e?.requireProtocol&&o===null)throw new Error(`Missing protocol (${o})`);let a=typeof r[3]<"u"?decodeURIComponent(r[2]):null;if(e?.requireSource&&a===null)throw new Error(`Missing source (${t})`);let n=typeof r[3]<"u"?decodeURIComponent(r[3]):decodeURIComponent(r[2]),u=e?.parseSelector?aE.default.parse(n):n,A=typeof r[4]<"u"?aE.default.parse(r[4]):null;return{protocol:o,source:a,selector:u,params:A}}function Htt(t,e){try{return vd(t,e)}catch{return null}}function qtt(t,{protocol:e}){let{selector:r,params:o}=vd(t,{requireProtocol:e,requireBindings:!0});if(typeof o.locator!="string")throw new Error(`Assertion failed: Invalid bindings for ${t}`);return{parentLocator:xf(o.locator,!0),path:r}}function $ie(t){return t=t.replaceAll("%","%25"),t=t.replaceAll(":","%3A"),t=t.replaceAll("#","%23"),t}function Gtt(t){return t===null?!1:Object.entries(t).length>0}function _S({protocol:t,source:e,selector:r,params:o}){let a="";return t!==null&&(a+=`${t}`),e!==null&&(a+=`${$ie(e)}#`),a+=$ie(r),Gtt(o)&&(a+=`::${aE.default.stringify(o)}`),a}function jtt(t){let{params:e,protocol:r,source:o,selector:a}=vd(t);for(let n in e)n.startsWith("__")&&delete e[n];return _S({protocol:r,source:o,params:e,selector:a})}function fn(t){return t.scope?`@${t.scope}/${t.name}`:`${t.name}`}function Sa(t){return t.scope?`@${t.scope}/${t.name}@${t.range}`:`${t.name}@${t.range}`}function ba(t){return t.scope?`@${t.scope}/${t.name}@${t.reference}`:`${t.name}@${t.reference}`}function ZO(t){return t.scope!==null?`@${t.scope}-${t.name}`:t.name}function lE(t){let{protocol:e,selector:r}=vd(t.reference),o=e!==null?e.replace(Ytt,""):"exotic",a=ese.default.valid(r),n=a!==null?`${o}-${a}`:`${o}`,u=10;return t.scope?`${ZO(t)}-${n}-${t.locatorHash.slice(0,u)}`:`${ZO(t)}-${n}-${t.locatorHash.slice(0,u)}`}function cs(t,e){return e.scope?`${Ut(t,`@${e.scope}/`,yt.SCOPE)}${Ut(t,e.name,yt.NAME)}`:`${Ut(t,e.name,yt.NAME)}`}function HS(t){if(t.startsWith($I)){let e=HS(t.substring(t.indexOf("#")+1)),r=t.substring($I.length,$I.length+Ptt);return`${e} [${r}]`}else return t.replace(Wtt,"?[...]")}function cE(t,e){return`${Ut(t,HS(e),yt.RANGE)}`}function Gn(t,e){return`${cs(t,e)}${Ut(t,"@",yt.RANGE)}${cE(t,e.range)}`}function o1(t,e){return`${Ut(t,HS(e),yt.REFERENCE)}`}function qr(t,e){return`${cs(t,e)}${Ut(t,"@",yt.REFERENCE)}${o1(t,e.reference)}`}function kN(t){return`${fn(t)}@${HS(t.reference)}`}function uE(t){return ks(t,[e=>fn(e),e=>e.range])}function a1(t,e){return cs(t,e.anchoredLocator)}function ZI(t,e,r){let o=bf(e)?t1(e):e;return r===null?`${Gn(t,o)} \u2192 ${xN(t).Cross}`:o.identHash===r.identHash?`${Gn(t,o)} \u2192 ${o1(t,r.reference)}`:`${Gn(t,o)} \u2192 ${qr(t,r)}`}function QN(t,e,r){return r===null?`${qr(t,e)}`:`${qr(t,e)} (via ${cE(t,r.range)})`}function nM(t){return`node_modules/${fn(t)}`}function qS(t,e){return t.conditions?Stt(t.conditions,r=>{let[,o,a]=r.match(rse),n=e[o];return n?n.includes(a):!0}):!0}var aE,ese,tse,$I,Ptt,rse,Stt,MS,Ltt,Ntt,Ott,Mtt,Utt,_tt,Ytt,Wtt,bo=Et(()=>{aE=$e(ve("querystring")),ese=$e(Jn()),tse=$e(eX());jl();ih();Gl();bo();$I="virtual:",Ptt=5,rse=/(os|cpu|libc)=([a-z0-9_-]+)/,Stt=(0,tse.makeParser)(rse);MS=/^[^#]*#/;Ltt=/^(?:@([^/]+?)\/)?([^@/]+)$/;Ntt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/,Ott=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/;Mtt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))$/,Utt=/^(?:@([^/]+?)\/)?([^@/]+?)(?:@(.+))?$/;_tt=/^([^#:]*:)?((?:(?!::)[^#])*)(?:#((?:(?!::).)*))?(?:::(.*))?$/;Ytt=/:$/;Wtt=/\?.*/});var sse,ose=Et(()=>{bo();sse={hooks:{reduceDependency:(t,e,r,o,{resolver:a,resolveOptions:n})=>{for(let{pattern:u,reference:A}of e.topLevelWorkspace.manifest.resolutions){if(u.from&&(u.from.fullName!==fn(r)||e.configuration.normalizeLocator(Qs(Vs(u.from.fullName),u.from.description??r.reference)).locatorHash!==r.locatorHash)||u.descriptor.fullName!==fn(t)||e.configuration.normalizeDependency(In(xf(u.descriptor.fullName),u.descriptor.description??t.range)).descriptorHash!==t.descriptorHash)continue;return a.bindDescriptor(e.configuration.normalizeDependency(In(t,A)),e.topLevelWorkspace.anchoredLocator,n)}return t},validateProject:async(t,e)=>{for(let r of t.workspaces){let o=a1(t.configuration,r);await t.configuration.triggerHook(a=>a.validateWorkspace,r,{reportWarning:(a,n)=>e.reportWarning(a,`${o}: ${n}`),reportError:(a,n)=>e.reportError(a,`${o}: ${n}`)})}},validateWorkspace:async(t,e)=>{let{manifest:r}=t;r.resolutions.length&&t.cwd!==t.project.cwd&&r.errors.push(new Error("Resolutions field will be ignored"));for(let o of r.errors)e.reportWarning(57,o.message)}}}});var l1,Xn,Dd=Et(()=>{l1=class{supportsDescriptor(e,r){return!!(e.range.startsWith(l1.protocol)||r.project.tryWorkspaceByDescriptor(e)!==null)}supportsLocator(e,r){return!!e.reference.startsWith(l1.protocol)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){return[o.project.getWorkspaceByDescriptor(e).anchoredLocator]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let o=r.project.getWorkspaceByCwd(e.reference.slice(l1.protocol.length));return{...e,version:o.manifest.version||"0.0.0",languageName:"unknown",linkType:"SOFT",conditions:null,dependencies:r.project.configuration.normalizeDependencyMap(new Map([...o.manifest.dependencies,...o.manifest.devDependencies])),peerDependencies:new Map([...o.manifest.peerDependencies]),dependenciesMeta:o.manifest.dependenciesMeta,peerDependenciesMeta:o.manifest.peerDependenciesMeta,bin:o.manifest.bin}}},Xn=l1;Xn.protocol="workspace:"});var kr={};zt(kr,{SemVer:()=>Ase.SemVer,clean:()=>ztt,getComparator:()=>cse,mergeComparators:()=>iM,satisfiesWithPrereleases:()=>kf,simplifyRanges:()=>sM,stringifyComparator:()=>use,validRange:()=>xa});function kf(t,e,r=!1){if(!t)return!1;let o=`${e}${r}`,a=ase.get(o);if(typeof a>"u")try{a=new oh.default.Range(e,{includePrerelease:!0,loose:r})}catch{return!1}finally{ase.set(o,a||null)}else if(a===null)return!1;let n;try{n=new oh.default.SemVer(t,a)}catch{return!1}return a.test(n)?!0:(n.prerelease&&(n.prerelease=[]),a.set.some(u=>{for(let A of u)A.semver.prerelease&&(A.semver.prerelease=[]);return u.every(A=>A.test(n))}))}function xa(t){if(t.indexOf(":")!==-1)return null;let e=lse.get(t);if(typeof e<"u")return e;try{e=new oh.default.Range(t)}catch{e=null}return lse.set(t,e),e}function ztt(t){let e=Ktt.exec(t);return e?e[1]:null}function cse(t){if(t.semver===oh.default.Comparator.ANY)return{gt:null,lt:null};switch(t.operator){case"":return{gt:[">=",t.semver],lt:["<=",t.semver]};case">":case">=":return{gt:[t.operator,t.semver],lt:null};case"<":case"<=":return{gt:null,lt:[t.operator,t.semver]};default:throw new Error(`Assertion failed: Unexpected comparator operator (${t.operator})`)}}function iM(t){if(t.length===0)return null;let e=null,r=null;for(let o of t){if(o.gt){let a=e!==null?oh.default.compare(o.gt[1],e[1]):null;(a===null||a>0||a===0&&o.gt[0]===">")&&(e=o.gt)}if(o.lt){let a=r!==null?oh.default.compare(o.lt[1],r[1]):null;(a===null||a<0||a===0&&o.lt[0]==="<")&&(r=o.lt)}}if(e&&r){let o=oh.default.compare(e[1],r[1]);if(o===0&&(e[0]===">"||r[0]==="<")||o>0)return null}return{gt:e,lt:r}}function use(t){if(t.gt&&t.lt){if(t.gt[0]===">="&&t.lt[0]==="<="&&t.gt[1].version===t.lt[1].version)return t.gt[1].version;if(t.gt[0]===">="&&t.lt[0]==="<"){if(t.lt[1].version===`${t.gt[1].major+1}.0.0-0`)return`^${t.gt[1].version}`;if(t.lt[1].version===`${t.gt[1].major}.${t.gt[1].minor+1}.0-0`)return`~${t.gt[1].version}`}}let e=[];return t.gt&&e.push(t.gt[0]+t.gt[1].version),t.lt&&e.push(t.lt[0]+t.lt[1].version),e.length?e.join(" "):"*"}function sM(t){let e=t.map(o=>xa(o).set.map(a=>a.map(n=>cse(n)))),r=e.shift().map(o=>iM(o)).filter(o=>o!==null);for(let o of e){let a=[];for(let n of r)for(let u of o){let A=iM([n,...u]);A!==null&&a.push(A)}r=a}return r.length===0?null:r.map(o=>use(o)).join(" || ")}var oh,Ase,ase,lse,Ktt,Qf=Et(()=>{oh=$e(Jn()),Ase=$e(Jn()),ase=new Map;lse=new Map;Ktt=/^(?:[\sv=]*?)((0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\s*)$/});function fse(t){let e=t.match(/^[ \t]+/m);return e?e[0]:" "}function pse(t){return t.charCodeAt(0)===65279?t.slice(1):t}function $o(t){return t.replace(/\\/g,"/")}function GS(t,{yamlCompatibilityMode:e}){return e?wN(t):typeof t>"u"||typeof t=="boolean"?t:null}function hse(t,e){let r=e.search(/[^!]/);if(r===-1)return"invalid";let o=r%2===0?"":"!",a=e.slice(r);return`${o}${t}=${a}`}function oM(t,e){return e.length===1?hse(t,e[0]):`(${e.map(r=>hse(t,r)).join(" | ")})`}var gse,AE,Ot,fE=Et(()=>{Pt();Nl();gse=$e(Jn());Dd();Gl();Qf();bo();AE=class{constructor(){this.indent=" ";this.name=null;this.version=null;this.os=null;this.cpu=null;this.libc=null;this.type=null;this.packageManager=null;this.private=!1;this.license=null;this.main=null;this.module=null;this.browser=null;this.languageName=null;this.bin=new Map;this.scripts=new Map;this.dependencies=new Map;this.devDependencies=new Map;this.peerDependencies=new Map;this.workspaceDefinitions=[];this.dependenciesMeta=new Map;this.peerDependenciesMeta=new Map;this.resolutions=[];this.files=null;this.publishConfig=null;this.installConfig=null;this.preferUnplugged=null;this.raw={};this.errors=[]}static async tryFind(e,{baseFs:r=new Tn}={}){let o=z.join(e,"package.json");try{return await AE.fromFile(o,{baseFs:r})}catch(a){if(a.code==="ENOENT")return null;throw a}}static async find(e,{baseFs:r}={}){let o=await AE.tryFind(e,{baseFs:r});if(o===null)throw new Error("Manifest not found");return o}static async fromFile(e,{baseFs:r=new Tn}={}){let o=new AE;return await o.loadFile(e,{baseFs:r}),o}static fromText(e){let r=new AE;return r.loadFromText(e),r}loadFromText(e){let r;try{r=JSON.parse(pse(e)||"{}")}catch(o){throw o.message+=` (when parsing ${e})`,o}this.load(r),this.indent=fse(e)}async loadFile(e,{baseFs:r=new Tn}){let o=await r.readFilePromise(e,"utf8"),a;try{a=JSON.parse(pse(o)||"{}")}catch(n){throw n.message+=` (when parsing ${e})`,n}this.load(a),this.indent=fse(o)}load(e,{yamlCompatibilityMode:r=!1}={}){if(typeof e!="object"||e===null)throw new Error(`Utterly invalid manifest data (${e})`);this.raw=e;let o=[];if(this.name=null,typeof e.name=="string")try{this.name=Vs(e.name)}catch{o.push(new Error("Parsing failed for the 'name' field"))}if(typeof e.version=="string"?this.version=e.version:this.version=null,Array.isArray(e.os)){let n=[];this.os=n;for(let u of e.os)typeof u!="string"?o.push(new Error("Parsing failed for the 'os' field")):n.push(u)}else this.os=null;if(Array.isArray(e.cpu)){let n=[];this.cpu=n;for(let u of e.cpu)typeof u!="string"?o.push(new Error("Parsing failed for the 'cpu' field")):n.push(u)}else this.cpu=null;if(Array.isArray(e.libc)){let n=[];this.libc=n;for(let u of e.libc)typeof u!="string"?o.push(new Error("Parsing failed for the 'libc' field")):n.push(u)}else this.libc=null;if(typeof e.type=="string"?this.type=e.type:this.type=null,typeof e.packageManager=="string"?this.packageManager=e.packageManager:this.packageManager=null,typeof e.private=="boolean"?this.private=e.private:this.private=!1,typeof e.license=="string"?this.license=e.license:this.license=null,typeof e.languageName=="string"?this.languageName=e.languageName:this.languageName=null,typeof e.main=="string"?this.main=$o(e.main):this.main=null,typeof e.module=="string"?this.module=$o(e.module):this.module=null,e.browser!=null)if(typeof e.browser=="string")this.browser=$o(e.browser);else{this.browser=new Map;for(let[n,u]of Object.entries(e.browser))this.browser.set($o(n),typeof u=="string"?$o(u):u)}else this.browser=null;if(this.bin=new Map,typeof e.bin=="string")e.bin.trim()===""?o.push(new Error("Invalid bin field")):this.name!==null?this.bin.set(this.name.name,$o(e.bin)):o.push(new Error("String bin field, but no attached package name"));else if(typeof e.bin=="object"&&e.bin!==null)for(let[n,u]of Object.entries(e.bin)){if(typeof u!="string"||u.trim()===""){o.push(new Error(`Invalid bin definition for '${n}'`));continue}let A=Vs(n);this.bin.set(A.name,$o(u))}if(this.scripts=new Map,typeof e.scripts=="object"&&e.scripts!==null)for(let[n,u]of Object.entries(e.scripts)){if(typeof u!="string"){o.push(new Error(`Invalid script definition for '${n}'`));continue}this.scripts.set(n,u)}if(this.dependencies=new Map,typeof e.dependencies=="object"&&e.dependencies!==null)for(let[n,u]of Object.entries(e.dependencies)){if(typeof u!="string"){o.push(new Error(`Invalid dependency range for '${n}'`));continue}let A;try{A=Vs(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=In(A,u);this.dependencies.set(p.identHash,p)}if(this.devDependencies=new Map,typeof e.devDependencies=="object"&&e.devDependencies!==null)for(let[n,u]of Object.entries(e.devDependencies)){if(typeof u!="string"){o.push(new Error(`Invalid dependency range for '${n}'`));continue}let A;try{A=Vs(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=In(A,u);this.devDependencies.set(p.identHash,p)}if(this.peerDependencies=new Map,typeof e.peerDependencies=="object"&&e.peerDependencies!==null)for(let[n,u]of Object.entries(e.peerDependencies)){let A;try{A=Vs(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}(typeof u!="string"||!u.startsWith(Xn.protocol)&&!xa(u))&&(o.push(new Error(`Invalid dependency range for '${n}'`)),u="*");let p=In(A,u);this.peerDependencies.set(p.identHash,p)}typeof e.workspaces=="object"&&e.workspaces!==null&&e.workspaces.nohoist&&o.push(new Error("'nohoist' is deprecated, please use 'installConfig.hoistingLimits' instead"));let a=Array.isArray(e.workspaces)?e.workspaces:typeof e.workspaces=="object"&&e.workspaces!==null&&Array.isArray(e.workspaces.packages)?e.workspaces.packages:[];this.workspaceDefinitions=[];for(let n of a){if(typeof n!="string"){o.push(new Error(`Invalid workspace definition for '${n}'`));continue}this.workspaceDefinitions.push({pattern:n})}if(this.dependenciesMeta=new Map,typeof e.dependenciesMeta=="object"&&e.dependenciesMeta!==null)for(let[n,u]of Object.entries(e.dependenciesMeta)){if(typeof u!="object"||u===null){o.push(new Error(`Invalid meta field for '${n}`));continue}let A=sh(n),p=this.ensureDependencyMeta(A),h=GS(u.built,{yamlCompatibilityMode:r});if(h===null){o.push(new Error(`Invalid built meta field for '${n}'`));continue}let E=GS(u.optional,{yamlCompatibilityMode:r});if(E===null){o.push(new Error(`Invalid optional meta field for '${n}'`));continue}let I=GS(u.unplugged,{yamlCompatibilityMode:r});if(I===null){o.push(new Error(`Invalid unplugged meta field for '${n}'`));continue}Object.assign(p,{built:h,optional:E,unplugged:I})}if(this.peerDependenciesMeta=new Map,typeof e.peerDependenciesMeta=="object"&&e.peerDependenciesMeta!==null)for(let[n,u]of Object.entries(e.peerDependenciesMeta)){if(typeof u!="object"||u===null){o.push(new Error(`Invalid meta field for '${n}'`));continue}let A=sh(n),p=this.ensurePeerDependencyMeta(A),h=GS(u.optional,{yamlCompatibilityMode:r});if(h===null){o.push(new Error(`Invalid optional meta field for '${n}'`));continue}Object.assign(p,{optional:h})}if(this.resolutions=[],typeof e.resolutions=="object"&&e.resolutions!==null)for(let[n,u]of Object.entries(e.resolutions)){if(typeof u!="string"){o.push(new Error(`Invalid resolution entry for '${n}'`));continue}try{this.resolutions.push({pattern:MD(n),reference:u})}catch(A){o.push(A);continue}}if(Array.isArray(e.files)){this.files=new Set;for(let n of e.files){if(typeof n!="string"){o.push(new Error(`Invalid files entry for '${n}'`));continue}this.files.add(n)}}else this.files=null;if(typeof e.publishConfig=="object"&&e.publishConfig!==null){if(this.publishConfig={},typeof e.publishConfig.access=="string"&&(this.publishConfig.access=e.publishConfig.access),typeof e.publishConfig.main=="string"&&(this.publishConfig.main=$o(e.publishConfig.main)),typeof e.publishConfig.module=="string"&&(this.publishConfig.module=$o(e.publishConfig.module)),e.publishConfig.browser!=null)if(typeof e.publishConfig.browser=="string")this.publishConfig.browser=$o(e.publishConfig.browser);else{this.publishConfig.browser=new Map;for(let[n,u]of Object.entries(e.publishConfig.browser))this.publishConfig.browser.set($o(n),typeof u=="string"?$o(u):u)}if(typeof e.publishConfig.registry=="string"&&(this.publishConfig.registry=e.publishConfig.registry),typeof e.publishConfig.bin=="string")this.name!==null?this.publishConfig.bin=new Map([[this.name.name,$o(e.publishConfig.bin)]]):o.push(new Error("String bin field, but no attached package name"));else if(typeof e.publishConfig.bin=="object"&&e.publishConfig.bin!==null){this.publishConfig.bin=new Map;for(let[n,u]of Object.entries(e.publishConfig.bin)){if(typeof u!="string"){o.push(new Error(`Invalid bin definition for '${n}'`));continue}this.publishConfig.bin.set(n,$o(u))}}if(Array.isArray(e.publishConfig.executableFiles)){this.publishConfig.executableFiles=new Set;for(let n of e.publishConfig.executableFiles){if(typeof n!="string"){o.push(new Error("Invalid executable file definition"));continue}this.publishConfig.executableFiles.add($o(n))}}}else this.publishConfig=null;if(typeof e.installConfig=="object"&&e.installConfig!==null){this.installConfig={};for(let n of Object.keys(e.installConfig))n==="hoistingLimits"?typeof e.installConfig.hoistingLimits=="string"?this.installConfig.hoistingLimits=e.installConfig.hoistingLimits:o.push(new Error("Invalid hoisting limits definition")):n=="selfReferences"?typeof e.installConfig.selfReferences=="boolean"?this.installConfig.selfReferences=e.installConfig.selfReferences:o.push(new Error("Invalid selfReferences definition, must be a boolean value")):o.push(new Error(`Unrecognized installConfig key: ${n}`))}else this.installConfig=null;if(typeof e.optionalDependencies=="object"&&e.optionalDependencies!==null)for(let[n,u]of Object.entries(e.optionalDependencies)){if(typeof u!="string"){o.push(new Error(`Invalid dependency range for '${n}'`));continue}let A;try{A=Vs(n)}catch{o.push(new Error(`Parsing failed for the dependency name '${n}'`));continue}let p=In(A,u);this.dependencies.set(p.identHash,p);let h=In(A,"unknown"),E=this.ensureDependencyMeta(h);Object.assign(E,{optional:!0})}typeof e.preferUnplugged=="boolean"?this.preferUnplugged=e.preferUnplugged:this.preferUnplugged=null,this.errors=o}getForScope(e){switch(e){case"dependencies":return this.dependencies;case"devDependencies":return this.devDependencies;case"peerDependencies":return this.peerDependencies;default:throw new Error(`Unsupported value ("${e}")`)}}hasConsumerDependency(e){return!!(this.dependencies.has(e.identHash)||this.peerDependencies.has(e.identHash))}hasHardDependency(e){return!!(this.dependencies.has(e.identHash)||this.devDependencies.has(e.identHash))}hasSoftDependency(e){return!!this.peerDependencies.has(e.identHash)}hasDependency(e){return!!(this.hasHardDependency(e)||this.hasSoftDependency(e))}getConditions(){let e=[];return this.os&&this.os.length>0&&e.push(oM("os",this.os)),this.cpu&&this.cpu.length>0&&e.push(oM("cpu",this.cpu)),this.libc&&this.libc.length>0&&e.push(oM("libc",this.libc)),e.length>0?e.join(" & "):null}ensureDependencyMeta(e){if(e.range!=="unknown"&&!gse.default.valid(e.range))throw new Error(`Invalid meta field range for '${Sa(e)}'`);let r=fn(e),o=e.range!=="unknown"?e.range:null,a=this.dependenciesMeta.get(r);a||this.dependenciesMeta.set(r,a=new Map);let n=a.get(o);return n||a.set(o,n={}),n}ensurePeerDependencyMeta(e){if(e.range!=="unknown")throw new Error(`Invalid meta field range for '${Sa(e)}'`);let r=fn(e),o=this.peerDependenciesMeta.get(r);return o||this.peerDependenciesMeta.set(r,o={}),o}setRawField(e,r,{after:o=[]}={}){let a=new Set(o.filter(n=>Object.hasOwn(this.raw,n)));if(a.size===0||Object.hasOwn(this.raw,e))this.raw[e]=r;else{let n=this.raw,u=this.raw={},A=!1;for(let p of Object.keys(n))u[p]=n[p],A||(a.delete(p),a.size===0&&(u[e]=r,A=!0))}}exportTo(e,{compatibilityMode:r=!0}={}){if(Object.assign(e,this.raw),this.name!==null?e.name=fn(this.name):delete e.name,this.version!==null?e.version=this.version:delete e.version,this.os!==null?e.os=this.os:delete e.os,this.cpu!==null?e.cpu=this.cpu:delete e.cpu,this.type!==null?e.type=this.type:delete e.type,this.packageManager!==null?e.packageManager=this.packageManager:delete e.packageManager,this.private?e.private=!0:delete e.private,this.license!==null?e.license=this.license:delete e.license,this.languageName!==null?e.languageName=this.languageName:delete e.languageName,this.main!==null?e.main=this.main:delete e.main,this.module!==null?e.module=this.module:delete e.module,this.browser!==null){let n=this.browser;typeof n=="string"?e.browser=n:n instanceof Map&&(e.browser=Object.assign({},...Array.from(n.keys()).sort().map(u=>({[u]:n.get(u)}))))}else delete e.browser;this.bin.size===1&&this.name!==null&&this.bin.has(this.name.name)?e.bin=this.bin.get(this.name.name):this.bin.size>0?e.bin=Object.assign({},...Array.from(this.bin.keys()).sort().map(n=>({[n]:this.bin.get(n)}))):delete e.bin,this.workspaceDefinitions.length>0?this.raw.workspaces&&!Array.isArray(this.raw.workspaces)?e.workspaces={...this.raw.workspaces,packages:this.workspaceDefinitions.map(({pattern:n})=>n)}:e.workspaces=this.workspaceDefinitions.map(({pattern:n})=>n):this.raw.workspaces&&!Array.isArray(this.raw.workspaces)&&Object.keys(this.raw.workspaces).length>0?e.workspaces=this.raw.workspaces:delete e.workspaces;let o=[],a=[];for(let n of this.dependencies.values()){let u=this.dependenciesMeta.get(fn(n)),A=!1;if(r&&u){let p=u.get(null);p&&p.optional&&(A=!0)}A?a.push(n):o.push(n)}o.length>0?e.dependencies=Object.assign({},...uE(o).map(n=>({[fn(n)]:n.range}))):delete e.dependencies,a.length>0?e.optionalDependencies=Object.assign({},...uE(a).map(n=>({[fn(n)]:n.range}))):delete e.optionalDependencies,this.devDependencies.size>0?e.devDependencies=Object.assign({},...uE(this.devDependencies.values()).map(n=>({[fn(n)]:n.range}))):delete e.devDependencies,this.peerDependencies.size>0?e.peerDependencies=Object.assign({},...uE(this.peerDependencies.values()).map(n=>({[fn(n)]:n.range}))):delete e.peerDependencies,e.dependenciesMeta={};for(let[n,u]of ks(this.dependenciesMeta.entries(),([A,p])=>A))for(let[A,p]of ks(u.entries(),([h,E])=>h!==null?`0${h}`:"1")){let h=A!==null?Sa(In(Vs(n),A)):n,E={...p};r&&A===null&&delete E.optional,Object.keys(E).length!==0&&(e.dependenciesMeta[h]=E)}if(Object.keys(e.dependenciesMeta).length===0&&delete e.dependenciesMeta,this.peerDependenciesMeta.size>0?e.peerDependenciesMeta=Object.assign({},...ks(this.peerDependenciesMeta.entries(),([n,u])=>n).map(([n,u])=>({[n]:u}))):delete e.peerDependenciesMeta,this.resolutions.length>0?e.resolutions=Object.assign({},...this.resolutions.map(({pattern:n,reference:u})=>({[UD(n)]:u}))):delete e.resolutions,this.files!==null?e.files=Array.from(this.files):delete e.files,this.preferUnplugged!==null?e.preferUnplugged=this.preferUnplugged:delete e.preferUnplugged,this.scripts!==null&&this.scripts.size>0){e.scripts??={};for(let n of Object.keys(e.scripts))this.scripts.has(n)||delete e.scripts[n];for(let[n,u]of this.scripts.entries())e.scripts[n]=u}else delete e.scripts;return e}},Ot=AE;Ot.fileName="package.json",Ot.allDependencies=["dependencies","devDependencies","peerDependencies"],Ot.hardDependencies=["dependencies","devDependencies"]});var mse=_((_Lt,dse)=>{var Vtt=Hl(),Jtt=function(){return Vtt.Date.now()};dse.exports=Jtt});var Ese=_((HLt,yse)=>{var Xtt=/\s/;function Ztt(t){for(var e=t.length;e--&&Xtt.test(t.charAt(e)););return e}yse.exports=Ztt});var wse=_((qLt,Cse)=>{var $tt=Ese(),ert=/^\s+/;function trt(t){return t&&t.slice(0,$tt(t)+1).replace(ert,"")}Cse.exports=trt});var pE=_((GLt,Ise)=>{var rrt=gd(),nrt=Ju(),irt="[object Symbol]";function srt(t){return typeof t=="symbol"||nrt(t)&&rrt(t)==irt}Ise.exports=srt});var Pse=_((jLt,Dse)=>{var ort=wse(),Bse=sl(),art=pE(),vse=0/0,lrt=/^[-+]0x[0-9a-f]+$/i,crt=/^0b[01]+$/i,urt=/^0o[0-7]+$/i,Art=parseInt;function frt(t){if(typeof t=="number")return t;if(art(t))return vse;if(Bse(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Bse(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=ort(t);var r=crt.test(t);return r||urt.test(t)?Art(t.slice(2),r?2:8):lrt.test(t)?vse:+t}Dse.exports=frt});var xse=_((YLt,bse)=>{var prt=sl(),aM=mse(),Sse=Pse(),hrt="Expected a function",grt=Math.max,drt=Math.min;function mrt(t,e,r){var o,a,n,u,A,p,h=0,E=!1,I=!1,v=!0;if(typeof t!="function")throw new TypeError(hrt);e=Sse(e)||0,prt(r)&&(E=!!r.leading,I="maxWait"in r,n=I?grt(Sse(r.maxWait)||0,e):n,v="trailing"in r?!!r.trailing:v);function x(ue){var me=o,he=a;return o=a=void 0,h=ue,u=t.apply(he,me),u}function C(ue){return h=ue,A=setTimeout(U,e),E?x(ue):u}function R(ue){var me=ue-p,he=ue-h,Be=e-me;return I?drt(Be,n-he):Be}function N(ue){var me=ue-p,he=ue-h;return p===void 0||me>=e||me<0||I&&he>=n}function U(){var ue=aM();if(N(ue))return V(ue);A=setTimeout(U,R(ue))}function V(ue){return A=void 0,v&&o?x(ue):(o=a=void 0,u)}function te(){A!==void 0&&clearTimeout(A),h=0,o=p=a=A=void 0}function ae(){return A===void 0?u:V(aM())}function fe(){var ue=aM(),me=N(ue);if(o=arguments,a=this,p=ue,me){if(A===void 0)return C(p);if(I)return clearTimeout(A),A=setTimeout(U,e),x(p)}return A===void 0&&(A=setTimeout(U,e)),u}return fe.cancel=te,fe.flush=ae,fe}bse.exports=mrt});var lM=_((WLt,kse)=>{var yrt=xse(),Ert=sl(),Crt="Expected a function";function wrt(t,e,r){var o=!0,a=!0;if(typeof t!="function")throw new TypeError(Crt);return Ert(r)&&(o="leading"in r?!!r.leading:o,a="trailing"in r?!!r.trailing:a),yrt(t,e,{leading:o,maxWait:e,trailing:a})}kse.exports=wrt});function Brt(t){return typeof t.reportCode<"u"}var Qse,Fse,Rse,Irt,Jt,Xs,Wl=Et(()=>{Qse=$e(lM()),Fse=ve("stream"),Rse=ve("string_decoder"),Irt=15,Jt=class extends Error{constructor(r,o,a){super(o);this.reportExtra=a;this.reportCode=r}};Xs=class{constructor(){this.cacheHits=new Set;this.cacheMisses=new Set;this.reportedInfos=new Set;this.reportedWarnings=new Set;this.reportedErrors=new Set}getRecommendedLength(){return 180}reportCacheHit(e){this.cacheHits.add(e.locatorHash)}reportCacheMiss(e,r){this.cacheMisses.add(e.locatorHash)}static progressViaCounter(e){let r=0,o,a=new Promise(p=>{o=p}),n=p=>{let h=o;a=new Promise(E=>{o=E}),r=p,h()},u=(p=0)=>{n(r+1)},A=async function*(){for(;r{r=u}),a=(0,Qse.default)(u=>{let A=r;o=new Promise(p=>{r=p}),e=u,A()},1e3/Irt),n=async function*(){for(;;)await o,yield{title:e}}();return{[Symbol.asyncIterator](){return n},hasProgress:!1,hasTitle:!0,setTitle:a}}async startProgressPromise(e,r){let o=this.reportProgress(e);try{return await r(e)}finally{o.stop()}}startProgressSync(e,r){let o=this.reportProgress(e);try{return r(e)}finally{o.stop()}}reportInfoOnce(e,r,o){let a=o&&o.key?o.key:r;this.reportedInfos.has(a)||(this.reportedInfos.add(a),this.reportInfo(e,r),o?.reportExtra?.(this))}reportWarningOnce(e,r,o){let a=o&&o.key?o.key:r;this.reportedWarnings.has(a)||(this.reportedWarnings.add(a),this.reportWarning(e,r),o?.reportExtra?.(this))}reportErrorOnce(e,r,o){let a=o&&o.key?o.key:r;this.reportedErrors.has(a)||(this.reportedErrors.add(a),this.reportError(e,r),o?.reportExtra?.(this))}reportExceptionOnce(e){Brt(e)?this.reportErrorOnce(e.reportCode,e.message,{key:e,reportExtra:e.reportExtra}):this.reportErrorOnce(1,e.stack||e.message,{key:e})}createStreamReporter(e=null){let r=new Fse.PassThrough,o=new Rse.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(` `),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",e!==null?this.reportInfo(null,`${e} ${p}`):this.reportInfo(null,p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&(e!==null?this.reportInfo(null,`${e} ${n}`):this.reportInfo(null,n))}),r}}});var hE,cM=Et(()=>{Wl();bo();hE=class{constructor(e){this.fetchers=e}supports(e,r){return!!this.tryFetcher(e,r)}getLocalPath(e,r){return this.getFetcher(e,r).getLocalPath(e,r)}async fetch(e,r){return await this.getFetcher(e,r).fetch(e,r)}tryFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));return o||null}getFetcher(e,r){let o=this.fetchers.find(a=>a.supports(e,r));if(!o)throw new Jt(11,`${qr(r.project.configuration,e)} isn't supported by any available fetcher`);return o}}});var Pd,uM=Et(()=>{bo();Pd=class{constructor(e){this.resolvers=e.filter(r=>r)}supportsDescriptor(e,r){return!!this.tryResolverByDescriptor(e,r)}supportsLocator(e,r){return!!this.tryResolverByLocator(e,r)}shouldPersistResolution(e,r){return this.getResolverByLocator(e,r).shouldPersistResolution(e,r)}bindDescriptor(e,r,o){return this.getResolverByDescriptor(e,o).bindDescriptor(e,r,o)}getResolutionDependencies(e,r){return this.getResolverByDescriptor(e,r).getResolutionDependencies(e,r)}async getCandidates(e,r,o){return await this.getResolverByDescriptor(e,o).getCandidates(e,r,o)}async getSatisfying(e,r,o,a){return this.getResolverByDescriptor(e,a).getSatisfying(e,r,o,a)}async resolve(e,r){return await this.getResolverByLocator(e,r).resolve(e,r)}tryResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));return o||null}getResolverByDescriptor(e,r){let o=this.resolvers.find(a=>a.supportsDescriptor(e,r));if(!o)throw new Error(`${Gn(r.project.configuration,e)} isn't supported by any available resolver`);return o}tryResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));return o||null}getResolverByLocator(e,r){let o=this.resolvers.find(a=>a.supportsLocator(e,r));if(!o)throw new Error(`${qr(r.project.configuration,e)} isn't supported by any available resolver`);return o}}});var gE,AM=Et(()=>{Pt();bo();gE=class{supports(e){return!!e.reference.startsWith("virtual:")}getLocalPath(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Qs(e,a);return r.fetcher.getLocalPath(n,r)}async fetch(e,r){let o=e.reference.indexOf("#");if(o===-1)throw new Error("Invalid virtual package reference");let a=e.reference.slice(o+1),n=Qs(e,a),u=await r.fetcher.fetch(n,r);return await this.ensureVirtualLink(e,u,r)}getLocatorFilename(e){return lE(e)}async ensureVirtualLink(e,r,o){let a=r.packageFs.getRealPath(),n=o.project.configuration.get("virtualFolder"),u=this.getLocatorFilename(e),A=mi.makeVirtualPath(n,u,a),p=new _u(A,{baseFs:r.packageFs,pathUtils:z});return{...r,packageFs:p}}}});var dE,c1,Tse=Et(()=>{dE=class{static isVirtualDescriptor(e){return!!e.range.startsWith(dE.protocol)}static isVirtualLocator(e){return!!e.reference.startsWith(dE.protocol)}supportsDescriptor(e,r){return dE.isVirtualDescriptor(e)}supportsLocator(e,r){return dE.isVirtualLocator(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){throw new Error('Assertion failed: calling "bindDescriptor" on a virtual descriptor is unsupported')}getResolutionDependencies(e,r){throw new Error('Assertion failed: calling "getResolutionDependencies" on a virtual descriptor is unsupported')}async getCandidates(e,r,o){throw new Error('Assertion failed: calling "getCandidates" on a virtual descriptor is unsupported')}async getSatisfying(e,r,o,a){throw new Error('Assertion failed: calling "getSatisfying" on a virtual descriptor is unsupported')}async resolve(e,r){throw new Error('Assertion failed: calling "resolve" on a virtual locator is unsupported')}},c1=dE;c1.protocol="virtual:"});var mE,fM=Et(()=>{Pt();Dd();mE=class{supports(e){return!!e.reference.startsWith(Xn.protocol)}getLocalPath(e,r){return this.getWorkspace(e,r).cwd}async fetch(e,r){let o=this.getWorkspace(e,r).cwd;return{packageFs:new gn(o),prefixPath:Bt.dot,localPath:o}}getWorkspace(e,r){return r.project.getWorkspaceByCwd(e.reference.slice(Xn.protocol.length))}}});function u1(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}function Lse(t){return typeof t>"u"?3:u1(t)?0:Array.isArray(t)?1:2}function gM(t,e){return Object.hasOwn(t,e)}function Drt(t){return u1(t)&&gM(t,"onConflict")&&typeof t.onConflict=="string"}function Prt(t){if(typeof t>"u")return{onConflict:"default",value:t};if(!Drt(t))return{onConflict:"default",value:t};if(gM(t,"value"))return t;let{onConflict:e,...r}=t;return{onConflict:e,value:r}}function Nse(t,e){let r=u1(t)&&gM(t,e)?t[e]:void 0;return Prt(r)}function yE(t,e){return[t,e,Ose]}function dM(t){return Array.isArray(t)?t[2]===Ose:!1}function pM(t,e){if(u1(t)){let r={};for(let o of Object.keys(t))r[o]=pM(t[o],e);return yE(e,r)}return Array.isArray(t)?yE(e,t.map(r=>pM(r,e))):yE(e,t)}function hM(t,e,r,o,a){let n,u=[],A=a,p=0;for(let E=a-1;E>=o;--E){let[I,v]=t[E],{onConflict:x,value:C}=Nse(v,r),R=Lse(C);if(R!==3){if(n??=R,R!==n||x==="hardReset"){p=A;break}if(R===2)return yE(I,C);if(u.unshift([I,C]),x==="reset"){p=E;break}x==="extend"&&E===o&&(o=0),A=E}}if(typeof n>"u")return null;let h=u.map(([E])=>E).join(", ");switch(n){case 1:return yE(h,new Array().concat(...u.map(([E,I])=>I.map(v=>pM(v,E)))));case 0:{let E=Object.assign({},...u.map(([,R])=>R)),I=Object.keys(E),v={},x=t.map(([R,N])=>[R,Nse(N,r).value]),C=vrt(x,([R,N])=>{let U=Lse(N);return U!==0&&U!==3});if(C!==-1){let R=x.slice(C+1);for(let N of I)v[N]=hM(R,e,N,0,R.length)}else for(let R of I)v[R]=hM(x,e,R,p,x.length);return yE(h,v)}default:throw new Error("Assertion failed: Non-extendable value type")}}function Mse(t){return hM(t.map(([e,r])=>[e,{["."]:r}]),[],".",0,t.length)}function A1(t){return dM(t)?t[1]:t}function jS(t){let e=dM(t)?t[1]:t;if(Array.isArray(e))return e.map(r=>jS(r));if(u1(e)){let r={};for(let[o,a]of Object.entries(e))r[o]=jS(a);return r}return e}function mM(t){return dM(t)?t[0]:null}var vrt,Ose,Use=Et(()=>{vrt=(t,e,r)=>{let o=[...t];return o.reverse(),o.findIndex(e,r)};Ose=Symbol()});var YS={};zt(YS,{getDefaultGlobalFolder:()=>EM,getHomeFolder:()=>EE,isFolderInside:()=>CM});function EM(){if(process.platform==="win32"){let t=le.toPortablePath(process.env.LOCALAPPDATA||le.join((0,yM.homedir)(),"AppData","Local"));return z.resolve(t,"Yarn/Berry")}if(process.env.XDG_DATA_HOME){let t=le.toPortablePath(process.env.XDG_DATA_HOME);return z.resolve(t,"yarn/berry")}return z.resolve(EE(),".yarn/berry")}function EE(){return le.toPortablePath((0,yM.homedir)()||"/usr/local/share")}function CM(t,e){let r=z.relative(e,t);return r&&!r.startsWith("..")&&!z.isAbsolute(r)}var yM,WS=Et(()=>{Pt();yM=ve("os")});var Gse=_(CE=>{"use strict";var sNt=ve("net"),brt=ve("tls"),wM=ve("http"),_se=ve("https"),xrt=ve("events"),oNt=ve("assert"),krt=ve("util");CE.httpOverHttp=Qrt;CE.httpsOverHttp=Frt;CE.httpOverHttps=Rrt;CE.httpsOverHttps=Trt;function Qrt(t){var e=new Ff(t);return e.request=wM.request,e}function Frt(t){var e=new Ff(t);return e.request=wM.request,e.createSocket=Hse,e.defaultPort=443,e}function Rrt(t){var e=new Ff(t);return e.request=_se.request,e}function Trt(t){var e=new Ff(t);return e.request=_se.request,e.createSocket=Hse,e.defaultPort=443,e}function Ff(t){var e=this;e.options=t||{},e.proxyOptions=e.options.proxy||{},e.maxSockets=e.options.maxSockets||wM.Agent.defaultMaxSockets,e.requests=[],e.sockets=[],e.on("free",function(o,a,n,u){for(var A=qse(a,n,u),p=0,h=e.requests.length;p=this.maxSockets){n.requests.push(u);return}n.createSocket(u,function(A){A.on("free",p),A.on("close",h),A.on("agentRemove",h),e.onSocket(A);function p(){n.emit("free",A,u)}function h(E){n.removeSocket(A),A.removeListener("free",p),A.removeListener("close",h),A.removeListener("agentRemove",h)}})};Ff.prototype.createSocket=function(e,r){var o=this,a={};o.sockets.push(a);var n=IM({},o.proxyOptions,{method:"CONNECT",path:e.host+":"+e.port,agent:!1,headers:{host:e.host+":"+e.port}});e.localAddress&&(n.localAddress=e.localAddress),n.proxyAuth&&(n.headers=n.headers||{},n.headers["Proxy-Authorization"]="Basic "+new Buffer(n.proxyAuth).toString("base64")),ah("making CONNECT request");var u=o.request(n);u.useChunkedEncodingByDefault=!1,u.once("response",A),u.once("upgrade",p),u.once("connect",h),u.once("error",E),u.end();function A(I){I.upgrade=!0}function p(I,v,x){process.nextTick(function(){h(I,v,x)})}function h(I,v,x){if(u.removeAllListeners(),v.removeAllListeners(),I.statusCode!==200){ah("tunneling socket could not be established, statusCode=%d",I.statusCode),v.destroy();var C=new Error("tunneling socket could not be established, statusCode="+I.statusCode);C.code="ECONNRESET",e.request.emit("error",C),o.removeSocket(a);return}if(x.length>0){ah("got illegal response body from proxy"),v.destroy();var C=new Error("got illegal response body from proxy");C.code="ECONNRESET",e.request.emit("error",C),o.removeSocket(a);return}return ah("tunneling connection has established"),o.sockets[o.sockets.indexOf(a)]=v,r(v)}function E(I){u.removeAllListeners(),ah(`tunneling socket could not be established, cause=%s `,I.message,I.stack);var v=new Error("tunneling socket could not be established, cause="+I.message);v.code="ECONNRESET",e.request.emit("error",v),o.removeSocket(a)}};Ff.prototype.removeSocket=function(e){var r=this.sockets.indexOf(e);if(r!==-1){this.sockets.splice(r,1);var o=this.requests.shift();o&&this.createSocket(o,function(a){o.request.onSocket(a)})}};function Hse(t,e){var r=this;Ff.prototype.createSocket.call(r,t,function(o){var a=t.request.getHeader("host"),n=IM({},r.options,{socket:o,servername:a?a.replace(/:.*$/,""):t.host}),u=brt.connect(0,n);r.sockets[r.sockets.indexOf(o)]=u,e(u)})}function qse(t,e,r){return typeof t=="string"?{host:t,port:e,localAddress:r}:t}function IM(t){for(var e=1,r=arguments.length;e{jse.exports=Gse()});var Tf=_((Rf,KS)=>{"use strict";Object.defineProperty(Rf,"__esModule",{value:!0});var Wse=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function Lrt(t){return Wse.includes(t)}var Nrt=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement",...Wse];function Ort(t){return Nrt.includes(t)}var Mrt=["null","undefined","string","number","bigint","boolean","symbol"];function Urt(t){return Mrt.includes(t)}function wE(t){return e=>typeof e===t}var{toString:Kse}=Object.prototype,f1=t=>{let e=Kse.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Se.domElement(t))return"HTMLElement";if(Ort(e))return e},Zn=t=>e=>f1(e)===t;function Se(t){if(t===null)return"null";switch(typeof t){case"undefined":return"undefined";case"string":return"string";case"number":return"number";case"boolean":return"boolean";case"function":return"Function";case"bigint":return"bigint";case"symbol":return"symbol";default:}if(Se.observable(t))return"Observable";if(Se.array(t))return"Array";if(Se.buffer(t))return"Buffer";let e=f1(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return"Object"}Se.undefined=wE("undefined");Se.string=wE("string");var _rt=wE("number");Se.number=t=>_rt(t)&&!Se.nan(t);Se.bigint=wE("bigint");Se.function_=wE("function");Se.null_=t=>t===null;Se.class_=t=>Se.function_(t)&&t.toString().startsWith("class ");Se.boolean=t=>t===!0||t===!1;Se.symbol=wE("symbol");Se.numericString=t=>Se.string(t)&&!Se.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Se.array=(t,e)=>Array.isArray(t)?Se.function_(e)?t.every(e):!0:!1;Se.buffer=t=>{var e,r,o,a;return(a=(o=(r=(e=t)===null||e===void 0?void 0:e.constructor)===null||r===void 0?void 0:r.isBuffer)===null||o===void 0?void 0:o.call(r,t))!==null&&a!==void 0?a:!1};Se.blob=t=>Zn("Blob")(t);Se.nullOrUndefined=t=>Se.null_(t)||Se.undefined(t);Se.object=t=>!Se.null_(t)&&(typeof t=="object"||Se.function_(t));Se.iterable=t=>{var e;return Se.function_((e=t)===null||e===void 0?void 0:e[Symbol.iterator])};Se.asyncIterable=t=>{var e;return Se.function_((e=t)===null||e===void 0?void 0:e[Symbol.asyncIterator])};Se.generator=t=>{var e,r;return Se.iterable(t)&&Se.function_((e=t)===null||e===void 0?void 0:e.next)&&Se.function_((r=t)===null||r===void 0?void 0:r.throw)};Se.asyncGenerator=t=>Se.asyncIterable(t)&&Se.function_(t.next)&&Se.function_(t.throw);Se.nativePromise=t=>Zn("Promise")(t);var Hrt=t=>{var e,r;return Se.function_((e=t)===null||e===void 0?void 0:e.then)&&Se.function_((r=t)===null||r===void 0?void 0:r.catch)};Se.promise=t=>Se.nativePromise(t)||Hrt(t);Se.generatorFunction=Zn("GeneratorFunction");Se.asyncGeneratorFunction=t=>f1(t)==="AsyncGeneratorFunction";Se.asyncFunction=t=>f1(t)==="AsyncFunction";Se.boundFunction=t=>Se.function_(t)&&!t.hasOwnProperty("prototype");Se.regExp=Zn("RegExp");Se.date=Zn("Date");Se.error=Zn("Error");Se.map=t=>Zn("Map")(t);Se.set=t=>Zn("Set")(t);Se.weakMap=t=>Zn("WeakMap")(t);Se.weakSet=t=>Zn("WeakSet")(t);Se.int8Array=Zn("Int8Array");Se.uint8Array=Zn("Uint8Array");Se.uint8ClampedArray=Zn("Uint8ClampedArray");Se.int16Array=Zn("Int16Array");Se.uint16Array=Zn("Uint16Array");Se.int32Array=Zn("Int32Array");Se.uint32Array=Zn("Uint32Array");Se.float32Array=Zn("Float32Array");Se.float64Array=Zn("Float64Array");Se.bigInt64Array=Zn("BigInt64Array");Se.bigUint64Array=Zn("BigUint64Array");Se.arrayBuffer=Zn("ArrayBuffer");Se.sharedArrayBuffer=Zn("SharedArrayBuffer");Se.dataView=Zn("DataView");Se.enumCase=(t,e)=>Object.values(e).includes(t);Se.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;Se.urlInstance=t=>Zn("URL")(t);Se.urlString=t=>{if(!Se.string(t))return!1;try{return new URL(t),!0}catch{return!1}};Se.truthy=t=>Boolean(t);Se.falsy=t=>!t;Se.nan=t=>Number.isNaN(t);Se.primitive=t=>Se.null_(t)||Urt(typeof t);Se.integer=t=>Number.isInteger(t);Se.safeInteger=t=>Number.isSafeInteger(t);Se.plainObject=t=>{if(Kse.call(t)!=="[object Object]")return!1;let e=Object.getPrototypeOf(t);return e===null||e===Object.getPrototypeOf({})};Se.typedArray=t=>Lrt(f1(t));var qrt=t=>Se.safeInteger(t)&&t>=0;Se.arrayLike=t=>!Se.nullOrUndefined(t)&&!Se.function_(t)&&qrt(t.length);Se.inRange=(t,e)=>{if(Se.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(Se.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var Grt=1,jrt=["innerHTML","ownerDocument","style","attributes","nodeValue"];Se.domElement=t=>Se.object(t)&&t.nodeType===Grt&&Se.string(t.nodeName)&&!Se.plainObject(t)&&jrt.every(e=>e in t);Se.observable=t=>{var e,r,o,a;return t?t===((r=(e=t)[Symbol.observable])===null||r===void 0?void 0:r.call(e))||t===((a=(o=t)["@@observable"])===null||a===void 0?void 0:a.call(o)):!1};Se.nodeStream=t=>Se.object(t)&&Se.function_(t.pipe)&&!Se.observable(t);Se.infinite=t=>t===1/0||t===-1/0;var zse=t=>e=>Se.integer(e)&&Math.abs(e%2)===t;Se.evenInteger=zse(0);Se.oddInteger=zse(1);Se.emptyArray=t=>Se.array(t)&&t.length===0;Se.nonEmptyArray=t=>Se.array(t)&&t.length>0;Se.emptyString=t=>Se.string(t)&&t.length===0;var Yrt=t=>Se.string(t)&&!/\S/.test(t);Se.emptyStringOrWhitespace=t=>Se.emptyString(t)||Yrt(t);Se.nonEmptyString=t=>Se.string(t)&&t.length>0;Se.nonEmptyStringAndNotWhitespace=t=>Se.string(t)&&!Se.emptyStringOrWhitespace(t);Se.emptyObject=t=>Se.object(t)&&!Se.map(t)&&!Se.set(t)&&Object.keys(t).length===0;Se.nonEmptyObject=t=>Se.object(t)&&!Se.map(t)&&!Se.set(t)&&Object.keys(t).length>0;Se.emptySet=t=>Se.set(t)&&t.size===0;Se.nonEmptySet=t=>Se.set(t)&&t.size>0;Se.emptyMap=t=>Se.map(t)&&t.size===0;Se.nonEmptyMap=t=>Se.map(t)&&t.size>0;Se.propertyKey=t=>Se.any([Se.string,Se.number,Se.symbol],t);Se.formData=t=>Zn("FormData")(t);Se.urlSearchParams=t=>Zn("URLSearchParams")(t);var Vse=(t,e,r)=>{if(!Se.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};Se.any=(t,...e)=>(Se.array(t)?t:[t]).some(o=>Vse(Array.prototype.some,o,e));Se.all=(t,...e)=>Vse(Array.prototype.every,t,e);var Mt=(t,e,r,o={})=>{if(!t){let{multipleValues:a}=o,n=a?`received values of types ${[...new Set(r.map(u=>`\`${Se(u)}\``))].join(", ")}`:`received value of type \`${Se(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${n}.`)}};Rf.assert={undefined:t=>Mt(Se.undefined(t),"undefined",t),string:t=>Mt(Se.string(t),"string",t),number:t=>Mt(Se.number(t),"number",t),bigint:t=>Mt(Se.bigint(t),"bigint",t),function_:t=>Mt(Se.function_(t),"Function",t),null_:t=>Mt(Se.null_(t),"null",t),class_:t=>Mt(Se.class_(t),"Class",t),boolean:t=>Mt(Se.boolean(t),"boolean",t),symbol:t=>Mt(Se.symbol(t),"symbol",t),numericString:t=>Mt(Se.numericString(t),"string with a number",t),array:(t,e)=>{Mt(Se.array(t),"Array",t),e&&t.forEach(e)},buffer:t=>Mt(Se.buffer(t),"Buffer",t),blob:t=>Mt(Se.blob(t),"Blob",t),nullOrUndefined:t=>Mt(Se.nullOrUndefined(t),"null or undefined",t),object:t=>Mt(Se.object(t),"Object",t),iterable:t=>Mt(Se.iterable(t),"Iterable",t),asyncIterable:t=>Mt(Se.asyncIterable(t),"AsyncIterable",t),generator:t=>Mt(Se.generator(t),"Generator",t),asyncGenerator:t=>Mt(Se.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>Mt(Se.nativePromise(t),"native Promise",t),promise:t=>Mt(Se.promise(t),"Promise",t),generatorFunction:t=>Mt(Se.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>Mt(Se.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>Mt(Se.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>Mt(Se.boundFunction(t),"Function",t),regExp:t=>Mt(Se.regExp(t),"RegExp",t),date:t=>Mt(Se.date(t),"Date",t),error:t=>Mt(Se.error(t),"Error",t),map:t=>Mt(Se.map(t),"Map",t),set:t=>Mt(Se.set(t),"Set",t),weakMap:t=>Mt(Se.weakMap(t),"WeakMap",t),weakSet:t=>Mt(Se.weakSet(t),"WeakSet",t),int8Array:t=>Mt(Se.int8Array(t),"Int8Array",t),uint8Array:t=>Mt(Se.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>Mt(Se.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>Mt(Se.int16Array(t),"Int16Array",t),uint16Array:t=>Mt(Se.uint16Array(t),"Uint16Array",t),int32Array:t=>Mt(Se.int32Array(t),"Int32Array",t),uint32Array:t=>Mt(Se.uint32Array(t),"Uint32Array",t),float32Array:t=>Mt(Se.float32Array(t),"Float32Array",t),float64Array:t=>Mt(Se.float64Array(t),"Float64Array",t),bigInt64Array:t=>Mt(Se.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>Mt(Se.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>Mt(Se.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>Mt(Se.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>Mt(Se.dataView(t),"DataView",t),enumCase:(t,e)=>Mt(Se.enumCase(t,e),"EnumCase",t),urlInstance:t=>Mt(Se.urlInstance(t),"URL",t),urlString:t=>Mt(Se.urlString(t),"string with a URL",t),truthy:t=>Mt(Se.truthy(t),"truthy",t),falsy:t=>Mt(Se.falsy(t),"falsy",t),nan:t=>Mt(Se.nan(t),"NaN",t),primitive:t=>Mt(Se.primitive(t),"primitive",t),integer:t=>Mt(Se.integer(t),"integer",t),safeInteger:t=>Mt(Se.safeInteger(t),"integer",t),plainObject:t=>Mt(Se.plainObject(t),"plain object",t),typedArray:t=>Mt(Se.typedArray(t),"TypedArray",t),arrayLike:t=>Mt(Se.arrayLike(t),"array-like",t),domElement:t=>Mt(Se.domElement(t),"HTMLElement",t),observable:t=>Mt(Se.observable(t),"Observable",t),nodeStream:t=>Mt(Se.nodeStream(t),"Node.js Stream",t),infinite:t=>Mt(Se.infinite(t),"infinite number",t),emptyArray:t=>Mt(Se.emptyArray(t),"empty array",t),nonEmptyArray:t=>Mt(Se.nonEmptyArray(t),"non-empty array",t),emptyString:t=>Mt(Se.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>Mt(Se.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>Mt(Se.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>Mt(Se.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>Mt(Se.emptyObject(t),"empty object",t),nonEmptyObject:t=>Mt(Se.nonEmptyObject(t),"non-empty object",t),emptySet:t=>Mt(Se.emptySet(t),"empty set",t),nonEmptySet:t=>Mt(Se.nonEmptySet(t),"non-empty set",t),emptyMap:t=>Mt(Se.emptyMap(t),"empty map",t),nonEmptyMap:t=>Mt(Se.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>Mt(Se.propertyKey(t),"PropertyKey",t),formData:t=>Mt(Se.formData(t),"FormData",t),urlSearchParams:t=>Mt(Se.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>Mt(Se.evenInteger(t),"even integer",t),oddInteger:t=>Mt(Se.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>Mt(Se.directInstanceOf(t,e),"T",t),inRange:(t,e)=>Mt(Se.inRange(t,e),"in range",t),any:(t,...e)=>Mt(Se.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>Mt(Se.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(Se,{class:{value:Se.class_},function:{value:Se.function_},null:{value:Se.null_}});Object.defineProperties(Rf.assert,{class:{value:Rf.assert.class_},function:{value:Rf.assert.function_},null:{value:Rf.assert.null_}});Rf.default=Se;KS.exports=Se;KS.exports.default=Se;KS.exports.assert=Rf.assert});var Jse=_((cNt,BM)=>{"use strict";var zS=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError"}get isCanceled(){return!0}},IE=class{static fn(e){return(...r)=>new IE((o,a,n)=>{r.push(n),e(...r).then(o,a)})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,o)=>{this._reject=o;let a=A=>{this._isPending=!1,r(A)},n=A=>{this._isPending=!1,o(A)},u=A=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(A)};return Object.defineProperties(u,{shouldReject:{get:()=>this._rejectOnCancel,set:A=>{this._rejectOnCancel=A}}}),e(a,n,u)})}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r()}catch(r){this._reject(r)}this._isCanceled=!0,this._rejectOnCancel&&this._reject(new zS(e))}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(IE.prototype,Promise.prototype);BM.exports=IE;BM.exports.CancelError=zS});var Xse=_((DM,PM)=>{"use strict";Object.defineProperty(DM,"__esModule",{value:!0});function Wrt(t){return t.encrypted}var vM=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let o=typeof r.connect=="function",a=typeof r.secureConnect=="function",n=typeof r.close=="function",u=()=>{o&&r.connect(),Wrt(t)&&a&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),n&&t.once("close",r.close)};t.writable&&!t.connecting?u():t.connecting?t.once("connect",u):t.destroyed&&n&&r.close(t._hadError)};DM.default=vM;PM.exports=vM;PM.exports.default=vM});var Zse=_((bM,xM)=>{"use strict";Object.defineProperty(bM,"__esModule",{value:!0});var Krt=Xse(),zrt=Number(process.versions.node.split(".")[0]),SM=t=>{let e={start:Date.now(),socket:void 0,lookup:void 0,connect:void 0,secureConnect:void 0,upload:void 0,response:void 0,end:void 0,error:void 0,abort:void 0,phases:{wait:void 0,dns:void 0,tcp:void 0,tls:void 0,request:void 0,firstByte:void 0,download:void 0,total:void 0}};t.timings=e;let r=u=>{let A=u.emit.bind(u);u.emit=(p,...h)=>(p==="error"&&(e.error=Date.now(),e.phases.total=e.error-e.start,u.emit=A),A(p,...h))};r(t),t.prependOnceListener("abort",()=>{e.abort=Date.now(),(!e.response||zrt>=13)&&(e.phases.total=Date.now()-e.start)});let o=u=>{e.socket=Date.now(),e.phases.wait=e.socket-e.start;let A=()=>{e.lookup=Date.now(),e.phases.dns=e.lookup-e.socket};u.prependOnceListener("lookup",A),Krt.default(u,{connect:()=>{e.connect=Date.now(),e.lookup===void 0&&(u.removeListener("lookup",A),e.lookup=e.connect,e.phases.dns=e.lookup-e.socket),e.phases.tcp=e.connect-e.lookup},secureConnect:()=>{e.secureConnect=Date.now(),e.phases.tls=e.secureConnect-e.connect}})};t.socket?o(t.socket):t.prependOnceListener("socket",o);let a=()=>{var u;e.upload=Date.now(),e.phases.request=e.upload-(u=e.secureConnect,u??e.connect)};return(()=>typeof t.writableFinished=="boolean"?t.writableFinished:t.finished&&t.outputSize===0&&(!t.socket||t.socket.writableLength===0))()?a():t.prependOnceListener("finish",a),t.prependOnceListener("response",u=>{e.response=Date.now(),e.phases.firstByte=e.response-e.upload,u.timings=e,r(u),u.prependOnceListener("end",()=>{e.end=Date.now(),e.phases.download=e.end-e.response,e.phases.total=e.end-e.start})}),e};bM.default=SM;xM.exports=SM;xM.exports.default=SM});var soe=_((uNt,FM)=>{"use strict";var{V4MAPPED:Vrt,ADDRCONFIG:Jrt,ALL:ioe,promises:{Resolver:$se},lookup:Xrt}=ve("dns"),{promisify:kM}=ve("util"),Zrt=ve("os"),BE=Symbol("cacheableLookupCreateConnection"),QM=Symbol("cacheableLookupInstance"),eoe=Symbol("expires"),$rt=typeof ioe=="number",toe=t=>{if(!(t&&typeof t.createConnection=="function"))throw new Error("Expected an Agent instance as the first argument")},ent=t=>{for(let e of t)e.family!==6&&(e.address=`::ffff:${e.address}`,e.family=6)},roe=()=>{let t=!1,e=!1;for(let r of Object.values(Zrt.networkInterfaces()))for(let o of r)if(!o.internal&&(o.family==="IPv6"?e=!0:t=!0,t&&e))return{has4:t,has6:e};return{has4:t,has6:e}},tnt=t=>Symbol.iterator in t,noe={ttl:!0},rnt={all:!0},VS=class{constructor({cache:e=new Map,maxTtl:r=1/0,fallbackDuration:o=3600,errorTtl:a=.15,resolver:n=new $se,lookup:u=Xrt}={}){if(this.maxTtl=r,this.errorTtl=a,this._cache=e,this._resolver=n,this._dnsLookup=kM(u),this._resolver instanceof $se?(this._resolve4=this._resolver.resolve4.bind(this._resolver),this._resolve6=this._resolver.resolve6.bind(this._resolver)):(this._resolve4=kM(this._resolver.resolve4.bind(this._resolver)),this._resolve6=kM(this._resolver.resolve6.bind(this._resolver))),this._iface=roe(),this._pending={},this._nextRemovalTime=!1,this._hostnamesToFallback=new Set,o<1)this._fallback=!1;else{this._fallback=!0;let A=setInterval(()=>{this._hostnamesToFallback.clear()},o*1e3);A.unref&&A.unref()}this.lookup=this.lookup.bind(this),this.lookupAsync=this.lookupAsync.bind(this)}set servers(e){this.clear(),this._resolver.setServers(e)}get servers(){return this._resolver.getServers()}lookup(e,r,o){if(typeof r=="function"?(o=r,r={}):typeof r=="number"&&(r={family:r}),!o)throw new Error("Callback must be a function.");this.lookupAsync(e,r).then(a=>{r.all?o(null,a):o(null,a.address,a.family,a.expires,a.ttl)},o)}async lookupAsync(e,r={}){typeof r=="number"&&(r={family:r});let o=await this.query(e);if(r.family===6){let a=o.filter(n=>n.family===6);r.hints&Vrt&&($rt&&r.hints&ioe||a.length===0)?ent(o):o=a}else r.family===4&&(o=o.filter(a=>a.family===4));if(r.hints&Jrt){let{_iface:a}=this;o=o.filter(n=>n.family===6?a.has6:a.has4)}if(o.length===0){let a=new Error(`cacheableLookup ENOTFOUND ${e}`);throw a.code="ENOTFOUND",a.hostname=e,a}return r.all?o:o[0]}async query(e){let r=await this._cache.get(e);if(!r){let o=this._pending[e];if(o)r=await o;else{let a=this.queryAndCache(e);this._pending[e]=a,r=await a}}return r=r.map(o=>({...o})),r}async _resolve(e){let r=async h=>{try{return await h}catch(E){if(E.code==="ENODATA"||E.code==="ENOTFOUND")return[];throw E}},[o,a]=await Promise.all([this._resolve4(e,noe),this._resolve6(e,noe)].map(h=>r(h))),n=0,u=0,A=0,p=Date.now();for(let h of o)h.family=4,h.expires=p+h.ttl*1e3,n=Math.max(n,h.ttl);for(let h of a)h.family=6,h.expires=p+h.ttl*1e3,u=Math.max(u,h.ttl);return o.length>0?a.length>0?A=Math.min(n,u):A=n:A=u,{entries:[...o,...a],cacheTtl:A}}async _lookup(e){try{return{entries:await this._dnsLookup(e,{all:!0}),cacheTtl:0}}catch{return{entries:[],cacheTtl:0}}}async _set(e,r,o){if(this.maxTtl>0&&o>0){o=Math.min(o,this.maxTtl)*1e3,r[eoe]=Date.now()+o;try{await this._cache.set(e,r,o)}catch(a){this.lookupAsync=async()=>{let n=new Error("Cache Error. Please recreate the CacheableLookup instance.");throw n.cause=a,n}}tnt(this._cache)&&this._tick(o)}}async queryAndCache(e){if(this._hostnamesToFallback.has(e))return this._dnsLookup(e,rnt);try{let r=await this._resolve(e);r.entries.length===0&&this._fallback&&(r=await this._lookup(e),r.entries.length!==0&&this._hostnamesToFallback.add(e));let o=r.entries.length===0?this.errorTtl:r.cacheTtl;return await this._set(e,r.entries,o),delete this._pending[e],r.entries}catch(r){throw delete this._pending[e],r}}_tick(e){let r=this._nextRemovalTime;(!r||e{this._nextRemovalTime=!1;let o=1/0,a=Date.now();for(let[n,u]of this._cache){let A=u[eoe];a>=A?this._cache.delete(n):A("lookup"in r||(r.lookup=this.lookup),e[BE](r,o))}uninstall(e){if(toe(e),e[BE]){if(e[QM]!==this)throw new Error("The agent is not owned by this CacheableLookup instance");e.createConnection=e[BE],delete e[BE],delete e[QM]}}updateInterfaceInfo(){let{_iface:e}=this;this._iface=roe(),(e.has4&&!this._iface.has4||e.has6&&!this._iface.has6)&&this._cache.clear()}clear(e){if(e){this._cache.delete(e);return}this._cache.clear()}};FM.exports=VS;FM.exports.default=VS});var loe=_((ANt,RM)=>{"use strict";var nnt=typeof URL>"u"?ve("url").URL:URL,int="text/plain",snt="us-ascii",ooe=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),ont=(t,{stripHash:e})=>{let r=t.match(/^data:([^,]*?),([^#]*?)(?:#(.*))?$/);if(!r)throw new Error(`Invalid URL: ${t}`);let o=r[1].split(";"),a=r[2],n=e?"":r[3],u=!1;o[o.length-1]==="base64"&&(o.pop(),u=!0);let A=(o.shift()||"").toLowerCase(),h=[...o.map(E=>{let[I,v=""]=E.split("=").map(x=>x.trim());return I==="charset"&&(v=v.toLowerCase(),v===snt)?"":`${I}${v?`=${v}`:""}`}).filter(Boolean)];return u&&h.push("base64"),(h.length!==0||A&&A!==int)&&h.unshift(A),`data:${h.join(";")},${u?a.trim():a}${n?`#${n}`:""}`},aoe=(t,e)=>{if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},Reflect.has(e,"normalizeHttps"))throw new Error("options.normalizeHttps is renamed to options.forceHttp");if(Reflect.has(e,"normalizeHttp"))throw new Error("options.normalizeHttp is renamed to options.forceHttps");if(Reflect.has(e,"stripFragment"))throw new Error("options.stripFragment is renamed to options.stripHash");if(t=t.trim(),/^data:/i.test(t))return ont(t,e);let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let a=new nnt(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),e.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),e.stripAuthentication&&(a.username="",a.password=""),e.stripHash&&(a.hash=""),a.pathname&&(a.pathname=a.pathname.replace(/((?!:).|^)\/{2,}/g,(n,u)=>/^(?!\/)/g.test(u)?`${u}/`:"/")),a.pathname&&(a.pathname=decodeURI(a.pathname)),e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let n=a.pathname.split("/"),u=n[n.length-1];ooe(u,e.removeDirectoryIndex)&&(n=n.slice(0,n.length-1),a.pathname=n.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.([a-z\-\d]{2,63})\.([a-z.]{2,5})$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let n of[...a.searchParams.keys()])ooe(n,e.removeQueryParameters)&&a.searchParams.delete(n);return e.sortQueryParameters&&a.searchParams.sort(),e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,"")),t=a.toString(),(e.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t};RM.exports=aoe;RM.exports.default=aoe});var Aoe=_((fNt,uoe)=>{uoe.exports=coe;function coe(t,e){if(t&&e)return coe(t)(e);if(typeof t!="function")throw new TypeError("need wrapper function");return Object.keys(t).forEach(function(o){r[o]=t[o]}),r;function r(){for(var o=new Array(arguments.length),a=0;a{var foe=Aoe();TM.exports=foe(JS);TM.exports.strict=foe(poe);JS.proto=JS(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return JS(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return poe(this)},configurable:!0})});function JS(t){var e=function(){return e.called?e.value:(e.called=!0,e.value=t.apply(this,arguments))};return e.called=!1,e}function poe(t){var e=function(){if(e.called)throw new Error(e.onceError);return e.called=!0,e.value=t.apply(this,arguments)},r=t.name||"Function wrapped with `once`";return e.onceError=r+" shouldn't be called more than once",e.called=!1,e}});var NM=_((hNt,goe)=>{var ant=LM(),lnt=function(){},cnt=function(t){return t.setHeader&&typeof t.abort=="function"},unt=function(t){return t.stdio&&Array.isArray(t.stdio)&&t.stdio.length===3},hoe=function(t,e,r){if(typeof e=="function")return hoe(t,null,e);e||(e={}),r=ant(r||lnt);var o=t._writableState,a=t._readableState,n=e.readable||e.readable!==!1&&t.readable,u=e.writable||e.writable!==!1&&t.writable,A=function(){t.writable||p()},p=function(){u=!1,n||r.call(t)},h=function(){n=!1,u||r.call(t)},E=function(C){r.call(t,C?new Error("exited with error code: "+C):null)},I=function(C){r.call(t,C)},v=function(){if(n&&!(a&&a.ended))return r.call(t,new Error("premature close"));if(u&&!(o&&o.ended))return r.call(t,new Error("premature close"))},x=function(){t.req.on("finish",p)};return cnt(t)?(t.on("complete",p),t.on("abort",v),t.req?x():t.on("request",x)):u&&!o&&(t.on("end",A),t.on("close",A)),unt(t)&&t.on("exit",E),t.on("end",h),t.on("finish",p),e.error!==!1&&t.on("error",I),t.on("close",v),function(){t.removeListener("complete",p),t.removeListener("abort",v),t.removeListener("request",x),t.req&&t.req.removeListener("finish",p),t.removeListener("end",A),t.removeListener("close",A),t.removeListener("finish",p),t.removeListener("exit",E),t.removeListener("end",h),t.removeListener("error",I),t.removeListener("close",v)}};goe.exports=hoe});var yoe=_((gNt,moe)=>{var Ant=LM(),fnt=NM(),OM=ve("fs"),p1=function(){},pnt=/^v?\.0/.test(process.version),XS=function(t){return typeof t=="function"},hnt=function(t){return!pnt||!OM?!1:(t instanceof(OM.ReadStream||p1)||t instanceof(OM.WriteStream||p1))&&XS(t.close)},gnt=function(t){return t.setHeader&&XS(t.abort)},dnt=function(t,e,r,o){o=Ant(o);var a=!1;t.on("close",function(){a=!0}),fnt(t,{readable:e,writable:r},function(u){if(u)return o(u);a=!0,o()});var n=!1;return function(u){if(!a&&!n){if(n=!0,hnt(t))return t.close(p1);if(gnt(t))return t.abort();if(XS(t.destroy))return t.destroy();o(u||new Error("stream was destroyed"))}}},doe=function(t){t()},mnt=function(t,e){return t.pipe(e)},ynt=function(){var t=Array.prototype.slice.call(arguments),e=XS(t[t.length-1]||p1)&&t.pop()||p1;if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new Error("pump requires two streams per minimum");var r,o=t.map(function(a,n){var u=n0;return dnt(a,u,A,function(p){r||(r=p),p&&o.forEach(doe),!u&&(o.forEach(doe),e(r))})});return t.reduce(mnt)};moe.exports=ynt});var Coe=_((dNt,Eoe)=>{"use strict";var{PassThrough:Ent}=ve("stream");Eoe.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,o=r==="buffer",a=!1;e?a=!(r||o):r=r||"utf8",o&&(r=null);let n=new Ent({objectMode:a});r&&n.setEncoding(r);let u=0,A=[];return n.on("data",p=>{A.push(p),a?u=A.length:u+=p.length}),n.getBufferedValue=()=>e?A:o?Buffer.concat(A,u):A.join(""),n.getBufferedLength=()=>u,n}});var woe=_((mNt,vE)=>{"use strict";var Cnt=yoe(),wnt=Coe(),ZS=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function $S(t,e){if(!t)return Promise.reject(new Error("Expected a stream"));e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,o;return await new Promise((a,n)=>{let u=A=>{A&&(A.bufferedData=o.getBufferedValue()),n(A)};o=Cnt(t,wnt(e),A=>{if(A){u(A);return}a()}),o.on("data",()=>{o.getBufferedLength()>r&&u(new ZS)})}),o.getBufferedValue()}vE.exports=$S;vE.exports.default=$S;vE.exports.buffer=(t,e)=>$S(t,{...e,encoding:"buffer"});vE.exports.array=(t,e)=>$S(t,{...e,array:!0});vE.exports.MaxBufferError=ZS});var Boe=_((ENt,Ioe)=>{"use strict";var Int=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),Bnt=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),vnt=new Set([500,502,503,504]),Dnt={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},Pnt={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Sd(t){let e=parseInt(t,10);return isFinite(e)?e:0}function Snt(t){return t?vnt.has(t.status):!0}function MM(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let o of r){let[a,n]=o.split(/=/,2);e[a.trim()]=n===void 0?!0:n.trim().replace(/^"|"$/g,"")}return e}function bnt(t){let e=[];for(let r in t){let o=t[r];e.push(o===!0?r:r+"="+o)}if(!!e.length)return e.join(", ")}Ioe.exports=class{constructor(e,r,{shared:o,cacheHeuristic:a,immutableMinTimeToLive:n,ignoreCargoCult:u,_fromObject:A}={}){if(A){this._fromObject(A);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=o!==!1,this._cacheHeuristic=a!==void 0?a:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=MM(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=MM(e.headers["cache-control"]),u&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":bnt(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0)}now(){return Date.now()}storable(){return!!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&Bnt.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||Int.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=MM(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return(!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return!0;if(this._resHeaders.vary==="*")return!1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let o of r)if(e.headers[o]!==this._reqHeaders[o])return!1;return!0}_copyWithoutHopByHopHeaders(e){let r={};for(let o in e)Dnt[o]||(r[o]=e[o]);if(e.connection){let o=e.connection.trim().split(/\s*,\s*/);for(let a of o)delete r[a]}if(r.warning){let o=r.warning.split(/,/).filter(a=>!/^\s*1[0-9][0-9]/.test(a));o.length?r.warning=o.join(",").trim():delete r.warning}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return Sd(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return Sd(this._rescc["s-maxage"])}if(this._rescc["max-age"])return Sd(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let o=Date.parse(this._resHeaders.expires);return Number.isNaN(o)||oo)return Math.max(e,(r-o)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+Sd(this._rescc["stale-if-error"]),o=e+Sd(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,o)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+Sd(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+Sd(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc}toObject(){return{v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let a=r["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));a.length?r["if-none-match"]=a.join(",").trim():delete r["if-none-match"]}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&Snt(r))return{modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let o=!1;if(r.status!==void 0&&r.status!=304?o=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?o=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?o=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?o=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(o=!0),!o)return{policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let a={};for(let u in this._resHeaders)a[u]=u in r.headers&&!Pnt[u]?r.headers[u]:this._resHeaders[u];let n=Object.assign({},r,{status:this._status,method:this._method,headers:a});return{policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}}});var eb=_((CNt,voe)=>{"use strict";voe.exports=t=>{let e={};for(let[r,o]of Object.entries(t))e[r.toLowerCase()]=o;return e}});var Poe=_((wNt,Doe)=>{"use strict";var xnt=ve("stream").Readable,knt=eb(),UM=class extends xnt{constructor(e,r,o,a){if(typeof e!="number")throw new TypeError("Argument `statusCode` should be a number");if(typeof r!="object")throw new TypeError("Argument `headers` should be an object");if(!(o instanceof Buffer))throw new TypeError("Argument `body` should be a buffer");if(typeof a!="string")throw new TypeError("Argument `url` should be a string");super(),this.statusCode=e,this.headers=knt(r),this.body=o,this.url=a}_read(){this.push(this.body),this.push(null)}};Doe.exports=UM});var boe=_((INt,Soe)=>{"use strict";var Qnt=["destroy","setTimeout","socket","headers","trailers","rawHeaders","statusCode","httpVersion","httpVersionMinor","httpVersionMajor","rawTrailers","statusMessage"];Soe.exports=(t,e)=>{let r=new Set(Object.keys(t).concat(Qnt));for(let o of r)o in e||(e[o]=typeof t[o]=="function"?t[o].bind(t):t[o])}});var koe=_((BNt,xoe)=>{"use strict";var Fnt=ve("stream").PassThrough,Rnt=boe(),Tnt=t=>{if(!(t&&t.pipe))throw new TypeError("Parameter `response` must be a response stream.");let e=new Fnt;return Rnt(t,e),t.pipe(e)};xoe.exports=Tnt});var Qoe=_(_M=>{_M.stringify=function t(e){if(typeof e>"u")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",o=Array.isArray(e);r=o?"[":"{";var a=!0;for(var n in e){var u=typeof e[n]=="function"||!o&&typeof e[n]>"u";Object.hasOwnProperty.call(e,n)&&!u&&(a||(r+=","),a=!1,o?e[n]==null?r+="null":r+=t(e[n]):e[n]!==void 0&&(r+=t(n)+":"+t(e[n])))}return r+=o?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e>"u"?"null":JSON.stringify(e)};_M.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})}});var Loe=_((DNt,Toe)=>{"use strict";var Lnt=ve("events"),Foe=Qoe(),Nnt=t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(ve(e[r]))(t)}return new Map},Roe=["sqlite","postgres","mysql","mongo","redis","tiered"],HM=class extends Lnt{constructor(e,{emitErrors:r=!0,...o}={}){if(super(),this.opts={namespace:"keyv",serialize:Foe.stringify,deserialize:Foe.parse,...typeof e=="string"?{uri:e}:e,...o},!this.opts.store){let n={...this.opts};this.opts.store=Nnt(n)}if(this.opts.compression){let n=this.opts.compression;this.opts.serialize=n.serialize.bind(n),this.opts.deserialize=n.deserialize.bind(n)}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",n=>this.emit("error",n)),this.opts.store.namespace=this.opts.namespace;let a=n=>async function*(){for await(let[u,A]of typeof n=="function"?n(this.opts.store.namespace):n){let p=await this.opts.deserialize(A);if(!(this.opts.store.namespace&&!u.includes(this.opts.store.namespace))){if(typeof p.expires=="number"&&Date.now()>p.expires){this.delete(u);continue}yield[this._getKeyUnprefix(u),p.value]}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=a(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=a(this.opts.store.iterator.bind(this.opts.store)))}_checkIterableAdaptar(){return Roe.includes(this.opts.store.opts.dialect)||Roe.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return`${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:o}=this.opts,a=Array.isArray(e),n=a?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(a&&o.getMany===void 0){let u=[];for(let A of n)u.push(Promise.resolve().then(()=>o.get(A)).then(p=>typeof p=="string"?this.opts.deserialize(p):this.opts.compression?this.opts.deserialize(p):p).then(p=>{if(p!=null)return typeof p.expires=="number"&&Date.now()>p.expires?this.delete(A).then(()=>{}):r&&r.raw?p:p.value}));return Promise.allSettled(u).then(A=>{let p=[];for(let h of A)p.push(h.value);return p})}return Promise.resolve().then(()=>a?o.getMany(n):o.get(n)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null)return a?u.map((A,p)=>{if(typeof A=="string"&&(A=this.opts.deserialize(A)),A!=null){if(typeof A.expires=="number"&&Date.now()>A.expires){this.delete(e[p]).then(()=>{});return}return r&&r.raw?A:A.value}}):typeof u.expires=="number"&&Date.now()>u.expires?this.delete(e).then(()=>{}):r&&r.raw?u:u.value})}set(e,r,o){let a=this._getKeyPrefix(e);typeof o>"u"&&(o=this.opts.ttl),o===0&&(o=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let u=typeof o=="number"?Date.now()+o:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:u},this.opts.serialize(r)}).then(u=>n.set(a,u,o)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let a=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let n=[];for(let u of a)n.push(r.delete(u));return Promise.allSettled(n).then(u=>u.every(A=>A.value===!0))}return Promise.resolve().then(()=>r.deleteMany(a))}let o=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(o))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:o}=this.opts;return Promise.resolve().then(async()=>typeof o.has=="function"?o.has(r):await o.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};Toe.exports=HM});var Moe=_((SNt,Ooe)=>{"use strict";var Ont=ve("events"),tb=ve("url"),Mnt=loe(),Unt=woe(),qM=Boe(),Noe=Poe(),_nt=eb(),Hnt=koe(),qnt=Loe(),Gc=class{constructor(e,r){if(typeof e!="function")throw new TypeError("Parameter `request` must be a function");return this.cache=new qnt({uri:typeof r=="string"&&r,store:typeof r!="string"&&r,namespace:"cacheable-request"}),this.createCacheableRequest(e)}createCacheableRequest(e){return(r,o)=>{let a;if(typeof r=="string")a=GM(tb.parse(r)),r={};else if(r instanceof tb.URL)a=GM(tb.parse(r.toString())),r={};else{let[I,...v]=(r.path||"").split("?"),x=v.length>0?`?${v.join("?")}`:"";a=GM({...r,pathname:I,search:x})}r={headers:{},method:"GET",cache:!0,strictTtl:!1,automaticFailover:!1,...r,...Gnt(a)},r.headers=_nt(r.headers);let n=new Ont,u=Mnt(tb.format(a),{stripWWW:!1,removeTrailingSlash:!1,stripAuthentication:!1}),A=`${r.method}:${u}`,p=!1,h=!1,E=I=>{h=!0;let v=!1,x,C=new Promise(N=>{x=()=>{v||(v=!0,N())}}),R=N=>{if(p&&!I.forceRefresh){N.status=N.statusCode;let V=qM.fromObject(p.cachePolicy).revalidatedPolicy(I,N);if(!V.modified){let te=V.policy.responseHeaders();N=new Noe(p.statusCode,te,p.body,p.url),N.cachePolicy=V.policy,N.fromCache=!0}}N.fromCache||(N.cachePolicy=new qM(I,N,I),N.fromCache=!1);let U;I.cache&&N.cachePolicy.storable()?(U=Hnt(N),(async()=>{try{let V=Unt.buffer(N);if(await Promise.race([C,new Promise(ue=>N.once("end",ue))]),v)return;let te=await V,ae={cachePolicy:N.cachePolicy.toObject(),url:N.url,statusCode:N.fromCache?p.statusCode:N.statusCode,body:te},fe=I.strictTtl?N.cachePolicy.timeToLive():void 0;I.maxTtl&&(fe=fe?Math.min(fe,I.maxTtl):I.maxTtl),await this.cache.set(A,ae,fe)}catch(V){n.emit("error",new Gc.CacheError(V))}})()):I.cache&&p&&(async()=>{try{await this.cache.delete(A)}catch(V){n.emit("error",new Gc.CacheError(V))}})(),n.emit("response",U||N),typeof o=="function"&&o(U||N)};try{let N=e(I,R);N.once("error",x),N.once("abort",x),n.emit("request",N)}catch(N){n.emit("error",new Gc.RequestError(N))}};return(async()=>{let I=async x=>{await Promise.resolve();let C=x.cache?await this.cache.get(A):void 0;if(typeof C>"u")return E(x);let R=qM.fromObject(C.cachePolicy);if(R.satisfiesWithoutRevalidation(x)&&!x.forceRefresh){let N=R.responseHeaders(),U=new Noe(C.statusCode,N,C.body,C.url);U.cachePolicy=R,U.fromCache=!0,n.emit("response",U),typeof o=="function"&&o(U)}else p=C,x.headers=R.revalidationHeaders(x),E(x)},v=x=>n.emit("error",new Gc.CacheError(x));this.cache.once("error",v),n.on("response",()=>this.cache.removeListener("error",v));try{await I(r)}catch(x){r.automaticFailover&&!h&&E(r),n.emit("error",new Gc.CacheError(x))}})(),n}}};function Gnt(t){let e={...t};return e.path=`${t.pathname||"/"}${t.search||""}`,delete e.pathname,delete e.search,e}function GM(t){return{protocol:t.protocol,auth:t.auth,hostname:t.hostname||t.host||"localhost",port:t.port,pathname:t.pathname,search:t.search}}Gc.RequestError=class extends Error{constructor(t){super(t.message),this.name="RequestError",Object.assign(this,t)}};Gc.CacheError=class extends Error{constructor(t){super(t.message),this.name="CacheError",Object.assign(this,t)}};Ooe.exports=Gc});var _oe=_((kNt,Uoe)=>{"use strict";var jnt=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];Uoe.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(jnt)),o={};for(let a of r)a in e||(o[a]={get(){let n=t[a];return typeof n=="function"?n.bind(t):n},set(n){t[a]=n},enumerable:!0,configurable:!1});return Object.defineProperties(e,o),t.once("aborted",()=>{e.destroy(),e.emit("aborted")}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close")}):e.emit("close")}),e}});var qoe=_((QNt,Hoe)=>{"use strict";var{Transform:Ynt,PassThrough:Wnt}=ve("stream"),jM=ve("zlib"),Knt=_oe();Hoe.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof jM.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let o=!0,a=new Ynt({transform(A,p,h){o=!1,h(null,A)},flush(A){A()}}),n=new Wnt({autoDestroy:!1,destroy(A,p){t.destroy(),p(A)}}),u=r?jM.createBrotliDecompress():jM.createUnzip();return u.once("error",A=>{if(o&&!t.readable){n.end();return}n.destroy(A)}),Knt(t,n),t.pipe(a).pipe(u).pipe(n),n}});var WM=_((FNt,Goe)=>{"use strict";var YM=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[o,a]of this.oldCache.entries())this.onEviction(o,a);this.oldCache=this.cache,this.cache=new Map}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0}*keys(){for(let[e]of this)yield e}*values(){for(let[,e]of this)yield e}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e)}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};Goe.exports=YM});var zM=_((RNt,Koe)=>{"use strict";var znt=ve("events"),Vnt=ve("tls"),Jnt=ve("http2"),Xnt=WM(),ea=Symbol("currentStreamsCount"),joe=Symbol("request"),Kl=Symbol("cachedOriginSet"),DE=Symbol("gracefullyClosing"),Znt=["maxDeflateDynamicTableSize","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","localAddress","path","rejectUnauthorized","minDHSize","ca","cert","clientCertEngine","ciphers","key","pfx","servername","minVersion","maxVersion","secureProtocol","crl","honorCipherOrder","ecdhCurve","dhparam","secureOptions","sessionIdContext"],$nt=(t,e,r)=>{let o=0,a=t.length;for(;o>>1;r(t[n],e)?o=n+1:a=n}return o},eit=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,KM=(t,e)=>{for(let r of t)r[Kl].lengthe[Kl].includes(o))&&r[ea]+e[ea]<=e.remoteSettings.maxConcurrentStreams&&Woe(r)},tit=(t,e)=>{for(let r of t)e[Kl].lengthr[Kl].includes(o))&&e[ea]+r[ea]<=r.remoteSettings.maxConcurrentStreams&&Woe(e)},Yoe=({agent:t,isFree:e})=>{let r={};for(let o in t.sessions){let n=t.sessions[o].filter(u=>{let A=u[rA.kCurrentStreamsCount]{t[DE]=!0,t[ea]===0&&t.close()},rA=class extends znt{constructor({timeout:e=6e4,maxSessions:r=1/0,maxFreeSessions:o=10,maxCachedTlsSessions:a=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxFreeSessions=o,this._freeSessionsCount=0,this._sessionsCount=0,this.settings={enablePush:!1},this.tlsSessionCache=new Xnt({maxSize:a})}static normalizeOrigin(e,r){return typeof e=="string"&&(e=new URL(e)),r&&e.hostname!==r&&(e.hostname=r),e.origin}normalizeOptions(e){let r="";if(e)for(let o of Znt)e[o]&&(r+=`:${e[o]}`);return r}_tryToCreateNewSession(e,r){if(!(e in this.queue)||!(r in this.queue[e]))return;let o=this.queue[e][r];this._sessionsCount{Array.isArray(o)?(o=[...o],a()):o=[{resolve:a,reject:n}];let u=this.normalizeOptions(r),A=rA.normalizeOrigin(e,r&&r.servername);if(A===void 0){for(let{reject:E}of o)E(new TypeError("The `origin` argument needs to be a string or an URL object"));return}if(u in this.sessions){let E=this.sessions[u],I=-1,v=-1,x;for(let C of E){let R=C.remoteSettings.maxConcurrentStreams;if(R=R||C[DE]||C.destroyed)continue;x||(I=R),N>v&&(x=C,v=N)}}if(x){if(o.length!==1){for(let{reject:C}of o){let R=new Error(`Expected the length of listeners to be 1, got ${o.length}. Please report this to https://github.com/szmarczak/http2-wrapper/`);C(R)}return}o[0].resolve(x);return}}if(u in this.queue){if(A in this.queue[u]){this.queue[u][A].listeners.push(...o),this._tryToCreateNewSession(u,A);return}}else this.queue[u]={};let p=()=>{u in this.queue&&this.queue[u][A]===h&&(delete this.queue[u][A],Object.keys(this.queue[u]).length===0&&delete this.queue[u])},h=()=>{let E=`${A}:${u}`,I=!1;try{let v=Jnt.connect(e,{createConnection:this.createConnection,settings:this.settings,session:this.tlsSessionCache.get(E),...r});v[ea]=0,v[DE]=!1;let x=()=>v[ea]{this.tlsSessionCache.set(E,N)}),v.once("error",N=>{for(let{reject:U}of o)U(N);this.tlsSessionCache.delete(E)}),v.setTimeout(this.timeout,()=>{v.destroy()}),v.once("close",()=>{if(I){C&&this._freeSessionsCount--,this._sessionsCount--;let N=this.sessions[u];N.splice(N.indexOf(v),1),N.length===0&&delete this.sessions[u]}else{let N=new Error("Session closed without receiving a SETTINGS frame");N.code="HTTP2WRAPPER_NOSETTINGS";for(let{reject:U}of o)U(N);p()}this._tryToCreateNewSession(u,A)});let R=()=>{if(!(!(u in this.queue)||!x())){for(let N of v[Kl])if(N in this.queue[u]){let{listeners:U}=this.queue[u][N];for(;U.length!==0&&x();)U.shift().resolve(v);let V=this.queue[u];if(V[N].listeners.length===0&&(delete V[N],Object.keys(V).length===0)){delete this.queue[u];break}if(!x())break}}};v.on("origin",()=>{v[Kl]=v.originSet,x()&&(R(),KM(this.sessions[u],v))}),v.once("remoteSettings",()=>{if(v.ref(),v.unref(),this._sessionsCount++,h.destroyed){let N=new Error("Agent has been destroyed");for(let U of o)U.reject(N);v.destroy();return}v[Kl]=v.originSet;{let N=this.sessions;if(u in N){let U=N[u];U.splice($nt(U,v,eit),0,v)}else N[u]=[v]}this._freeSessionsCount+=1,I=!0,this.emit("session",v),R(),p(),v[ea]===0&&this._freeSessionsCount>this.maxFreeSessions&&v.close(),o.length!==0&&(this.getSession(A,r,o),o.length=0),v.on("remoteSettings",()=>{R(),KM(this.sessions[u],v)})}),v[joe]=v.request,v.request=(N,U)=>{if(v[DE])throw new Error("The session is gracefully closing. No new streams are allowed.");let V=v[joe](N,U);return v.ref(),++v[ea],v[ea]===v.remoteSettings.maxConcurrentStreams&&this._freeSessionsCount--,V.once("close",()=>{if(C=x(),--v[ea],!v.destroyed&&!v.closed&&(tit(this.sessions[u],v),x()&&!v.closed)){C||(this._freeSessionsCount++,C=!0);let te=v[ea]===0;te&&v.unref(),te&&(this._freeSessionsCount>this.maxFreeSessions||v[DE])?v.close():(KM(this.sessions[u],v),R())}}),V}}catch(v){for(let x of o)x.reject(v);p()}};h.listeners=o,h.completed=!1,h.destroyed=!1,this.queue[u][A]=h,this._tryToCreateNewSession(u,A)})}request(e,r,o,a){return new Promise((n,u)=>{this.getSession(e,r,[{reject:u,resolve:A=>{try{n(A.request(o,a))}catch(p){u(p)}}}])})}createConnection(e,r){return rA.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let o=e.port||443,a=e.hostname||e.host;return typeof r.servername>"u"&&(r.servername=a),Vnt.connect(o,a,r)}closeFreeSessions(){for(let e of Object.values(this.sessions))for(let r of e)r[ea]===0&&r.close()}destroy(e){for(let r of Object.values(this.sessions))for(let o of r)o.destroy(e);for(let r of Object.values(this.queue))for(let o of Object.values(r))o.destroyed=!0;this.queue={}}get freeSessions(){return Yoe({agent:this,isFree:!0})}get busySessions(){return Yoe({agent:this,isFree:!1})}};rA.kCurrentStreamsCount=ea;rA.kGracefullyClosing=DE;Koe.exports={Agent:rA,globalAgent:new rA}});var JM=_((TNt,zoe)=>{"use strict";var{Readable:rit}=ve("stream"),VM=class extends rit{constructor(e,r){super({highWaterMark:r,autoDestroy:!1}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this.connection=e,this._dumped=!1}_destroy(e){this.req._request.destroy(e)}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume())}_read(){this.req&&this.req._request.resume()}};zoe.exports=VM});var XM=_((LNt,Voe)=>{"use strict";Voe.exports=t=>{let e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return typeof t.port=="string"&&t.port.length!==0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var Xoe=_((NNt,Joe)=>{"use strict";Joe.exports=(t,e,r)=>{for(let o of r)t.on(o,(...a)=>e.emit(o,...a))}});var $oe=_((ONt,Zoe)=>{"use strict";Zoe.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return!0;default:return!1}}});var tae=_((UNt,eae)=>{"use strict";var PE=(t,e,r)=>{eae.exports[e]=class extends t{constructor(...a){super(typeof r=="string"?r:r(a)),this.name=`${super.name} [${e}]`,this.code=e}}};PE(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],o=Array.isArray(r);return o&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${o?"one of":"of"} type ${r}. Received ${typeof t[2]}`});PE(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);PE(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);PE(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);PE(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);PE(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`)});var r4=_((_Nt,lae)=>{"use strict";var nit=ve("http2"),{Writable:iit}=ve("stream"),{Agent:rae,globalAgent:sit}=zM(),oit=JM(),ait=XM(),lit=Xoe(),cit=$oe(),{ERR_INVALID_ARG_TYPE:ZM,ERR_INVALID_PROTOCOL:uit,ERR_HTTP_HEADERS_SENT:nae,ERR_INVALID_HTTP_TOKEN:Ait,ERR_HTTP_INVALID_HEADER_VALUE:fit,ERR_INVALID_CHAR:pit}=tae(),{HTTP2_HEADER_STATUS:iae,HTTP2_HEADER_METHOD:sae,HTTP2_HEADER_PATH:oae,HTTP2_METHOD_CONNECT:hit}=nit.constants,Qo=Symbol("headers"),$M=Symbol("origin"),e4=Symbol("session"),aae=Symbol("options"),rb=Symbol("flushedHeaders"),h1=Symbol("jobs"),git=/^[\^`\-\w!#$%&*+.|~]+$/,dit=/[^\t\u0020-\u007E\u0080-\u00FF]/,t4=class extends iit{constructor(e,r,o){super({autoDestroy:!1});let a=typeof e=="string"||e instanceof URL;if(a&&(e=ait(e instanceof URL?e:new URL(e))),typeof r=="function"||r===void 0?(o=r,r=a?e:{...e}):r={...e,...r},r.h2session)this[e4]=r.h2session;else if(r.agent===!1)this.agent=new rae({maxFreeSessions:0});else if(typeof r.agent>"u"||r.agent===null)typeof r.createConnection=="function"?(this.agent=new rae({maxFreeSessions:0}),this.agent.createConnection=r.createConnection):this.agent=sit;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new ZM("options.agent",["Agent-like Object","undefined","false"],r.agent);if(r.protocol&&r.protocol!=="https:")throw new uit(r.protocol,"https:");let n=r.port||r.defaultPort||this.agent&&this.agent.defaultPort||443,u=r.hostname||r.host||"localhost";delete r.hostname,delete r.host,delete r.port;let{timeout:A}=r;if(r.timeout=void 0,this[Qo]=Object.create(null),this[h1]=[],this.socket=null,this.connection=null,this.method=r.method||"GET",this.path=r.path,this.res=null,this.aborted=!1,this.reusedSocket=!1,r.headers)for(let[p,h]of Object.entries(r.headers))this.setHeader(p,h);r.auth&&!("authorization"in this[Qo])&&(this[Qo].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[aae]=r,n===443?(this[$M]=`https://${u}`,":authority"in this[Qo]||(this[Qo][":authority"]=u)):(this[$M]=`https://${u}:${n}`,":authority"in this[Qo]||(this[Qo][":authority"]=`${u}:${n}`)),A&&this.setTimeout(A),o&&this.once("response",o),this[rb]=!1}get method(){return this[Qo][sae]}set method(e){e&&(this[Qo][sae]=e.toUpperCase())}get path(){return this[Qo][oae]}set path(e){e&&(this[Qo][oae]=e)}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,o){if(this._mustNotHaveABody){o(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let a=()=>this._request.write(e,r,o);this._request?a():this[h1].push(a)}_final(e){if(this.destroyed)return;this.flushHeaders();let r=()=>{if(this._mustNotHaveABody){e();return}this._request.end(e)};this._request?r():this[h1].push(r)}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy())}_destroy(e,r){this.res&&this.res._dump(),this._request&&this._request.destroy(),r(e)}async flushHeaders(){if(this[rb]||this.destroyed)return;this[rb]=!0;let e=this.method===hit,r=o=>{if(this._request=o,this.destroyed){o.destroy();return}e||lit(o,this,["timeout","continue","close","error"]);let a=u=>(...A)=>{!this.writable&&!this.destroyed?u(...A):this.once("finish",()=>{u(...A)})};o.once("response",a((u,A,p)=>{let h=new oit(this.socket,o.readableHighWaterMark);this.res=h,h.req=this,h.statusCode=u[iae],h.headers=u,h.rawHeaders=p,h.once("end",()=>{this.aborted?(h.aborted=!0,h.emit("aborted")):(h.complete=!0,h.socket=null,h.connection=null)}),e?(h.upgrade=!0,this.emit("connect",h,o,Buffer.alloc(0))?this.emit("close"):o.destroy()):(o.on("data",E=>{!h._dumped&&!h.push(E)&&o.pause()}),o.once("end",()=>{h.push(null)}),this.emit("response",h)||h._dump())})),o.once("headers",a(u=>this.emit("information",{statusCode:u[iae]}))),o.once("trailers",a((u,A,p)=>{let{res:h}=this;h.trailers=u,h.rawTrailers=p}));let{socket:n}=o.session;this.socket=n,this.connection=n;for(let u of this[h1])u();this.emit("socket",this.socket)};if(this[e4])try{r(this[e4].request(this[Qo]))}catch(o){this.emit("error",o)}else{this.reusedSocket=!0;try{r(await this.agent.request(this[$M],this[aae],this[Qo]))}catch(o){this.emit("error",o)}}}getHeader(e){if(typeof e!="string")throw new ZM("name","string",e);return this[Qo][e.toLowerCase()]}get headersSent(){return this[rb]}removeHeader(e){if(typeof e!="string")throw new ZM("name","string",e);if(this.headersSent)throw new nae("remove");delete this[Qo][e.toLowerCase()]}setHeader(e,r){if(this.headersSent)throw new nae("set");if(typeof e!="string"||!git.test(e)&&!cit(e))throw new Ait("Header name",e);if(typeof r>"u")throw new fit(r,e);if(dit.test(r))throw new pit("header content",e);this[Qo][e.toLowerCase()]=r}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let o=()=>this._request.setTimeout(e,r);return this._request?o():this[h1].push(o),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};lae.exports=t4});var uae=_((HNt,cae)=>{"use strict";var mit=ve("tls");cae.exports=(t={},e=mit.connect)=>new Promise((r,o)=>{let a=!1,n,u=async()=>{await p,n.off("timeout",A),n.off("error",o),t.resolveSocket?(r({alpnProtocol:n.alpnProtocol,socket:n,timeout:a}),a&&(await Promise.resolve(),n.emit("timeout"))):(n.destroy(),r({alpnProtocol:n.alpnProtocol,timeout:a}))},A=async()=>{a=!0,u()},p=(async()=>{try{n=await e(t,u),n.on("error",o),n.once("timeout",A)}catch(h){o(h)}})()})});var fae=_((qNt,Aae)=>{"use strict";var yit=ve("net");Aae.exports=t=>{let e=t.host,r=t.headers&&t.headers.host;return r&&(r.startsWith("[")?r.indexOf("]")===-1?e=r:e=r.slice(1,-1):e=r.split(":",1)[0]),yit.isIP(e)?"":e}});var gae=_((GNt,i4)=>{"use strict";var pae=ve("http"),n4=ve("https"),Eit=uae(),Cit=WM(),wit=r4(),Iit=fae(),Bit=XM(),nb=new Cit({maxSize:100}),g1=new Map,hae=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let o=()=>{t.emit("free",e,r)};e.on("free",o);let a=()=>{t.removeSocket(e,r)};e.on("close",a);let n=()=>{t.removeSocket(e,r),e.off("close",a),e.off("free",o),e.off("agentRemove",n)};e.on("agentRemove",n),t.emit("free",e,r)},vit=async t=>{let e=`${t.host}:${t.port}:${t.ALPNProtocols.sort()}`;if(!nb.has(e)){if(g1.has(e))return(await g1.get(e)).alpnProtocol;let{path:r,agent:o}=t;t.path=t.socketPath;let a=Eit(t);g1.set(e,a);try{let{socket:n,alpnProtocol:u}=await a;if(nb.set(e,u),t.path=r,u==="h2")n.destroy();else{let{globalAgent:A}=n4,p=n4.Agent.prototype.createConnection;o?o.createConnection===p?hae(o,n,t):n.destroy():A.createConnection===p?hae(A,n,t):n.destroy()}return g1.delete(e),u}catch(n){throw g1.delete(e),n}}return nb.get(e)};i4.exports=async(t,e,r)=>{if((typeof t=="string"||t instanceof URL)&&(t=Bit(new URL(t))),typeof e=="function"&&(r=e,e=void 0),e={ALPNProtocols:["h2","http/1.1"],...t,...e,resolveSocket:!0},!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let o=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||Iit(e),e.port=e.port||(o?443:80),e._defaultAgent=o?n4.globalAgent:pae.globalAgent;let a=e.agent;if(a){if(a.addRequest)throw new Error("The `options.agent` object can contain only `http`, `https` or `http2` properties");e.agent=a[o?"https":"http"]}return o&&await vit(e)==="h2"?(a&&(e.agent=a.http2),new wit(e,r)):pae.request(e,r)};i4.exports.protocolCache=nb});var mae=_((jNt,dae)=>{"use strict";var Dit=ve("http2"),Pit=zM(),s4=r4(),Sit=JM(),bit=gae(),xit=(t,e,r)=>new s4(t,e,r),kit=(t,e,r)=>{let o=new s4(t,e,r);return o.end(),o};dae.exports={...Dit,ClientRequest:s4,IncomingMessage:Sit,...Pit,request:xit,get:kit,auto:bit}});var a4=_(o4=>{"use strict";Object.defineProperty(o4,"__esModule",{value:!0});var yae=Tf();o4.default=t=>yae.default.nodeStream(t)&&yae.default.function_(t.getBoundary)});var Iae=_(l4=>{"use strict";Object.defineProperty(l4,"__esModule",{value:!0});var Cae=ve("fs"),wae=ve("util"),Eae=Tf(),Qit=a4(),Fit=wae.promisify(Cae.stat);l4.default=async(t,e)=>{if(e&&"content-length"in e)return Number(e["content-length"]);if(!t)return 0;if(Eae.default.string(t))return Buffer.byteLength(t);if(Eae.default.buffer(t))return t.length;if(Qit.default(t))return wae.promisify(t.getLength.bind(t))();if(t instanceof Cae.ReadStream){let{size:r}=await Fit(t.path);return r===0?void 0:r}}});var u4=_(c4=>{"use strict";Object.defineProperty(c4,"__esModule",{value:!0});function Rit(t,e,r){let o={};for(let a of r)o[a]=(...n)=>{e.emit(a,...n)},t.on(a,o[a]);return()=>{for(let a of r)t.off(a,o[a])}}c4.default=Rit});var Bae=_(A4=>{"use strict";Object.defineProperty(A4,"__esModule",{value:!0});A4.default=()=>{let t=[];return{once(e,r,o){e.once(r,o),t.push({origin:e,event:r,fn:o})},unhandleAll(){for(let e of t){let{origin:r,event:o,fn:a}=e;r.removeListener(o,a)}t.length=0}}}});var Dae=_(d1=>{"use strict";Object.defineProperty(d1,"__esModule",{value:!0});d1.TimeoutError=void 0;var Tit=ve("net"),Lit=Bae(),vae=Symbol("reentry"),Nit=()=>{},ib=class extends Error{constructor(e,r){super(`Timeout awaiting '${r}' for ${e}ms`),this.event=r,this.name="TimeoutError",this.code="ETIMEDOUT"}};d1.TimeoutError=ib;d1.default=(t,e,r)=>{if(vae in t)return Nit;t[vae]=!0;let o=[],{once:a,unhandleAll:n}=Lit.default(),u=(I,v,x)=>{var C;let R=setTimeout(v,I,I,x);(C=R.unref)===null||C===void 0||C.call(R);let N=()=>{clearTimeout(R)};return o.push(N),N},{host:A,hostname:p}=r,h=(I,v)=>{t.destroy(new ib(I,v))},E=()=>{for(let I of o)I();n()};if(t.once("error",I=>{if(E(),t.listenerCount("error")===0)throw I}),t.once("close",E),a(t,"response",I=>{a(I,"end",E)}),typeof e.request<"u"&&u(e.request,h,"request"),typeof e.socket<"u"){let I=()=>{h(e.socket,"socket")};t.setTimeout(e.socket,I),o.push(()=>{t.removeListener("timeout",I)})}return a(t,"socket",I=>{var v;let{socketPath:x}=t;if(I.connecting){let C=Boolean(x??Tit.isIP((v=p??A)!==null&&v!==void 0?v:"")!==0);if(typeof e.lookup<"u"&&!C&&typeof I.address().address>"u"){let R=u(e.lookup,h,"lookup");a(I,"lookup",R)}if(typeof e.connect<"u"){let R=()=>u(e.connect,h,"connect");C?a(I,"connect",R()):a(I,"lookup",N=>{N===null&&a(I,"connect",R())})}typeof e.secureConnect<"u"&&r.protocol==="https:"&&a(I,"connect",()=>{let R=u(e.secureConnect,h,"secureConnect");a(I,"secureConnect",R)})}if(typeof e.send<"u"){let C=()=>u(e.send,h,"send");I.connecting?a(I,"connect",()=>{a(t,"upload-complete",C())}):a(t,"upload-complete",C())}}),typeof e.response<"u"&&a(t,"upload-complete",()=>{let I=u(e.response,h,"response");a(t,"response",I)}),E}});var Sae=_(f4=>{"use strict";Object.defineProperty(f4,"__esModule",{value:!0});var Pae=Tf();f4.default=t=>{t=t;let e={protocol:t.protocol,hostname:Pae.default.string(t.hostname)&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,host:t.host,hash:t.hash,search:t.search,pathname:t.pathname,href:t.href,path:`${t.pathname||""}${t.search||""}`};return Pae.default.string(t.port)&&t.port.length>0&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=`${t.username||""}:${t.password||""}`),e}});var bae=_(p4=>{"use strict";Object.defineProperty(p4,"__esModule",{value:!0});var Oit=ve("url"),Mit=["protocol","host","hostname","port","pathname","search"];p4.default=(t,e)=>{var r,o;if(e.path){if(e.pathname)throw new TypeError("Parameters `path` and `pathname` are mutually exclusive.");if(e.search)throw new TypeError("Parameters `path` and `search` are mutually exclusive.");if(e.searchParams)throw new TypeError("Parameters `path` and `searchParams` are mutually exclusive.")}if(e.search&&e.searchParams)throw new TypeError("Parameters `search` and `searchParams` are mutually exclusive.");if(!t){if(!e.protocol)throw new TypeError("No URL protocol specified");t=`${e.protocol}//${(o=(r=e.hostname)!==null&&r!==void 0?r:e.host)!==null&&o!==void 0?o:""}`}let a=new Oit.URL(t);if(e.path){let n=e.path.indexOf("?");n===-1?e.pathname=e.path:(e.pathname=e.path.slice(0,n),e.search=e.path.slice(n+1)),delete e.path}for(let n of Mit)e[n]&&(a[n]=e[n].toString());return a}});var xae=_(g4=>{"use strict";Object.defineProperty(g4,"__esModule",{value:!0});var h4=class{constructor(){this.weakMap=new WeakMap,this.map=new Map}set(e,r){typeof e=="object"?this.weakMap.set(e,r):this.map.set(e,r)}get(e){return typeof e=="object"?this.weakMap.get(e):this.map.get(e)}has(e){return typeof e=="object"?this.weakMap.has(e):this.map.has(e)}};g4.default=h4});var m4=_(d4=>{"use strict";Object.defineProperty(d4,"__esModule",{value:!0});var Uit=async t=>{let e=[],r=0;for await(let o of t)e.push(o),r+=Buffer.byteLength(o);return Buffer.isBuffer(e[0])?Buffer.concat(e,r):Buffer.from(e.join(""))};d4.default=Uit});var Qae=_(bd=>{"use strict";Object.defineProperty(bd,"__esModule",{value:!0});bd.dnsLookupIpVersionToFamily=bd.isDnsLookupIpVersion=void 0;var kae={auto:0,ipv4:4,ipv6:6};bd.isDnsLookupIpVersion=t=>t in kae;bd.dnsLookupIpVersionToFamily=t=>{if(bd.isDnsLookupIpVersion(t))return kae[t];throw new Error("Invalid DNS lookup IP version")}});var y4=_(sb=>{"use strict";Object.defineProperty(sb,"__esModule",{value:!0});sb.isResponseOk=void 0;sb.isResponseOk=t=>{let{statusCode:e}=t,r=t.request.options.followRedirect?299:399;return e>=200&&e<=r||e===304}});var Rae=_(E4=>{"use strict";Object.defineProperty(E4,"__esModule",{value:!0});var Fae=new Set;E4.default=t=>{Fae.has(t)||(Fae.add(t),process.emitWarning(`Got: ${t}`,{type:"DeprecationWarning"}))}});var Tae=_(C4=>{"use strict";Object.defineProperty(C4,"__esModule",{value:!0});var Ai=Tf(),_it=(t,e)=>{if(Ai.default.null_(t.encoding))throw new TypeError("To get a Buffer, set `options.responseType` to `buffer` instead");Ai.assert.any([Ai.default.string,Ai.default.undefined],t.encoding),Ai.assert.any([Ai.default.boolean,Ai.default.undefined],t.resolveBodyOnly),Ai.assert.any([Ai.default.boolean,Ai.default.undefined],t.methodRewriting),Ai.assert.any([Ai.default.boolean,Ai.default.undefined],t.isStream),Ai.assert.any([Ai.default.string,Ai.default.undefined],t.responseType),t.responseType===void 0&&(t.responseType="text");let{retry:r}=t;if(e?t.retry={...e.retry}:t.retry={calculateDelay:o=>o.computedValue,limit:0,methods:[],statusCodes:[],errorCodes:[],maxRetryAfter:void 0},Ai.default.object(r)?(t.retry={...t.retry,...r},t.retry.methods=[...new Set(t.retry.methods.map(o=>o.toUpperCase()))],t.retry.statusCodes=[...new Set(t.retry.statusCodes)],t.retry.errorCodes=[...new Set(t.retry.errorCodes)]):Ai.default.number(r)&&(t.retry.limit=r),Ai.default.undefined(t.retry.maxRetryAfter)&&(t.retry.maxRetryAfter=Math.min(...[t.timeout.request,t.timeout.connect].filter(Ai.default.number))),Ai.default.object(t.pagination)){e&&(t.pagination={...e.pagination,...t.pagination});let{pagination:o}=t;if(!Ai.default.function_(o.transform))throw new Error("`options.pagination.transform` must be implemented");if(!Ai.default.function_(o.shouldContinue))throw new Error("`options.pagination.shouldContinue` must be implemented");if(!Ai.default.function_(o.filter))throw new TypeError("`options.pagination.filter` must be implemented");if(!Ai.default.function_(o.paginate))throw new Error("`options.pagination.paginate` must be implemented")}return t.responseType==="json"&&t.headers.accept===void 0&&(t.headers.accept="application/json"),t};C4.default=_it});var Lae=_(m1=>{"use strict";Object.defineProperty(m1,"__esModule",{value:!0});m1.retryAfterStatusCodes=void 0;m1.retryAfterStatusCodes=new Set([413,429,503]);var Hit=({attemptCount:t,retryOptions:e,error:r,retryAfter:o})=>{if(t>e.limit)return 0;let a=e.methods.includes(r.options.method),n=e.errorCodes.includes(r.code),u=r.response&&e.statusCodes.includes(r.response.statusCode);if(!a||!n&&!u)return 0;if(r.response){if(o)return e.maxRetryAfter===void 0||o>e.maxRetryAfter?0:o;if(r.response.statusCode===413)return 0}let A=Math.random()*100;return 2**(t-1)*1e3+A};m1.default=Hit});var C1=_(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.UnsupportedProtocolError=Bn.ReadError=Bn.TimeoutError=Bn.UploadError=Bn.CacheError=Bn.HTTPError=Bn.MaxRedirectsError=Bn.RequestError=Bn.setNonEnumerableProperties=Bn.knownHookEvents=Bn.withoutBody=Bn.kIsNormalizedAlready=void 0;var Nae=ve("util"),Oae=ve("stream"),qit=ve("fs"),lh=ve("url"),Mae=ve("http"),w4=ve("http"),Git=ve("https"),jit=Zse(),Yit=soe(),Uae=Moe(),Wit=qoe(),Kit=mae(),zit=eb(),st=Tf(),Vit=Iae(),_ae=a4(),Jit=u4(),Hae=Dae(),Xit=Sae(),qae=bae(),Zit=xae(),$it=m4(),Gae=Qae(),est=y4(),ch=Rae(),tst=Tae(),rst=Lae(),I4,Zs=Symbol("request"),lb=Symbol("response"),SE=Symbol("responseSize"),bE=Symbol("downloadedSize"),xE=Symbol("bodySize"),kE=Symbol("uploadedSize"),ob=Symbol("serverResponsesPiped"),jae=Symbol("unproxyEvents"),Yae=Symbol("isFromCache"),B4=Symbol("cancelTimeouts"),Wae=Symbol("startedReading"),QE=Symbol("stopReading"),ab=Symbol("triggerRead"),uh=Symbol("body"),y1=Symbol("jobs"),Kae=Symbol("originalResponse"),zae=Symbol("retryTimeout");Bn.kIsNormalizedAlready=Symbol("isNormalizedAlready");var nst=st.default.string(process.versions.brotli);Bn.withoutBody=new Set(["GET","HEAD"]);Bn.knownHookEvents=["init","beforeRequest","beforeRedirect","beforeError","beforeRetry","afterResponse"];function ist(t){for(let e in t){let r=t[e];if(!st.default.string(r)&&!st.default.number(r)&&!st.default.boolean(r)&&!st.default.null_(r)&&!st.default.undefined(r))throw new TypeError(`The \`searchParams\` value '${String(r)}' must be a string, number, boolean or null`)}}function sst(t){return st.default.object(t)&&!("statusCode"in t)}var v4=new Zit.default,ost=async t=>new Promise((e,r)=>{let o=a=>{r(a)};t.pending||e(),t.once("error",o),t.once("ready",()=>{t.off("error",o),e()})}),ast=new Set([300,301,302,303,304,307,308]),lst=["context","body","json","form"];Bn.setNonEnumerableProperties=(t,e)=>{let r={};for(let o of t)if(!!o)for(let a of lst)a in o&&(r[a]={writable:!0,configurable:!0,enumerable:!1,value:o[a]});Object.defineProperties(e,r)};var zi=class extends Error{constructor(e,r,o){var a;if(super(e),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=r.code,o instanceof db?(Object.defineProperty(this,"request",{enumerable:!1,value:o}),Object.defineProperty(this,"response",{enumerable:!1,value:o[lb]}),Object.defineProperty(this,"options",{enumerable:!1,value:o.options})):Object.defineProperty(this,"options",{enumerable:!1,value:o}),this.timings=(a=this.request)===null||a===void 0?void 0:a.timings,st.default.string(r.stack)&&st.default.string(this.stack)){let n=this.stack.indexOf(this.message)+this.message.length,u=this.stack.slice(n).split(` `).reverse(),A=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(` `).reverse();for(;A.length!==0&&A[0]===u[0];)u.shift();this.stack=`${this.stack.slice(0,n)}${u.reverse().join(` `)}${A.reverse().join(` `)}`}}};Bn.RequestError=zi;var ub=class extends zi{constructor(e){super(`Redirected ${e.options.maxRedirects} times. Aborting.`,{},e),this.name="MaxRedirectsError"}};Bn.MaxRedirectsError=ub;var Ab=class extends zi{constructor(e){super(`Response code ${e.statusCode} (${e.statusMessage})`,{},e.request),this.name="HTTPError"}};Bn.HTTPError=Ab;var fb=class extends zi{constructor(e,r){super(e.message,e,r),this.name="CacheError"}};Bn.CacheError=fb;var pb=class extends zi{constructor(e,r){super(e.message,e,r),this.name="UploadError"}};Bn.UploadError=pb;var hb=class extends zi{constructor(e,r,o){super(e.message,e,o),this.name="TimeoutError",this.event=e.event,this.timings=r}};Bn.TimeoutError=hb;var E1=class extends zi{constructor(e,r){super(e.message,e,r),this.name="ReadError"}};Bn.ReadError=E1;var gb=class extends zi{constructor(e){super(`Unsupported protocol "${e.url.protocol}"`,{},e),this.name="UnsupportedProtocolError"}};Bn.UnsupportedProtocolError=gb;var cst=["socket","connect","continue","information","upgrade","timeout"],db=class extends Oae.Duplex{constructor(e,r={},o){super({autoDestroy:!1,highWaterMark:0}),this[bE]=0,this[kE]=0,this.requestInitialized=!1,this[ob]=new Set,this.redirects=[],this[QE]=!1,this[ab]=!1,this[y1]=[],this.retryCount=0,this._progressCallbacks=[];let a=()=>this._unlockWrite(),n=()=>this._lockWrite();this.on("pipe",h=>{h.prependListener("data",a),h.on("data",n),h.prependListener("end",a),h.on("end",n)}),this.on("unpipe",h=>{h.off("data",a),h.off("data",n),h.off("end",a),h.off("end",n)}),this.on("pipe",h=>{h instanceof w4.IncomingMessage&&(this.options.headers={...h.headers,...this.options.headers})});let{json:u,body:A,form:p}=r;if((u||A||p)&&this._lockWrite(),Bn.kIsNormalizedAlready in r)this.options=r;else try{this.options=this.constructor.normalizeArguments(e,r,o)}catch(h){st.default.nodeStream(r.body)&&r.body.destroy(),this.destroy(h);return}(async()=>{var h;try{this.options.body instanceof qit.ReadStream&&await ost(this.options.body);let{url:E}=this.options;if(!E)throw new TypeError("Missing `url` property");if(this.requestUrl=E.toString(),decodeURI(this.requestUrl),await this._finalizeBody(),await this._makeRequest(),this.destroyed){(h=this[Zs])===null||h===void 0||h.destroy();return}for(let I of this[y1])I();this[y1].length=0,this.requestInitialized=!0}catch(E){if(E instanceof zi){this._beforeError(E);return}this.destroyed||this.destroy(E)}})()}static normalizeArguments(e,r,o){var a,n,u,A,p;let h=r;if(st.default.object(e)&&!st.default.urlInstance(e))r={...o,...e,...r};else{if(e&&r&&r.url!==void 0)throw new TypeError("The `url` option is mutually exclusive with the `input` argument");r={...o,...r},e!==void 0&&(r.url=e),st.default.urlInstance(r.url)&&(r.url=new lh.URL(r.url.toString()))}if(r.cache===!1&&(r.cache=void 0),r.dnsCache===!1&&(r.dnsCache=void 0),st.assert.any([st.default.string,st.default.undefined],r.method),st.assert.any([st.default.object,st.default.undefined],r.headers),st.assert.any([st.default.string,st.default.urlInstance,st.default.undefined],r.prefixUrl),st.assert.any([st.default.object,st.default.undefined],r.cookieJar),st.assert.any([st.default.object,st.default.string,st.default.undefined],r.searchParams),st.assert.any([st.default.object,st.default.string,st.default.undefined],r.cache),st.assert.any([st.default.object,st.default.number,st.default.undefined],r.timeout),st.assert.any([st.default.object,st.default.undefined],r.context),st.assert.any([st.default.object,st.default.undefined],r.hooks),st.assert.any([st.default.boolean,st.default.undefined],r.decompress),st.assert.any([st.default.boolean,st.default.undefined],r.ignoreInvalidCookies),st.assert.any([st.default.boolean,st.default.undefined],r.followRedirect),st.assert.any([st.default.number,st.default.undefined],r.maxRedirects),st.assert.any([st.default.boolean,st.default.undefined],r.throwHttpErrors),st.assert.any([st.default.boolean,st.default.undefined],r.http2),st.assert.any([st.default.boolean,st.default.undefined],r.allowGetBody),st.assert.any([st.default.string,st.default.undefined],r.localAddress),st.assert.any([Gae.isDnsLookupIpVersion,st.default.undefined],r.dnsLookupIpVersion),st.assert.any([st.default.object,st.default.undefined],r.https),st.assert.any([st.default.boolean,st.default.undefined],r.rejectUnauthorized),r.https&&(st.assert.any([st.default.boolean,st.default.undefined],r.https.rejectUnauthorized),st.assert.any([st.default.function_,st.default.undefined],r.https.checkServerIdentity),st.assert.any([st.default.string,st.default.object,st.default.array,st.default.undefined],r.https.certificateAuthority),st.assert.any([st.default.string,st.default.object,st.default.array,st.default.undefined],r.https.key),st.assert.any([st.default.string,st.default.object,st.default.array,st.default.undefined],r.https.certificate),st.assert.any([st.default.string,st.default.undefined],r.https.passphrase),st.assert.any([st.default.string,st.default.buffer,st.default.array,st.default.undefined],r.https.pfx)),st.assert.any([st.default.object,st.default.undefined],r.cacheOptions),st.default.string(r.method)?r.method=r.method.toUpperCase():r.method="GET",r.headers===o?.headers?r.headers={...r.headers}:r.headers=zit({...o?.headers,...r.headers}),"slashes"in r)throw new TypeError("The legacy `url.Url` has been deprecated. Use `URL` instead.");if("auth"in r)throw new TypeError("Parameter `auth` is deprecated. Use `username` / `password` instead.");if("searchParams"in r&&r.searchParams&&r.searchParams!==o?.searchParams){let x;if(st.default.string(r.searchParams)||r.searchParams instanceof lh.URLSearchParams)x=new lh.URLSearchParams(r.searchParams);else{ist(r.searchParams),x=new lh.URLSearchParams;for(let C in r.searchParams){let R=r.searchParams[C];R===null?x.append(C,""):R!==void 0&&x.append(C,R)}}(a=o?.searchParams)===null||a===void 0||a.forEach((C,R)=>{x.has(R)||x.append(R,C)}),r.searchParams=x}if(r.username=(n=r.username)!==null&&n!==void 0?n:"",r.password=(u=r.password)!==null&&u!==void 0?u:"",st.default.undefined(r.prefixUrl)?r.prefixUrl=(A=o?.prefixUrl)!==null&&A!==void 0?A:"":(r.prefixUrl=r.prefixUrl.toString(),r.prefixUrl!==""&&!r.prefixUrl.endsWith("/")&&(r.prefixUrl+="/")),st.default.string(r.url)){if(r.url.startsWith("/"))throw new Error("`input` must not start with a slash when using `prefixUrl`");r.url=qae.default(r.prefixUrl+r.url,r)}else(st.default.undefined(r.url)&&r.prefixUrl!==""||r.protocol)&&(r.url=qae.default(r.prefixUrl,r));if(r.url){"port"in r&&delete r.port;let{prefixUrl:x}=r;Object.defineProperty(r,"prefixUrl",{set:R=>{let N=r.url;if(!N.href.startsWith(R))throw new Error(`Cannot change \`prefixUrl\` from ${x} to ${R}: ${N.href}`);r.url=new lh.URL(R+N.href.slice(x.length)),x=R},get:()=>x});let{protocol:C}=r.url;if(C==="unix:"&&(C="http:",r.url=new lh.URL(`http://unix${r.url.pathname}${r.url.search}`)),r.searchParams&&(r.url.search=r.searchParams.toString()),C!=="http:"&&C!=="https:")throw new gb(r);r.username===""?r.username=r.url.username:r.url.username=r.username,r.password===""?r.password=r.url.password:r.url.password=r.password}let{cookieJar:E}=r;if(E){let{setCookie:x,getCookieString:C}=E;st.assert.function_(x),st.assert.function_(C),x.length===4&&C.length===0&&(x=Nae.promisify(x.bind(r.cookieJar)),C=Nae.promisify(C.bind(r.cookieJar)),r.cookieJar={setCookie:x,getCookieString:C})}let{cache:I}=r;if(I&&(v4.has(I)||v4.set(I,new Uae((x,C)=>{let R=x[Zs](x,C);return st.default.promise(R)&&(R.once=(N,U)=>{if(N==="error")R.catch(U);else if(N==="abort")(async()=>{try{(await R).once("abort",U)}catch{}})();else throw new Error(`Unknown HTTP2 promise event: ${N}`);return R}),R},I))),r.cacheOptions={...r.cacheOptions},r.dnsCache===!0)I4||(I4=new Yit.default),r.dnsCache=I4;else if(!st.default.undefined(r.dnsCache)&&!r.dnsCache.lookup)throw new TypeError(`Parameter \`dnsCache\` must be a CacheableLookup instance or a boolean, got ${st.default(r.dnsCache)}`);st.default.number(r.timeout)?r.timeout={request:r.timeout}:o&&r.timeout!==o.timeout?r.timeout={...o.timeout,...r.timeout}:r.timeout={...r.timeout},r.context||(r.context={});let v=r.hooks===o?.hooks;r.hooks={...r.hooks};for(let x of Bn.knownHookEvents)if(x in r.hooks)if(st.default.array(r.hooks[x]))r.hooks[x]=[...r.hooks[x]];else throw new TypeError(`Parameter \`${x}\` must be an Array, got ${st.default(r.hooks[x])}`);else r.hooks[x]=[];if(o&&!v)for(let x of Bn.knownHookEvents)o.hooks[x].length>0&&(r.hooks[x]=[...o.hooks[x],...r.hooks[x]]);if("family"in r&&ch.default('"options.family" was never documented, please use "options.dnsLookupIpVersion"'),o?.https&&(r.https={...o.https,...r.https}),"rejectUnauthorized"in r&&ch.default('"options.rejectUnauthorized" is now deprecated, please use "options.https.rejectUnauthorized"'),"checkServerIdentity"in r&&ch.default('"options.checkServerIdentity" was never documented, please use "options.https.checkServerIdentity"'),"ca"in r&&ch.default('"options.ca" was never documented, please use "options.https.certificateAuthority"'),"key"in r&&ch.default('"options.key" was never documented, please use "options.https.key"'),"cert"in r&&ch.default('"options.cert" was never documented, please use "options.https.certificate"'),"passphrase"in r&&ch.default('"options.passphrase" was never documented, please use "options.https.passphrase"'),"pfx"in r&&ch.default('"options.pfx" was never documented, please use "options.https.pfx"'),"followRedirects"in r)throw new TypeError("The `followRedirects` option does not exist. Use `followRedirect` instead.");if(r.agent){for(let x in r.agent)if(x!=="http"&&x!=="https"&&x!=="http2")throw new TypeError(`Expected the \`options.agent\` properties to be \`http\`, \`https\` or \`http2\`, got \`${x}\``)}return r.maxRedirects=(p=r.maxRedirects)!==null&&p!==void 0?p:0,Bn.setNonEnumerableProperties([o,h],r),tst.default(r,o)}_lockWrite(){let e=()=>{throw new TypeError("The payload has been already provided")};this.write=e,this.end=e}_unlockWrite(){this.write=super.write,this.end=super.end}async _finalizeBody(){let{options:e}=this,{headers:r}=e,o=!st.default.undefined(e.form),a=!st.default.undefined(e.json),n=!st.default.undefined(e.body),u=o||a||n,A=Bn.withoutBody.has(e.method)&&!(e.method==="GET"&&e.allowGetBody);if(this._cannotHaveBody=A,u){if(A)throw new TypeError(`The \`${e.method}\` method cannot be used with a body`);if([n,o,a].filter(p=>p).length>1)throw new TypeError("The `body`, `json` and `form` options are mutually exclusive");if(n&&!(e.body instanceof Oae.Readable)&&!st.default.string(e.body)&&!st.default.buffer(e.body)&&!_ae.default(e.body))throw new TypeError("The `body` option must be a stream.Readable, string or Buffer");if(o&&!st.default.object(e.form))throw new TypeError("The `form` option must be an Object");{let p=!st.default.string(r["content-type"]);n?(_ae.default(e.body)&&p&&(r["content-type"]=`multipart/form-data; boundary=${e.body.getBoundary()}`),this[uh]=e.body):o?(p&&(r["content-type"]="application/x-www-form-urlencoded"),this[uh]=new lh.URLSearchParams(e.form).toString()):(p&&(r["content-type"]="application/json"),this[uh]=e.stringifyJson(e.json));let h=await Vit.default(this[uh],e.headers);st.default.undefined(r["content-length"])&&st.default.undefined(r["transfer-encoding"])&&!A&&!st.default.undefined(h)&&(r["content-length"]=String(h))}}else A?this._lockWrite():this._unlockWrite();this[xE]=Number(r["content-length"])||void 0}async _onResponseBase(e){let{options:r}=this,{url:o}=r;this[Kae]=e,r.decompress&&(e=Wit(e));let a=e.statusCode,n=e;n.statusMessage=n.statusMessage?n.statusMessage:Mae.STATUS_CODES[a],n.url=r.url.toString(),n.requestUrl=this.requestUrl,n.redirectUrls=this.redirects,n.request=this,n.isFromCache=e.fromCache||!1,n.ip=this.ip,n.retryCount=this.retryCount,this[Yae]=n.isFromCache,this[SE]=Number(e.headers["content-length"])||void 0,this[lb]=e,e.once("end",()=>{this[SE]=this[bE],this.emit("downloadProgress",this.downloadProgress)}),e.once("error",A=>{e.destroy(),this._beforeError(new E1(A,this))}),e.once("aborted",()=>{this._beforeError(new E1({name:"Error",message:"The server aborted pending request",code:"ECONNRESET"},this))}),this.emit("downloadProgress",this.downloadProgress);let u=e.headers["set-cookie"];if(st.default.object(r.cookieJar)&&u){let A=u.map(async p=>r.cookieJar.setCookie(p,o.toString()));r.ignoreInvalidCookies&&(A=A.map(async p=>p.catch(()=>{})));try{await Promise.all(A)}catch(p){this._beforeError(p);return}}if(r.followRedirect&&e.headers.location&&ast.has(a)){if(e.resume(),this[Zs]&&(this[B4](),delete this[Zs],this[jae]()),(a===303&&r.method!=="GET"&&r.method!=="HEAD"||!r.methodRewriting)&&(r.method="GET","body"in r&&delete r.body,"json"in r&&delete r.json,"form"in r&&delete r.form,this[uh]=void 0,delete r.headers["content-length"]),this.redirects.length>=r.maxRedirects){this._beforeError(new ub(this));return}try{let p=Buffer.from(e.headers.location,"binary").toString(),h=new lh.URL(p,o),E=h.toString();decodeURI(E),h.hostname!==o.hostname||h.port!==o.port?("host"in r.headers&&delete r.headers.host,"cookie"in r.headers&&delete r.headers.cookie,"authorization"in r.headers&&delete r.headers.authorization,(r.username||r.password)&&(r.username="",r.password="")):(h.username=r.username,h.password=r.password),this.redirects.push(E),r.url=h;for(let I of r.hooks.beforeRedirect)await I(r,n);this.emit("redirect",n,r),await this._makeRequest()}catch(p){this._beforeError(p);return}return}if(r.isStream&&r.throwHttpErrors&&!est.isResponseOk(n)){this._beforeError(new Ab(n));return}e.on("readable",()=>{this[ab]&&this._read()}),this.on("resume",()=>{e.resume()}),this.on("pause",()=>{e.pause()}),e.once("end",()=>{this.push(null)}),this.emit("response",e);for(let A of this[ob])if(!A.headersSent){for(let p in e.headers){let h=r.decompress?p!=="content-encoding":!0,E=e.headers[p];h&&A.setHeader(p,E)}A.statusCode=a}}async _onResponse(e){try{await this._onResponseBase(e)}catch(r){this._beforeError(r)}}_onRequest(e){let{options:r}=this,{timeout:o,url:a}=r;jit.default(e),this[B4]=Hae.default(e,o,a);let n=r.cache?"cacheableResponse":"response";e.once(n,p=>{this._onResponse(p)}),e.once("error",p=>{var h;e.destroy(),(h=e.res)===null||h===void 0||h.removeAllListeners("end"),p=p instanceof Hae.TimeoutError?new hb(p,this.timings,this):new zi(p.message,p,this),this._beforeError(p)}),this[jae]=Jit.default(e,this,cst),this[Zs]=e,this.emit("uploadProgress",this.uploadProgress);let u=this[uh],A=this.redirects.length===0?this:e;st.default.nodeStream(u)?(u.pipe(A),u.once("error",p=>{this._beforeError(new pb(p,this))})):(this._unlockWrite(),st.default.undefined(u)?(this._cannotHaveBody||this._noPipe)&&(A.end(),this._lockWrite()):(this._writeRequest(u,void 0,()=>{}),A.end(),this._lockWrite())),this.emit("request",e)}async _createCacheableRequest(e,r){return new Promise((o,a)=>{Object.assign(r,Xit.default(e)),delete r.url;let n,u=v4.get(r.cache)(r,async A=>{A._readableState.autoDestroy=!1,n&&(await n).emit("cacheableResponse",A),o(A)});r.url=e,u.once("error",a),u.once("request",async A=>{n=A,o(n)})})}async _makeRequest(){var e,r,o,a,n;let{options:u}=this,{headers:A}=u;for(let U in A)if(st.default.undefined(A[U]))delete A[U];else if(st.default.null_(A[U]))throw new TypeError(`Use \`undefined\` instead of \`null\` to delete the \`${U}\` header`);if(u.decompress&&st.default.undefined(A["accept-encoding"])&&(A["accept-encoding"]=nst?"gzip, deflate, br":"gzip, deflate"),u.cookieJar){let U=await u.cookieJar.getCookieString(u.url.toString());st.default.nonEmptyString(U)&&(u.headers.cookie=U)}for(let U of u.hooks.beforeRequest){let V=await U(u);if(!st.default.undefined(V)){u.request=()=>V;break}}u.body&&this[uh]!==u.body&&(this[uh]=u.body);let{agent:p,request:h,timeout:E,url:I}=u;if(u.dnsCache&&!("lookup"in u)&&(u.lookup=u.dnsCache.lookup),I.hostname==="unix"){let U=/(?.+?):(?.+)/.exec(`${I.pathname}${I.search}`);if(U?.groups){let{socketPath:V,path:te}=U.groups;Object.assign(u,{socketPath:V,path:te,host:""})}}let v=I.protocol==="https:",x;u.http2?x=Kit.auto:x=v?Git.request:Mae.request;let C=(e=u.request)!==null&&e!==void 0?e:x,R=u.cache?this._createCacheableRequest:C;p&&!u.http2&&(u.agent=p[v?"https":"http"]),u[Zs]=C,delete u.request,delete u.timeout;let N=u;if(N.shared=(r=u.cacheOptions)===null||r===void 0?void 0:r.shared,N.cacheHeuristic=(o=u.cacheOptions)===null||o===void 0?void 0:o.cacheHeuristic,N.immutableMinTimeToLive=(a=u.cacheOptions)===null||a===void 0?void 0:a.immutableMinTimeToLive,N.ignoreCargoCult=(n=u.cacheOptions)===null||n===void 0?void 0:n.ignoreCargoCult,u.dnsLookupIpVersion!==void 0)try{N.family=Gae.dnsLookupIpVersionToFamily(u.dnsLookupIpVersion)}catch{throw new Error("Invalid `dnsLookupIpVersion` option value")}u.https&&("rejectUnauthorized"in u.https&&(N.rejectUnauthorized=u.https.rejectUnauthorized),u.https.checkServerIdentity&&(N.checkServerIdentity=u.https.checkServerIdentity),u.https.certificateAuthority&&(N.ca=u.https.certificateAuthority),u.https.certificate&&(N.cert=u.https.certificate),u.https.key&&(N.key=u.https.key),u.https.passphrase&&(N.passphrase=u.https.passphrase),u.https.pfx&&(N.pfx=u.https.pfx));try{let U=await R(I,N);st.default.undefined(U)&&(U=x(I,N)),u.request=h,u.timeout=E,u.agent=p,u.https&&("rejectUnauthorized"in u.https&&delete N.rejectUnauthorized,u.https.checkServerIdentity&&delete N.checkServerIdentity,u.https.certificateAuthority&&delete N.ca,u.https.certificate&&delete N.cert,u.https.key&&delete N.key,u.https.passphrase&&delete N.passphrase,u.https.pfx&&delete N.pfx),sst(U)?this._onRequest(U):this.writable?(this.once("finish",()=>{this._onResponse(U)}),this._unlockWrite(),this.end(),this._lockWrite()):this._onResponse(U)}catch(U){throw U instanceof Uae.CacheError?new fb(U,this):new zi(U.message,U,this)}}async _error(e){try{for(let r of this.options.hooks.beforeError)e=await r(e)}catch(r){e=new zi(r.message,r,this)}this.destroy(e)}_beforeError(e){if(this[QE])return;let{options:r}=this,o=this.retryCount+1;this[QE]=!0,e instanceof zi||(e=new zi(e.message,e,this));let a=e,{response:n}=a;(async()=>{if(n&&!n.body){n.setEncoding(this._readableState.encoding);try{n.rawBody=await $it.default(n),n.body=n.rawBody.toString()}catch{}}if(this.listenerCount("retry")!==0){let u;try{let A;n&&"retry-after"in n.headers&&(A=Number(n.headers["retry-after"]),Number.isNaN(A)?(A=Date.parse(n.headers["retry-after"])-Date.now(),A<=0&&(A=1)):A*=1e3),u=await r.retry.calculateDelay({attemptCount:o,retryOptions:r.retry,error:a,retryAfter:A,computedValue:rst.default({attemptCount:o,retryOptions:r.retry,error:a,retryAfter:A,computedValue:0})})}catch(A){this._error(new zi(A.message,A,this));return}if(u){let A=async()=>{try{for(let p of this.options.hooks.beforeRetry)await p(this.options,a,o)}catch(p){this._error(new zi(p.message,e,this));return}this.destroyed||(this.destroy(),this.emit("retry",o,e))};this[zae]=setTimeout(A,u);return}}this._error(a)})()}_read(){this[ab]=!0;let e=this[lb];if(e&&!this[QE]){e.readableLength&&(this[ab]=!1);let r;for(;(r=e.read())!==null;){this[bE]+=r.length,this[Wae]=!0;let o=this.downloadProgress;o.percent<1&&this.emit("downloadProgress",o),this.push(r)}}}_write(e,r,o){let a=()=>{this._writeRequest(e,r,o)};this.requestInitialized?a():this[y1].push(a)}_writeRequest(e,r,o){this[Zs].destroyed||(this._progressCallbacks.push(()=>{this[kE]+=Buffer.byteLength(e,r);let a=this.uploadProgress;a.percent<1&&this.emit("uploadProgress",a)}),this[Zs].write(e,r,a=>{!a&&this._progressCallbacks.length>0&&this._progressCallbacks.shift()(),o(a)}))}_final(e){let r=()=>{for(;this._progressCallbacks.length!==0;)this._progressCallbacks.shift()();if(!(Zs in this)){e();return}if(this[Zs].destroyed){e();return}this[Zs].end(o=>{o||(this[xE]=this[kE],this.emit("uploadProgress",this.uploadProgress),this[Zs].emit("upload-complete")),e(o)})};this.requestInitialized?r():this[y1].push(r)}_destroy(e,r){var o;this[QE]=!0,clearTimeout(this[zae]),Zs in this&&(this[B4](),!((o=this[lb])===null||o===void 0)&&o.complete||this[Zs].destroy()),e!==null&&!st.default.undefined(e)&&!(e instanceof zi)&&(e=new zi(e.message,e,this)),r(e)}get _isAboutToError(){return this[QE]}get ip(){var e;return(e=this.socket)===null||e===void 0?void 0:e.remoteAddress}get aborted(){var e,r,o;return((r=(e=this[Zs])===null||e===void 0?void 0:e.destroyed)!==null&&r!==void 0?r:this.destroyed)&&!(!((o=this[Kae])===null||o===void 0)&&o.complete)}get socket(){var e,r;return(r=(e=this[Zs])===null||e===void 0?void 0:e.socket)!==null&&r!==void 0?r:void 0}get downloadProgress(){let e;return this[SE]?e=this[bE]/this[SE]:this[SE]===this[bE]?e=1:e=0,{percent:e,transferred:this[bE],total:this[SE]}}get uploadProgress(){let e;return this[xE]?e=this[kE]/this[xE]:this[xE]===this[kE]?e=1:e=0,{percent:e,transferred:this[kE],total:this[xE]}}get timings(){var e;return(e=this[Zs])===null||e===void 0?void 0:e.timings}get isFromCache(){return this[Yae]}pipe(e,r){if(this[Wae])throw new Error("Failed to pipe. The response has been emitted already.");return e instanceof w4.ServerResponse&&this[ob].add(e),super.pipe(e,r)}unpipe(e){return e instanceof w4.ServerResponse&&this[ob].delete(e),super.unpipe(e),this}};Bn.default=db});var w1=_(jc=>{"use strict";var ust=jc&&jc.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),Ast=jc&&jc.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&ust(e,t,r)};Object.defineProperty(jc,"__esModule",{value:!0});jc.CancelError=jc.ParseError=void 0;var Vae=C1(),D4=class extends Vae.RequestError{constructor(e,r){let{options:o}=r.request;super(`${e.message} in "${o.url.toString()}"`,e,r.request),this.name="ParseError"}};jc.ParseError=D4;var P4=class extends Vae.RequestError{constructor(e){super("Promise was canceled",{},e),this.name="CancelError"}get isCanceled(){return!0}};jc.CancelError=P4;Ast(C1(),jc)});var Xae=_(S4=>{"use strict";Object.defineProperty(S4,"__esModule",{value:!0});var Jae=w1(),fst=(t,e,r,o)=>{let{rawBody:a}=t;try{if(e==="text")return a.toString(o);if(e==="json")return a.length===0?"":r(a.toString());if(e==="buffer")return a;throw new Jae.ParseError({message:`Unknown body type '${e}'`,name:"Error"},t)}catch(n){throw new Jae.ParseError(n,t)}};S4.default=fst});var b4=_(Ah=>{"use strict";var pst=Ah&&Ah.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),hst=Ah&&Ah.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&pst(e,t,r)};Object.defineProperty(Ah,"__esModule",{value:!0});var gst=ve("events"),dst=Tf(),mst=Jse(),mb=w1(),Zae=Xae(),$ae=C1(),yst=u4(),Est=m4(),ele=y4(),Cst=["request","response","redirect","uploadProgress","downloadProgress"];function tle(t){let e,r,o=new gst.EventEmitter,a=new mst((u,A,p)=>{let h=E=>{let I=new $ae.default(void 0,t);I.retryCount=E,I._noPipe=!0,p(()=>I.destroy()),p.shouldReject=!1,p(()=>A(new mb.CancelError(I))),e=I,I.once("response",async C=>{var R;if(C.retryCount=E,C.request.aborted)return;let N;try{N=await Est.default(I),C.rawBody=N}catch{return}if(I._isAboutToError)return;let U=((R=C.headers["content-encoding"])!==null&&R!==void 0?R:"").toLowerCase(),V=["gzip","deflate","br"].includes(U),{options:te}=I;if(V&&!te.decompress)C.body=N;else try{C.body=Zae.default(C,te.responseType,te.parseJson,te.encoding)}catch(ae){if(C.body=N.toString(),ele.isResponseOk(C)){I._beforeError(ae);return}}try{for(let[ae,fe]of te.hooks.afterResponse.entries())C=await fe(C,async ue=>{let me=$ae.default.normalizeArguments(void 0,{...ue,retry:{calculateDelay:()=>0},throwHttpErrors:!1,resolveBodyOnly:!1},te);me.hooks.afterResponse=me.hooks.afterResponse.slice(0,ae);for(let Be of me.hooks.beforeRetry)await Be(me);let he=tle(me);return p(()=>{he.catch(()=>{}),he.cancel()}),he})}catch(ae){I._beforeError(new mb.RequestError(ae.message,ae,I));return}if(!ele.isResponseOk(C)){I._beforeError(new mb.HTTPError(C));return}r=C,u(I.options.resolveBodyOnly?C.body:C)});let v=C=>{if(a.isCanceled)return;let{options:R}=I;if(C instanceof mb.HTTPError&&!R.throwHttpErrors){let{response:N}=C;u(I.options.resolveBodyOnly?N.body:N);return}A(C)};I.once("error",v);let x=I.options.body;I.once("retry",(C,R)=>{var N,U;if(x===((N=R.request)===null||N===void 0?void 0:N.options.body)&&dst.default.nodeStream((U=R.request)===null||U===void 0?void 0:U.options.body)){v(R);return}h(C)}),yst.default(I,o,Cst)};h(0)});a.on=(u,A)=>(o.on(u,A),a);let n=u=>{let A=(async()=>{await a;let{options:p}=r.request;return Zae.default(r,u,p.parseJson,p.encoding)})();return Object.defineProperties(A,Object.getOwnPropertyDescriptors(a)),A};return a.json=()=>{let{headers:u}=e.options;return!e.writableFinished&&u.accept===void 0&&(u.accept="application/json"),n("json")},a.buffer=()=>n("buffer"),a.text=()=>n("text"),a}Ah.default=tle;hst(w1(),Ah)});var rle=_(x4=>{"use strict";Object.defineProperty(x4,"__esModule",{value:!0});var wst=w1();function Ist(t,...e){let r=(async()=>{if(t instanceof wst.RequestError)try{for(let a of e)if(a)for(let n of a)t=await n(t)}catch(a){t=a}throw t})(),o=()=>r;return r.json=o,r.text=o,r.buffer=o,r.on=o,r}x4.default=Ist});var sle=_(k4=>{"use strict";Object.defineProperty(k4,"__esModule",{value:!0});var nle=Tf();function ile(t){for(let e of Object.values(t))(nle.default.plainObject(e)||nle.default.array(e))&&ile(e);return Object.freeze(t)}k4.default=ile});var ale=_(ole=>{"use strict";Object.defineProperty(ole,"__esModule",{value:!0})});var Q4=_(Vl=>{"use strict";var Bst=Vl&&Vl.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),vst=Vl&&Vl.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Bst(e,t,r)};Object.defineProperty(Vl,"__esModule",{value:!0});Vl.defaultHandler=void 0;var lle=Tf(),zl=b4(),Dst=rle(),Eb=C1(),Pst=sle(),Sst={RequestError:zl.RequestError,CacheError:zl.CacheError,ReadError:zl.ReadError,HTTPError:zl.HTTPError,MaxRedirectsError:zl.MaxRedirectsError,TimeoutError:zl.TimeoutError,ParseError:zl.ParseError,CancelError:zl.CancelError,UnsupportedProtocolError:zl.UnsupportedProtocolError,UploadError:zl.UploadError},bst=async t=>new Promise(e=>{setTimeout(e,t)}),{normalizeArguments:yb}=Eb.default,cle=(...t)=>{let e;for(let r of t)e=yb(void 0,r,e);return e},xst=t=>t.isStream?new Eb.default(void 0,t):zl.default(t),kst=t=>"defaults"in t&&"options"in t.defaults,Qst=["get","post","put","patch","head","delete"];Vl.defaultHandler=(t,e)=>e(t);var ule=(t,e)=>{if(t)for(let r of t)r(e)},Ale=t=>{t._rawHandlers=t.handlers,t.handlers=t.handlers.map(o=>(a,n)=>{let u,A=o(a,p=>(u=n(p),u));if(A!==u&&!a.isStream&&u){let p=A,{then:h,catch:E,finally:I}=p;Object.setPrototypeOf(p,Object.getPrototypeOf(u)),Object.defineProperties(p,Object.getOwnPropertyDescriptors(u)),p.then=h,p.catch=E,p.finally=I}return A});let e=(o,a={},n)=>{var u,A;let p=0,h=E=>t.handlers[p++](E,p===t.handlers.length?xst:h);if(lle.default.plainObject(o)){let E={...o,...a};Eb.setNonEnumerableProperties([o,a],E),a=E,o=void 0}try{let E;try{ule(t.options.hooks.init,a),ule((u=a.hooks)===null||u===void 0?void 0:u.init,a)}catch(v){E=v}let I=yb(o,a,n??t.options);if(I[Eb.kIsNormalizedAlready]=!0,E)throw new zl.RequestError(E.message,E,I);return h(I)}catch(E){if(a.isStream)throw E;return Dst.default(E,t.options.hooks.beforeError,(A=a.hooks)===null||A===void 0?void 0:A.beforeError)}};e.extend=(...o)=>{let a=[t.options],n=[...t._rawHandlers],u;for(let A of o)kst(A)?(a.push(A.defaults.options),n.push(...A.defaults._rawHandlers),u=A.defaults.mutableDefaults):(a.push(A),"handlers"in A&&n.push(...A.handlers),u=A.mutableDefaults);return n=n.filter(A=>A!==Vl.defaultHandler),n.length===0&&n.push(Vl.defaultHandler),Ale({options:cle(...a),handlers:n,mutableDefaults:Boolean(u)})};let r=async function*(o,a){let n=yb(o,a,t.options);n.resolveBodyOnly=!1;let u=n.pagination;if(!lle.default.object(u))throw new TypeError("`options.pagination` must be implemented");let A=[],{countLimit:p}=u,h=0;for(;h{let n=[];for await(let u of r(o,a))n.push(u);return n},e.paginate.each=r,e.stream=(o,a)=>e(o,{...a,isStream:!0});for(let o of Qst)e[o]=(a,n)=>e(a,{...n,method:o}),e.stream[o]=(a,n)=>e(a,{...n,method:o,isStream:!0});return Object.assign(e,Sst),Object.defineProperty(e,"defaults",{value:t.mutableDefaults?t:Pst.default(t),writable:t.mutableDefaults,configurable:t.mutableDefaults,enumerable:!0}),e.mergeOptions=cle,e};Vl.default=Ale;vst(ale(),Vl)});var hle=_((Lf,Cb)=>{"use strict";var Fst=Lf&&Lf.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),fle=Lf&&Lf.__exportStar||function(t,e){for(var r in t)r!=="default"&&!Object.prototype.hasOwnProperty.call(e,r)&&Fst(e,t,r)};Object.defineProperty(Lf,"__esModule",{value:!0});var Rst=ve("url"),ple=Q4(),Tst={options:{method:"GET",retry:{limit:2,methods:["GET","PUT","HEAD","DELETE","OPTIONS","TRACE"],statusCodes:[408,413,429,500,502,503,504,521,522,524],errorCodes:["ETIMEDOUT","ECONNRESET","EADDRINUSE","ECONNREFUSED","EPIPE","ENOTFOUND","ENETUNREACH","EAI_AGAIN"],maxRetryAfter:void 0,calculateDelay:({computedValue:t})=>t},timeout:{},headers:{"user-agent":"got (https://github.com/sindresorhus/got)"},hooks:{init:[],beforeRequest:[],beforeRedirect:[],beforeRetry:[],beforeError:[],afterResponse:[]},cache:void 0,dnsCache:void 0,decompress:!0,throwHttpErrors:!0,followRedirect:!0,isStream:!1,responseType:"text",resolveBodyOnly:!1,maxRedirects:10,prefixUrl:"",methodRewriting:!0,ignoreInvalidCookies:!1,context:{},http2:!1,allowGetBody:!1,https:void 0,pagination:{transform:t=>t.request.options.responseType==="json"?t.body:JSON.parse(t.body),paginate:t=>{if(!Reflect.has(t.headers,"link"))return!1;let e=t.headers.link.split(","),r;for(let o of e){let a=o.split(";");if(a[1].includes("next")){r=a[0].trimStart().trim(),r=r.slice(1,-1);break}}return r?{url:new Rst.URL(r)}:!1},filter:()=>!0,shouldContinue:()=>!0,countLimit:1/0,backoff:0,requestLimit:1e4,stackAllItems:!0},parseJson:t=>JSON.parse(t),stringifyJson:t=>JSON.stringify(t),cacheOptions:{}},handlers:[ple.defaultHandler],mutableDefaults:!1},F4=ple.default(Tst);Lf.default=F4;Cb.exports=F4;Cb.exports.default=F4;Cb.exports.__esModule=!0;fle(Q4(),Lf);fle(b4(),Lf)});var nn={};zt(nn,{Method:()=>wle,del:()=>Ust,get:()=>N4,getNetworkSettings:()=>Cle,post:()=>O4,put:()=>Mst,request:()=>I1});function mle(t){let e=new URL(t),r={host:e.hostname,headers:{}};return e.port&&(r.port=Number(e.port)),e.username&&e.password&&(r.proxyAuth=`${e.username}:${e.password}`),{proxy:r}}async function R4(t){return al(dle,t,()=>oe.readFilePromise(t).then(e=>(dle.set(t,e),e)))}function Ost({statusCode:t,statusMessage:e},r){let o=Ut(r,t,yt.NUMBER),a=`https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/${t}`;return Zy(r,`${o}${e?` (${e})`:""}`,a)}async function wb(t,{configuration:e,customErrorMessage:r}){try{return await t}catch(o){if(o.name!=="HTTPError")throw o;let a=r?.(o,e)??o.response.body?.error;a==null&&(o.message.startsWith("Response code")?a="The remote server failed to provide the requested resource":a=o.message),o.code==="ETIMEDOUT"&&o.event==="socket"&&(a+=`(can be increased via ${Ut(e,"httpTimeout",yt.SETTING)})`);let n=new Jt(35,a,u=>{o.response&&u.reportError(35,` ${Xu(e,{label:"Response Code",value:Hc(yt.NO_HINT,Ost(o.response,e))})}`),o.request&&(u.reportError(35,` ${Xu(e,{label:"Request Method",value:Hc(yt.NO_HINT,o.request.options.method)})}`),u.reportError(35,` ${Xu(e,{label:"Request URL",value:Hc(yt.URL,o.request.requestUrl)})}`)),o.request.redirects.length>0&&u.reportError(35,` ${Xu(e,{label:"Request Redirects",value:Hc(yt.NO_HINT,bN(e,o.request.redirects,yt.URL))})}`),o.request.retryCount===o.request.options.retry.limit&&u.reportError(35,` ${Xu(e,{label:"Request Retry Count",value:Hc(yt.NO_HINT,`${Ut(e,o.request.retryCount,yt.NUMBER)} (can be increased via ${Ut(e,"httpRetry",yt.SETTING)})`)})}`)});throw n.originalError=o,n}}function Cle(t,e){let r=[...e.configuration.get("networkSettings")].sort(([u],[A])=>A.length-u.length),o={enableNetwork:void 0,httpsCaFilePath:void 0,httpProxy:void 0,httpsProxy:void 0,httpsKeyFilePath:void 0,httpsCertFilePath:void 0},a=Object.keys(o),n=typeof t=="string"?new URL(t):t;for(let[u,A]of r)if(L4.default.isMatch(n.hostname,u))for(let p of a){let h=A.get(p);h!==null&&typeof o[p]>"u"&&(o[p]=h)}for(let u of a)typeof o[u]>"u"&&(o[u]=e.configuration.get(u));return o}async function I1(t,e,{configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u="GET",wrapNetworkRequest:A}){let p={target:t,body:e,configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u},h=async()=>await _st(t,e,p),E=typeof A<"u"?await A(h,p):h;return await(await r.reduceHook(v=>v.wrapNetworkRequest,E,p))()}async function N4(t,{configuration:e,jsonResponse:r,customErrorMessage:o,wrapNetworkRequest:a,...n}){let u=()=>wb(I1(t,null,{configuration:e,wrapNetworkRequest:a,...n}),{configuration:e,customErrorMessage:o}).then(p=>p.body),A=await(typeof a<"u"?u():al(gle,t,()=>u().then(p=>(gle.set(t,p),p))));return r?JSON.parse(A.toString()):A}async function Mst(t,e,{customErrorMessage:r,...o}){return(await wb(I1(t,e,{...o,method:"PUT"}),{customErrorMessage:r,configuration:o.configuration})).body}async function O4(t,e,{customErrorMessage:r,...o}){return(await wb(I1(t,e,{...o,method:"POST"}),{customErrorMessage:r,configuration:o.configuration})).body}async function Ust(t,{customErrorMessage:e,...r}){return(await wb(I1(t,null,{...r,method:"DELETE"}),{customErrorMessage:e,configuration:r.configuration})).body}async function _st(t,e,{configuration:r,headers:o,jsonRequest:a,jsonResponse:n,method:u="GET"}){let A=typeof t=="string"?new URL(t):t,p=Cle(A,{configuration:r});if(p.enableNetwork===!1)throw new Jt(80,`Request to '${A.href}' has been blocked because of your configuration settings`);if(A.protocol==="http:"&&!L4.default.isMatch(A.hostname,r.get("unsafeHttpWhitelist")))throw new Jt(81,`Unsafe http requests must be explicitly whitelisted in your configuration (${A.hostname})`);let E={agent:{http:p.httpProxy?T4.default.httpOverHttp(mle(p.httpProxy)):Lst,https:p.httpsProxy?T4.default.httpsOverHttp(mle(p.httpsProxy)):Nst},headers:o,method:u};E.responseType=n?"json":"buffer",e!==null&&(Buffer.isBuffer(e)||!a&&typeof e=="string"?E.body=e:E.json=e);let I=r.get("httpTimeout"),v=r.get("httpRetry"),x=r.get("enableStrictSsl"),C=p.httpsCaFilePath,R=p.httpsCertFilePath,N=p.httpsKeyFilePath,{default:U}=await Promise.resolve().then(()=>$e(hle())),V=C?await R4(C):void 0,te=R?await R4(R):void 0,ae=N?await R4(N):void 0,fe=U.extend({timeout:{socket:I},retry:v,https:{rejectUnauthorized:x,certificateAuthority:V,certificate:te,key:ae},...E});return r.getLimit("networkConcurrency")(()=>fe(A))}var yle,Ele,L4,T4,gle,dle,Lst,Nst,wle,Ib=Et(()=>{Pt();yle=ve("https"),Ele=ve("http"),L4=$e(Zo()),T4=$e(Yse());Wl();jl();Gl();gle=new Map,dle=new Map,Lst=new Ele.Agent({keepAlive:!0}),Nst=new yle.Agent({keepAlive:!0});wle=(a=>(a.GET="GET",a.PUT="PUT",a.POST="POST",a.DELETE="DELETE",a))(wle||{})});var Vi={};zt(Vi,{availableParallelism:()=>U4,getArchitecture:()=>B1,getArchitectureName:()=>Yst,getArchitectureSet:()=>M4,getCaller:()=>Vst,major:()=>Hst,openUrl:()=>qst});function jst(){if(process.platform==="darwin"||process.platform==="win32")return null;let t;try{t=oe.readFileSync(Gst)}catch{}if(typeof t<"u"){if(t&&(t.includes("GLIBC")||t.includes("libc")))return"glibc";if(t&&t.includes("musl"))return"musl"}let r=(process.report?.getReport()??{}).sharedObjects??[],o=/\/(?:(ld-linux-|[^/]+-linux-gnu\/)|(libc.musl-|ld-musl-))/;return KI(r,a=>{let n=a.match(o);if(!n)return KI.skip;if(n[1])return"glibc";if(n[2])return"musl";throw new Error("Assertion failed: Expected the libc variant to have been detected")})??null}function B1(){return Ble=Ble??{os:process.platform,cpu:process.arch,libc:jst()}}function Yst(t=B1()){return t.libc?`${t.os}-${t.cpu}-${t.libc}`:`${t.os}-${t.cpu}`}function M4(){let t=B1();return vle=vle??{os:[t.os],cpu:[t.cpu],libc:t.libc?[t.libc]:[]}}function zst(t){let e=Wst.exec(t);if(!e)return null;let r=e[2]&&e[2].indexOf("native")===0,o=e[2]&&e[2].indexOf("eval")===0,a=Kst.exec(e[2]);return o&&a!=null&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{file:r?null:e[2],methodName:e[1]||"",arguments:r?[e[2]]:[],line:e[3]?+e[3]:null,column:e[4]?+e[4]:null}}function Vst(){let e=new Error().stack.split(` `)[3];return zst(e)}function U4(){return typeof Bb.default.availableParallelism<"u"?Bb.default.availableParallelism():Math.max(1,Bb.default.cpus().length)}var Bb,Hst,Ile,qst,Gst,Ble,vle,Wst,Kst,vb=Et(()=>{Pt();Bb=$e(ve("os"));Db();Gl();Hst=Number(process.versions.node.split(".")[0]),Ile=new Map([["darwin","open"],["linux","xdg-open"],["win32","explorer.exe"]]).get(process.platform),qst=typeof Ile<"u"?async t=>{try{return await _4(Ile,[t],{cwd:z.cwd()}),!0}catch{return!1}}:void 0,Gst="/usr/bin/ldd";Wst=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\/|[a-z]:\\|\\\\).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Kst=/\((\S*)(?::(\d+))(?::(\d+))\)/});function Y4(t,e,r,o,a){let n=A1(r);if(o.isArray||o.type==="ANY"&&Array.isArray(n))return Array.isArray(n)?n.map((u,A)=>H4(t,`${e}[${A}]`,u,o,a)):String(n).split(/,/).map(u=>H4(t,e,u,o,a));if(Array.isArray(n))throw new Error(`Non-array configuration settings "${e}" cannot be an array`);return H4(t,e,r,o,a)}function H4(t,e,r,o,a){let n=A1(r);switch(o.type){case"ANY":return jS(n);case"SHAPE":return $st(t,e,r,o,a);case"MAP":return eot(t,e,r,o,a)}if(n===null&&!o.isNullable&&o.default!==null)throw new Error(`Non-nullable configuration settings "${e}" cannot be set to null`);if(o.values?.includes(n))return n;let A=(()=>{if(o.type==="BOOLEAN"&&typeof n!="string")return zI(n);if(typeof n!="string")throw new Error(`Expected configuration setting "${e}" to be a string, got ${typeof n}`);let p=iS(n,{env:t.env});switch(o.type){case"ABSOLUTE_PATH":{let h=a,E=mM(r);return E&&E[0]!=="<"&&(h=z.dirname(E)),z.resolve(h,le.toPortablePath(p))}case"LOCATOR_LOOSE":return xf(p,!1);case"NUMBER":return parseInt(p);case"LOCATOR":return xf(p);case"BOOLEAN":return zI(p);default:return p}})();if(o.values&&!o.values.includes(A))throw new Error(`Invalid value, expected one of ${o.values.join(", ")}`);return A}function $st(t,e,r,o,a){let n=A1(r);if(typeof n!="object"||Array.isArray(n))throw new it(`Object configuration settings "${e}" must be an object`);let u=W4(t,o,{ignoreArrays:!0});if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=`${e}.${A}`;if(!o.properties[A])throw new it(`Unrecognized configuration settings found: ${e}.${A} - run "yarn config -v" to see the list of settings supported in Yarn`);u.set(A,Y4(t,h,p,o.properties[A],a))}return u}function eot(t,e,r,o,a){let n=A1(r),u=new Map;if(typeof n!="object"||Array.isArray(n))throw new it(`Map configuration settings "${e}" must be an object`);if(n===null)return u;for(let[A,p]of Object.entries(n)){let h=o.normalizeKeys?o.normalizeKeys(A):A,E=`${e}['${h}']`,I=o.valueDefinition;u.set(h,Y4(t,E,p,I,a))}return u}function W4(t,e,{ignoreArrays:r=!1}={}){switch(e.type){case"SHAPE":{if(e.isArray&&!r)return[];let o=new Map;for(let[a,n]of Object.entries(e.properties))o.set(a,W4(t,n));return o}case"MAP":return e.isArray&&!r?[]:new Map;case"ABSOLUTE_PATH":return e.default===null?null:t.projectCwd===null?Array.isArray(e.default)?e.default.map(o=>z.normalize(o)):z.isAbsolute(e.default)?z.normalize(e.default):e.isNullable?null:void 0:Array.isArray(e.default)?e.default.map(o=>z.resolve(t.projectCwd,o)):z.resolve(t.projectCwd,e.default);default:return e.default}}function Sb(t,e,r){if(e.type==="SECRET"&&typeof t=="string"&&r.hideSecrets)return Zst;if(e.type==="ABSOLUTE_PATH"&&typeof t=="string"&&r.getNativePaths)return le.fromPortablePath(t);if(e.isArray&&Array.isArray(t)){let o=[];for(let a of t)o.push(Sb(a,e,r));return o}if(e.type==="MAP"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=Sb(n,e.valueDefinition,r);typeof u<"u"&&o.set(a,u)}return o}if(e.type==="SHAPE"&&t instanceof Map){if(t.size===0)return;let o=new Map;for(let[a,n]of t.entries()){let u=e.properties[a],A=Sb(n,u,r);typeof A<"u"&&o.set(a,A)}return o}return t}function tot(){let t={};for(let[e,r]of Object.entries(process.env))e=e.toLowerCase(),e.startsWith(bb)&&(e=(0,Ple.default)(e.slice(bb.length)),t[e]=r);return t}function G4(){let t=`${bb}rc_filename`;for(let[e,r]of Object.entries(process.env))if(e.toLowerCase()===t&&typeof r=="string")return r;return j4}async function Dle(t){try{return await oe.readFilePromise(t)}catch{return Buffer.of()}}async function rot(t,e){return Buffer.compare(...await Promise.all([Dle(t),Dle(e)]))===0}async function not(t,e){let[r,o]=await Promise.all([oe.statPromise(t),oe.statPromise(e)]);return r.dev===o.dev&&r.ino===o.ino}async function sot({configuration:t,selfPath:e}){let r=t.get("yarnPath");return t.get("ignorePath")||r===null||r===e||await iot(r,e)?null:r}var Ple,Nf,Sle,ble,xle,q4,Jst,v1,Xst,FE,bb,j4,Zst,D1,kle,xb,Pb,iot,nA,Ke,P1=Et(()=>{Pt();Nl();Ple=$e(sz()),Nf=$e(rd());qt();Sle=$e(Zz()),ble=ve("module"),xle=$e(sd()),q4=ve("stream");ose();fE();cM();uM();AM();Tse();fM();Dd();Use();WS();jl();ih();Ib();Gl();vb();Qf();bo();Jst=function(){if(!Nf.GITHUB_ACTIONS||!process.env.GITHUB_EVENT_PATH)return!1;let t=le.toPortablePath(process.env.GITHUB_EVENT_PATH),e;try{e=oe.readJsonSync(t)}catch{return!1}return!(!("repository"in e)||!e.repository||(e.repository.private??!0))}(),v1=new Set(["@yarnpkg/plugin-constraints","@yarnpkg/plugin-exec","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]),Xst=new Set(["isTestEnv","injectNpmUser","injectNpmPassword","injectNpm2FaToken","zipDataEpilogue","cacheCheckpointOverride","cacheVersionOverride","lockfileVersionOverride","binFolder","version","flags","profile","gpg","ignoreNode","wrapOutput","home","confDir","registry","ignoreCwd"]),FE=/^(?!v)[a-z0-9._-]+$/i,bb="yarn_",j4=".yarnrc.yml",Zst="********",D1=(E=>(E.ANY="ANY",E.BOOLEAN="BOOLEAN",E.ABSOLUTE_PATH="ABSOLUTE_PATH",E.LOCATOR="LOCATOR",E.LOCATOR_LOOSE="LOCATOR_LOOSE",E.NUMBER="NUMBER",E.STRING="STRING",E.SECRET="SECRET",E.SHAPE="SHAPE",E.MAP="MAP",E))(D1||{}),kle=yt,xb=(r=>(r.JUNCTIONS="junctions",r.SYMLINKS="symlinks",r))(xb||{}),Pb={lastUpdateCheck:{description:"Last timestamp we checked whether new Yarn versions were available",type:"STRING",default:null},yarnPath:{description:"Path to the local executable that must be used over the global one",type:"ABSOLUTE_PATH",default:null},ignorePath:{description:"If true, the local executable will be ignored when using the global one",type:"BOOLEAN",default:!1},globalFolder:{description:"Folder where all system-global files are stored",type:"ABSOLUTE_PATH",default:EM()},cacheFolder:{description:"Folder where the cache files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/cache"},compressionLevel:{description:"Zip files compression level, from 0 to 9 or mixed (a variant of 9, which stores some files uncompressed, when compression doesn't yield good results)",type:"NUMBER",values:["mixed",0,1,2,3,4,5,6,7,8,9],default:0},virtualFolder:{description:"Folder where the virtual packages (cf doc) will be mapped on the disk (must be named __virtual__)",type:"ABSOLUTE_PATH",default:"./.yarn/__virtual__"},installStatePath:{description:"Path of the file where the install state will be persisted",type:"ABSOLUTE_PATH",default:"./.yarn/install-state.gz"},immutablePatterns:{description:"Array of glob patterns; files matching them won't be allowed to change during immutable installs",type:"STRING",default:[],isArray:!0},rcFilename:{description:"Name of the files where the configuration can be found",type:"STRING",default:G4()},enableGlobalCache:{description:"If true, the system-wide cache folder will be used regardless of `cache-folder`",type:"BOOLEAN",default:!0},cacheMigrationMode:{description:"Defines the conditions under which Yarn upgrades should cause the cache archives to be regenerated.",type:"STRING",values:["always","match-spec","required-only"],default:"always"},enableColors:{description:"If true, the CLI is allowed to use colors in its output",type:"BOOLEAN",default:aS,defaultText:""},enableHyperlinks:{description:"If true, the CLI is allowed to use hyperlinks in its output",type:"BOOLEAN",default:SN,defaultText:""},enableInlineBuilds:{description:"If true, the CLI will print the build output on the command line",type:"BOOLEAN",default:Nf.isCI,defaultText:""},enableMessageNames:{description:"If true, the CLI will prefix most messages with codes suitable for search engines",type:"BOOLEAN",default:!0},enableProgressBars:{description:"If true, the CLI is allowed to show a progress bar for long-running events",type:"BOOLEAN",default:!Nf.isCI,defaultText:""},enableTimers:{description:"If true, the CLI is allowed to print the time spent executing commands",type:"BOOLEAN",default:!0},enableTips:{description:"If true, installs will print a helpful message every day of the week",type:"BOOLEAN",default:!Nf.isCI,defaultText:""},preferInteractive:{description:"If true, the CLI will automatically use the interactive mode when called from a TTY",type:"BOOLEAN",default:!1},preferTruncatedLines:{description:"If true, the CLI will truncate lines that would go beyond the size of the terminal",type:"BOOLEAN",default:!1},progressBarStyle:{description:"Which style of progress bar should be used (only when progress bars are enabled)",type:"STRING",default:void 0,defaultText:""},defaultLanguageName:{description:"Default language mode that should be used when a package doesn't offer any insight",type:"STRING",default:"node"},defaultProtocol:{description:"Default resolution protocol used when resolving pure semver and tag ranges",type:"STRING",default:"npm:"},enableTransparentWorkspaces:{description:"If false, Yarn won't automatically resolve workspace dependencies unless they use the `workspace:` protocol",type:"BOOLEAN",default:!0},supportedArchitectures:{description:"Architectures that Yarn will fetch and inject into the resolver",type:"SHAPE",properties:{os:{description:"Array of supported process.platform strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},cpu:{description:"Array of supported process.arch strings, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]},libc:{description:"Array of supported libc libraries, or null to target them all",type:"STRING",isArray:!0,isNullable:!0,default:["current"]}}},enableMirror:{description:"If true, the downloaded packages will be retrieved and stored in both the local and global folders",type:"BOOLEAN",default:!0},enableNetwork:{description:"If false, Yarn will refuse to use the network if required to",type:"BOOLEAN",default:!0},enableOfflineMode:{description:"If true, Yarn will attempt to retrieve files and metadata from the global cache rather than the network",type:"BOOLEAN",default:!1},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},unsafeHttpWhitelist:{description:"List of the hostnames for which http queries are allowed (glob patterns are supported)",type:"STRING",default:[],isArray:!0},httpTimeout:{description:"Timeout of each http request in milliseconds",type:"NUMBER",default:6e4},httpRetry:{description:"Retry times on http failure",type:"NUMBER",default:3},networkConcurrency:{description:"Maximal number of concurrent requests",type:"NUMBER",default:50},taskPoolConcurrency:{description:"Maximal amount of concurrent heavy task processing",type:"NUMBER",default:U4()},taskPoolMode:{description:"Execution strategy for heavy tasks",type:"STRING",values:["async","workers"],default:"workers"},networkSettings:{description:"Network settings per hostname (glob patterns are supported)",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{httpsCaFilePath:{description:"Path to file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},enableNetwork:{description:"If false, the package manager will refuse to use the network if required to",type:"BOOLEAN",default:null},httpProxy:{description:"URL of the http proxy that must be used for outgoing http requests",type:"STRING",default:null},httpsProxy:{description:"URL of the http proxy that must be used for outgoing https requests",type:"STRING",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null}}}},httpsCaFilePath:{description:"A path to a file containing one or multiple Certificate Authority signing certificates",type:"ABSOLUTE_PATH",default:null},httpsKeyFilePath:{description:"Path to file containing private key in PEM format",type:"ABSOLUTE_PATH",default:null},httpsCertFilePath:{description:"Path to file containing certificate chain in PEM format",type:"ABSOLUTE_PATH",default:null},enableStrictSsl:{description:"If false, SSL certificate errors will be ignored",type:"BOOLEAN",default:!0},logFilters:{description:"Overrides for log levels",type:"SHAPE",isArray:!0,concatenateValues:!0,properties:{code:{description:"Code of the messages covered by this override",type:"STRING",default:void 0},text:{description:"Code of the texts covered by this override",type:"STRING",default:void 0},pattern:{description:"Code of the patterns covered by this override",type:"STRING",default:void 0},level:{description:"Log level override, set to null to remove override",type:"STRING",values:Object.values(cS),isNullable:!0,default:void 0}}},enableTelemetry:{description:"If true, telemetry will be periodically sent, following the rules in https://yarnpkg.com/advanced/telemetry",type:"BOOLEAN",default:!0},telemetryInterval:{description:"Minimal amount of time between two telemetry uploads, in days",type:"NUMBER",default:7},telemetryUserId:{description:"If you desire to tell us which project you are, you can set this field. Completely optional and opt-in.",type:"STRING",default:null},enableHardenedMode:{description:"If true, automatically enable --check-resolutions --refresh-lockfile on installs",type:"BOOLEAN",default:Nf.isPR&&Jst,defaultText:""},enableScripts:{description:"If true, packages are allowed to have install scripts by default",type:"BOOLEAN",default:!0},enableStrictSettings:{description:"If true, unknown settings will cause Yarn to abort",type:"BOOLEAN",default:!0},enableImmutableCache:{description:"If true, the cache is reputed immutable and actions that would modify it will throw",type:"BOOLEAN",default:!1},checksumBehavior:{description:"Enumeration defining what to do when a checksum doesn't match expectations",type:"STRING",default:"throw"},injectEnvironmentFiles:{description:"List of all the environment files that Yarn should inject inside the process when it starts",type:"ABSOLUTE_PATH",default:[".env.yarn?"],isArray:!0},packageExtensions:{description:"Map of package corrections to apply on the dependency tree",type:"MAP",valueDefinition:{description:"The extension that will be applied to any package whose version matches the specified range",type:"SHAPE",properties:{dependencies:{description:"The set of dependencies that must be made available to the current package in order for it to work properly",type:"MAP",valueDefinition:{description:"A range",type:"STRING"}},peerDependencies:{description:"Inherited dependencies - the consumer of the package will be tasked to provide them",type:"MAP",valueDefinition:{description:"A semver range",type:"STRING"}},peerDependenciesMeta:{description:"Extra information related to the dependencies listed in the peerDependencies field",type:"MAP",valueDefinition:{description:"The peerDependency meta",type:"SHAPE",properties:{optional:{description:"If true, the selected peer dependency will be marked as optional by the package manager and the consumer omitting it won't be reported as an error",type:"BOOLEAN",default:!1}}}}}}}};iot=process.platform==="win32"?rot:not;nA=class{constructor(e){this.isCI=Nf.isCI;this.projectCwd=null;this.plugins=new Map;this.settings=new Map;this.values=new Map;this.sources=new Map;this.invalid=new Map;this.env={};this.limits=new Map;this.packageExtensions=null;this.startingCwd=e}static create(e,r,o){let a=new nA(e);typeof r<"u"&&!(r instanceof Map)&&(a.projectCwd=r),a.importSettings(Pb);let n=typeof o<"u"?o:r instanceof Map?r:new Map;for(let[u,A]of n)a.activatePlugin(u,A);return a}static async find(e,r,{strict:o=!0,usePathCheck:a=null,useRc:n=!0}={}){let u=tot();delete u.rcFilename;let A=new nA(e),p=await nA.findRcFiles(e),h=await nA.findFolderRcFile(EE());h&&(p.find(me=>me.path===h.path)||p.unshift(h));let E=Mse(p.map(ue=>[ue.path,ue.data])),I=Bt.dot,v=new Set(Object.keys(Pb)),x=({yarnPath:ue,ignorePath:me,injectEnvironmentFiles:he})=>({yarnPath:ue,ignorePath:me,injectEnvironmentFiles:he}),C=({yarnPath:ue,ignorePath:me,injectEnvironmentFiles:he,...Be})=>{let we={};for(let[g,Ee]of Object.entries(Be))v.has(g)&&(we[g]=Ee);return we},R=({yarnPath:ue,ignorePath:me,...he})=>{let Be={};for(let[we,g]of Object.entries(he))v.has(we)||(Be[we]=g);return Be};if(A.importSettings(x(Pb)),A.useWithSource("",x(u),e,{strict:!1}),E){let[ue,me]=E;A.useWithSource(ue,x(me),I,{strict:!1})}if(a){if(await sot({configuration:A,selfPath:a})!==null)return A;A.useWithSource("",{ignorePath:!0},e,{strict:!1,overwrite:!0})}let N=await nA.findProjectCwd(e);A.startingCwd=e,A.projectCwd=N;let U=Object.assign(Object.create(null),process.env);A.env=U;let V=await Promise.all(A.get("injectEnvironmentFiles").map(async ue=>{let me=ue.endsWith("?")?await oe.readFilePromise(ue.slice(0,-1),"utf8").catch(()=>""):await oe.readFilePromise(ue,"utf8");return(0,Sle.parse)(me)}));for(let ue of V)for(let[me,he]of Object.entries(ue))A.env[me]=iS(he,{env:U});if(A.importSettings(C(Pb)),A.useWithSource("",C(u),e,{strict:o}),E){let[ue,me]=E;A.useWithSource(ue,C(me),I,{strict:o})}let te=ue=>"default"in ue?ue.default:ue,ae=new Map([["@@core",sse]]);if(r!==null)for(let ue of r.plugins.keys())ae.set(ue,te(r.modules.get(ue)));for(let[ue,me]of ae)A.activatePlugin(ue,me);let fe=new Map([]);if(r!==null){let ue=new Map;for(let Be of ble.builtinModules)ue.set(Be,()=>Df(Be));for(let[Be,we]of r.modules)ue.set(Be,()=>we);let me=new Set,he=async(Be,we)=>{let{factory:g,name:Ee}=Df(Be);if(!g||me.has(Ee))return;let Pe=new Map(ue),ce=ee=>{if(Pe.has(ee))return Pe.get(ee)();throw new it(`This plugin cannot access the package referenced via ${ee} which is neither a builtin, nor an exposed entry`)},ne=await Ky(async()=>te(await g(ce)),ee=>`${ee} (when initializing ${Ee}, defined in ${we})`);ue.set(Ee,()=>ne),me.add(Ee),fe.set(Ee,ne)};if(u.plugins)for(let Be of u.plugins.split(";")){let we=z.resolve(e,le.toPortablePath(Be));await he(we,"")}for(let{path:Be,cwd:we,data:g}of p)if(!!n&&!!Array.isArray(g.plugins))for(let Ee of g.plugins){let Pe=typeof Ee!="string"?Ee.path:Ee,ce=Ee?.spec??"",ne=Ee?.checksum??"";if(v1.has(ce))continue;let ee=z.resolve(we,le.toPortablePath(Pe));if(!await oe.existsPromise(ee)){if(!ce){let At=Ut(A,z.basename(ee,".cjs"),yt.NAME),H=Ut(A,".gitignore",yt.NAME),at=Ut(A,A.values.get("rcFilename"),yt.NAME),Re=Ut(A,"https://yarnpkg.com/getting-started/qa#which-files-should-be-gitignored",yt.URL);throw new it(`Missing source for the ${At} plugin - please try to remove the plugin from ${at} then reinstall it manually. This error usually occurs because ${H} is incorrect, check ${Re} to make sure your plugin folder isn't gitignored.`)}if(!ce.match(/^https?:/)){let At=Ut(A,z.basename(ee,".cjs"),yt.NAME),H=Ut(A,A.values.get("rcFilename"),yt.NAME);throw new it(`Failed to recognize the source for the ${At} plugin - please try to delete the plugin from ${H} then reinstall it manually.`)}let Ie=await N4(ce,{configuration:A}),Fe=Js(Ie);if(ne&&ne!==Fe){let At=Ut(A,z.basename(ee,".cjs"),yt.NAME),H=Ut(A,A.values.get("rcFilename"),yt.NAME),at=Ut(A,`yarn plugin import ${ce}`,yt.CODE);throw new it(`Failed to fetch the ${At} plugin from its remote location: its checksum seems to have changed. If this is expected, please remove the plugin from ${H} then run ${at} to reimport it.`)}await oe.mkdirPromise(z.dirname(ee),{recursive:!0}),await oe.writeFilePromise(ee,Ie)}await he(ee,Be)}}for(let[ue,me]of fe)A.activatePlugin(ue,me);if(A.useWithSource("",R(u),e,{strict:o}),E){let[ue,me]=E;A.useWithSource(ue,R(me),I,{strict:o})}return A.get("enableGlobalCache")&&(A.values.set("cacheFolder",`${A.get("globalFolder")}/cache`),A.sources.set("cacheFolder","")),A}static async findRcFiles(e){let r=G4(),o=[],a=e,n=null;for(;a!==n;){n=a;let u=z.join(n,r);if(oe.existsSync(u)){let A=await oe.readFilePromise(u,"utf8"),p;try{p=Ki(A)}catch{let E="";throw A.match(/^\s+(?!-)[^:]+\s+\S+/m)&&(E=" (in particular, make sure you list the colons after each key name)"),new it(`Parse error when loading ${u}; please check it's proper Yaml${E}`)}o.unshift({path:u,cwd:n,data:p})}a=z.dirname(n)}return o}static async findFolderRcFile(e){let r=z.join(e,dr.rc),o;try{o=await oe.readFilePromise(r,"utf8")}catch(n){if(n.code==="ENOENT")return null;throw n}let a=Ki(o);return{path:r,cwd:e,data:a}}static async findProjectCwd(e){let r=null,o=e,a=null;for(;o!==a;){if(a=o,oe.existsSync(z.join(a,dr.lockfile)))return a;oe.existsSync(z.join(a,dr.manifest))&&(r=a),o=z.dirname(a)}return r}static async updateConfiguration(e,r,o={}){let a=G4(),n=z.join(e,a),u=oe.existsSync(n)?Ki(await oe.readFilePromise(n,"utf8")):{},A=!1,p;if(typeof r=="function"){try{p=r(u)}catch{p=r({})}if(p===u)return!1}else{p=u;for(let h of Object.keys(r)){let E=u[h],I=r[h],v;if(typeof I=="function")try{v=I(E)}catch{v=I(void 0)}else v=I;E!==v&&(v===nA.deleteProperty?delete p[h]:p[h]=v,A=!0)}if(!A)return!1}return await oe.changeFilePromise(n,Ba(p),{automaticNewlines:!0}),!0}static async addPlugin(e,r){r.length!==0&&await nA.updateConfiguration(e,o=>{let a=o.plugins??[];if(a.length===0)return{...o,plugins:r};let n=[],u=[...r];for(let A of a){let p=typeof A!="string"?A.path:A,h=u.find(E=>E.path===p);h?(n.push(h),u=u.filter(E=>E!==h)):n.push(A)}return n.push(...u),{...o,plugins:n}})}static async updateHomeConfiguration(e){let r=EE();return await nA.updateConfiguration(r,e)}activatePlugin(e,r){this.plugins.set(e,r),typeof r.configuration<"u"&&this.importSettings(r.configuration)}importSettings(e){for(let[r,o]of Object.entries(e))if(o!=null){if(this.settings.has(r))throw new Error(`Cannot redefine settings "${r}"`);this.settings.set(r,o),this.values.set(r,W4(this,o))}}useWithSource(e,r,o,a){try{this.use(e,r,o,a)}catch(n){throw n.message+=` (in ${Ut(this,e,yt.PATH)})`,n}}use(e,r,o,{strict:a=!0,overwrite:n=!1}={}){a=a&&this.get("enableStrictSettings");for(let u of["enableStrictSettings",...Object.keys(r)]){let A=r[u],p=mM(A);if(p&&(e=p),typeof A>"u"||u==="plugins"||e===""&&Xst.has(u))continue;if(u==="rcFilename")throw new it(`The rcFilename settings can only be set via ${`${bb}RC_FILENAME`.toUpperCase()}, not via a rc file`);let h=this.settings.get(u);if(!h){let I=EE(),v=e[0]!=="<"?z.dirname(e):null;if(a&&!(v!==null?I===v:!1))throw new it(`Unrecognized or legacy configuration settings found: ${u} - run "yarn config -v" to see the list of settings supported in Yarn`);this.invalid.set(u,e);continue}if(this.sources.has(u)&&!(n||h.type==="MAP"||h.isArray&&h.concatenateValues))continue;let E;try{E=Y4(this,u,A,h,o)}catch(I){throw I.message+=` in ${Ut(this,e,yt.PATH)}`,I}if(u==="enableStrictSettings"&&e!==""){a=E;continue}if(h.type==="MAP"){let I=this.values.get(u);this.values.set(u,new Map(n?[...I,...E]:[...E,...I])),this.sources.set(u,`${this.sources.get(u)}, ${e}`)}else if(h.isArray&&h.concatenateValues){let I=this.values.get(u);this.values.set(u,n?[...I,...E]:[...E,...I]),this.sources.set(u,`${this.sources.get(u)}, ${e}`)}else this.values.set(u,E),this.sources.set(u,e)}}get(e){if(!this.values.has(e))throw new Error(`Invalid configuration key "${e}"`);return this.values.get(e)}getSpecial(e,{hideSecrets:r=!1,getNativePaths:o=!1}){let a=this.get(e),n=this.settings.get(e);if(typeof n>"u")throw new it(`Couldn't find a configuration settings named "${e}"`);return Sb(a,n,{hideSecrets:r,getNativePaths:o})}getSubprocessStreams(e,{header:r,prefix:o,report:a}){let n,u,A=oe.createWriteStream(e);if(this.get("enableInlineBuilds")){let p=a.createStreamReporter(`${o} ${Ut(this,"STDOUT","green")}`),h=a.createStreamReporter(`${o} ${Ut(this,"STDERR","red")}`);n=new q4.PassThrough,n.pipe(p),n.pipe(A),u=new q4.PassThrough,u.pipe(h),u.pipe(A)}else n=A,u=A,typeof r<"u"&&n.write(`${r} `);return{stdout:n,stderr:u}}makeResolver(){let e=[];for(let r of this.plugins.values())for(let o of r.resolvers||[])e.push(new o);return new Pd([new c1,new Xn,...e])}makeFetcher(){let e=[];for(let r of this.plugins.values())for(let o of r.fetchers||[])e.push(new o);return new hE([new gE,new mE,...e])}getLinkers(){let e=[];for(let r of this.plugins.values())for(let o of r.linkers||[])e.push(new o);return e}getSupportedArchitectures(){let e=B1(),r=this.get("supportedArchitectures"),o=r.get("os");o!==null&&(o=o.map(u=>u==="current"?e.os:u));let a=r.get("cpu");a!==null&&(a=a.map(u=>u==="current"?e.cpu:u));let n=r.get("libc");return n!==null&&(n=ol(n,u=>u==="current"?e.libc??ol.skip:u)),{os:o,cpu:a,libc:n}}async getPackageExtensions(){if(this.packageExtensions!==null)return this.packageExtensions;this.packageExtensions=new Map;let e=this.packageExtensions,r=(o,a,{userProvided:n=!1}={})=>{if(!xa(o.range))throw new Error("Only semver ranges are allowed as keys for the packageExtensions setting");let u=new Ot;u.load(a,{yamlCompatibilityMode:!0});let A=Yy(e,o.identHash),p=[];A.push([o.range,p]);let h={status:"inactive",userProvided:n,parentDescriptor:o};for(let E of u.dependencies.values())p.push({...h,type:"Dependency",descriptor:E});for(let E of u.peerDependencies.values())p.push({...h,type:"PeerDependency",descriptor:E});for(let[E,I]of u.peerDependenciesMeta)for(let[v,x]of Object.entries(I))p.push({...h,type:"PeerDependencyMeta",selector:E,key:v,value:x})};await this.triggerHook(o=>o.registerPackageExtensions,this,r);for(let[o,a]of this.get("packageExtensions"))r(sh(o,!0),nS(a),{userProvided:!0});return e}normalizeLocator(e){return xa(e.reference)?Qs(e,`${this.get("defaultProtocol")}${e.reference}`):FE.test(e.reference)?Qs(e,`${this.get("defaultProtocol")}${e.reference}`):e}normalizeDependency(e){return xa(e.range)?In(e,`${this.get("defaultProtocol")}${e.range}`):FE.test(e.range)?In(e,`${this.get("defaultProtocol")}${e.range}`):e}normalizeDependencyMap(e){return new Map([...e].map(([r,o])=>[r,this.normalizeDependency(o)]))}normalizePackage(e,{packageExtensions:r}){let o=e1(e),a=r.get(e.identHash);if(typeof a<"u"){let u=e.version;if(u!==null){for(let[A,p]of a)if(!!kf(u,A))for(let h of p)switch(h.status==="inactive"&&(h.status="redundant"),h.type){case"Dependency":typeof o.dependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.dependencies.set(h.descriptor.identHash,this.normalizeDependency(h.descriptor)));break;case"PeerDependency":typeof o.peerDependencies.get(h.descriptor.identHash)>"u"&&(h.status="active",o.peerDependencies.set(h.descriptor.identHash,h.descriptor));break;case"PeerDependencyMeta":{let E=o.peerDependenciesMeta.get(h.selector);(typeof E>"u"||!Object.hasOwn(E,h.key)||E[h.key]!==h.value)&&(h.status="active",al(o.peerDependenciesMeta,h.selector,()=>({}))[h.key]=h.value)}break;default:EN(h)}}}let n=u=>u.scope?`${u.scope}__${u.name}`:`${u.name}`;for(let u of o.peerDependenciesMeta.keys()){let A=Vs(u);o.peerDependencies.has(A.identHash)||o.peerDependencies.set(A.identHash,In(A,"*"))}for(let u of o.peerDependencies.values()){if(u.scope==="types")continue;let A=n(u),p=tA("types",A),h=fn(p);o.peerDependencies.has(p.identHash)||o.peerDependenciesMeta.has(h)||(o.peerDependencies.set(p.identHash,In(p,"*")),o.peerDependenciesMeta.set(h,{optional:!0}))}return o.dependencies=new Map(ks(o.dependencies,([,u])=>Sa(u))),o.peerDependencies=new Map(ks(o.peerDependencies,([,u])=>Sa(u))),o}getLimit(e){return al(this.limits,e,()=>(0,xle.default)(this.get(e)))}async triggerHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);!n||await n(...r)}}async triggerMultipleHooks(e,r){for(let o of r)await this.triggerHook(e,...o)}async reduceHook(e,r,...o){let a=r;for(let n of this.plugins.values()){let u=n.hooks;if(!u)continue;let A=e(u);!A||(a=await A(a,...o))}return a}async firstHook(e,...r){for(let o of this.plugins.values()){let a=o.hooks;if(!a)continue;let n=e(a);if(!n)continue;let u=await n(...r);if(typeof u<"u")return u}return null}},Ke=nA;Ke.deleteProperty=Symbol(),Ke.telemetry=null});var Ur={};zt(Ur,{EndStrategy:()=>J4,ExecError:()=>kb,PipeError:()=>S1,execvp:()=>_4,pipevp:()=>Yc});function xd(t){return t!==null&&typeof t.fd=="number"}function K4(){}function z4(){for(let t of kd)t.kill()}async function Yc(t,e,{cwd:r,env:o=process.env,strict:a=!1,stdin:n=null,stdout:u,stderr:A,end:p=2}){let h=["pipe","pipe","pipe"];n===null?h[0]="ignore":xd(n)&&(h[0]=n),xd(u)&&(h[1]=u),xd(A)&&(h[2]=A);let E=(0,V4.default)(t,e,{cwd:le.fromPortablePath(r),env:{...o,PWD:le.fromPortablePath(r)},stdio:h});kd.add(E),kd.size===1&&(process.on("SIGINT",K4),process.on("SIGTERM",z4)),!xd(n)&&n!==null&&n.pipe(E.stdin),xd(u)||E.stdout.pipe(u,{end:!1}),xd(A)||E.stderr.pipe(A,{end:!1});let I=()=>{for(let v of new Set([u,A]))xd(v)||v.end()};return new Promise((v,x)=>{E.on("error",C=>{kd.delete(E),kd.size===0&&(process.off("SIGINT",K4),process.off("SIGTERM",z4)),(p===2||p===1)&&I(),x(C)}),E.on("close",(C,R)=>{kd.delete(E),kd.size===0&&(process.off("SIGINT",K4),process.off("SIGTERM",z4)),(p===2||p===1&&C!==0)&&I(),C===0||!a?v({code:X4(C,R)}):x(new S1({fileName:t,code:C,signal:R}))})})}async function _4(t,e,{cwd:r,env:o=process.env,encoding:a="utf8",strict:n=!1}){let u=["ignore","pipe","pipe"],A=[],p=[],h=le.fromPortablePath(r);typeof o.PWD<"u"&&(o={...o,PWD:h});let E=(0,V4.default)(t,e,{cwd:h,env:o,stdio:u});return E.stdout.on("data",I=>{A.push(I)}),E.stderr.on("data",I=>{p.push(I)}),await new Promise((I,v)=>{E.on("error",x=>{let C=Ke.create(r),R=Ut(C,t,yt.PATH);v(new Jt(1,`Process ${R} failed to spawn`,N=>{N.reportError(1,` ${Xu(C,{label:"Thrown Error",value:Hc(yt.NO_HINT,x.message)})}`)}))}),E.on("close",(x,C)=>{let R=a==="buffer"?Buffer.concat(A):Buffer.concat(A).toString(a),N=a==="buffer"?Buffer.concat(p):Buffer.concat(p).toString(a);x===0||!n?I({code:X4(x,C),stdout:R,stderr:N}):v(new kb({fileName:t,code:x,signal:C,stdout:R,stderr:N}))})})}function X4(t,e){let r=oot.get(e);return typeof r<"u"?128+r:t??1}function aot(t,e,{configuration:r,report:o}){o.reportError(1,` ${Xu(r,t!==null?{label:"Exit Code",value:Hc(yt.NUMBER,t)}:{label:"Exit Signal",value:Hc(yt.CODE,e)})}`)}var V4,J4,S1,kb,kd,oot,Db=Et(()=>{Pt();V4=$e(sT());P1();Wl();jl();J4=(o=>(o[o.Never=0]="Never",o[o.ErrorCode=1]="ErrorCode",o[o.Always=2]="Always",o))(J4||{}),S1=class extends Jt{constructor({fileName:r,code:o,signal:a}){let n=Ke.create(z.cwd()),u=Ut(n,r,yt.PATH);super(1,`Child ${u} reported an error`,A=>{aot(o,a,{configuration:n,report:A})});this.code=X4(o,a)}},kb=class extends S1{constructor({fileName:r,code:o,signal:a,stdout:n,stderr:u}){super({fileName:r,code:o,signal:a});this.stdout=n,this.stderr=u}};kd=new Set;oot=new Map([["SIGINT",2],["SIGQUIT",3],["SIGKILL",9],["SIGTERM",15]])});function Fle(t){Qle=t}function b1(){return typeof Z4>"u"&&(Z4=Qle()),Z4}var Z4,Qle,$4=Et(()=>{Qle=()=>{throw new Error("Assertion failed: No libzip instance is available, and no factory was configured")}});var Rle=_((Qb,tU)=>{var lot=Object.assign({},ve("fs")),eU=function(){var t=typeof document<"u"&&document.currentScript?document.currentScript.src:void 0;return typeof __filename<"u"&&(t=t||__filename),function(e){e=e||{};var r=typeof e<"u"?e:{},o,a;r.ready=new Promise(function(We,tt){o=We,a=tt});var n={},u;for(u in r)r.hasOwnProperty(u)&&(n[u]=r[u]);var A=[],p="./this.program",h=function(We,tt){throw tt},E=!1,I=!0,v="";function x(We){return r.locateFile?r.locateFile(We,v):v+We}var C,R,N,U;I&&(E?v=ve("path").dirname(v)+"/":v=__dirname+"/",C=function(tt,It){var ir=ii(tt);return ir?It?ir:ir.toString():(N||(N=lot),U||(U=ve("path")),tt=U.normalize(tt),N.readFileSync(tt,It?null:"utf8"))},R=function(tt){var It=C(tt,!0);return It.buffer||(It=new Uint8Array(It)),Ee(It.buffer),It},process.argv.length>1&&(p=process.argv[1].replace(/\\/g,"/")),A=process.argv.slice(2),h=function(We){process.exit(We)},r.inspect=function(){return"[Emscripten Module object]"});var V=r.print||console.log.bind(console),te=r.printErr||console.warn.bind(console);for(u in n)n.hasOwnProperty(u)&&(r[u]=n[u]);n=null,r.arguments&&(A=r.arguments),r.thisProgram&&(p=r.thisProgram),r.quit&&(h=r.quit);var ae=0,fe=function(We){ae=We},ue;r.wasmBinary&&(ue=r.wasmBinary);var me=r.noExitRuntime||!0;typeof WebAssembly!="object"&&Ti("no native wasm support detected");function he(We,tt,It){switch(tt=tt||"i8",tt.charAt(tt.length-1)==="*"&&(tt="i32"),tt){case"i1":return He[We>>0];case"i8":return He[We>>0];case"i16":return up((We>>1)*2);case"i32":return Os((We>>2)*4);case"i64":return Os((We>>2)*4);case"float":return uu((We>>2)*4);case"double":return cp((We>>3)*8);default:Ti("invalid type for getValue: "+tt)}return null}var Be,we=!1,g;function Ee(We,tt){We||Ti("Assertion failed: "+tt)}function Pe(We){var tt=r["_"+We];return Ee(tt,"Cannot call unknown function "+We+", make sure it is exported"),tt}function ce(We,tt,It,ir,$){var ye={string:function(es){var bi=0;if(es!=null&&es!==0){var qo=(es.length<<2)+1;bi=Un(qo),At(es,bi,qo)}return bi},array:function(es){var bi=Un(es.length);return Re(es,bi),bi}};function Ne(es){return tt==="string"?Ie(es):tt==="boolean"?Boolean(es):es}var pt=Pe(We),ht=[],Tt=0;if(ir)for(var er=0;er=It)&&Te[ir];)++ir;return ee.decode(Te.subarray(We,ir))}function Fe(We,tt,It,ir){if(!(ir>0))return 0;for(var $=It,ye=It+ir-1,Ne=0;Ne=55296&&pt<=57343){var ht=We.charCodeAt(++Ne);pt=65536+((pt&1023)<<10)|ht&1023}if(pt<=127){if(It>=ye)break;tt[It++]=pt}else if(pt<=2047){if(It+1>=ye)break;tt[It++]=192|pt>>6,tt[It++]=128|pt&63}else if(pt<=65535){if(It+2>=ye)break;tt[It++]=224|pt>>12,tt[It++]=128|pt>>6&63,tt[It++]=128|pt&63}else{if(It+3>=ye)break;tt[It++]=240|pt>>18,tt[It++]=128|pt>>12&63,tt[It++]=128|pt>>6&63,tt[It++]=128|pt&63}}return tt[It]=0,It-$}function At(We,tt,It){return Fe(We,Te,tt,It)}function H(We){for(var tt=0,It=0;It=55296&&ir<=57343&&(ir=65536+((ir&1023)<<10)|We.charCodeAt(++It)&1023),ir<=127?++tt:ir<=2047?tt+=2:ir<=65535?tt+=3:tt+=4}return tt}function at(We){var tt=H(We)+1,It=Ni(tt);return It&&Fe(We,He,It,tt),It}function Re(We,tt){He.set(We,tt)}function ke(We,tt){return We%tt>0&&(We+=tt-We%tt),We}var xe,He,Te,Ve,qe,b,w,S,y,F;function J(We){xe=We,r.HEAP_DATA_VIEW=F=new DataView(We),r.HEAP8=He=new Int8Array(We),r.HEAP16=Ve=new Int16Array(We),r.HEAP32=b=new Int32Array(We),r.HEAPU8=Te=new Uint8Array(We),r.HEAPU16=qe=new Uint16Array(We),r.HEAPU32=w=new Uint32Array(We),r.HEAPF32=S=new Float32Array(We),r.HEAPF64=y=new Float64Array(We)}var X=r.INITIAL_MEMORY||16777216,Z,ie=[],be=[],Le=[],ot=!1;function dt(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)bt(r.preRun.shift());oo(ie)}function Gt(){ot=!0,oo(be)}function $t(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)Qr(r.postRun.shift());oo(Le)}function bt(We){ie.unshift(We)}function an(We){be.unshift(We)}function Qr(We){Le.unshift(We)}var mr=0,br=null,Wr=null;function Kn(We){mr++,r.monitorRunDependencies&&r.monitorRunDependencies(mr)}function Ls(We){if(mr--,r.monitorRunDependencies&&r.monitorRunDependencies(mr),mr==0&&(br!==null&&(clearInterval(br),br=null),Wr)){var tt=Wr;Wr=null,tt()}}r.preloadedImages={},r.preloadedAudios={};function Ti(We){r.onAbort&&r.onAbort(We),We+="",te(We),we=!0,g=1,We="abort("+We+"). Build with -s ASSERTIONS=1 for more info.";var tt=new WebAssembly.RuntimeError(We);throw a(tt),tt}var ps="data:application/octet-stream;base64,";function io(We){return We.startsWith(ps)}var Si="data:application/octet-stream;base64,AGFzbQEAAAAB/wEkYAN/f38Bf2ABfwF/YAJ/fwF/YAF/AGAEf39/fwF/YAN/f38AYAV/f39/fwF/YAJ/fwBgBH9/f38AYAABf2AFf39/fn8BfmAEf35/fwF/YAR/f35/AX5gAn9+AX9gA398fwBgA39/fgF/YAF/AX5gBn9/f39/fwF/YAN/fn8Bf2AEf39/fwF+YAV/f35/fwF/YAR/f35/AX9gA39/fgF+YAJ/fgBgAn9/AX5gBX9/f39/AGADf35/AX5gBX5+f35/AX5gA39/fwF+YAZ/fH9/f38Bf2AAAGAHf35/f39+fwF/YAV/fn9/fwF/YAV/f39/fwF+YAJ+fwF/YAJ/fAACJQYBYQFhAAMBYQFiAAEBYQFjAAABYQFkAAEBYQFlAAIBYQFmAAED5wHlAQMAAwEDAwEHDAgDFgcNEgEDDRcFAQ8DEAUQAwIBAhgECxkEAQMBBQsFAwMDARACBAMAAggLBwEAAwADGgQDGwYGABwBBgMTFBEHBwcVCx4ABAgHBAICAgAfAQICAgIGFSAAIQAiAAIBBgIHAg0LEw0FAQUCACMDAQAUAAAGBQECBQUDCwsSAgEDBQIHAQEICAACCQQEAQABCAEBCQoBAwkBAQEBBgEGBgYABAIEBAQGEQQEAAARAAEDCQEJAQAJCQkBAQECCgoAAAMP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AIAAoAkQgAiAAKAJoIgRqayECIAEgBmogBE0EQCAAKAJIIgEgASADaiADEAcaAkAgAyAAKAJsIgFNBEAgACABIANrNgJsDAELIABCADcCbAsgACAAKAJoIANrIgE2AmggACAAKAJYIANrNgJYIAEgACgChC5JBEAgACABNgKELgsgAEH8gAEoAgARAwAgAiADaiECCwJAIAAoAgAiASgCBCIERQ0AIAAoAjwhBSAAIAIgBCACIARJGyICBH8gACgCSCAAKAJoaiAFaiEFIAEgBCACazYCBAJAAkACQAJAIAEoAhwiBCgCFEEBaw4CAQACCyAEQaABaiAFIAEoAgAgAkHcgAEoAgARCAAMAgsgASABKAIwIAUgASgCACACQcSAASgCABEEADYCMAwBCyAFIAEoAgAgAhAHGgsgASABKAIAIAJqNgIAIAEgASgCCCACajYCCCAAKAI8BSAFCyACaiICNgI8AkAgACgChC4iASACakEDSQ0AIAAoAmggAWshAQJAIAAoAnRBgQhPBEAgACAAIAAoAkggAWoiAi0AACACLQABIAAoAnwRAAA2AlQMAQsgAUUNACAAIAFBAWsgACgChAERAgAaCyAAKAKELiAAKAI8IgJBAUZrIgRFDQAgACABIAQgACgCgAERBQAgACAAKAKELiAEazYChC4gACgCPCECCyACQYUCSw0AIAAoAgAoAgRFDQAgACgCMCEBDAELCwJAIAAoAkQiAiAAKAJAIgNNDQAgAAJ/IAAoAjwgACgCaGoiASADSwRAIAAoAkggAWpBACACIAFrIgNBggIgA0GCAkkbIgMQGSABIANqDAELIAFBggJqIgEgA00NASAAKAJIIANqQQAgAiADayICIAEgA2siAyACIANJGyIDEBkgACgCQCADags2AkALC50CAQF/AkAgAAJ/IAAoAqAuIgFBwABGBEAgACgCBCAAKAIQaiAAKQOYLjcAACAAQgA3A5guIAAgACgCEEEIajYCEEEADAELIAFBIE4EQCAAKAIEIAAoAhBqIAApA5guPgAAIAAgAEGcLmo1AgA3A5guIAAgACgCEEEEajYCECAAIAAoAqAuQSBrIgE2AqAuCyABQRBOBEAgACgCBCAAKAIQaiAAKQOYLj0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2IIR0gAy0AACIERQ0HDAELCyAEQSBxBEAgB0G//gA2AgQgASECDAgLIAdB0f4ANgIEIABB0A42AhggASECDAcLIB1BfyAGdEF/c62DIBt8IhunIQUgCCAEQQ9xIgNrIQggGiAErUIPg4ghHSABIBdrIgYgAjMBAiAaQX8gA3RBf3Otg3ynIgRPDQIgBCAGayIGIBlNDQEgBygCjEdFDQEgB0HR/gA2AgQgAEG5DDYCGAsgASECIAshBQwFCwJAIA5FBEAgDCARIAZraiEDDAELIAYgDk0EQCAMIA4gBmtqIQMMAQsgDCARIAYgDmsiBmtqIQMgBSAGTQ0AIAUgBmshBQJAAkAgASADTSABIA8gAWusIhogBq0iGyAaIBtUGyIapyIGaiICIANLcQ0AIAMgBmogAUsgASADT3ENACABIAMgBhAHGiACIQEMAQsgASADIAMgAWsiASABQR91IgFqIAFzIgIQByACaiEBIBogAq0iHn0iHFANACACIANqIQIDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgASACKQAANwAAIAEgAikAGDcAGCABIAIpABA3ABAgASACKQAINwAIIBpCIH0hGiACQSBqIQIgAUEgaiEBIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAEgAikAADcAACABIAIpABg3ABggASACKQAQNwAQIAEgAikACDcACCABIAIpADg3ADggASACKQAwNwAwIAEgAikAKDcAKCABIAIpACA3ACAgASACKQBYNwBYIAEgAikAUDcAUCABIAIpAEg3AEggASACKQBANwBAIAEgAikAYDcAYCABIAIpAGg3AGggASACKQBwNwBwIAEgAikAeDcAeCACQYABaiECIAFBgAFqIQEgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAEgAikAADcAACABIAIpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCABIAIpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCABIAIoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCABIAIvAA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gBEEDSw0AIAMhBCABIANLDQELC0EAIANrIQULIAIgBWohBAJAIAUgDyACa6wiGiABrSIbIBogG1QbIhqnIgFIIAVBf0pxDQAgBUEBSCABIARqIAJLcQ0AIAIgBCABEAcgAWohAgwDCyACIAQgAyADQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANAiABIARqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiABKQAwNwAwIAIgASkAKDcAKCACIAEpACA3ACAgAiABKQBYNwBYIAIgASkAUDcAUCACIAEpAEg3AEggAiABKQBANwBAIAIgASkAYDcAYCACIAEpAGg3AGggAiABKQBwNwBwIAIgASkAeDcAeCABQYABaiEBIAJBgAFqIQIgGkKAAX0iGkIfVg0ACwsgGkIQWgRAIAIgASkAADcAACACIAEpAAg3AAggGkIQfSEaIAJBEGohAiABQRBqIQELIBpCCFoEQCACIAEpAAA3AAAgGkIIfSEaIAJBCGohAiABQQhqIQELIBpCBFoEQCACIAEoAAA2AAAgGkIEfSEaIAJBBGohAiABQQRqIQELIBpCAloEQCACIAEvAAA7AAAgGkICfSEaIAJBAmohAiABQQJqIQELIBwgG30hHCAaUEUEQCACIAEtAAA6AAAgAkEBaiECIAFBAWohAQsgHFBFDQALDAILAkAgASADTSABIA8gAWusIhogBa0iGyAaIBtUGyIapyIEaiICIANLcQ0AIAMgBGogAUsgASADT3ENACABIAMgBBAHGgwCCyABIAMgAyABayIBIAFBH3UiAWogAXMiARAHIAFqIQIgGiABrSIefSIcUA0BIAEgA2ohAQNAAkAgHCAeIBwgHlQbIhtCIFQEQCAbIRoMAQsgGyIaQiB9IiBCBYhCAXxCA4MiH1BFBEADQCACIAEpAAA3AAAgAiABKQAYNwAYIAIgASkAEDcAECACIAEpAAg3AAggGkIgfSEaIAFBIGohASACQSBqIQIgH0IBfSIfQgBSDQALCyAgQuAAVA0AA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIAIgASkAODcAOCACIAEpADA3ADAgAiABKQAoNwAoIAIgASkAIDcAICACIAEpAFg3AFggAiABKQBQNwBQIAIgASkASDcASCACIAEpAEA3AEAgAiABKQBgNwBgIAIgASkAaDcAaCACIAEpAHA3AHAgAiABKQB4NwB4IAFBgAFqIQEgAkGAAWohAiAaQoABfSIaQh9WDQALCyAaQhBaBEAgAiABKQAANwAAIAIgASkACDcACCAaQhB9IRogAkEQaiECIAFBEGohAQsgGkIIWgRAIAIgASkAADcAACAaQgh9IRogAkEIaiECIAFBCGohAQsgGkIEWgRAIAIgASgAADYAACAaQgR9IRogAkEEaiECIAFBBGohAQsgGkICWgRAIAIgAS8AADsAACAaQgJ9IRogAkECaiECIAFBAmohAQsgHCAbfSEcIBpQRQRAIAIgAS0AADoAACACQQFqIQIgAUEBaiEBCyAcUEUNAAsMAQsCQAJAIBYEQAJAIAQgBUkEQCAHKAKYRyAESw0BCyABIARrIQMCQEEAIARrIgVBf0ogDyABa6wiGiAbIBogG1QbIhqnIgIgBUpxDQAgBUEBSCACIANqIAFLcQ0AIAEgAyACEAcgAmohAgwFCyABIAMgBCAEQR91IgFqIAFzIgEQByABaiECIBogAa0iHn0iHFANBCABIANqIQEDQAJAIBwgHiAcIB5UGyIbQiBUBEAgGyEaDAELIBsiGkIgfSIgQgWIQgF8QgODIh9QRQRAA0AgAiABKQAANwAAIAIgASkAGDcAGCACIAEpABA3ABAgAiABKQAINwAIIBpCIH0hGiABQSBqIQEgAkEgaiECIB9CAX0iH0IAUg0ACwsgIELgAFQNAANAIAIgASkAADcAACACIAEpABg3ABggAiABKQAQNwAQIAIgASkACDcACCACIAEpADg3ADggAiAB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ADoABiAJQQZrIQYgA0EHayEFIAJBAWohAgJAIAFBB2oiCkEHcUUNACAFRQ0AIAEgAi0AADoAByAJQQdrIQYgA0EIayEDIAFBCGohASACQQFqIQIMBgsgCiEBIAUhAwwFCyAKIQEgBSEDDAQLIAohASAFIQMMAwsgCiEBIAUhAwwCCyAKIQEgBSEDDAELIAohASAFIQMLAkACQCAGQRdNBEAgA0UNASADQQFrIQUgA0EHcSIEBEADQCABIAItAAA6AAAgA0EBayEDIAFBAWohASACQQFqIQIgBEEBayIEDQALCyAFQQdJDQEDQCABIAItAAA6AAAgASACLQABOgABIAEgAi0AAjoAAiABIAItAAM6AAMgASACLQAEOgAEIAEgAi0ABToABSABIAItAAY6AAYgASACLQAHOgAHIAFBCGohASACQQhqIQIgA0EIayIDDQALDAELIAMNAQsgASECDAELIAEgBCADED8hAgsgCyEFDAELIAEgAy0AAjoAACABQQFqIQILIAUgFE8NACACIBNJDQELCyAAIAI2AgwgACAFIAhBA3ZrIgE2AgAgACATIAJrQYMCajYCECAAIBQgAWtBDmo2AgQgByAIQQdxIgA2AogBIAcgHUJ/IACthkJ/hYM+AoQBC+cFAQR/IAMgAiACIANLGyEEIAAgAWshAgJAIABBB3FFDQAgBEUNACAAIAItAAA6AAAgA0EBayEGIAJBAWohAiAAQQFqIgdBB3FBACAEQQFrIgUbRQRAIAchACAFIQQgBiEDDAELIAAgAi0AADoAASADQQJrIQYgBEECayEFIAJBAWohAgJAIABBAmoiB0EHcUUNACAFRQ0AIAAgAi0AADoAAiADQQNrIQYgBEEDayEFIAJBAWohAgJAIABBA2oiB0EHcUUNACAFRQ0AIAAgAi0AADoAAyADQQRrIQYgBEEEayEFIAJBAWohAgJAIABBBGoiB0EHcUUNACAFRQ0AIAAgAi0AADoABCADQQVrIQYgBEEFayEFIAJBAWohAgJAIABBBWoiB0EHcUUNACAFRQ0AIAAgAi0AADoABSADQQZrIQYgBEEGayEFIAJBAWohAgJAIABBBmoiB0EHcUUNACAFRQ0AIAAgAi0A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BAAwBCyAAIAMtAAAEfiADKQMQBUIAC6dB//8DcSADKAIEEEcLIQUgAxAICyAEQRBqJAAgBQvgAQICfwF+QTAQCSICRQRAIAEEQCABQQA2AgQgAUEONgIAC0EADwsgAkIANwMIIAJBADYCACACQgA3AxAgAkIANwMYIAJCADcDICACQgA3ACUgAFAEQCACDwsCQCAAQv////8AVg0AIACnQQR0EAkiA0UNACACIAM2AgBBACEBQgEhBANAIAMgAUEEdGoiAUIANwIAIAFCADcABSAAIARSBEAgBKchASAEQgF8IQQMAQsLIAIgADcDCCACIAA3AxAgAg8LIAEEQCABQQA2AgQgAUEONgIAC0EAEBAgAhAGQQAL7gECA38BfiMAQRBrIgQkAAJAIARBDGpCBBAXIgNFBEBBfyECDAELAkAgAQRAIAJBgAZxIQUDQAJAIAUgASgCBHFFDQACQCADKQMIQgBUBEAgA0EAOgAADAELIANCADcDECADQQE6AAALIAMgAS8BCBANIAMgAS8BChANIAMtAABFBEAgAEEIaiIABEAgAEEANgIEIABBFDYCAAtBfyECDAQLQX8hAiAAIARBDGpCBBAbQQBIDQMgATMBCiIGUA0AIAAgASgCDCAGEBtBAEgNAwsgASgCACIBDQALC0EAIQILIAMQCAsgBEEQaiQAIAILPAEBfyAABEAgAUGABnEhAQNAIAEgACgCBHEEQCACIAAvAQpqQQRqIQILIAAoAgAiAA0ACwsgAkH//wNxC5wBAQN/IABFBEBBAA8LIAAhAwNAAn8CQAJAIAAvAQgiAUH04AFNBEAgAUEBRg0BIAFB9cYBRg0BDAILIAFBgbICRg0AIAFB9eABRw0BCyAAKAIAIQEgAEEANgIAIAAoAgwQBiAAEAYgASADIAAgA0YbIQMCQCACRQRAQQAhAgwBCyACIAE2AgALIAEMAQsgACICKAIACyIADQALIAMLsgQCBX8BfgJAAkACQCAAIAGtEBciAQRAIAEtAAANAUEAIQAMAgsgBARAIARBADYCBCAEQQ42AgALQQAPC0EAIQADQCABLQAABH4gASkDCCABKQMQfQVCAAtCBFQNASABEAwhByABIAEQDCIG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gAEEANgIMIABBDjYCCAtCfwteAQF/IwBBEGsiAiQAAn8gACgCJEEBRwRAIABBDGoiAARAIABBADYCBCAAQRI2AgALQX8MAQsgAkEANgIIIAIgATcDACAAIAJCEEEMEA5CP4enCyEAIAJBEGokACAAC9oDAQZ/IwBBEGsiBSQAIAUgAjYCDCMAQaABayIEJAAgBEEIakHA8ABBkAEQBxogBCAANgI0IAQgADYCHCAEQX4gAGsiA0H/////ByADQf////8HSRsiBjYCOCAEIAAgBmoiADYCJCAEIAA2AhggBEEIaiEAIwBB0AFrIgMkACADIAI2AswBIANBoAFqQQBBKBAZIAMgAygCzAE2AsgBAkBBACABIANByAFqIANB0ABqIANBoAFqEEpBAEgNACAAKAJMQQBOIQcgACgCACECIAAsAEpBAEwEQCAAIAJBX3E2AgALIAJBIHEhCAJ/IAAoAjAEQCAAIAEgA0HIAWogA0HQAGogA0GgAWoQSgwBCyAAQdAANgIwIAAgA0HQAGo2AhAgACADNgIcIAAgAzYCFCAAKAIsIQIgACADNgIsIAAgASADQcgBaiADQdAAaiADQaABahBKIAJFDQAaIABBAEEAIAAoAiQRAAAaIABBADYCMCAAIAI2AiwgAEEANgIcIABBADYCECAAKAIUGiAAQQA2AhRBAAsaIAAgACgCACAIcjYCACAHRQ0ACyADQdABaiQAIAYEQCAEKAIcIgAgACAEKAIYRmtBADoAAAsgBEGgAWokACAFQRBqJAALUwEDfwJAIAAoAgAsAABBMGtBCk8NAANAIAAoAgAiAiwAACEDIAAgAkEBajYCACABIANqQTBrIQEgAiwAAUEwa0EKTw0BIAFBCmwhAQwACwALIAELuwIAAkAgAUEUSw0AAkACQAJAAkACQAJAAkACQAJAAkAgAUEJaw4KAAECAwQFBgcICQoLIAIgAigCACIBQQRqNgIAIAAgASgCADYCAA8LIAIgAigCACIBQQRqNgIAIAAgATQCADcDAA8LIAIgAigCACIBQQRqNgIAIAAgATUCADcDAA8LIAIgAigCAEEHakF4cSIBQQhqNgIAIAAgASkDADcDAA8LIAIgAigCACIBQ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pBADsBACABQQJqIgFBngJHDQALIABBADsBzBUgAEEAOwHYEyAAQZQWakEAOwEAIABBkBZqQQA7AQAgAEGMFmpBADsBACAAQYgWakEAOwEAIABBhBZqQQA7AQAgAEGAFmpBADsBACAAQfwVakEAOwEAIABB+BVqQQA7AQAgAEH0FWpBADsBACAAQfAVakEAOwEAIABB7BVqQQA7AQAgAEHoFWpBADsBACAAQeQVakEAOwEAIABB4BVqQQA7AQAgAEHcFWpBADsBACAAQdgVakEAOwEAIABB1BVqQQA7AQAgAEHQFWpBADsBACAAQcwUakEAOwEAIABByBRqQQA7AQAgAEHEFGpBADsBACAAQcAUakEAOwEAIABBvBRqQQA7AQAgAEG4FGpBADsBACAAQbQUakEAOwEAIABBsBRqQQA7AQAgAEGsFGpBADsBACAAQagUakEAOwEAIABBpBRqQQA7AQAgAEGgFGpBADsBACAAQZwUakEAOwEAIABBmBRqQQA7AQAgAEGUFGpBADsBACAAQZAUakEAOwEAIABBjBRqQQA7AQAgAEGIFGpBADsBACAAQYQUakEAOwEAIABBgBRqQQA7AQAgAEH8E2pBADsBACAAQfgTakEAOwEAIABB9BNqQQA7AQAgAEHwE2pBADsBACAAQewTakEAOwEAIABB6BNqQQA7AQAgAEHkE2pBADsBACAAQeATakEAOwEAIABB3BNqQQA7AQAgAEIANwL8LSAAQeQJakEBOwEAIABBADYC+C0gAEEANgLwLQuKAwIGfwR+QcgAEAkiBEUEQEEADwsgBEIANwMAIARCADcDMCAEQQA2AiggBEIANwMgIARCADcDGCAEQgA3AxAgBEIANwMIIARCADcDOCABUARAIARBCBAJIgA2AgQgAEUEQCAEEAYgAwRAIANBADYCBCADQQ42AgALQQAPCyAAQgA3AwAgBA8LAkAgAaciBUEEdBAJIgZFDQAgBCAGNgIAIAVBA3RBCGoQCSIFRQ0AIAQgATcDECAEIAU2AgQDQCAAIAynIghBBHRqIgcpAwgiDVBFBEAgBygCACIHRQRAIAMEQCADQQA2AgQgA0ESNgIACyAGEAYgBRAGIAQQBkEADws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FINAAsLQn8hFyAAKAIAEB8iGEJ/VwRAIAAoAgAhASAAQQhqBEAgACABKAIMNgIIIAAgASgCEDYCDAsMAgsgEULiABAXIgZFBEAgAEEIagRAIABBADYCDCAAQQ42AggLDAILIBggFX0hEyAVQv////8PViAUQv//A1ZyIApyQQFxBEAgBkGZEkEEECwgBkIsEBggBkEtEA0gBkEtEA0gBkEAEBIgBkEAEBIgBiAUEBggBiAUEBggBiATEBggBiAVEBggBkGUEkEEECwgBkEAEBIgBiAYEBggBkEBEBILIAZBnhJBBBAsIAZBABASIAYgFEL//wMgFEL//wNUG6dB//8DcSIBEA0gBiABEA0gBkF/IBOnIBNC/v///w9WGxASIAZBfyAVpyAVQv7///8PVhsQEiAGIABBJEEgIAAtACgbaigCACIDBH8gAy8BBAVBAAtB//8DcRANIAYtAABFBEAgAEEIagRAIABBADYCDCAAQRQ2AggLIAYQCAwCCyAAIAYoAgQgBi0AAAR+IAYpAxAFQgALEBshASAGEAggAUEASA0BIAMEQCAAIAMoAgAgAzMBBBAbQQBIDQILIBMhFwwBCyAAKAIAIQEgAEEIagRAIAAgASgCDDYCCCAAIAEoAhA2AgwLQn8hFwsgEUHwAGokACAXQgBTDQAgACgCABAfQj+HpyECCyALEAYgAkEASA0BAn8gACgCACIBKAIkQQFHBEAgAUEMagRAIAFBADYCECABQRI2AgwLQX8MAQsgASgCICICQQJPBEAgAUEMagRAIAFBADYCECABQR02AgwLQX8MAQsCQCACQQFHDQAgARAaQQBODQBBfwwBCyABQQBCAEEJEA5Cf1cEQCABQQI2AiRBfwwBCyABQQA2AiRBAAtFDQIgACgCACECIAQEQCAEIAIoAgw2AgAgBCACKAIQNgIECwwBCyALEAYLIAAoAlQQfCAAKAIAEENBfyECDAILIAAoAlQQfAsgABBLQQAhAgsgB0HAwABqJAAgAgtFAEHwgwFCADcDAEHogwFCADcDAEHggwFCADcDAEHYgwFCADcDAEHQgwFCADcDAEHIgwFCADcDAEHAgwFCADcDAEHAgwELoQMBCH8jAEGg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yADKAKALkEBajYCgC4gBEH9zgBqLQAAQQJ0IANqQegJaiIBIAEvAQBBAWo7AQAgA0GAywAtAABBAnRqQdgTaiIBIAEvAQBBAWo7AQAgAyADKAI8IARrNgI8IAMgAygCaCAEaiIENgJoCyADKALwLSADKAL0LUcNAUEAIQggAyADKAJYIgFBAE4EfyADKAJIIAFqBUEACyAEIAFrQQAQDyADIAMoAmg2AlggAygCABAKIAMoAgAoAhANAQwCCwsgA0EANgKELiAKQQRGBEAgAyADKAJYIgFBAE4EfyADKAJIIAFqBUEACyADKAJoIAFrQQEQDyADIAMoAmg2AlggAygCABAKQQNBAiADKAIAKAIQGwwCCyADKALwLQRAQQAhCCADIAMoAlgiAUEATgR/IAMoAkggAWoFQQALIAMoAmggAWtBABAPIAMgAygCaDYCWCADKAIAEAogAygCACgCEEUNAQtBASEICyAICwwBCyADIAogAUEMbEG42ABqKAIAEQIACyIBQX5xQQJGBEAgA0GaBTYCIAsgAUF9cUUEQEEAIQQgBSgCEA0CDAQLIAFBAUcNAAJAAkACQCAKQQFrDgUAAQEBAgELIAMpA5guISICfwJ+IAMoAqAuIgFBA2oiCUE/TQRAQgIgAa2GICKEDAELIAFBwABGBEAgAygCBCADKAIQaiAiNwAAIAMgAygCEEEIajYCEEICISJBCgwCCyADKAIEIAMoAhBqQgIgAa2GICKENwAAIAMgAygCEEEIajYCECABQT1rIQlCAkHAACABa62ICyEiIAlBB2ogCUE5SQ0AGiADKAIEIAMoAhBqICI3AAAgAyADKAIQQQhqNgIQQgAhIiAJQTlrCyEBIAMgIjcDmC4gAyABNgKgLiADEDAMAQsgA0EAQQBBABA5IApBA0cNACADKAJQQQBBgIAIEBkgAygCPA0AIANBADYChC4gA0EANgJYIANBADYCaAsgBRAKIAUoAhANAAwDC0EAIQQgCkEERw0AAkACfwJAAkAgAygCFEEBaw4CAQADCyAFIANBoAFqQeCAASgCABEBACIBNgIwIAMoAgQgAygCEGogATYAACADIAMoAhBBBGoiATYCECADKAIEIAFqIQQgB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YCMCABQf//ATYCOCABIAIoAiAgAigCKEGAgAJBAhAoNgJIIAEgAigCICACKAIoIAEoAjBBAhAoIgM2AkwgA0EAIAEoAjBBAXQQGSACKAIgIAIoAihBgIAEQQIQKCEDIAFBgIACNgLoLSABQQA2AkAgASADNgJQIAEgAigCICACKAIoQYCAAkEEECgiAzYCBCABIAEoAugtIgRBAnQ2AgwCQAJAIAEoAkhFDQAgASgCTEUNACABKAJQRQ0AIAMNAQsgAUGaBTYCICACQejAACgCADYCGCACEIQBGkF8DAILIAFBADYCjAEgASAFNgKIASABQgA3AyggASADIARqNgLsLSABIARBA2xBA2s2AvQtQX4hAwJAIAJFDQAgAigCIEUNACACKAIkRQ0AIAIoAhwiAUUNACABKAIAIAJHDQACQAJAIAEoAiAiBEE5aw45AQICAgICAgICAgICAQICAgECAgICAgICAgICAgICAgICAgECAgICAgICAgICAgECAgICAgICAgIBAAsgBEGaBUYNACAEQSpHDQELIAJBAjYCLCACQQA2AgggAkIANwIUIAFBADYCECABIAEoAgQ2AgggASgCFCIDQX9MBEAgAUEAIANrIgM2AhQLIAFBOUEqIANBAkYbNgIgIAIgA0ECRgR/IAFBoAFqQeSAASgCABEBAAVBAQs2AjAgAUF+NgIkIAFBADYCoC4gAUIANwOYLiABQYgXakGg0wA2AgAgASABQcwVajYCgBcgAUH8FmpBjNMANgIAIAEgAUHYE2o2AvQWIAFB8BZqQfjSADYCACABIAFB5AFqNgLoFiABEIgBQQAhAwsgAw0AIAIoAhwiAiACKAIwQQF0NgJEQQAhAyACKAJQQQBBgIAIEBkgAiACKAKIASIEQQxsIgFBtNgAai8BADYClAEgAiABQbDYAGovAQA2ApABIAIgAUGy2ABqLwEANgJ4IAIgAUG22ABqLwEANgJ0QfiAASgCACEFQeyAASgCACEGQYCBASgCACEBIAJCADcCbCACQgA3AmQgAkEANgI8IAJBADYChC4gAkIANwJUIAJBKSABIARBCUYiARs2AnwgAkEqIAYgARs2AoABIAJBKyAFIAEbNgKEAQsgAwsFQXoL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AoAAAAKAAAACwAAAAsAAAAMAAAADAAAAA0AAAANAEG42AALASwAQcTYAAthLQAAAAQABAAIAAQALgAAAAQABgAQAAYALwAAAAQADAAgABgALwAAAAgAEAAgACAALwAAAAgAEACAAIAALwAAAAgAIACAAAABMAAAACAAgAACAQAEMAAAACAAAgECAQAQMABBsNkAC6UTAwAEAAUABgAHAAgACQAKAAsADQAPABEAEwAXABsAHwAjACsAMwA7AEMAUwBjAHMAgwCjAMMA4wACAQAAAAAAABAAEAAQABAAEAAQABAAEAARABEAEQARABIAEgASABIAEwATABMAEwAUABQAFAAUABUAFQAVABUAEABNAMoAAAABAAIAAwAEAAUABwAJAA0AEQAZACEAMQBBAGEAgQDBAAEBgQEBAgEDAQQBBgEIAQwBEAEYASABMAFAAWAAAAAAEAAQABAAEAARABEAEgASABMAEwAUABQAFQAVABYAFgAXABcAGAAYABkAGQAaABoAGwAbABwAHAAdAB0AQABAAGAHAAAACFAAAAgQABQIcwASBx8AAAhwAAAIMAAACcAAEAcKAAAIYAAACCAAAAmgAAAIAAAACIAAAAhAAAAJ4AAQBwYAAAhYAAAIGAAACZAAEwc7AAAIeAAACDgAAAnQABEHEQAACGgAAAgoAAAJsAAACAgAAAiIAAAISAAACfAAEAcEAAAIVAAACBQAFQjjABMHKwAACHQAAAg0AAAJyAARBw0AAAhkAAAIJAAACagAAAgEAAAIhAAACEQAAAnoABAHCAAACFwAAAgcAAAJmAAUB1MAAAh8AAAIPAAACdgAEgcXAAAIbAAACCwAAAm4AAAIDAAACIwAAAhMAAAJ+AAQBwMAAAhSAAAIEgAVCKMAEwcjAAAIcgAACDIAAAnEABEHCwAACGIAAAgiAAAJpAAACAIAAAiCAAAIQgAACeQAEAcHAAAIWgAACBoAAAmUABQHQwAACHoAAAg6AAAJ1AASBxMAAAhqAAAIKgAACbQAAAgKAAAIigAACEoAAAn0ABAHBQAACFYAAAgWAEAIAAATBzMAAAh2AAAINgAACcwAEQcPAAAIZgAACCYAAAmsAAAIBgAACIYAA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gAAAB8AAAAgAAAAIQAAACIAAAAjAAAAgERQADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADIAAAAzAAAANAAAADUAAAA2AAAANwAAADgAQfSCAQsCXEQAQbCDAQsQ/////////////////////w==";io(Si)||(Si=x(Si));function Ns(We){try{if(We==Si&&ue)return new Uint8Array(ue);var tt=ii(We);if(tt)return tt;if(R)return R(We);throw"sync fetching of the wasm failed: you can preload it to Module['wasmBinary'] manually, or emcc.py will do that for you when generating HTML (but not JS)"}catch(It){Ti(It)}}function so(We,tt){var It,ir,$;try{$=Ns(We),ir=new WebAssembly.Module($),It=new WebAssembly.Instance(ir,tt)}catch(Ne){var ye=Ne.toString();throw te("failed to compile wasm module: "+ye),(ye.includes("imported Memory")||ye.includes("memory import"))&&te("Memory size incompatibility issues may be due to changing INITIAL_MEMORY at runtime to something too large. Use ALLOW_MEMORY_GROWTH to allow any size memory (and also make sure not to set INITIAL_MEMORY at runtime to something smaller than it was at compile time)."),Ne}return[It,ir]}function uc(){var We={a:Ua};function tt($,ye){var Ne=$.exports;r.asm=Ne,Be=r.asm.g,J(Be.buffer),Z=r.asm.W,an(r.asm.h),Ls("wasm-instantiate")}if(Kn("wasm-instantiate"),r.instantiateWasm)try{var It=r.instantiateWasm(We,tt);return It}catch($){return te("Module.instantiateWasm callback failed with error: "+$),!1}var ir=so(Si,We);return tt(ir[0]),r.asm}function uu(We){return F.getFloat32(We,!0)}function cp(We){return F.getFloat64(We,!0)}function up(We){return F.getInt16(We,!0)}function Os(We){return F.getInt32(We,!0)}function Dn(We,tt){F.setInt32(We,tt,!0)}function oo(We){for(;We.length>0;){var tt=We.shift();if(typeof tt=="function"){tt(r);continue}var It=tt.func;typeof It=="number"?tt.arg===void 0?Z.get(It)():Z.get(It)(tt.arg):It(tt.arg===void 0?null:tt.arg)}}function Ms(We,tt){var It=new Date(Os((We>>2)*4)*1e3);Dn((tt>>2)*4,It.getUTCSeconds()),Dn((tt+4>>2)*4,It.getUTCMinutes()),Dn((tt+8>>2)*4,It.getUTCHours()),Dn((tt+12>>2)*4,It.getUTCDate()),Dn((tt+16>>2)*4,It.getUTCMonth()),Dn((tt+20>>2)*4,It.getUTCFullYear()-1900),Dn((tt+24>>2)*4,It.getUTCDay()),Dn((tt+36>>2)*4,0),Dn((tt+32>>2)*4,0);var ir=Date.UTC(It.getUTCFullYear(),0,1,0,0,0,0),$=(It.getTime()-ir)/(1e3*60*60*24)|0;return Dn((tt+28>>2)*4,$),Ms.GMTString||(Ms.GMTString=at("GMT")),Dn((tt+40>>2)*4,Ms.GMTString),tt}function yl(We,tt){return Ms(We,tt)}function El(We,tt,It){Te.copyWithin(We,tt,tt+It)}function ao(We){try{return Be.grow(We-xe.byteLength+65535>>>16),J(Be.buffer),1}catch{}}function zn(We){var tt=Te.length;We=We>>>0;var It=2147483648;if(We>It)return!1;for(var ir=1;ir<=4;ir*=2){var $=tt*(1+.2/ir);$=Math.min($,We+100663296);var ye=Math.min(It,ke(Math.max(We,$),65536)),Ne=ao(ye);if(Ne)return!0}return!1}function On(We){fe(We)}function Li(We){var tt=Date.now()/1e3|0;return We&&Dn((We>>2)*4,tt),tt}function Mn(){if(Mn.called)return;Mn.called=!0;var We=new Date().getFullYear(),tt=new Date(We,0,1),It=new Date(We,6,1),ir=tt.getTimezoneOffset(),$=It.getTimezoneOffset(),ye=Math.max(ir,$);Dn((ds()>>2)*4,ye*60),Dn((gs()>>2)*4,Number(ir!=$));function Ne($r){var Gi=$r.toTimeString().match(/\(([A-Za-z ]+)\)$/);return Gi?Gi[1]:"GMT"}var pt=Ne(tt),ht=Ne(It),Tt=at(pt),er=at(ht);$>2)*4,Tt),Dn((wi()+4>>2)*4,er)):(Dn((wi()>>2)*4,er),Dn((wi()+4>>2)*4,Tt))}function _i(We){Mn();var tt=Date.UTC(Os((We+20>>2)*4)+1900,Os((We+16>>2)*4),Os((We+12>>2)*4),Os((We+8>>2)*4),Os((We+4>>2)*4),Os((We>>2)*4),0),It=new Date(tt);Dn((We+24>>2)*4,It.getUTCDay());var ir=Date.UTC(It.getUTCFullYear(),0,1,0,0,0,0),$=(It.getTime()-ir)/(1e3*60*60*24)|0;return Dn((We+28>>2)*4,$),It.getTime()/1e3|0}var rr=typeof atob=="function"?atob:function(We){var tt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",It="",ir,$,ye,Ne,pt,ht,Tt,er=0;We=We.replace(/[^A-Za-z0-9\+\/\=]/g,"");do Ne=tt.indexOf(We.charAt(er++)),pt=tt.indexOf(We.charAt(er++)),ht=tt.indexOf(We.charAt(er++)),Tt=tt.indexOf(We.charAt(er++)),ir=Ne<<2|pt>>4,$=(pt&15)<<4|ht>>2,ye=(ht&3)<<6|Tt,It=It+String.fromCharCode(ir),ht!==64&&(It=It+String.fromCharCode($)),Tt!==64&&(It=It+String.fromCharCode(ye));while(er0||(dt(),mr>0))return;function tt(){Pn||(Pn=!0,r.calledRun=!0,!we&&(Gt(),o(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),$t()))}r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),tt()},1)):tt()}if(r.run=ys,r.preInit)for(typeof r.preInit=="function"&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();return ys(),e}}();typeof Qb=="object"&&typeof tU=="object"?tU.exports=eU:typeof define=="function"&&define.amd?define([],function(){return eU}):typeof Qb=="object"&&(Qb.createModule=eU)});var Of,Tle,Lle,Nle=Et(()=>{Of=["number","number"],Tle=(ee=>(ee[ee.ZIP_ER_OK=0]="ZIP_ER_OK",ee[ee.ZIP_ER_MULTIDISK=1]="ZIP_ER_MULTIDISK",ee[ee.ZIP_ER_RENAME=2]="ZIP_ER_RENAME",ee[ee.ZIP_ER_CLOSE=3]="ZIP_ER_CLOSE",ee[ee.ZIP_ER_SEEK=4]="ZIP_ER_SEEK",ee[ee.ZIP_ER_READ=5]="ZIP_ER_READ",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HEAPU8(){return t.HEAPU8},errors:Tle,SEEK_SET:0,SEEK_CUR:1,SEEK_END:2,ZIP_CHECKCONS:4,ZIP_EXCL:2,ZIP_RDONLY:16,ZIP_FL_OVERWRITE:8192,ZIP_FL_COMPRESSED:4,ZIP_OPSYS_DOS:0,ZIP_OPSYS_AMIGA:1,ZIP_OPSYS_OPENVMS:2,ZIP_OPSYS_UNIX:3,ZIP_OPSYS_VM_CMS:4,ZIP_OPSYS_ATARI_ST:5,ZIP_OPSYS_OS_2:6,ZIP_OPSYS_MACINTOSH:7,ZIP_OPSYS_Z_SYSTEM:8,ZIP_OPSYS_CPM:9,ZIP_OPSYS_WINDOWS_NTFS:10,ZIP_OPSYS_MVS:11,ZIP_OPSYS_VSE:12,ZIP_OPSYS_ACORN_RISC:13,ZIP_OPSYS_VFAT:14,ZIP_OPSYS_ALTERNATE_MVS:15,ZIP_OPSYS_BEOS:16,ZIP_OPSYS_TANDEM:17,ZIP_OPSYS_OS_400:18,ZIP_OPSYS_OS_X:19,ZIP_CM_DEFAULT:-1,ZIP_CM_STORE:0,ZIP_CM_DEFLATE:8,uint08S:t._malloc(1),uint32S:t._malloc(4),malloc:t._malloc,free:t._free,getValue:t.getValue,openFromSource:t.cwrap("zip_open_from_source","number",["number","number","number"]),close:t.cwrap("zip_close","number",["number"]),discard:t.cwrap("zip_discard",null,["number"]),getError:t.cwrap("zip_get_error","number",["number"]),getName:t.cwrap("zip_get_name","string",["number","number","number"]),getNumEntries:t.cwrap("zip_get_num_entries","number",["number","number"]),delete:t.cwrap("zip_delete","number",["number","number"]),statIndex:t.cwrap("zip_stat_index","number",["number",...Of,"number","number"]),fopenIndex:t.cwrap("zip_fopen_index","number",["number",...Of,"number"]),fread:t.cwrap("zip_fread","number",["number","number","number","number"]),fclose:t.cwrap("zip_fclose","number",["number"]),dir:{add:t.cwrap("zip_dir_add","number",["number","string"])},file:{add:t.cwrap("zip_file_add","number",["number","string","number","number"]),getError:t.cwrap("zip_file_get_error","number",["number"]),getExternalAttributes:t.cwrap("zip_file_get_external_attributes","number",["number",...Of,"number","number","number"]),setExternalAttributes:t.cwrap("zip_file_set_external_attributes","number",["number",...Of,"number","number","number"]),setMtime:t.cwrap("zip_file_set_mtime","number",["number",...Of,"number","number"]),setCompression:t.cwrap("zip_set_file_compression","number",["number",...Of,"number","number"])},ext:{countSymlinks:t.cwrap("zip_ext_count_symlinks","number",["number"])},error:{initWithCode:t.cwrap("zip_error_init_with_code",null,["number","number"]),strerror:t.cwrap("zip_error_strerror","string",["number"])},name:{locate:t.cwrap("zip_name_locate","number",["number","string","number"])},source:{fromUnattachedBuffer:t.cwrap("zip_source_buffer_create","number",["number",...Of,"number","number"]),fromBuffer:t.cwrap("zip_source_buffer","number",["number","number",...Of,"number"]),free:t.cwrap("zip_source_free",null,["number"]),keep:t.cwrap("zip_source_keep",null,["number"]),open:t.cwrap("zip_source_open","number",["number"]),close:t.cwrap("zip_source_close","number",["number"]),seek:t.cwrap("zip_source_seek","number",["number",...Of,"number"]),tell:t.cwrap("zip_source_tell","number",["number"]),read:t.cwrap("zip_source_read","number",["number","number","number"]),error:t.cwrap("zip_source_error","number",["number"])},struct:{statS:t.cwrap("zipstruct_statS","number",[]),statSize:t.cwrap("zipstruct_stat_size","number",["number"]),statCompSize:t.cwrap("zipstruct_stat_comp_size","number",["number"]),statCompMethod:t.cwrap("zipstruct_stat_comp_method","number",["number"]),statMtime:t.cwrap("zipstruct_stat_mtime","number",["number"]),statCrc:t.cwrap("zipstruct_stat_crc","number",["number"]),errorS:t.cwrap("zipstruct_errorS","number",[]),errorCodeZip:t.cwrap("zipstruct_error_code_zip","number",["number"])}})});function rU(t,e){let r=t.indexOf(e);if(r<=0)return null;let o=r;for(;r>=0&&(o=r+e.length,t[o]!==z.sep);){if(t[r-1]===z.sep)return null;r=t.indexOf(e,o)}return t.length>o&&t[o]!==z.sep?null:t.slice(0,o)}var Jl,Ole=Et(()=>{Pt();Pt();iA();Jl=class extends qp{static async openPromise(e,r){let o=new Jl(r);try{return await e(o)}finally{o.saveAndClose()}}constructor(e={}){let r=e.fileExtensions,o=e.readOnlyArchives,a=typeof r>"u"?A=>rU(A,".zip"):A=>{for(let p of r){let h=rU(A,p);if(h)return h}return null},n=(A,p)=>new Ji(p,{baseFs:A,readOnly:o,stats:A.statSync(p)}),u=async(A,p)=>{let h={baseFs:A,readOnly:o,stats:await A.statPromise(p)};return()=>new Ji(p,h)};super({...e,factorySync:n,factoryPromise:u,getMountPoint:a})}}});function cot(t){if(typeof t=="string"&&String(+t)===t)return+t;if(typeof t=="number"&&Number.isFinite(t))return t<0?Date.now()/1e3:t;if(Mle.types.isDate(t))return t.getTime()/1e3;throw new Error("Invalid time")}function Fb(){return Buffer.from([80,75,5,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0])}var ta,nU,Mle,iU,Ule,Rb,Ji,sU=Et(()=>{Pt();Pt();Pt();Pt();Pt();Pt();ta=ve("fs"),nU=ve("stream"),Mle=ve("util"),iU=$e(ve("zlib"));$4();Ule="mixed";Rb=class extends Error{constructor(r,o){super(r);this.name="Libzip Error",this.code=o}},Ji=class extends Uu{constructor(r,o={}){super();this.listings=new Map;this.entries=new Map;this.fileSources=new Map;this.fds=new Map;this.nextFd=0;this.ready=!1;this.readOnly=!1;let a=o;if(this.level=typeof a.level<"u"?a.level:Ule,r??=Fb(),typeof r=="string"){let{baseFs:A=new Tn}=a;this.baseFs=A,this.path=r}else this.path=null,this.baseFs=null;if(o.stats)this.stats=o.stats;else if(typeof r=="string")try{this.stats=this.baseFs.statSync(r)}catch(A){if(A.code==="ENOENT"&&a.create)this.stats=Ea.makeDefaultStats();else throw A}else this.stats=Ea.makeDefaultStats();this.libzip=b1();let n=this.libzip.malloc(4);try{let A=0;o.readOnly&&(A|=this.libzip.ZIP_RDONLY,this.readOnly=!0),typeof r=="string"&&(r=a.create?Fb():this.baseFs.readFileSync(r));let p=this.allocateUnattachedSource(r);try{this.zip=this.libzip.openFromSource(p,A,n),this.lzSource=p}catch(h){throw this.libzip.source.free(p),h}if(this.zip===0){let h=this.libzip.struct.errorS();throw this.libzip.error.initWithCode(h,this.libzip.getValue(n,"i32")),this.makeLibzipError(h)}}finally{this.libzip.free(n)}this.listings.set(Bt.root,new Set);let u=this.libzip.getNumEntries(this.zip,0);for(let A=0;Ar)throw new Error("Overread");let n=Buffer.from(this.libzip.HEAPU8.subarray(o,o+r));return process.env.YARN_IS_TEST_ENV&&process.env.YARN_ZIP_DATA_EPILOGUE&&(n=Buffer.concat([n,Buffer.from(process.env.YARN_ZIP_DATA_EPILOGUE)])),n}finally{this.libzip.free(o)}}finally{this.libzip.source.close(this.lzSource),this.libzip.source.free(this.lzSource),this.ready=!1}}discardAndClose(){this.prepareClose(),this.libzip.discard(this.zip),this.ready=!1}saveAndClose(){if(!this.path||!this.baseFs)throw new Error("ZipFS cannot be saved and must be discarded when loaded from a buffer");if(this.readOnly){this.discardAndClose();return}let r=this.baseFs.existsSync(this.path)||this.stats.mode===Ea.DEFAULT_MODE?void 0:this.stats.mode;this.baseFs.writeFileSync(this.path,this.getBufferAndClose(),{mode:r}),this.ready=!1}resolve(r){return z.resolve(Bt.root,r)}async openPromise(r,o,a){return this.openSync(r,o,a)}openSync(r,o,a){let n=this.nextFd++;return this.fds.set(n,{cursor:0,p:r}),n}hasOpenFileHandles(){return!!this.fds.size}async opendirPromise(r,o){return this.opendirSync(r,o)}opendirSync(r,o={}){let a=this.resolveFilename(`opendir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw tr.ENOENT(`opendir '${r}'`);let n=this.listings.get(a);if(!n)throw tr.ENOTDIR(`opendir '${r}'`);let u=[...n],A=this.openSync(a,"r");return SD(this,a,u,{onClose:()=>{this.closeSync(A)}})}async readPromise(r,o,a,n,u){return this.readSync(r,o,a,n,u)}readSync(r,o,a=0,n=o.byteLength,u=-1){let A=this.fds.get(r);if(typeof A>"u")throw tr.EBADF("read");let p=u===-1||u===null?A.cursor:u,h=this.readFileSync(A.p);h.copy(o,a,p,p+n);let E=Math.max(0,Math.min(h.length-p,n));return(u===-1||u===null)&&(A.cursor+=E),E}async writePromise(r,o,a,n,u){return typeof o=="string"?this.writeSync(r,o,u):this.writeSync(r,o,a,n,u)}writeSync(r,o,a,n,u){throw typeof this.fds.get(r)>"u"?tr.EBADF("read"):new Error("Unimplemented")}async closePromise(r){return this.closeSync(r)}closeSync(r){if(typeof this.fds.get(r)>"u")throw tr.EBADF("read");this.fds.delete(r)}createReadStream(r,{encoding:o}={}){if(r===null)throw new Error("Unimplemented");let a=this.openSync(r,"r"),n=Object.assign(new nU.PassThrough({emitClose:!0,autoDestroy:!0,destroy:(A,p)=>{clearImmediate(u),this.closeSync(a),p(A)}}),{close(){n.destroy()},bytesRead:0,path:r,pending:!1}),u=setImmediate(async()=>{try{let A=await this.readFilePromise(r,o);n.bytesRead=A.length,n.end(A)}catch(A){n.destroy(A)}});return n}createWriteStream(r,{encoding:o}={}){if(this.readOnly)throw tr.EROFS(`open '${r}'`);if(r===null)throw new Error("Unimplemented");let a=[],n=this.openSync(r,"w"),u=Object.assign(new nU.PassThrough({autoDestroy:!0,emitClose:!0,destroy:(A,p)=>{try{A?p(A):(this.writeFileSync(r,Buffer.concat(a),o),p(null))}catch(h){p(h)}finally{this.closeSync(n)}}}),{close(){u.destroy()},bytesWritten:0,path:r,pending:!1});return u.on("data",A=>{let p=Buffer.from(A);u.bytesWritten+=p.length,a.push(p)}),u}async realpathPromise(r){return this.realpathSync(r)}realpathSync(r){let o=this.resolveFilename(`lstat '${r}'`,r);if(!this.entries.has(o)&&!this.listings.has(o))throw tr.ENOENT(`lstat '${r}'`);return o}async existsPromise(r){return this.existsSync(r)}existsSync(r){if(!this.ready)throw tr.EBUSY(`archive closed, existsSync '${r}'`);if(this.symlinkCount===0){let a=z.resolve(Bt.root,r);return this.entries.has(a)||this.listings.has(a)}let o;try{o=this.resolveFilename(`stat '${r}'`,r,void 0,!1)}catch{return!1}return o===void 0?!1:this.entries.has(o)||this.listings.has(o)}async accessPromise(r,o){return this.accessSync(r,o)}accessSync(r,o=ta.constants.F_OK){let a=this.resolveFilename(`access '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw tr.ENOENT(`access '${r}'`);if(this.readOnly&&o&ta.constants.W_OK)throw tr.EROFS(`access '${r}'`)}async statPromise(r,o={bigint:!1}){return o.bigint?this.statSync(r,{bigint:!0}):this.statSync(r)}statSync(r,o={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`stat '${r}'`,r,void 0,o.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(o.throwIfNoEntry===!1)return;throw tr.ENOENT(`stat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw tr.ENOTDIR(`stat '${r}'`);return this.statImpl(`stat '${r}'`,a,o)}}async fstatPromise(r,o){return this.fstatSync(r,o)}fstatSync(r,o){let a=this.fds.get(r);if(typeof a>"u")throw tr.EBADF("fstatSync");let{p:n}=a,u=this.resolveFilename(`stat '${n}'`,n);if(!this.entries.has(u)&&!this.listings.has(u))throw tr.ENOENT(`stat '${n}'`);if(n[n.length-1]==="/"&&!this.listings.has(u))throw tr.ENOTDIR(`stat '${n}'`);return this.statImpl(`fstat '${n}'`,u,o)}async lstatPromise(r,o={bigint:!1}){return o.bigint?this.lstatSync(r,{bigint:!0}):this.lstatSync(r)}lstatSync(r,o={bigint:!1,throwIfNoEntry:!0}){let a=this.resolveFilename(`lstat '${r}'`,r,!1,o.throwIfNoEntry);if(a!==void 0){if(!this.entries.has(a)&&!this.listings.has(a)){if(o.throwIfNoEntry===!1)return;throw tr.ENOENT(`lstat '${r}'`)}if(r[r.length-1]==="/"&&!this.listings.has(a))throw tr.ENOTDIR(`lstat '${r}'`);return this.statImpl(`lstat '${r}'`,a,o)}}statImpl(r,o,a={}){let n=this.entries.get(o);if(typeof n<"u"){let u=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,n,0,0,u)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let p=this.stats.uid,h=this.stats.gid,E=this.libzip.struct.statSize(u)>>>0,I=512,v=Math.ceil(E/I),x=(this.libzip.struct.statMtime(u)>>>0)*1e3,C=x,R=x,N=x,U=new Date(C),V=new Date(R),te=new Date(N),ae=new Date(x),fe=this.listings.has(o)?ta.constants.S_IFDIR:this.isSymbolicLink(n)?ta.constants.S_IFLNK:ta.constants.S_IFREG,ue=fe===ta.constants.S_IFDIR?493:420,me=fe|this.getUnixMode(n,ue)&511,he=this.libzip.struct.statCrc(u),Be=Object.assign(new Ea.StatEntry,{uid:p,gid:h,size:E,blksize:I,blocks:v,atime:U,birthtime:V,ctime:te,mtime:ae,atimeMs:C,birthtimeMs:R,ctimeMs:N,mtimeMs:x,mode:me,crc:he});return a.bigint===!0?Ea.convertToBigIntStats(Be):Be}if(this.listings.has(o)){let u=this.stats.uid,A=this.stats.gid,p=0,h=512,E=0,I=this.stats.mtimeMs,v=this.stats.mtimeMs,x=this.stats.mtimeMs,C=this.stats.mtimeMs,R=new Date(I),N=new Date(v),U=new Date(x),V=new Date(C),te=ta.constants.S_IFDIR|493,ae=0,fe=Object.assign(new Ea.StatEntry,{uid:u,gid:A,size:p,blksize:h,blocks:E,atime:R,birthtime:N,ctime:U,mtime:V,atimeMs:I,birthtimeMs:v,ctimeMs:x,mtimeMs:C,mode:te,crc:ae});return a.bigint===!0?Ea.convertToBigIntStats(fe):fe}throw new Error("Unreachable")}getUnixMode(r,o){if(this.libzip.file.getExternalAttributes(this.zip,r,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?o:this.libzip.getValue(this.libzip.uint32S,"i32")>>>16}registerListing(r){let o=this.listings.get(r);if(o)return o;this.registerListing(z.dirname(r)).add(z.basename(r));let n=new Set;return this.listings.set(r,n),n}registerEntry(r,o){this.registerListing(z.dirname(r)).add(z.basename(r)),this.entries.set(r,o)}unregisterListing(r){this.listings.delete(r),this.listings.get(z.dirname(r))?.delete(z.basename(r))}unregisterEntry(r){this.unregisterListing(r);let o=this.entries.get(r);this.entries.delete(r),!(typeof o>"u")&&(this.fileSources.delete(o),this.isSymbolicLink(o)&&this.symlinkCount--)}deleteEntry(r,o){if(this.unregisterEntry(r),this.libzip.delete(this.zip,o)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}resolveFilename(r,o,a=!0,n=!0){if(!this.ready)throw tr.EBUSY(`archive closed, ${r}`);let u=z.resolve(Bt.root,o);if(u==="/")return Bt.root;let A=this.entries.get(u);if(a&&A!==void 0)if(this.symlinkCount!==0&&this.isSymbolicLink(A)){let p=this.getFileSource(A).toString();return this.resolveFilename(r,z.resolve(z.dirname(u),p),!0,n)}else return u;for(;;){let p=this.resolveFilename(r,z.dirname(u),!0,n);if(p===void 0)return p;let h=this.listings.has(p),E=this.entries.has(p);if(!h&&!E){if(n===!1)return;throw tr.ENOENT(r)}if(!h)throw tr.ENOTDIR(r);if(u=z.resolve(p,z.basename(u)),!a||this.symlinkCount===0)break;let I=this.libzip.name.locate(this.zip,u.slice(1),0);if(I===-1)break;if(this.isSymbolicLink(I)){let v=this.getFileSource(I).toString();u=z.resolve(z.dirname(u),v)}else break}return u}allocateBuffer(r){Buffer.isBuffer(r)||(r=Buffer.from(r));let o=this.libzip.malloc(r.byteLength);if(!o)throw new Error("Couldn't allocate enough memory");return new Uint8Array(this.libzip.HEAPU8.buffer,o,r.byteLength).set(r),{buffer:o,byteLength:r.byteLength}}allocateUnattachedSource(r){let o=this.libzip.struct.errorS(),{buffer:a,byteLength:n}=this.allocateBuffer(r),u=this.libzip.source.fromUnattachedBuffer(a,n,0,1,o);if(u===0)throw this.libzip.free(o),this.makeLibzipError(o);return u}allocateSource(r){let{buffer:o,byteLength:a}=this.allocateBuffer(r),n=this.libzip.source.fromBuffer(this.zip,o,a,0,1);if(n===0)throw this.libzip.free(o),this.makeLibzipError(this.libzip.getError(this.zip));return n}setFileSource(r,o){let a=Buffer.isBuffer(o)?o:Buffer.from(o),n=z.relative(Bt.root,r),u=this.allocateSource(o);try{let A=this.libzip.file.add(this.zip,n,u,this.libzip.ZIP_FL_OVERWRITE);if(A===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));if(this.level!=="mixed"){let p=this.level===0?this.libzip.ZIP_CM_STORE:this.libzip.ZIP_CM_DEFLATE;if(this.libzip.file.setCompression(this.zip,A,0,p,this.level)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}return this.fileSources.set(A,a),A}catch(A){throw this.libzip.source.free(u),A}}isSymbolicLink(r){if(this.symlinkCount===0)return!1;if(this.libzip.file.getExternalAttributes(this.zip,r,0,0,this.libzip.uint08S,this.libzip.uint32S)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.libzip.getValue(this.libzip.uint08S,"i8")>>>0!==this.libzip.ZIP_OPSYS_UNIX?!1:(this.libzip.getValue(this.libzip.uint32S,"i32")>>>16&ta.constants.S_IFMT)===ta.constants.S_IFLNK}getFileSource(r,o={asyncDecompress:!1}){let a=this.fileSources.get(r);if(typeof a<"u")return a;let n=this.libzip.struct.statS();if(this.libzip.statIndex(this.zip,r,0,0,n)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));let A=this.libzip.struct.statCompSize(n),p=this.libzip.struct.statCompMethod(n),h=this.libzip.malloc(A);try{let E=this.libzip.fopenIndex(this.zip,r,0,this.libzip.ZIP_FL_COMPRESSED);if(E===0)throw this.makeLibzipError(this.libzip.getError(this.zip));try{let I=this.libzip.fread(E,h,A,0);if(I===-1)throw this.makeLibzipError(this.libzip.file.getError(E));if(IA)throw new Error("Overread");let v=this.libzip.HEAPU8.subarray(h,h+A),x=Buffer.from(v);if(p===0)return this.fileSources.set(r,x),x;if(o.asyncDecompress)return new Promise((C,R)=>{iU.default.inflateRaw(x,(N,U)=>{N?R(N):(this.fileSources.set(r,U),C(U))})});{let C=iU.default.inflateRawSync(x);return this.fileSources.set(r,C),C}}finally{this.libzip.fclose(E)}}finally{this.libzip.free(h)}}async fchmodPromise(r,o){return this.chmodPromise(this.fdToPath(r,"fchmod"),o)}fchmodSync(r,o){return this.chmodSync(this.fdToPath(r,"fchmodSync"),o)}async chmodPromise(r,o){return this.chmodSync(r,o)}chmodSync(r,o){if(this.readOnly)throw tr.EROFS(`chmod '${r}'`);o&=493;let a=this.resolveFilename(`chmod '${r}'`,r,!1),n=this.entries.get(a);if(typeof n>"u")throw new Error(`Assertion failed: The entry should have been registered (${a})`);let A=this.getUnixMode(n,ta.constants.S_IFREG|0)&-512|o;if(this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,A<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async fchownPromise(r,o,a){return this.chownPromise(this.fdToPath(r,"fchown"),o,a)}fchownSync(r,o,a){return this.chownSync(this.fdToPath(r,"fchownSync"),o,a)}async chownPromise(r,o,a){return this.chownSync(r,o,a)}chownSync(r,o,a){throw new Error("Unimplemented")}async renamePromise(r,o){return this.renameSync(r,o)}renameSync(r,o){throw new Error("Unimplemented")}async copyFilePromise(r,o,a){let{indexSource:n,indexDest:u,resolvedDestP:A}=this.prepareCopyFile(r,o,a),p=await this.getFileSource(n,{asyncDecompress:!0}),h=this.setFileSource(A,p);h!==u&&this.registerEntry(A,h)}copyFileSync(r,o,a=0){let{indexSource:n,indexDest:u,resolvedDestP:A}=this.prepareCopyFile(r,o,a),p=this.getFileSource(n),h=this.setFileSource(A,p);h!==u&&this.registerEntry(A,h)}prepareCopyFile(r,o,a=0){if(this.readOnly)throw tr.EROFS(`copyfile '${r} -> '${o}'`);if((a&ta.constants.COPYFILE_FICLONE_FORCE)!==0)throw tr.ENOSYS("unsupported clone operation",`copyfile '${r}' -> ${o}'`);let n=this.resolveFilename(`copyfile '${r} -> ${o}'`,r),u=this.entries.get(n);if(typeof u>"u")throw tr.EINVAL(`copyfile '${r}' -> '${o}'`);let A=this.resolveFilename(`copyfile '${r}' -> ${o}'`,o),p=this.entries.get(A);if((a&(ta.constants.COPYFILE_EXCL|ta.constants.COPYFILE_FICLONE_FORCE))!==0&&typeof p<"u")throw tr.EEXIST(`copyfile '${r}' -> '${o}'`);return{indexSource:u,resolvedDestP:A,indexDest:p}}async appendFilePromise(r,o,a){if(this.readOnly)throw tr.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFilePromise(r,o,a)}appendFileSync(r,o,a={}){if(this.readOnly)throw tr.EROFS(`open '${r}'`);return typeof a>"u"?a={flag:"a"}:typeof a=="string"?a={flag:"a",encoding:a}:typeof a.flag>"u"&&(a={flag:"a",...a}),this.writeFileSync(r,o,a)}fdToPath(r,o){let a=this.fds.get(r)?.p;if(typeof a>"u")throw tr.EBADF(o);return a}async writeFilePromise(r,o,a){let{encoding:n,mode:u,index:A,resolvedP:p}=this.prepareWriteFile(r,a);A!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(o=Buffer.concat([await this.getFileSource(A,{asyncDecompress:!0}),Buffer.from(o)])),n!==null&&(o=o.toString(n));let h=this.setFileSource(p,o);h!==A&&this.registerEntry(p,h),u!==null&&await this.chmodPromise(p,u)}writeFileSync(r,o,a){let{encoding:n,mode:u,index:A,resolvedP:p}=this.prepareWriteFile(r,a);A!==void 0&&typeof a=="object"&&a.flag&&a.flag.includes("a")&&(o=Buffer.concat([this.getFileSource(A),Buffer.from(o)])),n!==null&&(o=o.toString(n));let h=this.setFileSource(p,o);h!==A&&this.registerEntry(p,h),u!==null&&this.chmodSync(p,u)}prepareWriteFile(r,o){if(typeof r=="number"&&(r=this.fdToPath(r,"read")),this.readOnly)throw tr.EROFS(`open '${r}'`);let a=this.resolveFilename(`open '${r}'`,r);if(this.listings.has(a))throw tr.EISDIR(`open '${r}'`);let n=null,u=null;typeof o=="string"?n=o:typeof o=="object"&&({encoding:n=null,mode:u=null}=o);let A=this.entries.get(a);return{encoding:n,mode:u,resolvedP:a,index:A}}async unlinkPromise(r){return this.unlinkSync(r)}unlinkSync(r){if(this.readOnly)throw tr.EROFS(`unlink '${r}'`);let o=this.resolveFilename(`unlink '${r}'`,r);if(this.listings.has(o))throw tr.EISDIR(`unlink '${r}'`);let a=this.entries.get(o);if(typeof a>"u")throw tr.EINVAL(`unlink '${r}'`);this.deleteEntry(o,a)}async utimesPromise(r,o,a){return this.utimesSync(r,o,a)}utimesSync(r,o,a){if(this.readOnly)throw tr.EROFS(`utimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r);this.utimesImpl(n,a)}async lutimesPromise(r,o,a){return this.lutimesSync(r,o,a)}lutimesSync(r,o,a){if(this.readOnly)throw tr.EROFS(`lutimes '${r}'`);let n=this.resolveFilename(`utimes '${r}'`,r,!1);this.utimesImpl(n,a)}utimesImpl(r,o){this.listings.has(r)&&(this.entries.has(r)||this.hydrateDirectory(r));let a=this.entries.get(r);if(a===void 0)throw new Error("Unreachable");if(this.libzip.file.setMtime(this.zip,a,0,cot(o),0)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip))}async mkdirPromise(r,o){return this.mkdirSync(r,o)}mkdirSync(r,{mode:o=493,recursive:a=!1}={}){if(a)return this.mkdirpSync(r,{chmod:o});if(this.readOnly)throw tr.EROFS(`mkdir '${r}'`);let n=this.resolveFilename(`mkdir '${r}'`,r);if(this.entries.has(n)||this.listings.has(n))throw tr.EEXIST(`mkdir '${r}'`);this.hydrateDirectory(n),this.chmodSync(n,o)}async rmdirPromise(r,o){return this.rmdirSync(r,o)}rmdirSync(r,{recursive:o=!1}={}){if(this.readOnly)throw tr.EROFS(`rmdir '${r}'`);if(o){this.removeSync(r);return}let a=this.resolveFilename(`rmdir '${r}'`,r),n=this.listings.get(a);if(!n)throw tr.ENOTDIR(`rmdir '${r}'`);if(n.size>0)throw tr.ENOTEMPTY(`rmdir '${r}'`);let u=this.entries.get(a);if(typeof u>"u")throw tr.EINVAL(`rmdir '${r}'`);this.deleteEntry(r,u)}async rmPromise(r,o){return this.rmSync(r,o)}rmSync(r,{recursive:o=!1}={}){if(this.readOnly)throw tr.EROFS(`rm '${r}'`);if(o){this.removeSync(r);return}let a=this.resolveFilename(`rm '${r}'`,r),n=this.listings.get(a);if(!n)throw tr.ENOTDIR(`rm '${r}'`);if(n.size>0)throw tr.ENOTEMPTY(`rm '${r}'`);let u=this.entries.get(a);if(typeof u>"u")throw tr.EINVAL(`rm '${r}'`);this.deleteEntry(r,u)}hydrateDirectory(r){let o=this.libzip.dir.add(this.zip,z.relative(Bt.root,r));if(o===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));return this.registerListing(r),this.registerEntry(r,o),o}async linkPromise(r,o){return this.linkSync(r,o)}linkSync(r,o){throw tr.EOPNOTSUPP(`link '${r}' -> '${o}'`)}async symlinkPromise(r,o){return this.symlinkSync(r,o)}symlinkSync(r,o){if(this.readOnly)throw tr.EROFS(`symlink '${r}' -> '${o}'`);let a=this.resolveFilename(`symlink '${r}' -> '${o}'`,o);if(this.listings.has(a))throw tr.EISDIR(`symlink '${r}' -> '${o}'`);if(this.entries.has(a))throw tr.EEXIST(`symlink '${r}' -> '${o}'`);let n=this.setFileSource(a,r);if(this.registerEntry(a,n),this.libzip.file.setExternalAttributes(this.zip,n,0,0,this.libzip.ZIP_OPSYS_UNIX,(ta.constants.S_IFLNK|511)<<16)===-1)throw this.makeLibzipError(this.libzip.getError(this.zip));this.symlinkCount+=1}async readFilePromise(r,o){typeof o=="object"&&(o=o?o.encoding:void 0);let a=await this.readFileBuffer(r,{asyncDecompress:!0});return o?a.toString(o):a}readFileSync(r,o){typeof o=="object"&&(o=o?o.encoding:void 0);let a=this.readFileBuffer(r);return o?a.toString(o):a}readFileBuffer(r,o={asyncDecompress:!1}){typeof r=="number"&&(r=this.fdToPath(r,"read"));let a=this.resolveFilename(`open '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw tr.ENOENT(`open '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(a))throw tr.ENOTDIR(`open '${r}'`);if(this.listings.has(a))throw tr.EISDIR("read");let n=this.entries.get(a);if(n===void 0)throw new Error("Unreachable");return this.getFileSource(n,o)}async readdirPromise(r,o){return this.readdirSync(r,o)}readdirSync(r,o){let a=this.resolveFilename(`scandir '${r}'`,r);if(!this.entries.has(a)&&!this.listings.has(a))throw tr.ENOENT(`scandir '${r}'`);let n=this.listings.get(a);if(!n)throw tr.ENOTDIR(`scandir '${r}'`);if(o?.recursive)if(o?.withFileTypes){let u=Array.from(n,A=>Object.assign(this.statImpl("lstat",z.join(r,A)),{name:A,path:Bt.dot}));for(let A of u){if(!A.isDirectory())continue;let p=z.join(A.path,A.name),h=this.listings.get(z.join(a,p));for(let E of h)u.push(Object.assign(this.statImpl("lstat",z.join(r,p,E)),{name:E,path:p}))}return u}else{let u=[...n];for(let A of u){let p=this.listings.get(z.join(a,A));if(!(typeof p>"u"))for(let h of p)u.push(z.join(A,h))}return u}else return o?.withFileTypes?Array.from(n,u=>Object.assign(this.statImpl("lstat",z.join(r,u)),{name:u,path:void 0})):[...n]}async readlinkPromise(r){let o=this.prepareReadlink(r);return(await this.getFileSource(o,{asyncDecompress:!0})).toString()}readlinkSync(r){let o=this.prepareReadlink(r);return this.getFileSource(o).toString()}prepareReadlink(r){let o=this.resolveFilename(`readlink '${r}'`,r,!1);if(!this.entries.has(o)&&!this.listings.has(o))throw tr.ENOENT(`readlink '${r}'`);if(r[r.length-1]==="/"&&!this.listings.has(o))throw tr.ENOTDIR(`open '${r}'`);if(this.listings.has(o))throw tr.EINVAL(`readlink '${r}'`);let a=this.entries.get(o);if(a===void 0)throw new Error("Unreachable");if(!this.isSymbolicLink(a))throw tr.EINVAL(`readlink '${r}'`);return a}async truncatePromise(r,o=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw tr.EINVAL(`open '${r}'`);let u=await this.getFileSource(n,{asyncDecompress:!0}),A=Buffer.alloc(o,0);return u.copy(A),await this.writeFilePromise(r,A)}truncateSync(r,o=0){let a=this.resolveFilename(`open '${r}'`,r),n=this.entries.get(a);if(typeof n>"u")throw tr.EINVAL(`open '${r}'`);let u=this.getFileSource(n),A=Buffer.alloc(o,0);return u.copy(A),this.writeFileSync(r,A)}async ftruncatePromise(r,o){return this.truncatePromise(this.fdToPath(r,"ftruncate"),o)}ftruncateSync(r,o){return this.truncateSync(this.fdToPath(r,"ftruncateSync"),o)}watch(r,o,a){let n;switch(typeof o){case"function":case"string":case"undefined":n=!0;break;default:({persistent:n=!0}=o);break}if(!n)return{on:()=>{},close:()=>{}};let u=setInterval(()=>{},24*60*60*1e3);return{on:()=>{},close:()=>{clearInterval(u)}}}watchFile(r,o,a){let n=z.resolve(Bt.root,r);return ny(this,n,o,a)}unwatchFile(r,o){let a=z.resolve(Bt.root,r);return Ug(this,a,o)}}});function Hle(t,e,r=Buffer.alloc(0),o){let a=new Ji(r),n=I=>I===e||I.startsWith(`${e}/`)?I.slice(0,e.length):null,u=async(I,v)=>()=>a,A=(I,v)=>a,p={...t},h=new Tn(p),E=new qp({baseFs:h,getMountPoint:n,factoryPromise:u,factorySync:A,magicByte:21,maxAge:1/0,typeCheck:o?.typeCheck});return Kw(_le.default,new Gp(E)),a}var _le,qle=Et(()=>{Pt();_le=$e(ve("fs"));sU()});var Gle=Et(()=>{Ole();sU();qle()});var x1={};zt(x1,{DEFAULT_COMPRESSION_LEVEL:()=>Ule,LibzipError:()=>Rb,ZipFS:()=>Ji,ZipOpenFS:()=>Jl,getArchivePart:()=>rU,getLibzipPromise:()=>Aot,getLibzipSync:()=>uot,makeEmptyArchive:()=>Fb,mountMemoryDrive:()=>Hle});function uot(){return b1()}async function Aot(){return b1()}var jle,iA=Et(()=>{$4();jle=$e(Rle());Nle();Gle();Fle(()=>{let t=(0,jle.default)();return Lle(t)})});var RE,Yle=Et(()=>{Pt();qt();k1();RE=class extends nt{constructor(){super(...arguments);this.cwd=ge.String("--cwd",process.cwd(),{description:"The directory to run the command in"});this.commandName=ge.String();this.args=ge.Proxy()}async execute(){let r=this.args.length>0?`${this.commandName} ${this.args.join(" ")}`:this.commandName;return await TE(r,[],{cwd:le.toPortablePath(this.cwd),stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}};RE.usage={description:"run a command using yarn's portable shell",details:` This command will run a command using Yarn's portable shell. Make sure to escape glob patterns, redirections, and other features that might be expanded by your own shell. Note: To escape something from Yarn's shell, you might have to escape it twice, the first time from your own shell. Note: Don't use this command in Yarn scripts, as Yarn's shell is automatically used. For a list of features, visit: https://github.com/yarnpkg/berry/blob/master/packages/yarnpkg-shell/README.md. `,examples:[["Run a simple command","$0 echo Hello"],["Run a command with a glob pattern","$0 echo '*.js'"],["Run a command with a redirection","$0 echo Hello World '>' hello.txt"],["Run a command with an escaped glob pattern (The double escape is needed in Unix shells)",`$0 echo '"*.js"'`],["Run a command with a variable (Double quotes are needed in Unix shells, to prevent them from expanding the variable)",'$0 "GREETING=Hello echo $GREETING World"']]}});var ll,Wle=Et(()=>{ll=class extends Error{constructor(e){super(e),this.name="ShellError"}}});var Nb={};zt(Nb,{fastGlobOptions:()=>Vle,isBraceExpansion:()=>oU,isGlobPattern:()=>fot,match:()=>pot,micromatchOptions:()=>Lb});function fot(t){if(!Tb.default.scan(t,Lb).isGlob)return!1;try{Tb.default.parse(t,Lb)}catch{return!1}return!0}function pot(t,{cwd:e,baseFs:r}){return(0,Kle.default)(t,{...Vle,cwd:le.fromPortablePath(e),fs:FD(zle.default,new Gp(r))})}function oU(t){return Tb.default.scan(t,Lb).isBrace}var Kle,zle,Tb,Lb,Vle,Jle=Et(()=>{Pt();Kle=$e(RS()),zle=$e(ve("fs")),Tb=$e(Zo()),Lb={strictBrackets:!0},Vle={onlyDirectories:!1,onlyFiles:!1}});function aU(){}function lU(){for(let t of Qd)t.kill()}function ece(t,e,r,o){return a=>{let n=a[0]instanceof sA.Transform?"pipe":a[0],u=a[1]instanceof sA.Transform?"pipe":a[1],A=a[2]instanceof sA.Transform?"pipe":a[2],p=(0,Zle.default)(t,e,{...o,stdio:[n,u,A]});return Qd.add(p),Qd.size===1&&(process.on("SIGINT",aU),process.on("SIGTERM",lU)),a[0]instanceof sA.Transform&&a[0].pipe(p.stdin),a[1]instanceof sA.Transform&&p.stdout.pipe(a[1],{end:!1}),a[2]instanceof sA.Transform&&p.stderr.pipe(a[2],{end:!1}),{stdin:p.stdin,promise:new Promise(h=>{p.on("error",E=>{switch(Qd.delete(p),Qd.size===0&&(process.off("SIGINT",aU),process.off("SIGTERM",lU)),E.code){case"ENOENT":a[2].write(`command not found: ${t} `),h(127);break;case"EACCES":a[2].write(`permission denied: ${t} `),h(128);break;default:a[2].write(`uncaught error: ${E.message} `),h(1);break}}),p.on("close",E=>{Qd.delete(p),Qd.size===0&&(process.off("SIGINT",aU),process.off("SIGTERM",lU)),h(E!==null?E:129)})})}}}function tce(t){return e=>{let r=e[0]==="pipe"?new sA.PassThrough:e[0];return{stdin:r,promise:Promise.resolve().then(()=>t({stdin:r,stdout:e[1],stderr:e[2]}))}}}function Ob(t,e){return LE.start(t,e)}function Xle(t,e=null){let r=new sA.PassThrough,o=new $le.StringDecoder,a="";return r.on("data",n=>{let u=o.write(n),A;do if(A=u.indexOf(` `),A!==-1){let p=a+u.substring(0,A);u=u.substring(A+1),a="",t(e!==null?`${e} ${p}`:p)}while(A!==-1);a+=u}),r.on("end",()=>{let n=o.end();n!==""&&t(e!==null?`${e} ${n}`:n)}),r}function rce(t,{prefix:e}){return{stdout:Xle(r=>t.stdout.write(`${r} `),t.stdout.isTTY?e:null),stderr:Xle(r=>t.stderr.write(`${r} `),t.stderr.isTTY?e:null)}}var Zle,sA,$le,Qd,Xl,cU,LE,uU=Et(()=>{Zle=$e(sT()),sA=ve("stream"),$le=ve("string_decoder"),Qd=new Set;Xl=class{constructor(e){this.stream=e}close(){}get(){return this.stream}},cU=class{constructor(){this.stream=null}close(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");this.stream.end()}attach(e){this.stream=e}get(){if(this.stream===null)throw new Error("Assertion failed: No stream attached");return this.stream}},LE=class{constructor(e,r){this.stdin=null;this.stdout=null;this.stderr=null;this.pipe=null;this.ancestor=e,this.implementation=r}static start(e,{stdin:r,stdout:o,stderr:a}){let n=new LE(null,e);return n.stdin=r,n.stdout=o,n.stderr=a,n}pipeTo(e,r=1){let o=new LE(this,e),a=new cU;return o.pipe=a,o.stdout=this.stdout,o.stderr=this.stderr,(r&1)===1?this.stdout=a:this.ancestor!==null&&(this.stderr=this.ancestor.stdout),(r&2)===2?this.stderr=a:this.ancestor!==null&&(this.stderr=this.ancestor.stderr),o}async exec(){let e=["ignore","ignore","ignore"];if(this.pipe)e[0]="pipe";else{if(this.stdin===null)throw new Error("Assertion failed: No input stream registered");e[0]=this.stdin.get()}let r;if(this.stdout===null)throw new Error("Assertion failed: No output stream registered");r=this.stdout,e[1]=r.get();let o;if(this.stderr===null)throw new Error("Assertion failed: No error stream registered");o=this.stderr,e[2]=o.get();let a=this.implementation(e);return this.pipe&&this.pipe.attach(a.stdin),await a.promise.then(n=>(r.close(),o.close(),n))}async run(){let e=[];for(let o=this;o;o=o.ancestor)e.push(o.exec());return(await Promise.all(e))[0]}}});var T1={};zt(T1,{EntryCommand:()=>RE,ShellError:()=>ll,execute:()=>TE,globUtils:()=>Nb});function nce(t,e,r){let o=new cl.PassThrough({autoDestroy:!0});switch(t){case 0:(e&1)===1&&r.stdin.pipe(o,{end:!1}),(e&2)===2&&r.stdin instanceof cl.Writable&&o.pipe(r.stdin,{end:!1});break;case 1:(e&1)===1&&r.stdout.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stdout,{end:!1});break;case 2:(e&1)===1&&r.stderr.pipe(o,{end:!1}),(e&2)===2&&o.pipe(r.stderr,{end:!1});break;default:throw new ll(`Bad file descriptor: "${t}"`)}return o}function Ub(t,e={}){let r={...t,...e};return r.environment={...t.environment,...e.environment},r.variables={...t.variables,...e.variables},r}async function got(t,e,r){let o=[],a=new cl.PassThrough;return a.on("data",n=>o.push(n)),await _b(t,e,Ub(r,{stdout:a})),Buffer.concat(o).toString().replace(/[\r\n]+$/,"")}async function ice(t,e,r){let o=t.map(async n=>{let u=await Fd(n.args,e,r);return{name:n.name,value:u.join(" ")}});return(await Promise.all(o)).reduce((n,u)=>(n[u.name]=u.value,n),{})}function Mb(t){return t.match(/[^ \r\n\t]+/g)||[]}async function uce(t,e,r,o,a=o){switch(t.name){case"$":o(String(process.pid));break;case"#":o(String(e.args.length));break;case"@":if(t.quoted)for(let n of e.args)a(n);else for(let n of e.args){let u=Mb(n);for(let A=0;A=0&&n"u"&&(t.defaultValue?u=(await Fd(t.defaultValue,e,r)).join(" "):t.alternativeValue&&(u="")),typeof u>"u")throw A?new ll(`Unbound argument #${n}`):new ll(`Unbound variable "${t.name}"`);if(t.quoted)o(u);else{let p=Mb(u);for(let E=0;Eo.push(n));let a=Number(o.join(" "));return Number.isNaN(a)?Q1({type:"variable",name:o.join(" ")},e,r):Q1({type:"number",value:a},e,r)}else return dot[t.type](await Q1(t.left,e,r),await Q1(t.right,e,r))}async function Fd(t,e,r){let o=new Map,a=[],n=[],u=E=>{n.push(E)},A=()=>{n.length>0&&a.push(n.join("")),n=[]},p=E=>{u(E),A()},h=(E,I,v)=>{let x=JSON.stringify({type:E,fd:I}),C=o.get(x);typeof C>"u"&&o.set(x,C=[]),C.push(v)};for(let E of t){let I=!1;switch(E.type){case"redirection":{let v=await Fd(E.args,e,r);for(let x of v)h(E.subtype,E.fd,x)}break;case"argument":for(let v of E.segments)switch(v.type){case"text":u(v.text);break;case"glob":u(v.pattern),I=!0;break;case"shell":{let x=await got(v.shell,e,r);if(v.quoted)u(x);else{let C=Mb(x);for(let R=0;R"u")throw new Error("Assertion failed: Expected a glob pattern to have been set");let x=await e.glob.match(v,{cwd:r.cwd,baseFs:e.baseFs});if(x.length===0){let C=oU(v)?". Note: Brace expansion of arbitrary strings isn't currently supported. For more details, please read this issue: https://github.com/yarnpkg/berry/issues/22":"";throw new ll(`No matches found: "${v}"${C}`)}for(let C of x.sort())p(C)}}if(o.size>0){let E=[];for(let[I,v]of o.entries())E.splice(E.length,0,I,String(v.length),...v);a.splice(0,0,"__ysh_set_redirects",...E,"--")}return a}function F1(t,e,r){e.builtins.has(t[0])||(t=["command",...t]);let o=le.fromPortablePath(r.cwd),a=r.environment;typeof a.PWD<"u"&&(a={...a,PWD:o});let[n,...u]=t;if(n==="command")return ece(u[0],u.slice(1),e,{cwd:o,env:a});let A=e.builtins.get(n);if(typeof A>"u")throw new Error(`Assertion failed: A builtin should exist for "${n}"`);return tce(async({stdin:p,stdout:h,stderr:E})=>{let{stdin:I,stdout:v,stderr:x}=r;r.stdin=p,r.stdout=h,r.stderr=E;try{return await A(u,e,r)}finally{r.stdin=I,r.stdout=v,r.stderr=x}})}function mot(t,e,r){return o=>{let a=new cl.PassThrough,n=_b(t,e,Ub(r,{stdin:a}));return{stdin:a,promise:n}}}function yot(t,e,r){return o=>{let a=new cl.PassThrough,n=_b(t,e,r);return{stdin:a,promise:n}}}function sce(t,e,r,o){if(e.length===0)return t;{let a;do a=String(Math.random());while(Object.hasOwn(o.procedures,a));return o.procedures={...o.procedures},o.procedures[a]=t,F1([...e,"__ysh_run_procedure",a],r,o)}}async function oce(t,e,r){let o=t,a=null,n=null;for(;o;){let u=o.then?{...r}:r,A;switch(o.type){case"command":{let p=await Fd(o.args,e,r),h=await ice(o.envs,e,r);A=o.envs.length?F1(p,e,Ub(u,{environment:h})):F1(p,e,u)}break;case"subshell":{let p=await Fd(o.args,e,r),h=mot(o.subshell,e,u);A=sce(h,p,e,u)}break;case"group":{let p=await Fd(o.args,e,r),h=yot(o.group,e,u);A=sce(h,p,e,u)}break;case"envs":{let p=await ice(o.envs,e,r);u.environment={...u.environment,...p},A=F1(["true"],e,u)}break}if(typeof A>"u")throw new Error("Assertion failed: An action should have been generated");if(a===null)n=Ob(A,{stdin:new Xl(u.stdin),stdout:new Xl(u.stdout),stderr:new Xl(u.stderr)});else{if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");switch(a){case"|":n=n.pipeTo(A,1);break;case"|&":n=n.pipeTo(A,3);break}}o.then?(a=o.then.type,o=o.then.chain):o=null}if(n===null)throw new Error("Assertion failed: The execution pipeline should have been setup");return await n.run()}async function Eot(t,e,r,{background:o=!1}={}){function a(n){let u=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],A=u[n%u.length];return ace.default.hex(A)}if(o){let n=r.nextBackgroundJobIndex++,u=a(n),A=`[${n}]`,p=u(A),{stdout:h,stderr:E}=rce(r,{prefix:p});return r.backgroundJobs.push(oce(t,e,Ub(r,{stdout:h,stderr:E})).catch(I=>E.write(`${I.message} `)).finally(()=>{r.stdout.isTTY&&r.stdout.write(`Job ${p}, '${u(uy(t))}' has ended `)})),0}return await oce(t,e,r)}async function Cot(t,e,r,{background:o=!1}={}){let a,n=A=>{a=A,r.variables["?"]=String(A)},u=async A=>{try{return await Eot(A.chain,e,r,{background:o&&typeof A.then>"u"})}catch(p){if(!(p instanceof ll))throw p;return r.stderr.write(`${p.message} `),1}};for(n(await u(t));t.then;){if(r.exitCode!==null)return r.exitCode;switch(t.then.type){case"&&":a===0&&n(await u(t.then.line));break;case"||":a!==0&&n(await u(t.then.line));break;default:throw new Error(`Assertion failed: Unsupported command type: "${t.then.type}"`)}t=t.then.line}return a}async function _b(t,e,r){let o=r.backgroundJobs;r.backgroundJobs=[];let a=0;for(let{command:n,type:u}of t){if(a=await Cot(n,e,r,{background:u==="&"}),r.exitCode!==null)return r.exitCode;r.variables["?"]=String(a)}return await Promise.all(r.backgroundJobs),r.backgroundJobs=o,a}function Ace(t){switch(t.type){case"variable":return t.name==="@"||t.name==="#"||t.name==="*"||Number.isFinite(parseInt(t.name,10))||"defaultValue"in t&&!!t.defaultValue&&t.defaultValue.some(e=>R1(e))||"alternativeValue"in t&&!!t.alternativeValue&&t.alternativeValue.some(e=>R1(e));case"arithmetic":return AU(t.arithmetic);case"shell":return fU(t.shell);default:return!1}}function R1(t){switch(t.type){case"redirection":return t.args.some(e=>R1(e));case"argument":return t.segments.some(e=>Ace(e));default:throw new Error(`Assertion failed: Unsupported argument type: "${t.type}"`)}}function AU(t){switch(t.type){case"variable":return Ace(t);case"number":return!1;default:return AU(t.left)||AU(t.right)}}function fU(t){return t.some(({command:e})=>{for(;e;){let r=e.chain;for(;r;){let o;switch(r.type){case"subshell":o=fU(r.subshell);break;case"command":o=r.envs.some(a=>a.args.some(n=>R1(n)))||r.args.some(a=>R1(a));break}if(o)return!0;if(!r.then)break;r=r.then.chain}if(!e.then)break;e=e.then.line}return!1})}async function TE(t,e=[],{baseFs:r=new Tn,builtins:o={},cwd:a=le.toPortablePath(process.cwd()),env:n=process.env,stdin:u=process.stdin,stdout:A=process.stdout,stderr:p=process.stderr,variables:h={},glob:E=Nb}={}){let I={};for(let[C,R]of Object.entries(n))typeof R<"u"&&(I[C]=R);let v=new Map(hot);for(let[C,R]of Object.entries(o))v.set(C,R);u===null&&(u=new cl.PassThrough,u.end());let x=LD(t,E);if(!fU(x)&&x.length>0&&e.length>0){let{command:C}=x[x.length-1];for(;C.then;)C=C.then.line;let R=C.chain;for(;R.then;)R=R.then.chain;R.type==="command"&&(R.args=R.args.concat(e.map(N=>({type:"argument",segments:[{type:"text",text:N}]}))))}return await _b(x,{args:e,baseFs:r,builtins:v,initialStdin:u,initialStdout:A,initialStderr:p,glob:E},{cwd:a,environment:I,exitCode:null,procedures:{},stdin:u,stdout:A,stderr:p,variables:Object.assign({},h,{["?"]:0}),nextBackgroundJobIndex:1,backgroundJobs:[]})}var ace,lce,cl,cce,hot,dot,k1=Et(()=>{Pt();Nl();ace=$e(IL()),lce=ve("os"),cl=ve("stream"),cce=ve("timers/promises");Yle();Wle();Jle();uU();uU();hot=new Map([["cd",async([t=(0,lce.homedir)(),...e],r,o)=>{let a=z.resolve(o.cwd,le.toPortablePath(t));if(!(await r.baseFs.statPromise(a).catch(u=>{throw u.code==="ENOENT"?new ll(`cd: no such file or directory: ${t}`):u})).isDirectory())throw new ll(`cd: not a directory: ${t}`);return o.cwd=a,0}],["pwd",async(t,e,r)=>(r.stdout.write(`${le.fromPortablePath(r.cwd)} `),0)],[":",async(t,e,r)=>0],["true",async(t,e,r)=>0],["false",async(t,e,r)=>1],["exit",async([t,...e],r,o)=>o.exitCode=parseInt(t??o.variables["?"],10)],["echo",async(t,e,r)=>(r.stdout.write(`${t.join(" ")} `),0)],["sleep",async([t],e,r)=>{if(typeof t>"u")throw new ll("sleep: missing operand");let o=Number(t);if(Number.isNaN(o))throw new ll(`sleep: invalid time interval '${t}'`);return await(0,cce.setTimeout)(1e3*o,0)}],["__ysh_run_procedure",async(t,e,r)=>{let o=r.procedures[t[0]];return await Ob(o,{stdin:new Xl(r.stdin),stdout:new Xl(r.stdout),stderr:new Xl(r.stderr)}).run()}],["__ysh_set_redirects",async(t,e,r)=>{let o=r.stdin,a=r.stdout,n=r.stderr,u=[],A=[],p=[],h=0;for(;t[h]!=="--";){let I=t[h++],{type:v,fd:x}=JSON.parse(I),C=V=>{switch(x){case null:case 0:u.push(V);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},R=V=>{switch(x){case null:case 1:A.push(V);break;case 2:p.push(V);break;default:throw new Error(`Unsupported file descriptor: "${x}"`)}},N=Number(t[h++]),U=h+N;for(let V=h;Ve.baseFs.createReadStream(z.resolve(r.cwd,le.toPortablePath(t[V]))));break;case"<<<":C(()=>{let te=new cl.PassThrough;return process.nextTick(()=>{te.write(`${t[V]} `),te.end()}),te});break;case"<&":C(()=>nce(Number(t[V]),1,r));break;case">":case">>":{let te=z.resolve(r.cwd,le.toPortablePath(t[V]));R(te==="/dev/null"?new cl.Writable({autoDestroy:!0,emitClose:!0,write(ae,fe,ue){setImmediate(ue)}}):e.baseFs.createWriteStream(te,v===">>"?{flags:"a"}:void 0))}break;case">&":R(nce(Number(t[V]),2,r));break;default:throw new Error(`Assertion failed: Unsupported redirection type: "${v}"`)}}if(u.length>0){let I=new cl.PassThrough;o=I;let v=x=>{if(x===u.length)I.end();else{let C=u[x]();C.pipe(I,{end:!1}),C.on("end",()=>{v(x+1)})}};v(0)}if(A.length>0){let I=new cl.PassThrough;a=I;for(let v of A)I.pipe(v)}if(p.length>0){let I=new cl.PassThrough;n=I;for(let v of p)I.pipe(v)}let E=await Ob(F1(t.slice(h+1),e,r),{stdin:new Xl(o),stdout:new Xl(a),stderr:new Xl(n)}).run();return await Promise.all(A.map(I=>new Promise((v,x)=>{I.on("error",C=>{x(C)}),I.on("close",()=>{v()}),I.end()}))),await Promise.all(p.map(I=>new Promise((v,x)=>{I.on("error",C=>{x(C)}),I.on("close",()=>{v()}),I.end()}))),E}]]);dot={addition:(t,e)=>t+e,subtraction:(t,e)=>t-e,multiplication:(t,e)=>t*e,division:(t,e)=>Math.trunc(t/e)}});var Hb=_((n4t,fce)=>{function wot(t,e){for(var r=-1,o=t==null?0:t.length,a=Array(o);++r{var pce=hd(),Iot=Hb(),Bot=ql(),vot=pE(),Dot=1/0,hce=pce?pce.prototype:void 0,gce=hce?hce.toString:void 0;function dce(t){if(typeof t=="string")return t;if(Bot(t))return Iot(t,dce)+"";if(vot(t))return gce?gce.call(t):"";var e=t+"";return e=="0"&&1/t==-Dot?"-0":e}mce.exports=dce});var L1=_((s4t,Ece)=>{var Pot=yce();function Sot(t){return t==null?"":Pot(t)}Ece.exports=Sot});var pU=_((o4t,Cce)=>{function bot(t,e,r){var o=-1,a=t.length;e<0&&(e=-e>a?0:a+e),r=r>a?a:r,r<0&&(r+=a),a=e>r?0:r-e>>>0,e>>>=0;for(var n=Array(a);++o{var xot=pU();function kot(t,e,r){var o=t.length;return r=r===void 0?o:r,!e&&r>=o?t:xot(t,e,r)}wce.exports=kot});var hU=_((l4t,Bce)=>{var Qot="\\ud800-\\udfff",Fot="\\u0300-\\u036f",Rot="\\ufe20-\\ufe2f",Tot="\\u20d0-\\u20ff",Lot=Fot+Rot+Tot,Not="\\ufe0e\\ufe0f",Oot="\\u200d",Mot=RegExp("["+Oot+Qot+Lot+Not+"]");function Uot(t){return Mot.test(t)}Bce.exports=Uot});var Dce=_((c4t,vce)=>{function _ot(t){return t.split("")}vce.exports=_ot});var Rce=_((u4t,Fce)=>{var Pce="\\ud800-\\udfff",Hot="\\u0300-\\u036f",qot="\\ufe20-\\ufe2f",Got="\\u20d0-\\u20ff",jot=Hot+qot+Got,Yot="\\ufe0e\\ufe0f",Wot="["+Pce+"]",gU="["+jot+"]",dU="\\ud83c[\\udffb-\\udfff]",Kot="(?:"+gU+"|"+dU+")",Sce="[^"+Pce+"]",bce="(?:\\ud83c[\\udde6-\\uddff]){2}",xce="[\\ud800-\\udbff][\\udc00-\\udfff]",zot="\\u200d",kce=Kot+"?",Qce="["+Yot+"]?",Vot="(?:"+zot+"(?:"+[Sce,bce,xce].join("|")+")"+Qce+kce+")*",Jot=Qce+kce+Vot,Xot="(?:"+[Sce+gU+"?",gU,bce,xce,Wot].join("|")+")",Zot=RegExp(dU+"(?="+dU+")|"+Xot+Jot,"g");function $ot(t){return t.match(Zot)||[]}Fce.exports=$ot});var Lce=_((A4t,Tce)=>{var eat=Dce(),tat=hU(),rat=Rce();function nat(t){return tat(t)?rat(t):eat(t)}Tce.exports=nat});var Oce=_((f4t,Nce)=>{var iat=Ice(),sat=hU(),oat=Lce(),aat=L1();function lat(t){return function(e){e=aat(e);var r=sat(e)?oat(e):void 0,o=r?r[0]:e.charAt(0),a=r?iat(r,1).join(""):e.slice(1);return o[t]()+a}}Nce.exports=lat});var Uce=_((p4t,Mce)=>{var cat=Oce(),uat=cat("toUpperCase");Mce.exports=uat});var mU=_((h4t,_ce)=>{var Aat=L1(),fat=Uce();function pat(t){return fat(Aat(t).toLowerCase())}_ce.exports=pat});var Hce=_((g4t,qb)=>{function hat(){var t=0,e=1,r=2,o=3,a=4,n=5,u=6,A=7,p=8,h=9,E=10,I=11,v=12,x=13,C=14,R=15,N=16,U=17,V=0,te=1,ae=2,fe=3,ue=4;function me(g,Ee){return 55296<=g.charCodeAt(Ee)&&g.charCodeAt(Ee)<=56319&&56320<=g.charCodeAt(Ee+1)&&g.charCodeAt(Ee+1)<=57343}function he(g,Ee){Ee===void 0&&(Ee=0);var Pe=g.charCodeAt(Ee);if(55296<=Pe&&Pe<=56319&&Ee=1){var ce=g.charCodeAt(Ee-1),ne=Pe;return 55296<=ce&&ce<=56319?(ce-55296)*1024+(ne-56320)+65536:ne}return Pe}function Be(g,Ee,Pe){var ce=[g].concat(Ee).concat([Pe]),ne=ce[ce.length-2],ee=Pe,Ie=ce.lastIndexOf(C);if(Ie>1&&ce.slice(1,Ie).every(function(H){return H==o})&&[o,x,U].indexOf(g)==-1)return ae;var Fe=ce.lastIndexOf(a);if(Fe>0&&ce.slice(1,Fe).every(function(H){return H==a})&&[v,a].indexOf(ne)==-1)return ce.filter(function(H){return H==a}).length%2==1?fe:ue;if(ne==t&&ee==e)return V;if(ne==r||ne==t||ne==e)return ee==C&&Ee.every(function(H){return H==o})?ae:te;if(ee==r||ee==t||ee==e)return te;if(ne==u&&(ee==u||ee==A||ee==h||ee==E))return V;if((ne==h||ne==A)&&(ee==A||ee==p))return V;if((ne==E||ne==p)&&ee==p)return V;if(ee==o||ee==R)return V;if(ee==n)return V;if(ne==v)return V;var At=ce.indexOf(o)!=-1?ce.lastIndexOf(o)-1:ce.length-2;return[x,U].indexOf(ce[At])!=-1&&ce.slice(At+1,-1).every(function(H){return H==o})&&ee==C||ne==R&&[N,U].indexOf(ee)!=-1?V:Ee.indexOf(a)!=-1?ae:ne==a&&ee==a?V:te}this.nextBreak=function(g,Ee){if(Ee===void 0&&(Ee=0),Ee<0)return 0;if(Ee>=g.length-1)return g.length;for(var Pe=we(he(g,Ee)),ce=[],ne=Ee+1;ne{var gat=/^(.*?)(\x1b\[[^m]+m|\x1b\]8;;.*?(\x1b\\|\u0007))/,Gb;function dat(){if(Gb)return Gb;if(typeof Intl.Segmenter<"u"){let t=new Intl.Segmenter("en",{granularity:"grapheme"});return Gb=e=>Array.from(t.segment(e),({segment:r})=>r)}else{let t=Hce(),e=new t;return Gb=r=>e.splitGraphemes(r)}}qce.exports=(t,e=0,r=t.length)=>{if(e<0||r<0)throw new RangeError("Negative indices aren't supported by this implementation");let o=r-e,a="",n=0,u=0;for(;t.length>0;){let A=t.match(gat)||[t,t,void 0],p=dat()(A[1]),h=Math.min(e-n,p.length);p=p.slice(h);let E=Math.min(o-u,p.length);a+=p.slice(0,E).join(""),n+=h,u+=E,typeof A[2]<"u"&&(a+=A[2]),t=t.slice(A[0].length)}return a}});var rn,N1=Et(()=>{rn=process.env.YARN_IS_TEST_ENV?"0.0.0":"4.2.2"});function Vce(t,{configuration:e,json:r}){if(!e.get("enableMessageNames"))return"";let a=Ku(t===null?0:t);return!r&&t===null?Ut(e,a,"grey"):a}function yU(t,{configuration:e,json:r}){let o=Vce(t,{configuration:e,json:r});if(!o||t===null||t===0)return o;let a=wr[t],n=`https://yarnpkg.com/advanced/error-codes#${o}---${a}`.toLowerCase();return Zy(e,o,n)}async function NE({configuration:t,stdout:e,forceError:r},o){let a=await Lt.start({configuration:t,stdout:e,includeFooter:!1},async n=>{let u=!1,A=!1;for(let p of o)typeof p.option<"u"&&(p.error||r?(A=!0,n.reportError(50,p.message)):(u=!0,n.reportWarning(50,p.message)),p.callback?.());u&&!A&&n.reportSeparator()});return a.hasErrors()?a.exitCode():null}var Kce,jb,mat,jce,Yce,fh,zce,Wce,yat,Eat,Yb,Cat,Lt,O1=Et(()=>{Kce=$e(Gce()),jb=$e(rd());fP();Wl();N1();jl();mat="\xB7",jce=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827","\u2807","\u280F"],Yce=80,fh=jb.default.GITHUB_ACTIONS?{start:t=>`::group::${t} `,end:t=>`::endgroup:: `}:jb.default.TRAVIS?{start:t=>`travis_fold:start:${t} `,end:t=>`travis_fold:end:${t} `}:jb.default.GITLAB?{start:t=>`section_start:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}[collapsed=true]\r\x1B[0K${t} `,end:t=>`section_end:${Math.floor(Date.now()/1e3)}:${t.toLowerCase().replace(/\W+/g,"_")}\r\x1B[0K`}:null,zce=fh!==null,Wce=new Date,yat=["iTerm.app","Apple_Terminal","WarpTerminal","vscode"].includes(process.env.TERM_PROGRAM)||!!process.env.WT_SESSION,Eat=t=>t,Yb=Eat({patrick:{date:[17,3],chars:["\u{1F340}","\u{1F331}"],size:40},simba:{date:[19,7],chars:["\u{1F981}","\u{1F334}"],size:40},jack:{date:[31,10],chars:["\u{1F383}","\u{1F987}"],size:40},hogsfather:{date:[31,12],chars:["\u{1F389}","\u{1F384}"],size:40},default:{chars:["=","-"],size:80}}),Cat=yat&&Object.keys(Yb).find(t=>{let e=Yb[t];return!(e.date&&(e.date[0]!==Wce.getDate()||e.date[1]!==Wce.getMonth()+1))})||"default";Lt=class extends Xs{constructor({configuration:r,stdout:o,json:a=!1,forceSectionAlignment:n=!1,includeNames:u=!0,includePrefix:A=!0,includeFooter:p=!0,includeLogs:h=!a,includeInfos:E=h,includeWarnings:I=h}){super();this.uncommitted=new Set;this.warningCount=0;this.errorCount=0;this.timerFooter=[];this.startTime=Date.now();this.indent=0;this.level=0;this.progress=new Map;this.progressTime=0;this.progressFrame=0;this.progressTimeout=null;this.progressStyle=null;this.progressMaxScaledSize=null;if(XI(this,{configuration:r}),this.configuration=r,this.forceSectionAlignment=n,this.includeNames=u,this.includePrefix=A,this.includeFooter=p,this.includeInfos=E,this.includeWarnings=I,this.json=a,this.stdout=o,r.get("enableProgressBars")&&!a&&o.isTTY&&o.columns>22){let v=r.get("progressBarStyle")||Cat;if(!Object.hasOwn(Yb,v))throw new Error("Assertion failed: Invalid progress bar style");this.progressStyle=Yb[v];let x=Math.min(this.getRecommendedLength(),80);this.progressMaxScaledSize=Math.floor(this.progressStyle.size*x/80)}}static async start(r,o){let a=new this(r),n=process.emitWarning;process.emitWarning=(u,A)=>{if(typeof u!="string"){let h=u;u=h.message,A=A??h.name}let p=typeof A<"u"?`${A}: ${u}`:u;a.reportWarning(0,p)},r.includeVersion&&a.reportInfo(0,Ed(r.configuration,`Yarn ${rn}`,2));try{await o(a)}catch(u){a.reportExceptionOnce(u)}finally{await a.finalize(),process.emitWarning=n}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}getRecommendedLength(){let o=this.progressStyle!==null?this.stdout.columns-1:super.getRecommendedLength();return Math.max(40,o-12-this.indent*2)}startSectionSync({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}async startSectionPromise({reportHeader:r,reportFooter:o,skipIfEmpty:a},n){let u={committed:!1,action:()=>{r?.()}};a?this.uncommitted.add(u):(u.action(),u.committed=!0);let A=Date.now();try{return await n()}catch(p){throw this.reportExceptionOnce(p),p}finally{let p=Date.now();this.uncommitted.delete(u),u.committed&&o?.(p-A)}}startTimerImpl(r,o,a){return{cb:typeof o=="function"?o:a,reportHeader:()=>{this.level+=1,this.reportInfo(null,`\u250C ${r}`),this.indent+=1,fh!==null&&!this.json&&this.includeInfos&&this.stdout.write(fh.start(r))},reportFooter:A=>{if(this.indent-=1,fh!==null&&!this.json&&this.includeInfos){this.stdout.write(fh.end(r));for(let p of this.timerFooter)p()}this.configuration.get("enableTimers")&&A>200?this.reportInfo(null,`\u2514 Completed in ${Ut(this.configuration,A,yt.DURATION)}`):this.reportInfo(null,"\u2514 Completed"),this.level-=1},skipIfEmpty:(typeof o=="function"?{}:o).skipIfEmpty}}startTimerSync(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionSync(u,n)}async startTimerPromise(r,o,a){let{cb:n,...u}=this.startTimerImpl(r,o,a);return this.startSectionPromise(u,n)}reportSeparator(){this.indent===0?this.writeLine(""):this.reportInfo(null,"")}reportInfo(r,o){if(!this.includeInfos)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"",u=`${this.formatPrefix(n,"blueBright")}${o}`;this.json?this.reportJson({type:"info",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(u)}reportWarning(r,o){if(this.warningCount+=1,!this.includeWarnings)return;this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"warning",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(`${this.formatPrefix(n,"yellowBright")}${o}`)}reportError(r,o){this.errorCount+=1,this.timerFooter.push(()=>this.reportErrorImpl(r,o)),this.reportErrorImpl(r,o)}reportErrorImpl(r,o){this.commit();let a=this.formatNameWithHyperlink(r),n=a?`${a}: `:"";this.json?this.reportJson({type:"error",name:r,displayName:this.formatName(r),indent:this.formatIndent(),data:o}):this.writeLine(`${this.formatPrefix(n,"redBright")}${o}`,{truncate:!1})}reportFold(r,o){if(!fh)return;let a=`${fh.start(r)}${o}${fh.end(r)}`;this.timerFooter.push(()=>this.stdout.write(a))}reportProgress(r){if(this.progressStyle===null)return{...Promise.resolve(),stop:()=>{}};if(r.hasProgress&&r.hasTitle)throw new Error("Unimplemented: Progress bars can't have both progress and titles.");let o=!1,a=Promise.resolve().then(async()=>{let u={progress:r.hasProgress?0:void 0,title:r.hasTitle?"":void 0};this.progress.set(r,{definition:u,lastScaledSize:r.hasProgress?-1:void 0,lastTitle:void 0}),this.refreshProgress({delta:-1});for await(let{progress:A,title:p}of r)o||u.progress===A&&u.title===p||(u.progress=A,u.title=p,this.refreshProgress());n()}),n=()=>{o||(o=!0,this.progress.delete(r),this.refreshProgress({delta:1}))};return{...a,stop:n}}reportJson(r){this.json&&this.writeLine(`${JSON.stringify(r)}`)}async finalize(){if(!this.includeFooter)return;let r="";this.errorCount>0?r="Failed with errors":this.warningCount>0?r="Done with warnings":r="Done";let o=Ut(this.configuration,Date.now()-this.startTime,yt.DURATION),a=this.configuration.get("enableTimers")?`${r} in ${o}`:r;this.errorCount>0?this.reportError(0,a):this.warningCount>0?this.reportWarning(0,a):this.reportInfo(0,a)}writeLine(r,{truncate:o}={}){this.clearProgress({clear:!0}),this.stdout.write(`${this.truncate(r,{truncate:o})} `),this.writeProgress()}writeLines(r,{truncate:o}={}){this.clearProgress({delta:r.length});for(let a of r)this.stdout.write(`${this.truncate(a,{truncate:o})} `);this.writeProgress()}commit(){let r=this.uncommitted;this.uncommitted=new Set;for(let o of r)o.committed=!0,o.action()}clearProgress({delta:r=0,clear:o=!1}){this.progressStyle!==null&&this.progress.size+r>0&&(this.stdout.write(`\x1B[${this.progress.size+r}A`),(r>0||o)&&this.stdout.write("\x1B[0J"))}writeProgress(){if(this.progressStyle===null||(this.progressTimeout!==null&&clearTimeout(this.progressTimeout),this.progressTimeout=null,this.progress.size===0))return;let r=Date.now();r-this.progressTime>Yce&&(this.progressFrame=(this.progressFrame+1)%jce.length,this.progressTime=r);let o=jce[this.progressFrame];for(let a of this.progress.values()){let n="";if(typeof a.lastScaledSize<"u"){let h=this.progressStyle.chars[0].repeat(a.lastScaledSize),E=this.progressStyle.chars[1].repeat(this.progressMaxScaledSize-a.lastScaledSize);n=` ${h}${E}`}let u=this.formatName(null),A=u?`${u}: `:"",p=a.definition.title?` ${a.definition.title}`:"";this.stdout.write(`${Ut(this.configuration,"\u27A4","blueBright")} ${A}${o}${n}${p} `)}this.progressTimeout=setTimeout(()=>{this.refreshProgress({force:!0})},Yce)}refreshProgress({delta:r=0,force:o=!1}={}){let a=!1,n=!1;if(o||this.progress.size===0)a=!0;else for(let u of this.progress.values()){let A=typeof u.definition.progress<"u"?Math.trunc(this.progressMaxScaledSize*u.definition.progress):void 0,p=u.lastScaledSize;u.lastScaledSize=A;let h=u.lastTitle;if(u.lastTitle=u.definition.title,A!==p||(n=h!==u.definition.title)){a=!0;break}}a&&(this.clearProgress({delta:r,clear:n}),this.writeProgress())}truncate(r,{truncate:o}={}){return this.progressStyle===null&&(o=!1),typeof o>"u"&&(o=this.configuration.get("preferTruncatedLines")),o&&(r=(0,Kce.default)(r,0,this.stdout.columns-1)),r}formatName(r){return this.includeNames?Vce(r,{configuration:this.configuration,json:this.json}):""}formatPrefix(r,o){return this.includePrefix?`${Ut(this.configuration,"\u27A4",o)} ${r}${this.formatIndent()}`:""}formatNameWithHyperlink(r){return this.includeNames?yU(r,{configuration:this.configuration,json:this.json}):""}formatIndent(){return this.level>0||!this.forceSectionAlignment?"\u2502 ".repeat(this.indent):`${mat} `}}});var un={};zt(un,{PackageManager:()=>Zce,detectPackageManager:()=>$ce,executePackageAccessibleBinary:()=>iue,executePackageScript:()=>Wb,executePackageShellcode:()=>EU,executeWorkspaceAccessibleBinary:()=>Sat,executeWorkspaceLifecycleScript:()=>rue,executeWorkspaceScript:()=>tue,getPackageAccessibleBinaries:()=>Kb,getWorkspaceAccessibleBinaries:()=>nue,hasPackageScript:()=>vat,hasWorkspaceScript:()=>CU,isNodeScript:()=>wU,makeScriptEnv:()=>M1,maybeExecuteWorkspaceLifecycleScript:()=>Pat,prepareExternalProject:()=>Bat});async function ph(t,e,r,o=[]){if(process.platform==="win32"){let a=`@goto #_undefined_# 2>NUL || @title %COMSPEC% & @setlocal & @"${r}" ${o.map(n=>`"${n.replace('"','""')}"`).join(" ")} %*`;await oe.writeFilePromise(z.format({dir:t,name:e,ext:".cmd"}),a)}await oe.writeFilePromise(z.join(t,e),`#!/bin/sh exec "${r}" ${o.map(a=>`'${a.replace(/'/g,`'"'"'`)}'`).join(" ")} "$@" `,{mode:493})}async function $ce(t){let e=await Ot.tryFind(t);if(e?.packageManager){let o=US(e.packageManager);if(o?.name){let a=`found ${JSON.stringify({packageManager:e.packageManager})} in manifest`,[n]=o.reference.split(".");switch(o.name){case"yarn":return{packageManagerField:!0,packageManager:Number(n)===1?"Yarn Classic":"Yarn",reason:a};case"npm":return{packageManagerField:!0,packageManager:"npm",reason:a};case"pnpm":return{packageManagerField:!0,packageManager:"pnpm",reason:a}}}}let r;try{r=await oe.readFilePromise(z.join(t,dr.lockfile),"utf8")}catch{}return r!==void 0?r.match(/^__metadata:$/m)?{packageManager:"Yarn",reason:'"__metadata" key found in yarn.lock'}:{packageManager:"Yarn Classic",reason:'"__metadata" key not found in yarn.lock, must be a Yarn classic lockfile'}:oe.existsSync(z.join(t,"package-lock.json"))?{packageManager:"npm",reason:`found npm's "package-lock.json" lockfile`}:oe.existsSync(z.join(t,"pnpm-lock.yaml"))?{packageManager:"pnpm",reason:`found pnpm's "pnpm-lock.yaml" lockfile`}:null}async function M1({project:t,locator:e,binFolder:r,ignoreCorepack:o,lifecycleScript:a,baseEnv:n=t?.configuration.env??process.env}){let u={};for(let[E,I]of Object.entries(n))typeof I<"u"&&(u[E.toLowerCase()!=="path"?E:"PATH"]=I);let A=le.fromPortablePath(r);u.BERRY_BIN_FOLDER=le.fromPortablePath(A);let p=process.env.COREPACK_ROOT&&!o?le.join(process.env.COREPACK_ROOT,"dist/yarn.js"):process.argv[1];if(await Promise.all([ph(r,"node",process.execPath),...rn!==null?[ph(r,"run",process.execPath,[p,"run"]),ph(r,"yarn",process.execPath,[p]),ph(r,"yarnpkg",process.execPath,[p]),ph(r,"node-gyp",process.execPath,[p,"run","--top-level","node-gyp"])]:[]]),t&&(u.INIT_CWD=le.fromPortablePath(t.configuration.startingCwd),u.PROJECT_CWD=le.fromPortablePath(t.cwd)),u.PATH=u.PATH?`${A}${le.delimiter}${u.PATH}`:`${A}`,u.npm_execpath=`${A}${le.sep}yarn`,u.npm_node_execpath=`${A}${le.sep}node`,e){if(!t)throw new Error("Assertion failed: Missing project");let E=t.tryWorkspaceByLocator(e),I=E?E.manifest.version??"":t.storedPackages.get(e.locatorHash).version??"";u.npm_package_name=fn(e),u.npm_package_version=I;let v;if(E)v=E.cwd;else{let x=t.storedPackages.get(e.locatorHash);if(!x)throw new Error(`Package for ${qr(t.configuration,e)} not found in the project`);let C=t.configuration.getLinkers(),R={project:t,report:new Lt({stdout:new hh.PassThrough,configuration:t.configuration})},N=C.find(U=>U.supportsPackage(x,R));if(!N)throw new Error(`The package ${qr(t.configuration,x)} isn't supported by any of the available linkers`);v=await N.findPackageLocation(x,R)}u.npm_package_json=le.fromPortablePath(z.join(v,dr.manifest))}let h=rn!==null?`yarn/${rn}`:`yarn/${Df("@yarnpkg/core").version}-core`;return u.npm_config_user_agent=`${h} npm/? node/${process.version} ${process.platform} ${process.arch}`,a&&(u.npm_lifecycle_event=a),t&&await t.configuration.triggerHook(E=>E.setupScriptEnvironment,t,u,async(E,I,v)=>await ph(r,E,I,v)),u}async function Bat(t,e,{configuration:r,report:o,workspace:a=null,locator:n=null}){await Iat(async()=>{await oe.mktempPromise(async u=>{let A=z.join(u,"pack.log"),p=null,{stdout:h,stderr:E}=r.getSubprocessStreams(A,{prefix:le.fromPortablePath(t),report:o}),I=n&&qc(n)?r1(n):n,v=I?ba(I):"an external project";h.write(`Packing ${v} from sources `);let x=await $ce(t),C;x!==null?(h.write(`Using ${x.packageManager} for bootstrap. Reason: ${x.reason} `),C=x.packageManager):(h.write(`No package manager configuration detected; defaulting to Yarn `),C="Yarn");let R=C==="Yarn"&&!x?.packageManagerField;await oe.mktempPromise(async N=>{let U=await M1({binFolder:N,ignoreCorepack:R}),te=new Map([["Yarn Classic",async()=>{let fe=a!==null?["workspace",a]:[],ue=z.join(t,dr.manifest),me=await oe.readFilePromise(ue),he=await Yc(process.execPath,[process.argv[1],"set","version","classic","--only-if-needed","--yarn-path"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(he.code!==0)return he.code;await oe.writeFilePromise(ue,me),await oe.appendFilePromise(z.join(t,".npmignore"),`/.yarn `),h.write(` `),delete U.NODE_ENV;let Be=await Yc("yarn",["install"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(Be.code!==0)return Be.code;h.write(` `);let we=await Yc("yarn",[...fe,"pack","--filename",le.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return we.code!==0?we.code:0}],["Yarn",async()=>{let fe=a!==null?["workspace",a]:[];U.YARN_ENABLE_INLINE_BUILDS="1";let ue=z.join(t,dr.lockfile);await oe.existsPromise(ue)||await oe.writeFilePromise(ue,"");let me=await Yc("yarn",[...fe,"pack","--install-if-needed","--filename",le.fromPortablePath(e)],{cwd:t,env:U,stdin:p,stdout:h,stderr:E});return me.code!==0?me.code:0}],["npm",async()=>{if(a!==null){let Ee=new hh.PassThrough,Pe=zy(Ee);Ee.pipe(h,{end:!1});let ce=await Yc("npm",["--version"],{cwd:t,env:U,stdin:p,stdout:Ee,stderr:E,end:0});if(Ee.end(),ce.code!==0)return h.end(),E.end(),ce.code;let ne=(await Pe).toString().trim();if(!kf(ne,">=7.x")){let ee=tA(null,"npm"),Ie=In(ee,ne),Fe=In(ee,">=7.x");throw new Error(`Workspaces aren't supported by ${Gn(r,Ie)}; please upgrade to ${Gn(r,Fe)} (npm has been detected as the primary package manager for ${Ut(r,t,yt.PATH)})`)}}let fe=a!==null?["--workspace",a]:[];delete U.npm_config_user_agent,delete U.npm_config_production,delete U.NPM_CONFIG_PRODUCTION,delete U.NODE_ENV;let ue=await Yc("npm",["install","--legacy-peer-deps"],{cwd:t,env:U,stdin:p,stdout:h,stderr:E,end:1});if(ue.code!==0)return ue.code;let me=new hh.PassThrough,he=zy(me);me.pipe(h);let Be=await Yc("npm",["pack","--silent",...fe],{cwd:t,env:U,stdin:p,stdout:me,stderr:E});if(Be.code!==0)return Be.code;let we=(await he).toString().trim().replace(/^.*\n/s,""),g=z.resolve(t,le.toPortablePath(we));return await oe.renamePromise(g,e),0}]]).get(C);if(typeof te>"u")throw new Error("Assertion failed: Unsupported workflow");let ae=await te();if(!(ae===0||typeof ae>"u"))throw oe.detachTemp(u),new Jt(58,`Packing the package failed (exit code ${ae}, logs can be found here: ${Ut(r,A,yt.PATH)})`)})})})}async function vat(t,e,{project:r}){let o=r.tryWorkspaceByLocator(t);if(o!==null)return CU(o,e);let a=r.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${qr(r.configuration,t)} not found in the project`);return await Jl.openPromise(async n=>{let u=r.configuration,A=r.configuration.getLinkers(),p={project:r,report:new Lt({stdout:new hh.PassThrough,configuration:u})},h=A.find(x=>x.supportsPackage(a,p));if(!h)throw new Error(`The package ${qr(r.configuration,a)} isn't supported by any of the available linkers`);let E=await h.findPackageLocation(a,p),I=new gn(E,{baseFs:n});return(await Ot.find(Bt.dot,{baseFs:I})).scripts.has(e)})}async function Wb(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{manifest:h,env:E,cwd:I}=await eue(t,{project:a,binFolder:p,cwd:o,lifecycleScript:e}),v=h.scripts.get(e);if(typeof v>"u")return 1;let x=async()=>await TE(v,r,{cwd:I,env:E,stdin:n,stdout:u,stderr:A});return await(await a.configuration.reduceHook(R=>R.wrapScriptExecution,x,a,t,e,{script:v,args:r,cwd:I,env:E,stdin:n,stdout:u,stderr:A}))()})}async function EU(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A}){return await oe.mktempPromise(async p=>{let{env:h,cwd:E}=await eue(t,{project:a,binFolder:p,cwd:o});return await TE(e,r,{cwd:E,env:h,stdin:n,stdout:u,stderr:A})})}async function Dat(t,{binFolder:e,cwd:r,lifecycleScript:o}){let a=await M1({project:t.project,locator:t.anchoredLocator,binFolder:e,lifecycleScript:o});return await IU(e,await nue(t)),typeof r>"u"&&(r=z.dirname(await oe.realpathPromise(z.join(t.cwd,"package.json")))),{manifest:t.manifest,binFolder:e,env:a,cwd:r}}async function eue(t,{project:e,binFolder:r,cwd:o,lifecycleScript:a}){let n=e.tryWorkspaceByLocator(t);if(n!==null)return Dat(n,{binFolder:r,cwd:o,lifecycleScript:a});let u=e.storedPackages.get(t.locatorHash);if(!u)throw new Error(`Package for ${qr(e.configuration,t)} not found in the project`);return await Jl.openPromise(async A=>{let p=e.configuration,h=e.configuration.getLinkers(),E={project:e,report:new Lt({stdout:new hh.PassThrough,configuration:p})},I=h.find(N=>N.supportsPackage(u,E));if(!I)throw new Error(`The package ${qr(e.configuration,u)} isn't supported by any of the available linkers`);let v=await M1({project:e,locator:t,binFolder:r,lifecycleScript:a});await IU(r,await Kb(t,{project:e}));let x=await I.findPackageLocation(u,E),C=new gn(x,{baseFs:A}),R=await Ot.find(Bt.dot,{baseFs:C});return typeof o>"u"&&(o=x),{manifest:R,binFolder:r,env:v,cwd:o}})}async function tue(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u}){return await Wb(t.anchoredLocator,e,r,{cwd:o,project:t.project,stdin:a,stdout:n,stderr:u})}function CU(t,e){return t.manifest.scripts.has(e)}async function rue(t,e,{cwd:r,report:o}){let{configuration:a}=t.project,n=null;await oe.mktempPromise(async u=>{let A=z.join(u,`${e}.log`),p=`# This file contains the result of Yarn calling the "${e}" lifecycle script inside a workspace ("${le.fromPortablePath(t.cwd)}") `,{stdout:h,stderr:E}=a.getSubprocessStreams(A,{report:o,prefix:qr(a,t.anchoredLocator),header:p});o.reportInfo(36,`Calling the "${e}" lifecycle script`);let I=await tue(t,e,[],{cwd:r,stdin:n,stdout:h,stderr:E});if(h.end(),E.end(),I!==0)throw oe.detachTemp(u),new Jt(36,`${(0,Jce.default)(e)} script failed (exit code ${Ut(a,I,yt.NUMBER)}, logs can be found here: ${Ut(a,A,yt.PATH)}); run ${Ut(a,`yarn ${e}`,yt.CODE)} to investigate`)})}async function Pat(t,e,r){CU(t,e)&&await rue(t,e,r)}function wU(t){let e=z.extname(t);if(e.match(/\.[cm]?[jt]sx?$/))return!0;if(e===".exe"||e===".bin")return!1;let r=Buffer.alloc(4),o;try{o=oe.openSync(t,"r")}catch{return!0}try{oe.readSync(o,r,0,r.length,0)}finally{oe.closeSync(o)}let a=r.readUint32BE();return!(a===3405691582||a===3489328638||a===2135247942||(a&4294901760)===1297743872)}async function Kb(t,{project:e}){let r=e.configuration,o=new Map,a=e.storedPackages.get(t.locatorHash);if(!a)throw new Error(`Package for ${qr(r,t)} not found in the project`);let n=new hh.Writable,u=r.getLinkers(),A={project:e,report:new Lt({configuration:r,stdout:n})},p=new Set([t.locatorHash]);for(let E of a.dependencies.values()){let I=e.storedResolutions.get(E.descriptorHash);if(!I)throw new Error(`Assertion failed: The resolution (${Gn(r,E)}) should have been registered`);p.add(I)}let h=await Promise.all(Array.from(p,async E=>{let I=e.storedPackages.get(E);if(!I)throw new Error(`Assertion failed: The package (${E}) should have been registered`);if(I.bin.size===0)return ol.skip;let v=u.find(C=>C.supportsPackage(I,A));if(!v)return ol.skip;let x=null;try{x=await v.findPackageLocation(I,A)}catch(C){if(C.code==="LOCATOR_NOT_INSTALLED")return ol.skip;throw C}return{dependency:I,packageLocation:x}}));for(let E of h){if(E===ol.skip)continue;let{dependency:I,packageLocation:v}=E;for(let[x,C]of I.bin){let R=z.resolve(v,C);o.set(x,[I,le.fromPortablePath(R),wU(R)])}}return o}async function nue(t){return await Kb(t.anchoredLocator,{project:t.project})}async function IU(t,e){await Promise.all(Array.from(e,([r,[,o,a]])=>a?ph(t,r,process.execPath,[o]):ph(t,r,o,[])))}async function iue(t,e,r,{cwd:o,project:a,stdin:n,stdout:u,stderr:A,nodeArgs:p=[],packageAccessibleBinaries:h}){h??=await Kb(t,{project:a});let E=h.get(e);if(!E)throw new Error(`Binary not found (${e}) for ${qr(a.configuration,t)}`);return await oe.mktempPromise(async I=>{let[,v]=E,x=await M1({project:a,locator:t,binFolder:I});await IU(x.BERRY_BIN_FOLDER,h);let C=wU(le.toPortablePath(v))?Yc(process.execPath,[...p,v,...r],{cwd:o,env:x,stdin:n,stdout:u,stderr:A}):Yc(v,r,{cwd:o,env:x,stdin:n,stdout:u,stderr:A}),R;try{R=await C}finally{await oe.removePromise(x.BERRY_BIN_FOLDER)}return R.code})}async function Sat(t,e,r,{cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A}){return await iue(t.anchoredLocator,e,r,{project:t.project,cwd:o,stdin:a,stdout:n,stderr:u,packageAccessibleBinaries:A})}var Jce,Xce,hh,Zce,wat,Iat,BU=Et(()=>{Pt();Pt();iA();k1();Jce=$e(mU()),Xce=$e(sd()),hh=ve("stream");fE();Wl();O1();N1();Db();jl();Gl();Qf();bo();Zce=(a=>(a.Yarn1="Yarn Classic",a.Yarn2="Yarn",a.Npm="npm",a.Pnpm="pnpm",a))(Zce||{});wat=2,Iat=(0,Xce.default)(wat)});var OE=_((O4t,oue)=>{"use strict";var sue=new Map([["C","cwd"],["f","file"],["z","gzip"],["P","preservePaths"],["U","unlink"],["strip-components","strip"],["stripComponents","strip"],["keep-newer","newer"],["keepNewer","newer"],["keep-newer-files","newer"],["keepNewerFiles","newer"],["k","keep"],["keep-existing","keep"],["keepExisting","keep"],["m","noMtime"],["no-mtime","noMtime"],["p","preserveOwner"],["L","follow"],["h","follow"]]);oue.exports=t=>t?Object.keys(t).map(e=>[sue.has(e)?sue.get(e):e,t[e]]).reduce((e,r)=>(e[r[0]]=r[1],e),Object.create(null)):{}});var UE=_((M4t,gue)=>{"use strict";var aue=typeof process=="object"&&process?process:{stdout:null,stderr:null},bat=ve("events"),lue=ve("stream"),cue=ve("string_decoder").StringDecoder,Mf=Symbol("EOF"),Uf=Symbol("maybeEmitEnd"),gh=Symbol("emittedEnd"),zb=Symbol("emittingEnd"),U1=Symbol("emittedError"),Vb=Symbol("closed"),uue=Symbol("read"),Jb=Symbol("flush"),Aue=Symbol("flushChunk"),ka=Symbol("encoding"),_f=Symbol("decoder"),Xb=Symbol("flowing"),_1=Symbol("paused"),ME=Symbol("resume"),Fs=Symbol("bufferLength"),vU=Symbol("bufferPush"),DU=Symbol("bufferShift"),Fo=Symbol("objectMode"),Ro=Symbol("destroyed"),PU=Symbol("emitData"),fue=Symbol("emitEnd"),SU=Symbol("emitEnd2"),Hf=Symbol("async"),H1=t=>Promise.resolve().then(t),pue=global._MP_NO_ITERATOR_SYMBOLS_!=="1",xat=pue&&Symbol.asyncIterator||Symbol("asyncIterator not implemented"),kat=pue&&Symbol.iterator||Symbol("iterator not implemented"),Qat=t=>t==="end"||t==="finish"||t==="prefinish",Fat=t=>t instanceof ArrayBuffer||typeof t=="object"&&t.constructor&&t.constructor.name==="ArrayBuffer"&&t.byteLength>=0,Rat=t=>!Buffer.isBuffer(t)&&ArrayBuffer.isView(t),Zb=class{constructor(e,r,o){this.src=e,this.dest=r,this.opts=o,this.ondrain=()=>e[ME](),r.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},bU=class extends Zb{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,r,o){super(e,r,o),this.proxyErrors=a=>r.emit("error",a),e.on("error",this.proxyErrors)}};gue.exports=class hue extends lue{constructor(e){super(),this[Xb]=!1,this[_1]=!1,this.pipes=[],this.buffer=[],this[Fo]=e&&e.objectMode||!1,this[Fo]?this[ka]=null:this[ka]=e&&e.encoding||null,this[ka]==="buffer"&&(this[ka]=null),this[Hf]=e&&!!e.async||!1,this[_f]=this[ka]?new cue(this[ka]):null,this[Mf]=!1,this[gh]=!1,this[zb]=!1,this[Vb]=!1,this[U1]=null,this.writable=!0,this.readable=!0,this[Fs]=0,this[Ro]=!1}get bufferLength(){return this[Fs]}get encoding(){return this[ka]}set encoding(e){if(this[Fo])throw new Error("cannot set encoding in objectMode");if(this[ka]&&e!==this[ka]&&(this[_f]&&this[_f].lastNeed||this[Fs]))throw new Error("cannot change encoding");this[ka]!==e&&(this[_f]=e?new cue(e):null,this.buffer.length&&(this.buffer=this.buffer.map(r=>this[_f].write(r)))),this[ka]=e}setEncoding(e){this.encoding=e}get objectMode(){return this[Fo]}set objectMode(e){this[Fo]=this[Fo]||!!e}get async(){return this[Hf]}set async(e){this[Hf]=this[Hf]||!!e}write(e,r,o){if(this[Mf])throw new Error("write after end");if(this[Ro])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof r=="function"&&(o=r,r="utf8"),r||(r="utf8");let a=this[Hf]?H1:n=>n();return!this[Fo]&&!Buffer.isBuffer(e)&&(Rat(e)?e=Buffer.from(e.buffer,e.byteOffset,e.byteLength):Fat(e)?e=Buffer.from(e):typeof e!="string"&&(this.objectMode=!0)),this[Fo]?(this.flowing&&this[Fs]!==0&&this[Jb](!0),this.flowing?this.emit("data",e):this[vU](e),this[Fs]!==0&&this.emit("readable"),o&&a(o),this.flowing):e.length?(typeof e=="string"&&!(r===this[ka]&&!this[_f].lastNeed)&&(e=Buffer.from(e,r)),Buffer.isBuffer(e)&&this[ka]&&(e=this[_f].write(e)),this.flowing&&this[Fs]!==0&&this[Jb](!0),this.flowing?this.emit("data",e):this[vU](e),this[Fs]!==0&&this.emit("readable"),o&&a(o),this.flowing):(this[Fs]!==0&&this.emit("readable"),o&&a(o),this.flowing)}read(e){if(this[Ro])return null;if(this[Fs]===0||e===0||e>this[Fs])return this[Uf](),null;this[Fo]&&(e=null),this.buffer.length>1&&!this[Fo]&&(this.encoding?this.buffer=[this.buffer.join("")]:this.buffer=[Buffer.concat(this.buffer,this[Fs])]);let r=this[uue](e||null,this.buffer[0]);return this[Uf](),r}[uue](e,r){return e===r.length||e===null?this[DU]():(this.buffer[0]=r.slice(e),r=r.slice(0,e),this[Fs]-=e),this.emit("data",r),!this.buffer.length&&!this[Mf]&&this.emit("drain"),r}end(e,r,o){return typeof e=="function"&&(o=e,e=null),typeof r=="function"&&(o=r,r="utf8"),e&&this.write(e,r),o&&this.once("end",o),this[Mf]=!0,this.writable=!1,(this.flowing||!this[_1])&&this[Uf](),this}[ME](){this[Ro]||(this[_1]=!1,this[Xb]=!0,this.emit("resume"),this.buffer.length?this[Jb]():this[Mf]?this[Uf]():this.emit("drain"))}resume(){return this[ME]()}pause(){this[Xb]=!1,this[_1]=!0}get destroyed(){return this[Ro]}get flowing(){return this[Xb]}get paused(){return this[_1]}[vU](e){this[Fo]?this[Fs]+=1:this[Fs]+=e.length,this.buffer.push(e)}[DU](){return this.buffer.length&&(this[Fo]?this[Fs]-=1:this[Fs]-=this.buffer[0].length),this.buffer.shift()}[Jb](e){do;while(this[Aue](this[DU]()));!e&&!this.buffer.length&&!this[Mf]&&this.emit("drain")}[Aue](e){return e?(this.emit("data",e),this.flowing):!1}pipe(e,r){if(this[Ro])return;let o=this[gh];return r=r||{},e===aue.stdout||e===aue.stderr?r.end=!1:r.end=r.end!==!1,r.proxyErrors=!!r.proxyErrors,o?r.end&&e.end():(this.pipes.push(r.proxyErrors?new bU(this,e,r):new Zb(this,e,r)),this[Hf]?H1(()=>this[ME]()):this[ME]()),e}unpipe(e){let r=this.pipes.find(o=>o.dest===e);r&&(this.pipes.splice(this.pipes.indexOf(r),1),r.unpipe())}addListener(e,r){return this.on(e,r)}on(e,r){let o=super.on(e,r);return e==="data"&&!this.pipes.length&&!this.flowing?this[ME]():e==="readable"&&this[Fs]!==0?super.emit("readable"):Qat(e)&&this[gh]?(super.emit(e),this.removeAllListeners(e)):e==="error"&&this[U1]&&(this[Hf]?H1(()=>r.call(this,this[U1])):r.call(this,this[U1])),o}get emittedEnd(){return this[gh]}[Uf](){!this[zb]&&!this[gh]&&!this[Ro]&&this.buffer.length===0&&this[Mf]&&(this[zb]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Vb]&&this.emit("close"),this[zb]=!1)}emit(e,r,...o){if(e!=="error"&&e!=="close"&&e!==Ro&&this[Ro])return;if(e==="data")return r?this[Hf]?H1(()=>this[PU](r)):this[PU](r):!1;if(e==="end")return this[fue]();if(e==="close"){if(this[Vb]=!0,!this[gh]&&!this[Ro])return;let n=super.emit("close");return this.removeAllListeners("close"),n}else if(e==="error"){this[U1]=r;let n=super.emit("error",r);return this[Uf](),n}else if(e==="resume"){let n=super.emit("resume");return this[Uf](),n}else if(e==="finish"||e==="prefinish"){let n=super.emit(e);return this.removeAllListeners(e),n}let a=super.emit(e,r,...o);return this[Uf](),a}[PU](e){for(let o of this.pipes)o.dest.write(e)===!1&&this.pause();let r=super.emit("data",e);return this[Uf](),r}[fue](){this[gh]||(this[gh]=!0,this.readable=!1,this[Hf]?H1(()=>this[SU]()):this[SU]())}[SU](){if(this[_f]){let r=this[_f].end();if(r){for(let o of this.pipes)o.dest.write(r);super.emit("data",r)}}for(let r of this.pipes)r.end();let e=super.emit("end");return this.removeAllListeners("end"),e}collect(){let e=[];this[Fo]||(e.dataLength=0);let r=this.promise();return this.on("data",o=>{e.push(o),this[Fo]||(e.dataLength+=o.length)}),r.then(()=>e)}concat(){return this[Fo]?Promise.reject(new Error("cannot concat in objectMode")):this.collect().then(e=>this[Fo]?Promise.reject(new Error("cannot concat in objectMode")):this[ka]?e.join(""):Buffer.concat(e,e.dataLength))}promise(){return new Promise((e,r)=>{this.on(Ro,()=>r(new Error("stream destroyed"))),this.on("error",o=>r(o)),this.on("end",()=>e())})}[xat](){return{next:()=>{let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[Mf])return Promise.resolve({done:!0});let o=null,a=null,n=h=>{this.removeListener("data",u),this.removeListener("end",A),a(h)},u=h=>{this.removeListener("error",n),this.removeListener("end",A),this.pause(),o({value:h,done:!!this[Mf]})},A=()=>{this.removeListener("error",n),this.removeListener("data",u),o({done:!0})},p=()=>n(new Error("stream destroyed"));return new Promise((h,E)=>{a=E,o=h,this.once(Ro,p),this.once("error",n),this.once("end",A),this.once("data",u)})}}}[kat](){return{next:()=>{let r=this.read();return{value:r,done:r===null}}}}destroy(e){return this[Ro]?(e?this.emit("error",e):this.emit(Ro),this):(this[Ro]=!0,this.buffer.length=0,this[Fs]=0,typeof this.close=="function"&&!this[Vb]&&this.close(),e?this.emit("error",e):this.emit(Ro),this)}static isStream(e){return!!e&&(e instanceof hue||e instanceof lue||e instanceof bat&&(typeof e.pipe=="function"||typeof e.write=="function"&&typeof e.end=="function"))}}});var mue=_((U4t,due)=>{var Tat=ve("zlib").constants||{ZLIB_VERNUM:4736};due.exports=Object.freeze(Object.assign(Object.create(null),{Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_VERSION_ERROR:-6,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,DEFLATE:1,INFLATE:2,GZIP:3,GUNZIP:4,DEFLATERAW:5,INFLATERAW:6,UNZIP:7,BROTLI_DECODE:8,BROTLI_ENCODE:9,Z_MIN_WINDOWBITS:8,Z_MAX_WINDOWBITS:15,Z_DEFAULT_WINDOWBITS:15,Z_MIN_CHUNK:64,Z_MAX_CHUNK:1/0,Z_DEFAULT_CHUNK:16384,Z_MIN_MEMLEVEL:1,Z_MAX_MEMLEVEL:9,Z_DEFAULT_MEMLEVEL:8,Z_MIN_LEVEL:-1,Z_MAX_LEVEL:9,Z_DEFAULT_LEVEL:-1,BROTLI_OPERATION_PROCESS:0,BROTLI_OPERATION_FLUSH:1,BROTLI_OPERATION_FINISH:2,BROTLI_OPERATION_EMIT_METADATA:3,BROTLI_MODE_GENERIC:0,BROTLI_MODE_TEXT:1,BROTLI_MODE_FONT:2,BROTLI_DEFAULT_MODE:0,BROTLI_MIN_QUALITY:0,BROTLI_MAX_QUALITY:11,BROTLI_DEFAULT_QUALITY:11,BROTLI_MIN_WINDOW_BITS:10,BROTLI_MAX_WINDOW_BITS:24,BROTLI_LARGE_MAX_WINDOW_BITS:30,BROTLI_DEFAULT_WINDOW:22,BROTLI_MIN_INPUT_BLOCK_BITS:16,BROTLI_MAX_INPUT_BLOCK_BITS:24,BROTLI_PARAM_MODE:0,BROTLI_PARAM_QUALITY:1,BROTLI_PARAM_LGWIN:2,BROTLI_PARAM_LGBLOCK:3,BROTLI_PARAM_DISABLE_LITERAL_CONTEXT_MODELING:4,BROTLI_PARAM_SIZE_HINT:5,BROTLI_PARAM_LARGE_WINDOW:6,BROTLI_PARAM_NPOSTFIX:7,BROTLI_PARAM_NDIRECT:8,BROTLI_DECODER_RESULT_ERROR:0,BROTLI_DECODER_RESULT_SUCCESS:1,BROTLI_DECODER_RESULT_NEEDS_MORE_INPUT:2,BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_PARAM_DISABLE_RING_BUFFER_REALLOCATION:0,BROTLI_DECODER_PARAM_LARGE_WINDOW:1,BROTLI_DECODER_NO_ERROR:0,BROTLI_DECODER_SUCCESS:1,BROTLI_DECODER_NEEDS_MORE_INPUT:2,BROTLI_DECODER_NEEDS_MORE_OUTPUT:3,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_NIBBLE:-1,BROTLI_DECODER_ERROR_FORMAT_RESERVED:-2,BROTLI_DECODER_ERROR_FORMAT_EXUBERANT_META_NIBBLE:-3,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_ALPHABET:-4,BROTLI_DECODER_ERROR_FORMAT_SIMPLE_HUFFMAN_SAME:-5,BROTLI_DECODER_ERROR_FORMAT_CL_SPACE:-6,BROTLI_DECODER_ERROR_FORMAT_HUFFMAN_SPACE:-7,BROTLI_DECODER_ERROR_FORMAT_CONTEXT_MAP_REPEAT:-8,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_1:-9,BROTLI_DECODER_ERROR_FORMAT_BLOCK_LENGTH_2:-10,BROTLI_DECODER_ERROR_FORMAT_TRANSFORM:-11,BROTLI_DECODER_ERROR_FORMAT_DICTIONARY:-12,BROTLI_DECODER_ERROR_FORMAT_WINDOW_BITS:-13,BROTLI_DECODER_ERROR_FORMAT_PADDING_1:-14,BROTLI_DECODER_ERROR_FORMAT_PADDING_2:-15,BROTLI_DECODER_ERROR_FORMAT_DISTANCE:-16,BROTLI_DECODER_ERROR_DICTIONARY_NOT_SET:-19,BROTLI_DECODER_ERROR_INVALID_ARGUMENTS:-20,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MODES:-21,BROTLI_DECODER_ERROR_ALLOC_TREE_GROUPS:-22,BROTLI_DECODER_ERROR_ALLOC_CONTEXT_MAP:-25,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_1:-26,BROTLI_DECODER_ERROR_ALLOC_RING_BUFFER_2:-27,BROTLI_DECODER_ERROR_ALLOC_BLOCK_TYPE_TREES:-30,BROTLI_DECODER_ERROR_UNREACHABLE:-31},Tat))});var jU=_(ul=>{"use strict";var RU=ve("assert"),dh=ve("buffer").Buffer,Cue=ve("zlib"),Rd=ul.constants=mue(),Lat=UE(),yue=dh.concat,Td=Symbol("_superWrite"),HE=class extends Error{constructor(e){super("zlib: "+e.message),this.code=e.code,this.errno=e.errno,this.code||(this.code="ZLIB_ERROR"),this.message="zlib: "+e.message,Error.captureStackTrace(this,this.constructor)}get name(){return"ZlibError"}},Nat=Symbol("opts"),q1=Symbol("flushFlag"),Eue=Symbol("finishFlushFlag"),GU=Symbol("fullFlushFlag"),ti=Symbol("handle"),$b=Symbol("onError"),_E=Symbol("sawError"),xU=Symbol("level"),kU=Symbol("strategy"),QU=Symbol("ended"),_4t=Symbol("_defaultFullFlush"),ex=class extends Lat{constructor(e,r){if(!e||typeof e!="object")throw new TypeError("invalid options for ZlibBase constructor");super(e),this[_E]=!1,this[QU]=!1,this[Nat]=e,this[q1]=e.flush,this[Eue]=e.finishFlush;try{this[ti]=new Cue[r](e)}catch(o){throw new HE(o)}this[$b]=o=>{this[_E]||(this[_E]=!0,this.close(),this.emit("error",o))},this[ti].on("error",o=>this[$b](new HE(o))),this.once("end",()=>this.close)}close(){this[ti]&&(this[ti].close(),this[ti]=null,this.emit("close"))}reset(){if(!this[_E])return RU(this[ti],"zlib binding closed"),this[ti].reset()}flush(e){this.ended||(typeof e!="number"&&(e=this[GU]),this.write(Object.assign(dh.alloc(0),{[q1]:e})))}end(e,r,o){return e&&this.write(e,r),this.flush(this[Eue]),this[QU]=!0,super.end(null,null,o)}get ended(){return this[QU]}write(e,r,o){if(typeof r=="function"&&(o=r,r="utf8"),typeof e=="string"&&(e=dh.from(e,r)),this[_E])return;RU(this[ti],"zlib binding closed");let a=this[ti]._handle,n=a.close;a.close=()=>{};let u=this[ti].close;this[ti].close=()=>{},dh.concat=h=>h;let A;try{let h=typeof e[q1]=="number"?e[q1]:this[q1];A=this[ti]._processChunk(e,h),dh.concat=yue}catch(h){dh.concat=yue,this[$b](new HE(h))}finally{this[ti]&&(this[ti]._handle=a,a.close=n,this[ti].close=u,this[ti].removeAllListeners("error"))}this[ti]&&this[ti].on("error",h=>this[$b](new HE(h)));let p;if(A)if(Array.isArray(A)&&A.length>0){p=this[Td](dh.from(A[0]));for(let h=1;h{this.flush(a),n()};try{this[ti].params(e,r)}finally{this[ti].flush=o}this[ti]&&(this[xU]=e,this[kU]=r)}}}},TU=class extends qf{constructor(e){super(e,"Deflate")}},LU=class extends qf{constructor(e){super(e,"Inflate")}},FU=Symbol("_portable"),NU=class extends qf{constructor(e){super(e,"Gzip"),this[FU]=e&&!!e.portable}[Td](e){return this[FU]?(this[FU]=!1,e[9]=255,super[Td](e)):super[Td](e)}},OU=class extends qf{constructor(e){super(e,"Gunzip")}},MU=class extends qf{constructor(e){super(e,"DeflateRaw")}},UU=class extends qf{constructor(e){super(e,"InflateRaw")}},_U=class extends qf{constructor(e){super(e,"Unzip")}},tx=class extends ex{constructor(e,r){e=e||{},e.flush=e.flush||Rd.BROTLI_OPERATION_PROCESS,e.finishFlush=e.finishFlush||Rd.BROTLI_OPERATION_FINISH,super(e,r),this[GU]=Rd.BROTLI_OPERATION_FLUSH}},HU=class extends tx{constructor(e){super(e,"BrotliCompress")}},qU=class extends tx{constructor(e){super(e,"BrotliDecompress")}};ul.Deflate=TU;ul.Inflate=LU;ul.Gzip=NU;ul.Gunzip=OU;ul.DeflateRaw=MU;ul.InflateRaw=UU;ul.Unzip=_U;typeof Cue.BrotliCompress=="function"?(ul.BrotliCompress=HU,ul.BrotliDecompress=qU):ul.BrotliCompress=ul.BrotliDecompress=class{constructor(){throw new Error("Brotli is not supported in this version of Node.js")}}});var qE=_((G4t,wue)=>{var Oat=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform;wue.exports=Oat!=="win32"?t=>t:t=>t&&t.replace(/\\/g,"/")});var rx=_((Y4t,Iue)=>{"use strict";var Mat=UE(),YU=qE(),WU=Symbol("slurp");Iue.exports=class extends Mat{constructor(e,r,o){switch(super(),this.pause(),this.extended=r,this.globalExtended=o,this.header=e,this.startBlockSize=512*Math.ceil(e.size/512),this.blockRemain=this.startBlockSize,this.remain=e.size,this.type=e.type,this.meta=!1,this.ignore=!1,this.type){case"File":case"OldFile":case"Link":case"SymbolicLink":case"CharacterDevice":case"BlockDevice":case"Directory":case"FIFO":case"ContiguousFile":case"GNUDumpDir":break;case"NextFileHasLongLinkpath":case"NextFileHasLongPath":case"OldGnuLongPath":case"GlobalExtendedHeader":case"ExtendedHeader":case"OldExtendedHeader":this.meta=!0;break;default:this.ignore=!0}this.path=YU(e.path),this.mode=e.mode,this.mode&&(this.mode=this.mode&4095),this.uid=e.uid,this.gid=e.gid,this.uname=e.uname,this.gname=e.gname,this.size=e.size,this.mtime=e.mtime,this.atime=e.atime,this.ctime=e.ctime,this.linkpath=YU(e.linkpath),this.uname=e.uname,this.gname=e.gname,r&&this[WU](r),o&&this[WU](o,!0)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");let o=this.remain,a=this.blockRemain;return this.remain=Math.max(0,o-r),this.blockRemain=Math.max(0,a-r),this.ignore?!0:o>=r?super.write(e):super.write(e.slice(0,o))}[WU](e,r){for(let o in e)e[o]!==null&&e[o]!==void 0&&!(r&&o==="path")&&(this[o]=o==="path"||o==="linkpath"?YU(e[o]):e[o])}}});var KU=_(nx=>{"use strict";nx.name=new Map([["0","File"],["","OldFile"],["1","Link"],["2","SymbolicLink"],["3","CharacterDevice"],["4","BlockDevice"],["5","Directory"],["6","FIFO"],["7","ContiguousFile"],["g","GlobalExtendedHeader"],["x","ExtendedHeader"],["A","SolarisACL"],["D","GNUDumpDir"],["I","Inode"],["K","NextFileHasLongLinkpath"],["L","NextFileHasLongPath"],["M","ContinuationFile"],["N","OldGnuLongPath"],["S","SparseFile"],["V","TapeVolumeHeader"],["X","OldExtendedHeader"]]);nx.code=new Map(Array.from(nx.name).map(t=>[t[1],t[0]]))});var Pue=_((K4t,Due)=>{"use strict";var Uat=(t,e)=>{if(Number.isSafeInteger(t))t<0?Hat(t,e):_at(t,e);else throw Error("cannot encode number outside of javascript safe integer range");return e},_at=(t,e)=>{e[0]=128;for(var r=e.length;r>1;r--)e[r-1]=t&255,t=Math.floor(t/256)},Hat=(t,e)=>{e[0]=255;var r=!1;t=t*-1;for(var o=e.length;o>1;o--){var a=t&255;t=Math.floor(t/256),r?e[o-1]=Bue(a):a===0?e[o-1]=0:(r=!0,e[o-1]=vue(a))}},qat=t=>{let e=t[0],r=e===128?jat(t.slice(1,t.length)):e===255?Gat(t):null;if(r===null)throw Error("invalid base256 encoding");if(!Number.isSafeInteger(r))throw Error("parsed number outside of javascript safe integer range");return r},Gat=t=>{for(var e=t.length,r=0,o=!1,a=e-1;a>-1;a--){var n=t[a],u;o?u=Bue(n):n===0?u=n:(o=!0,u=vue(n)),u!==0&&(r-=u*Math.pow(256,e-a-1))}return r},jat=t=>{for(var e=t.length,r=0,o=e-1;o>-1;o--){var a=t[o];a!==0&&(r+=a*Math.pow(256,e-o-1))}return r},Bue=t=>(255^t)&255,vue=t=>(255^t)+1&255;Due.exports={encode:Uat,parse:qat}});var jE=_((z4t,bue)=>{"use strict";var zU=KU(),GE=ve("path").posix,Sue=Pue(),VU=Symbol("slurp"),Al=Symbol("type"),ZU=class{constructor(e,r,o,a){this.cksumValid=!1,this.needPax=!1,this.nullBlock=!1,this.block=null,this.path=null,this.mode=null,this.uid=null,this.gid=null,this.size=null,this.mtime=null,this.cksum=null,this[Al]="0",this.linkpath=null,this.uname=null,this.gname=null,this.devmaj=0,this.devmin=0,this.atime=null,this.ctime=null,Buffer.isBuffer(e)?this.decode(e,r||0,o,a):e&&this.set(e)}decode(e,r,o,a){if(r||(r=0),!e||!(e.length>=r+512))throw new Error("need 512 bytes for header");if(this.path=Ld(e,r,100),this.mode=mh(e,r+100,8),this.uid=mh(e,r+108,8),this.gid=mh(e,r+116,8),this.size=mh(e,r+124,12),this.mtime=JU(e,r+136,12),this.cksum=mh(e,r+148,12),this[VU](o),this[VU](a,!0),this[Al]=Ld(e,r+156,1),this[Al]===""&&(this[Al]="0"),this[Al]==="0"&&this.path.substr(-1)==="/"&&(this[Al]="5"),this[Al]==="5"&&(this.size=0),this.linkpath=Ld(e,r+157,100),e.slice(r+257,r+265).toString()==="ustar\x0000")if(this.uname=Ld(e,r+265,32),this.gname=Ld(e,r+297,32),this.devmaj=mh(e,r+329,8),this.devmin=mh(e,r+337,8),e[r+475]!==0){let u=Ld(e,r+345,155);this.path=u+"/"+this.path}else{let u=Ld(e,r+345,130);u&&(this.path=u+"/"+this.path),this.atime=JU(e,r+476,12),this.ctime=JU(e,r+488,12)}let n=8*32;for(let u=r;u=r+512))throw new Error("need 512 bytes for header");let o=this.ctime||this.atime?130:155,a=Yat(this.path||"",o),n=a[0],u=a[1];this.needPax=a[2],this.needPax=Nd(e,r,100,n)||this.needPax,this.needPax=yh(e,r+100,8,this.mode)||this.needPax,this.needPax=yh(e,r+108,8,this.uid)||this.needPax,this.needPax=yh(e,r+116,8,this.gid)||this.needPax,this.needPax=yh(e,r+124,12,this.size)||this.needPax,this.needPax=XU(e,r+136,12,this.mtime)||this.needPax,e[r+156]=this[Al].charCodeAt(0),this.needPax=Nd(e,r+157,100,this.linkpath)||this.needPax,e.write("ustar\x0000",r+257,8),this.needPax=Nd(e,r+265,32,this.uname)||this.needPax,this.needPax=Nd(e,r+297,32,this.gname)||this.needPax,this.needPax=yh(e,r+329,8,this.devmaj)||this.needPax,this.needPax=yh(e,r+337,8,this.devmin)||this.needPax,this.needPax=Nd(e,r+345,o,u)||this.needPax,e[r+475]!==0?this.needPax=Nd(e,r+345,155,u)||this.needPax:(this.needPax=Nd(e,r+345,130,u)||this.needPax,this.needPax=XU(e,r+476,12,this.atime)||this.needPax,this.needPax=XU(e,r+488,12,this.ctime)||this.needPax);let A=8*32;for(let p=r;p{let o=t,a="",n,u=GE.parse(t).root||".";if(Buffer.byteLength(o)<100)n=[o,a,!1];else{a=GE.dirname(o),o=GE.basename(o);do Buffer.byteLength(o)<=100&&Buffer.byteLength(a)<=e?n=[o,a,!1]:Buffer.byteLength(o)>100&&Buffer.byteLength(a)<=e?n=[o.substr(0,100-1),a,!0]:(o=GE.join(GE.basename(a),o),a=GE.dirname(a));while(a!==u&&!n);n||(n=[t.substr(0,100-1),"",!0])}return n},Ld=(t,e,r)=>t.slice(e,e+r).toString("utf8").replace(/\0.*/,""),JU=(t,e,r)=>Wat(mh(t,e,r)),Wat=t=>t===null?null:new Date(t*1e3),mh=(t,e,r)=>t[e]&128?Sue.parse(t.slice(e,e+r)):zat(t,e,r),Kat=t=>isNaN(t)?null:t,zat=(t,e,r)=>Kat(parseInt(t.slice(e,e+r).toString("utf8").replace(/\0.*$/,"").trim(),8)),Vat={12:8589934591,8:2097151},yh=(t,e,r,o)=>o===null?!1:o>Vat[r]||o<0?(Sue.encode(o,t.slice(e,e+r)),!0):(Jat(t,e,r,o),!1),Jat=(t,e,r,o)=>t.write(Xat(o,r),e,r,"ascii"),Xat=(t,e)=>Zat(Math.floor(t).toString(8),e),Zat=(t,e)=>(t.length===e-1?t:new Array(e-t.length-1).join("0")+t+" ")+"\0",XU=(t,e,r,o)=>o===null?!1:yh(t,e,r,o.getTime()/1e3),$at=new Array(156).join("\0"),Nd=(t,e,r,o)=>o===null?!1:(t.write(o+$at,e,r,"utf8"),o.length!==Buffer.byteLength(o)||o.length>r);bue.exports=ZU});var ix=_((V4t,xue)=>{"use strict";var elt=jE(),tlt=ve("path"),G1=class{constructor(e,r){this.atime=e.atime||null,this.charset=e.charset||null,this.comment=e.comment||null,this.ctime=e.ctime||null,this.gid=e.gid||null,this.gname=e.gname||null,this.linkpath=e.linkpath||null,this.mtime=e.mtime||null,this.path=e.path||null,this.size=e.size||null,this.uid=e.uid||null,this.uname=e.uname||null,this.dev=e.dev||null,this.ino=e.ino||null,this.nlink=e.nlink||null,this.global=r||!1}encode(){let e=this.encodeBody();if(e==="")return null;let r=Buffer.byteLength(e),o=512*Math.ceil(1+r/512),a=Buffer.allocUnsafe(o);for(let n=0;n<512;n++)a[n]=0;new elt({path:("PaxHeader/"+tlt.basename(this.path)).slice(0,99),mode:this.mode||420,uid:this.uid||null,gid:this.gid||null,size:r,mtime:this.mtime||null,type:this.global?"GlobalExtendedHeader":"ExtendedHeader",linkpath:"",uname:this.uname||"",gname:this.gname||"",devmaj:0,devmin:0,atime:this.atime||null,ctime:this.ctime||null}).encode(a),a.write(e,512,r,"utf8");for(let n=r+512;n=Math.pow(10,n)&&(n+=1),n+a+o}};G1.parse=(t,e,r)=>new G1(rlt(nlt(t),e),r);var rlt=(t,e)=>e?Object.keys(t).reduce((r,o)=>(r[o]=t[o],r),e):t,nlt=t=>t.replace(/\n$/,"").split(` `).reduce(ilt,Object.create(null)),ilt=(t,e)=>{let r=parseInt(e,10);if(r!==Buffer.byteLength(e)+1)return t;e=e.substr((r+" ").length);let o=e.split("="),a=o.shift().replace(/^SCHILY\.(dev|ino|nlink)/,"$1");if(!a)return t;let n=o.join("=");return t[a]=/^([A-Z]+\.)?([mac]|birth|creation)time$/.test(a)?new Date(n*1e3):/^[0-9]+$/.test(n)?+n:n,t};xue.exports=G1});var YE=_((J4t,kue)=>{kue.exports=t=>{let e=t.length-1,r=-1;for(;e>-1&&t.charAt(e)==="/";)r=e,e--;return r===-1?t:t.slice(0,r)}});var sx=_((X4t,Que)=>{"use strict";Que.exports=t=>class extends t{warn(e,r,o={}){this.file&&(o.file=this.file),this.cwd&&(o.cwd=this.cwd),o.code=r instanceof Error&&r.code||e,o.tarCode=e,!this.strict&&o.recoverable!==!1?(r instanceof Error&&(o=Object.assign(r,o),r=r.message),this.emit("warn",o.tarCode,r,o)):r instanceof Error?this.emit("error",Object.assign(r,o)):this.emit("error",Object.assign(new Error(`${e}: ${r}`),o))}}});var e3=_(($4t,Fue)=>{"use strict";var ox=["|","<",">","?",":"],$U=ox.map(t=>String.fromCharCode(61440+t.charCodeAt(0))),slt=new Map(ox.map((t,e)=>[t,$U[e]])),olt=new Map($U.map((t,e)=>[t,ox[e]]));Fue.exports={encode:t=>ox.reduce((e,r)=>e.split(r).join(slt.get(r)),t),decode:t=>$U.reduce((e,r)=>e.split(r).join(olt.get(r)),t)}});var t3=_((eUt,Tue)=>{var{isAbsolute:alt,parse:Rue}=ve("path").win32;Tue.exports=t=>{let e="",r=Rue(t);for(;alt(t)||r.root;){let o=t.charAt(0)==="/"&&t.slice(0,4)!=="//?/"?"/":r.root;t=t.substr(o.length),e+=o,r=Rue(t)}return[e,t]}});var Nue=_((tUt,Lue)=>{"use strict";Lue.exports=(t,e,r)=>(t&=4095,r&&(t=(t|384)&-19),e&&(t&256&&(t|=64),t&32&&(t|=8),t&4&&(t|=1)),t)});var A3=_((iUt,Jue)=>{"use strict";var Gue=UE(),jue=ix(),Yue=jE(),aA=ve("fs"),Oue=ve("path"),oA=qE(),llt=YE(),Wue=(t,e)=>e?(t=oA(t).replace(/^\.(\/|$)/,""),llt(e)+"/"+t):oA(t),clt=16*1024*1024,Mue=Symbol("process"),Uue=Symbol("file"),_ue=Symbol("directory"),n3=Symbol("symlink"),Hue=Symbol("hardlink"),j1=Symbol("header"),ax=Symbol("read"),i3=Symbol("lstat"),lx=Symbol("onlstat"),s3=Symbol("onread"),o3=Symbol("onreadlink"),a3=Symbol("openfile"),l3=Symbol("onopenfile"),Eh=Symbol("close"),cx=Symbol("mode"),c3=Symbol("awaitDrain"),r3=Symbol("ondrain"),lA=Symbol("prefix"),que=Symbol("hadError"),Kue=sx(),ult=e3(),zue=t3(),Vue=Nue(),ux=Kue(class extends Gue{constructor(e,r){if(r=r||{},super(r),typeof e!="string")throw new TypeError("path is required");this.path=oA(e),this.portable=!!r.portable,this.myuid=process.getuid&&process.getuid()||0,this.myuser=process.env.USER||"",this.maxReadSize=r.maxReadSize||clt,this.linkCache=r.linkCache||new Map,this.statCache=r.statCache||new Map,this.preservePaths=!!r.preservePaths,this.cwd=oA(r.cwd||process.cwd()),this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.mtime=r.mtime||null,this.prefix=r.prefix?oA(r.prefix):null,this.fd=null,this.blockLen=null,this.blockRemain=null,this.buf=null,this.offset=null,this.length=null,this.pos=null,this.remain=null,typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=zue(this.path);a&&(this.path=n,o=a)}this.win32=!!r.win32||process.platform==="win32",this.win32&&(this.path=ult.decode(this.path.replace(/\\/g,"/")),e=e.replace(/\\/g,"/")),this.absolute=oA(r.absolute||Oue.resolve(this.cwd,e)),this.path===""&&(this.path="./"),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.statCache.has(this.absolute)?this[lx](this.statCache.get(this.absolute)):this[i3]()}emit(e,...r){return e==="error"&&(this[que]=!0),super.emit(e,...r)}[i3](){aA.lstat(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[lx](r)})}[lx](e){this.statCache.set(this.absolute,e),this.stat=e,e.isFile()||(e.size=0),this.type=flt(e),this.emit("stat",e),this[Mue]()}[Mue](){switch(this.type){case"File":return this[Uue]();case"Directory":return this[_ue]();case"SymbolicLink":return this[n3]();default:return this.end()}}[cx](e){return Vue(e,this.type==="Directory",this.portable)}[lA](e){return Wue(e,this.prefix)}[j1](){this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.header=new Yue({path:this[lA](this.path),linkpath:this.type==="Link"?this[lA](this.linkpath):this.linkpath,mode:this[cx](this.stat.mode),uid:this.portable?null:this.stat.uid,gid:this.portable?null:this.stat.gid,size:this.stat.size,mtime:this.noMtime?null:this.mtime||this.stat.mtime,type:this.type,uname:this.portable?null:this.stat.uid===this.myuid?this.myuser:"",atime:this.portable?null:this.stat.atime,ctime:this.portable?null:this.stat.ctime}),this.header.encode()&&!this.noPax&&super.write(new jue({atime:this.portable?null:this.header.atime,ctime:this.portable?null:this.header.ctime,gid:this.portable?null:this.header.gid,mtime:this.noMtime?null:this.mtime||this.header.mtime,path:this[lA](this.path),linkpath:this.type==="Link"?this[lA](this.linkpath):this.linkpath,size:this.header.size,uid:this.portable?null:this.header.uid,uname:this.portable?null:this.header.uname,dev:this.portable?null:this.stat.dev,ino:this.portable?null:this.stat.ino,nlink:this.portable?null:this.stat.nlink}).encode()),super.write(this.header.block)}[_ue](){this.path.substr(-1)!=="/"&&(this.path+="/"),this.stat.size=0,this[j1](),this.end()}[n3](){aA.readlink(this.absolute,(e,r)=>{if(e)return this.emit("error",e);this[o3](r)})}[o3](e){this.linkpath=oA(e),this[j1](),this.end()}[Hue](e){this.type="Link",this.linkpath=oA(Oue.relative(this.cwd,e)),this.stat.size=0,this[j1](),this.end()}[Uue](){if(this.stat.nlink>1){let e=this.stat.dev+":"+this.stat.ino;if(this.linkCache.has(e)){let r=this.linkCache.get(e);if(r.indexOf(this.cwd)===0)return this[Hue](r)}this.linkCache.set(e,this.absolute)}if(this[j1](),this.stat.size===0)return this.end();this[a3]()}[a3](){aA.open(this.absolute,"r",(e,r)=>{if(e)return this.emit("error",e);this[l3](r)})}[l3](e){if(this.fd=e,this[que])return this[Eh]();this.blockLen=512*Math.ceil(this.stat.size/512),this.blockRemain=this.blockLen;let r=Math.min(this.blockLen,this.maxReadSize);this.buf=Buffer.allocUnsafe(r),this.offset=0,this.pos=0,this.remain=this.stat.size,this.length=this.buf.length,this[ax]()}[ax](){let{fd:e,buf:r,offset:o,length:a,pos:n}=this;aA.read(e,r,o,a,n,(u,A)=>{if(u)return this[Eh](()=>this.emit("error",u));this[s3](A)})}[Eh](e){aA.close(this.fd,e)}[s3](e){if(e<=0&&this.remain>0){let a=new Error("encountered unexpected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[Eh](()=>this.emit("error",a))}if(e>this.remain){let a=new Error("did not encounter expected EOF");return a.path=this.absolute,a.syscall="read",a.code="EOF",this[Eh](()=>this.emit("error",a))}if(e===this.remain)for(let a=e;athis[r3]())}[c3](e){this.once("drain",e)}write(e){if(this.blockRemaine?this.emit("error",e):this.end());this.offset>=this.length&&(this.buf=Buffer.allocUnsafe(Math.min(this.blockRemain,this.buf.length)),this.offset=0),this.length=this.buf.length-this.offset,this[ax]()}}),u3=class extends ux{[i3](){this[lx](aA.lstatSync(this.absolute))}[n3](){this[o3](aA.readlinkSync(this.absolute))}[a3](){this[l3](aA.openSync(this.absolute,"r"))}[ax](){let e=!0;try{let{fd:r,buf:o,offset:a,length:n,pos:u}=this,A=aA.readSync(r,o,a,n,u);this[s3](A),e=!1}finally{if(e)try{this[Eh](()=>{})}catch{}}}[c3](e){e()}[Eh](e){aA.closeSync(this.fd),e()}},Alt=Kue(class extends Gue{constructor(e,r){r=r||{},super(r),this.preservePaths=!!r.preservePaths,this.portable=!!r.portable,this.strict=!!r.strict,this.noPax=!!r.noPax,this.noMtime=!!r.noMtime,this.readEntry=e,this.type=e.type,this.type==="Directory"&&this.portable&&(this.noMtime=!0),this.prefix=r.prefix||null,this.path=oA(e.path),this.mode=this[cx](e.mode),this.uid=this.portable?null:e.uid,this.gid=this.portable?null:e.gid,this.uname=this.portable?null:e.uname,this.gname=this.portable?null:e.gname,this.size=e.size,this.mtime=this.noMtime?null:r.mtime||e.mtime,this.atime=this.portable?null:e.atime,this.ctime=this.portable?null:e.ctime,this.linkpath=oA(e.linkpath),typeof r.onwarn=="function"&&this.on("warn",r.onwarn);let o=!1;if(!this.preservePaths){let[a,n]=zue(this.path);a&&(this.path=n,o=a)}this.remain=e.size,this.blockRemain=e.startBlockSize,this.header=new Yue({path:this[lA](this.path),linkpath:this.type==="Link"?this[lA](this.linkpath):this.linkpath,mode:this.mode,uid:this.portable?null:this.uid,gid:this.portable?null:this.gid,size:this.size,mtime:this.noMtime?null:this.mtime,type:this.type,uname:this.portable?null:this.uname,atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime}),o&&this.warn("TAR_ENTRY_INFO",`stripping ${o} from absolute path`,{entry:this,path:o+this.path}),this.header.encode()&&!this.noPax&&super.write(new jue({atime:this.portable?null:this.atime,ctime:this.portable?null:this.ctime,gid:this.portable?null:this.gid,mtime:this.noMtime?null:this.mtime,path:this[lA](this.path),linkpath:this.type==="Link"?this[lA](this.linkpath):this.linkpath,size:this.size,uid:this.portable?null:this.uid,uname:this.portable?null:this.uname,dev:this.portable?null:this.readEntry.dev,ino:this.portable?null:this.readEntry.ino,nlink:this.portable?null:this.readEntry.nlink}).encode()),super.write(this.header.block),e.pipe(this)}[lA](e){return Wue(e,this.prefix)}[cx](e){return Vue(e,this.type==="Directory",this.portable)}write(e){let r=e.length;if(r>this.blockRemain)throw new Error("writing more to entry than is appropriate");return this.blockRemain-=r,super.write(e)}end(){return this.blockRemain&&super.write(Buffer.alloc(this.blockRemain)),super.end()}});ux.Sync=u3;ux.Tar=Alt;var flt=t=>t.isFile()?"File":t.isDirectory()?"Directory":t.isSymbolicLink()?"SymbolicLink":"Unsupported";Jue.exports=ux});var Ex=_((oUt,nAe)=>{"use strict";var mx=class{constructor(e,r){this.path=e||"./",this.absolute=r,this.entry=null,this.stat=null,this.readdir=null,this.pending=!1,this.ignore=!1,this.piped=!1}},plt=UE(),hlt=jU(),glt=rx(),C3=A3(),dlt=C3.Sync,mlt=C3.Tar,ylt=IP(),Xue=Buffer.alloc(1024),px=Symbol("onStat"),Ax=Symbol("ended"),cA=Symbol("queue"),WE=Symbol("current"),Od=Symbol("process"),fx=Symbol("processing"),Zue=Symbol("processJob"),uA=Symbol("jobs"),f3=Symbol("jobDone"),hx=Symbol("addFSEntry"),$ue=Symbol("addTarEntry"),d3=Symbol("stat"),m3=Symbol("readdir"),gx=Symbol("onreaddir"),dx=Symbol("pipe"),eAe=Symbol("entry"),p3=Symbol("entryOpt"),y3=Symbol("writeEntryClass"),rAe=Symbol("write"),h3=Symbol("ondrain"),yx=ve("fs"),tAe=ve("path"),Elt=sx(),g3=qE(),w3=Elt(class extends plt{constructor(e){super(e),e=e||Object.create(null),this.opt=e,this.file=e.file||"",this.cwd=e.cwd||process.cwd(),this.maxReadSize=e.maxReadSize,this.preservePaths=!!e.preservePaths,this.strict=!!e.strict,this.noPax=!!e.noPax,this.prefix=g3(e.prefix||""),this.linkCache=e.linkCache||new Map,this.statCache=e.statCache||new Map,this.readdirCache=e.readdirCache||new Map,this[y3]=C3,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),this.portable=!!e.portable,this.zip=null,e.gzip?(typeof e.gzip!="object"&&(e.gzip={}),this.portable&&(e.gzip.portable=!0),this.zip=new hlt.Gzip(e.gzip),this.zip.on("data",r=>super.write(r)),this.zip.on("end",r=>super.end()),this.zip.on("drain",r=>this[h3]()),this.on("resume",r=>this.zip.resume())):this.on("drain",this[h3]),this.noDirRecurse=!!e.noDirRecurse,this.follow=!!e.follow,this.noMtime=!!e.noMtime,this.mtime=e.mtime||null,this.filter=typeof e.filter=="function"?e.filter:r=>!0,this[cA]=new ylt,this[uA]=0,this.jobs=+e.jobs||4,this[fx]=!1,this[Ax]=!1}[rAe](e){return super.write(e)}add(e){return this.write(e),this}end(e){return e&&this.write(e),this[Ax]=!0,this[Od](),this}write(e){if(this[Ax])throw new Error("write after end");return e instanceof glt?this[$ue](e):this[hx](e),this.flowing}[$ue](e){let r=g3(tAe.resolve(this.cwd,e.path));if(!this.filter(e.path,e))e.resume();else{let o=new mx(e.path,r,!1);o.entry=new mlt(e,this[p3](o)),o.entry.on("end",a=>this[f3](o)),this[uA]+=1,this[cA].push(o)}this[Od]()}[hx](e){let r=g3(tAe.resolve(this.cwd,e));this[cA].push(new mx(e,r)),this[Od]()}[d3](e){e.pending=!0,this[uA]+=1;let r=this.follow?"stat":"lstat";yx[r](e.absolute,(o,a)=>{e.pending=!1,this[uA]-=1,o?this.emit("error",o):this[px](e,a)})}[px](e,r){this.statCache.set(e.absolute,r),e.stat=r,this.filter(e.path,r)||(e.ignore=!0),this[Od]()}[m3](e){e.pending=!0,this[uA]+=1,yx.readdir(e.absolute,(r,o)=>{if(e.pending=!1,this[uA]-=1,r)return this.emit("error",r);this[gx](e,o)})}[gx](e,r){this.readdirCache.set(e.absolute,r),e.readdir=r,this[Od]()}[Od](){if(!this[fx]){this[fx]=!0;for(let e=this[cA].head;e!==null&&this[uA]this.warn(r,o,a),noPax:this.noPax,cwd:this.cwd,absolute:e.absolute,preservePaths:this.preservePaths,maxReadSize:this.maxReadSize,strict:this.strict,portable:this.portable,linkCache:this.linkCache,statCache:this.statCache,noMtime:this.noMtime,mtime:this.mtime,prefix:this.prefix}}[eAe](e){this[uA]+=1;try{return new this[y3](e.path,this[p3](e)).on("end",()=>this[f3](e)).on("error",r=>this.emit("error",r))}catch(r){this.emit("error",r)}}[h3](){this[WE]&&this[WE].entry&&this[WE].entry.resume()}[dx](e){e.piped=!0,e.readdir&&e.readdir.forEach(a=>{let n=e.path,u=n==="./"?"":n.replace(/\/*$/,"/");this[hx](u+a)});let r=e.entry,o=this.zip;o?r.on("data",a=>{o.write(a)||r.pause()}):r.on("data",a=>{super.write(a)||r.pause()})}pause(){return this.zip&&this.zip.pause(),super.pause()}}),E3=class extends w3{constructor(e){super(e),this[y3]=dlt}pause(){}resume(){}[d3](e){let r=this.follow?"statSync":"lstatSync";this[px](e,yx[r](e.absolute))}[m3](e,r){this[gx](e,yx.readdirSync(e.absolute))}[dx](e){let r=e.entry,o=this.zip;e.readdir&&e.readdir.forEach(a=>{let n=e.path,u=n==="./"?"":n.replace(/\/*$/,"/");this[hx](u+a)}),o?r.on("data",a=>{o.write(a)}):r.on("data",a=>{super[rAe](a)})}};w3.Sync=E3;nAe.exports=w3});var eC=_(W1=>{"use strict";var Clt=UE(),wlt=ve("events").EventEmitter,Qa=ve("fs"),v3=Qa.writev;if(!v3){let t=process.binding("fs"),e=t.FSReqWrap||t.FSReqCallback;v3=(r,o,a,n)=>{let u=(p,h)=>n(p,h,o),A=new e;A.oncomplete=u,t.writeBuffers(r,o,a,A)}}var ZE=Symbol("_autoClose"),Wc=Symbol("_close"),Y1=Symbol("_ended"),jn=Symbol("_fd"),iAe=Symbol("_finished"),wh=Symbol("_flags"),I3=Symbol("_flush"),D3=Symbol("_handleChunk"),P3=Symbol("_makeBuf"),vx=Symbol("_mode"),Cx=Symbol("_needDrain"),JE=Symbol("_onerror"),$E=Symbol("_onopen"),B3=Symbol("_onread"),zE=Symbol("_onwrite"),Ih=Symbol("_open"),Gf=Symbol("_path"),Md=Symbol("_pos"),AA=Symbol("_queue"),VE=Symbol("_read"),sAe=Symbol("_readSize"),Ch=Symbol("_reading"),wx=Symbol("_remain"),oAe=Symbol("_size"),Ix=Symbol("_write"),KE=Symbol("_writing"),Bx=Symbol("_defaultFlag"),XE=Symbol("_errored"),Dx=class extends Clt{constructor(e,r){if(r=r||{},super(r),this.readable=!0,this.writable=!1,typeof e!="string")throw new TypeError("path must be a string");this[XE]=!1,this[jn]=typeof r.fd=="number"?r.fd:null,this[Gf]=e,this[sAe]=r.readSize||16*1024*1024,this[Ch]=!1,this[oAe]=typeof r.size=="number"?r.size:1/0,this[wx]=this[oAe],this[ZE]=typeof r.autoClose=="boolean"?r.autoClose:!0,typeof this[jn]=="number"?this[VE]():this[Ih]()}get fd(){return this[jn]}get path(){return this[Gf]}write(){throw new TypeError("this is a readable stream")}end(){throw new TypeError("this is a readable stream")}[Ih](){Qa.open(this[Gf],"r",(e,r)=>this[$E](e,r))}[$E](e,r){e?this[JE](e):(this[jn]=r,this.emit("open",r),this[VE]())}[P3](){return Buffer.allocUnsafe(Math.min(this[sAe],this[wx]))}[VE](){if(!this[Ch]){this[Ch]=!0;let e=this[P3]();if(e.length===0)return process.nextTick(()=>this[B3](null,0,e));Qa.read(this[jn],e,0,e.length,null,(r,o,a)=>this[B3](r,o,a))}}[B3](e,r,o){this[Ch]=!1,e?this[JE](e):this[D3](r,o)&&this[VE]()}[Wc](){if(this[ZE]&&typeof this[jn]=="number"){let e=this[jn];this[jn]=null,Qa.close(e,r=>r?this.emit("error",r):this.emit("close"))}}[JE](e){this[Ch]=!0,this[Wc](),this.emit("error",e)}[D3](e,r){let o=!1;return this[wx]-=e,e>0&&(o=super.write(ethis[$E](e,r))}[$E](e,r){this[Bx]&&this[wh]==="r+"&&e&&e.code==="ENOENT"?(this[wh]="w",this[Ih]()):e?this[JE](e):(this[jn]=r,this.emit("open",r),this[I3]())}end(e,r){return e&&this.write(e,r),this[Y1]=!0,!this[KE]&&!this[AA].length&&typeof this[jn]=="number"&&this[zE](null,0),this}write(e,r){return typeof e=="string"&&(e=Buffer.from(e,r)),this[Y1]?(this.emit("error",new Error("write() after end()")),!1):this[jn]===null||this[KE]||this[AA].length?(this[AA].push(e),this[Cx]=!0,!1):(this[KE]=!0,this[Ix](e),!0)}[Ix](e){Qa.write(this[jn],e,0,e.length,this[Md],(r,o)=>this[zE](r,o))}[zE](e,r){e?this[JE](e):(this[Md]!==null&&(this[Md]+=r),this[AA].length?this[I3]():(this[KE]=!1,this[Y1]&&!this[iAe]?(this[iAe]=!0,this[Wc](),this.emit("finish")):this[Cx]&&(this[Cx]=!1,this.emit("drain"))))}[I3](){if(this[AA].length===0)this[Y1]&&this[zE](null,0);else if(this[AA].length===1)this[Ix](this[AA].pop());else{let e=this[AA];this[AA]=[],v3(this[jn],e,this[Md],(r,o)=>this[zE](r,o))}}[Wc](){if(this[ZE]&&typeof this[jn]=="number"){let e=this[jn];this[jn]=null,Qa.close(e,r=>r?this.emit("error",r):this.emit("close"))}}},b3=class extends Px{[Ih](){let e;if(this[Bx]&&this[wh]==="r+")try{e=Qa.openSync(this[Gf],this[wh],this[vx])}catch(r){if(r.code==="ENOENT")return this[wh]="w",this[Ih]();throw r}else e=Qa.openSync(this[Gf],this[wh],this[vx]);this[$E](null,e)}[Wc](){if(this[ZE]&&typeof this[jn]=="number"){let e=this[jn];this[jn]=null,Qa.closeSync(e),this.emit("close")}}[Ix](e){let r=!0;try{this[zE](null,Qa.writeSync(this[jn],e,0,e.length,this[Md])),r=!1}finally{if(r)try{this[Wc]()}catch{}}}};W1.ReadStream=Dx;W1.ReadStreamSync=S3;W1.WriteStream=Px;W1.WriteStreamSync=b3});var Rx=_((cUt,pAe)=>{"use strict";var Ilt=sx(),Blt=jE(),vlt=ve("events"),Dlt=IP(),Plt=1024*1024,Slt=rx(),aAe=ix(),blt=jU(),x3=Buffer.from([31,139]),Zl=Symbol("state"),Ud=Symbol("writeEntry"),jf=Symbol("readEntry"),k3=Symbol("nextEntry"),lAe=Symbol("processEntry"),$l=Symbol("extendedHeader"),K1=Symbol("globalExtendedHeader"),Bh=Symbol("meta"),cAe=Symbol("emitMeta"),fi=Symbol("buffer"),Yf=Symbol("queue"),_d=Symbol("ended"),uAe=Symbol("emittedEnd"),Hd=Symbol("emit"),Fa=Symbol("unzip"),Sx=Symbol("consumeChunk"),bx=Symbol("consumeChunkSub"),Q3=Symbol("consumeBody"),AAe=Symbol("consumeMeta"),fAe=Symbol("consumeHeader"),xx=Symbol("consuming"),F3=Symbol("bufferConcat"),R3=Symbol("maybeEnd"),z1=Symbol("writing"),vh=Symbol("aborted"),kx=Symbol("onDone"),qd=Symbol("sawValidEntry"),Qx=Symbol("sawNullBlock"),Fx=Symbol("sawEOF"),xlt=t=>!0;pAe.exports=Ilt(class extends vlt{constructor(e){e=e||{},super(e),this.file=e.file||"",this[qd]=null,this.on(kx,r=>{(this[Zl]==="begin"||this[qd]===!1)&&this.warn("TAR_BAD_ARCHIVE","Unrecognized archive format")}),e.ondone?this.on(kx,e.ondone):this.on(kx,r=>{this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close")}),this.strict=!!e.strict,this.maxMetaEntrySize=e.maxMetaEntrySize||Plt,this.filter=typeof e.filter=="function"?e.filter:xlt,this.writable=!0,this.readable=!1,this[Yf]=new Dlt,this[fi]=null,this[jf]=null,this[Ud]=null,this[Zl]="begin",this[Bh]="",this[$l]=null,this[K1]=null,this[_d]=!1,this[Fa]=null,this[vh]=!1,this[Qx]=!1,this[Fx]=!1,typeof e.onwarn=="function"&&this.on("warn",e.onwarn),typeof e.onentry=="function"&&this.on("entry",e.onentry)}[fAe](e,r){this[qd]===null&&(this[qd]=!1);let o;try{o=new Blt(e,r,this[$l],this[K1])}catch(a){return this.warn("TAR_ENTRY_INVALID",a)}if(o.nullBlock)this[Qx]?(this[Fx]=!0,this[Zl]==="begin"&&(this[Zl]="header"),this[Hd]("eof")):(this[Qx]=!0,this[Hd]("nullBlock"));else if(this[Qx]=!1,!o.cksumValid)this.warn("TAR_ENTRY_INVALID","checksum failure",{header:o});else if(!o.path)this.warn("TAR_ENTRY_INVALID","path is required",{header:o});else{let a=o.type;if(/^(Symbolic)?Link$/.test(a)&&!o.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath required",{header:o});else if(!/^(Symbolic)?Link$/.test(a)&&o.linkpath)this.warn("TAR_ENTRY_INVALID","linkpath forbidden",{header:o});else{let n=this[Ud]=new Slt(o,this[$l],this[K1]);if(!this[qd])if(n.remain){let u=()=>{n.invalid||(this[qd]=!0)};n.on("end",u)}else this[qd]=!0;n.meta?n.size>this.maxMetaEntrySize?(n.ignore=!0,this[Hd]("ignoredEntry",n),this[Zl]="ignore",n.resume()):n.size>0&&(this[Bh]="",n.on("data",u=>this[Bh]+=u),this[Zl]="meta"):(this[$l]=null,n.ignore=n.ignore||!this.filter(n.path,n),n.ignore?(this[Hd]("ignoredEntry",n),this[Zl]=n.remain?"ignore":"header",n.resume()):(n.remain?this[Zl]="body":(this[Zl]="header",n.end()),this[jf]?this[Yf].push(n):(this[Yf].push(n),this[k3]())))}}}[lAe](e){let r=!0;return e?Array.isArray(e)?this.emit.apply(this,e):(this[jf]=e,this.emit("entry",e),e.emittedEnd||(e.on("end",o=>this[k3]()),r=!1)):(this[jf]=null,r=!1),r}[k3](){do;while(this[lAe](this[Yf].shift()));if(!this[Yf].length){let e=this[jf];!e||e.flowing||e.size===e.remain?this[z1]||this.emit("drain"):e.once("drain",o=>this.emit("drain"))}}[Q3](e,r){let o=this[Ud],a=o.blockRemain,n=a>=e.length&&r===0?e:e.slice(r,r+a);return o.write(n),o.blockRemain||(this[Zl]="header",this[Ud]=null,o.end()),n.length}[AAe](e,r){let o=this[Ud],a=this[Q3](e,r);return this[Ud]||this[cAe](o),a}[Hd](e,r,o){!this[Yf].length&&!this[jf]?this.emit(e,r,o):this[Yf].push([e,r,o])}[cAe](e){switch(this[Hd]("meta",this[Bh]),e.type){case"ExtendedHeader":case"OldExtendedHeader":this[$l]=aAe.parse(this[Bh],this[$l],!1);break;case"GlobalExtendedHeader":this[K1]=aAe.parse(this[Bh],this[K1],!0);break;case"NextFileHasLongPath":case"OldGnuLongPath":this[$l]=this[$l]||Object.create(null),this[$l].path=this[Bh].replace(/\0.*/,"");break;case"NextFileHasLongLinkpath":this[$l]=this[$l]||Object.create(null),this[$l].linkpath=this[Bh].replace(/\0.*/,"");break;default:throw new Error("unknown meta: "+e.type)}}abort(e){this[vh]=!0,this.emit("abort",e),this.warn("TAR_ABORT",e,{recoverable:!1})}write(e){if(this[vh])return;if(this[Fa]===null&&e){if(this[fi]&&(e=Buffer.concat([this[fi],e]),this[fi]=null),e.lengththis[Sx](n)),this[Fa].on("error",n=>this.abort(n)),this[Fa].on("end",n=>{this[_d]=!0,this[Sx]()}),this[z1]=!0;let a=this[Fa][o?"end":"write"](e);return this[z1]=!1,a}}this[z1]=!0,this[Fa]?this[Fa].write(e):this[Sx](e),this[z1]=!1;let r=this[Yf].length?!1:this[jf]?this[jf].flowing:!0;return!r&&!this[Yf].length&&this[jf].once("drain",o=>this.emit("drain")),r}[F3](e){e&&!this[vh]&&(this[fi]=this[fi]?Buffer.concat([this[fi],e]):e)}[R3](){if(this[_d]&&!this[uAe]&&!this[vh]&&!this[xx]){this[uAe]=!0;let e=this[Ud];if(e&&e.blockRemain){let r=this[fi]?this[fi].length:0;this.warn("TAR_BAD_ARCHIVE",`Truncated input (needed ${e.blockRemain} more bytes, only ${r} available)`,{entry:e}),this[fi]&&e.write(this[fi]),e.end()}this[Hd](kx)}}[Sx](e){if(this[xx])this[F3](e);else if(!e&&!this[fi])this[R3]();else{if(this[xx]=!0,this[fi]){this[F3](e);let r=this[fi];this[fi]=null,this[bx](r)}else this[bx](e);for(;this[fi]&&this[fi].length>=512&&!this[vh]&&!this[Fx];){let r=this[fi];this[fi]=null,this[bx](r)}this[xx]=!1}(!this[fi]||this[_d])&&this[R3]()}[bx](e){let r=0,o=e.length;for(;r+512<=o&&!this[vh]&&!this[Fx];)switch(this[Zl]){case"begin":case"header":this[fAe](e,r),r+=512;break;case"ignore":case"body":r+=this[Q3](e,r);break;case"meta":r+=this[AAe](e,r);break;default:throw new Error("invalid state: "+this[Zl])}r{"use strict";var klt=OE(),gAe=Rx(),tC=ve("fs"),Qlt=eC(),hAe=ve("path"),T3=YE();mAe.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let o=klt(t);if(o.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!o.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&Rlt(o,e),o.noResume||Flt(o),o.file&&o.sync?Tlt(o):o.file?Llt(o,r):dAe(o)};var Flt=t=>{let e=t.onentry;t.onentry=e?r=>{e(r),r.resume()}:r=>r.resume()},Rlt=(t,e)=>{let r=new Map(e.map(n=>[T3(n),!0])),o=t.filter,a=(n,u)=>{let A=u||hAe.parse(n).root||".",p=n===A?!1:r.has(n)?r.get(n):a(hAe.dirname(n),A);return r.set(n,p),p};t.filter=o?(n,u)=>o(n,u)&&a(T3(n)):n=>a(T3(n))},Tlt=t=>{let e=dAe(t),r=t.file,o=!0,a;try{let n=tC.statSync(r),u=t.maxReadSize||16*1024*1024;if(n.size{let r=new gAe(t),o=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((u,A)=>{r.on("error",A),r.on("end",u),tC.stat(a,(p,h)=>{if(p)A(p);else{let E=new Qlt.ReadStream(a,{readSize:o,size:h.size});E.on("error",A),E.pipe(r)}})});return e?n.then(e,e):n},dAe=t=>new gAe(t)});var BAe=_((AUt,IAe)=>{"use strict";var Nlt=OE(),Lx=Ex(),yAe=eC(),EAe=Tx(),CAe=ve("path");IAe.exports=(t,e,r)=>{if(typeof e=="function"&&(r=e),Array.isArray(t)&&(e=t,t={}),!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");e=Array.from(e);let o=Nlt(t);if(o.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!o.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return o.file&&o.sync?Olt(o,e):o.file?Mlt(o,e,r):o.sync?Ult(o,e):_lt(o,e)};var Olt=(t,e)=>{let r=new Lx.Sync(t),o=new yAe.WriteStreamSync(t.file,{mode:t.mode||438});r.pipe(o),wAe(r,e)},Mlt=(t,e,r)=>{let o=new Lx(t),a=new yAe.WriteStream(t.file,{mode:t.mode||438});o.pipe(a);let n=new Promise((u,A)=>{a.on("error",A),a.on("close",u),o.on("error",A)});return L3(o,e),r?n.then(r,r):n},wAe=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?EAe({file:CAe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:o=>t.add(o)}):t.add(r)}),t.end()},L3=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return EAe({file:CAe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:o=>t.add(o)}).then(o=>L3(t,e));t.add(r)}t.end()},Ult=(t,e)=>{let r=new Lx.Sync(t);return wAe(r,e),r},_lt=(t,e)=>{let r=new Lx(t);return L3(r,e),r}});var N3=_((fUt,kAe)=>{"use strict";var Hlt=OE(),vAe=Ex(),fl=ve("fs"),DAe=eC(),PAe=Tx(),SAe=ve("path"),bAe=jE();kAe.exports=(t,e,r)=>{let o=Hlt(t);if(!o.file)throw new TypeError("file is required");if(o.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),o.sync?qlt(o,e):jlt(o,e,r)};var qlt=(t,e)=>{let r=new vAe.Sync(t),o=!0,a,n;try{try{a=fl.openSync(t.file,"r+")}catch(p){if(p.code==="ENOENT")a=fl.openSync(t.file,"w+");else throw p}let u=fl.fstatSync(a),A=Buffer.alloc(512);e:for(n=0;nu.size)break;n+=h,t.mtimeCache&&t.mtimeCache.set(p.path,p.mtime)}o=!1,Glt(t,r,n,a,e)}finally{if(o)try{fl.closeSync(a)}catch{}}},Glt=(t,e,r,o,a)=>{let n=new DAe.WriteStreamSync(t.file,{fd:o,start:r});e.pipe(n),Ylt(e,a)},jlt=(t,e,r)=>{e=Array.from(e);let o=new vAe(t),a=(u,A,p)=>{let h=(C,R)=>{C?fl.close(u,N=>p(C)):p(null,R)},E=0;if(A===0)return h(null,0);let I=0,v=Buffer.alloc(512),x=(C,R)=>{if(C)return h(C);if(I+=R,I<512&&R)return fl.read(u,v,I,v.length-I,E+I,x);if(E===0&&v[0]===31&&v[1]===139)return h(new Error("cannot append to compressed archives"));if(I<512)return h(null,E);let N=new bAe(v);if(!N.cksumValid)return h(null,E);let U=512*Math.ceil(N.size/512);if(E+U+512>A||(E+=U+512,E>=A))return h(null,E);t.mtimeCache&&t.mtimeCache.set(N.path,N.mtime),I=0,fl.read(u,v,0,512,E,x)};fl.read(u,v,0,512,E,x)},n=new Promise((u,A)=>{o.on("error",A);let p="r+",h=(E,I)=>{if(E&&E.code==="ENOENT"&&p==="r+")return p="w+",fl.open(t.file,p,h);if(E)return A(E);fl.fstat(I,(v,x)=>{if(v)return fl.close(I,()=>A(v));a(I,x.size,(C,R)=>{if(C)return A(C);let N=new DAe.WriteStream(t.file,{fd:I,start:R});o.pipe(N),N.on("error",A),N.on("close",u),xAe(o,e)})})};fl.open(t.file,p,h)});return r?n.then(r,r):n},Ylt=(t,e)=>{e.forEach(r=>{r.charAt(0)==="@"?PAe({file:SAe.resolve(t.cwd,r.substr(1)),sync:!0,noResume:!0,onentry:o=>t.add(o)}):t.add(r)}),t.end()},xAe=(t,e)=>{for(;e.length;){let r=e.shift();if(r.charAt(0)==="@")return PAe({file:SAe.resolve(t.cwd,r.substr(1)),noResume:!0,onentry:o=>t.add(o)}).then(o=>xAe(t,e));t.add(r)}t.end()}});var FAe=_((pUt,QAe)=>{"use strict";var Wlt=OE(),Klt=N3();QAe.exports=(t,e,r)=>{let o=Wlt(t);if(!o.file)throw new TypeError("file is required");if(o.gzip)throw new TypeError("cannot append to compressed archives");if(!e||!Array.isArray(e)||!e.length)throw new TypeError("no files or directories specified");return e=Array.from(e),zlt(o),Klt(o,e,r)};var zlt=t=>{let e=t.filter;t.mtimeCache||(t.mtimeCache=new Map),t.filter=e?(r,o)=>e(r,o)&&!(t.mtimeCache.get(r)>o.mtime):(r,o)=>!(t.mtimeCache.get(r)>o.mtime)}});var LAe=_((hUt,TAe)=>{var{promisify:RAe}=ve("util"),Dh=ve("fs"),Vlt=t=>{if(!t)t={mode:511,fs:Dh};else if(typeof t=="object")t={mode:511,fs:Dh,...t};else if(typeof t=="number")t={mode:t,fs:Dh};else if(typeof t=="string")t={mode:parseInt(t,8),fs:Dh};else throw new TypeError("invalid options argument");return t.mkdir=t.mkdir||t.fs.mkdir||Dh.mkdir,t.mkdirAsync=RAe(t.mkdir),t.stat=t.stat||t.fs.stat||Dh.stat,t.statAsync=RAe(t.stat),t.statSync=t.statSync||t.fs.statSync||Dh.statSync,t.mkdirSync=t.mkdirSync||t.fs.mkdirSync||Dh.mkdirSync,t};TAe.exports=Vlt});var OAe=_((gUt,NAe)=>{var Jlt=process.platform,{resolve:Xlt,parse:Zlt}=ve("path"),$lt=t=>{if(/\0/.test(t))throw Object.assign(new TypeError("path must be a string without null bytes"),{path:t,code:"ERR_INVALID_ARG_VALUE"});if(t=Xlt(t),Jlt==="win32"){let e=/[*|"<>?:]/,{root:r}=Zlt(t);if(e.test(t.substr(r.length)))throw Object.assign(new Error("Illegal characters in path."),{path:t,code:"EINVAL"})}return t};NAe.exports=$lt});var qAe=_((dUt,HAe)=>{var{dirname:MAe}=ve("path"),UAe=(t,e,r=void 0)=>r===e?Promise.resolve():t.statAsync(e).then(o=>o.isDirectory()?r:void 0,o=>o.code==="ENOENT"?UAe(t,MAe(e),e):void 0),_Ae=(t,e,r=void 0)=>{if(r!==e)try{return t.statSync(e).isDirectory()?r:void 0}catch(o){return o.code==="ENOENT"?_Ae(t,MAe(e),e):void 0}};HAe.exports={findMade:UAe,findMadeSync:_Ae}});var U3=_((mUt,jAe)=>{var{dirname:GAe}=ve("path"),O3=(t,e,r)=>{e.recursive=!1;let o=GAe(t);return o===t?e.mkdirAsync(t,e).catch(a=>{if(a.code!=="EISDIR")throw a}):e.mkdirAsync(t,e).then(()=>r||t,a=>{if(a.code==="ENOENT")return O3(o,e).then(n=>O3(t,e,n));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;return e.statAsync(t).then(n=>{if(n.isDirectory())return r;throw a},()=>{throw a})})},M3=(t,e,r)=>{let o=GAe(t);if(e.recursive=!1,o===t)try{return e.mkdirSync(t,e)}catch(a){if(a.code!=="EISDIR")throw a;return}try{return e.mkdirSync(t,e),r||t}catch(a){if(a.code==="ENOENT")return M3(t,e,M3(o,e,r));if(a.code!=="EEXIST"&&a.code!=="EROFS")throw a;try{if(!e.statSync(t).isDirectory())throw a}catch{throw a}}};jAe.exports={mkdirpManual:O3,mkdirpManualSync:M3}});var KAe=_((yUt,WAe)=>{var{dirname:YAe}=ve("path"),{findMade:ect,findMadeSync:tct}=qAe(),{mkdirpManual:rct,mkdirpManualSync:nct}=U3(),ict=(t,e)=>(e.recursive=!0,YAe(t)===t?e.mkdirAsync(t,e):ect(e,t).then(o=>e.mkdirAsync(t,e).then(()=>o).catch(a=>{if(a.code==="ENOENT")return rct(t,e);throw a}))),sct=(t,e)=>{if(e.recursive=!0,YAe(t)===t)return e.mkdirSync(t,e);let o=tct(e,t);try{return e.mkdirSync(t,e),o}catch(a){if(a.code==="ENOENT")return nct(t,e);throw a}};WAe.exports={mkdirpNative:ict,mkdirpNativeSync:sct}});var XAe=_((EUt,JAe)=>{var zAe=ve("fs"),oct=process.version,_3=oct.replace(/^v/,"").split("."),VAe=+_3[0]>10||+_3[0]==10&&+_3[1]>=12,act=VAe?t=>t.mkdir===zAe.mkdir:()=>!1,lct=VAe?t=>t.mkdirSync===zAe.mkdirSync:()=>!1;JAe.exports={useNative:act,useNativeSync:lct}});var nfe=_((CUt,rfe)=>{var rC=LAe(),nC=OAe(),{mkdirpNative:ZAe,mkdirpNativeSync:$Ae}=KAe(),{mkdirpManual:efe,mkdirpManualSync:tfe}=U3(),{useNative:cct,useNativeSync:uct}=XAe(),iC=(t,e)=>(t=nC(t),e=rC(e),cct(e)?ZAe(t,e):efe(t,e)),Act=(t,e)=>(t=nC(t),e=rC(e),uct(e)?$Ae(t,e):tfe(t,e));iC.sync=Act;iC.native=(t,e)=>ZAe(nC(t),rC(e));iC.manual=(t,e)=>efe(nC(t),rC(e));iC.nativeSync=(t,e)=>$Ae(nC(t),rC(e));iC.manualSync=(t,e)=>tfe(nC(t),rC(e));rfe.exports=iC});var ufe=_((wUt,cfe)=>{"use strict";var ec=ve("fs"),Gd=ve("path"),fct=ec.lchown?"lchown":"chown",pct=ec.lchownSync?"lchownSync":"chownSync",sfe=ec.lchown&&!process.version.match(/v1[1-9]+\./)&&!process.version.match(/v10\.[6-9]/),ife=(t,e,r)=>{try{return ec[pct](t,e,r)}catch(o){if(o.code!=="ENOENT")throw o}},hct=(t,e,r)=>{try{return ec.chownSync(t,e,r)}catch(o){if(o.code!=="ENOENT")throw o}},gct=sfe?(t,e,r,o)=>a=>{!a||a.code!=="EISDIR"?o(a):ec.chown(t,e,r,o)}:(t,e,r,o)=>o,H3=sfe?(t,e,r)=>{try{return ife(t,e,r)}catch(o){if(o.code!=="EISDIR")throw o;hct(t,e,r)}}:(t,e,r)=>ife(t,e,r),dct=process.version,ofe=(t,e,r)=>ec.readdir(t,e,r),mct=(t,e)=>ec.readdirSync(t,e);/^v4\./.test(dct)&&(ofe=(t,e,r)=>ec.readdir(t,r));var Nx=(t,e,r,o)=>{ec[fct](t,e,r,gct(t,e,r,a=>{o(a&&a.code!=="ENOENT"?a:null)}))},afe=(t,e,r,o,a)=>{if(typeof e=="string")return ec.lstat(Gd.resolve(t,e),(n,u)=>{if(n)return a(n.code!=="ENOENT"?n:null);u.name=e,afe(t,u,r,o,a)});if(e.isDirectory())q3(Gd.resolve(t,e.name),r,o,n=>{if(n)return a(n);let u=Gd.resolve(t,e.name);Nx(u,r,o,a)});else{let n=Gd.resolve(t,e.name);Nx(n,r,o,a)}},q3=(t,e,r,o)=>{ofe(t,{withFileTypes:!0},(a,n)=>{if(a){if(a.code==="ENOENT")return o();if(a.code!=="ENOTDIR"&&a.code!=="ENOTSUP")return o(a)}if(a||!n.length)return Nx(t,e,r,o);let u=n.length,A=null,p=h=>{if(!A){if(h)return o(A=h);if(--u===0)return Nx(t,e,r,o)}};n.forEach(h=>afe(t,h,e,r,p))})},yct=(t,e,r,o)=>{if(typeof e=="string")try{let a=ec.lstatSync(Gd.resolve(t,e));a.name=e,e=a}catch(a){if(a.code==="ENOENT")return;throw a}e.isDirectory()&&lfe(Gd.resolve(t,e.name),r,o),H3(Gd.resolve(t,e.name),r,o)},lfe=(t,e,r)=>{let o;try{o=mct(t,{withFileTypes:!0})}catch(a){if(a.code==="ENOENT")return;if(a.code==="ENOTDIR"||a.code==="ENOTSUP")return H3(t,e,r);throw a}return o&&o.length&&o.forEach(a=>yct(t,a,e,r)),H3(t,e,r)};cfe.exports=q3;q3.sync=lfe});var hfe=_((IUt,G3)=>{"use strict";var Afe=nfe(),tc=ve("fs"),Ox=ve("path"),ffe=ufe(),Kc=qE(),Mx=class extends Error{constructor(e,r){super("Cannot extract through symbolic link"),this.path=r,this.symlink=e}get name(){return"SylinkError"}},Ux=class extends Error{constructor(e,r){super(r+": Cannot cd into '"+e+"'"),this.path=e,this.code=r}get name(){return"CwdError"}},_x=(t,e)=>t.get(Kc(e)),V1=(t,e,r)=>t.set(Kc(e),r),Ect=(t,e)=>{tc.stat(t,(r,o)=>{(r||!o.isDirectory())&&(r=new Ux(t,r&&r.code||"ENOTDIR")),e(r)})};G3.exports=(t,e,r)=>{t=Kc(t);let o=e.umask,a=e.mode|448,n=(a&o)!==0,u=e.uid,A=e.gid,p=typeof u=="number"&&typeof A=="number"&&(u!==e.processUid||A!==e.processGid),h=e.preserve,E=e.unlink,I=e.cache,v=Kc(e.cwd),x=(N,U)=>{N?r(N):(V1(I,t,!0),U&&p?ffe(U,u,A,V=>x(V)):n?tc.chmod(t,a,r):r())};if(I&&_x(I,t)===!0)return x();if(t===v)return Ect(t,x);if(h)return Afe(t,{mode:a}).then(N=>x(null,N),x);let R=Kc(Ox.relative(v,t)).split("/");Hx(v,R,a,I,E,v,null,x)};var Hx=(t,e,r,o,a,n,u,A)=>{if(!e.length)return A(null,u);let p=e.shift(),h=Kc(Ox.resolve(t+"/"+p));if(_x(o,h))return Hx(h,e,r,o,a,n,u,A);tc.mkdir(h,r,pfe(h,e,r,o,a,n,u,A))},pfe=(t,e,r,o,a,n,u,A)=>p=>{p?tc.lstat(t,(h,E)=>{if(h)h.path=h.path&&Kc(h.path),A(h);else if(E.isDirectory())Hx(t,e,r,o,a,n,u,A);else if(a)tc.unlink(t,I=>{if(I)return A(I);tc.mkdir(t,r,pfe(t,e,r,o,a,n,u,A))});else{if(E.isSymbolicLink())return A(new Mx(t,t+"/"+e.join("/")));A(p)}}):(u=u||t,Hx(t,e,r,o,a,n,u,A))},Cct=t=>{let e=!1,r="ENOTDIR";try{e=tc.statSync(t).isDirectory()}catch(o){r=o.code}finally{if(!e)throw new Ux(t,r)}};G3.exports.sync=(t,e)=>{t=Kc(t);let r=e.umask,o=e.mode|448,a=(o&r)!==0,n=e.uid,u=e.gid,A=typeof n=="number"&&typeof u=="number"&&(n!==e.processUid||u!==e.processGid),p=e.preserve,h=e.unlink,E=e.cache,I=Kc(e.cwd),v=N=>{V1(E,t,!0),N&&A&&ffe.sync(N,n,u),a&&tc.chmodSync(t,o)};if(E&&_x(E,t)===!0)return v();if(t===I)return Cct(I),v();if(p)return v(Afe.sync(t,o));let C=Kc(Ox.relative(I,t)).split("/"),R=null;for(let N=C.shift(),U=I;N&&(U+="/"+N);N=C.shift())if(U=Kc(Ox.resolve(U)),!_x(E,U))try{tc.mkdirSync(U,o),R=R||U,V1(E,U,!0)}catch{let te=tc.lstatSync(U);if(te.isDirectory()){V1(E,U,!0);continue}else if(h){tc.unlinkSync(U),tc.mkdirSync(U,o),R=R||U,V1(E,U,!0);continue}else if(te.isSymbolicLink())return new Mx(U,U+"/"+C.join("/"))}return v(R)}});var Y3=_((BUt,gfe)=>{var j3=Object.create(null),{hasOwnProperty:wct}=Object.prototype;gfe.exports=t=>(wct.call(j3,t)||(j3[t]=t.normalize("NFKD")),j3[t])});var Efe=_((vUt,yfe)=>{var dfe=ve("assert"),Ict=Y3(),Bct=YE(),{join:mfe}=ve("path"),vct=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,Dct=vct==="win32";yfe.exports=()=>{let t=new Map,e=new Map,r=h=>h.split("/").slice(0,-1).reduce((I,v)=>(I.length&&(v=mfe(I[I.length-1],v)),I.push(v||"/"),I),[]),o=new Set,a=h=>{let E=e.get(h);if(!E)throw new Error("function does not have any path reservations");return{paths:E.paths.map(I=>t.get(I)),dirs:[...E.dirs].map(I=>t.get(I))}},n=h=>{let{paths:E,dirs:I}=a(h);return E.every(v=>v[0]===h)&&I.every(v=>v[0]instanceof Set&&v[0].has(h))},u=h=>o.has(h)||!n(h)?!1:(o.add(h),h(()=>A(h)),!0),A=h=>{if(!o.has(h))return!1;let{paths:E,dirs:I}=e.get(h),v=new Set;return E.forEach(x=>{let C=t.get(x);dfe.equal(C[0],h),C.length===1?t.delete(x):(C.shift(),typeof C[0]=="function"?v.add(C[0]):C[0].forEach(R=>v.add(R)))}),I.forEach(x=>{let C=t.get(x);dfe(C[0]instanceof Set),C[0].size===1&&C.length===1?t.delete(x):C[0].size===1?(C.shift(),v.add(C[0])):C[0].delete(h)}),o.delete(h),v.forEach(x=>u(x)),!0};return{check:n,reserve:(h,E)=>{h=Dct?["win32 parallelization disabled"]:h.map(v=>Ict(Bct(mfe(v))).toLowerCase());let I=new Set(h.map(v=>r(v)).reduce((v,x)=>v.concat(x)));return e.set(E,{dirs:I,paths:h}),h.forEach(v=>{let x=t.get(v);x?x.push(E):t.set(v,[E])}),I.forEach(v=>{let x=t.get(v);x?x[x.length-1]instanceof Set?x[x.length-1].add(E):x.push(new Set([E])):t.set(v,[new Set([E])])}),u(E)}}}});var Ife=_((DUt,wfe)=>{var Pct=process.platform,Sct=Pct==="win32",bct=global.__FAKE_TESTING_FS__||ve("fs"),{O_CREAT:xct,O_TRUNC:kct,O_WRONLY:Qct,UV_FS_O_FILEMAP:Cfe=0}=bct.constants,Fct=Sct&&!!Cfe,Rct=512*1024,Tct=Cfe|kct|xct|Qct;wfe.exports=Fct?t=>t"w"});var e_=_((PUt,Nfe)=>{"use strict";var Lct=ve("assert"),Nct=Rx(),vn=ve("fs"),Oct=eC(),Wf=ve("path"),Rfe=hfe(),Bfe=e3(),Mct=Efe(),Uct=t3(),pl=qE(),_ct=YE(),Hct=Y3(),vfe=Symbol("onEntry"),z3=Symbol("checkFs"),Dfe=Symbol("checkFs2"),jx=Symbol("pruneCache"),V3=Symbol("isReusable"),rc=Symbol("makeFs"),J3=Symbol("file"),X3=Symbol("directory"),Yx=Symbol("link"),Pfe=Symbol("symlink"),Sfe=Symbol("hardlink"),bfe=Symbol("unsupported"),xfe=Symbol("checkPath"),Ph=Symbol("mkdir"),To=Symbol("onError"),qx=Symbol("pending"),kfe=Symbol("pend"),sC=Symbol("unpend"),W3=Symbol("ended"),K3=Symbol("maybeClose"),Z3=Symbol("skip"),J1=Symbol("doChown"),X1=Symbol("uid"),Z1=Symbol("gid"),$1=Symbol("checkedCwd"),Tfe=ve("crypto"),Lfe=Ife(),qct=process.env.TESTING_TAR_FAKE_PLATFORM||process.platform,e2=qct==="win32",Gct=(t,e)=>{if(!e2)return vn.unlink(t,e);let r=t+".DELETE."+Tfe.randomBytes(16).toString("hex");vn.rename(t,r,o=>{if(o)return e(o);vn.unlink(r,e)})},jct=t=>{if(!e2)return vn.unlinkSync(t);let e=t+".DELETE."+Tfe.randomBytes(16).toString("hex");vn.renameSync(t,e),vn.unlinkSync(e)},Qfe=(t,e,r)=>t===t>>>0?t:e===e>>>0?e:r,Ffe=t=>Hct(_ct(pl(t))).toLowerCase(),Yct=(t,e)=>{e=Ffe(e);for(let r of t.keys()){let o=Ffe(r);(o===e||o.indexOf(e+"/")===0)&&t.delete(r)}},Wct=t=>{for(let e of t.keys())t.delete(e)},t2=class extends Nct{constructor(e){if(e||(e={}),e.ondone=r=>{this[W3]=!0,this[K3]()},super(e),this[$1]=!1,this.reservations=Mct(),this.transform=typeof e.transform=="function"?e.transform:null,this.writable=!0,this.readable=!1,this[qx]=0,this[W3]=!1,this.dirCache=e.dirCache||new Map,typeof e.uid=="number"||typeof e.gid=="number"){if(typeof e.uid!="number"||typeof e.gid!="number")throw new TypeError("cannot set owner without number uid and gid");if(e.preserveOwner)throw new TypeError("cannot preserve owner in archive and also set owner explicitly");this.uid=e.uid,this.gid=e.gid,this.setOwner=!0}else this.uid=null,this.gid=null,this.setOwner=!1;e.preserveOwner===void 0&&typeof e.uid!="number"?this.preserveOwner=process.getuid&&process.getuid()===0:this.preserveOwner=!!e.preserveOwner,this.processUid=(this.preserveOwner||this.setOwner)&&process.getuid?process.getuid():null,this.processGid=(this.preserveOwner||this.setOwner)&&process.getgid?process.getgid():null,this.forceChown=e.forceChown===!0,this.win32=!!e.win32||e2,this.newer=!!e.newer,this.keep=!!e.keep,this.noMtime=!!e.noMtime,this.preservePaths=!!e.preservePaths,this.unlink=!!e.unlink,this.cwd=pl(Wf.resolve(e.cwd||process.cwd())),this.strip=+e.strip||0,this.processUmask=e.noChmod?0:process.umask(),this.umask=typeof e.umask=="number"?e.umask:this.processUmask,this.dmode=e.dmode||511&~this.umask,this.fmode=e.fmode||438&~this.umask,this.on("entry",r=>this[vfe](r))}warn(e,r,o={}){return(e==="TAR_BAD_ARCHIVE"||e==="TAR_ABORT")&&(o.recoverable=!1),super.warn(e,r,o)}[K3](){this[W3]&&this[qx]===0&&(this.emit("prefinish"),this.emit("finish"),this.emit("end"),this.emit("close"))}[xfe](e){if(this.strip){let r=pl(e.path).split("/");if(r.length=this.strip)e.linkpath=o.slice(this.strip).join("/");else return!1}}if(!this.preservePaths){let r=pl(e.path),o=r.split("/");if(o.includes("..")||e2&&/^[a-z]:\.\.$/i.test(o[0]))return this.warn("TAR_ENTRY_ERROR","path contains '..'",{entry:e,path:r}),!1;let[a,n]=Uct(r);a&&(e.path=n,this.warn("TAR_ENTRY_INFO",`stripping ${a} from absolute path`,{entry:e,path:r}))}if(Wf.isAbsolute(e.path)?e.absolute=pl(Wf.resolve(e.path)):e.absolute=pl(Wf.resolve(this.cwd,e.path)),!this.preservePaths&&e.absolute.indexOf(this.cwd+"/")!==0&&e.absolute!==this.cwd)return this.warn("TAR_ENTRY_ERROR","path escaped extraction target",{entry:e,path:pl(e.path),resolvedPath:e.absolute,cwd:this.cwd}),!1;if(e.absolute===this.cwd&&e.type!=="Directory"&&e.type!=="GNUDumpDir")return!1;if(this.win32){let{root:r}=Wf.win32.parse(e.absolute);e.absolute=r+Bfe.encode(e.absolute.substr(r.length));let{root:o}=Wf.win32.parse(e.path);e.path=o+Bfe.encode(e.path.substr(o.length))}return!0}[vfe](e){if(!this[xfe](e))return e.resume();switch(Lct.equal(typeof e.absolute,"string"),e.type){case"Directory":case"GNUDumpDir":e.mode&&(e.mode=e.mode|448);case"File":case"OldFile":case"ContiguousFile":case"Link":case"SymbolicLink":return this[z3](e);case"CharacterDevice":case"BlockDevice":case"FIFO":default:return this[bfe](e)}}[To](e,r){e.name==="CwdError"?this.emit("error",e):(this.warn("TAR_ENTRY_ERROR",e,{entry:r}),this[sC](),r.resume())}[Ph](e,r,o){Rfe(pl(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r,noChmod:this.noChmod},o)}[J1](e){return this.forceChown||this.preserveOwner&&(typeof e.uid=="number"&&e.uid!==this.processUid||typeof e.gid=="number"&&e.gid!==this.processGid)||typeof this.uid=="number"&&this.uid!==this.processUid||typeof this.gid=="number"&&this.gid!==this.processGid}[X1](e){return Qfe(this.uid,e.uid,this.processUid)}[Z1](e){return Qfe(this.gid,e.gid,this.processGid)}[J3](e,r){let o=e.mode&4095||this.fmode,a=new Oct.WriteStream(e.absolute,{flags:Lfe(e.size),mode:o,autoClose:!1});a.on("error",p=>{a.fd&&vn.close(a.fd,()=>{}),a.write=()=>!0,this[To](p,e),r()});let n=1,u=p=>{if(p){a.fd&&vn.close(a.fd,()=>{}),this[To](p,e),r();return}--n===0&&vn.close(a.fd,h=>{h?this[To](h,e):this[sC](),r()})};a.on("finish",p=>{let h=e.absolute,E=a.fd;if(e.mtime&&!this.noMtime){n++;let I=e.atime||new Date,v=e.mtime;vn.futimes(E,I,v,x=>x?vn.utimes(h,I,v,C=>u(C&&x)):u())}if(this[J1](e)){n++;let I=this[X1](e),v=this[Z1](e);vn.fchown(E,I,v,x=>x?vn.chown(h,I,v,C=>u(C&&x)):u())}u()});let A=this.transform&&this.transform(e)||e;A!==e&&(A.on("error",p=>{this[To](p,e),r()}),e.pipe(A)),A.pipe(a)}[X3](e,r){let o=e.mode&4095||this.dmode;this[Ph](e.absolute,o,a=>{if(a){this[To](a,e),r();return}let n=1,u=A=>{--n===0&&(r(),this[sC](),e.resume())};e.mtime&&!this.noMtime&&(n++,vn.utimes(e.absolute,e.atime||new Date,e.mtime,u)),this[J1](e)&&(n++,vn.chown(e.absolute,this[X1](e),this[Z1](e),u)),u()})}[bfe](e){e.unsupported=!0,this.warn("TAR_ENTRY_UNSUPPORTED",`unsupported entry type: ${e.type}`,{entry:e}),e.resume()}[Pfe](e,r){this[Yx](e,e.linkpath,"symlink",r)}[Sfe](e,r){let o=pl(Wf.resolve(this.cwd,e.linkpath));this[Yx](e,o,"link",r)}[kfe](){this[qx]++}[sC](){this[qx]--,this[K3]()}[Z3](e){this[sC](),e.resume()}[V3](e,r){return e.type==="File"&&!this.unlink&&r.isFile()&&r.nlink<=1&&!e2}[z3](e){this[kfe]();let r=[e.path];e.linkpath&&r.push(e.linkpath),this.reservations.reserve(r,o=>this[Dfe](e,o))}[jx](e){e.type==="SymbolicLink"?Wct(this.dirCache):e.type!=="Directory"&&Yct(this.dirCache,e.absolute)}[Dfe](e,r){this[jx](e);let o=A=>{this[jx](e),r(A)},a=()=>{this[Ph](this.cwd,this.dmode,A=>{if(A){this[To](A,e),o();return}this[$1]=!0,n()})},n=()=>{if(e.absolute!==this.cwd){let A=pl(Wf.dirname(e.absolute));if(A!==this.cwd)return this[Ph](A,this.dmode,p=>{if(p){this[To](p,e),o();return}u()})}u()},u=()=>{vn.lstat(e.absolute,(A,p)=>{if(p&&(this.keep||this.newer&&p.mtime>e.mtime)){this[Z3](e),o();return}if(A||this[V3](e,p))return this[rc](null,e,o);if(p.isDirectory()){if(e.type==="Directory"){let h=!this.noChmod&&e.mode&&(p.mode&4095)!==e.mode,E=I=>this[rc](I,e,o);return h?vn.chmod(e.absolute,e.mode,E):E()}if(e.absolute!==this.cwd)return vn.rmdir(e.absolute,h=>this[rc](h,e,o))}if(e.absolute===this.cwd)return this[rc](null,e,o);Gct(e.absolute,h=>this[rc](h,e,o))})};this[$1]?n():a()}[rc](e,r,o){if(e){this[To](e,r),o();return}switch(r.type){case"File":case"OldFile":case"ContiguousFile":return this[J3](r,o);case"Link":return this[Sfe](r,o);case"SymbolicLink":return this[Pfe](r,o);case"Directory":case"GNUDumpDir":return this[X3](r,o)}}[Yx](e,r,o,a){vn[o](r,e.absolute,n=>{n?this[To](n,e):(this[sC](),e.resume()),a()})}},Gx=t=>{try{return[null,t()]}catch(e){return[e,null]}},$3=class extends t2{[rc](e,r){return super[rc](e,r,()=>{})}[z3](e){if(this[jx](e),!this[$1]){let n=this[Ph](this.cwd,this.dmode);if(n)return this[To](n,e);this[$1]=!0}if(e.absolute!==this.cwd){let n=pl(Wf.dirname(e.absolute));if(n!==this.cwd){let u=this[Ph](n,this.dmode);if(u)return this[To](u,e)}}let[r,o]=Gx(()=>vn.lstatSync(e.absolute));if(o&&(this.keep||this.newer&&o.mtime>e.mtime))return this[Z3](e);if(r||this[V3](e,o))return this[rc](null,e);if(o.isDirectory()){if(e.type==="Directory"){let u=!this.noChmod&&e.mode&&(o.mode&4095)!==e.mode,[A]=u?Gx(()=>{vn.chmodSync(e.absolute,e.mode)}):[];return this[rc](A,e)}let[n]=Gx(()=>vn.rmdirSync(e.absolute));this[rc](n,e)}let[a]=e.absolute===this.cwd?[]:Gx(()=>jct(e.absolute));this[rc](a,e)}[J3](e,r){let o=e.mode&4095||this.fmode,a=A=>{let p;try{vn.closeSync(n)}catch(h){p=h}(A||p)&&this[To](A||p,e),r()},n;try{n=vn.openSync(e.absolute,Lfe(e.size),o)}catch(A){return a(A)}let u=this.transform&&this.transform(e)||e;u!==e&&(u.on("error",A=>this[To](A,e)),e.pipe(u)),u.on("data",A=>{try{vn.writeSync(n,A,0,A.length)}catch(p){a(p)}}),u.on("end",A=>{let p=null;if(e.mtime&&!this.noMtime){let h=e.atime||new Date,E=e.mtime;try{vn.futimesSync(n,h,E)}catch(I){try{vn.utimesSync(e.absolute,h,E)}catch{p=I}}}if(this[J1](e)){let h=this[X1](e),E=this[Z1](e);try{vn.fchownSync(n,h,E)}catch(I){try{vn.chownSync(e.absolute,h,E)}catch{p=p||I}}}a(p)})}[X3](e,r){let o=e.mode&4095||this.dmode,a=this[Ph](e.absolute,o);if(a){this[To](a,e),r();return}if(e.mtime&&!this.noMtime)try{vn.utimesSync(e.absolute,e.atime||new Date,e.mtime)}catch{}if(this[J1](e))try{vn.chownSync(e.absolute,this[X1](e),this[Z1](e))}catch{}r(),e.resume()}[Ph](e,r){try{return Rfe.sync(pl(e),{uid:this.uid,gid:this.gid,processUid:this.processUid,processGid:this.processGid,umask:this.processUmask,preserve:this.preservePaths,unlink:this.unlink,cache:this.dirCache,cwd:this.cwd,mode:r})}catch(o){return o}}[Yx](e,r,o,a){try{vn[o+"Sync"](r,e.absolute),a(),e.resume()}catch(n){return this[To](n,e)}}};t2.Sync=$3;Nfe.exports=t2});var Hfe=_((SUt,_fe)=>{"use strict";var Kct=OE(),Wx=e_(),Mfe=ve("fs"),Ufe=eC(),Ofe=ve("path"),t_=YE();_fe.exports=(t,e,r)=>{typeof t=="function"?(r=t,e=null,t={}):Array.isArray(t)&&(e=t,t={}),typeof e=="function"&&(r=e,e=null),e?e=Array.from(e):e=[];let o=Kct(t);if(o.sync&&typeof r=="function")throw new TypeError("callback not supported for sync tar functions");if(!o.file&&typeof r=="function")throw new TypeError("callback only supported with file option");return e.length&&zct(o,e),o.file&&o.sync?Vct(o):o.file?Jct(o,r):o.sync?Xct(o):Zct(o)};var zct=(t,e)=>{let r=new Map(e.map(n=>[t_(n),!0])),o=t.filter,a=(n,u)=>{let A=u||Ofe.parse(n).root||".",p=n===A?!1:r.has(n)?r.get(n):a(Ofe.dirname(n),A);return r.set(n,p),p};t.filter=o?(n,u)=>o(n,u)&&a(t_(n)):n=>a(t_(n))},Vct=t=>{let e=new Wx.Sync(t),r=t.file,o=Mfe.statSync(r),a=t.maxReadSize||16*1024*1024;new Ufe.ReadStreamSync(r,{readSize:a,size:o.size}).pipe(e)},Jct=(t,e)=>{let r=new Wx(t),o=t.maxReadSize||16*1024*1024,a=t.file,n=new Promise((u,A)=>{r.on("error",A),r.on("close",u),Mfe.stat(a,(p,h)=>{if(p)A(p);else{let E=new Ufe.ReadStream(a,{readSize:o,size:h.size});E.on("error",A),E.pipe(r)}})});return e?n.then(e,e):n},Xct=t=>new Wx.Sync(t),Zct=t=>new Wx(t)});var qfe=_(us=>{"use strict";us.c=us.create=BAe();us.r=us.replace=N3();us.t=us.list=Tx();us.u=us.update=FAe();us.x=us.extract=Hfe();us.Pack=Ex();us.Unpack=e_();us.Parse=Rx();us.ReadEntry=rx();us.WriteEntry=A3();us.Header=jE();us.Pax=ix();us.types=KU()});var r_,Gfe,Sh,r2,n2,jfe=Et(()=>{r_=$e(sd()),Gfe=ve("worker_threads"),Sh=Symbol("kTaskInfo"),r2=class{constructor(e,r){this.fn=e;this.limit=(0,r_.default)(r.poolSize)}run(e){return this.limit(()=>this.fn(e))}},n2=class{constructor(e,r){this.source=e;this.workers=[];this.limit=(0,r_.default)(r.poolSize),this.cleanupInterval=setInterval(()=>{if(this.limit.pendingCount===0&&this.limit.activeCount===0){let o=this.workers.pop();o?o.terminate():clearInterval(this.cleanupInterval)}},5e3).unref()}createWorker(){this.cleanupInterval.refresh();let e=new Gfe.Worker(this.source,{eval:!0,execArgv:[...process.execArgv,"--unhandled-rejections=strict"]});return e.on("message",r=>{if(!e[Sh])throw new Error("Assertion failed: Worker sent a result without having a task assigned");e[Sh].resolve(r),e[Sh]=null,e.unref(),this.workers.push(e)}),e.on("error",r=>{e[Sh]?.reject(r),e[Sh]=null}),e.on("exit",r=>{r!==0&&e[Sh]?.reject(new Error(`Worker exited with code ${r}`)),e[Sh]=null}),e}run(e){return this.limit(()=>{let r=this.workers.pop()??this.createWorker();return r.ref(),new Promise((o,a)=>{r[Sh]={resolve:o,reject:a},r.postMessage(e)})})}}});var Wfe=_((QUt,Yfe)=>{var n_;Yfe.exports.getContent=()=>(typeof n_>"u"&&(n_=ve("zlib").brotliDecompressSync(Buffer.from("W59AdoE5B0+1lW4yACxzf59sEq1coBzbRXaO1qCovsdV6k+oTNb8UwDVeZtSmwrROTVHVVVTk8qQmYCmFArApvr9/82RFXNUQ6XSwkV9cCfzSZWqU8eqG2EOlQ1lOQZWbHiPlC1abHHQuTEQEPUx98MQsaye6sqb8BAdM/XEROH6EjdeCSMTKRF6Ky9QE0EnP+EoJ1W8IDiGNQjCud4QjVb6s2PneihHqUArxp4y9lu+8JV7Jd95dsF1wY2/Lxh+cn9ht/77pxkNDcL6UGn39+F5kHErJGWPfXPxIkEkw7DsdtzjYyCSY+c3UDWkSokW07JFzh1bP+V1fOLXainl63s4qOijNf4DzTiErNLrQmZ3Dztrfvy5/PrV17THg5A4OsM6qvQOB3pjkohjdnjnmED91NVbtTfyxA9yViyPKX+fpONfVhgl3kMTcWhDhO3fzLR7LicLycwgO5VlPRXZcPy9M51ll9nq8le9UYt6wJd7PPDLV7Wv3wCjwTyGlLRLKemIZuWhJrieUkVTaTAMu4u4qvWZlpa9vrZgEJroriLZYYHGQrYvzPNwzw1RHuhCGl2mdWrYuCQqtsHAbe1S/Vy9VWmZrzf6ZAANTWM4S3u9FwlEB6PkIeMganeOTBaL9OhcOcT4vk5sWgNpEvw4wg1sP4Ury8j5OssUC/7r+/bfRtMP8Yo6+7PoqlMzX3Li2jMYUyg2iIRUj+2525ep9frulVJ/W1rVEAljLhjpQHKSXbXMqjbP583vTe7hQQVHosY8S5RCSvbYgEGkvLeovH71S/PrF1MU6V61yHEPfppiZcvr2DrqyElUWhZGMpEMFDM6HIMfNtcfD79YWjg+CCpZUYcShJuNUGKpozuw3RwNYQJ+gMFyU2se7luBYUsWjFgE/a5h3/EKWn6Wo8yMRhKZla5AvalupPqw5Kso+mYz/3jNyql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28dktV1v2d798HWbMfJ6lm498KJOjqRfHB4anFb2Gx0IHx21X646G2nXL+2feY+NWRS/w5IUAGPQIXPcfS1r6J+EFTsydXFPYfA7b3i3KHw1GxHT4Vsa7X8ulQdXXNE5veDz98kHgdyJi/OHbu24Wj8cd1QVZyqomhlWcswLrk2c6MOXyA+JJvNRhBUkQimeERj/1Lj6IW0g/KB73b9K75T2BRVF/MgHTvJhnaowRvNuN/EfZ1jCtB1tAvjTltOmXflH1tcqb1tI/qNJa0zVo5J9YbW2eyin9ouaw8SFfC2oEgMeYh0jXc8/hwWrxs3hA4nc85OtKUhlfBW9po2fzsf6wHx86+qmT/kkZDY4A08XGrer4a26fLv3g5l1/Udgs4iufcrj654tbNy2JgfMtvPQuincA","base64")).toString()),n_)});var Xi={};zt(Xi,{convertToZip:()=>rut,convertToZipWorker:()=>o_,extractArchiveTo:()=>Xfe,getDefaultTaskPool:()=>Vfe,getTaskPoolForConfiguration:()=>Jfe,makeArchiveFromDirectory:()=>tut});function $ct(t,e){switch(t){case"async":return new r2(o_,{poolSize:e});case"workers":return new n2((0,s_.getContent)(),{poolSize:e});default:throw new Error(`Assertion failed: Unknown value ${t} for taskPoolMode`)}}function Vfe(){return typeof i_>"u"&&(i_=$ct("workers",Vi.availableParallelism())),i_}function Jfe(t){return typeof t>"u"?Vfe():al(eut,t,()=>{let e=t.get("taskPoolMode"),r=t.get("taskPoolConcurrency");switch(e){case"async":return new r2(o_,{poolSize:r});case"workers":return new n2((0,s_.getContent)(),{poolSize:r});default:throw new Error(`Assertion failed: Unknown value ${e} for taskPoolMode`)}})}async function o_(t){let{tmpFile:e,tgz:r,compressionLevel:o,extractBufferOpts:a}=t,n=new Ji(e,{create:!0,level:o,stats:Ea.makeDefaultStats()}),u=Buffer.from(r.buffer,r.byteOffset,r.byteLength);return await Xfe(u,n,a),n.saveAndClose(),e}async function tut(t,{baseFs:e=new Tn,prefixPath:r=Bt.root,compressionLevel:o,inMemory:a=!1}={}){let n;if(a)n=new Ji(null,{level:o});else{let A=await oe.mktempPromise(),p=z.join(A,"archive.zip");n=new Ji(p,{create:!0,level:o})}let u=z.resolve(Bt.root,r);return await n.copyPromise(u,t,{baseFs:e,stableTime:!0,stableSort:!0}),n}async function rut(t,e={}){let r=await oe.mktempPromise(),o=z.join(r,"archive.zip"),a=e.compressionLevel??e.configuration?.get("compressionLevel")??"mixed",n={prefixPath:e.prefixPath,stripComponents:e.stripComponents};return await(e.taskPool??Jfe(e.configuration)).run({tmpFile:o,tgz:t,compressionLevel:a,extractBufferOpts:n}),new Ji(o,{level:e.compressionLevel})}async function*nut(t){let e=new zfe.default.Parse,r=new Kfe.PassThrough({objectMode:!0,autoDestroy:!0,emitClose:!0});e.on("entry",o=>{r.write(o)}),e.on("error",o=>{r.destroy(o)}),e.on("close",()=>{r.destroyed||r.end()}),e.end(t);for await(let o of r){let a=o;yield a,a.resume()}}async function Xfe(t,e,{stripComponents:r=0,prefixPath:o=Bt.dot}={}){function a(n){if(n.path[0]==="/")return!0;let u=n.path.split(/\//g);return!!(u.some(A=>A==="..")||u.length<=r)}for await(let n of nut(t)){if(a(n))continue;let u=z.normalize(le.toPortablePath(n.path)).replace(/\/$/,"").split(/\//g);if(u.length<=r)continue;let A=u.slice(r).join("/"),p=z.join(o,A),h=420;switch((n.type==="Directory"||((n.mode??0)&73)!==0)&&(h|=73),n.type){case"Directory":e.mkdirpSync(z.dirname(p),{chmod:493,utimes:[vi.SAFE_TIME,vi.SAFE_TIME]}),e.mkdirSync(p,{mode:h}),e.utimesSync(p,vi.SAFE_TIME,vi.SAFE_TIME);break;case"OldFile":case"File":e.mkdirpSync(z.dirname(p),{chmod:493,utimes:[vi.SAFE_TIME,vi.SAFE_TIME]}),e.writeFileSync(p,await zy(n),{mode:h}),e.utimesSync(p,vi.SAFE_TIME,vi.SAFE_TIME);break;case"SymbolicLink":e.mkdirpSync(z.dirname(p),{chmod:493,utimes:[vi.SAFE_TIME,vi.SAFE_TIME]}),e.symlinkSync(n.linkpath,p),e.lutimesSync(p,vi.SAFE_TIME,vi.SAFE_TIME);break}}return e}var Kfe,zfe,s_,i_,eut,Zfe=Et(()=>{Ye();Pt();iA();Kfe=ve("stream"),zfe=$e(qfe());jfe();Gl();s_=$e(Wfe());eut=new WeakMap});var epe=_((a_,$fe)=>{(function(t,e){typeof a_=="object"?$fe.exports=e():typeof define=="function"&&define.amd?define(e):t.treeify=e()})(a_,function(){function t(a,n){var u=n?"\u2514":"\u251C";return a?u+="\u2500 ":u+="\u2500\u2500\u2510",u}function e(a,n){var u=[];for(var A in a)!a.hasOwnProperty(A)||n&&typeof a[A]=="function"||u.push(A);return u}function r(a,n,u,A,p,h,E){var I="",v=0,x,C,R=A.slice(0);if(R.push([n,u])&&A.length>0&&(A.forEach(function(U,V){V>0&&(I+=(U[1]?" ":"\u2502")+" "),!C&&U[0]===n&&(C=!0)}),I+=t(a,u)+a,p&&(typeof n!="object"||n instanceof Date)&&(I+=": "+n),C&&(I+=" (circular ref.)"),E(I)),!C&&typeof n=="object"){var N=e(n,h);N.forEach(function(U){x=++v===N.length,r(U,n[U],x,R,p,h,E)})}}var o={};return o.asLines=function(a,n,u,A){var p=typeof u!="function"?u:!1;r(".",a,!1,[],n,p,A||u)},o.asTree=function(a,n,u){var A="";return r(".",a,!1,[],n,u,function(p){A+=p+` `}),A},o})});var $s={};zt($s,{emitList:()=>iut,emitTree:()=>ipe,treeNodeToJson:()=>npe,treeNodeToTreeify:()=>rpe});function rpe(t,{configuration:e}){let r={},o=0,a=(n,u)=>{let A=Array.isArray(n)?n.entries():Object.entries(n);for(let[p,h]of A){if(!h)continue;let{label:E,value:I,children:v}=h,x=[];typeof E<"u"&&x.push(Ed(e,E,2)),typeof I<"u"&&x.push(Ut(e,I[0],I[1])),x.length===0&&x.push(Ed(e,`${p}`,2));let C=x.join(": ").trim(),R=`\0${o++}\0`,N=u[`${R}${C}`]={};typeof v<"u"&&a(v,N)}};if(typeof t.children>"u")throw new Error("The root node must only contain children");return a(t.children,r),r}function npe(t){let e=r=>{if(typeof r.children>"u"){if(typeof r.value>"u")throw new Error("Assertion failed: Expected a value to be set if the children are missing");return Cd(r.value[0],r.value[1])}let o=Array.isArray(r.children)?r.children.entries():Object.entries(r.children??{}),a=Array.isArray(r.children)?[]:{};for(let[n,u]of o)u&&(a[sut(n)]=e(u));return typeof r.value>"u"?a:{value:Cd(r.value[0],r.value[1]),children:a}};return e(t)}function iut(t,{configuration:e,stdout:r,json:o}){let a=t.map(n=>({value:n}));ipe({children:a},{configuration:e,stdout:r,json:o})}function ipe(t,{configuration:e,stdout:r,json:o,separators:a=0}){if(o){let u=Array.isArray(t.children)?t.children.values():Object.values(t.children??{});for(let A of u)A&&r.write(`${JSON.stringify(npe(A))} `);return}let n=(0,tpe.asTree)(rpe(t,{configuration:e}),!1,!1);if(n=n.replace(/\0[0-9]+\0/g,""),a>=1&&(n=n.replace(/^([├└]─)/gm,`\u2502 $1`).replace(/^│\n/,"")),a>=2)for(let u=0;u<2;++u)n=n.replace(/^([│ ].{2}[├│ ].{2}[^\n]+\n)(([│ ]).{2}[├└].{2}[^\n]*\n[│ ].{2}[│ ].{2}[├└]─)/gm,`$1$3 \u2502 $2`).replace(/^│\n/,"");if(a>=3)throw new Error("Only the first two levels are accepted by treeUtils.emitTree");r.write(n)}function sut(t){return typeof t=="string"?t.replace(/^\0[0-9]+\0/,""):t}var tpe,spe=Et(()=>{tpe=$e(epe());jl()});function i2(t){let e=t.match(out);if(!e?.groups)throw new Error("Assertion failed: Expected the checksum to match the requested pattern");let r=e.groups.cacheVersion?parseInt(e.groups.cacheVersion):null;return{cacheKey:e.groups.cacheKey??null,cacheVersion:r,cacheSpec:e.groups.cacheSpec??null,hash:e.groups.hash}}var ope,l_,c_,Kx,Nr,out,u_=Et(()=>{Ye();Pt();Pt();iA();ope=ve("crypto"),l_=$e(ve("fs"));Wl();ih();Gl();bo();c_=Vy(process.env.YARN_CACHE_CHECKPOINT_OVERRIDE??process.env.YARN_CACHE_VERSION_OVERRIDE??9),Kx=Vy(process.env.YARN_CACHE_VERSION_OVERRIDE??10),Nr=class{constructor(e,{configuration:r,immutable:o=r.get("enableImmutableCache"),check:a=!1}){this.markedFiles=new Set;this.mutexes=new Map;this.cacheId=`-${(0,ope.randomBytes)(8).toString("hex")}.tmp`;this.configuration=r,this.cwd=e,this.immutable=o,this.check=a;let{cacheSpec:n,cacheKey:u}=Nr.getCacheKey(r);this.cacheSpec=n,this.cacheKey=u}static async find(e,{immutable:r,check:o}={}){let a=new Nr(e.get("cacheFolder"),{configuration:e,immutable:r,check:o});return await a.setup(),a}static getCacheKey(e){let r=e.get("compressionLevel"),o=r!=="mixed"?`c${r}`:"";return{cacheKey:[Kx,o].join(""),cacheSpec:o}}get mirrorCwd(){if(!this.configuration.get("enableMirror"))return null;let e=`${this.configuration.get("globalFolder")}/cache`;return e!==this.cwd?e:null}getVersionFilename(e){return`${lE(e)}-${this.cacheKey}.zip`}getChecksumFilename(e,r){let a=i2(r).hash.slice(0,10);return`${lE(e)}-${a}.zip`}isChecksumCompatible(e){if(e===null)return!1;let{cacheVersion:r,cacheSpec:o}=i2(e);if(r===null||r{let he=new Ji,Be=z.join(Bt.root,nM(e));return he.mkdirSync(Be,{recursive:!0}),he.writeJsonSync(z.join(Be,dr.manifest),{name:fn(e),mocked:!0}),he},E=async(he,{isColdHit:Be,controlPath:we=null})=>{if(we===null&&u.unstablePackages?.has(e.locatorHash))return{isValid:!0,hash:null};let g=r&&!Be?i2(r).cacheKey:this.cacheKey,Ee=!u.skipIntegrityCheck||!r?`${g}/${await LS(he)}`:r;if(we!==null){let ce=!u.skipIntegrityCheck||!r?`${this.cacheKey}/${await LS(we)}`:r;if(Ee!==ce)throw new Jt(18,"The remote archive doesn't match the local checksum - has the local cache been corrupted?")}let Pe=null;switch(r!==null&&Ee!==r&&(this.check?Pe="throw":i2(r).cacheKey!==i2(Ee).cacheKey?Pe="update":Pe=this.configuration.get("checksumBehavior")),Pe){case null:case"update":return{isValid:!0,hash:Ee};case"ignore":return{isValid:!0,hash:r};case"reset":return{isValid:!1,hash:r};default:case"throw":throw new Jt(18,"The remote archive doesn't match the expected checksum")}},I=async he=>{if(!n)throw new Error(`Cache check required but no loader configured for ${qr(this.configuration,e)}`);let Be=await n(),we=Be.getRealPath();Be.saveAndClose(),await oe.chmodPromise(we,420);let g=await E(he,{controlPath:we,isColdHit:!1});if(!g.isValid)throw new Error("Assertion failed: Expected a valid checksum");return g.hash},v=async()=>{if(A===null||!await oe.existsPromise(A)){let he=await n(),Be=he.getRealPath();return he.saveAndClose(),{source:"loader",path:Be}}return{source:"mirror",path:A}},x=async()=>{if(!n)throw new Error(`Cache entry required but missing for ${qr(this.configuration,e)}`);if(this.immutable)throw new Jt(56,`Cache entry required but missing for ${qr(this.configuration,e)}`);let{path:he,source:Be}=await v(),{hash:we}=await E(he,{isColdHit:!0}),g=this.getLocatorPath(e,we),Ee=[];Be!=="mirror"&&A!==null&&Ee.push(async()=>{let ce=`${A}${this.cacheId}`;await oe.copyFilePromise(he,ce,l_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(ce,420),await oe.renamePromise(ce,A)}),(!u.mirrorWriteOnly||A===null)&&Ee.push(async()=>{let ce=`${g}${this.cacheId}`;await oe.copyFilePromise(he,ce,l_.default.constants.COPYFILE_FICLONE),await oe.chmodPromise(ce,420),await oe.renamePromise(ce,g)});let Pe=u.mirrorWriteOnly?A??g:g;return await Promise.all(Ee.map(ce=>ce())),[!1,Pe,we]},C=async()=>{let Be=(async()=>{let we=u.unstablePackages?.has(e.locatorHash),g=we||!r||this.isChecksumCompatible(r)?this.getLocatorPath(e,r):null,Ee=g!==null?this.markedFiles.has(g)||await p.existsPromise(g):!1,Pe=!!u.mockedPackages?.has(e.locatorHash)&&(!this.check||!Ee),ce=Pe||Ee,ne=ce?o:a;if(ne&&ne(),ce){let ee=null,Ie=g;if(!Pe)if(this.check)ee=await I(Ie);else{let Fe=await E(Ie,{isColdHit:!1});if(Fe.isValid)ee=Fe.hash;else return x()}return[Pe,Ie,ee]}else{if(this.immutable&&we)throw new Jt(56,`Cache entry required but missing for ${qr(this.configuration,e)}; consider defining ${de.pretty(this.configuration,"supportedArchitectures",de.Type.CODE)} to cache packages for multiple systems`);return x()}})();this.mutexes.set(e.locatorHash,Be);try{return await Be}finally{this.mutexes.delete(e.locatorHash)}};for(let he;he=this.mutexes.get(e.locatorHash);)await he;let[R,N,U]=await C();R||this.markedFiles.add(N);let V,te=R?()=>h():()=>new Ji(N,{baseFs:p,readOnly:!0}),ae=new iy(()=>CN(()=>V=te(),he=>`Failed to open the cache entry for ${qr(this.configuration,e)}: ${he}`),z),fe=new _u(N,{baseFs:ae,pathUtils:z}),ue=()=>{V?.discardAndClose()},me=u.unstablePackages?.has(e.locatorHash)?null:U;return[fe,ue,me]}},out=/^(?:(?(?[0-9]+)(?.*))\/)?(?.*)$/});var zx,ape=Et(()=>{zx=(r=>(r[r.SCRIPT=0]="SCRIPT",r[r.SHELLCODE=1]="SHELLCODE",r))(zx||{})});var aut,oC,A_=Et(()=>{Pt();Nl();Qf();bo();aut=[[/^(git(?:\+(?:https|ssh))?:\/\/.*(?:\.git)?)#(.*)$/,(t,e,r,o)=>`${r}#commit=${o}`],[/^https:\/\/((?:[^/]+?)@)?codeload\.github\.com\/([^/]+\/[^/]+)\/tar\.gz\/([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https:\/\/((?:[^/]+?)@)?github\.com\/([^/]+\/[^/]+?)(?:\.git)?#([0-9a-f]+)$/,(t,e,r="",o,a)=>`https://${r}github.com/${o}.git#commit=${a}`],[/^https?:\/\/[^/]+\/(?:[^/]+\/)*(?:@.+(?:\/|(?:%2f)))?([^/]+)\/(?:-|download)\/\1-[^/]+\.tgz(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.pkg\.github\.com\/download\/(?:@[^/]+)\/(?:[^/]+)\/(?:[^/]+)\/(?:[0-9a-f]+)(?:#|$)/,t=>`npm:${t}`],[/^https:\/\/npm\.fontawesome\.com\/(?:@[^/]+)\/([^/]+)\/-\/([^/]+)\/\1-\2.tgz(?:#|$)/,t=>`npm:${t}`],[/^https?:\/\/[^/]+\/.*\/(@[^/]+)\/([^/]+)\/-\/\1\/\2-(?:[.\d\w-]+)\.tgz(?:#|$)/,(t,e)=>_S({protocol:"npm:",source:null,selector:t,params:{__archiveUrl:e}})],[/^[^/]+\.tgz#[0-9a-f]+$/,t=>`npm:${t}`]],oC=class{constructor(e){this.resolver=e;this.resolutions=null}async setup(e,{report:r}){let o=z.join(e.cwd,dr.lockfile);if(!oe.existsSync(o))return;let a=await oe.readFilePromise(o,"utf8"),n=Ki(a);if(Object.hasOwn(n,"__metadata"))return;let u=this.resolutions=new Map;for(let A of Object.keys(n)){let p=s1(A);if(!p){r.reportWarning(14,`Failed to parse the string "${A}" into a proper descriptor`);continue}let h=xa(p.range)?In(p,`npm:${p.range}`):p,{version:E,resolved:I}=n[A];if(!I)continue;let v;for(let[C,R]of aut){let N=I.match(C);if(N){v=R(E,...N);break}}if(!v){r.reportWarning(14,`${Gn(e.configuration,h)}: Only some patterns can be imported from legacy lockfiles (not "${I}")`);continue}let x=h;try{let C=vd(h.range),R=s1(C.selector,!0);R&&(x=R)}catch{}u.set(h.descriptorHash,Qs(x,v))}}supportsDescriptor(e,r){return this.resolutions?this.resolutions.has(e.descriptorHash):!1}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!this.resolutions)throw new Error("Assertion failed: The resolution store should have been setup");let a=this.resolutions.get(e.descriptorHash);if(!a)throw new Error("Assertion failed: The resolution should have been registered");let n=$O(a),u=o.project.configuration.normalizeDependency(n);return await this.resolver.getCandidates(u,r,o)}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){throw new Error("Assertion failed: This resolver doesn't support resolving locators to packages")}}});var fA,lpe=Et(()=>{Wl();O1();jl();fA=class extends Xs{constructor({configuration:r,stdout:o,suggestInstall:a=!0}){super();this.errorCount=0;XI(this,{configuration:r}),this.configuration=r,this.stdout=o,this.suggestInstall=a}static async start(r,o){let a=new this(r);try{await o(a)}catch(n){a.reportExceptionOnce(n)}finally{await a.finalize()}return a}hasErrors(){return this.errorCount>0}exitCode(){return this.hasErrors()?1:0}reportCacheHit(r){}reportCacheMiss(r){}startSectionSync(r,o){return o()}async startSectionPromise(r,o){return await o()}startTimerSync(r,o,a){return(typeof o=="function"?o:a)()}async startTimerPromise(r,o,a){return await(typeof o=="function"?o:a)()}reportSeparator(){}reportInfo(r,o){}reportWarning(r,o){}reportError(r,o){this.errorCount+=1,this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} ${this.formatNameWithHyperlink(r)}: ${o} `)}reportProgress(r){return{...Promise.resolve().then(async()=>{for await(let{}of r);}),stop:()=>{}}}reportJson(r){}reportFold(r,o){}async finalize(){this.errorCount>0&&(this.stdout.write(` `),this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} Errors happened when preparing the environment required to run this command. `),this.suggestInstall&&this.stdout.write(`${Ut(this.configuration,"\u27A4","redBright")} This might be caused by packages being missing from the lockfile, in which case running "yarn install" might help. `))}formatNameWithHyperlink(r){return yU(r,{configuration:this.configuration,json:!1})}}});var aC,f_=Et(()=>{bo();aC=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return!!(r.project.storedResolutions.get(e.descriptorHash)||r.project.originalPackages.has(OS(e).locatorHash))}supportsLocator(e,r){return!!(r.project.originalPackages.has(e.locatorHash)&&!r.project.lockfileNeedsRefresh)}shouldPersistResolution(e,r){throw new Error("The shouldPersistResolution method shouldn't be called on the lockfile resolver, which would always answer yes")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,o){let a=o.project.storedResolutions.get(e.descriptorHash);if(a){let u=o.project.originalPackages.get(a);if(u)return[u]}let n=o.project.originalPackages.get(OS(e).locatorHash);if(n)return[n];throw new Error("Resolution expected from the lockfile data")}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let o=r.project.originalPackages.get(e.locatorHash);if(!o)throw new Error("The lockfile resolver isn't meant to resolve packages - they should already have been stored into a cache");return o}}});function Kf(){}function lut(t,e,r,o,a){for(var n=0,u=e.length,A=0,p=0;nx.length?R:x}),h.value=t.join(E)}else h.value=t.join(r.slice(A,A+h.count));A+=h.count,h.added||(p+=h.count)}}var v=e[u-1];return u>1&&typeof v.value=="string"&&(v.added||v.removed)&&t.equals("",v.value)&&(e[u-2].value+=v.value,e.pop()),e}function cut(t){return{newPos:t.newPos,components:t.components.slice(0)}}function uut(t,e){if(typeof t=="function")e.callback=t;else if(t)for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function Ape(t,e,r){return r=uut(r,{ignoreWhitespace:!0}),m_.diff(t,e,r)}function Aut(t,e,r){return y_.diff(t,e,r)}function Vx(t){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Vx=function(e){return typeof e}:Vx=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Vx(t)}function p_(t){return hut(t)||gut(t)||dut(t)||mut()}function hut(t){if(Array.isArray(t))return h_(t)}function gut(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function dut(t,e){if(!!t){if(typeof t=="string")return h_(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return h_(t,e)}}function h_(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,o=new Array(e);r"u"&&(u.context=4);var A=Aut(r,o,u);if(!A)return;A.push({value:"",lines:[]});function p(U){return U.map(function(V){return" "+V})}for(var h=[],E=0,I=0,v=[],x=1,C=1,R=function(V){var te=A[V],ae=te.lines||te.value.replace(/\n$/,"").split(` `);if(te.lines=ae,te.added||te.removed){var fe;if(!E){var ue=A[V-1];E=x,I=C,ue&&(v=u.context>0?p(ue.lines.slice(-u.context)):[],E-=v.length,I-=v.length)}(fe=v).push.apply(fe,p_(ae.map(function(ce){return(te.added?"+":"-")+ce}))),te.added?C+=ae.length:x+=ae.length}else{if(E)if(ae.length<=u.context*2&&V=A.length-2&&ae.length<=u.context){var g=/\n$/.test(r),Ee=/\n$/.test(o),Pe=ae.length==0&&v.length>we.oldLines;!g&&Pe&&r.length>0&&v.splice(we.oldLines,0,"\\ No newline at end of file"),(!g&&!Pe||!Ee)&&v.push("\\ No newline at end of file")}h.push(we),E=0,I=0,v=[]}x+=ae.length,C+=ae.length}},N=0;N{Kf.prototype={diff:function(e,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=o.callback;typeof o=="function"&&(a=o,o={}),this.options=o;var n=this;function u(R){return a?(setTimeout(function(){a(void 0,R)},0),!0):R}e=this.castInput(e),r=this.castInput(r),e=this.removeEmpty(this.tokenize(e)),r=this.removeEmpty(this.tokenize(r));var A=r.length,p=e.length,h=1,E=A+p;o.maxEditLength&&(E=Math.min(E,o.maxEditLength));var I=[{newPos:-1,components:[]}],v=this.extractCommon(I[0],r,e,0);if(I[0].newPos+1>=A&&v+1>=p)return u([{value:this.join(r),count:r.length}]);function x(){for(var R=-1*h;R<=h;R+=2){var N=void 0,U=I[R-1],V=I[R+1],te=(V?V.newPos:0)-R;U&&(I[R-1]=void 0);var ae=U&&U.newPos+1=A&&te+1>=p)return u(lut(n,N.components,r,e,n.useLongestToken));I[R]=N}h++}if(a)(function R(){setTimeout(function(){if(h>E)return a();x()||R()},0)})();else for(;h<=E;){var C=x();if(C)return C}},pushComponent:function(e,r,o){var a=e[e.length-1];a&&a.added===r&&a.removed===o?e[e.length-1]={count:a.count+1,added:r,removed:o}:e.push({count:1,added:r,removed:o})},extractCommon:function(e,r,o,a){for(var n=r.length,u=o.length,A=e.newPos,p=A-a,h=0;A+1"u"?r:u}:o;return typeof t=="string"?t:JSON.stringify(g_(t,null,null,a),a," ")};s2.equals=function(t,e){return Kf.prototype.equals.call(s2,t.replace(/,([\r\n])/g,"$1"),e.replace(/,([\r\n])/g,"$1"))};d_=new Kf;d_.tokenize=function(t){return t.slice()};d_.join=d_.removeEmpty=function(t){return t}});var hpe=_((o3t,ppe)=>{var Eut=ql(),Cut=pE(),wut=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Iut=/^\w*$/;function But(t,e){if(Eut(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||Cut(t)?!0:Iut.test(t)||!wut.test(t)||e!=null&&t in Object(e)}ppe.exports=But});var mpe=_((a3t,dpe)=>{var gpe=UP(),vut="Expected a function";function C_(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(vut);var r=function(){var o=arguments,a=e?e.apply(this,o):o[0],n=r.cache;if(n.has(a))return n.get(a);var u=t.apply(this,o);return r.cache=n.set(a,u)||n,u};return r.cache=new(C_.Cache||gpe),r}C_.Cache=gpe;dpe.exports=C_});var Epe=_((l3t,ype)=>{var Dut=mpe(),Put=500;function Sut(t){var e=Dut(t,function(o){return r.size===Put&&r.clear(),o}),r=e.cache;return e}ype.exports=Sut});var w_=_((c3t,Cpe)=>{var but=Epe(),xut=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,kut=/\\(\\)?/g,Qut=but(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(xut,function(r,o,a,n){e.push(a?n.replace(kut,"$1"):o||r)}),e});Cpe.exports=Qut});var jd=_((u3t,wpe)=>{var Fut=ql(),Rut=hpe(),Tut=w_(),Lut=L1();function Nut(t,e){return Fut(t)?t:Rut(t,e)?[t]:Tut(Lut(t))}wpe.exports=Nut});var lC=_((A3t,Ipe)=>{var Out=pE(),Mut=1/0;function Uut(t){if(typeof t=="string"||Out(t))return t;var e=t+"";return e=="0"&&1/t==-Mut?"-0":e}Ipe.exports=Uut});var Jx=_((f3t,Bpe)=>{var _ut=jd(),Hut=lC();function qut(t,e){e=_ut(e,t);for(var r=0,o=e.length;t!=null&&r{var Gut=tS(),jut=jd(),Yut=_I(),vpe=sl(),Wut=lC();function Kut(t,e,r,o){if(!vpe(t))return t;e=jut(e,t);for(var a=-1,n=e.length,u=n-1,A=t;A!=null&&++a{var zut=Jx(),Vut=I_(),Jut=jd();function Xut(t,e,r){for(var o=-1,a=e.length,n={};++o{function Zut(t,e){return t!=null&&e in Object(t)}bpe.exports=Zut});var B_=_((d3t,kpe)=>{var $ut=jd(),eAt=OI(),tAt=ql(),rAt=_I(),nAt=jP(),iAt=lC();function sAt(t,e,r){e=$ut(e,t);for(var o=-1,a=e.length,n=!1;++o{var oAt=xpe(),aAt=B_();function lAt(t,e){return t!=null&&aAt(t,e,oAt)}Qpe.exports=lAt});var Tpe=_((y3t,Rpe)=>{var cAt=Spe(),uAt=Fpe();function AAt(t,e){return cAt(t,e,function(r,o){return uAt(t,o)})}Rpe.exports=AAt});var Mpe=_((E3t,Ope)=>{var Lpe=hd(),fAt=OI(),pAt=ql(),Npe=Lpe?Lpe.isConcatSpreadable:void 0;function hAt(t){return pAt(t)||fAt(t)||!!(Npe&&t&&t[Npe])}Ope.exports=hAt});var Hpe=_((C3t,_pe)=>{var gAt=qP(),dAt=Mpe();function Upe(t,e,r,o,a){var n=-1,u=t.length;for(r||(r=dAt),a||(a=[]);++n0&&r(A)?e>1?Upe(A,e-1,r,o,a):gAt(a,A):o||(a[a.length]=A)}return a}_pe.exports=Upe});var Gpe=_((w3t,qpe)=>{var mAt=Hpe();function yAt(t){var e=t==null?0:t.length;return e?mAt(t,1):[]}qpe.exports=yAt});var v_=_((I3t,jpe)=>{var EAt=Gpe(),CAt=fN(),wAt=pN();function IAt(t){return wAt(CAt(t,void 0,EAt),t+"")}jpe.exports=IAt});var D_=_((B3t,Ype)=>{var BAt=Tpe(),vAt=v_(),DAt=vAt(function(t,e){return t==null?{}:BAt(t,e)});Ype.exports=DAt});var Xx,Wpe=Et(()=>{Wl();Xx=class{constructor(e){this.resolver=e}supportsDescriptor(e,r){return this.resolver.supportsDescriptor(e,r)}supportsLocator(e,r){return this.resolver.supportsLocator(e,r)}shouldPersistResolution(e,r){return this.resolver.shouldPersistResolution(e,r)}bindDescriptor(e,r,o){return this.resolver.bindDescriptor(e,r,o)}getResolutionDependencies(e,r){return this.resolver.getResolutionDependencies(e,r)}async getCandidates(e,r,o){throw new Jt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async getSatisfying(e,r,o,a){throw new Jt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}async resolve(e,r){throw new Jt(20,`This package doesn't seem to be present in your lockfile; run "yarn install" to update the lockfile`)}}});var Qi,P_=Et(()=>{Wl();Qi=class extends Xs{reportCacheHit(e){}reportCacheMiss(e){}startSectionSync(e,r){return r()}async startSectionPromise(e,r){return await r()}startTimerSync(e,r,o){return(typeof r=="function"?r:o)()}async startTimerPromise(e,r,o){return await(typeof r=="function"?r:o)()}reportSeparator(){}reportInfo(e,r){}reportWarning(e,r){}reportError(e,r){}reportProgress(e){return{...Promise.resolve().then(async()=>{for await(let{}of e);}),stop:()=>{}}}reportJson(e){}reportFold(e,r){}async finalize(){}}});var Kpe,cC,S_=Et(()=>{Pt();Kpe=$e(RS());fE();Dd();jl();ih();Qf();bo();cC=class{constructor(e,{project:r}){this.workspacesCwds=new Set;this.project=r,this.cwd=e}async setup(){this.manifest=await Ot.tryFind(this.cwd)??new Ot,this.relativeCwd=z.relative(this.project.cwd,this.cwd)||Bt.dot;let e=this.manifest.name?this.manifest.name:tA(null,`${this.computeCandidateName()}-${Js(this.relativeCwd).substring(0,6)}`);this.anchoredDescriptor=In(e,`${Xn.protocol}${this.relativeCwd}`),this.anchoredLocator=Qs(e,`${Xn.protocol}${this.relativeCwd}`);let r=this.manifest.workspaceDefinitions.map(({pattern:a})=>a);if(r.length===0)return;let o=await(0,Kpe.default)(r,{cwd:le.fromPortablePath(this.cwd),onlyDirectories:!0,ignore:["**/node_modules","**/.git","**/.yarn"]});o.sort(),await o.reduce(async(a,n)=>{let u=z.resolve(this.cwd,le.toPortablePath(n)),A=await oe.existsPromise(z.join(u,"package.json"));await a,A&&this.workspacesCwds.add(u)},Promise.resolve())}get anchoredPackage(){let e=this.project.storedPackages.get(this.anchoredLocator.locatorHash);if(!e)throw new Error(`Assertion failed: Expected workspace ${a1(this.project.configuration,this)} (${Ut(this.project.configuration,z.join(this.cwd,dr.manifest),yt.PATH)}) to have been resolved. Run "yarn install" to update the lockfile`);return e}accepts(e){let r=e.indexOf(":"),o=r!==-1?e.slice(0,r+1):null,a=r!==-1?e.slice(r+1):e;if(o===Xn.protocol&&z.normalize(a)===this.relativeCwd||o===Xn.protocol&&(a==="*"||a==="^"||a==="~"))return!0;let n=xa(a);return n?o===Xn.protocol?n.test(this.manifest.version??"0.0.0"):this.project.configuration.get("enableTransparentWorkspaces")&&this.manifest.version!==null?n.test(this.manifest.version):!1:!1}computeCandidateName(){return this.cwd===this.project.cwd?"root-workspace":`${z.basename(this.cwd)}`||"unnamed-workspace"}getRecursiveWorkspaceDependencies({dependencies:e=Ot.hardDependencies}={}){let r=new Set,o=a=>{for(let n of e)for(let u of a.manifest[n].values()){let A=this.project.tryWorkspaceByDescriptor(u);A===null||r.has(A)||(r.add(A),o(A))}};return o(this),r}getRecursiveWorkspaceDependents({dependencies:e=Ot.hardDependencies}={}){let r=new Set,o=a=>{for(let n of this.project.workspaces)e.some(A=>[...n.manifest[A].values()].some(p=>{let h=this.project.tryWorkspaceByDescriptor(p);return h!==null&&i1(h.anchoredLocator,a.anchoredLocator)}))&&!r.has(n)&&(r.add(n),o(n))};return o(this),r}getRecursiveWorkspaceChildren(){let e=new Set([this]);for(let r of e)for(let o of r.workspacesCwds){let a=this.project.workspacesByCwd.get(o);a&&e.add(a)}return e.delete(this),Array.from(e)}async persistManifest(){let e={};this.manifest.exportTo(e);let r=z.join(this.cwd,Ot.fileName),o=`${JSON.stringify(e,null,this.manifest.indent)} `;await oe.changeFilePromise(r,o,{automaticNewlines:!0}),this.manifest.raw=e}}});function QAt({project:t,allDescriptors:e,allResolutions:r,allPackages:o,accessibleLocators:a=new Set,optionalBuilds:n=new Set,peerRequirements:u=new Map,peerWarnings:A=[],volatileDescriptors:p=new Set}){let h=new Map,E=[],I=new Map,v=new Map,x=new Map,C=new Map,R=new Map,N=new Map(t.workspaces.map(ue=>{let me=ue.anchoredLocator.locatorHash,he=o.get(me);if(typeof he>"u")throw new Error("Assertion failed: The workspace should have an associated package");return[me,e1(he)]})),U=()=>{let ue=oe.mktempSync(),me=z.join(ue,"stacktrace.log"),he=String(E.length+1).length,Be=E.map((we,g)=>`${`${g+1}.`.padStart(he," ")} ${ba(we)} `).join("");throw oe.writeFileSync(me,Be),oe.detachTemp(ue),new Jt(45,`Encountered a stack overflow when resolving peer dependencies; cf ${le.fromPortablePath(me)}`)},V=ue=>{let me=r.get(ue.descriptorHash);if(typeof me>"u")throw new Error("Assertion failed: The resolution should have been registered");let he=o.get(me);if(!he)throw new Error("Assertion failed: The package could not be found");return he},te=(ue,me,he,{top:Be,optional:we})=>{E.length>1e3&&U(),E.push(me);let g=ae(ue,me,he,{top:Be,optional:we});return E.pop(),g},ae=(ue,me,he,{top:Be,optional:we})=>{if(we||n.delete(me.locatorHash),a.has(me.locatorHash))return;a.add(me.locatorHash);let g=o.get(me.locatorHash);if(!g)throw new Error(`Assertion failed: The package (${qr(t.configuration,me)}) should have been registered`);let Ee=[],Pe=[],ce=[],ne=[],ee=[];for(let Fe of Array.from(g.dependencies.values())){if(g.peerDependencies.has(Fe.identHash)&&g.locatorHash!==Be)continue;if(bf(Fe))throw new Error("Assertion failed: Virtual packages shouldn't be encountered when virtualizing a branch");p.delete(Fe.descriptorHash);let At=we;if(!At){let Te=g.dependenciesMeta.get(fn(Fe));if(typeof Te<"u"){let Ve=Te.get(null);typeof Ve<"u"&&Ve.optional&&(At=!0)}}let H=r.get(Fe.descriptorHash);if(!H)throw new Error(`Assertion failed: The resolution (${Gn(t.configuration,Fe)}) should have been registered`);let at=N.get(H)||o.get(H);if(!at)throw new Error(`Assertion failed: The package (${H}, resolved from ${Gn(t.configuration,Fe)}) should have been registered`);if(at.peerDependencies.size===0){te(Fe,at,new Map,{top:Be,optional:At});continue}let Re,ke,xe=new Set,He;Pe.push(()=>{Re=tM(Fe,me.locatorHash),ke=rM(at,me.locatorHash),g.dependencies.delete(Fe.identHash),g.dependencies.set(Re.identHash,Re),r.set(Re.descriptorHash,ke.locatorHash),e.set(Re.descriptorHash,Re),o.set(ke.locatorHash,ke),Ee.push([at,Re,ke])}),ce.push(()=>{He=new Map;for(let Te of ke.peerDependencies.values()){let Ve=g.dependencies.get(Te.identHash);if(!Ve&&n1(me,Te)&&(ue.identHash===me.identHash?Ve=ue:(Ve=In(me,ue.range),e.set(Ve.descriptorHash,Ve),r.set(Ve.descriptorHash,me.locatorHash),p.delete(Ve.descriptorHash))),(!Ve||Ve.range==="missing:")&&ke.dependencies.has(Te.identHash)){ke.peerDependencies.delete(Te.identHash);continue}Ve||(Ve=In(Te,"missing:")),ke.dependencies.set(Ve.identHash,Ve),bf(Ve)&&yd(x,Ve.descriptorHash).add(ke.locatorHash),I.set(Ve.identHash,Ve),Ve.range==="missing:"&&xe.add(Ve.identHash),He.set(Te.identHash,he.get(Te.identHash)??ke.locatorHash)}ke.dependencies=new Map(ks(ke.dependencies,([Te,Ve])=>fn(Ve)))}),ne.push(()=>{if(!o.has(ke.locatorHash))return;let Te=h.get(at.locatorHash);typeof Te=="number"&&Te>=2&&U();let Ve=h.get(at.locatorHash),qe=typeof Ve<"u"?Ve+1:1;h.set(at.locatorHash,qe),te(Re,ke,He,{top:Be,optional:At}),h.set(at.locatorHash,qe-1)}),ee.push(()=>{let Te=g.dependencies.get(Fe.identHash);if(typeof Te>"u")throw new Error("Assertion failed: Expected the peer dependency to have been turned into a dependency");let Ve=r.get(Te.descriptorHash);if(typeof Ve>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");if(yd(R,Ve).add(me.locatorHash),!!o.has(ke.locatorHash)){for(let qe of ke.peerDependencies.values()){let b=He.get(qe.identHash);if(typeof b>"u")throw new Error("Assertion failed: Expected the peer dependency ident to be registered");Yy(Wy(C,b),fn(qe)).push(ke.locatorHash)}for(let qe of xe)ke.dependencies.delete(qe)}})}for(let Fe of[...Pe,...ce])Fe();let Ie;do{Ie=!0;for(let[Fe,At,H]of Ee){let at=Wy(v,Fe.locatorHash),Re=Js(...[...H.dependencies.values()].map(Te=>{let Ve=Te.range!=="missing:"?r.get(Te.descriptorHash):"missing:";if(typeof Ve>"u")throw new Error(`Assertion failed: Expected the resolution for ${Gn(t.configuration,Te)} to have been registered`);return Ve===Be?`${Ve} (top)`:Ve}),At.identHash),ke=at.get(Re);if(typeof ke>"u"){at.set(Re,At);continue}if(ke===At)continue;o.delete(H.locatorHash),e.delete(At.descriptorHash),r.delete(At.descriptorHash),a.delete(H.locatorHash);let xe=x.get(At.descriptorHash)||[],He=[g.locatorHash,...xe];x.delete(At.descriptorHash);for(let Te of He){let Ve=o.get(Te);typeof Ve>"u"||(Ve.dependencies.get(At.identHash).descriptorHash!==ke.descriptorHash&&(Ie=!1),Ve.dependencies.set(At.identHash,ke))}}}while(!Ie);for(let Fe of[...ne,...ee])Fe()};for(let ue of t.workspaces){let me=ue.anchoredLocator;p.delete(ue.anchoredDescriptor.descriptorHash),te(ue.anchoredDescriptor,me,new Map,{top:me.locatorHash,optional:!1})}let fe=new Map;for(let[ue,me]of R){let he=o.get(ue);if(typeof he>"u")throw new Error("Assertion failed: Expected the root to be registered");let Be=C.get(ue);if(!(typeof Be>"u"))for(let we of me){let g=o.get(we);if(!(typeof g>"u")&&!!t.tryWorkspaceByLocator(g))for(let[Ee,Pe]of Be){let ce=Vs(Ee);if(g.peerDependencies.has(ce.identHash))continue;let ne=`p${Js(we,Ee,ue).slice(0,5)}`;u.set(ne,{subject:we,requested:ce,rootRequester:ue,allRequesters:Pe});let ee=he.dependencies.get(ce.identHash);if(typeof ee<"u"){let Ie=V(ee),Fe=Ie.version??"0.0.0",At=new Set;for(let at of Pe){let Re=o.get(at);if(typeof Re>"u")throw new Error("Assertion failed: Expected the link to be registered");let ke=Re.peerDependencies.get(ce.identHash);if(typeof ke>"u")throw new Error("Assertion failed: Expected the ident to be registered");At.add(ke.range)}if(![...At].every(at=>{if(at.startsWith(Xn.protocol)){if(!t.tryWorkspaceByLocator(Ie))return!1;at=at.slice(Xn.protocol.length),(at==="^"||at==="~")&&(at="*")}return kf(Fe,at)})){let at=al(fe,Ie.locatorHash,()=>({type:2,requested:ce,subject:Ie,dependents:new Map,requesters:new Map,links:new Map,version:Fe,hash:`p${Ie.locatorHash.slice(0,5)}`}));at.dependents.set(g.locatorHash,g),at.requesters.set(he.locatorHash,he);for(let Re of Pe)at.links.set(Re,o.get(Re));A.push({type:1,subject:g,requested:ce,requester:he,version:Fe,hash:ne,requirementCount:Pe.length})}}else he.peerDependenciesMeta.get(Ee)?.optional||A.push({type:0,subject:g,requested:ce,requester:he,hash:ne})}}}A.push(...fe.values())}function FAt(t,e){let r=IN(t.peerWarnings,"type"),o=r[2]?.map(n=>{let u=Array.from(n.links.values(),E=>{let I=t.storedPackages.get(E.locatorHash);if(typeof I>"u")throw new Error("Assertion failed: Expected the package to be registered");let v=I.peerDependencies.get(n.requested.identHash);if(typeof v>"u")throw new Error("Assertion failed: Expected the ident to be registered");return v.range}),A=n.links.size>1?"and other dependencies request":"requests",p=sM(u),h=p?cE(t.configuration,p):Ut(t.configuration,"but they have non-overlapping ranges!","redBright");return`${cs(t.configuration,n.requested)} is listed by your project with version ${o1(t.configuration,n.version)}, which doesn't satisfy what ${cs(t.configuration,n.requesters.values().next().value)} (${Ut(t.configuration,n.hash,yt.CODE)}) ${A} (${h}).`})??[],a=r[0]?.map(n=>`${qr(t.configuration,n.subject)} doesn't provide ${cs(t.configuration,n.requested)} (${Ut(t.configuration,n.hash,yt.CODE)}), requested by ${cs(t.configuration,n.requester)}.`)??[];e.startSectionSync({reportFooter:()=>{e.reportWarning(86,`Some peer dependencies are incorrectly met; run ${Ut(t.configuration,"yarn explain peer-requirements ",yt.CODE)} for details, where ${Ut(t.configuration,"",yt.CODE)} is the six-letter p-prefixed code.`)},skipIfEmpty:!0},()=>{for(let n of ks(o,u=>Xy.default(u)))e.reportWarning(60,n);for(let n of ks(a,u=>Xy.default(u)))e.reportWarning(2,n)})}var Zx,$x,ek,Jpe,k_,x_,Q_,tk,PAt,SAt,zpe,bAt,xAt,kAt,hl,b_,rk,Vpe,St,Xpe=Et(()=>{Pt();Pt();Nl();qt();Zx=ve("crypto");E_();$x=$e(D_()),ek=$e(sd()),Jpe=$e(Jn()),k_=ve("util"),x_=$e(ve("v8")),Q_=$e(ve("zlib"));u_();P1();A_();f_();fE();uM();Wl();Wpe();O1();P_();Dd();S_();WS();jl();ih();Gl();vb();BU();Qf();bo();tk=Vy(process.env.YARN_LOCKFILE_VERSION_OVERRIDE??8),PAt=3,SAt=/ *, */g,zpe=/\/$/,bAt=32,xAt=(0,k_.promisify)(Q_.default.gzip),kAt=(0,k_.promisify)(Q_.default.gunzip),hl=(r=>(r.UpdateLockfile="update-lockfile",r.SkipBuild="skip-build",r))(hl||{}),b_={restoreLinkersCustomData:["linkersCustomData"],restoreResolutions:["accessibleLocators","conditionalLocators","disabledLocators","optionalBuilds","storedDescriptors","storedResolutions","storedPackages","lockFileChecksum"],restoreBuildState:["skippedBuilds","storedBuildState"]},rk=(o=>(o[o.NotProvided=0]="NotProvided",o[o.NotCompatible=1]="NotCompatible",o[o.NotCompatibleAggregate=2]="NotCompatibleAggregate",o))(rk||{}),Vpe=t=>Js(`${PAt}`,t),St=class{constructor(e,{configuration:r}){this.resolutionAliases=new Map;this.workspaces=[];this.workspacesByCwd=new Map;this.workspacesByIdent=new Map;this.storedResolutions=new Map;this.storedDescriptors=new Map;this.storedPackages=new Map;this.storedChecksums=new Map;this.storedBuildState=new Map;this.accessibleLocators=new Set;this.conditionalLocators=new Set;this.disabledLocators=new Set;this.originalPackages=new Map;this.optionalBuilds=new Set;this.skippedBuilds=new Set;this.lockfileLastVersion=null;this.lockfileNeedsRefresh=!1;this.peerRequirements=new Map;this.peerWarnings=[];this.linkersCustomData=new Map;this.lockFileChecksum=null;this.installStateChecksum=null;this.configuration=r,this.cwd=e}static async find(e,r){if(!e.projectCwd)throw new it(`No project found in ${r}`);let o=e.projectCwd,a=r,n=null;for(;n!==e.projectCwd;){if(n=a,oe.existsSync(z.join(n,dr.manifest))){o=n;break}a=z.dirname(n)}let u=new St(e.projectCwd,{configuration:e});Ke.telemetry?.reportProject(u.cwd),await u.setupResolutions(),await u.setupWorkspaces(),Ke.telemetry?.reportWorkspaceCount(u.workspaces.length),Ke.telemetry?.reportDependencyCount(u.workspaces.reduce((C,R)=>C+R.manifest.dependencies.size+R.manifest.devDependencies.size,0));let A=u.tryWorkspaceByCwd(o);if(A)return{project:u,workspace:A,locator:A.anchoredLocator};let p=await u.findLocatorForLocation(`${o}/`,{strict:!0});if(p)return{project:u,locator:p,workspace:null};let h=Ut(e,u.cwd,yt.PATH),E=Ut(e,z.relative(u.cwd,o),yt.PATH),I=`- If ${h} isn't intended to be a project, remove any yarn.lock and/or package.json file there.`,v=`- If ${h} is intended to be a project, it might be that you forgot to list ${E} in its workspace configuration.`,x=`- Finally, if ${h} is fine and you intend ${E} to be treated as a completely separate project (not even a workspace), create an empty yarn.lock file in it.`;throw new it(`The nearest package directory (${Ut(e,o,yt.PATH)}) doesn't seem to be part of the project declared in ${Ut(e,u.cwd,yt.PATH)}. ${[I,v,x].join(` `)}`)}async setupResolutions(){this.storedResolutions=new Map,this.storedDescriptors=new Map,this.storedPackages=new Map,this.lockFileChecksum=null;let e=z.join(this.cwd,dr.lockfile),r=this.configuration.get("defaultLanguageName");if(oe.existsSync(e)){let o=await oe.readFilePromise(e,"utf8");this.lockFileChecksum=Vpe(o);let a=Ki(o);if(a.__metadata){let n=a.__metadata.version,u=a.__metadata.cacheKey;this.lockfileLastVersion=n,this.lockfileNeedsRefresh=n"u")throw new Error(`Assertion failed: Expected the lockfile entry to have a resolution field (${A})`);let h=xf(p.resolution,!0),E=new Ot;E.load(p,{yamlCompatibilityMode:!0});let I=E.version,v=E.languageName||r,x=p.linkType.toUpperCase(),C=p.conditions??null,R=E.dependencies,N=E.peerDependencies,U=E.dependenciesMeta,V=E.peerDependenciesMeta,te=E.bin;if(p.checksum!=null){let fe=typeof u<"u"&&!p.checksum.includes("/")?`${u}/${p.checksum}`:p.checksum;this.storedChecksums.set(h.locatorHash,fe)}let ae={...h,version:I,languageName:v,linkType:x,conditions:C,dependencies:R,peerDependencies:N,dependenciesMeta:U,peerDependenciesMeta:V,bin:te};this.originalPackages.set(ae.locatorHash,ae);for(let fe of A.split(SAt)){let ue=sh(fe);n<=6&&(ue=this.configuration.normalizeDependency(ue),ue=In(ue,ue.range.replace(/^patch:[^@]+@(?!npm(:|%3A))/,"$1npm%3A"))),this.storedDescriptors.set(ue.descriptorHash,ue),this.storedResolutions.set(ue.descriptorHash,h.locatorHash)}}}else o.includes("yarn lockfile v1")&&(this.lockfileLastVersion=-1)}}async setupWorkspaces(){this.workspaces=[],this.workspacesByCwd=new Map,this.workspacesByIdent=new Map;let e=new Set,r=(0,ek.default)(4),o=async(a,n)=>{if(e.has(n))return a;e.add(n);let u=new cC(n,{project:this});await r(()=>u.setup());let A=a.then(()=>{this.addWorkspace(u)});return Array.from(u.workspacesCwds).reduce(o,A)};await o(Promise.resolve(),this.cwd)}addWorkspace(e){let r=this.workspacesByIdent.get(e.anchoredLocator.identHash);if(typeof r<"u")throw new Error(`Duplicate workspace name ${cs(this.configuration,e.anchoredLocator)}: ${le.fromPortablePath(e.cwd)} conflicts with ${le.fromPortablePath(r.cwd)}`);this.workspaces.push(e),this.workspacesByCwd.set(e.cwd,e),this.workspacesByIdent.set(e.anchoredLocator.identHash,e)}get topLevelWorkspace(){return this.getWorkspaceByCwd(this.cwd)}tryWorkspaceByCwd(e){z.isAbsolute(e)||(e=z.resolve(this.cwd,e)),e=z.normalize(e).replace(/\/+$/,"");let r=this.workspacesByCwd.get(e);return r||null}getWorkspaceByCwd(e){let r=this.tryWorkspaceByCwd(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByFilePath(e){let r=null;for(let o of this.workspaces)z.relative(o.cwd,e).startsWith("../")||r&&r.cwd.length>=o.cwd.length||(r=o);return r||null}getWorkspaceByFilePath(e){let r=this.tryWorkspaceByFilePath(e);if(!r)throw new Error(`Workspace not found (${e})`);return r}tryWorkspaceByIdent(e){let r=this.workspacesByIdent.get(e.identHash);return typeof r>"u"?null:r}getWorkspaceByIdent(e){let r=this.tryWorkspaceByIdent(e);if(!r)throw new Error(`Workspace not found (${cs(this.configuration,e)})`);return r}tryWorkspaceByDescriptor(e){if(e.range.startsWith(Xn.protocol)){let o=e.range.slice(Xn.protocol.length);if(o!=="^"&&o!=="~"&&o!=="*"&&!xa(o))return this.tryWorkspaceByCwd(o)}let r=this.tryWorkspaceByIdent(e);return r===null||(bf(e)&&(e=t1(e)),!r.accepts(e.range))?null:r}getWorkspaceByDescriptor(e){let r=this.tryWorkspaceByDescriptor(e);if(r===null)throw new Error(`Workspace not found (${Gn(this.configuration,e)})`);return r}tryWorkspaceByLocator(e){let r=this.tryWorkspaceByIdent(e);return r===null||(qc(e)&&(e=r1(e)),r.anchoredLocator.locatorHash!==e.locatorHash)?null:r}getWorkspaceByLocator(e){let r=this.tryWorkspaceByLocator(e);if(!r)throw new Error(`Workspace not found (${qr(this.configuration,e)})`);return r}deleteDescriptor(e){this.storedResolutions.delete(e),this.storedDescriptors.delete(e)}deleteLocator(e){this.originalPackages.delete(e),this.storedPackages.delete(e),this.accessibleLocators.delete(e)}forgetResolution(e){if("descriptorHash"in e){let r=this.storedResolutions.get(e.descriptorHash);this.deleteDescriptor(e.descriptorHash);let o=new Set(this.storedResolutions.values());typeof r<"u"&&!o.has(r)&&this.deleteLocator(r)}if("locatorHash"in e){this.deleteLocator(e.locatorHash);for(let[r,o]of this.storedResolutions)o===e.locatorHash&&this.deleteDescriptor(r)}}forgetTransientResolutions(){let e=this.configuration.makeResolver(),r=new Map;for(let[o,a]of this.storedResolutions.entries()){let n=r.get(a);n||r.set(a,n=new Set),n.add(o)}for(let o of this.originalPackages.values()){let a;try{a=e.shouldPersistResolution(o,{project:this,resolver:e})}catch{a=!1}if(!a){this.deleteLocator(o.locatorHash);let n=r.get(o.locatorHash);if(n){r.delete(o.locatorHash);for(let u of n)this.deleteDescriptor(u)}}}}forgetVirtualResolutions(){for(let e of this.storedPackages.values())for(let[r,o]of e.dependencies)bf(o)&&e.dependencies.set(r,t1(o))}getDependencyMeta(e,r){let o={},n=this.topLevelWorkspace.manifest.dependenciesMeta.get(fn(e));if(!n)return o;let u=n.get(null);if(u&&Object.assign(o,u),r===null||!Jpe.default.valid(r))return o;for(let[A,p]of n)A!==null&&A===r&&Object.assign(o,p);return o}async findLocatorForLocation(e,{strict:r=!1}={}){let o=new Qi,a=this.configuration.getLinkers(),n={project:this,report:o};for(let u of a){let A=await u.findPackageLocator(e,n);if(A){if(r&&(await u.findPackageLocation(A,n)).replace(zpe,"")!==e.replace(zpe,""))continue;return A}}return null}async loadUserConfig(){let e=z.join(this.cwd,".pnp.cjs");await oe.existsPromise(e)&&Df(e).setup();let r=z.join(this.cwd,"yarn.config.cjs");return await oe.existsPromise(r)?Df(r):null}async preparePackage(e,{resolver:r,resolveOptions:o}){let a=await this.configuration.getPackageExtensions(),n=this.configuration.normalizePackage(e,{packageExtensions:a});for(let[u,A]of n.dependencies){let p=await this.configuration.reduceHook(E=>E.reduceDependency,A,this,n,A,{resolver:r,resolveOptions:o});if(!n1(A,p))throw new Error("Assertion failed: The descriptor ident cannot be changed through aliases");let h=r.bindDescriptor(p,n,o);n.dependencies.set(u,h)}return n}async resolveEverything(e){if(!this.workspacesByCwd||!this.workspacesByIdent)throw new Error("Workspaces must have been setup before calling this function");this.forgetVirtualResolutions();let r=new Map(this.originalPackages),o=[];e.lockfileOnly||this.forgetTransientResolutions();let a=e.resolver||this.configuration.makeResolver(),n=new oC(a);await n.setup(this,{report:e.report});let u=e.lockfileOnly?[new Xx(a)]:[n,a],A=new Pd([new aC(a),...u]),p=new Pd([...u]),h=this.configuration.makeFetcher(),E=e.lockfileOnly?{project:this,report:e.report,resolver:A}:{project:this,report:e.report,resolver:A,fetchOptions:{project:this,cache:e.cache,checksums:this.storedChecksums,report:e.report,fetcher:h,cacheOptions:{mirrorWriteOnly:!0}}},I=new Map,v=new Map,x=new Map,C=new Map,R=new Map,N=new Map,U=this.topLevelWorkspace.anchoredLocator,V=new Set,te=[],ae=M4(),fe=this.configuration.getSupportedArchitectures();await e.report.startProgressPromise(Xs.progressViaTitle(),async ce=>{let ne=async H=>{let at=await Ky(async()=>await A.resolve(H,E),He=>`${qr(this.configuration,H)}: ${He}`);if(!i1(H,at))throw new Error(`Assertion failed: The locator cannot be changed by the resolver (went from ${qr(this.configuration,H)} to ${qr(this.configuration,at)})`);C.set(at.locatorHash,at),!r.delete(at.locatorHash)&&!this.tryWorkspaceByLocator(at)&&o.push(at);let ke=await this.preparePackage(at,{resolver:A,resolveOptions:E}),xe=_c([...ke.dependencies.values()].map(He=>At(He)));return te.push(xe),xe.catch(()=>{}),v.set(ke.locatorHash,ke),ke},ee=async H=>{let at=R.get(H.locatorHash);if(typeof at<"u")return at;let Re=Promise.resolve().then(()=>ne(H));return R.set(H.locatorHash,Re),Re},Ie=async(H,at)=>{let Re=await At(at);return I.set(H.descriptorHash,H),x.set(H.descriptorHash,Re.locatorHash),Re},Fe=async H=>{ce.setTitle(Gn(this.configuration,H));let at=this.resolutionAliases.get(H.descriptorHash);if(typeof at<"u")return Ie(H,this.storedDescriptors.get(at));let Re=A.getResolutionDependencies(H,E),ke=Object.fromEntries(await _c(Object.entries(Re).map(async([Te,Ve])=>{let qe=A.bindDescriptor(Ve,U,E),b=await At(qe);return V.add(b.locatorHash),[Te,b]}))),He=(await Ky(async()=>await A.getCandidates(H,ke,E),Te=>`${Gn(this.configuration,H)}: ${Te}`))[0];if(typeof He>"u")throw new Jt(82,`${Gn(this.configuration,H)}: No candidates found`);if(e.checkResolutions){let{locators:Te}=await p.getSatisfying(H,ke,[He],{...E,resolver:p});if(!Te.find(Ve=>Ve.locatorHash===He.locatorHash))throw new Jt(78,`Invalid resolution ${ZI(this.configuration,H,He)}`)}return I.set(H.descriptorHash,H),x.set(H.descriptorHash,He.locatorHash),ee(He)},At=H=>{let at=N.get(H.descriptorHash);if(typeof at<"u")return at;I.set(H.descriptorHash,H);let Re=Promise.resolve().then(()=>Fe(H));return N.set(H.descriptorHash,Re),Re};for(let H of this.workspaces){let at=H.anchoredDescriptor;te.push(At(at))}for(;te.length>0;){let H=[...te];te.length=0,await _c(H)}});let ue=ol(r.values(),ce=>this.tryWorkspaceByLocator(ce)?ol.skip:ce);if(o.length>0||ue.length>0){let ce=new Set(this.workspaces.flatMap(H=>{let at=v.get(H.anchoredLocator.locatorHash);if(!at)throw new Error("Assertion failed: The workspace should have been resolved");return Array.from(at.dependencies.values(),Re=>{let ke=x.get(Re.descriptorHash);if(!ke)throw new Error("Assertion failed: The resolution should have been registered");return ke})})),ne=H=>ce.has(H.locatorHash)?"0":"1",ee=H=>ba(H),Ie=ks(o,[ne,ee]),Fe=ks(ue,[ne,ee]),At=e.report.getRecommendedLength();Ie.length>0&&e.report.reportInfo(85,`${Ut(this.configuration,"+",yt.ADDED)} ${lS(this.configuration,Ie,At)}`),Fe.length>0&&e.report.reportInfo(85,`${Ut(this.configuration,"-",yt.REMOVED)} ${lS(this.configuration,Fe,At)}`)}let me=new Set(this.resolutionAliases.values()),he=new Set(v.keys()),Be=new Set,we=new Map,g=[];QAt({project:this,accessibleLocators:Be,volatileDescriptors:me,optionalBuilds:he,peerRequirements:we,peerWarnings:g,allDescriptors:I,allResolutions:x,allPackages:v});for(let ce of V)he.delete(ce);for(let ce of me)I.delete(ce),x.delete(ce);let Ee=new Set,Pe=new Set;for(let ce of v.values())ce.conditions!=null&&(!he.has(ce.locatorHash)||(qS(ce,fe)||(qS(ce,ae)&&e.report.reportWarningOnce(77,`${qr(this.configuration,ce)}: Your current architecture (${process.platform}-${process.arch}) is supported by this package, but is missing from the ${Ut(this.configuration,"supportedArchitectures",yt.SETTING)} setting`),Pe.add(ce.locatorHash)),Ee.add(ce.locatorHash)));this.storedResolutions=x,this.storedDescriptors=I,this.storedPackages=v,this.accessibleLocators=Be,this.conditionalLocators=Ee,this.disabledLocators=Pe,this.originalPackages=C,this.optionalBuilds=he,this.peerRequirements=we,this.peerWarnings=g}async fetchEverything({cache:e,report:r,fetcher:o,mode:a,persistProject:n=!0}){let u={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators},A=o||this.configuration.makeFetcher(),p={checksums:this.storedChecksums,project:this,cache:e,fetcher:A,report:r,cacheOptions:u},h=Array.from(new Set(ks(this.storedResolutions.values(),[C=>{let R=this.storedPackages.get(C);if(!R)throw new Error("Assertion failed: The locator should have been registered");return ba(R)}])));a==="update-lockfile"&&(h=h.filter(C=>!this.storedChecksums.has(C)));let E=!1,I=Xs.progressViaCounter(h.length);await r.reportProgress(I);let v=(0,ek.default)(bAt);if(await _c(h.map(C=>v(async()=>{let R=this.storedPackages.get(C);if(!R)throw new Error("Assertion failed: The locator should have been registered");if(qc(R))return;let N;try{N=await A.fetch(R,p)}catch(U){U.message=`${qr(this.configuration,R)}: ${U.message}`,r.reportExceptionOnce(U),E=U;return}N.checksum!=null?this.storedChecksums.set(R.locatorHash,N.checksum):this.storedChecksums.delete(R.locatorHash),N.releaseFs&&N.releaseFs()}).finally(()=>{I.tick()}))),E)throw E;let x=n&&a!=="update-lockfile"?await this.cacheCleanup({cache:e,report:r}):null;if(r.cacheMisses.size>0||x){let R=(await Promise.all([...r.cacheMisses].map(async ue=>{let me=this.storedPackages.get(ue),he=this.storedChecksums.get(ue)??null,Be=e.getLocatorPath(me,he);return(await oe.statPromise(Be)).size}))).reduce((ue,me)=>ue+me,0)-(x?.size??0),N=r.cacheMisses.size,U=x?.count??0,V=`${rS(N,{zero:"No new packages",one:"A package was",more:`${Ut(this.configuration,N,yt.NUMBER)} packages were`})} added to the project`,te=`${rS(U,{zero:"none were",one:"one was",more:`${Ut(this.configuration,U,yt.NUMBER)} were`})} removed`,ae=R!==0?` (${Ut(this.configuration,R,yt.SIZE_DIFF)})`:"",fe=U>0?N>0?`${V}, and ${te}${ae}.`:`${V}, but ${te}${ae}.`:`${V}${ae}.`;r.reportInfo(13,fe)}}async linkEverything({cache:e,report:r,fetcher:o,mode:a}){let n={mockedPackages:this.disabledLocators,unstablePackages:this.conditionalLocators,skipIntegrityCheck:!0},u=o||this.configuration.makeFetcher(),A={checksums:this.storedChecksums,project:this,cache:e,fetcher:u,report:r,cacheOptions:n},p=this.configuration.getLinkers(),h={project:this,report:r},E=new Map(p.map(ce=>{let ne=ce.makeInstaller(h),ee=ce.getCustomDataKey(),Ie=this.linkersCustomData.get(ee);return typeof Ie<"u"&&ne.attachCustomData(Ie),[ce,ne]})),I=new Map,v=new Map,x=new Map,C=new Map(await _c([...this.accessibleLocators].map(async ce=>{let ne=this.storedPackages.get(ce);if(!ne)throw new Error("Assertion failed: The locator should have been registered");return[ce,await u.fetch(ne,A)]}))),R=[],N=new Set,U=[];for(let ce of this.accessibleLocators){let ne=this.storedPackages.get(ce);if(typeof ne>"u")throw new Error("Assertion failed: The locator should have been registered");let ee=C.get(ne.locatorHash);if(typeof ee>"u")throw new Error("Assertion failed: The fetch result should have been registered");let Ie=[],Fe=H=>{Ie.push(H)},At=this.tryWorkspaceByLocator(ne);if(At!==null){let H=[],{scripts:at}=At.manifest;for(let ke of["preinstall","install","postinstall"])at.has(ke)&&H.push({type:0,script:ke});try{for(let[ke,xe]of E)if(ke.supportsPackage(ne,h)&&(await xe.installPackage(ne,ee,{holdFetchResult:Fe})).buildRequest!==null)throw new Error("Assertion failed: Linkers can't return build directives for workspaces; this responsibility befalls to the Yarn core")}finally{Ie.length===0?ee.releaseFs?.():R.push(_c(Ie).catch(()=>{}).then(()=>{ee.releaseFs?.()}))}let Re=z.join(ee.packageFs.getRealPath(),ee.prefixPath);v.set(ne.locatorHash,Re),!qc(ne)&&H.length>0&&x.set(ne.locatorHash,{buildDirectives:H,buildLocations:[Re]})}else{let H=p.find(ke=>ke.supportsPackage(ne,h));if(!H)throw new Jt(12,`${qr(this.configuration,ne)} isn't supported by any available linker`);let at=E.get(H);if(!at)throw new Error("Assertion failed: The installer should have been registered");let Re;try{Re=await at.installPackage(ne,ee,{holdFetchResult:Fe})}finally{Ie.length===0?ee.releaseFs?.():R.push(_c(Ie).then(()=>{}).then(()=>{ee.releaseFs?.()}))}I.set(ne.locatorHash,H),v.set(ne.locatorHash,Re.packageLocation),Re.buildRequest&&Re.packageLocation&&(Re.buildRequest.skipped?(N.add(ne.locatorHash),this.skippedBuilds.has(ne.locatorHash)||U.push([ne,Re.buildRequest.explain])):x.set(ne.locatorHash,{buildDirectives:Re.buildRequest.directives,buildLocations:[Re.packageLocation]}))}}let V=new Map;for(let ce of this.accessibleLocators){let ne=this.storedPackages.get(ce);if(!ne)throw new Error("Assertion failed: The locator should have been registered");let ee=this.tryWorkspaceByLocator(ne)!==null,Ie=async(Fe,At)=>{let H=v.get(ne.locatorHash);if(typeof H>"u")throw new Error(`Assertion failed: The package (${qr(this.configuration,ne)}) should have been registered`);let at=[];for(let Re of ne.dependencies.values()){let ke=this.storedResolutions.get(Re.descriptorHash);if(typeof ke>"u")throw new Error(`Assertion failed: The resolution (${Gn(this.configuration,Re)}, from ${qr(this.configuration,ne)})should have been registered`);let xe=this.storedPackages.get(ke);if(typeof xe>"u")throw new Error(`Assertion failed: The package (${ke}, resolved from ${Gn(this.configuration,Re)}) should have been registered`);let He=this.tryWorkspaceByLocator(xe)===null?I.get(ke):null;if(typeof He>"u")throw new Error(`Assertion failed: The package (${ke}, resolved from ${Gn(this.configuration,Re)}) should have been registered`);He===Fe||He===null?v.get(xe.locatorHash)!==null&&at.push([Re,xe]):!ee&&H!==null&&Yy(V,ke).push(H)}H!==null&&await At.attachInternalDependencies(ne,at)};if(ee)for(let[Fe,At]of E)Fe.supportsPackage(ne,h)&&await Ie(Fe,At);else{let Fe=I.get(ne.locatorHash);if(!Fe)throw new Error("Assertion failed: The linker should have been found");let At=E.get(Fe);if(!At)throw new Error("Assertion failed: The installer should have been registered");await Ie(Fe,At)}}for(let[ce,ne]of V){let ee=this.storedPackages.get(ce);if(!ee)throw new Error("Assertion failed: The package should have been registered");let Ie=I.get(ee.locatorHash);if(!Ie)throw new Error("Assertion failed: The linker should have been found");let Fe=E.get(Ie);if(!Fe)throw new Error("Assertion failed: The installer should have been registered");await Fe.attachExternalDependents(ee,ne)}let te=new Map;for(let[ce,ne]of E){let ee=await ne.finalizeInstall();for(let Ie of ee?.records??[])Ie.buildRequest.skipped?(N.add(Ie.locator.locatorHash),this.skippedBuilds.has(Ie.locator.locatorHash)||U.push([Ie.locator,Ie.buildRequest.explain])):x.set(Ie.locator.locatorHash,{buildDirectives:Ie.buildRequest.directives,buildLocations:Ie.buildLocations});typeof ee?.customData<"u"&&te.set(ce.getCustomDataKey(),ee.customData)}if(this.linkersCustomData=te,await _c(R),a==="skip-build")return;for(let[,ce]of ks(U,([ne])=>ba(ne)))ce(r);let ae=new Set(this.storedPackages.keys()),fe=new Set(x.keys());for(let ce of fe)ae.delete(ce);let ue=(0,Zx.createHash)("sha512");ue.update(process.versions.node),await this.configuration.triggerHook(ce=>ce.globalHashGeneration,this,ce=>{ue.update("\0"),ue.update(ce)});let me=ue.digest("hex"),he=new Map,Be=ce=>{let ne=he.get(ce.locatorHash);if(typeof ne<"u")return ne;let ee=this.storedPackages.get(ce.locatorHash);if(typeof ee>"u")throw new Error("Assertion failed: The package should have been registered");let Ie=(0,Zx.createHash)("sha512");Ie.update(ce.locatorHash),he.set(ce.locatorHash,"");for(let Fe of ee.dependencies.values()){let At=this.storedResolutions.get(Fe.descriptorHash);if(typeof At>"u")throw new Error(`Assertion failed: The resolution (${Gn(this.configuration,Fe)}) should have been registered`);let H=this.storedPackages.get(At);if(typeof H>"u")throw new Error("Assertion failed: The package should have been registered");Ie.update(Be(H))}return ne=Ie.digest("hex"),he.set(ce.locatorHash,ne),ne},we=(ce,ne)=>{let ee=(0,Zx.createHash)("sha512");ee.update(me),ee.update(Be(ce));for(let Ie of ne)ee.update(Ie);return ee.digest("hex")},g=new Map,Ee=!1,Pe=ce=>{let ne=new Set([ce.locatorHash]);for(let ee of ne){let Ie=this.storedPackages.get(ee);if(!Ie)throw new Error("Assertion failed: The package should have been registered");for(let Fe of Ie.dependencies.values()){let At=this.storedResolutions.get(Fe.descriptorHash);if(!At)throw new Error(`Assertion failed: The resolution (${Gn(this.configuration,Fe)}) should have been registered`);if(At!==ce.locatorHash&&fe.has(At))return!1;let H=this.storedPackages.get(At);if(!H)throw new Error("Assertion failed: The package should have been registered");let at=this.tryWorkspaceByLocator(H);if(at){if(at.anchoredLocator.locatorHash!==ce.locatorHash&&fe.has(at.anchoredLocator.locatorHash))return!1;ne.add(at.anchoredLocator.locatorHash)}ne.add(At)}}return!0};for(;fe.size>0;){let ce=fe.size,ne=[];for(let ee of fe){let Ie=this.storedPackages.get(ee);if(!Ie)throw new Error("Assertion failed: The package should have been registered");if(!Pe(Ie))continue;let Fe=x.get(Ie.locatorHash);if(!Fe)throw new Error("Assertion failed: The build directive should have been registered");let At=we(Ie,Fe.buildLocations);if(this.storedBuildState.get(Ie.locatorHash)===At){g.set(Ie.locatorHash,At),fe.delete(ee);continue}Ee||(await this.persistInstallStateFile(),Ee=!0),this.storedBuildState.has(Ie.locatorHash)?r.reportInfo(8,`${qr(this.configuration,Ie)} must be rebuilt because its dependency tree changed`):r.reportInfo(7,`${qr(this.configuration,Ie)} must be built because it never has been before or the last one failed`);let H=Fe.buildLocations.map(async at=>{if(!z.isAbsolute(at))throw new Error(`Assertion failed: Expected the build location to be absolute (not ${at})`);for(let Re of Fe.buildDirectives){let ke=`# This file contains the result of Yarn building a package (${ba(Ie)}) `;switch(Re.type){case 0:ke+=`# Script name: ${Re.script} `;break;case 1:ke+=`# Script code: ${Re.script} `;break}let xe=null;if(!await oe.mktempPromise(async Te=>{let Ve=z.join(Te,"build.log"),{stdout:qe,stderr:b}=this.configuration.getSubprocessStreams(Ve,{header:ke,prefix:qr(this.configuration,Ie),report:r}),w;try{switch(Re.type){case 0:w=await Wb(Ie,Re.script,[],{cwd:at,project:this,stdin:xe,stdout:qe,stderr:b});break;case 1:w=await EU(Ie,Re.script,[],{cwd:at,project:this,stdin:xe,stdout:qe,stderr:b});break}}catch(F){b.write(F.stack),w=1}if(qe.end(),b.end(),w===0)return!0;oe.detachTemp(Te);let S=`${qr(this.configuration,Ie)} couldn't be built successfully (exit code ${Ut(this.configuration,w,yt.NUMBER)}, logs can be found here: ${Ut(this.configuration,Ve,yt.PATH)})`,y=this.optionalBuilds.has(Ie.locatorHash);return y?r.reportInfo(9,S):r.reportError(9,S),zce&&r.reportFold(le.fromPortablePath(Ve),oe.readFileSync(Ve,"utf8")),y}))return!1}return!0});ne.push(...H,Promise.allSettled(H).then(at=>{fe.delete(ee),at.every(Re=>Re.status==="fulfilled"&&Re.value===!0)&&g.set(Ie.locatorHash,At)}))}if(await _c(ne),ce===fe.size){let ee=Array.from(fe).map(Ie=>{let Fe=this.storedPackages.get(Ie);if(!Fe)throw new Error("Assertion failed: The package should have been registered");return qr(this.configuration,Fe)}).join(", ");r.reportError(3,`Some packages have circular dependencies that make their build order unsatisfiable - as a result they won't be built (affected packages are: ${ee})`);break}}this.storedBuildState=g,this.skippedBuilds=N}async installWithNewReport(e,r){return(await Lt.start({configuration:this.configuration,json:e.json,stdout:e.stdout,forceSectionAlignment:!0,includeLogs:!e.json&&!e.quiet,includeVersion:!0},async a=>{await this.install({...r,report:a})})).exitCode()}async install(e){let r=this.configuration.get("nodeLinker");Ke.telemetry?.reportInstall(r);let o=!1;if(await e.report.startTimerPromise("Project validation",{skipIfEmpty:!0},async()=>{this.configuration.get("enableOfflineMode")&&e.report.reportWarning(90,"Offline work is enabled; Yarn won't fetch packages from the remote registry if it can avoid it"),await this.configuration.triggerHook(E=>E.validateProject,this,{reportWarning:(E,I)=>{e.report.reportWarning(E,I)},reportError:(E,I)=>{e.report.reportError(E,I),o=!0}})}),o)return;let a=await this.configuration.getPackageExtensions();for(let E of a.values())for(let[,I]of E)for(let v of I)v.status="inactive";let n=z.join(this.cwd,dr.lockfile),u=null;if(e.immutable)try{u=await oe.readFilePromise(n,"utf8")}catch(E){throw E.code==="ENOENT"?new Jt(28,"The lockfile would have been created by this install, which is explicitly forbidden."):E}await e.report.startTimerPromise("Resolution step",async()=>{await this.resolveEverything(e)}),await e.report.startTimerPromise("Post-resolution validation",{skipIfEmpty:!0},async()=>{FAt(this,e.report);for(let[,E]of a)for(let[,I]of E)for(let v of I)if(v.userProvided){let x=Ut(this.configuration,v,yt.PACKAGE_EXTENSION);switch(v.status){case"inactive":e.report.reportWarning(68,`${x}: No matching package in the dependency tree; you may not need this rule anymore.`);break;case"redundant":e.report.reportWarning(69,`${x}: This rule seems redundant when applied on the original package; the extension may have been applied upstream.`);break}}if(u!==null){let E=Hg(u,this.generateLockfile());if(E!==u){let I=fpe(n,n,u,E,void 0,void 0,{maxEditLength:100});if(I){e.report.reportSeparator();for(let v of I.hunks){e.report.reportInfo(null,`@@ -${v.oldStart},${v.oldLines} +${v.newStart},${v.newLines} @@`);for(let x of v.lines)x.startsWith("+")?e.report.reportError(28,Ut(this.configuration,x,yt.ADDED)):x.startsWith("-")?e.report.reportError(28,Ut(this.configuration,x,yt.REMOVED)):e.report.reportInfo(null,Ut(this.configuration,x,"grey"))}e.report.reportSeparator()}throw new Jt(28,"The lockfile would have been modified by this install, which is explicitly forbidden.")}}});for(let E of a.values())for(let[,I]of E)for(let v of I)v.userProvided&&v.status==="active"&&Ke.telemetry?.reportPackageExtension(Cd(v,yt.PACKAGE_EXTENSION));await e.report.startTimerPromise("Fetch step",async()=>{await this.fetchEverything(e)});let A=e.immutable?[...new Set(this.configuration.get("immutablePatterns"))].sort():[],p=await Promise.all(A.map(async E=>NS(E,{cwd:this.cwd})));(typeof e.persistProject>"u"||e.persistProject)&&await this.persist(),await e.report.startTimerPromise("Link step",async()=>{if(e.mode==="update-lockfile"){e.report.reportWarning(73,`Skipped due to ${Ut(this.configuration,"mode=update-lockfile",yt.CODE)}`);return}await this.linkEverything(e);let E=await Promise.all(A.map(async I=>NS(I,{cwd:this.cwd})));for(let I=0;I{await this.configuration.triggerHook(E=>E.validateProjectAfterInstall,this,{reportWarning:(E,I)=>{e.report.reportWarning(E,I)},reportError:(E,I)=>{e.report.reportError(E,I),h=!0}})}),!h&&await this.configuration.triggerHook(E=>E.afterAllInstalled,this,e)}generateLockfile(){let e=new Map;for(let[n,u]of this.storedResolutions.entries()){let A=e.get(u);A||e.set(u,A=new Set),A.add(n)}let r={},{cacheKey:o}=Nr.getCacheKey(this.configuration);r.__metadata={version:tk,cacheKey:o};for(let[n,u]of e.entries()){let A=this.originalPackages.get(n);if(!A)continue;let p=[];for(let I of u){let v=this.storedDescriptors.get(I);if(!v)throw new Error("Assertion failed: The descriptor should have been registered");p.push(v)}let h=p.map(I=>Sa(I)).sort().join(", "),E=new Ot;E.version=A.linkType==="HARD"?A.version:"0.0.0-use.local",E.languageName=A.languageName,E.dependencies=new Map(A.dependencies),E.peerDependencies=new Map(A.peerDependencies),E.dependenciesMeta=new Map(A.dependenciesMeta),E.peerDependenciesMeta=new Map(A.peerDependenciesMeta),E.bin=new Map(A.bin),r[h]={...E.exportTo({},{compatibilityMode:!1}),linkType:A.linkType.toLowerCase(),resolution:ba(A),checksum:this.storedChecksums.get(A.locatorHash),conditions:A.conditions||void 0}}return`${[`# This file is generated by running "yarn install" inside your project. `,`# Manual changes might be lost - proceed with caution! `].join("")} `+Ba(r)}async persistLockfile(){let e=z.join(this.cwd,dr.lockfile),r="";try{r=await oe.readFilePromise(e,"utf8")}catch{}let o=this.generateLockfile(),a=Hg(r,o);a!==r&&(await oe.writeFilePromise(e,a),this.lockFileChecksum=Vpe(a),this.lockfileNeedsRefresh=!1)}async persistInstallStateFile(){let e=[];for(let u of Object.values(b_))e.push(...u);let r=(0,$x.default)(this,e),o=x_.default.serialize(r),a=Js(o);if(this.installStateChecksum===a)return;let n=this.configuration.get("installStatePath");await oe.mkdirPromise(z.dirname(n),{recursive:!0}),await oe.writeFilePromise(n,await xAt(o)),this.installStateChecksum=a}async restoreInstallState({restoreLinkersCustomData:e=!0,restoreResolutions:r=!0,restoreBuildState:o=!0}={}){let a=this.configuration.get("installStatePath"),n;try{let u=await kAt(await oe.readFilePromise(a));n=x_.default.deserialize(u),this.installStateChecksum=Js(u)}catch{r&&await this.applyLightResolution();return}e&&typeof n.linkersCustomData<"u"&&(this.linkersCustomData=n.linkersCustomData),o&&Object.assign(this,(0,$x.default)(n,b_.restoreBuildState)),r&&(n.lockFileChecksum===this.lockFileChecksum?Object.assign(this,(0,$x.default)(n,b_.restoreResolutions)):await this.applyLightResolution())}async applyLightResolution(){await this.resolveEverything({lockfileOnly:!0,report:new Qi}),await this.persistInstallStateFile()}async persist(){let e=(0,ek.default)(4);await Promise.all([this.persistLockfile(),...this.workspaces.map(r=>e(()=>r.persistManifest()))])}async cacheCleanup({cache:e,report:r}){if(this.configuration.get("enableGlobalCache"))return null;let o=new Set([".gitignore"]);if(!CM(e.cwd,this.cwd)||!await oe.existsPromise(e.cwd))return null;let a=[];for(let u of await oe.readdirPromise(e.cwd)){if(o.has(u))continue;let A=z.resolve(e.cwd,u);e.markedFiles.has(A)||(e.immutable?r.reportError(56,`${Ut(this.configuration,z.basename(A),"magenta")} appears to be unused and would be marked for deletion, but the cache is immutable`):a.push(oe.lstatPromise(A).then(async p=>(await oe.removePromise(A),p.size))))}if(a.length===0)return null;let n=await Promise.all(a);return{count:a.length,size:n.reduce((u,A)=>u+A,0)}}}});function RAt(t){let o=Math.floor(t.timeNow/864e5),a=t.updateInterval*864e5,n=t.state.lastUpdate??t.timeNow+a+Math.floor(a*t.randomInitialInterval),u=n+a,A=t.state.lastTips??o*864e5,p=A+864e5+8*36e5-t.timeZone,h=u<=t.timeNow,E=p<=t.timeNow,I=null;return(h||E||!t.state.lastUpdate||!t.state.lastTips)&&(I={},I.lastUpdate=h?t.timeNow:n,I.lastTips=A,I.blocks=h?{}:t.state.blocks,I.displayedTips=t.state.displayedTips),{nextState:I,triggerUpdate:h,triggerTips:E,nextTips:E?o*864e5:A}}var uC,Zpe=Et(()=>{Pt();N1();ih();Ib();Gl();Qf();uC=class{constructor(e,r){this.values=new Map;this.hits=new Map;this.enumerators=new Map;this.nextTips=0;this.displayedTips=[];this.shouldCommitTips=!1;this.configuration=e;let o=this.getRegistryPath();this.isNew=!oe.existsSync(o),this.shouldShowTips=!1,this.sendReport(r),this.startBuffer()}commitTips(){this.shouldShowTips&&(this.shouldCommitTips=!0)}selectTip(e){let r=new Set(this.displayedTips),o=A=>A&&rn?kf(rn,A):!1,a=e.map((A,p)=>p).filter(A=>e[A]&&o(e[A]?.selector));if(a.length===0)return null;let n=a.filter(A=>!r.has(A));if(n.length===0){let A=Math.floor(a.length*.2);this.displayedTips=A>0?this.displayedTips.slice(-A):[],n=a.filter(p=>!r.has(p))}let u=n[Math.floor(Math.random()*n.length)];return this.displayedTips.push(u),this.commitTips(),e[u]}reportVersion(e){this.reportValue("version",e.replace(/-git\..*/,"-git"))}reportCommandName(e){this.reportValue("commandName",e||"")}reportPluginName(e){this.reportValue("pluginName",e)}reportProject(e){this.reportEnumerator("projectCount",e)}reportInstall(e){this.reportHit("installCount",e)}reportPackageExtension(e){this.reportValue("packageExtension",e)}reportWorkspaceCount(e){this.reportValue("workspaceCount",String(e))}reportDependencyCount(e){this.reportValue("dependencyCount",String(e))}reportValue(e,r){yd(this.values,e).add(r)}reportEnumerator(e,r){yd(this.enumerators,e).add(Js(r))}reportHit(e,r="*"){let o=Wy(this.hits,e),a=al(o,r,()=>0);o.set(r,a+1)}getRegistryPath(){let e=this.configuration.get("globalFolder");return z.join(e,"telemetry.json")}sendReport(e){let r=this.getRegistryPath(),o;try{o=oe.readJsonSync(r)}catch{o={}}let{nextState:a,triggerUpdate:n,triggerTips:u,nextTips:A}=RAt({state:o,timeNow:Date.now(),timeZone:new Date().getTimezoneOffset()*60*1e3,randomInitialInterval:Math.random(),updateInterval:this.configuration.get("telemetryInterval")});if(this.nextTips=A,this.displayedTips=o.displayedTips??[],a!==null)try{oe.mkdirSync(z.dirname(r),{recursive:!0}),oe.writeJsonSync(r,a)}catch{return!1}if(u&&this.configuration.get("enableTips")&&(this.shouldShowTips=!0),n){let p=o.blocks??{};if(Object.keys(p).length===0){let h=`https://browser-http-intake.logs.datadoghq.eu/v1/input/${e}?ddsource=yarn`,E=I=>O4(h,I,{configuration:this.configuration}).catch(()=>{});for(let[I,v]of Object.entries(o.blocks??{})){if(Object.keys(v).length===0)continue;let x=v;x.userId=I,x.reportType="primary";for(let N of Object.keys(x.enumerators??{}))x.enumerators[N]=x.enumerators[N].length;E(x);let C=new Map,R=20;for(let[N,U]of Object.entries(x.values))U.length>0&&C.set(N,U.slice(0,R));for(;C.size>0;){let N={};N.userId=I,N.reportType="secondary",N.metrics={};for(let[U,V]of C)N.metrics[U]=V.shift(),V.length===0&&C.delete(U);E(N)}}}}return!0}applyChanges(){let e=this.getRegistryPath(),r;try{r=oe.readJsonSync(e)}catch{r={}}let o=this.configuration.get("telemetryUserId")??"*",a=r.blocks=r.blocks??{},n=a[o]=a[o]??{};for(let u of this.hits.keys()){let A=n.hits=n.hits??{},p=A[u]=A[u]??{};for(let[h,E]of this.hits.get(u))p[h]=(p[h]??0)+E}for(let u of["values","enumerators"])for(let A of this[u].keys()){let p=n[u]=n[u]??{};p[A]=[...new Set([...p[A]??[],...this[u].get(A)??[]])]}this.shouldCommitTips&&(r.lastTips=this.nextTips,r.displayedTips=this.displayedTips),oe.mkdirSync(z.dirname(e),{recursive:!0}),oe.writeJsonSync(e,r)}startBuffer(){process.on("exit",()=>{try{this.applyChanges()}catch{}})}}});var o2={};zt(o2,{BuildDirectiveType:()=>zx,CACHE_CHECKPOINT:()=>c_,CACHE_VERSION:()=>Kx,Cache:()=>Nr,Configuration:()=>Ke,DEFAULT_RC_FILENAME:()=>j4,FormatType:()=>kle,InstallMode:()=>hl,LEGACY_PLUGINS:()=>v1,LOCKFILE_VERSION:()=>tk,LegacyMigrationResolver:()=>oC,LightReport:()=>fA,LinkType:()=>Jy,LockfileResolver:()=>aC,Manifest:()=>Ot,MessageName:()=>wr,MultiFetcher:()=>hE,PackageExtensionStatus:()=>vN,PackageExtensionType:()=>BN,PeerWarningType:()=>rk,Project:()=>St,Report:()=>Xs,ReportError:()=>Jt,SettingsType:()=>D1,StreamReport:()=>Lt,TAG_REGEXP:()=>FE,TelemetryManager:()=>uC,ThrowReport:()=>Qi,VirtualFetcher:()=>gE,WindowsLinkType:()=>xb,Workspace:()=>cC,WorkspaceFetcher:()=>mE,WorkspaceResolver:()=>Xn,YarnVersion:()=>rn,execUtils:()=>Ur,folderUtils:()=>YS,formatUtils:()=>de,hashUtils:()=>wn,httpUtils:()=>nn,miscUtils:()=>_e,nodeUtils:()=>Vi,parseMessageName:()=>AP,reportOptionDeprecations:()=>NE,scriptUtils:()=>un,semverUtils:()=>kr,stringifyMessageName:()=>Ku,structUtils:()=>W,tgzUtils:()=>Xi,treeUtils:()=>$s});var Ye=Et(()=>{Db();WS();jl();ih();Ib();Gl();vb();BU();Qf();bo();Zfe();spe();u_();P1();P1();ape();A_();lpe();f_();fE();fP();cM();Xpe();Wl();O1();Zpe();P_();AM();fM();Dd();S_();N1();Cne()});var ihe=_((z_t,l2)=>{"use strict";var LAt=process.env.TERM_PROGRAM==="Hyper",NAt=process.platform==="win32",the=process.platform==="linux",F_={ballotDisabled:"\u2612",ballotOff:"\u2610",ballotOn:"\u2611",bullet:"\u2022",bulletWhite:"\u25E6",fullBlock:"\u2588",heart:"\u2764",identicalTo:"\u2261",line:"\u2500",mark:"\u203B",middot:"\xB7",minus:"\uFF0D",multiplication:"\xD7",obelus:"\xF7",pencilDownRight:"\u270E",pencilRight:"\u270F",pencilUpRight:"\u2710",percent:"%",pilcrow2:"\u2761",pilcrow:"\xB6",plusMinus:"\xB1",section:"\xA7",starsOff:"\u2606",starsOn:"\u2605",upDownArrow:"\u2195"},rhe=Object.assign({},F_,{check:"\u221A",cross:"\xD7",ellipsisLarge:"...",ellipsis:"...",info:"i",question:"?",questionSmall:"?",pointer:">",pointerSmall:"\xBB",radioOff:"( )",radioOn:"(*)",warning:"\u203C"}),nhe=Object.assign({},F_,{ballotCross:"\u2718",check:"\u2714",cross:"\u2716",ellipsisLarge:"\u22EF",ellipsis:"\u2026",info:"\u2139",question:"?",questionFull:"\uFF1F",questionSmall:"\uFE56",pointer:the?"\u25B8":"\u276F",pointerSmall:the?"\u2023":"\u203A",radioOff:"\u25EF",radioOn:"\u25C9",warning:"\u26A0"});l2.exports=NAt&&!LAt?rhe:nhe;Reflect.defineProperty(l2.exports,"common",{enumerable:!1,value:F_});Reflect.defineProperty(l2.exports,"windows",{enumerable:!1,value:rhe});Reflect.defineProperty(l2.exports,"other",{enumerable:!1,value:nhe})});var zc=_((V_t,R_)=>{"use strict";var OAt=t=>t!==null&&typeof t=="object"&&!Array.isArray(t),MAt=/[\u001b\u009b][[\]#;?()]*(?:(?:(?:[^\W_]*;?[^\W_]*)\u0007)|(?:(?:[0-9]{1,4}(;[0-9]{0,4})*)?[~0-9=<>cf-nqrtyA-PRZ]))/g,she=()=>{let t={enabled:!0,visible:!0,styles:{},keys:{}};"FORCE_COLOR"in process.env&&(t.enabled=process.env.FORCE_COLOR!=="0");let e=n=>{let u=n.open=`\x1B[${n.codes[0]}m`,A=n.close=`\x1B[${n.codes[1]}m`,p=n.regex=new RegExp(`\\u001b\\[${n.codes[1]}m`,"g");return n.wrap=(h,E)=>{h.includes(A)&&(h=h.replace(p,A+u));let I=u+h+A;return E?I.replace(/\r*\n/g,`${A}$&${u}`):I},n},r=(n,u,A)=>typeof n=="function"?n(u):n.wrap(u,A),o=(n,u)=>{if(n===""||n==null)return"";if(t.enabled===!1)return n;if(t.visible===!1)return"";let A=""+n,p=A.includes(` `),h=u.length;for(h>0&&u.includes("unstyle")&&(u=[...new Set(["unstyle",...u])].reverse());h-- >0;)A=r(t.styles[u[h]],A,p);return A},a=(n,u,A)=>{t.styles[n]=e({name:n,codes:u}),(t.keys[A]||(t.keys[A]=[])).push(n),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(h){t.alias(n,h)},get(){let h=E=>o(E,h.stack);return Reflect.setPrototypeOf(h,t),h.stack=this.stack?this.stack.concat(n):[n],h}})};return a("reset",[0,0],"modifier"),a("bold",[1,22],"modifier"),a("dim",[2,22],"modifier"),a("italic",[3,23],"modifier"),a("underline",[4,24],"modifier"),a("inverse",[7,27],"modifier"),a("hidden",[8,28],"modifier"),a("strikethrough",[9,29],"modifier"),a("black",[30,39],"color"),a("red",[31,39],"color"),a("green",[32,39],"color"),a("yellow",[33,39],"color"),a("blue",[34,39],"color"),a("magenta",[35,39],"color"),a("cyan",[36,39],"color"),a("white",[37,39],"color"),a("gray",[90,39],"color"),a("grey",[90,39],"color"),a("bgBlack",[40,49],"bg"),a("bgRed",[41,49],"bg"),a("bgGreen",[42,49],"bg"),a("bgYellow",[43,49],"bg"),a("bgBlue",[44,49],"bg"),a("bgMagenta",[45,49],"bg"),a("bgCyan",[46,49],"bg"),a("bgWhite",[47,49],"bg"),a("blackBright",[90,39],"bright"),a("redBright",[91,39],"bright"),a("greenBright",[92,39],"bright"),a("yellowBright",[93,39],"bright"),a("blueBright",[94,39],"bright"),a("magentaBright",[95,39],"bright"),a("cyanBright",[96,39],"bright"),a("whiteBright",[97,39],"bright"),a("bgBlackBright",[100,49],"bgBright"),a("bgRedBright",[101,49],"bgBright"),a("bgGreenBright",[102,49],"bgBright"),a("bgYellowBright",[103,49],"bgBright"),a("bgBlueBright",[104,49],"bgBright"),a("bgMagentaBright",[105,49],"bgBright"),a("bgCyanBright",[106,49],"bgBright"),a("bgWhiteBright",[107,49],"bgBright"),t.ansiRegex=MAt,t.hasColor=t.hasAnsi=n=>(t.ansiRegex.lastIndex=0,typeof n=="string"&&n!==""&&t.ansiRegex.test(n)),t.alias=(n,u)=>{let A=typeof u=="string"?t[u]:u;if(typeof A!="function")throw new TypeError("Expected alias to be the name of an existing color (string) or a function");A.stack||(Reflect.defineProperty(A,"name",{value:n}),t.styles[n]=A,A.stack=[n]),Reflect.defineProperty(t,n,{configurable:!0,enumerable:!0,set(p){t.alias(n,p)},get(){let p=h=>o(h,p.stack);return Reflect.setPrototypeOf(p,t),p.stack=this.stack?this.stack.concat(A.stack):A.stack,p}})},t.theme=n=>{if(!OAt(n))throw new TypeError("Expected theme to be an object");for(let u of Object.keys(n))t.alias(u,n[u]);return t},t.alias("unstyle",n=>typeof n=="string"&&n!==""?(t.ansiRegex.lastIndex=0,n.replace(t.ansiRegex,"")):""),t.alias("noop",n=>n),t.none=t.clear=t.noop,t.stripColor=t.unstyle,t.symbols=ihe(),t.define=a,t};R_.exports=she();R_.exports.create=she});var Lo=_(sn=>{"use strict";var UAt=Object.prototype.toString,nc=zc(),ohe=!1,T_=[],ahe={yellow:"blue",cyan:"red",green:"magenta",black:"white",blue:"yellow",red:"cyan",magenta:"green",white:"black"};sn.longest=(t,e)=>t.reduce((r,o)=>Math.max(r,e?o[e].length:o.length),0);sn.hasColor=t=>!!t&&nc.hasColor(t);var ik=sn.isObject=t=>t!==null&&typeof t=="object"&&!Array.isArray(t);sn.nativeType=t=>UAt.call(t).slice(8,-1).toLowerCase().replace(/\s/g,"");sn.isAsyncFn=t=>sn.nativeType(t)==="asyncfunction";sn.isPrimitive=t=>t!=null&&typeof t!="object"&&typeof t!="function";sn.resolve=(t,e,...r)=>typeof e=="function"?e.call(t,...r):e;sn.scrollDown=(t=[])=>[...t.slice(1),t[0]];sn.scrollUp=(t=[])=>[t.pop(),...t];sn.reorder=(t=[])=>{let e=t.slice();return e.sort((r,o)=>r.index>o.index?1:r.index{let o=t.length,a=r===o?0:r<0?o-1:r,n=t[e];t[e]=t[a],t[a]=n};sn.width=(t,e=80)=>{let r=t&&t.columns?t.columns:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[0]),process.platform==="win32"?r-1:r};sn.height=(t,e=20)=>{let r=t&&t.rows?t.rows:e;return t&&typeof t.getWindowSize=="function"&&(r=t.getWindowSize()[1]),r};sn.wordWrap=(t,e={})=>{if(!t)return t;typeof e=="number"&&(e={width:e});let{indent:r="",newline:o=` `+r,width:a=80}=e,n=(o+r).match(/[^\S\n]/g)||[];a-=n.length;let u=`.{1,${a}}([\\s\\u200B]+|$)|[^\\s\\u200B]+?([\\s\\u200B]+|$)`,A=t.trim(),p=new RegExp(u,"g"),h=A.match(p)||[];return h=h.map(E=>E.replace(/\n$/,"")),e.padEnd&&(h=h.map(E=>E.padEnd(a," "))),e.padStart&&(h=h.map(E=>E.padStart(a," "))),r+h.join(o)};sn.unmute=t=>{let e=t.stack.find(o=>nc.keys.color.includes(o));return e?nc[e]:t.stack.find(o=>o.slice(2)==="bg")?nc[e.slice(2)]:o=>o};sn.pascal=t=>t?t[0].toUpperCase()+t.slice(1):"";sn.inverse=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>nc.keys.color.includes(o));if(e){let o=nc["bg"+sn.pascal(e)];return o?o.black:t}let r=t.stack.find(o=>o.slice(0,2)==="bg");return r?nc[r.slice(2).toLowerCase()]||t:nc.none};sn.complement=t=>{if(!t||!t.stack)return t;let e=t.stack.find(o=>nc.keys.color.includes(o)),r=t.stack.find(o=>o.slice(0,2)==="bg");if(e&&!r)return nc[ahe[e]||e];if(r){let o=r.slice(2).toLowerCase(),a=ahe[o];return a&&nc["bg"+sn.pascal(a)]||t}return nc.none};sn.meridiem=t=>{let e=t.getHours(),r=t.getMinutes(),o=e>=12?"pm":"am";e=e%12;let a=e===0?12:e,n=r<10?"0"+r:r;return a+":"+n+" "+o};sn.set=(t={},e="",r)=>e.split(".").reduce((o,a,n,u)=>{let A=u.length-1>n?o[a]||{}:r;return!sn.isObject(A)&&n{let o=t[e]==null?e.split(".").reduce((a,n)=>a&&a[n],t):t[e];return o??r};sn.mixin=(t,e)=>{if(!ik(t))return e;if(!ik(e))return t;for(let r of Object.keys(e)){let o=Object.getOwnPropertyDescriptor(e,r);if(o.hasOwnProperty("value"))if(t.hasOwnProperty(r)&&ik(o.value)){let a=Object.getOwnPropertyDescriptor(t,r);ik(a.value)?t[r]=sn.merge({},t[r],e[r]):Reflect.defineProperty(t,r,o)}else Reflect.defineProperty(t,r,o);else Reflect.defineProperty(t,r,o)}return t};sn.merge=(...t)=>{let e={};for(let r of t)sn.mixin(e,r);return e};sn.mixinEmitter=(t,e)=>{let r=e.constructor.prototype;for(let o of Object.keys(r)){let a=r[o];typeof a=="function"?sn.define(t,o,a.bind(e)):sn.define(t,o,a)}};sn.onExit=t=>{let e=(r,o)=>{ohe||(ohe=!0,T_.forEach(a=>a()),r===!0&&process.exit(128+o))};T_.length===0&&(process.once("SIGTERM",e.bind(null,!0,15)),process.once("SIGINT",e.bind(null,!0,2)),process.once("exit",e)),T_.push(t)};sn.define=(t,e,r)=>{Reflect.defineProperty(t,e,{value:r})};sn.defineExport=(t,e,r)=>{let o;Reflect.defineProperty(t,e,{enumerable:!0,configurable:!0,set(a){o=a},get(){return o?o():r()}})}});var lhe=_(hC=>{"use strict";hC.ctrl={a:"first",b:"backward",c:"cancel",d:"deleteForward",e:"last",f:"forward",g:"reset",i:"tab",k:"cutForward",l:"reset",n:"newItem",m:"cancel",j:"submit",p:"search",r:"remove",s:"save",u:"undo",w:"cutLeft",x:"toggleCursor",v:"paste"};hC.shift={up:"shiftUp",down:"shiftDown",left:"shiftLeft",right:"shiftRight",tab:"prev"};hC.fn={up:"pageUp",down:"pageDown",left:"pageLeft",right:"pageRight",delete:"deleteForward"};hC.option={b:"backward",f:"forward",d:"cutRight",left:"cutLeft",up:"altUp",down:"altDown"};hC.keys={pageup:"pageUp",pagedown:"pageDown",home:"home",end:"end",cancel:"cancel",delete:"deleteForward",backspace:"delete",down:"down",enter:"submit",escape:"cancel",left:"left",space:"space",number:"number",return:"submit",right:"right",tab:"next",up:"up"}});var Ahe=_((Z_t,uhe)=>{"use strict";var che=ve("readline"),_At=lhe(),HAt=/^(?:\x1b)([a-zA-Z0-9])$/,qAt=/^(?:\x1b+)(O|N|\[|\[\[)(?:(\d+)(?:;(\d+))?([~^$])|(?:1;)?(\d+)?([a-zA-Z]))/,GAt={OP:"f1",OQ:"f2",OR:"f3",OS:"f4","[11~":"f1","[12~":"f2","[13~":"f3","[14~":"f4","[[A":"f1","[[B":"f2","[[C":"f3","[[D":"f4","[[E":"f5","[15~":"f5","[17~":"f6","[18~":"f7","[19~":"f8","[20~":"f9","[21~":"f10","[23~":"f11","[24~":"f12","[A":"up","[B":"down","[C":"right","[D":"left","[E":"clear","[F":"end","[H":"home",OA:"up",OB:"down",OC:"right",OD:"left",OE:"clear",OF:"end",OH:"home","[1~":"home","[2~":"insert","[3~":"delete","[4~":"end","[5~":"pageup","[6~":"pagedown","[[5~":"pageup","[[6~":"pagedown","[7~":"home","[8~":"end","[a":"up","[b":"down","[c":"right","[d":"left","[e":"clear","[2$":"insert","[3$":"delete","[5$":"pageup","[6$":"pagedown","[7$":"home","[8$":"end",Oa:"up",Ob:"down",Oc:"right",Od:"left",Oe:"clear","[2^":"insert","[3^":"delete","[5^":"pageup","[6^":"pagedown","[7^":"home","[8^":"end","[Z":"tab"};function jAt(t){return["[a","[b","[c","[d","[e","[2$","[3$","[5$","[6$","[7$","[8$","[Z"].includes(t)}function YAt(t){return["Oa","Ob","Oc","Od","Oe","[2^","[3^","[5^","[6^","[7^","[8^"].includes(t)}var sk=(t="",e={})=>{let r,o={name:e.name,ctrl:!1,meta:!1,shift:!1,option:!1,sequence:t,raw:t,...e};if(Buffer.isBuffer(t)?t[0]>127&&t[1]===void 0?(t[0]-=128,t="\x1B"+String(t)):t=String(t):t!==void 0&&typeof t!="string"?t=String(t):t||(t=o.sequence||""),o.sequence=o.sequence||t||o.name,t==="\r")o.raw=void 0,o.name="return";else if(t===` `)o.name="enter";else if(t===" ")o.name="tab";else if(t==="\b"||t==="\x7F"||t==="\x1B\x7F"||t==="\x1B\b")o.name="backspace",o.meta=t.charAt(0)==="\x1B";else if(t==="\x1B"||t==="\x1B\x1B")o.name="escape",o.meta=t.length===2;else if(t===" "||t==="\x1B ")o.name="space",o.meta=t.length===2;else if(t<="")o.name=String.fromCharCode(t.charCodeAt(0)+"a".charCodeAt(0)-1),o.ctrl=!0;else if(t.length===1&&t>="0"&&t<="9")o.name="number";else if(t.length===1&&t>="a"&&t<="z")o.name=t;else if(t.length===1&&t>="A"&&t<="Z")o.name=t.toLowerCase(),o.shift=!0;else if(r=HAt.exec(t))o.meta=!0,o.shift=/^[A-Z]$/.test(r[1]);else if(r=qAt.exec(t)){let a=[...t];a[0]==="\x1B"&&a[1]==="\x1B"&&(o.option=!0);let n=[r[1],r[2],r[4],r[6]].filter(Boolean).join(""),u=(r[3]||r[5]||1)-1;o.ctrl=!!(u&4),o.meta=!!(u&10),o.shift=!!(u&1),o.code=n,o.name=GAt[n],o.shift=jAt(n)||o.shift,o.ctrl=YAt(n)||o.ctrl}return o};sk.listen=(t={},e)=>{let{stdin:r}=t;if(!r||r!==process.stdin&&!r.isTTY)throw new Error("Invalid stream passed");let o=che.createInterface({terminal:!0,input:r});che.emitKeypressEvents(r,o);let a=(A,p)=>e(A,sk(A,p),o),n=r.isRaw;return r.isTTY&&r.setRawMode(!0),r.on("keypress",a),o.resume(),()=>{r.isTTY&&r.setRawMode(n),r.removeListener("keypress",a),o.pause(),o.close()}};sk.action=(t,e,r)=>{let o={..._At,...r};return e.ctrl?(e.action=o.ctrl[e.name],e):e.option&&o.option?(e.action=o.option[e.name],e):e.shift?(e.action=o.shift[e.name],e):(e.action=o.keys[e.name],e)};uhe.exports=sk});var phe=_(($_t,fhe)=>{"use strict";fhe.exports=t=>{t.timers=t.timers||{};let e=t.options.timers;if(!!e)for(let r of Object.keys(e)){let o=e[r];typeof o=="number"&&(o={interval:o}),WAt(t,r,o)}};function WAt(t,e,r={}){let o=t.timers[e]={name:e,start:Date.now(),ms:0,tick:0},a=r.interval||120;o.frames=r.frames||[],o.loading=!0;let n=setInterval(()=>{o.ms=Date.now()-o.start,o.tick++,t.render()},a);return o.stop=()=>{o.loading=!1,clearInterval(n)},Reflect.defineProperty(o,"interval",{value:n}),t.once("close",()=>o.stop()),o.stop}});var ghe=_((e8t,hhe)=>{"use strict";var{define:KAt,width:zAt}=Lo(),L_=class{constructor(e){let r=e.options;KAt(this,"_prompt",e),this.type=e.type,this.name=e.name,this.message="",this.header="",this.footer="",this.error="",this.hint="",this.input="",this.cursor=0,this.index=0,this.lines=0,this.tick=0,this.prompt="",this.buffer="",this.width=zAt(r.stdout||process.stdout),Object.assign(this,r),this.name=this.name||this.message,this.message=this.message||this.name,this.symbols=e.symbols,this.styles=e.styles,this.required=new Set,this.cancelled=!1,this.submitted=!1}clone(){let e={...this};return e.status=this.status,e.buffer=Buffer.from(e.buffer),delete e.clone,e}set color(e){this._color=e}get color(){let e=this.prompt.styles;if(this.cancelled)return e.cancelled;if(this.submitted)return e.submitted;let r=this._color||e[this.status];return typeof r=="function"?r:e.pending}set loading(e){this._loading=e}get loading(){return typeof this._loading=="boolean"?this._loading:this.loadingChoices?"choices":!1}get status(){return this.cancelled?"cancelled":this.submitted?"submitted":"pending"}};hhe.exports=L_});var mhe=_((t8t,dhe)=>{"use strict";var N_=Lo(),eo=zc(),O_={default:eo.noop,noop:eo.noop,set inverse(t){this._inverse=t},get inverse(){return this._inverse||N_.inverse(this.primary)},set complement(t){this._complement=t},get complement(){return this._complement||N_.complement(this.primary)},primary:eo.cyan,success:eo.green,danger:eo.magenta,strong:eo.bold,warning:eo.yellow,muted:eo.dim,disabled:eo.gray,dark:eo.dim.gray,underline:eo.underline,set info(t){this._info=t},get info(){return this._info||this.primary},set em(t){this._em=t},get em(){return this._em||this.primary.underline},set heading(t){this._heading=t},get heading(){return this._heading||this.muted.underline},set pending(t){this._pending=t},get pending(){return this._pending||this.primary},set submitted(t){this._submitted=t},get submitted(){return this._submitted||this.success},set cancelled(t){this._cancelled=t},get cancelled(){return this._cancelled||this.danger},set typing(t){this._typing=t},get typing(){return this._typing||this.dim},set placeholder(t){this._placeholder=t},get placeholder(){return this._placeholder||this.primary.dim},set highlight(t){this._highlight=t},get highlight(){return this._highlight||this.inverse}};O_.merge=(t={})=>{t.styles&&typeof t.styles.enabled=="boolean"&&(eo.enabled=t.styles.enabled),t.styles&&typeof t.styles.visible=="boolean"&&(eo.visible=t.styles.visible);let e=N_.merge({},O_,t.styles);delete e.merge;for(let r of Object.keys(eo))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>eo[r]});for(let r of Object.keys(eo.styles))e.hasOwnProperty(r)||Reflect.defineProperty(e,r,{get:()=>eo[r]});return e};dhe.exports=O_});var Ehe=_((r8t,yhe)=>{"use strict";var M_=process.platform==="win32",zf=zc(),VAt=Lo(),U_={...zf.symbols,upDownDoubleArrow:"\u21D5",upDownDoubleArrow2:"\u2B0D",upDownArrow:"\u2195",asterisk:"*",asterism:"\u2042",bulletWhite:"\u25E6",electricArrow:"\u2301",ellipsisLarge:"\u22EF",ellipsisSmall:"\u2026",fullBlock:"\u2588",identicalTo:"\u2261",indicator:zf.symbols.check,leftAngle:"\u2039",mark:"\u203B",minus:"\u2212",multiplication:"\xD7",obelus:"\xF7",percent:"%",pilcrow:"\xB6",pilcrow2:"\u2761",pencilUpRight:"\u2710",pencilDownRight:"\u270E",pencilRight:"\u270F",plus:"+",plusMinus:"\xB1",pointRight:"\u261E",rightAngle:"\u203A",section:"\xA7",hexagon:{off:"\u2B21",on:"\u2B22",disabled:"\u2B22"},ballot:{on:"\u2611",off:"\u2610",disabled:"\u2612"},stars:{on:"\u2605",off:"\u2606",disabled:"\u2606"},folder:{on:"\u25BC",off:"\u25B6",disabled:"\u25B6"},prefix:{pending:zf.symbols.question,submitted:zf.symbols.check,cancelled:zf.symbols.cross},separator:{pending:zf.symbols.pointerSmall,submitted:zf.symbols.middot,cancelled:zf.symbols.middot},radio:{off:M_?"( )":"\u25EF",on:M_?"(*)":"\u25C9",disabled:M_?"(|)":"\u24BE"},numbers:["\u24EA","\u2460","\u2461","\u2462","\u2463","\u2464","\u2465","\u2466","\u2467","\u2468","\u2469","\u246A","\u246B","\u246C","\u246D","\u246E","\u246F","\u2470","\u2471","\u2472","\u2473","\u3251","\u3252","\u3253","\u3254","\u3255","\u3256","\u3257","\u3258","\u3259","\u325A","\u325B","\u325C","\u325D","\u325E","\u325F","\u32B1","\u32B2","\u32B3","\u32B4","\u32B5","\u32B6","\u32B7","\u32B8","\u32B9","\u32BA","\u32BB","\u32BC","\u32BD","\u32BE","\u32BF"]};U_.merge=t=>{let e=VAt.merge({},zf.symbols,U_,t.symbols);return delete e.merge,e};yhe.exports=U_});var whe=_((n8t,Che)=>{"use strict";var JAt=mhe(),XAt=Ehe(),ZAt=Lo();Che.exports=t=>{t.options=ZAt.merge({},t.options.theme,t.options),t.symbols=XAt.merge(t.options),t.styles=JAt.merge(t.options)}});var Phe=_((vhe,Dhe)=>{"use strict";var Ihe=process.env.TERM_PROGRAM==="Apple_Terminal",$At=zc(),__=Lo(),Vc=Dhe.exports=vhe,Di="\x1B[",Bhe="\x07",H_=!1,bh=Vc.code={bell:Bhe,beep:Bhe,beginning:`${Di}G`,down:`${Di}J`,esc:Di,getPosition:`${Di}6n`,hide:`${Di}?25l`,line:`${Di}2K`,lineEnd:`${Di}K`,lineStart:`${Di}1K`,restorePosition:Di+(Ihe?"8":"u"),savePosition:Di+(Ihe?"7":"s"),screen:`${Di}2J`,show:`${Di}?25h`,up:`${Di}1J`},Yd=Vc.cursor={get hidden(){return H_},hide(){return H_=!0,bh.hide},show(){return H_=!1,bh.show},forward:(t=1)=>`${Di}${t}C`,backward:(t=1)=>`${Di}${t}D`,nextLine:(t=1)=>`${Di}E`.repeat(t),prevLine:(t=1)=>`${Di}F`.repeat(t),up:(t=1)=>t?`${Di}${t}A`:"",down:(t=1)=>t?`${Di}${t}B`:"",right:(t=1)=>t?`${Di}${t}C`:"",left:(t=1)=>t?`${Di}${t}D`:"",to(t,e){return e?`${Di}${e+1};${t+1}H`:`${Di}${t+1}G`},move(t=0,e=0){let r="";return r+=t<0?Yd.left(-t):t>0?Yd.right(t):"",r+=e<0?Yd.up(-e):e>0?Yd.down(e):"",r},restore(t={}){let{after:e,cursor:r,initial:o,input:a,prompt:n,size:u,value:A}=t;if(o=__.isPrimitive(o)?String(o):"",a=__.isPrimitive(a)?String(a):"",A=__.isPrimitive(A)?String(A):"",u){let p=Vc.cursor.up(u)+Vc.cursor.to(n.length),h=a.length-r;return h>0&&(p+=Vc.cursor.left(h)),p}if(A||e){let p=!a&&!!o?-o.length:-a.length+r;return e&&(p-=e.length),a===""&&o&&!n.includes(o)&&(p+=o.length),Vc.cursor.move(p)}}},q_=Vc.erase={screen:bh.screen,up:bh.up,down:bh.down,line:bh.line,lineEnd:bh.lineEnd,lineStart:bh.lineStart,lines(t){let e="";for(let r=0;r{if(!e)return q_.line+Yd.to(0);let r=n=>[...$At.unstyle(n)].length,o=t.split(/\r?\n/),a=0;for(let n of o)a+=1+Math.floor(Math.max(r(n)-1,0)/e);return(q_.line+Yd.prevLine()).repeat(a-1)+q_.line+Yd.to(0)}});var gC=_((i8t,bhe)=>{"use strict";var eft=ve("events"),She=zc(),G_=Ahe(),tft=phe(),rft=ghe(),nft=whe(),Ra=Lo(),Wd=Phe(),c2=class extends eft{constructor(e={}){super(),this.name=e.name,this.type=e.type,this.options=e,nft(this),tft(this),this.state=new rft(this),this.initial=[e.initial,e.default].find(r=>r!=null),this.stdout=e.stdout||process.stdout,this.stdin=e.stdin||process.stdin,this.scale=e.scale||1,this.term=this.options.term||process.env.TERM_PROGRAM,this.margin=sft(this.options.margin),this.setMaxListeners(0),ift(this)}async keypress(e,r={}){this.keypressed=!0;let o=G_.action(e,G_(e,r),this.options.actions);this.state.keypress=o,this.emit("keypress",e,o),this.emit("state",this.state.clone());let a=this.options[o.action]||this[o.action]||this.dispatch;if(typeof a=="function")return await a.call(this,e,o);this.alert()}alert(){delete this.state.alert,this.options.show===!1?this.emit("alert"):this.stdout.write(Wd.code.beep)}cursorHide(){this.stdout.write(Wd.cursor.hide()),Ra.onExit(()=>this.cursorShow())}cursorShow(){this.stdout.write(Wd.cursor.show())}write(e){!e||(this.stdout&&this.state.show!==!1&&this.stdout.write(e),this.state.buffer+=e)}clear(e=0){let r=this.state.buffer;this.state.buffer="",!(!r&&!e||this.options.show===!1)&&this.stdout.write(Wd.cursor.down(e)+Wd.clear(r,this.width))}restore(){if(this.state.closed||this.options.show===!1)return;let{prompt:e,after:r,rest:o}=this.sections(),{cursor:a,initial:n="",input:u="",value:A=""}=this,p=this.state.size=o.length,h={after:r,cursor:a,initial:n,input:u,prompt:e,size:p,value:A},E=Wd.cursor.restore(h);E&&this.stdout.write(E)}sections(){let{buffer:e,input:r,prompt:o}=this.state;o=She.unstyle(o);let a=She.unstyle(e),n=a.indexOf(o),u=a.slice(0,n),p=a.slice(n).split(` `),h=p[0],E=p[p.length-1],v=(o+(r?" "+r:"")).length,x=ve.call(this,this.value),this.result=()=>o.call(this,this.value),typeof r.initial=="function"&&(this.initial=await r.initial.call(this,this)),typeof r.onRun=="function"&&await r.onRun.call(this,this),typeof r.onSubmit=="function"){let a=r.onSubmit.bind(this),n=this.submit.bind(this);delete this.options.onSubmit,this.submit=async()=>(await a(this.name,this.value,this),n())}await this.start(),await this.render()}render(){throw new Error("expected prompt to have a custom render method")}run(){return new Promise(async(e,r)=>{if(this.once("submit",e),this.once("cancel",r),await this.skip())return this.render=()=>{},this.submit();await this.initialize(),this.emit("run")})}async element(e,r,o){let{options:a,state:n,symbols:u,timers:A}=this,p=A&&A[e];n.timer=p;let h=a[e]||n[e]||u[e],E=r&&r[e]!=null?r[e]:await h;if(E==="")return E;let I=await this.resolve(E,n,r,o);return!I&&r&&r[e]?this.resolve(h,n,r,o):I}async prefix(){let e=await this.element("prefix")||this.symbols,r=this.timers&&this.timers.prefix,o=this.state;return o.timer=r,Ra.isObject(e)&&(e=e[o.status]||e.pending),Ra.hasColor(e)?e:(this.styles[o.status]||this.styles.pending)(e)}async message(){let e=await this.element("message");return Ra.hasColor(e)?e:this.styles.strong(e)}async separator(){let e=await this.element("separator")||this.symbols,r=this.timers&&this.timers.separator,o=this.state;o.timer=r;let a=e[o.status]||e.pending||o.separator,n=await this.resolve(a,o);return Ra.isObject(n)&&(n=n[o.status]||n.pending),Ra.hasColor(n)?n:this.styles.muted(n)}async pointer(e,r){let o=await this.element("pointer",e,r);if(typeof o=="string"&&Ra.hasColor(o))return o;if(o){let a=this.styles,n=this.index===r,u=n?a.primary:h=>h,A=await this.resolve(o[n?"on":"off"]||o,this.state),p=Ra.hasColor(A)?A:u(A);return n?p:" ".repeat(A.length)}}async indicator(e,r){let o=await this.element("indicator",e,r);if(typeof o=="string"&&Ra.hasColor(o))return o;if(o){let a=this.styles,n=e.enabled===!0,u=n?a.success:a.dark,A=o[n?"on":"off"]||o;return Ra.hasColor(A)?A:u(A)}return""}body(){return null}footer(){if(this.state.status==="pending")return this.element("footer")}header(){if(this.state.status==="pending")return this.element("header")}async hint(){if(this.state.status==="pending"&&!this.isValue(this.state.input)){let e=await this.element("hint");return Ra.hasColor(e)?e:this.styles.muted(e)}}error(e){return this.state.submitted?"":e||this.state.error}format(e){return e}result(e){return e}validate(e){return this.options.required===!0?this.isValue(e):!0}isValue(e){return e!=null&&e!==""}resolve(e,...r){return Ra.resolve(this,e,...r)}get base(){return c2.prototype}get style(){return this.styles[this.state.status]}get height(){return this.options.rows||Ra.height(this.stdout,25)}get width(){return this.options.columns||Ra.width(this.stdout,80)}get size(){return{width:this.width,height:this.height}}set cursor(e){this.state.cursor=e}get cursor(){return this.state.cursor}set input(e){this.state.input=e}get input(){return this.state.input}set value(e){this.state.value=e}get value(){let{input:e,value:r}=this.state,o=[r,e].find(this.isValue.bind(this));return this.isValue(o)?o:this.initial}static get prompt(){return e=>new this(e).run()}};function ift(t){let e=a=>t[a]===void 0||typeof t[a]=="function",r=["actions","choices","initial","margin","roles","styles","symbols","theme","timers","value"],o=["body","footer","error","header","hint","indicator","message","prefix","separator","skip"];for(let a of Object.keys(t.options)){if(r.includes(a)||/^on[A-Z]/.test(a))continue;let n=t.options[a];typeof n=="function"&&e(a)?o.includes(a)||(t[a]=n.bind(t)):typeof t[a]!="function"&&(t[a]=n)}}function sft(t){typeof t=="number"&&(t=[t,t,t,t]);let e=[].concat(t||[]),r=a=>a%2===0?` `:" ",o=[];for(let a=0;a<4;a++){let n=r(a);e[a]?o.push(n.repeat(e[a])):o.push("")}return o}bhe.exports=c2});var Qhe=_((s8t,khe)=>{"use strict";var oft=Lo(),xhe={default(t,e){return e},checkbox(t,e){throw new Error("checkbox role is not implemented yet")},editable(t,e){throw new Error("editable role is not implemented yet")},expandable(t,e){throw new Error("expandable role is not implemented yet")},heading(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||"",e},input(t,e){throw new Error("input role is not implemented yet")},option(t,e){return xhe.default(t,e)},radio(t,e){throw new Error("radio role is not implemented yet")},separator(t,e){return e.disabled="",e.indicator=[e.indicator," "].find(r=>r!=null),e.message=e.message||t.symbols.line.repeat(5),e},spacer(t,e){return e}};khe.exports=(t,e={})=>{let r=oft.merge({},xhe,e.roles);return r[t]||r.default}});var u2=_((o8t,The)=>{"use strict";var aft=zc(),lft=gC(),cft=Qhe(),ok=Lo(),{reorder:j_,scrollUp:uft,scrollDown:Aft,isObject:Fhe,swap:fft}=ok,Y_=class extends lft{constructor(e){super(e),this.cursorHide(),this.maxSelected=e.maxSelected||1/0,this.multiple=e.multiple||!1,this.initial=e.initial||0,this.delay=e.delay||0,this.longest=0,this.num=""}async initialize(){typeof this.options.initial=="function"&&(this.initial=await this.options.initial.call(this)),await this.reset(!0),await super.initialize()}async reset(){let{choices:e,initial:r,autofocus:o,suggest:a}=this.options;if(this.state._choices=[],this.state.choices=[],this.choices=await Promise.all(await this.toChoices(e)),this.choices.forEach(n=>n.enabled=!1),typeof a!="function"&&this.selectable.length===0)throw new Error("At least one choice must be selectable");Fhe(r)&&(r=Object.keys(r)),Array.isArray(r)?(o!=null&&(this.index=this.findIndex(o)),r.forEach(n=>this.enable(this.find(n))),await this.render()):(o!=null&&(r=o),typeof r=="string"&&(r=this.findIndex(r)),typeof r=="number"&&r>-1&&(this.index=Math.max(0,Math.min(r,this.choices.length)),this.enable(this.find(this.index)))),this.isDisabled(this.focused)&&await this.down()}async toChoices(e,r){this.state.loadingChoices=!0;let o=[],a=0,n=async(u,A)=>{typeof u=="function"&&(u=await u.call(this)),u instanceof Promise&&(u=await u);for(let p=0;p(this.state.loadingChoices=!1,u))}async toChoice(e,r,o){if(typeof e=="function"&&(e=await e.call(this,this)),e instanceof Promise&&(e=await e),typeof e=="string"&&(e={name:e}),e.normalized)return e;e.normalized=!0;let a=e.value;if(e=cft(e.role,this.options)(this,e),typeof e.disabled=="string"&&!e.hint&&(e.hint=e.disabled,e.disabled=!0),e.disabled===!0&&e.hint==null&&(e.hint="(disabled)"),e.index!=null)return e;e.name=e.name||e.key||e.title||e.value||e.message,e.message=e.message||e.name||"",e.value=[e.value,e.name].find(this.isValue.bind(this)),e.input="",e.index=r,e.cursor=0,ok.define(e,"parent",o),e.level=o?o.level+1:1,e.indent==null&&(e.indent=o?o.indent+" ":e.indent||""),e.path=o?o.path+"."+e.name:e.name,e.enabled=!!(this.multiple&&!this.isDisabled(e)&&(e.enabled||this.isSelected(e))),this.isDisabled(e)||(this.longest=Math.max(this.longest,aft.unstyle(e.message).length));let u={...e};return e.reset=(A=u.input,p=u.value)=>{for(let h of Object.keys(u))e[h]=u[h];e.input=A,e.value=p},a==null&&typeof e.initial=="function"&&(e.input=await e.initial.call(this,this.state,e,r)),e}async onChoice(e,r){this.emit("choice",e,r,this),typeof e.onChoice=="function"&&await e.onChoice.call(this,this.state,e,r)}async addChoice(e,r,o){let a=await this.toChoice(e,r,o);return this.choices.push(a),this.index=this.choices.length-1,this.limit=this.choices.length,a}async newItem(e,r,o){let a={name:"New choice name?",editable:!0,newChoice:!0,...e},n=await this.addChoice(a,r,o);return n.updateChoice=()=>{delete n.newChoice,n.name=n.message=n.input,n.input="",n.cursor=0},this.render()}indent(e){return e.indent==null?e.level>1?" ".repeat(e.level-1):"":e.indent}dispatch(e,r){if(this.multiple&&this[r.name])return this[r.name]();this.alert()}focus(e,r){return typeof r!="boolean"&&(r=e.enabled),r&&!e.enabled&&this.selected.length>=this.maxSelected?this.alert():(this.index=e.index,e.enabled=r&&!this.isDisabled(e),e)}space(){return this.multiple?(this.toggle(this.focused),this.render()):this.alert()}a(){if(this.maxSelectedr.enabled);return this.choices.forEach(r=>r.enabled=!e),this.render()}i(){return this.choices.length-this.selected.length>this.maxSelected?this.alert():(this.choices.forEach(e=>e.enabled=!e.enabled),this.render())}g(e=this.focused){return this.choices.some(r=>!!r.parent)?(this.toggle(e.parent&&!e.choices?e.parent:e),this.render()):this.a()}toggle(e,r){if(!e.enabled&&this.selected.length>=this.maxSelected)return this.alert();typeof r!="boolean"&&(r=!e.enabled),e.enabled=r,e.choices&&e.choices.forEach(a=>this.toggle(a,r));let o=e.parent;for(;o;){let a=o.choices.filter(n=>this.isDisabled(n));o.enabled=a.every(n=>n.enabled===!0),o=o.parent}return Rhe(this,this.choices),this.emit("toggle",e,this),e}enable(e){return this.selected.length>=this.maxSelected?this.alert():(e.enabled=!this.isDisabled(e),e.choices&&e.choices.forEach(this.enable.bind(this)),e)}disable(e){return e.enabled=!1,e.choices&&e.choices.forEach(this.disable.bind(this)),e}number(e){this.num+=e;let r=o=>{let a=Number(o);if(a>this.choices.length-1)return this.alert();let n=this.focused,u=this.choices.find(A=>a===A.index);if(!u.enabled&&this.selected.length>=this.maxSelected)return this.alert();if(this.visible.indexOf(u)===-1){let A=j_(this.choices),p=A.indexOf(u);if(n.index>p){let h=A.slice(p,p+this.limit),E=A.filter(I=>!h.includes(I));this.choices=h.concat(E)}else{let h=p-this.limit+1;this.choices=A.slice(h).concat(A.slice(0,h))}}return this.index=this.choices.indexOf(u),this.toggle(this.focused),this.render()};return clearTimeout(this.numberTimeout),new Promise(o=>{let a=this.choices.length,n=this.num,u=(A=!1,p)=>{clearTimeout(this.numberTimeout),A&&(p=r(n)),this.num="",o(p)};if(n==="0"||n.length===1&&Number(n+"0")>a)return u(!0);if(Number(n)>a)return u(!1,this.alert());this.numberTimeout=setTimeout(()=>u(!0),this.delay)})}home(){return this.choices=j_(this.choices),this.index=0,this.render()}end(){let e=this.choices.length-this.limit,r=j_(this.choices);return this.choices=r.slice(e).concat(r.slice(0,e)),this.index=this.limit-1,this.render()}first(){return this.index=0,this.render()}last(){return this.index=this.visible.length-1,this.render()}prev(){return this.visible.length<=1?this.alert():this.up()}next(){return this.visible.length<=1?this.alert():this.down()}right(){return this.cursor>=this.input.length?this.alert():(this.cursor++,this.render())}left(){return this.cursor<=0?this.alert():(this.cursor--,this.render())}up(){let e=this.choices.length,r=this.visible.length,o=this.index;return this.options.scroll===!1&&o===0?this.alert():e>r&&o===0?this.scrollUp():(this.index=(o-1%e+e)%e,this.isDisabled()?this.up():this.render())}down(){let e=this.choices.length,r=this.visible.length,o=this.index;return this.options.scroll===!1&&o===r-1?this.alert():e>r&&o===r-1?this.scrollDown():(this.index=(o+1)%e,this.isDisabled()?this.down():this.render())}scrollUp(e=0){return this.choices=uft(this.choices),this.index=e,this.isDisabled()?this.up():this.render()}scrollDown(e=this.visible.length-1){return this.choices=Aft(this.choices),this.index=e,this.isDisabled()?this.down():this.render()}async shiftUp(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index-1),await this.up(),this.sorting=!1;return}return this.scrollUp(this.index)}async shiftDown(){if(this.options.sort===!0){this.sorting=!0,this.swap(this.index+1),await this.down(),this.sorting=!1;return}return this.scrollDown(this.index)}pageUp(){return this.visible.length<=1?this.alert():(this.limit=Math.max(this.limit-1,0),this.index=Math.min(this.limit-1,this.index),this._limit=this.limit,this.isDisabled()?this.up():this.render())}pageDown(){return this.visible.length>=this.choices.length?this.alert():(this.index=Math.max(0,this.index),this.limit=Math.min(this.limit+1,this.choices.length),this._limit=this.limit,this.isDisabled()?this.down():this.render())}swap(e){fft(this.choices,this.index,e)}isDisabled(e=this.focused){return e&&["disabled","collapsed","hidden","completing","readonly"].some(o=>e[o]===!0)?!0:e&&e.role==="heading"}isEnabled(e=this.focused){if(Array.isArray(e))return e.every(r=>this.isEnabled(r));if(e.choices){let r=e.choices.filter(o=>!this.isDisabled(o));return e.enabled&&r.every(o=>this.isEnabled(o))}return e.enabled&&!this.isDisabled(e)}isChoice(e,r){return e.name===r||e.index===Number(r)}isSelected(e){return Array.isArray(this.initial)?this.initial.some(r=>this.isChoice(e,r)):this.isChoice(e,this.initial)}map(e=[],r="value"){return[].concat(e||[]).reduce((o,a)=>(o[a]=this.find(a,r),o),{})}filter(e,r){let a=typeof e=="function"?e:(A,p)=>[A.name,p].includes(e),u=(this.options.multiple?this.state._choices:this.choices).filter(a);return r?u.map(A=>A[r]):u}find(e,r){if(Fhe(e))return r?e[r]:e;let a=typeof e=="function"?e:(u,A)=>[u.name,A].includes(e),n=this.choices.find(a);if(n)return r?n[r]:n}findIndex(e){return this.choices.indexOf(this.find(e))}async submit(){let e=this.focused;if(!e)return this.alert();if(e.newChoice)return e.input?(e.updateChoice(),this.render()):this.alert();if(this.choices.some(u=>u.newChoice))return this.alert();let{reorder:r,sort:o}=this.options,a=this.multiple===!0,n=this.selected;return n===void 0?this.alert():(Array.isArray(n)&&r!==!1&&o!==!0&&(n=ok.reorder(n)),this.value=a?n.map(u=>u.name):n.name,super.submit())}set choices(e=[]){this.state._choices=this.state._choices||[],this.state.choices=e;for(let r of e)this.state._choices.some(o=>o.name===r.name)||this.state._choices.push(r);if(!this._initial&&this.options.initial){this._initial=!0;let r=this.initial;if(typeof r=="string"||typeof r=="number"){let o=this.find(r);o&&(this.initial=o.index,this.focus(o,!0))}}}get choices(){return Rhe(this,this.state.choices||[])}set visible(e){this.state.visible=e}get visible(){return(this.state.visible||this.choices).slice(0,this.limit)}set limit(e){this.state.limit=e}get limit(){let{state:e,options:r,choices:o}=this,a=e.limit||this._limit||r.limit||o.length;return Math.min(a,this.height)}set value(e){super.value=e}get value(){return typeof super.value!="string"&&super.value===this.initial?this.input:super.value}set index(e){this.state.index=e}get index(){return Math.max(0,this.state?this.state.index:0)}get enabled(){return this.filter(this.isEnabled.bind(this))}get focused(){let e=this.choices[this.index];return e&&this.state.submitted&&this.multiple!==!0&&(e.enabled=!0),e}get selectable(){return this.choices.filter(e=>!this.isDisabled(e))}get selected(){return this.multiple?this.enabled:this.focused}};function Rhe(t,e){if(e instanceof Promise)return e;if(typeof e=="function"){if(ok.isAsyncFn(e))return e;e=e.call(t,t)}for(let r of e){if(Array.isArray(r.choices)){let o=r.choices.filter(a=>!t.isDisabled(a));r.enabled=o.every(a=>a.enabled===!0)}t.isDisabled(r)===!0&&delete r.enabled}return e}The.exports=Y_});var xh=_((a8t,Lhe)=>{"use strict";var pft=u2(),W_=Lo(),K_=class extends pft{constructor(e){super(e),this.emptyError=this.options.emptyError||"No items were selected"}async dispatch(e,r){if(this.multiple)return this[r.name]?await this[r.name](e,r):await super.dispatch(e,r);this.alert()}separator(){if(this.options.separator)return super.separator();let e=this.styles.muted(this.symbols.ellipsis);return this.state.submitted?super.separator():e}pointer(e,r){return!this.multiple||this.options.pointer?super.pointer(e,r):""}indicator(e,r){return this.multiple?super.indicator(e,r):""}choiceMessage(e,r){let o=this.resolve(e.message,this.state,e,r);return e.role==="heading"&&!W_.hasColor(o)&&(o=this.styles.strong(o)),this.resolve(o,this.state,e,r)}choiceSeparator(){return":"}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=await this.pointer(e,r),n=await this.indicator(e,r)+(e.pad||""),u=await this.resolve(e.hint,this.state,e,r);u&&!W_.hasColor(u)&&(u=this.styles.muted(u));let A=this.indent(e),p=await this.choiceMessage(e,r),h=()=>[this.margin[3],A+a+n,p,this.margin[1],u].filter(Boolean).join(" ");return e.role==="heading"?h():e.disabled?(W_.hasColor(p)||(p=this.styles.disabled(p)),h()):(o&&(p=this.styles.em(p)),h())}async renderChoices(){if(this.state.loading==="choices")return this.styles.warning("Loading choices");if(this.state.submitted)return"";let e=this.visible.map(async(n,u)=>await this.renderChoice(n,u)),r=await Promise.all(e);r.length||r.push(this.styles.danger("No matching choices"));let o=this.margin[0]+r.join(` `),a;return this.options.choicesHeader&&(a=await this.resolve(this.options.choicesHeader,this.state)),[a,o].filter(Boolean).join(` `)}format(){return!this.state.submitted||this.state.cancelled?"":Array.isArray(this.selected)?this.selected.map(e=>this.styles.primary(e.name)).join(", "):this.styles.primary(this.selected.name)}async render(){let{submitted:e,size:r}=this.state,o="",a=await this.header(),n=await this.prefix(),u=await this.separator(),A=await this.message();this.options.promptLine!==!1&&(o=[n,A,u,""].join(" "),this.state.prompt=o);let p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),I=await this.footer();p&&(o+=p),h&&!o.includes(h)&&(o+=" "+h),e&&!p&&!E.trim()&&this.multiple&&this.emptyError!=null&&(o+=this.styles.danger(this.emptyError)),this.clear(r),this.write([a,o,E,I].filter(Boolean).join(` `)),this.write(this.margin[2]),this.restore()}};Lhe.exports=K_});var Ohe=_((l8t,Nhe)=>{"use strict";var hft=xh(),gft=(t,e)=>{let r=t.toLowerCase();return o=>{let n=o.toLowerCase().indexOf(r),u=e(o.slice(n,n+r.length));return n>=0?o.slice(0,n)+u+o.slice(n+r.length):o}},z_=class extends hft{constructor(e){super(e),this.cursorShow()}moveCursor(e){this.state.cursor+=e}dispatch(e){return this.append(e)}space(e){return this.options.multiple?super.space(e):this.append(e)}append(e){let{cursor:r,input:o}=this.state;return this.input=o.slice(0,r)+e+o.slice(r),this.moveCursor(1),this.complete()}delete(){let{cursor:e,input:r}=this.state;return r?(this.input=r.slice(0,e-1)+r.slice(e),this.moveCursor(-1),this.complete()):this.alert()}deleteForward(){let{cursor:e,input:r}=this.state;return r[e]===void 0?this.alert():(this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.complete())}number(e){return this.append(e)}async complete(){this.completing=!0,this.choices=await this.suggest(this.input,this.state._choices),this.state.limit=void 0,this.index=Math.min(Math.max(this.visible.length-1,0),this.index),await this.render(),this.completing=!1}suggest(e=this.input,r=this.state._choices){if(typeof this.options.suggest=="function")return this.options.suggest.call(this,e,r);let o=e.toLowerCase();return r.filter(a=>a.message.toLowerCase().includes(o))}pointer(){return""}format(){if(!this.focused)return this.input;if(this.options.multiple&&this.state.submitted)return this.selected.map(e=>this.styles.primary(e.message)).join(", ");if(this.state.submitted){let e=this.value=this.input=this.focused.value;return this.styles.primary(e)}return this.input}async render(){if(this.state.status!=="pending")return super.render();let e=this.options.highlight?this.options.highlight.bind(this):this.styles.placeholder,r=gft(this.input,e),o=this.choices;this.choices=o.map(a=>({...a,message:r(a.message)})),await super.render(),this.choices=o}submit(){return this.options.multiple&&(this.value=this.selected.map(e=>e.name)),super.submit()}};Nhe.exports=z_});var J_=_((c8t,Mhe)=>{"use strict";var V_=Lo();Mhe.exports=(t,e={})=>{t.cursorHide();let{input:r="",initial:o="",pos:a,showCursor:n=!0,color:u}=e,A=u||t.styles.placeholder,p=V_.inverse(t.styles.primary),h=R=>p(t.styles.black(R)),E=r,I=" ",v=h(I);if(t.blink&&t.blink.off===!0&&(h=R=>R,v=""),n&&a===0&&o===""&&r==="")return h(I);if(n&&a===0&&(r===o||r===""))return h(o[0])+A(o.slice(1));o=V_.isPrimitive(o)?`${o}`:"",r=V_.isPrimitive(r)?`${r}`:"";let x=o&&o.startsWith(r)&&o!==r,C=x?h(o[r.length]):v;if(a!==r.length&&n===!0&&(E=r.slice(0,a)+h(r[a])+r.slice(a+1),C=""),n===!1&&(C=""),x){let R=t.styles.unstyle(E+C);return E+C+A(o.slice(R.length))}return E+C}});var ak=_((u8t,Uhe)=>{"use strict";var dft=zc(),mft=xh(),yft=J_(),X_=class extends mft{constructor(e){super({...e,multiple:!0}),this.type="form",this.initial=this.options.initial,this.align=[this.options.align,"right"].find(r=>r!=null),this.emptyError="",this.values={}}async reset(e){return await super.reset(),e===!0&&(this._index=this.index),this.index=this._index,this.values={},this.choices.forEach(r=>r.reset&&r.reset()),this.render()}dispatch(e){return!!e&&this.append(e)}append(e){let r=this.focused;if(!r)return this.alert();let{cursor:o,input:a}=r;return r.value=r.input=a.slice(0,o)+e+a.slice(o),r.cursor++,this.render()}delete(){let e=this.focused;if(!e||e.cursor<=0)return this.alert();let{cursor:r,input:o}=e;return e.value=e.input=o.slice(0,r-1)+o.slice(r),e.cursor--,this.render()}deleteForward(){let e=this.focused;if(!e)return this.alert();let{cursor:r,input:o}=e;if(o[r]===void 0)return this.alert();let a=`${o}`.slice(0,r)+`${o}`.slice(r+1);return e.value=e.input=a,this.render()}right(){let e=this.focused;return e?e.cursor>=e.input.length?this.alert():(e.cursor++,this.render()):this.alert()}left(){let e=this.focused;return e?e.cursor<=0?this.alert():(e.cursor--,this.render()):this.alert()}space(e,r){return this.dispatch(e,r)}number(e,r){return this.dispatch(e,r)}next(){let e=this.focused;if(!e)return this.alert();let{initial:r,input:o}=e;return r&&r.startsWith(o)&&o!==r?(e.value=e.input=r,e.cursor=e.value.length,this.render()):super.next()}prev(){let e=this.focused;return e?e.cursor===0?super.prev():(e.value=e.input="",e.cursor=0,this.render()):this.alert()}separator(){return""}format(e){return this.state.submitted?"":super.format(e)}pointer(){return""}indicator(e){return e.input?"\u29BF":"\u2299"}async choiceSeparator(e,r){let o=await this.resolve(e.separator,this.state,e,r)||":";return o?" "+this.styles.disabled(o):""}async renderChoice(e,r){await this.onChoice(e,r);let{state:o,styles:a}=this,{cursor:n,initial:u="",name:A,hint:p,input:h=""}=e,{muted:E,submitted:I,primary:v,danger:x}=a,C=p,R=this.index===r,N=e.validate||(()=>!0),U=await this.choiceSeparator(e,r),V=e.message;this.align==="right"&&(V=V.padStart(this.longest+1," ")),this.align==="left"&&(V=V.padEnd(this.longest+1," "));let te=this.values[A]=h||u,ae=h?"success":"dark";await N.call(e,te,this.state)!==!0&&(ae="danger");let fe=a[ae],ue=fe(await this.indicator(e,r))+(e.pad||""),me=this.indent(e),he=()=>[me,ue,V+U,h,C].filter(Boolean).join(" ");if(o.submitted)return V=dft.unstyle(V),h=I(h),C="",he();if(e.format)h=await e.format.call(this,h,e,r);else{let Be=this.styles.muted;h=yft(this,{input:h,initial:u,pos:n,showCursor:R,color:Be})}return this.isValue(h)||(h=this.styles.muted(this.symbols.ellipsis)),e.result&&(this.values[A]=await e.result.call(this,te,e,r)),R&&(V=v(V)),e.error?h+=(h?" ":"")+x(e.error.trim()):e.hint&&(h+=(h?" ":"")+E(e.hint.trim())),he()}async submit(){return this.value=this.values,super.base.submit.call(this)}};Uhe.exports=X_});var Z_=_((A8t,Hhe)=>{"use strict";var Eft=ak(),Cft=()=>{throw new Error("expected prompt to have a custom authenticate method")},_he=(t=Cft)=>{class e extends Eft{constructor(o){super(o)}async submit(){this.value=await t.call(this,this.values,this.state),super.base.submit.call(this)}static create(o){return _he(o)}}return e};Hhe.exports=_he()});var jhe=_((f8t,Ghe)=>{"use strict";var wft=Z_();function Ift(t,e){return t.username===this.options.username&&t.password===this.options.password}var qhe=(t=Ift)=>{let e=[{name:"username",message:"username"},{name:"password",message:"password",format(o){return this.options.showPassword?o:(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(o.length))}}];class r extends wft.create(t){constructor(a){super({...a,choices:e})}static create(a){return qhe(a)}}return r};Ghe.exports=qhe()});var lk=_((p8t,Yhe)=>{"use strict";var Bft=gC(),{isPrimitive:vft,hasColor:Dft}=Lo(),$_=class extends Bft{constructor(e){super(e),this.cursorHide()}async initialize(){let e=await this.resolve(this.initial,this.state);this.input=await this.cast(e),await super.initialize()}dispatch(e){return this.isValue(e)?(this.input=e,this.submit()):this.alert()}format(e){let{styles:r,state:o}=this;return o.submitted?r.success(e):r.primary(e)}cast(e){return this.isTrue(e)}isTrue(e){return/^[ty1]/i.test(e)}isFalse(e){return/^[fn0]/i.test(e)}isValue(e){return vft(e)&&(this.isTrue(e)||this.isFalse(e))}async hint(){if(this.state.status==="pending"){let e=await this.element("hint");return Dft(e)?e:this.styles.muted(e)}}async render(){let{input:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=this.styles.muted(this.default),A=[o,n,u,a].filter(Boolean).join(" ");this.state.prompt=A;let p=await this.header(),h=this.value=this.cast(e),E=await this.format(h),I=await this.error()||await this.hint(),v=await this.footer();I&&!A.includes(I)&&(E+=" "+I),A+=" "+E,this.clear(r),this.write([p,A,v].filter(Boolean).join(` `)),this.restore()}set value(e){super.value=e}get value(){return this.cast(super.value)}};Yhe.exports=$_});var Khe=_((h8t,Whe)=>{"use strict";var Pft=lk(),e8=class extends Pft{constructor(e){super(e),this.default=this.options.default||(this.initial?"(Y/n)":"(y/N)")}};Whe.exports=e8});var Vhe=_((g8t,zhe)=>{"use strict";var Sft=xh(),bft=ak(),dC=bft.prototype,t8=class extends Sft{constructor(e){super({...e,multiple:!0}),this.align=[this.options.align,"left"].find(r=>r!=null),this.emptyError="",this.values={}}dispatch(e,r){let o=this.focused,a=o.parent||{};return!o.editable&&!a.editable&&(e==="a"||e==="i")?super[e]():dC.dispatch.call(this,e,r)}append(e,r){return dC.append.call(this,e,r)}delete(e,r){return dC.delete.call(this,e,r)}space(e){return this.focused.editable?this.append(e):super.space()}number(e){return this.focused.editable?this.append(e):super.number(e)}next(){return this.focused.editable?dC.next.call(this):super.next()}prev(){return this.focused.editable?dC.prev.call(this):super.prev()}async indicator(e,r){let o=e.indicator||"",a=e.editable?o:super.indicator(e,r);return await this.resolve(a,this.state,e,r)||""}indent(e){return e.role==="heading"?"":e.editable?" ":" "}async renderChoice(e,r){return e.indent="",e.editable?dC.renderChoice.call(this,e,r):super.renderChoice(e,r)}error(){return""}footer(){return this.state.error}async validate(){let e=!0;for(let r of this.choices){if(typeof r.validate!="function"||r.role==="heading")continue;let o=r.parent?this.value[r.parent.name]:this.value;if(r.editable?o=r.value===r.name?r.initial||"":r.value:this.isDisabled(r)||(o=r.enabled===!0),e=await r.validate(o,this.state),e!==!0)break}return e!==!0&&(this.state.error=typeof e=="string"?e:"Invalid Input"),e}submit(){if(this.focused.newChoice===!0)return super.submit();if(this.choices.some(e=>e.newChoice))return this.alert();this.value={};for(let e of this.choices){let r=e.parent?this.value[e.parent.name]:this.value;if(e.role==="heading"){this.value[e.name]={};continue}e.editable?r[e.name]=e.value===e.name?e.initial||"":e.value:this.isDisabled(e)||(r[e.name]=e.enabled===!0)}return this.base.submit.call(this)}};zhe.exports=t8});var Kd=_((d8t,Jhe)=>{"use strict";var xft=gC(),kft=J_(),{isPrimitive:Qft}=Lo(),r8=class extends xft{constructor(e){super(e),this.initial=Qft(this.initial)?String(this.initial):"",this.initial&&this.cursorHide(),this.state.prevCursor=0,this.state.clipboard=[]}async keypress(e,r={}){let o=this.state.prevKeypress;return this.state.prevKeypress=r,this.options.multiline===!0&&r.name==="return"&&(!o||o.name!=="return")?this.append(` `,r):super.keypress(e,r)}moveCursor(e){this.cursor+=e}reset(){return this.input=this.value="",this.cursor=0,this.render()}dispatch(e,r){if(!e||r.ctrl||r.code)return this.alert();this.append(e)}append(e){let{cursor:r,input:o}=this.state;this.input=`${o}`.slice(0,r)+e+`${o}`.slice(r),this.moveCursor(String(e).length),this.render()}insert(e){this.append(e)}delete(){let{cursor:e,input:r}=this.state;if(e<=0)return this.alert();this.input=`${r}`.slice(0,e-1)+`${r}`.slice(e),this.moveCursor(-1),this.render()}deleteForward(){let{cursor:e,input:r}=this.state;if(r[e]===void 0)return this.alert();this.input=`${r}`.slice(0,e)+`${r}`.slice(e+1),this.render()}cutForward(){let e=this.cursor;if(this.input.length<=e)return this.alert();this.state.clipboard.push(this.input.slice(e)),this.input=this.input.slice(0,e),this.render()}cutLeft(){let e=this.cursor;if(e===0)return this.alert();let r=this.input.slice(0,e),o=this.input.slice(e),a=r.split(" ");this.state.clipboard.push(a.pop()),this.input=a.join(" "),this.cursor=this.input.length,this.input+=o,this.render()}paste(){if(!this.state.clipboard.length)return this.alert();this.insert(this.state.clipboard.pop()),this.render()}toggleCursor(){this.state.prevCursor?(this.cursor=this.state.prevCursor,this.state.prevCursor=0):(this.state.prevCursor=this.cursor,this.cursor=0),this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.input.length-1,this.render()}next(){let e=this.initial!=null?String(this.initial):"";if(!e||!e.startsWith(this.input))return this.alert();this.input=this.initial,this.cursor=this.initial.length,this.render()}prev(){if(!this.input)return this.alert();this.reset()}backward(){return this.left()}forward(){return this.right()}right(){return this.cursor>=this.input.length?this.alert():(this.moveCursor(1),this.render())}left(){return this.cursor<=0?this.alert():(this.moveCursor(-1),this.render())}isValue(e){return!!e}async format(e=this.value){let r=await this.resolve(this.initial,this.state);return this.state.submitted?this.styles.submitted(e||r):kft(this,{input:e,initial:r,pos:this.cursor})}async render(){let e=this.state.size,r=await this.prefix(),o=await this.separator(),a=await this.message(),n=[r,a,o].filter(Boolean).join(" ");this.state.prompt=n;let u=await this.header(),A=await this.format(),p=await this.error()||await this.hint(),h=await this.footer();p&&!A.includes(p)&&(A+=" "+p),n+=" "+A,this.clear(e),this.write([u,n,h].filter(Boolean).join(` `)),this.restore()}};Jhe.exports=r8});var Zhe=_((m8t,Xhe)=>{"use strict";var Fft=t=>t.filter((e,r)=>t.lastIndexOf(e)===r),ck=t=>Fft(t).filter(Boolean);Xhe.exports=(t,e={},r="")=>{let{past:o=[],present:a=""}=e,n,u;switch(t){case"prev":case"undo":return n=o.slice(0,o.length-1),u=o[o.length-1]||"",{past:ck([r,...n]),present:u};case"next":case"redo":return n=o.slice(1),u=o[0]||"",{past:ck([...n,r]),present:u};case"save":return{past:ck([...o,r]),present:""};case"remove":return u=ck(o.filter(A=>A!==r)),a="",u.length&&(a=u.pop()),{past:u,present:a};default:throw new Error(`Invalid action: "${t}"`)}}});var i8=_((y8t,e0e)=>{"use strict";var Rft=Kd(),$he=Zhe(),n8=class extends Rft{constructor(e){super(e);let r=this.options.history;if(r&&r.store){let o=r.values||this.initial;this.autosave=!!r.autosave,this.store=r.store,this.data=this.store.get("values")||{past:[],present:o},this.initial=this.data.present||this.data.past[this.data.past.length-1]}}completion(e){return this.store?(this.data=$he(e,this.data,this.input),this.data.present?(this.input=this.data.present,this.cursor=this.input.length,this.render()):this.alert()):this.alert()}altUp(){return this.completion("prev")}altDown(){return this.completion("next")}prev(){return this.save(),super.prev()}save(){!this.store||(this.data=$he("save",this.data,this.input),this.store.set("values",this.data))}submit(){return this.store&&this.autosave===!0&&this.save(),super.submit()}};e0e.exports=n8});var r0e=_((E8t,t0e)=>{"use strict";var Tft=Kd(),s8=class extends Tft{format(){return""}};t0e.exports=s8});var i0e=_((C8t,n0e)=>{"use strict";var Lft=Kd(),o8=class extends Lft{constructor(e={}){super(e),this.sep=this.options.separator||/, */,this.initial=e.initial||""}split(e=this.value){return e?String(e).split(this.sep):[]}format(){let e=this.state.submitted?this.styles.primary:r=>r;return this.list.map(e).join(", ")}async submit(e){let r=this.state.error||await this.validate(this.list,this.state);return r!==!0?(this.state.error=r,super.submit()):(this.value=this.list,super.submit())}get list(){return this.split()}};n0e.exports=o8});var o0e=_((w8t,s0e)=>{"use strict";var Nft=xh(),a8=class extends Nft{constructor(e){super({...e,multiple:!0})}};s0e.exports=a8});var c8=_((I8t,a0e)=>{"use strict";var Oft=Kd(),l8=class extends Oft{constructor(e={}){super({style:"number",...e}),this.min=this.isValue(e.min)?this.toNumber(e.min):-1/0,this.max=this.isValue(e.max)?this.toNumber(e.max):1/0,this.delay=e.delay!=null?e.delay:1e3,this.float=e.float!==!1,this.round=e.round===!0||e.float===!1,this.major=e.major||10,this.minor=e.minor||1,this.initial=e.initial!=null?e.initial:"",this.input=String(this.initial),this.cursor=this.input.length,this.cursorShow()}append(e){return!/[-+.]/.test(e)||e==="."&&this.input.includes(".")?this.alert("invalid number"):super.append(e)}number(e){return super.append(e)}next(){return this.input&&this.input!==this.initial?this.alert():this.isValue(this.initial)?(this.input=this.initial,this.cursor=String(this.initial).length,this.render()):this.alert()}up(e){let r=e||this.minor,o=this.toNumber(this.input);return o>this.max+r?this.alert():(this.input=`${o+r}`,this.render())}down(e){let r=e||this.minor,o=this.toNumber(this.input);return othis.isValue(r));return this.value=this.toNumber(e||0),super.submit()}};a0e.exports=l8});var c0e=_((B8t,l0e)=>{l0e.exports=c8()});var A0e=_((v8t,u0e)=>{"use strict";var Mft=Kd(),u8=class extends Mft{constructor(e){super(e),this.cursorShow()}format(e=this.input){return this.keypressed?(this.state.submitted?this.styles.primary:this.styles.muted)(this.symbols.asterisk.repeat(e.length)):""}};u0e.exports=u8});var h0e=_((D8t,p0e)=>{"use strict";var Uft=zc(),_ft=u2(),f0e=Lo(),A8=class extends _ft{constructor(e={}){super(e),this.widths=[].concat(e.messageWidth||50),this.align=[].concat(e.align||"left"),this.linebreak=e.linebreak||!1,this.edgeLength=e.edgeLength||3,this.newline=e.newline||` `;let r=e.startNumber||1;typeof this.scale=="number"&&(this.scaleKey=!1,this.scale=Array(this.scale).fill(0).map((o,a)=>({name:a+r})))}async reset(){return this.tableized=!1,await super.reset(),this.render()}tableize(){if(this.tableized===!0)return;this.tableized=!0;let e=0;for(let r of this.choices){e=Math.max(e,r.message.length),r.scaleIndex=r.initial||2,r.scale=[];for(let o=0;o=this.scale.length-1?this.alert():(e.scaleIndex++,this.render())}left(){let e=this.focused;return e.scaleIndex<=0?this.alert():(e.scaleIndex--,this.render())}indent(){return""}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.index)).join(", "):""}pointer(){return""}renderScaleKey(){return this.scaleKey===!1||this.state.submitted?"":["",...this.scale.map(o=>` ${o.name} - ${o.message}`)].map(o=>this.styles.muted(o)).join(` `)}renderScaleHeading(e){let r=this.scale.map(p=>p.name);typeof this.options.renderScaleHeading=="function"&&(r=this.options.renderScaleHeading.call(this,e));let o=this.scaleLength-r.join("").length,a=Math.round(o/(r.length-1)),u=r.map(p=>this.styles.strong(p)).join(" ".repeat(a)),A=" ".repeat(this.widths[0]);return this.margin[3]+A+this.margin[1]+u}scaleIndicator(e,r,o){if(typeof this.options.scaleIndicator=="function")return this.options.scaleIndicator.call(this,e,r,o);let a=e.scaleIndex===r.index;return r.disabled?this.styles.hint(this.symbols.radio.disabled):a?this.styles.success(this.symbols.radio.on):this.symbols.radio.off}renderScale(e,r){let o=e.scale.map(n=>this.scaleIndicator(e,n,r)),a=this.term==="Hyper"?"":" ";return o.join(a+this.symbols.line.repeat(this.edgeLength))}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=await this.pointer(e,r),n=await e.hint;n&&!f0e.hasColor(n)&&(n=this.styles.muted(n));let u=C=>this.margin[3]+C.replace(/\s+$/,"").padEnd(this.widths[0]," "),A=this.newline,p=this.indent(e),h=await this.resolve(e.message,this.state,e,r),E=await this.renderScale(e,r),I=this.margin[1]+this.margin[3];this.scaleLength=Uft.unstyle(E).length,this.widths[0]=Math.min(this.widths[0],this.width-this.scaleLength-I.length);let x=f0e.wordWrap(h,{width:this.widths[0],newline:A}).split(` `).map(C=>u(C)+this.margin[1]);return o&&(E=this.styles.info(E),x=x.map(C=>this.styles.info(C))),x[0]+=E,this.linebreak&&x.push(""),[p+a,x.join(` `)].filter(Boolean)}async renderChoices(){if(this.state.submitted)return"";this.tableize();let e=this.visible.map(async(a,n)=>await this.renderChoice(a,n)),r=await Promise.all(e),o=await this.renderScaleHeading();return this.margin[0]+[o,...r.map(a=>a.join(" "))].join(` `)}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u="";this.options.promptLine!==!1&&(u=[o,n,a,""].join(" "),this.state.prompt=u);let A=await this.header(),p=await this.format(),h=await this.renderScaleKey(),E=await this.error()||await this.hint(),I=await this.renderChoices(),v=await this.footer(),x=this.emptyError;p&&(u+=p),E&&!u.includes(E)&&(u+=" "+E),e&&!p&&!I.trim()&&this.multiple&&x!=null&&(u+=this.styles.danger(x)),this.clear(r),this.write([A,u,h,I,v].filter(Boolean).join(` `)),this.state.submitted||this.write(this.margin[2]),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIndex;return this.base.submit.call(this)}};p0e.exports=A8});var m0e=_((P8t,d0e)=>{"use strict";var g0e=zc(),Hft=(t="")=>typeof t=="string"?t.replace(/^['"]|['"]$/g,""):"",p8=class{constructor(e){this.name=e.key,this.field=e.field||{},this.value=Hft(e.initial||this.field.initial||""),this.message=e.message||this.name,this.cursor=0,this.input="",this.lines=[]}},qft=async(t={},e={},r=o=>o)=>{let o=new Set,a=t.fields||[],n=t.template,u=[],A=[],p=[],h=1;typeof n=="function"&&(n=await n());let E=-1,I=()=>n[++E],v=()=>n[E+1],x=C=>{C.line=h,u.push(C)};for(x({type:"bos",value:""});Eae.name===U.key);U.field=a.find(ae=>ae.name===U.key),te||(te=new p8(U),A.push(te)),te.lines.push(U.line-1);continue}let R=u[u.length-1];R.type==="text"&&R.line===h?R.value+=C:x({type:"text",value:C})}return x({type:"eos",value:""}),{input:n,tabstops:u,unique:o,keys:p,items:A}};d0e.exports=async t=>{let e=t.options,r=new Set(e.required===!0?[]:e.required||[]),o={...e.values,...e.initial},{tabstops:a,items:n,keys:u}=await qft(e,o),A=f8("result",t,e),p=f8("format",t,e),h=f8("validate",t,e,!0),E=t.isValue.bind(t);return async(I={},v=!1)=>{let x=0;I.required=r,I.items=n,I.keys=u,I.output="";let C=async(V,te,ae,fe)=>{let ue=await h(V,te,ae,fe);return ue===!1?"Invalid field "+ae.name:ue};for(let V of a){let te=V.value,ae=V.key;if(V.type!=="template"){te&&(I.output+=te);continue}if(V.type==="template"){let fe=n.find(we=>we.name===ae);e.required===!0&&I.required.add(fe.name);let ue=[fe.input,I.values[fe.value],fe.value,te].find(E),he=(fe.field||{}).message||V.inner;if(v){let we=await C(I.values[ae],I,fe,x);if(we&&typeof we=="string"||we===!1){I.invalid.set(ae,we);continue}I.invalid.delete(ae);let g=await A(I.values[ae],I,fe,x);I.output+=g0e.unstyle(g);continue}fe.placeholder=!1;let Be=te;te=await p(te,I,fe,x),ue!==te?(I.values[ae]=ue,te=t.styles.typing(ue),I.missing.delete(he)):(I.values[ae]=void 0,ue=`<${he}>`,te=t.styles.primary(ue),fe.placeholder=!0,I.required.has(ae)&&I.missing.add(he)),I.missing.has(he)&&I.validating&&(te=t.styles.warning(ue)),I.invalid.has(ae)&&I.validating&&(te=t.styles.danger(ue)),x===I.index&&(Be!==te?te=t.styles.underline(te):te=t.styles.heading(g0e.unstyle(te))),x++}te&&(I.output+=te)}let R=I.output.split(` `).map(V=>" "+V),N=n.length,U=0;for(let V of n)I.invalid.has(V.name)&&V.lines.forEach(te=>{R[te][0]===" "&&(R[te]=I.styles.danger(I.symbols.bullet)+R[te].slice(1))}),t.isValue(I.values[V.name])&&U++;return I.completed=(U/N*100).toFixed(0),I.output=R.join(` `),I.output}};function f8(t,e,r,o){return(a,n,u,A)=>typeof u.field[t]=="function"?u.field[t].call(e,a,n,u,A):[o,a].find(p=>e.isValue(p))}});var E0e=_((S8t,y0e)=>{"use strict";var Gft=zc(),jft=m0e(),Yft=gC(),h8=class extends Yft{constructor(e){super(e),this.cursorHide(),this.reset(!0)}async initialize(){this.interpolate=await jft(this),await super.initialize()}async reset(e){this.state.keys=[],this.state.invalid=new Map,this.state.missing=new Set,this.state.completed=0,this.state.values={},e!==!0&&(await this.initialize(),await this.render())}moveCursor(e){let r=this.getItem();this.cursor+=e,r.cursor+=e}dispatch(e,r){if(!r.code&&!r.ctrl&&e!=null&&this.getItem()){this.append(e,r);return}this.alert()}append(e,r){let o=this.getItem(),a=o.input.slice(0,this.cursor),n=o.input.slice(this.cursor);this.input=o.input=`${a}${e}${n}`,this.moveCursor(1),this.render()}delete(){let e=this.getItem();if(this.cursor<=0||!e.input)return this.alert();let r=e.input.slice(this.cursor),o=e.input.slice(0,this.cursor-1);this.input=e.input=`${o}${r}`,this.moveCursor(-1),this.render()}increment(e){return e>=this.state.keys.length-1?0:e+1}decrement(e){return e<=0?this.state.keys.length-1:e-1}first(){this.state.index=0,this.render()}last(){this.state.index=this.state.keys.length-1,this.render()}right(){if(this.cursor>=this.input.length)return this.alert();this.moveCursor(1),this.render()}left(){if(this.cursor<=0)return this.alert();this.moveCursor(-1),this.render()}prev(){this.state.index=this.decrement(this.state.index),this.getItem(),this.render()}next(){this.state.index=this.increment(this.state.index),this.getItem(),this.render()}up(){this.prev()}down(){this.next()}format(e){let r=this.state.completed<100?this.styles.warning:this.styles.success;return this.state.submitted===!0&&this.state.completed!==100&&(r=this.styles.danger),r(`${this.state.completed}% completed`)}async render(){let{index:e,keys:r=[],submitted:o,size:a}=this.state,n=[this.options.newline,` `].find(V=>V!=null),u=await this.prefix(),A=await this.separator(),p=await this.message(),h=[u,p,A].filter(Boolean).join(" ");this.state.prompt=h;let E=await this.header(),I=await this.error()||"",v=await this.hint()||"",x=o?"":await this.interpolate(this.state),C=this.state.key=r[e]||"",R=await this.format(C),N=await this.footer();R&&(h+=" "+R),v&&!R&&this.state.completed===0&&(h+=" "+v),this.clear(a);let U=[E,h,x,N,I.trim()];this.write(U.filter(Boolean).join(n)),this.restore()}getItem(e){let{items:r,keys:o,index:a}=this.state,n=r.find(u=>u.name===o[a]);return n&&n.input!=null&&(this.input=n.input,this.cursor=n.cursor),n}async submit(){typeof this.interpolate!="function"&&await this.initialize(),await this.interpolate(this.state,!0);let{invalid:e,missing:r,output:o,values:a}=this.state;if(e.size){let A="";for(let[p,h]of e)A+=`Invalid ${p}: ${h} `;return this.state.error=A,super.submit()}if(r.size)return this.state.error="Required: "+[...r.keys()].join(", "),super.submit();let u=Gft.unstyle(o).split(` `).map(A=>A.slice(1)).join(` `);return this.value={values:a,result:u},super.submit()}};y0e.exports=h8});var w0e=_((b8t,C0e)=>{"use strict";var Wft="(Use + to sort)",Kft=xh(),g8=class extends Kft{constructor(e){super({...e,reorder:!1,sort:!0,multiple:!0}),this.state.hint=[this.options.hint,Wft].find(this.isValue.bind(this))}indicator(){return""}async renderChoice(e,r){let o=await super.renderChoice(e,r),a=this.symbols.identicalTo+" ",n=this.index===r&&this.sorting?this.styles.muted(a):" ";return this.options.drag===!1&&(n=""),this.options.numbered===!0?n+`${r+1} - `+o:n+o}get selected(){return this.choices}submit(){return this.value=this.choices.map(e=>e.value),super.submit()}};C0e.exports=g8});var B0e=_((x8t,I0e)=>{"use strict";var zft=u2(),d8=class extends zft{constructor(e={}){if(super(e),this.emptyError=e.emptyError||"No items were selected",this.term=process.env.TERM_PROGRAM,!this.options.header){let r=["","4 - Strongly Agree","3 - Agree","2 - Neutral","1 - Disagree","0 - Strongly Disagree",""];r=r.map(o=>this.styles.muted(o)),this.state.header=r.join(` `)}}async toChoices(...e){if(this.createdScales)return!1;this.createdScales=!0;let r=await super.toChoices(...e);for(let o of r)o.scale=Vft(5,this.options),o.scaleIdx=2;return r}dispatch(){this.alert()}space(){let e=this.focused,r=e.scale[e.scaleIdx],o=r.selected;return e.scale.forEach(a=>a.selected=!1),r.selected=!o,this.render()}indicator(){return""}pointer(){return""}separator(){return this.styles.muted(this.symbols.ellipsis)}right(){let e=this.focused;return e.scaleIdx>=e.scale.length-1?this.alert():(e.scaleIdx++,this.render())}left(){let e=this.focused;return e.scaleIdx<=0?this.alert():(e.scaleIdx--,this.render())}indent(){return" "}async renderChoice(e,r){await this.onChoice(e,r);let o=this.index===r,a=this.term==="Hyper",n=a?9:8,u=a?"":" ",A=this.symbols.line.repeat(n),p=" ".repeat(n+(a?0:1)),h=te=>(te?this.styles.success("\u25C9"):"\u25EF")+u,E=r+1+".",I=o?this.styles.heading:this.styles.noop,v=await this.resolve(e.message,this.state,e,r),x=this.indent(e),C=x+e.scale.map((te,ae)=>h(ae===e.scaleIdx)).join(A),R=te=>te===e.scaleIdx?I(te):te,N=x+e.scale.map((te,ae)=>R(ae)).join(p),U=()=>[E,v].filter(Boolean).join(" "),V=()=>[U(),C,N," "].filter(Boolean).join(` `);return o&&(C=this.styles.cyan(C),N=this.styles.cyan(N)),V()}async renderChoices(){if(this.state.submitted)return"";let e=this.visible.map(async(o,a)=>await this.renderChoice(o,a)),r=await Promise.all(e);return r.length||r.push(this.styles.danger("No matching choices")),r.join(` `)}format(){return this.state.submitted?this.choices.map(r=>this.styles.info(r.scaleIdx)).join(", "):""}async render(){let{submitted:e,size:r}=this.state,o=await this.prefix(),a=await this.separator(),n=await this.message(),u=[o,n,a].filter(Boolean).join(" ");this.state.prompt=u;let A=await this.header(),p=await this.format(),h=await this.error()||await this.hint(),E=await this.renderChoices(),I=await this.footer();(p||!h)&&(u+=" "+p),h&&!u.includes(h)&&(u+=" "+h),e&&!p&&!E&&this.multiple&&this.type!=="form"&&(u+=this.styles.danger(this.emptyError)),this.clear(r),this.write([u,A,E,I].filter(Boolean).join(` `)),this.restore()}submit(){this.value={};for(let e of this.choices)this.value[e.name]=e.scaleIdx;return this.base.submit.call(this)}};function Vft(t,e={}){if(Array.isArray(e.scale))return e.scale.map(o=>({...o}));let r=[];for(let o=1;o{v0e.exports=i8()});var S0e=_((Q8t,P0e)=>{"use strict";var Jft=lk(),m8=class extends Jft{async initialize(){await super.initialize(),this.value=this.initial=!!this.options.initial,this.disabled=this.options.disabled||"no",this.enabled=this.options.enabled||"yes",await this.render()}reset(){this.value=this.initial,this.render()}delete(){this.alert()}toggle(){this.value=!this.value,this.render()}enable(){if(this.value===!0)return this.alert();this.value=!0,this.render()}disable(){if(this.value===!1)return this.alert();this.value=!1,this.render()}up(){this.toggle()}down(){this.toggle()}right(){this.toggle()}left(){this.toggle()}next(){this.toggle()}prev(){this.toggle()}dispatch(e="",r){switch(e.toLowerCase()){case" ":return this.toggle();case"1":case"y":case"t":return this.enable();case"0":case"n":case"f":return this.disable();default:return this.alert()}}format(){let e=o=>this.styles.primary.underline(o);return[this.value?this.disabled:e(this.disabled),this.value?e(this.enabled):this.enabled].join(this.styles.muted(" / "))}async render(){let{size:e}=this.state,r=await this.header(),o=await this.prefix(),a=await this.separator(),n=await this.message(),u=await this.format(),A=await this.error()||await this.hint(),p=await this.footer(),h=[o,n,a,u].join(" ");this.state.prompt=h,A&&!h.includes(A)&&(h+=" "+A),this.clear(e),this.write([r,h,p].filter(Boolean).join(` `)),this.write(this.margin[2]),this.restore()}};P0e.exports=m8});var x0e=_((F8t,b0e)=>{"use strict";var Xft=xh(),y8=class extends Xft{constructor(e){if(super(e),typeof this.options.correctChoice!="number"||this.options.correctChoice<0)throw new Error("Please specify the index of the correct answer from the list of choices")}async toChoices(e,r){let o=await super.toChoices(e,r);if(o.length<2)throw new Error("Please give at least two choices to the user");if(this.options.correctChoice>o.length)throw new Error("Please specify the index of the correct answer from the list of choices");return o}check(e){return e.index===this.options.correctChoice}async result(e){return{selectedAnswer:e,correctAnswer:this.options.choices[this.options.correctChoice].value,correct:await this.check(this.state)}}};b0e.exports=y8});var Q0e=_(E8=>{"use strict";var k0e=Lo(),As=(t,e)=>{k0e.defineExport(E8,t,e),k0e.defineExport(E8,t.toLowerCase(),e)};As("AutoComplete",()=>Ohe());As("BasicAuth",()=>jhe());As("Confirm",()=>Khe());As("Editable",()=>Vhe());As("Form",()=>ak());As("Input",()=>i8());As("Invisible",()=>r0e());As("List",()=>i0e());As("MultiSelect",()=>o0e());As("Numeral",()=>c0e());As("Password",()=>A0e());As("Scale",()=>h0e());As("Select",()=>xh());As("Snippet",()=>E0e());As("Sort",()=>w0e());As("Survey",()=>B0e());As("Text",()=>D0e());As("Toggle",()=>S0e());As("Quiz",()=>x0e())});var R0e=_((T8t,F0e)=>{F0e.exports={ArrayPrompt:u2(),AuthPrompt:Z_(),BooleanPrompt:lk(),NumberPrompt:c8(),StringPrompt:Kd()}});var f2=_((L8t,L0e)=>{"use strict";var T0e=ve("assert"),w8=ve("events"),kh=Lo(),Jc=class extends w8{constructor(e,r){super(),this.options=kh.merge({},e),this.answers={...r}}register(e,r){if(kh.isObject(e)){for(let a of Object.keys(e))this.register(a,e[a]);return this}T0e.equal(typeof r,"function","expected a function");let o=e.toLowerCase();return r.prototype instanceof this.Prompt?this.prompts[o]=r:this.prompts[o]=r(this.Prompt,this),this}async prompt(e=[]){for(let r of[].concat(e))try{typeof r=="function"&&(r=await r.call(this)),await this.ask(kh.merge({},this.options,r))}catch(o){return Promise.reject(o)}return this.answers}async ask(e){typeof e=="function"&&(e=await e.call(this));let r=kh.merge({},this.options,e),{type:o,name:a}=e,{set:n,get:u}=kh;if(typeof o=="function"&&(o=await o.call(this,e,this.answers)),!o)return this.answers[a];T0e(this.prompts[o],`Prompt "${o}" is not registered`);let A=new this.prompts[o](r),p=u(this.answers,a);A.state.answers=this.answers,A.enquirer=this,a&&A.on("submit",E=>{this.emit("answer",a,E,A),n(this.answers,a,E)});let h=A.emit.bind(A);return A.emit=(...E)=>(this.emit.call(this,...E),h(...E)),this.emit("prompt",A,this),r.autofill&&p!=null?(A.value=A.input=p,r.autofill==="show"&&await A.submit()):p=A.value=await A.run(),p}use(e){return e.call(this,this),this}set Prompt(e){this._Prompt=e}get Prompt(){return this._Prompt||this.constructor.Prompt}get prompts(){return this.constructor.prompts}static set Prompt(e){this._Prompt=e}static get Prompt(){return this._Prompt||gC()}static get prompts(){return Q0e()}static get types(){return R0e()}static get prompt(){let e=(r,...o)=>{let a=new this(...o),n=a.emit.bind(a);return a.emit=(...u)=>(e.emit(...u),n(...u)),a.prompt(r)};return kh.mixinEmitter(e,new w8),e}};kh.mixinEmitter(Jc,new w8);var C8=Jc.prompts;for(let t of Object.keys(C8)){let e=t.toLowerCase(),r=o=>new C8[t](o).run();Jc.prompt[e]=r,Jc[e]=r,Jc[t]||Reflect.defineProperty(Jc,t,{get:()=>C8[t]})}var A2=t=>{kh.defineExport(Jc,t,()=>Jc.types[t])};A2("ArrayPrompt");A2("AuthPrompt");A2("BooleanPrompt");A2("NumberPrompt");A2("StringPrompt");L0e.exports=Jc});var d2=_((mHt,q0e)=>{var npt=Jx();function ipt(t,e,r){var o=t==null?void 0:npt(t,e);return o===void 0?r:o}q0e.exports=ipt});var Y0e=_((BHt,j0e)=>{function spt(t,e){for(var r=-1,o=t==null?0:t.length;++r{var opt=md(),apt=VP();function lpt(t,e){return t&&opt(e,apt(e),t)}W0e.exports=lpt});var V0e=_((DHt,z0e)=>{var cpt=md(),upt=jy();function Apt(t,e){return t&&cpt(e,upt(e),t)}z0e.exports=Apt});var X0e=_((PHt,J0e)=>{var fpt=md(),ppt=GP();function hpt(t,e){return fpt(t,ppt(t),e)}J0e.exports=hpt});var S8=_((SHt,Z0e)=>{var gpt=qP(),dpt=eS(),mpt=GP(),ypt=KL(),Ept=Object.getOwnPropertySymbols,Cpt=Ept?function(t){for(var e=[];t;)gpt(e,mpt(t)),t=dpt(t);return e}:ypt;Z0e.exports=Cpt});var ege=_((bHt,$0e)=>{var wpt=md(),Ipt=S8();function Bpt(t,e){return wpt(t,Ipt(t),e)}$0e.exports=Bpt});var b8=_((xHt,tge)=>{var vpt=WL(),Dpt=S8(),Ppt=jy();function Spt(t){return vpt(t,Ppt,Dpt)}tge.exports=Spt});var nge=_((kHt,rge)=>{var bpt=Object.prototype,xpt=bpt.hasOwnProperty;function kpt(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&xpt.call(t,"index")&&(r.index=t.index,r.input=t.input),r}rge.exports=kpt});var sge=_((QHt,ige)=>{var Qpt=ZP();function Fpt(t,e){var r=e?Qpt(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}ige.exports=Fpt});var age=_((FHt,oge)=>{var Rpt=/\w*$/;function Tpt(t){var e=new t.constructor(t.source,Rpt.exec(t));return e.lastIndex=t.lastIndex,e}oge.exports=Tpt});var fge=_((RHt,Age)=>{var lge=hd(),cge=lge?lge.prototype:void 0,uge=cge?cge.valueOf:void 0;function Lpt(t){return uge?Object(uge.call(t)):{}}Age.exports=Lpt});var hge=_((THt,pge)=>{var Npt=ZP(),Opt=sge(),Mpt=age(),Upt=fge(),_pt=aN(),Hpt="[object Boolean]",qpt="[object Date]",Gpt="[object Map]",jpt="[object Number]",Ypt="[object RegExp]",Wpt="[object Set]",Kpt="[object String]",zpt="[object Symbol]",Vpt="[object ArrayBuffer]",Jpt="[object DataView]",Xpt="[object Float32Array]",Zpt="[object Float64Array]",$pt="[object Int8Array]",eht="[object Int16Array]",tht="[object Int32Array]",rht="[object Uint8Array]",nht="[object Uint8ClampedArray]",iht="[object Uint16Array]",sht="[object Uint32Array]";function oht(t,e,r){var o=t.constructor;switch(e){case Vpt:return Npt(t);case Hpt:case qpt:return new o(+t);case Jpt:return Opt(t,r);case Xpt:case Zpt:case $pt:case eht:case tht:case rht:case nht:case iht:case sht:return _pt(t,r);case Gpt:return new o;case jpt:case Kpt:return new o(t);case Ypt:return Mpt(t);case Wpt:return new o;case zpt:return Upt(t)}}pge.exports=oht});var dge=_((LHt,gge)=>{var aht=jI(),lht=Ju(),cht="[object Map]";function uht(t){return lht(t)&&aht(t)==cht}gge.exports=uht});var Cge=_((NHt,Ege)=>{var Aht=dge(),fht=YP(),mge=WP(),yge=mge&&mge.isMap,pht=yge?fht(yge):Aht;Ege.exports=pht});var Ige=_((OHt,wge)=>{var hht=jI(),ght=Ju(),dht="[object Set]";function mht(t){return ght(t)&&hht(t)==dht}wge.exports=mht});var Pge=_((MHt,Dge)=>{var yht=Ige(),Eht=YP(),Bge=WP(),vge=Bge&&Bge.isSet,Cht=vge?Eht(vge):yht;Dge.exports=Cht});var x8=_((UHt,kge)=>{var wht=_P(),Iht=Y0e(),Bht=tS(),vht=K0e(),Dht=V0e(),Pht=oN(),Sht=$P(),bht=X0e(),xht=ege(),kht=XL(),Qht=b8(),Fht=jI(),Rht=nge(),Tht=hge(),Lht=lN(),Nht=ql(),Oht=UI(),Mht=Cge(),Uht=sl(),_ht=Pge(),Hht=VP(),qht=jy(),Ght=1,jht=2,Yht=4,Sge="[object Arguments]",Wht="[object Array]",Kht="[object Boolean]",zht="[object Date]",Vht="[object Error]",bge="[object Function]",Jht="[object GeneratorFunction]",Xht="[object Map]",Zht="[object Number]",xge="[object Object]",$ht="[object RegExp]",e0t="[object Set]",t0t="[object String]",r0t="[object Symbol]",n0t="[object WeakMap]",i0t="[object ArrayBuffer]",s0t="[object DataView]",o0t="[object Float32Array]",a0t="[object Float64Array]",l0t="[object Int8Array]",c0t="[object Int16Array]",u0t="[object Int32Array]",A0t="[object Uint8Array]",f0t="[object Uint8ClampedArray]",p0t="[object Uint16Array]",h0t="[object Uint32Array]",ri={};ri[Sge]=ri[Wht]=ri[i0t]=ri[s0t]=ri[Kht]=ri[zht]=ri[o0t]=ri[a0t]=ri[l0t]=ri[c0t]=ri[u0t]=ri[Xht]=ri[Zht]=ri[xge]=ri[$ht]=ri[e0t]=ri[t0t]=ri[r0t]=ri[A0t]=ri[f0t]=ri[p0t]=ri[h0t]=!0;ri[Vht]=ri[bge]=ri[n0t]=!1;function Ak(t,e,r,o,a,n){var u,A=e&Ght,p=e&jht,h=e&Yht;if(r&&(u=a?r(t,o,a,n):r(t)),u!==void 0)return u;if(!Uht(t))return t;var E=Nht(t);if(E){if(u=Rht(t),!A)return Sht(t,u)}else{var I=Fht(t),v=I==bge||I==Jht;if(Oht(t))return Pht(t,A);if(I==xge||I==Sge||v&&!a){if(u=p||v?{}:Lht(t),!A)return p?xht(t,Dht(u,t)):bht(t,vht(u,t))}else{if(!ri[I])return a?t:{};u=Tht(t,I,A)}}n||(n=new wht);var x=n.get(t);if(x)return x;n.set(t,u),_ht(t)?t.forEach(function(N){u.add(Ak(N,e,r,N,t,n))}):Mht(t)&&t.forEach(function(N,U){u.set(U,Ak(N,e,r,U,t,n))});var C=h?p?Qht:kht:p?qht:Hht,R=E?void 0:C(t);return Iht(R||t,function(N,U){R&&(U=N,N=t[U]),Bht(u,U,Ak(N,e,r,U,t,n))}),u}kge.exports=Ak});var k8=_((_Ht,Qge)=>{var g0t=x8(),d0t=1,m0t=4;function y0t(t){return g0t(t,d0t|m0t)}Qge.exports=y0t});var Q8=_((HHt,Fge)=>{var E0t=I_();function C0t(t,e,r){return t==null?t:E0t(t,e,r)}Fge.exports=C0t});var Oge=_((KHt,Nge)=>{var w0t=Object.prototype,I0t=w0t.hasOwnProperty;function B0t(t,e){return t!=null&&I0t.call(t,e)}Nge.exports=B0t});var Uge=_((zHt,Mge)=>{var v0t=Oge(),D0t=B_();function P0t(t,e){return t!=null&&D0t(t,e,v0t)}Mge.exports=P0t});var Hge=_((VHt,_ge)=>{function S0t(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}_ge.exports=S0t});var Gge=_((JHt,qge)=>{var b0t=Jx(),x0t=pU();function k0t(t,e){return e.length<2?t:b0t(t,x0t(e,0,-1))}qge.exports=k0t});var R8=_((XHt,jge)=>{var Q0t=jd(),F0t=Hge(),R0t=Gge(),T0t=lC();function L0t(t,e){return e=Q0t(e,t),t=R0t(t,e),t==null||delete t[T0t(F0t(e))]}jge.exports=L0t});var T8=_((ZHt,Yge)=>{var N0t=R8();function O0t(t,e){return t==null?!0:N0t(t,e)}Yge.exports=O0t});var Jge=_((S6t,_0t)=>{_0t.exports={name:"@yarnpkg/cli",version:"4.2.2",license:"BSD-2-Clause",main:"./sources/index.ts",exports:{".":"./sources/index.ts","./polyfills":"./sources/polyfills.ts","./package.json":"./package.json"},dependencies:{"@yarnpkg/core":"workspace:^","@yarnpkg/fslib":"workspace:^","@yarnpkg/libzip":"workspace:^","@yarnpkg/parsers":"workspace:^","@yarnpkg/plugin-compat":"workspace:^","@yarnpkg/plugin-constraints":"workspace:^","@yarnpkg/plugin-dlx":"workspace:^","@yarnpkg/plugin-essentials":"workspace:^","@yarnpkg/plugin-exec":"workspace:^","@yarnpkg/plugin-file":"workspace:^","@yarnpkg/plugin-git":"workspace:^","@yarnpkg/plugin-github":"workspace:^","@yarnpkg/plugin-http":"workspace:^","@yarnpkg/plugin-init":"workspace:^","@yarnpkg/plugin-interactive-tools":"workspace:^","@yarnpkg/plugin-link":"workspace:^","@yarnpkg/plugin-nm":"workspace:^","@yarnpkg/plugin-npm":"workspace:^","@yarnpkg/plugin-npm-cli":"workspace:^","@yarnpkg/plugin-pack":"workspace:^","@yarnpkg/plugin-patch":"workspace:^","@yarnpkg/plugin-pnp":"workspace:^","@yarnpkg/plugin-pnpm":"workspace:^","@yarnpkg/plugin-stage":"workspace:^","@yarnpkg/plugin-typescript":"workspace:^","@yarnpkg/plugin-version":"workspace:^","@yarnpkg/plugin-workspace-tools":"workspace:^","@yarnpkg/shell":"workspace:^","ci-info":"^3.2.0",clipanion:"^4.0.0-rc.2",semver:"^7.1.2",tslib:"^2.4.0",typanion:"^3.14.0"},devDependencies:{"@types/semver":"^7.1.0","@yarnpkg/builder":"workspace:^","@yarnpkg/monorepo":"workspace:^","@yarnpkg/pnpify":"workspace:^"},peerDependencies:{"@yarnpkg/core":"workspace:^"},scripts:{postpack:"rm -rf lib",prepack:'run build:compile "$(pwd)"',"build:cli+hook":"run build:pnp:hook && builder build bundle","build:cli":"builder build bundle","run:cli":"builder run","update-local":"run build:cli --no-git-hash && rsync -a --delete bundles/ bin/"},publishConfig:{main:"./lib/index.js",bin:null,exports:{".":"./lib/index.js","./package.json":"./package.json"}},files:["/lib/**/*","!/lib/pluginConfiguration.*","!/lib/cli.*"],"@yarnpkg/builder":{bundles:{standard:["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"]}},repository:{type:"git",url:"ssh://git@github.com/yarnpkg/berry.git",directory:"packages/yarnpkg-cli"},engines:{node:">=18.12.0"}}});var G8=_((i9t,lde)=>{"use strict";lde.exports=function(e,r){r===!0&&(r=0);var o="";if(typeof e=="string")try{o=new URL(e).protocol}catch{}else e&&e.constructor===URL&&(o=e.protocol);var a=o.split(/\:|\+/).filter(Boolean);return typeof r=="number"?a[r]:a}});var ude=_((s9t,cde)=>{"use strict";var sgt=G8();function ogt(t){var e={protocols:[],protocol:null,port:null,resource:"",host:"",user:"",password:"",pathname:"",hash:"",search:"",href:t,query:{},parse_failed:!1};try{var r=new URL(t);e.protocols=sgt(r),e.protocol=e.protocols[0],e.port=r.port,e.resource=r.hostname,e.host=r.host,e.user=r.username||"",e.password=r.password||"",e.pathname=r.pathname,e.hash=r.hash.slice(1),e.search=r.search.slice(1),e.href=r.href,e.query=Object.fromEntries(r.searchParams)}catch{e.protocols=["file"],e.protocol=e.protocols[0],e.port="",e.resource="",e.user="",e.pathname="",e.hash="",e.search="",e.href=t,e.query={},e.parse_failed=!0}return e}cde.exports=ogt});var pde=_((o9t,fde)=>{"use strict";var agt=ude();function lgt(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var cgt=lgt(agt),ugt="text/plain",Agt="us-ascii",Ade=(t,e)=>e.some(r=>r instanceof RegExp?r.test(t):r===t),fgt=(t,{stripHash:e})=>{let r=/^data:(?[^,]*?),(?[^#]*?)(?:#(?.*))?$/.exec(t);if(!r)throw new Error(`Invalid URL: ${t}`);let{type:o,data:a,hash:n}=r.groups,u=o.split(";");n=e?"":n;let A=!1;u[u.length-1]==="base64"&&(u.pop(),A=!0);let p=(u.shift()||"").toLowerCase(),E=[...u.map(I=>{let[v,x=""]=I.split("=").map(C=>C.trim());return v==="charset"&&(x=x.toLowerCase(),x===Agt)?"":`${v}${x?`=${x}`:""}`}).filter(Boolean)];return A&&E.push("base64"),(E.length>0||p&&p!==ugt)&&E.unshift(p),`data:${E.join(";")},${A?a.trim():a}${n?`#${n}`:""}`};function pgt(t,e){if(e={defaultProtocol:"http:",normalizeProtocol:!0,forceHttp:!1,forceHttps:!1,stripAuthentication:!0,stripHash:!1,stripTextFragment:!0,stripWWW:!0,removeQueryParameters:[/^utm_\w+/i],removeTrailingSlash:!0,removeSingleSlash:!0,removeDirectoryIndex:!1,sortQueryParameters:!0,...e},t=t.trim(),/^data:/i.test(t))return fgt(t,e);if(/^view-source:/i.test(t))throw new Error("`view-source:` is not supported as it is a non-standard protocol");let r=t.startsWith("//");!r&&/^\.*\//.test(t)||(t=t.replace(/^(?!(?:\w+:)?\/\/)|^\/\//,e.defaultProtocol));let a=new URL(t);if(e.forceHttp&&e.forceHttps)throw new Error("The `forceHttp` and `forceHttps` options cannot be used together");if(e.forceHttp&&a.protocol==="https:"&&(a.protocol="http:"),e.forceHttps&&a.protocol==="http:"&&(a.protocol="https:"),e.stripAuthentication&&(a.username="",a.password=""),e.stripHash?a.hash="":e.stripTextFragment&&(a.hash=a.hash.replace(/#?:~:text.*?$/i,"")),a.pathname){let u=/\b[a-z][a-z\d+\-.]{1,50}:\/\//g,A=0,p="";for(;;){let E=u.exec(a.pathname);if(!E)break;let I=E[0],v=E.index,x=a.pathname.slice(A,v);p+=x.replace(/\/{2,}/g,"/"),p+=I,A=v+I.length}let h=a.pathname.slice(A,a.pathname.length);p+=h.replace(/\/{2,}/g,"/"),a.pathname=p}if(a.pathname)try{a.pathname=decodeURI(a.pathname)}catch{}if(e.removeDirectoryIndex===!0&&(e.removeDirectoryIndex=[/^index\.[a-z]+$/]),Array.isArray(e.removeDirectoryIndex)&&e.removeDirectoryIndex.length>0){let u=a.pathname.split("/"),A=u[u.length-1];Ade(A,e.removeDirectoryIndex)&&(u=u.slice(0,-1),a.pathname=u.slice(1).join("/")+"/")}if(a.hostname&&(a.hostname=a.hostname.replace(/\.$/,""),e.stripWWW&&/^www\.(?!www\.)[a-z\-\d]{1,63}\.[a-z.\-\d]{2,63}$/.test(a.hostname)&&(a.hostname=a.hostname.replace(/^www\./,""))),Array.isArray(e.removeQueryParameters))for(let u of[...a.searchParams.keys()])Ade(u,e.removeQueryParameters)&&a.searchParams.delete(u);if(e.removeQueryParameters===!0&&(a.search=""),e.sortQueryParameters){a.searchParams.sort();try{a.search=decodeURIComponent(a.search)}catch{}}e.removeTrailingSlash&&(a.pathname=a.pathname.replace(/\/$/,""));let n=t;return t=a.toString(),!e.removeSingleSlash&&a.pathname==="/"&&!n.endsWith("/")&&a.hash===""&&(t=t.replace(/\/$/,"")),(e.removeTrailingSlash||a.pathname==="/")&&a.hash===""&&e.removeSingleSlash&&(t=t.replace(/\/$/,"")),r&&!e.normalizeProtocol&&(t=t.replace(/^http:\/\//,"//")),e.stripProtocol&&(t=t.replace(/^(?:https?:)?\/\//,"")),t}var j8=(t,e=!1)=>{let r=/^(?:([a-z_][a-z0-9_-]{0,31})@|https?:\/\/)([\w\.\-@]+)[\/:]([\~,\.\w,\-,\_,\/]+?(?:\.git|\/)?)$/,o=n=>{let u=new Error(n);throw u.subject_url=t,u};(typeof t!="string"||!t.trim())&&o("Invalid url."),t.length>j8.MAX_INPUT_LENGTH&&o("Input exceeds maximum length. If needed, change the value of parseUrl.MAX_INPUT_LENGTH."),e&&(typeof e!="object"&&(e={stripHash:!1}),t=pgt(t,e));let a=cgt.default(t);if(a.parse_failed){let n=a.href.match(r);n?(a.protocols=["ssh"],a.protocol="ssh",a.resource=n[2],a.host=n[2],a.user=n[1],a.pathname=`/${n[3]}`,a.parse_failed=!1):o("URL parsing failed.")}return a};j8.MAX_INPUT_LENGTH=2048;fde.exports=j8});var dde=_((a9t,gde)=>{"use strict";var hgt=G8();function hde(t){if(Array.isArray(t))return t.indexOf("ssh")!==-1||t.indexOf("rsync")!==-1;if(typeof t!="string")return!1;var e=hgt(t);if(t=t.substring(t.indexOf("://")+3),hde(e))return!0;var r=new RegExp(".([a-zA-Z\\d]+):(\\d+)/");return!t.match(r)&&t.indexOf("@"){"use strict";var ggt=pde(),mde=dde();function dgt(t){var e=ggt(t);return e.token="",e.password==="x-oauth-basic"?e.token=e.user:e.user==="x-token-auth"&&(e.token=e.password),mde(e.protocols)||e.protocols.length===0&&mde(t)?e.protocol="ssh":e.protocols.length?e.protocol=e.protocols[0]:(e.protocol="file",e.protocols=["file"]),e.href=e.href.replace(/\/$/,""),e}yde.exports=dgt});var wde=_((c9t,Cde)=>{"use strict";var mgt=Ede();function Y8(t){if(typeof t!="string")throw new Error("The url must be a string.");var e=/^([a-z\d-]{1,39})\/([-\.\w]{1,100})$/i;e.test(t)&&(t="https://github.com/"+t);var r=mgt(t),o=r.resource.split("."),a=null;switch(r.toString=function(N){return Y8.stringify(this,N)},r.source=o.length>2?o.slice(1-o.length).join("."):r.source=r.resource,r.git_suffix=/\.git$/.test(r.pathname),r.name=decodeURIComponent((r.pathname||r.href).replace(/(^\/)|(\/$)/g,"").replace(/\.git$/,"")),r.owner=decodeURIComponent(r.user),r.source){case"git.cloudforge.com":r.owner=r.user,r.organization=o[0],r.source="cloudforge.com";break;case"visualstudio.com":if(r.resource==="vs-ssh.visualstudio.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3],r.full_name=a[2]+"/"+a[3]);break}else{a=r.name.split("/"),a.length===2?(r.owner=a[1],r.name=a[1],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name);break}case"dev.azure.com":case"azure.com":if(r.resource==="ssh.dev.azure.com"){a=r.name.split("/"),a.length===4&&(r.organization=a[1],r.owner=a[2],r.name=a[3]);break}else{a=r.name.split("/"),a.length===5?(r.organization=a[0],r.owner=a[1],r.name=a[4],r.full_name="_git/"+r.name):a.length===3?(r.name=a[2],a[0]==="DefaultCollection"?(r.owner=a[2],r.organization=a[0],r.full_name=r.organization+"/_git/"+r.name):(r.owner=a[0],r.full_name=r.owner+"/_git/"+r.name)):a.length===4&&(r.organization=a[0],r.owner=a[1],r.name=a[3],r.full_name=r.organization+"/"+r.owner+"/_git/"+r.name),r.query&&r.query.path&&(r.filepath=r.query.path.replace(/^\/+/g,"")),r.query&&r.query.version&&(r.ref=r.query.version.replace(/^GB/,""));break}default:a=r.name.split("/");var n=a.length-1;if(a.length>=2){var u=a.indexOf("-",2),A=a.indexOf("blob",2),p=a.indexOf("tree",2),h=a.indexOf("commit",2),E=a.indexOf("src",2),I=a.indexOf("raw",2),v=a.indexOf("edit",2);n=u>0?u-1:A>0?A-1:p>0?p-1:h>0?h-1:E>0?E-1:I>0?I-1:v>0?v-1:n,r.owner=a.slice(0,n).join("/"),r.name=a[n],h&&(r.commit=a[n+2])}r.ref="",r.filepathtype="",r.filepath="";var x=a.length>n&&a[n+1]==="-"?n+1:n;a.length>x+2&&["raw","src","blob","tree","edit"].indexOf(a[x+1])>=0&&(r.filepathtype=a[x+1],r.ref=a[x+2],a.length>x+3&&(r.filepath=a.slice(x+3).join("/"))),r.organization=r.owner;break}r.full_name||(r.full_name=r.owner,r.name&&(r.full_name&&(r.full_name+="/"),r.full_name+=r.name)),r.owner.startsWith("scm/")&&(r.source="bitbucket-server",r.owner=r.owner.replace("scm/",""),r.organization=r.owner,r.full_name=r.owner+"/"+r.name);var C=/(projects|users)\/(.*?)\/repos\/(.*?)((\/.*$)|$)/,R=C.exec(r.pathname);return R!=null&&(r.source="bitbucket-server",R[1]==="users"?r.owner="~"+R[2]:r.owner=R[2],r.organization=r.owner,r.name=R[3],a=R[4].split("/"),a.length>1&&(["raw","browse"].indexOf(a[1])>=0?(r.filepathtype=a[1],a.length>2&&(r.filepath=a.slice(2).join("/"))):a[1]==="commits"&&a.length>2&&(r.commit=a[2])),r.full_name=r.owner+"/"+r.name,r.query.at?r.ref=r.query.at:r.ref=""),r}Y8.stringify=function(t,e){e=e||(t.protocols&&t.protocols.length?t.protocols.join("+"):t.protocol);var r=t.port?":"+t.port:"",o=t.user||"git",a=t.git_suffix?".git":"";switch(e){case"ssh":return r?"ssh://"+o+"@"+t.resource+r+"/"+t.full_name+a:o+"@"+t.resource+":"+t.full_name+a;case"git+ssh":case"ssh+git":case"ftp":case"ftps":return e+"://"+o+"@"+t.resource+r+"/"+t.full_name+a;case"http":case"https":var n=t.token?ygt(t):t.user&&(t.protocols.includes("http")||t.protocols.includes("https"))?t.user+"@":"";return e+"://"+n+t.resource+r+"/"+Egt(t)+a;default:return t.href}};function ygt(t){switch(t.source){case"bitbucket.org":return"x-token-auth:"+t.token+"@";default:return t.token+"@"}}function Egt(t){switch(t.source){case"bitbucket-server":return"scm/"+t.full_name;default:return""+t.full_name}}Cde.exports=Y8});var Ode=_((q5t,Nde)=>{var kgt=Hb(),Qgt=$P(),Fgt=ql(),Rgt=pE(),Tgt=w_(),Lgt=lC(),Ngt=L1();function Ogt(t){return Fgt(t)?kgt(t,Lgt):Rgt(t)?[t]:Qgt(Tgt(Ngt(t)))}Nde.exports=Ogt});function Hgt(t,e){return e===1&&_gt.has(t[0])}function B2(t){let e=Array.isArray(t)?t:(0,_de.default)(t);return e.map((o,a)=>Mgt.test(o)?`[${o}]`:Ugt.test(o)&&!Hgt(e,a)?`.${o}`:`[${JSON.stringify(o)}]`).join("").replace(/^\./,"")}function qgt(t,e){let r=[];if(e.methodName!==null&&r.push(de.pretty(t,e.methodName,de.Type.CODE)),e.file!==null){let o=[];o.push(de.pretty(t,e.file,de.Type.PATH)),e.line!==null&&(o.push(de.pretty(t,e.line,de.Type.NUMBER)),e.column!==null&&o.push(de.pretty(t,e.column,de.Type.NUMBER))),r.push(`(${o.join(de.pretty(t,":","grey"))})`)}return r.join(" ")}function gk(t,{manifestUpdates:e,reportedErrors:r},{fix:o}={}){let a=new Map,n=new Map,u=[...r.keys()].map(A=>[A,new Map]);for(let[A,p]of[...u,...e]){let h=r.get(A)?.map(x=>({text:x,fixable:!1}))??[],E=!1,I=t.getWorkspaceByCwd(A),v=I.manifest.exportTo({});for(let[x,C]of p){if(C.size>1){let R=[...C].map(([N,U])=>{let V=de.pretty(t.configuration,N,de.Type.INSPECT),te=U.size>0?qgt(t.configuration,U.values().next().value):null;return te!==null?` ${V} at ${te}`:` ${V}`}).join("");h.push({text:`Conflict detected in constraint targeting ${de.pretty(t.configuration,x,de.Type.CODE)}; conflicting values are:${R}`,fixable:!1})}else{let[[R]]=C,N=(0,Mde.default)(v,x);if(JSON.stringify(N)===JSON.stringify(R))continue;if(!o){let U=typeof N>"u"?`Missing field ${de.pretty(t.configuration,x,de.Type.CODE)}; expected ${de.pretty(t.configuration,R,de.Type.INSPECT)}`:typeof R>"u"?`Extraneous field ${de.pretty(t.configuration,x,de.Type.CODE)} currently set to ${de.pretty(t.configuration,N,de.Type.INSPECT)}`:`Invalid field ${de.pretty(t.configuration,x,de.Type.CODE)}; expected ${de.pretty(t.configuration,R,de.Type.INSPECT)}, found ${de.pretty(t.configuration,N,de.Type.INSPECT)}`;h.push({text:U,fixable:!0});continue}typeof R>"u"?(0,Hde.default)(v,x):(0,Ude.default)(v,x,R),E=!0}E&&a.set(I,v)}h.length>0&&n.set(I,h)}return{changedWorkspaces:a,remainingErrors:n}}function qde(t,{configuration:e}){let r={children:[]};for(let[o,a]of t){let n=[];for(let A of a){let p=A.text.split(/\n/);A.fixable&&(p[0]=`${de.pretty(e,"\u2699","gray")} ${p[0]}`),n.push({value:de.tuple(de.Type.NO_HINT,p[0]),children:p.slice(1).map(h=>({value:de.tuple(de.Type.NO_HINT,h)}))})}let u={value:de.tuple(de.Type.LOCATOR,o.anchoredLocator),children:_e.sortMap(n,A=>A.value[1])};r.children.push(u)}return r.children=_e.sortMap(r.children,o=>o.value[1]),r}var Mde,Ude,_de,Hde,wC,Mgt,Ugt,_gt,v2=Et(()=>{Ye();Mde=$e(d2()),Ude=$e(Q8()),_de=$e(Ode()),Hde=$e(T8()),wC=class{constructor(e){this.indexedFields=e;this.items=[];this.indexes={};this.clear()}clear(){this.items=[];for(let e of this.indexedFields)this.indexes[e]=new Map}insert(e){this.items.push(e);for(let r of this.indexedFields){let o=Object.hasOwn(e,r)?e[r]:void 0;if(typeof o>"u")continue;_e.getArrayWithDefault(this.indexes[r],o).push(e)}return e}find(e){if(typeof e>"u")return this.items;let r=Object.entries(e);if(r.length===0)return this.items;let o=[],a;for(let[u,A]of r){let p=u,h=Object.hasOwn(this.indexes,p)?this.indexes[p]:void 0;if(typeof h>"u"){o.push([p,A]);continue}let E=new Set(h.get(A)??[]);if(E.size===0)return[];if(typeof a>"u")a=E;else for(let I of a)E.has(I)||a.delete(I);if(a.size===0)break}let n=[...a??[]];return o.length>0&&(n=n.filter(u=>{for(let[A,p]of o)if(!(typeof p<"u"?Object.hasOwn(u,A)&&u[A]===p:Object.hasOwn(u,A)===!1))return!1;return!0})),n}},Mgt=/^[0-9]+$/,Ugt=/^[a-zA-Z0-9_]+$/,_gt=new Set(["scripts",...Ot.allDependencies])});var Gde=_((e7t,sH)=>{var Ggt;(function(t){var e=function(){return{"append/2":[new t.type.Rule(new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("L")]),new t.type.Term("foldl",[new t.type.Term("append",[]),new t.type.Var("X"),new t.type.Term("[]",[]),new t.type.Var("L")]))],"append/3":[new t.type.Rule(new t.type.Term("append",[new t.type.Term("[]",[]),new t.type.Var("X"),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("append",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("append",[new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("S")]))],"member/2":[new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("_")])]),null),new t.type.Rule(new t.type.Term("member",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")])]),new t.type.Term("member",[new t.type.Var("X"),new t.type.Var("Xs")]))],"permutation/2":[new t.type.Rule(new t.type.Term("permutation",[new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("permutation",[new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("permutation",[new t.type.Var("T"),new t.type.Var("P")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("P")]),new t.type.Term("append",[new t.type.Var("X"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("Y")]),new t.type.Var("S")])])]))],"maplist/2":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("X")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("Xs")])]))],"maplist/3":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs")])]))],"maplist/4":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs")])]))],"maplist/5":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds")])]))],"maplist/6":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es")])]))],"maplist/7":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")]),new t.type.Term(".",[new t.type.Var("F"),new t.type.Var("Fs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E"),new t.type.Var("F")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es"),new t.type.Var("Fs")])]))],"maplist/8":[new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("A"),new t.type.Var("As")]),new t.type.Term(".",[new t.type.Var("B"),new t.type.Var("Bs")]),new t.type.Term(".",[new t.type.Var("C"),new t.type.Var("Cs")]),new t.type.Term(".",[new t.type.Var("D"),new t.type.Var("Ds")]),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Es")]),new t.type.Term(".",[new t.type.Var("F"),new t.type.Var("Fs")]),new t.type.Term(".",[new t.type.Var("G"),new t.type.Var("Gs")])]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P"),new t.type.Var("A"),new t.type.Var("B"),new t.type.Var("C"),new t.type.Var("D"),new t.type.Var("E"),new t.type.Var("F"),new t.type.Var("G")]),new t.type.Term("maplist",[new t.type.Var("P"),new t.type.Var("As"),new t.type.Var("Bs"),new t.type.Var("Cs"),new t.type.Var("Ds"),new t.type.Var("Es"),new t.type.Var("Fs"),new t.type.Var("Gs")])]))],"include/3":[new t.type.Rule(new t.type.Term("include",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("include",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("A")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("A"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term("[]",[])]),new t.type.Var("B")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("F"),new t.type.Var("B")]),new t.type.Term(",",[new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("F")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("S")])]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("L"),new t.type.Var("S")])]),new t.type.Term("include",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("S")])])])])]))],"exclude/3":[new t.type.Rule(new t.type.Term("exclude",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Term("[]",[])]),null),new t.type.Rule(new t.type.Term("exclude",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("exclude",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("E")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term("[]",[])]),new t.type.Var("Q")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("R"),new t.type.Var("Q")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("R")]),new t.type.Term(",",[new t.type.Term("!",[]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("E")])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("E")])])])])])])]))],"foldl/4":[new t.type.Rule(new t.type.Term("foldl",[new t.type.Var("_"),new t.type.Term("[]",[]),new t.type.Var("I"),new t.type.Var("I")]),null),new t.type.Rule(new t.type.Term("foldl",[new t.type.Var("P"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Var("T")]),new t.type.Var("I"),new t.type.Var("R")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P"),new t.type.Var("L")]),new t.type.Term(",",[new t.type.Term("append",[new t.type.Var("L"),new t.type.Term(".",[new t.type.Var("I"),new t.type.Term(".",[new t.type.Var("H"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])])])]),new t.type.Var("L2")]),new t.type.Term(",",[new t.type.Term("=..",[new t.type.Var("P2"),new t.type.Var("L2")]),new t.type.Term(",",[new t.type.Term("call",[new t.type.Var("P2")]),new t.type.Term("foldl",[new t.type.Var("P"),new t.type.Var("T"),new t.type.Var("X"),new t.type.Var("R")])])])])]))],"select/3":[new t.type.Rule(new t.type.Term("select",[new t.type.Var("E"),new t.type.Term(".",[new t.type.Var("E"),new t.type.Var("Xs")]),new t.type.Var("Xs")]),null),new t.type.Rule(new t.type.Term("select",[new t.type.Var("E"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Ys")])]),new t.type.Term("select",[new t.type.Var("E"),new t.type.Var("Xs"),new t.type.Var("Ys")]))],"sum_list/2":[new t.type.Rule(new t.type.Term("sum_list",[new t.type.Term("[]",[]),new t.type.Num(0,!1)]),null),new t.type.Rule(new t.type.Term("sum_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("sum_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term("is",[new t.type.Var("S"),new t.type.Term("+",[new t.type.Var("X"),new t.type.Var("Y")])])]))],"max_list/2":[new t.type.Rule(new t.type.Term("max_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("max_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("max_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Var("Y")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("X")]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("Y")])])]))],"min_list/2":[new t.type.Rule(new t.type.Term("min_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("min_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("min_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term(";",[new t.type.Term(",",[new t.type.Term("=<",[new t.type.Var("X"),new t.type.Var("Y")]),new t.type.Term(",",[new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("X")]),new t.type.Term("!",[])])]),new t.type.Term("=",[new t.type.Var("S"),new t.type.Var("Y")])])]))],"prod_list/2":[new t.type.Rule(new t.type.Term("prod_list",[new t.type.Term("[]",[]),new t.type.Num(1,!1)]),null),new t.type.Rule(new t.type.Term("prod_list",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("S")]),new t.type.Term(",",[new t.type.Term("prod_list",[new t.type.Var("Xs"),new t.type.Var("Y")]),new t.type.Term("is",[new t.type.Var("S"),new t.type.Term("*",[new t.type.Var("X"),new t.type.Var("Y")])])]))],"last/2":[new t.type.Rule(new t.type.Term("last",[new t.type.Term(".",[new t.type.Var("X"),new t.type.Term("[]",[])]),new t.type.Var("X")]),null),new t.type.Rule(new t.type.Term("last",[new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("Xs")]),new t.type.Var("X")]),new t.type.Term("last",[new t.type.Var("Xs"),new t.type.Var("X")]))],"prefix/2":[new t.type.Rule(new t.type.Term("prefix",[new t.type.Var("Part"),new t.type.Var("Whole")]),new t.type.Term("append",[new t.type.Var("Part"),new t.type.Var("_"),new t.type.Var("Whole")]))],"nth0/3":[new t.type.Rule(new t.type.Term("nth0",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")])]),new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")]),new t.type.Term("!",[])])])]))],"nth1/3":[new t.type.Rule(new t.type.Term("nth1",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")])]),new t.type.Term(",",[new t.type.Term(">",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("_")]),new t.type.Term("!",[])])])]))],"nth0/4":[new t.type.Rule(new t.type.Term("nth0",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")])]),new t.type.Term(",",[new t.type.Term(">=",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(0,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term("!",[])])])]))],"nth1/4":[new t.type.Rule(new t.type.Term("nth1",[new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term(";",[new t.type.Term("->",[new t.type.Term("var",[new t.type.Var("X")]),new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")])]),new t.type.Term(",",[new t.type.Term(">",[new t.type.Var("X"),new t.type.Num(0,!1)]),new t.type.Term(",",[new t.type.Term("nth",[new t.type.Num(1,!1),new t.type.Var("X"),new t.type.Var("Y"),new t.type.Var("Z"),new t.type.Var("W")]),new t.type.Term("!",[])])])]))],"nth/5":[new t.type.Rule(new t.type.Term("nth",[new t.type.Var("N"),new t.type.Var("N"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("X"),new t.type.Var("Xs")]),null),new t.type.Rule(new t.type.Term("nth",[new t.type.Var("N"),new t.type.Var("O"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Xs")]),new t.type.Var("Y"),new t.type.Term(".",[new t.type.Var("X"),new t.type.Var("Ys")])]),new t.type.Term(",",[new t.type.Term("is",[new t.type.Var("M"),new t.type.Term("+",[new t.type.Var("N"),new t.type.Num(1,!1)])]),new t.type.Term("nth",[new t.type.Var("M"),new t.type.Var("O"),new t.type.Var("Xs"),new t.type.Var("Y"),new t.type.Var("Ys")])]))],"length/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(!t.type.is_variable(A)&&!t.type.is_integer(A))o.throw_error(t.error.type("integer",A,n.indicator));else if(t.type.is_integer(A)&&A.value<0)o.throw_error(t.error.domain("not_less_than_zero",A,n.indicator));else{var p=new t.type.Term("length",[u,new t.type.Num(0,!1),A]);t.type.is_integer(A)&&(p=new t.type.Term(",",[p,new t.type.Term("!",[])])),o.prepend([new t.type.State(a.goal.replace(p),a.substitution,a)])}},"length/3":[new t.type.Rule(new t.type.Term("length",[new t.type.Term("[]",[]),new t.type.Var("N"),new t.type.Var("N")]),null),new t.type.Rule(new t.type.Term("length",[new t.type.Term(".",[new t.type.Var("_"),new t.type.Var("X")]),new t.type.Var("A"),new t.type.Var("N")]),new t.type.Term(",",[new t.type.Term("succ",[new t.type.Var("A"),new t.type.Var("B")]),new t.type.Term("length",[new t.type.Var("X"),new t.type.Var("B"),new t.type.Var("N")])]))],"replicate/3":function(o,a,n){var u=n.args[0],A=n.args[1],p=n.args[2];if(t.type.is_variable(A))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_integer(A))o.throw_error(t.error.type("integer",A,n.indicator));else if(A.value<0)o.throw_error(t.error.domain("not_less_than_zero",A,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))o.throw_error(t.error.type("list",p,n.indicator));else{for(var h=new t.type.Term("[]"),E=0;E0;I--)E[I].equals(E[I-1])&&E.splice(I,1);for(var v=new t.type.Term("[]"),I=E.length-1;I>=0;I--)v=new t.type.Term(".",[E[I],v]);o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[v,A])),a.substitution,a)])}}},"msort/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(A)&&!t.type.is_fully_list(A))o.throw_error(t.error.type("list",A,n.indicator));else{for(var p=[],h=u;h.indicator==="./2";)p.push(h.args[0]),h=h.args[1];if(t.type.is_variable(h))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(h))o.throw_error(t.error.type("list",u,n.indicator));else{for(var E=p.sort(t.compare),I=new t.type.Term("[]"),v=E.length-1;v>=0;v--)I=new t.type.Term(".",[E[v],I]);o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[I,A])),a.substitution,a)])}}},"keysort/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(A)&&!t.type.is_fully_list(A))o.throw_error(t.error.type("list",A,n.indicator));else{for(var p=[],h,E=u;E.indicator==="./2";){if(h=E.args[0],t.type.is_variable(h)){o.throw_error(t.error.instantiation(n.indicator));return}else if(!t.type.is_term(h)||h.indicator!=="-/2"){o.throw_error(t.error.type("pair",h,n.indicator));return}h.args[0].pair=h.args[1],p.push(h.args[0]),E=E.args[1]}if(t.type.is_variable(E))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_empty_list(E))o.throw_error(t.error.type("list",u,n.indicator));else{for(var I=p.sort(t.compare),v=new t.type.Term("[]"),x=I.length-1;x>=0;x--)v=new t.type.Term(".",[new t.type.Term("-",[I[x],I[x].pair]),v]),delete I[x].pair;o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[v,A])),a.substitution,a)])}}},"take/3":function(o,a,n){var u=n.args[0],A=n.args[1],p=n.args[2];if(t.type.is_variable(A)||t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(A))o.throw_error(t.error.type("list",A,n.indicator));else if(!t.type.is_integer(u))o.throw_error(t.error.type("integer",u,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))o.throw_error(t.error.type("list",p,n.indicator));else{for(var h=u.value,E=[],I=A;h>0&&I.indicator==="./2";)E.push(I.args[0]),I=I.args[1],h--;if(h===0){for(var v=new t.type.Term("[]"),h=E.length-1;h>=0;h--)v=new t.type.Term(".",[E[h],v]);o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[v,p])),a.substitution,a)])}}},"drop/3":function(o,a,n){var u=n.args[0],A=n.args[1],p=n.args[2];if(t.type.is_variable(A)||t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_list(A))o.throw_error(t.error.type("list",A,n.indicator));else if(!t.type.is_integer(u))o.throw_error(t.error.type("integer",u,n.indicator));else if(!t.type.is_variable(p)&&!t.type.is_list(p))o.throw_error(t.error.type("list",p,n.indicator));else{for(var h=u.value,E=[],I=A;h>0&&I.indicator==="./2";)E.push(I.args[0]),I=I.args[1],h--;h===0&&o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[I,p])),a.substitution,a)])}},"reverse/2":function(o,a,n){var u=n.args[0],A=n.args[1],p=t.type.is_instantiated_list(u),h=t.type.is_instantiated_list(A);if(t.type.is_variable(u)&&t.type.is_variable(A))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_variable(u)&&!t.type.is_fully_list(u))o.throw_error(t.error.type("list",u,n.indicator));else if(!t.type.is_variable(A)&&!t.type.is_fully_list(A))o.throw_error(t.error.type("list",A,n.indicator));else if(!p&&!h)o.throw_error(t.error.instantiation(n.indicator));else{for(var E=p?u:A,I=new t.type.Term("[]",[]);E.indicator==="./2";)I=new t.type.Term(".",[E.args[0],I]),E=E.args[1];o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[I,p?A:u])),a.substitution,a)])}},"list_to_set/2":function(o,a,n){var u=n.args[0],A=n.args[1];if(t.type.is_variable(u))o.throw_error(t.error.instantiation(n.indicator));else{for(var p=u,h=[];p.indicator==="./2";)h.push(p.args[0]),p=p.args[1];if(t.type.is_variable(p))o.throw_error(t.error.instantiation(n.indicator));else if(!t.type.is_term(p)||p.indicator!=="[]/0")o.throw_error(t.error.type("list",u,n.indicator));else{for(var E=[],I=new t.type.Term("[]",[]),v,x=0;x=0;x--)I=new t.type.Term(".",[E[x],I]);o.prepend([new t.type.State(a.goal.replace(new t.type.Term("=",[A,I])),a.substitution,a)])}}}}},r=["append/2","append/3","member/2","permutation/2","maplist/2","maplist/3","maplist/4","maplist/5","maplist/6","maplist/7","maplist/8","include/3","exclude/3","foldl/4","sum_list/2","max_list/2","min_list/2","prod_list/2","last/2","prefix/2","nth0/3","nth1/3","nth0/4","nth1/4","length/2","replicate/3","select/3","sort/2","msort/2","keysort/2","take/3","drop/3","reverse/2","list_to_set/2"];typeof sH<"u"?sH.exports=function(o){t=o,new t.type.Module("lists",e(),r)}:new t.type.Module("lists",e(),r)})(Ggt)});var ime=_(Yr=>{"use strict";var em=process.platform==="win32",oH="aes-256-cbc",jgt="sha256",Wde="The current environment doesn't support interactive reading from TTY.",Yn=ve("fs"),jde=process.binding("tty_wrap").TTY,lH=ve("child_process"),u0=ve("path"),cH={prompt:"> ",hideEchoBack:!1,mask:"*",limit:[],limitMessage:"Input another, please.$<( [)limit(])>",defaultInput:"",trueValue:[],falseValue:[],caseSensitive:!1,keepWhitespace:!1,encoding:"utf8",bufferSize:1024,print:void 0,history:!0,cd:!1,phContent:void 0,preCheck:void 0},Jf="none",Zc,BC,Yde=!1,c0,mk,aH,Ygt=0,hH="",$d=[],yk,Kde=!1,uH=!1,D2=!1;function zde(t){function e(r){return r.replace(/[^\w\u0080-\uFFFF]/g,function(o){return"#"+o.charCodeAt(0)+";"})}return mk.concat(function(r){var o=[];return Object.keys(r).forEach(function(a){r[a]==="boolean"?t[a]&&o.push("--"+a):r[a]==="string"&&t[a]&&o.push("--"+a,e(t[a]))}),o}({display:"string",displayOnly:"boolean",keyIn:"boolean",hideEchoBack:"boolean",mask:"string",limit:"string",caseSensitive:"boolean"}))}function Wgt(t,e){function r(U){var V,te="",ae;for(aH=aH||ve("os").tmpdir();;){V=u0.join(aH,U+te);try{ae=Yn.openSync(V,"wx")}catch(fe){if(fe.code==="EEXIST"){te++;continue}else throw fe}Yn.closeSync(ae);break}return V}var o,a,n,u={},A,p,h=r("readline-sync.stdout"),E=r("readline-sync.stderr"),I=r("readline-sync.exit"),v=r("readline-sync.done"),x=ve("crypto"),C,R,N;C=x.createHash(jgt),C.update(""+process.pid+Ygt+++Math.random()),N=C.digest("hex"),R=x.createDecipher(oH,N),o=zde(t),em?(a=process.env.ComSpec||"cmd.exe",process.env.Q='"',n=["/V:ON","/S","/C","(%Q%"+a+"%Q% /V:ON /S /C %Q%%Q%"+c0+"%Q%"+o.map(function(U){return" %Q%"+U+"%Q%"}).join("")+" & (echo !ERRORLEVEL!)>%Q%"+I+"%Q%%Q%) 2>%Q%"+E+"%Q% |%Q%"+process.execPath+"%Q% %Q%"+__dirname+"\\encrypt.js%Q% %Q%"+oH+"%Q% %Q%"+N+"%Q% >%Q%"+h+"%Q% & (echo 1)>%Q%"+v+"%Q%"]):(a="/bin/sh",n=["-c",'("'+c0+'"'+o.map(function(U){return" '"+U.replace(/'/g,"'\\''")+"'"}).join("")+'; echo $?>"'+I+'") 2>"'+E+'" |"'+process.execPath+'" "'+__dirname+'/encrypt.js" "'+oH+'" "'+N+'" >"'+h+'"; echo 1 >"'+v+'"']),D2&&D2("_execFileSync",o);try{lH.spawn(a,n,e)}catch(U){u.error=new Error(U.message),u.error.method="_execFileSync - spawn",u.error.program=a,u.error.args=n}for(;Yn.readFileSync(v,{encoding:t.encoding}).trim()!=="1";);return(A=Yn.readFileSync(I,{encoding:t.encoding}).trim())==="0"?u.input=R.update(Yn.readFileSync(h,{encoding:"binary"}),"hex",t.encoding)+R.final(t.encoding):(p=Yn.readFileSync(E,{encoding:t.encoding}).trim(),u.error=new Error(Wde+(p?` `+p:"")),u.error.method="_execFileSync",u.error.program=a,u.error.args=n,u.error.extMessage=p,u.error.exitCode=+A),Yn.unlinkSync(h),Yn.unlinkSync(E),Yn.unlinkSync(I),Yn.unlinkSync(v),u}function Kgt(t){var e,r={},o,a={env:process.env,encoding:t.encoding};if(c0||(em?process.env.PSModulePath?(c0="powershell.exe",mk=["-ExecutionPolicy","Bypass","-File",__dirname+"\\read.ps1"]):(c0="cscript.exe",mk=["//nologo",__dirname+"\\read.cs.js"]):(c0="/bin/sh",mk=[__dirname+"/read.sh"])),em&&!process.env.PSModulePath&&(a.stdio=[process.stdin]),lH.execFileSync){e=zde(t),D2&&D2("execFileSync",e);try{r.input=lH.execFileSync(c0,e,a)}catch(n){o=n.stderr?(n.stderr+"").trim():"",r.error=new Error(Wde+(o?` `+o:"")),r.error.method="execFileSync",r.error.program=c0,r.error.args=e,r.error.extMessage=o,r.error.exitCode=n.status,r.error.code=n.code,r.error.signal=n.signal}}else r=Wgt(t,a);return r.error||(r.input=r.input.replace(/^\s*'|'\s*$/g,""),t.display=""),r}function AH(t){var e="",r=t.display,o=!t.display&&t.keyIn&&t.hideEchoBack&&!t.mask;function a(){var n=Kgt(t);if(n.error)throw n.error;return n.input}return uH&&uH(t),function(){var n,u,A;function p(){return n||(n=process.binding("fs"),u=process.binding("constants")),n}if(typeof Jf=="string")if(Jf=null,em){if(A=function(h){var E=h.replace(/^\D+/,"").split("."),I=0;return(E[0]=+E[0])&&(I+=E[0]*1e4),(E[1]=+E[1])&&(I+=E[1]*100),(E[2]=+E[2])&&(I+=E[2]),I}(process.version),!(A>=20302&&A<40204||A>=5e4&&A<50100||A>=50600&&A<60200)&&process.stdin.isTTY)process.stdin.pause(),Jf=process.stdin.fd,BC=process.stdin._handle;else try{Jf=p().open("CONIN$",u.O_RDWR,parseInt("0666",8)),BC=new jde(Jf,!0)}catch{}if(process.stdout.isTTY)Zc=process.stdout.fd;else{try{Zc=Yn.openSync("\\\\.\\CON","w")}catch{}if(typeof Zc!="number")try{Zc=p().open("CONOUT$",u.O_RDWR,parseInt("0666",8))}catch{}}}else{if(process.stdin.isTTY){process.stdin.pause();try{Jf=Yn.openSync("/dev/tty","r"),BC=process.stdin._handle}catch{}}else try{Jf=Yn.openSync("/dev/tty","r"),BC=new jde(Jf,!1)}catch{}if(process.stdout.isTTY)Zc=process.stdout.fd;else try{Zc=Yn.openSync("/dev/tty","w")}catch{}}}(),function(){var n,u,A=!t.hideEchoBack&&!t.keyIn,p,h,E,I,v;yk="";function x(C){return C===Yde?!0:BC.setRawMode(C)!==0?!1:(Yde=C,!0)}if(Kde||!BC||typeof Zc!="number"&&(t.display||!A)){e=a();return}if(t.display&&(Yn.writeSync(Zc,t.display),t.display=""),!t.displayOnly){if(!x(!A)){e=a();return}for(h=t.keyIn?1:t.bufferSize,p=Buffer.allocUnsafe&&Buffer.alloc?Buffer.alloc(h):new Buffer(h),t.keyIn&&t.limit&&(u=new RegExp("[^"+t.limit+"]","g"+(t.caseSensitive?"":"i")));;){E=0;try{E=Yn.readSync(Jf,p,0,h)}catch(C){if(C.code!=="EOF"){x(!1),e+=a();return}}if(E>0?(I=p.toString(t.encoding,0,E),yk+=I):(I=` `,yk+=String.fromCharCode(0)),I&&typeof(v=(I.match(/^(.*?)[\r\n]/)||[])[1])=="string"&&(I=v,n=!0),I&&(I=I.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f]/g,"")),I&&u&&(I=I.replace(u,"")),I&&(A||(t.hideEchoBack?t.mask&&Yn.writeSync(Zc,new Array(I.length+1).join(t.mask)):Yn.writeSync(Zc,I)),e+=I),!t.keyIn&&n||t.keyIn&&e.length>=h)break}!A&&!o&&Yn.writeSync(Zc,` `),x(!1)}}(),t.print&&!o&&t.print(r+(t.displayOnly?"":(t.hideEchoBack?new Array(e.length+1).join(t.mask):e)+` `),t.encoding),t.displayOnly?"":hH=t.keepWhitespace||t.keyIn?e:e.trim()}function zgt(t,e){var r=[];function o(a){a!=null&&(Array.isArray(a)?a.forEach(o):(!e||e(a))&&r.push(a))}return o(t),r}function gH(t){return t.replace(/[\x00-\x7f]/g,function(e){return"\\x"+("00"+e.charCodeAt().toString(16)).substr(-2)})}function Rs(){var t=Array.prototype.slice.call(arguments),e,r;return t.length&&typeof t[0]=="boolean"&&(r=t.shift(),r&&(e=Object.keys(cH),t.unshift(cH))),t.reduce(function(o,a){return a==null||(a.hasOwnProperty("noEchoBack")&&!a.hasOwnProperty("hideEchoBack")&&(a.hideEchoBack=a.noEchoBack,delete a.noEchoBack),a.hasOwnProperty("noTrim")&&!a.hasOwnProperty("keepWhitespace")&&(a.keepWhitespace=a.noTrim,delete a.noTrim),r||(e=Object.keys(a)),e.forEach(function(n){var u;if(!!a.hasOwnProperty(n))switch(u=a[n],n){case"mask":case"limitMessage":case"defaultInput":case"encoding":u=u!=null?u+"":"",u&&n!=="limitMessage"&&(u=u.replace(/[\r\n]/g,"")),o[n]=u;break;case"bufferSize":!isNaN(u=parseInt(u,10))&&typeof u=="number"&&(o[n]=u);break;case"displayOnly":case"keyIn":case"hideEchoBack":case"caseSensitive":case"keepWhitespace":case"history":case"cd":o[n]=!!u;break;case"limit":case"trueValue":case"falseValue":o[n]=zgt(u,function(A){var p=typeof A;return p==="string"||p==="number"||p==="function"||A instanceof RegExp}).map(function(A){return typeof A=="string"?A.replace(/[\r\n]/g,""):A});break;case"print":case"phContent":case"preCheck":o[n]=typeof u=="function"?u:void 0;break;case"prompt":case"display":o[n]=u??"";break}})),o},{})}function fH(t,e,r){return e.some(function(o){var a=typeof o;return a==="string"?r?t===o:t.toLowerCase()===o.toLowerCase():a==="number"?parseFloat(t)===o:a==="function"?o(t):o instanceof RegExp?o.test(t):!1})}function dH(t,e){var r=u0.normalize(em?(process.env.HOMEDRIVE||"")+(process.env.HOMEPATH||""):process.env.HOME||"").replace(/[\/\\]+$/,"");return t=u0.normalize(t),e?t.replace(/^~(?=\/|\\|$)/,r):t.replace(new RegExp("^"+gH(r)+"(?=\\/|\\\\|$)",em?"i":""),"~")}function vC(t,e){var r="(?:\\(([\\s\\S]*?)\\))?(\\w+|.-.)(?:\\(([\\s\\S]*?)\\))?",o=new RegExp("(\\$)?(\\$<"+r+">)","g"),a=new RegExp("(\\$)?(\\$\\{"+r+"\\})","g");function n(u,A,p,h,E,I){var v;return A||typeof(v=e(E))!="string"?p:v?(h||"")+v+(I||""):""}return t.replace(o,n).replace(a,n)}function Vde(t,e,r){var o,a=[],n=-1,u=0,A="",p;function h(E,I){return I.length>3?(E.push(I[0]+"..."+I[I.length-1]),p=!0):I.length&&(E=E.concat(I)),E}return o=t.reduce(function(E,I){return E.concat((I+"").split(""))},[]).reduce(function(E,I){var v,x;return e||(I=I.toLowerCase()),v=/^\d$/.test(I)?1:/^[A-Z]$/.test(I)?2:/^[a-z]$/.test(I)?3:0,r&&v===0?A+=I:(x=I.charCodeAt(0),v&&v===n&&x===u+1?a.push(I):(E=h(E,a),a=[I],n=v),u=x),E},[]),o=h(o,a),A&&(o.push(A),p=!0),{values:o,suppressed:p}}function Jde(t,e){return t.join(t.length>2?", ":e?" / ":"/")}function Xde(t,e){var r,o,a={},n;if(e.phContent&&(r=e.phContent(t,e)),typeof r!="string")switch(t){case"hideEchoBack":case"mask":case"defaultInput":case"caseSensitive":case"keepWhitespace":case"encoding":case"bufferSize":case"history":case"cd":r=e.hasOwnProperty(t)?typeof e[t]=="boolean"?e[t]?"on":"off":e[t]+"":"";break;case"limit":case"trueValue":case"falseValue":o=e[e.hasOwnProperty(t+"Src")?t+"Src":t],e.keyIn?(a=Vde(o,e.caseSensitive),o=a.values):o=o.filter(function(u){var A=typeof u;return A==="string"||A==="number"}),r=Jde(o,a.suppressed);break;case"limitCount":case"limitCountNotZero":r=e[e.hasOwnProperty("limitSrc")?"limitSrc":"limit"].length,r=r||t!=="limitCountNotZero"?r+"":"";break;case"lastInput":r=hH;break;case"cwd":case"CWD":case"cwdHome":r=process.cwd(),t==="CWD"?r=u0.basename(r):t==="cwdHome"&&(r=dH(r));break;case"date":case"time":case"localeDate":case"localeTime":r=new Date()["to"+t.replace(/^./,function(u){return u.toUpperCase()})+"String"]();break;default:typeof(n=(t.match(/^history_m(\d+)$/)||[])[1])=="string"&&(r=$d[$d.length-n]||"")}return r}function Zde(t){var e=/^(.)-(.)$/.exec(t),r="",o,a,n,u;if(!e)return null;for(o=e[1].charCodeAt(0),a=e[2].charCodeAt(0),u=o And the length must be: $`,trueValue:null,falseValue:null,caseSensitive:!0},e,{history:!1,cd:!1,phContent:function(x){return x==="charlist"?r.text:x==="length"?o+"..."+a:null}}),u,A,p,h,E,I,v;for(e=e||{},u=vC(e.charlist?e.charlist+"":"$",Zde),(isNaN(o=parseInt(e.min,10))||typeof o!="number")&&(o=12),(isNaN(a=parseInt(e.max,10))||typeof a!="number")&&(a=24),h=new RegExp("^["+gH(u)+"]{"+o+","+a+"}$"),r=Vde([u],n.caseSensitive,!0),r.text=Jde(r.values,r.suppressed),A=e.confirmMessage!=null?e.confirmMessage:"Reinput a same one to confirm it: ",p=e.unmatchMessage!=null?e.unmatchMessage:"It differs from first one. Hit only the Enter key if you want to retry from first one.",t==null&&(t="Input new password: "),E=n.limitMessage;!v;)n.limit=h,n.limitMessage=E,I=Yr.question(t,n),n.limit=[I,""],n.limitMessage=p,v=Yr.question(A,n);return I};function tme(t,e,r){var o;function a(n){return o=r(n),!isNaN(o)&&typeof o=="number"}return Yr.question(t,Rs({limitMessage:"Input valid number, please."},e,{limit:a,cd:!1})),o}Yr.questionInt=function(t,e){return tme(t,e,function(r){return parseInt(r,10)})};Yr.questionFloat=function(t,e){return tme(t,e,parseFloat)};Yr.questionPath=function(t,e){var r,o="",a=Rs({hideEchoBack:!1,limitMessage:`$Input valid path, please.$<( Min:)min>$<( Max:)max>`,history:!0,cd:!0},e,{keepWhitespace:!1,limit:function(n){var u,A,p;n=dH(n,!0),o="";function h(E){E.split(/\/|\\/).reduce(function(I,v){var x=u0.resolve(I+=v+u0.sep);if(!Yn.existsSync(x))Yn.mkdirSync(x);else if(!Yn.statSync(x).isDirectory())throw new Error("Non directory already exists: "+x);return I},"")}try{if(u=Yn.existsSync(n),r=u?Yn.realpathSync(n):u0.resolve(n),!e.hasOwnProperty("exists")&&!u||typeof e.exists=="boolean"&&e.exists!==u)return o=(u?"Already exists":"No such file or directory")+": "+r,!1;if(!u&&e.create&&(e.isDirectory?h(r):(h(u0.dirname(r)),Yn.closeSync(Yn.openSync(r,"w"))),r=Yn.realpathSync(r)),u&&(e.min||e.max||e.isFile||e.isDirectory)){if(A=Yn.statSync(r),e.isFile&&!A.isFile())return o="Not file: "+r,!1;if(e.isDirectory&&!A.isDirectory())return o="Not directory: "+r,!1;if(e.min&&A.size<+e.min||e.max&&A.size>+e.max)return o="Size "+A.size+" is out of range: "+r,!1}if(typeof e.validate=="function"&&(p=e.validate(r))!==!0)return typeof p=="string"&&(o=p),!1}catch(E){return o=E+"",!1}return!0},phContent:function(n){return n==="error"?o:n!=="min"&&n!=="max"?null:e.hasOwnProperty(n)?e[n]+"":""}});return e=e||{},t==null&&(t='Input path (you can "cd" and "pwd"): '),Yr.question(t,a),r};function rme(t,e){var r={},o={};return typeof t=="object"?(Object.keys(t).forEach(function(a){typeof t[a]=="function"&&(o[e.caseSensitive?a:a.toLowerCase()]=t[a])}),r.preCheck=function(a){var n;return r.args=pH(a),n=r.args[0]||"",e.caseSensitive||(n=n.toLowerCase()),r.hRes=n!=="_"&&o.hasOwnProperty(n)?o[n].apply(a,r.args.slice(1)):o.hasOwnProperty("_")?o._.apply(a,r.args):null,{res:a,forceNext:!1}},o.hasOwnProperty("_")||(r.limit=function(){var a=r.args[0]||"";return e.caseSensitive||(a=a.toLowerCase()),o.hasOwnProperty(a)})):r.preCheck=function(a){return r.args=pH(a),r.hRes=typeof t=="function"?t.apply(a,r.args):!0,{res:a,forceNext:!1}},r}Yr.promptCL=function(t,e){var r=Rs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=rme(t,r);return r.limit=o.limit,r.preCheck=o.preCheck,Yr.prompt(r),o.args};Yr.promptLoop=function(t,e){for(var r=Rs({hideEchoBack:!1,trueValue:null,falseValue:null,caseSensitive:!1,history:!0},e);!t(Yr.prompt(r)););};Yr.promptCLLoop=function(t,e){var r=Rs({hideEchoBack:!1,limitMessage:"Requested command is not available.",caseSensitive:!1,history:!0},e),o=rme(t,r);for(r.limit=o.limit,r.preCheck=o.preCheck;Yr.prompt(r),!o.hRes;);};Yr.promptSimShell=function(t){return Yr.prompt(Rs({hideEchoBack:!1,history:!0},t,{prompt:function(){return em?"$>":(process.env.USER||"")+(process.env.HOSTNAME?"@"+process.env.HOSTNAME.replace(/\..*$/,""):"")+":$$ "}()}))};function nme(t,e,r){var o;return t==null&&(t="Are you sure? "),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s*:?\s*$/,"")+" [y/n]: "),o=Yr.keyIn(t,Rs(e,{hideEchoBack:!1,limit:r,trueValue:"y",falseValue:"n",caseSensitive:!1})),typeof o=="boolean"?o:""}Yr.keyInYN=function(t,e){return nme(t,e)};Yr.keyInYNStrict=function(t,e){return nme(t,e,"yn")};Yr.keyInPause=function(t,e){t==null&&(t="Continue..."),(!e||e.guide!==!1)&&(t+="")&&(t=t.replace(/\s+$/,"")+" (Hit any key)"),Yr.keyIn(t,Rs({limit:null},e,{hideEchoBack:!0,mask:""}))};Yr.keyInSelect=function(t,e,r){var o=Rs({hideEchoBack:!1},r,{trueValue:null,falseValue:null,caseSensitive:!1,phContent:function(p){return p==="itemsCount"?t.length+"":p==="firstItem"?(t[0]+"").trim():p==="lastItem"?(t[t.length-1]+"").trim():null}}),a="",n={},u=49,A=` `;if(!Array.isArray(t)||!t.length||t.length>35)throw"`items` must be Array (max length: 35).";return t.forEach(function(p,h){var E=String.fromCharCode(u);a+=E,n[E]=h,A+="["+E+"] "+(p+"").trim()+` `,u=u===57?97:u+1}),(!r||r.cancel!==!1)&&(a+="0",n[0]=-1,A+="[0] "+(r&&r.cancel!=null&&typeof r.cancel!="boolean"?(r.cancel+"").trim():"CANCEL")+` `),o.limit=a,A+=` `,e==null&&(e="Choose one from list: "),(e+="")&&((!r||r.guide!==!1)&&(e=e.replace(/\s*:?\s*$/,"")+" [$]: "),A+=e),n[Yr.keyIn(A,o).toLowerCase()]};Yr.getRawInput=function(){return yk};function P2(t,e){var r;return e.length&&(r={},r[t]=e[0]),Yr.setDefaultOptions(r)[t]}Yr.setPrint=function(){return P2("print",arguments)};Yr.setPrompt=function(){return P2("prompt",arguments)};Yr.setEncoding=function(){return P2("encoding",arguments)};Yr.setMask=function(){return P2("mask",arguments)};Yr.setBufferSize=function(){return P2("bufferSize",arguments)}});var mH=_((r7t,gl)=>{(function(){var t={major:0,minor:2,patch:66,status:"beta"};tau_file_system={files:{},open:function(w,S,y){var F=tau_file_system.files[w];if(!F){if(y==="read")return null;F={path:w,text:"",type:S,get:function(J,X){return X===this.text.length||X>this.text.length?"end_of_file":this.text.substring(X,X+J)},put:function(J,X){return X==="end_of_file"?(this.text+=J,!0):X==="past_end_of_file"?null:(this.text=this.text.substring(0,X)+J+this.text.substring(X+J.length),!0)},get_byte:function(J){if(J==="end_of_stream")return-1;var X=Math.floor(J/2);if(this.text.length<=X)return-1;var Z=n(this.text[Math.floor(J/2)],0);return J%2===0?Z&255:Z/256>>>0},put_byte:function(J,X){var Z=X==="end_of_stream"?this.text.length:Math.floor(X/2);if(this.text.length>>0,ie=(ie&255)<<8|J&255):(ie=ie&255,ie=(J&255)<<8|ie&255),this.text.length===Z?this.text+=u(ie):this.text=this.text.substring(0,Z)+u(ie)+this.text.substring(Z+1),!0},flush:function(){return!0},close:function(){var J=tau_file_system.files[this.path];return J?!0:null}},tau_file_system.files[w]=F}return y==="write"&&(F.text=""),F}},tau_user_input={buffer:"",get:function(w,S){for(var y;tau_user_input.buffer.length\?\@\^\~\\]+|'(?:[^']*?(?:\\(?:x?\d+)?\\)*(?:'')*(?:\\')*)*')/,number:/^(?:0o[0-7]+|0x[0-9a-fA-F]+|0b[01]+|0'(?:''|\\[abfnrtv\\'"`]|\\x?\d+\\|[^\\])|\d+(?:\.\d+(?:[eE][+-]?\d+)?)?)/,string:/^(?:"([^"]|""|\\")*"|`([^`]|``|\\`)*`)/,l_brace:/^(?:\[)/,r_brace:/^(?:\])/,l_bracket:/^(?:\{)/,r_bracket:/^(?:\})/,bar:/^(?:\|)/,l_paren:/^(?:\()/,r_paren:/^(?:\))/};function N(w,S){return w.get_flag("char_conversion").id==="on"?S.replace(/./g,function(y){return w.get_char_conversion(y)}):S}function U(w){this.thread=w,this.text="",this.tokens=[]}U.prototype.set_last_tokens=function(w){return this.tokens=w},U.prototype.new_text=function(w){this.text=w,this.tokens=[]},U.prototype.get_tokens=function(w){var S,y=0,F=0,J=0,X=[],Z=!1;if(w){var ie=this.tokens[w-1];y=ie.len,S=N(this.thread,this.text.substr(ie.len)),F=ie.line,J=ie.start}else S=this.text;if(/^\s*$/.test(S))return null;for(;S!=="";){var be=[],Le=!1;if(/^\n/.exec(S)!==null){F++,J=0,y++,S=S.replace(/\n/,""),Z=!0;continue}for(var ot in R)if(R.hasOwnProperty(ot)){var dt=R[ot].exec(S);dt&&be.push({value:dt[0],name:ot,matches:dt})}if(!be.length)return this.set_last_tokens([{value:S,matches:[],name:"lexical",line:F,start:J}]);var ie=r(be,function(Qr,mr){return Qr.value.length>=mr.value.length?Qr:mr});switch(ie.start=J,ie.line=F,S=S.replace(ie.value,""),J+=ie.value.length,y+=ie.value.length,ie.name){case"atom":ie.raw=ie.value,ie.value.charAt(0)==="'"&&(ie.value=v(ie.value.substr(1,ie.value.length-2),"'"),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence"));break;case"number":ie.float=ie.value.substring(0,2)!=="0x"&&ie.value.match(/[.eE]/)!==null&&ie.value!=="0'.",ie.value=C(ie.value),ie.blank=Le;break;case"string":var Gt=ie.value.charAt(0);ie.value=v(ie.value.substr(1,ie.value.length-2),Gt),ie.value===null&&(ie.name="lexical",ie.value="unknown escape sequence");break;case"whitespace":var $t=X[X.length-1];$t&&($t.space=!0),Le=!0;continue;case"r_bracket":X.length>0&&X[X.length-1].name==="l_bracket"&&(ie=X.pop(),ie.name="atom",ie.value="{}",ie.raw="{}",ie.space=!1);break;case"r_brace":X.length>0&&X[X.length-1].name==="l_brace"&&(ie=X.pop(),ie.name="atom",ie.value="[]",ie.raw="[]",ie.space=!1);break}ie.len=y,X.push(ie),Le=!1}var bt=this.set_last_tokens(X);return bt.length===0?null:bt};function V(w,S,y,F,J){if(!S[y])return{type:A,value:b.error.syntax(S[y-1],"expression expected",!0)};var X;if(F==="0"){var Z=S[y];switch(Z.name){case"number":return{type:p,len:y+1,value:new b.type.Num(Z.value,Z.float)};case"variable":return{type:p,len:y+1,value:new b.type.Var(Z.value)};case"string":var ie;switch(w.get_flag("double_quotes").id){case"atom":ie=new H(Z.value,[]);break;case"codes":ie=new H("[]",[]);for(var be=Z.value.length-1;be>=0;be--)ie=new H(".",[new b.type.Num(n(Z.value,be),!1),ie]);break;case"chars":ie=new H("[]",[]);for(var be=Z.value.length-1;be>=0;be--)ie=new H(".",[new b.type.Term(Z.value.charAt(be),[]),ie]);break}return{type:p,len:y+1,value:ie};case"l_paren":var bt=V(w,S,y+1,w.__get_max_priority(),!0);return bt.type!==p?bt:S[bt.len]&&S[bt.len].name==="r_paren"?(bt.len++,bt):{type:A,derived:!0,value:b.error.syntax(S[bt.len]?S[bt.len]:S[bt.len-1],") or operator expected",!S[bt.len])};case"l_bracket":var bt=V(w,S,y+1,w.__get_max_priority(),!0);return bt.type!==p?bt:S[bt.len]&&S[bt.len].name==="r_bracket"?(bt.len++,bt.value=new H("{}",[bt.value]),bt):{type:A,derived:!0,value:b.error.syntax(S[bt.len]?S[bt.len]:S[bt.len-1],"} or operator expected",!S[bt.len])}}var Le=te(w,S,y,J);return Le.type===p||Le.derived||(Le=ae(w,S,y),Le.type===p||Le.derived)?Le:{type:A,derived:!1,value:b.error.syntax(S[y],"unexpected token")}}var ot=w.__get_max_priority(),dt=w.__get_next_priority(F),Gt=y;if(S[y].name==="atom"&&S[y+1]&&(S[y].space||S[y+1].name!=="l_paren")){var Z=S[y++],$t=w.__lookup_operator_classes(F,Z.value);if($t&&$t.indexOf("fy")>-1){var bt=V(w,S,y,F,J);if(bt.type!==A)return Z.value==="-"&&!Z.space&&b.type.is_number(bt.value)?{value:new b.type.Num(-bt.value.value,bt.value.is_float),len:bt.len,type:p}:{value:new b.type.Term(Z.value,[bt.value]),len:bt.len,type:p};X=bt}else if($t&&$t.indexOf("fx")>-1){var bt=V(w,S,y,dt,J);if(bt.type!==A)return{value:new b.type.Term(Z.value,[bt.value]),len:bt.len,type:p};X=bt}}y=Gt;var bt=V(w,S,y,dt,J);if(bt.type===p){y=bt.len;var Z=S[y];if(S[y]&&(S[y].name==="atom"&&w.__lookup_operator_classes(F,Z.value)||S[y].name==="bar"&&w.__lookup_operator_classes(F,"|"))){var an=dt,Qr=F,$t=w.__lookup_operator_classes(F,Z.value);if($t.indexOf("xf")>-1)return{value:new b.type.Term(Z.value,[bt.value]),len:++bt.len,type:p};if($t.indexOf("xfx")>-1){var mr=V(w,S,y+1,an,J);return mr.type===p?{value:new b.type.Term(Z.value,[bt.value,mr.value]),len:mr.len,type:p}:(mr.derived=!0,mr)}else if($t.indexOf("xfy")>-1){var mr=V(w,S,y+1,Qr,J);return mr.type===p?{value:new b.type.Term(Z.value,[bt.value,mr.value]),len:mr.len,type:p}:(mr.derived=!0,mr)}else if(bt.type!==A)for(;;){y=bt.len;var Z=S[y];if(Z&&Z.name==="atom"&&w.__lookup_operator_classes(F,Z.value)){var $t=w.__lookup_operator_classes(F,Z.value);if($t.indexOf("yf")>-1)bt={value:new b.type.Term(Z.value,[bt.value]),len:++y,type:p};else if($t.indexOf("yfx")>-1){var mr=V(w,S,++y,an,J);if(mr.type===A)return mr.derived=!0,mr;y=mr.len,bt={value:new b.type.Term(Z.value,[bt.value,mr.value]),len:y,type:p}}else break}else break}}else X={type:A,value:b.error.syntax(S[bt.len-1],"operator expected")};return bt}return bt}function te(w,S,y,F){if(!S[y]||S[y].name==="atom"&&S[y].raw==="."&&!F&&(S[y].space||!S[y+1]||S[y+1].name!=="l_paren"))return{type:A,derived:!1,value:b.error.syntax(S[y-1],"unfounded token")};var J=S[y],X=[];if(S[y].name==="atom"&&S[y].raw!==","){if(y++,S[y-1].space)return{type:p,len:y,value:new b.type.Term(J.value,X)};if(S[y]&&S[y].name==="l_paren"){if(S[y+1]&&S[y+1].name==="r_paren")return{type:A,derived:!0,value:b.error.syntax(S[y+1],"argument expected")};var Z=V(w,S,++y,"999",!0);if(Z.type===A)return Z.derived?Z:{type:A,derived:!0,value:b.error.syntax(S[y]?S[y]:S[y-1],"argument expected",!S[y])};for(X.push(Z.value),y=Z.len;S[y]&&S[y].name==="atom"&&S[y].value===",";){if(Z=V(w,S,y+1,"999",!0),Z.type===A)return Z.derived?Z:{type:A,derived:!0,value:b.error.syntax(S[y+1]?S[y+1]:S[y],"argument expected",!S[y+1])};X.push(Z.value),y=Z.len}if(S[y]&&S[y].name==="r_paren")y++;else return{type:A,derived:!0,value:b.error.syntax(S[y]?S[y]:S[y-1],", or ) expected",!S[y])}}return{type:p,len:y,value:new b.type.Term(J.value,X)}}return{type:A,derived:!1,value:b.error.syntax(S[y],"term expected")}}function ae(w,S,y){if(!S[y])return{type:A,derived:!1,value:b.error.syntax(S[y-1],"[ expected")};if(S[y]&&S[y].name==="l_brace"){var F=V(w,S,++y,"999",!0),J=[F.value],X=void 0;if(F.type===A)return S[y]&&S[y].name==="r_brace"?{type:p,len:y+1,value:new b.type.Term("[]",[])}:{type:A,derived:!0,value:b.error.syntax(S[y],"] expected")};for(y=F.len;S[y]&&S[y].name==="atom"&&S[y].value===",";){if(F=V(w,S,y+1,"999",!0),F.type===A)return F.derived?F:{type:A,derived:!0,value:b.error.syntax(S[y+1]?S[y+1]:S[y],"argument expected",!S[y+1])};J.push(F.value),y=F.len}var Z=!1;if(S[y]&&S[y].name==="bar"){if(Z=!0,F=V(w,S,y+1,"999",!0),F.type===A)return F.derived?F:{type:A,derived:!0,value:b.error.syntax(S[y+1]?S[y+1]:S[y],"argument expected",!S[y+1])};X=F.value,y=F.len}return S[y]&&S[y].name==="r_brace"?{type:p,len:y+1,value:g(J,X)}:{type:A,derived:!0,value:b.error.syntax(S[y]?S[y]:S[y-1],Z?"] expected":", or | or ] expected",!S[y])}}return{type:A,derived:!1,value:b.error.syntax(S[y],"list expected")}}function fe(w,S,y){var F=S[y].line,J=V(w,S,y,w.__get_max_priority(),!1),X=null,Z;if(J.type!==A)if(y=J.len,S[y]&&S[y].name==="atom"&&S[y].raw===".")if(y++,b.type.is_term(J.value)){if(J.value.indicator===":-/2"?(X=new b.type.Rule(J.value.args[0],we(J.value.args[1])),Z={value:X,len:y,type:p}):J.value.indicator==="-->/2"?(X=he(new b.type.Rule(J.value.args[0],J.value.args[1]),w),X.body=we(X.body),Z={value:X,len:y,type:b.type.is_rule(X)?p:A}):(X=new b.type.Rule(J.value,null),Z={value:X,len:y,type:p}),X){var ie=X.singleton_variables();ie.length>0&&w.throw_warning(b.warning.singleton(ie,X.head.indicator,F))}return Z}else return{type:A,value:b.error.syntax(S[y],"callable expected")};else return{type:A,value:b.error.syntax(S[y]?S[y]:S[y-1],". or operator expected")};return J}function ue(w,S,y){y=y||{},y.from=y.from?y.from:"$tau-js",y.reconsult=y.reconsult!==void 0?y.reconsult:!0;var F=new U(w),J={},X;F.new_text(S);var Z=0,ie=F.get_tokens(Z);do{if(ie===null||!ie[Z])break;var be=fe(w,ie,Z);if(be.type===A)return new H("throw",[be.value]);if(be.value.body===null&&be.value.head.indicator==="?-/1"){var Le=new Ve(w.session);Le.add_goal(be.value.head.args[0]),Le.answer(function(dt){b.type.is_error(dt)?w.throw_warning(dt.args[0]):(dt===!1||dt===null)&&w.throw_warning(b.warning.failed_goal(be.value.head.args[0],be.len))}),Z=be.len;var ot=!0}else if(be.value.body===null&&be.value.head.indicator===":-/1"){var ot=w.run_directive(be.value.head.args[0]);Z=be.len,be.value.head.args[0].indicator==="char_conversion/2"&&(ie=F.get_tokens(Z),Z=0)}else{X=be.value.head.indicator,y.reconsult!==!1&&J[X]!==!0&&!w.is_multifile_predicate(X)&&(w.session.rules[X]=a(w.session.rules[X]||[],function(Gt){return Gt.dynamic}),J[X]=!0);var ot=w.add_rule(be.value,y);Z=be.len}if(!ot)return ot}while(!0);return!0}function me(w,S){var y=new U(w);y.new_text(S);var F=0;do{var J=y.get_tokens(F);if(J===null)break;var X=V(w,J,0,w.__get_max_priority(),!1);if(X.type!==A){var Z=X.len,ie=Z;if(J[Z]&&J[Z].name==="atom"&&J[Z].raw===".")w.add_goal(we(X.value));else{var be=J[Z];return new H("throw",[b.error.syntax(be||J[Z-1],". or operator expected",!be)])}F=X.len+1}else return new H("throw",[X.value])}while(!0);return!0}function he(w,S){w=w.rename(S);var y=S.next_free_variable(),F=Be(w.body,y,S);return F.error?F.value:(w.body=F.value,w.head.args=w.head.args.concat([y,F.variable]),w.head=new H(w.head.id,w.head.args),w)}function Be(w,S,y){var F;if(b.type.is_term(w)&&w.indicator==="!/0")return{value:w,variable:S,error:!1};if(b.type.is_term(w)&&w.indicator===",/2"){var J=Be(w.args[0],S,y);if(J.error)return J;var X=Be(w.args[1],J.variable,y);return X.error?X:{value:new H(",",[J.value,X.value]),variable:X.variable,error:!1}}else{if(b.type.is_term(w)&&w.indicator==="{}/1")return{value:w.args[0],variable:S,error:!1};if(b.type.is_empty_list(w))return{value:new H("true",[]),variable:S,error:!1};if(b.type.is_list(w)){F=y.next_free_variable();for(var Z=w,ie;Z.indicator==="./2";)ie=Z,Z=Z.args[1];return b.type.is_variable(Z)?{value:b.error.instantiation("DCG"),variable:S,error:!0}:b.type.is_empty_list(Z)?(ie.args[1]=F,{value:new H("=",[S,w]),variable:F,error:!1}):{value:b.error.type("list",w,"DCG"),variable:S,error:!0}}else return b.type.is_callable(w)?(F=y.next_free_variable(),w.args=w.args.concat([S,F]),w=new H(w.id,w.args),{value:w,variable:F,error:!1}):{value:b.error.type("callable",w,"DCG"),variable:S,error:!0}}}function we(w){return b.type.is_variable(w)?new H("call",[w]):b.type.is_term(w)&&[",/2",";/2","->/2"].indexOf(w.indicator)!==-1?new H(w.id,[we(w.args[0]),we(w.args[1])]):w}function g(w,S){for(var y=S||new b.type.Term("[]",[]),F=w.length-1;F>=0;F--)y=new b.type.Term(".",[w[F],y]);return y}function Ee(w,S){for(var y=w.length-1;y>=0;y--)w[y]===S&&w.splice(y,1)}function Pe(w){for(var S={},y=[],F=0;F=0;S--)if(w.charAt(S)==="/")return new H("/",[new H(w.substring(0,S)),new Fe(parseInt(w.substring(S+1)),!1)])}function Ie(w){this.id=w}function Fe(w,S){this.is_float=S!==void 0?S:parseInt(w)!==w,this.value=this.is_float?w:parseInt(w)}var At=0;function H(w,S,y){this.ref=y||++At,this.id=w,this.args=S||[],this.indicator=w+"/"+this.args.length}var at=0;function Re(w,S,y,F,J,X){this.id=at++,this.stream=w,this.mode=S,this.alias=y,this.type=F!==void 0?F:"text",this.reposition=J!==void 0?J:!0,this.eof_action=X!==void 0?X:"eof_code",this.position=this.mode==="append"?"end_of_stream":0,this.output=this.mode==="write"||this.mode==="append",this.input=this.mode==="read"}function ke(w){w=w||{},this.links=w}function xe(w,S,y){S=S||new ke,y=y||null,this.goal=w,this.substitution=S,this.parent=y}function He(w,S,y){this.head=w,this.body=S,this.dynamic=y||!1}function Te(w){w=w===void 0||w<=0?1e3:w,this.rules={},this.src_predicates={},this.rename=0,this.modules=[],this.thread=new Ve(this),this.total_threads=1,this.renamed_variables={},this.public_predicates={},this.multifile_predicates={},this.limit=w,this.streams={user_input:new Re(typeof gl<"u"&&gl.exports?nodejs_user_input:tau_user_input,"read","user_input","text",!1,"reset"),user_output:new Re(typeof gl<"u"&&gl.exports?nodejs_user_output:tau_user_output,"write","user_output","text",!1,"eof_code")},this.file_system=typeof gl<"u"&&gl.exports?nodejs_file_system:tau_file_system,this.standard_input=this.streams.user_input,this.standard_output=this.streams.user_output,this.current_input=this.streams.user_input,this.current_output=this.streams.user_output,this.format_success=function(S){return S.substitution},this.format_error=function(S){return S.goal},this.flag={bounded:b.flag.bounded.value,max_integer:b.flag.max_integer.value,min_integer:b.flag.min_integer.value,integer_rounding_function:b.flag.integer_rounding_function.value,char_conversion:b.flag.char_conversion.value,debug:b.flag.debug.value,max_arity:b.flag.max_arity.value,unknown:b.flag.unknown.value,double_quotes:b.flag.double_quotes.value,occurs_check:b.flag.occurs_check.value,dialect:b.flag.dialect.value,version_data:b.flag.version_data.value,nodejs:b.flag.nodejs.value},this.__loaded_modules=[],this.__char_conversion={},this.__operators={1200:{":-":["fx","xfx"],"-->":["xfx"],"?-":["fx"]},1100:{";":["xfy"]},1050:{"->":["xfy"]},1e3:{",":["xfy"]},900:{"\\+":["fy"]},700:{"=":["xfx"],"\\=":["xfx"],"==":["xfx"],"\\==":["xfx"],"@<":["xfx"],"@=<":["xfx"],"@>":["xfx"],"@>=":["xfx"],"=..":["xfx"],is:["xfx"],"=:=":["xfx"],"=\\=":["xfx"],"<":["xfx"],"=<":["xfx"],">":["xfx"],">=":["xfx"]},600:{":":["xfy"]},500:{"+":["yfx"],"-":["yfx"],"/\\":["yfx"],"\\/":["yfx"]},400:{"*":["yfx"],"/":["yfx"],"//":["yfx"],rem:["yfx"],mod:["yfx"],"<<":["yfx"],">>":["yfx"]},200:{"**":["xfx"],"^":["xfy"],"-":["fy"],"+":["fy"],"\\":["fy"]}}}function Ve(w){this.epoch=Date.now(),this.session=w,this.session.total_threads++,this.total_steps=0,this.cpu_time=0,this.cpu_time_last=0,this.points=[],this.debugger=!1,this.debugger_states=[],this.level="top_level/0",this.__calls=[],this.current_limit=this.session.limit,this.warnings=[]}function qe(w,S,y){this.id=w,this.rules=S,this.exports=y,b.module[w]=this}qe.prototype.exports_predicate=function(w){return this.exports.indexOf(w)!==-1},Ie.prototype.unify=function(w,S){if(S&&e(w.variables(),this.id)!==-1&&!b.type.is_variable(w))return null;var y={};return y[this.id]=w,new ke(y)},Fe.prototype.unify=function(w,S){return b.type.is_number(w)&&this.value===w.value&&this.is_float===w.is_float?new ke:null},H.prototype.unify=function(w,S){if(b.type.is_term(w)&&this.indicator===w.indicator){for(var y=new ke,F=0;F=0){var F=this.args[0].value,J=Math.floor(F/26),X=F%26;return"ABCDEFGHIJKLMNOPQRSTUVWXYZ"[X]+(J!==0?J:"")}switch(this.indicator){case"[]/0":case"{}/0":case"!/0":return this.id;case"{}/1":return"{"+this.args[0].toString(w)+"}";case"./2":for(var Z="["+this.args[0].toString(w),ie=this.args[1];ie.indicator==="./2";)Z+=", "+ie.args[0].toString(w),ie=ie.args[1];return ie.indicator!=="[]/0"&&(Z+="|"+ie.toString(w)),Z+="]",Z;case",/2":return"("+this.args[0].toString(w)+", "+this.args[1].toString(w)+")";default:var be=this.id,Le=w.session?w.session.lookup_operator(this.id,this.args.length):null;if(w.session===void 0||w.ignore_ops||Le===null)return w.quoted&&!/^(!|,|;|[a-z][0-9a-zA-Z_]*)$/.test(be)&&be!=="{}"&&be!=="[]"&&(be="'"+x(be)+"'"),be+(this.args.length?"("+o(this.args,function($t){return $t.toString(w)}).join(", ")+")":"");var ot=Le.priority>S.priority||Le.priority===S.priority&&(Le.class==="xfy"&&this.indicator!==S.indicator||Le.class==="yfx"&&this.indicator!==S.indicator||this.indicator===S.indicator&&Le.class==="yfx"&&y==="right"||this.indicator===S.indicator&&Le.class==="xfy"&&y==="left");Le.indicator=this.indicator;var dt=ot?"(":"",Gt=ot?")":"";return this.args.length===0?"("+this.id+")":["fy","fx"].indexOf(Le.class)!==-1?dt+be+" "+this.args[0].toString(w,Le)+Gt:["yf","xf"].indexOf(Le.class)!==-1?dt+this.args[0].toString(w,Le)+" "+be+Gt:dt+this.args[0].toString(w,Le,"left")+" "+this.id+" "+this.args[1].toString(w,Le,"right")+Gt}},Re.prototype.toString=function(w){return"("+this.id+")"},ke.prototype.toString=function(w){var S="{";for(var y in this.links)!this.links.hasOwnProperty(y)||(S!=="{"&&(S+=", "),S+=y+"/"+this.links[y].toString(w));return S+="}",S},xe.prototype.toString=function(w){return this.goal===null?"<"+this.substitution.toString(w)+">":"<"+this.goal.toString(w)+", "+this.substitution.toString(w)+">"},He.prototype.toString=function(w){return this.body?this.head.toString(w)+" :- "+this.body.toString(w)+".":this.head.toString(w)+"."},Te.prototype.toString=function(w){for(var S="",y=0;y=0;J--)F=new H(".",[S[J],F]);return F}return new H(this.id,o(this.args,function(X){return X.apply(w)}),this.ref)},Re.prototype.apply=function(w){return this},He.prototype.apply=function(w){return new He(this.head.apply(w),this.body!==null?this.body.apply(w):null)},ke.prototype.apply=function(w){var S,y={};for(S in this.links)!this.links.hasOwnProperty(S)||(y[S]=this.links[S].apply(w));return new ke(y)},H.prototype.select=function(){for(var w=this;w.indicator===",/2";)w=w.args[0];return w},H.prototype.replace=function(w){return this.indicator===",/2"?this.args[0].indicator===",/2"?new H(",",[this.args[0].replace(w),this.args[1]]):w===null?this.args[1]:new H(",",[w,this.args[1]]):w},H.prototype.search=function(w){if(b.type.is_term(w)&&w.ref!==void 0&&this.ref===w.ref)return!0;for(var S=0;SS&&F0&&(S=this.head_point().substitution.domain());e(S,b.format_variable(this.session.rename))!==-1;)this.session.rename++;if(w.id==="_")return new Ie(b.format_variable(this.session.rename));this.session.renamed_variables[w.id]=b.format_variable(this.session.rename)}return new Ie(this.session.renamed_variables[w.id])},Te.prototype.next_free_variable=function(){return this.thread.next_free_variable()},Ve.prototype.next_free_variable=function(){this.session.rename++;var w=[];for(this.points.length>0&&(w=this.head_point().substitution.domain());e(w,b.format_variable(this.session.rename))!==-1;)this.session.rename++;return new Ie(b.format_variable(this.session.rename))},Te.prototype.is_public_predicate=function(w){return!this.public_predicates.hasOwnProperty(w)||this.public_predicates[w]===!0},Ve.prototype.is_public_predicate=function(w){return this.session.is_public_predicate(w)},Te.prototype.is_multifile_predicate=function(w){return this.multifile_predicates.hasOwnProperty(w)&&this.multifile_predicates[w]===!0},Ve.prototype.is_multifile_predicate=function(w){return this.session.is_multifile_predicate(w)},Te.prototype.prepend=function(w){return this.thread.prepend(w)},Ve.prototype.prepend=function(w){for(var S=w.length-1;S>=0;S--)this.points.push(w[S])},Te.prototype.success=function(w,S){return this.thread.success(w,S)},Ve.prototype.success=function(w,y){var y=typeof y>"u"?w:y;this.prepend([new xe(w.goal.replace(null),w.substitution,y)])},Te.prototype.throw_error=function(w){return this.thread.throw_error(w)},Ve.prototype.throw_error=function(w){this.prepend([new xe(new H("throw",[w]),new ke,null,null)])},Te.prototype.step_rule=function(w,S){return this.thread.step_rule(w,S)},Ve.prototype.step_rule=function(w,S){var y=S.indicator;if(w==="user"&&(w=null),w===null&&this.session.rules.hasOwnProperty(y))return this.session.rules[y];for(var F=w===null?this.session.modules:e(this.session.modules,w)===-1?[]:[w],J=0;J1)&&this.again()},Te.prototype.answers=function(w,S,y){return this.thread.answers(w,S,y)},Ve.prototype.answers=function(w,S,y){var F=S||1e3,J=this;if(S<=0){y&&y();return}this.answer(function(X){w(X),X!==!1?setTimeout(function(){J.answers(w,S-1,y)},1):y&&y()})},Te.prototype.again=function(w){return this.thread.again(w)},Ve.prototype.again=function(w){for(var S,y=Date.now();this.__calls.length>0;){for(this.warnings=[],w!==!1&&(this.current_limit=this.session.limit);this.current_limit>0&&this.points.length>0&&this.head_point().goal!==null&&!b.type.is_error(this.head_point().goal);)if(this.current_limit--,this.step()===!0)return;var F=Date.now();this.cpu_time_last=F-y,this.cpu_time+=this.cpu_time_last;var J=this.__calls.shift();this.current_limit<=0?J(null):this.points.length===0?J(!1):b.type.is_error(this.head_point().goal)?(S=this.session.format_error(this.points.pop()),this.points=[],J(S)):(this.debugger&&this.debugger_states.push(this.head_point()),S=this.session.format_success(this.points.pop()),J(S))}},Te.prototype.unfold=function(w){if(w.body===null)return!1;var S=w.head,y=w.body,F=y.select(),J=new Ve(this),X=[];J.add_goal(F),J.step();for(var Z=J.points.length-1;Z>=0;Z--){var ie=J.points[Z],be=S.apply(ie.substitution),Le=y.replace(ie.goal);Le!==null&&(Le=Le.apply(ie.substitution)),X.push(new He(be,Le))}var ot=this.rules[S.indicator],dt=e(ot,w);return X.length>0&&dt!==-1?(ot.splice.apply(ot,[dt,1].concat(X)),!0):!1},Ve.prototype.unfold=function(w){return this.session.unfold(w)},Ie.prototype.interpret=function(w){return b.error.instantiation(w.level)},Fe.prototype.interpret=function(w){return this},H.prototype.interpret=function(w){return b.type.is_unitary_list(this)?this.args[0].interpret(w):b.operate(w,this)},Ie.prototype.compare=function(w){return this.idw.id?1:0},Fe.prototype.compare=function(w){if(this.value===w.value&&this.is_float===w.is_float)return 0;if(this.valuew.value)return 1},H.prototype.compare=function(w){if(this.args.lengthw.args.length||this.args.length===w.args.length&&this.id>w.id)return 1;for(var S=0;SF)return 1;if(w.constructor===Fe){if(w.is_float&&S.is_float)return 0;if(w.is_float)return-1;if(S.is_float)return 1}return 0},is_substitution:function(w){return w instanceof ke},is_state:function(w){return w instanceof xe},is_rule:function(w){return w instanceof He},is_variable:function(w){return w instanceof Ie},is_stream:function(w){return w instanceof Re},is_anonymous_var:function(w){return w instanceof Ie&&w.id==="_"},is_callable:function(w){return w instanceof H},is_number:function(w){return w instanceof Fe},is_integer:function(w){return w instanceof Fe&&!w.is_float},is_float:function(w){return w instanceof Fe&&w.is_float},is_term:function(w){return w instanceof H},is_atom:function(w){return w instanceof H&&w.args.length===0},is_ground:function(w){if(w instanceof Ie)return!1;if(w instanceof H){for(var S=0;S0},is_list:function(w){return w instanceof H&&(w.indicator==="[]/0"||w.indicator==="./2")},is_empty_list:function(w){return w instanceof H&&w.indicator==="[]/0"},is_non_empty_list:function(w){return w instanceof H&&w.indicator==="./2"},is_fully_list:function(w){for(;w instanceof H&&w.indicator==="./2";)w=w.args[1];return w instanceof Ie||w instanceof H&&w.indicator==="[]/0"},is_instantiated_list:function(w){for(;w instanceof H&&w.indicator==="./2";)w=w.args[1];return w instanceof H&&w.indicator==="[]/0"},is_unitary_list:function(w){return w instanceof H&&w.indicator==="./2"&&w.args[1]instanceof H&&w.args[1].indicator==="[]/0"},is_character:function(w){return w instanceof H&&(w.id.length===1||w.id.length>0&&w.id.length<=2&&n(w.id,0)>=65536)},is_character_code:function(w){return w instanceof Fe&&!w.is_float&&w.value>=0&&w.value<=1114111},is_byte:function(w){return w instanceof Fe&&!w.is_float&&w.value>=0&&w.value<=255},is_operator:function(w){return w instanceof H&&b.arithmetic.evaluation[w.indicator]},is_directive:function(w){return w instanceof H&&b.directive[w.indicator]!==void 0},is_builtin:function(w){return w instanceof H&&b.predicate[w.indicator]!==void 0},is_error:function(w){return w instanceof H&&w.indicator==="throw/1"},is_predicate_indicator:function(w){return w instanceof H&&w.indicator==="//2"&&w.args[0]instanceof H&&w.args[0].args.length===0&&w.args[1]instanceof Fe&&w.args[1].is_float===!1},is_flag:function(w){return w instanceof H&&w.args.length===0&&b.flag[w.id]!==void 0},is_value_flag:function(w,S){if(!b.type.is_flag(w))return!1;for(var y in b.flag[w.id].allowed)if(!!b.flag[w.id].allowed.hasOwnProperty(y)&&b.flag[w.id].allowed[y].equals(S))return!0;return!1},is_io_mode:function(w){return b.type.is_atom(w)&&["read","write","append"].indexOf(w.id)!==-1},is_stream_option:function(w){return b.type.is_term(w)&&(w.indicator==="alias/1"&&b.type.is_atom(w.args[0])||w.indicator==="reposition/1"&&b.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")||w.indicator==="type/1"&&b.type.is_atom(w.args[0])&&(w.args[0].id==="text"||w.args[0].id==="binary")||w.indicator==="eof_action/1"&&b.type.is_atom(w.args[0])&&(w.args[0].id==="error"||w.args[0].id==="eof_code"||w.args[0].id==="reset"))},is_stream_position:function(w){return b.type.is_integer(w)&&w.value>=0||b.type.is_atom(w)&&(w.id==="end_of_stream"||w.id==="past_end_of_stream")},is_stream_property:function(w){return b.type.is_term(w)&&(w.indicator==="input/0"||w.indicator==="output/0"||w.indicator==="alias/1"&&(b.type.is_variable(w.args[0])||b.type.is_atom(w.args[0]))||w.indicator==="file_name/1"&&(b.type.is_variable(w.args[0])||b.type.is_atom(w.args[0]))||w.indicator==="position/1"&&(b.type.is_variable(w.args[0])||b.type.is_stream_position(w.args[0]))||w.indicator==="reposition/1"&&(b.type.is_variable(w.args[0])||b.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false"))||w.indicator==="type/1"&&(b.type.is_variable(w.args[0])||b.type.is_atom(w.args[0])&&(w.args[0].id==="text"||w.args[0].id==="binary"))||w.indicator==="mode/1"&&(b.type.is_variable(w.args[0])||b.type.is_atom(w.args[0])&&(w.args[0].id==="read"||w.args[0].id==="write"||w.args[0].id==="append"))||w.indicator==="eof_action/1"&&(b.type.is_variable(w.args[0])||b.type.is_atom(w.args[0])&&(w.args[0].id==="error"||w.args[0].id==="eof_code"||w.args[0].id==="reset"))||w.indicator==="end_of_stream/1"&&(b.type.is_variable(w.args[0])||b.type.is_atom(w.args[0])&&(w.args[0].id==="at"||w.args[0].id==="past"||w.args[0].id==="not")))},is_streamable:function(w){return w.__proto__.stream!==void 0},is_read_option:function(w){return b.type.is_term(w)&&["variables/1","variable_names/1","singletons/1"].indexOf(w.indicator)!==-1},is_write_option:function(w){return b.type.is_term(w)&&(w.indicator==="quoted/1"&&b.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")||w.indicator==="ignore_ops/1"&&b.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")||w.indicator==="numbervars/1"&&b.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false"))},is_close_option:function(w){return b.type.is_term(w)&&w.indicator==="force/1"&&b.type.is_atom(w.args[0])&&(w.args[0].id==="true"||w.args[0].id==="false")},is_modifiable_flag:function(w){return b.type.is_flag(w)&&b.flag[w.id].changeable},is_module:function(w){return w instanceof H&&w.indicator==="library/1"&&w.args[0]instanceof H&&w.args[0].args.length===0&&b.module[w.args[0].id]!==void 0}},arithmetic:{evaluation:{"e/0":{type_args:null,type_result:!0,fn:function(w){return Math.E}},"pi/0":{type_args:null,type_result:!0,fn:function(w){return Math.PI}},"tau/0":{type_args:null,type_result:!0,fn:function(w){return 2*Math.PI}},"epsilon/0":{type_args:null,type_result:!0,fn:function(w){return Number.EPSILON}},"+/1":{type_args:null,type_result:null,fn:function(w,S){return w}},"-/1":{type_args:null,type_result:null,fn:function(w,S){return-w}},"\\/1":{type_args:!1,type_result:!1,fn:function(w,S){return~w}},"abs/1":{type_args:null,type_result:null,fn:function(w,S){return Math.abs(w)}},"sign/1":{type_args:null,type_result:null,fn:function(w,S){return Math.sign(w)}},"float_integer_part/1":{type_args:!0,type_result:!1,fn:function(w,S){return parseInt(w)}},"float_fractional_part/1":{type_args:!0,type_result:!0,fn:function(w,S){return w-parseInt(w)}},"float/1":{type_args:null,type_result:!0,fn:function(w,S){return parseFloat(w)}},"floor/1":{type_args:!0,type_result:!1,fn:function(w,S){return Math.floor(w)}},"truncate/1":{type_args:!0,type_result:!1,fn:function(w,S){return parseInt(w)}},"round/1":{type_args:!0,type_result:!1,fn:function(w,S){return Math.round(w)}},"ceiling/1":{type_args:!0,type_result:!1,fn:function(w,S){return Math.ceil(w)}},"sin/1":{type_args:null,type_result:!0,fn:function(w,S){return Math.sin(w)}},"cos/1":{type_args:null,type_result:!0,fn:function(w,S){return Math.cos(w)}},"tan/1":{type_args:null,type_result:!0,fn:function(w,S){return Math.tan(w)}},"asin/1":{type_args:null,type_result:!0,fn:function(w,S){return Math.asin(w)}},"acos/1":{type_args:null,type_result:!0,fn:function(w,S){return Math.acos(w)}},"atan/1":{type_args:null,type_result:!0,fn:function(w,S){return Math.atan(w)}},"atan2/2":{type_args:null,type_result:!0,fn:function(w,S,y){return Math.atan2(w,S)}},"exp/1":{type_args:null,type_result:!0,fn:function(w,S){return Math.exp(w)}},"sqrt/1":{type_args:null,type_result:!0,fn:function(w,S){return Math.sqrt(w)}},"log/1":{type_args:null,type_result:!0,fn:function(w,S){return w>0?Math.log(w):b.error.evaluation("undefined",S.__call_indicator)}},"+/2":{type_args:null,type_result:null,fn:function(w,S,y){return w+S}},"-/2":{type_args:null,type_result:null,fn:function(w,S,y){return w-S}},"*/2":{type_args:null,type_result:null,fn:function(w,S,y){return w*S}},"//2":{type_args:null,type_result:!0,fn:function(w,S,y){return S?w/S:b.error.evaluation("zero_division",y.__call_indicator)}},"///2":{type_args:!1,type_result:!1,fn:function(w,S,y){return S?parseInt(w/S):b.error.evaluation("zero_division",y.__call_indicator)}},"**/2":{type_args:null,type_result:!0,fn:function(w,S,y){return Math.pow(w,S)}},"^/2":{type_args:null,type_result:null,fn:function(w,S,y){return Math.pow(w,S)}},"<>/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return w>>S}},"/\\/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return w&S}},"\\//2":{type_args:!1,type_result:!1,fn:function(w,S,y){return w|S}},"xor/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return w^S}},"rem/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return S?w%S:b.error.evaluation("zero_division",y.__call_indicator)}},"mod/2":{type_args:!1,type_result:!1,fn:function(w,S,y){return S?w-parseInt(w/S)*S:b.error.evaluation("zero_division",y.__call_indicator)}},"max/2":{type_args:null,type_result:null,fn:function(w,S,y){return Math.max(w,S)}},"min/2":{type_args:null,type_result:null,fn:function(w,S,y){return Math.min(w,S)}}}},directive:{"dynamic/1":function(w,S){var y=S.args[0];if(b.type.is_variable(y))w.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_compound(y)||y.indicator!=="//2")w.throw_error(b.error.type("predicate_indicator",y,S.indicator));else if(b.type.is_variable(y.args[0])||b.type.is_variable(y.args[1]))w.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_atom(y.args[0]))w.throw_error(b.error.type("atom",y.args[0],S.indicator));else if(!b.type.is_integer(y.args[1]))w.throw_error(b.error.type("integer",y.args[1],S.indicator));else{var F=S.args[0].args[0].id+"/"+S.args[0].args[1].value;w.session.public_predicates[F]=!0,w.session.rules[F]||(w.session.rules[F]=[])}},"multifile/1":function(w,S){var y=S.args[0];b.type.is_variable(y)?w.throw_error(b.error.instantiation(S.indicator)):!b.type.is_compound(y)||y.indicator!=="//2"?w.throw_error(b.error.type("predicate_indicator",y,S.indicator)):b.type.is_variable(y.args[0])||b.type.is_variable(y.args[1])?w.throw_error(b.error.instantiation(S.indicator)):b.type.is_atom(y.args[0])?b.type.is_integer(y.args[1])?w.session.multifile_predicates[S.args[0].args[0].id+"/"+S.args[0].args[1].value]=!0:w.throw_error(b.error.type("integer",y.args[1],S.indicator)):w.throw_error(b.error.type("atom",y.args[0],S.indicator))},"set_prolog_flag/2":function(w,S){var y=S.args[0],F=S.args[1];b.type.is_variable(y)||b.type.is_variable(F)?w.throw_error(b.error.instantiation(S.indicator)):b.type.is_atom(y)?b.type.is_flag(y)?b.type.is_value_flag(y,F)?b.type.is_modifiable_flag(y)?w.session.flag[y.id]=F:w.throw_error(b.error.permission("modify","flag",y)):w.throw_error(b.error.domain("flag_value",new H("+",[y,F]),S.indicator)):w.throw_error(b.error.domain("prolog_flag",y,S.indicator)):w.throw_error(b.error.type("atom",y,S.indicator))},"use_module/1":function(w,S){var y=S.args[0];if(b.type.is_variable(y))w.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_term(y))w.throw_error(b.error.type("term",y,S.indicator));else if(b.type.is_module(y)){var F=y.args[0].id;e(w.session.modules,F)===-1&&w.session.modules.push(F)}},"char_conversion/2":function(w,S){var y=S.args[0],F=S.args[1];b.type.is_variable(y)||b.type.is_variable(F)?w.throw_error(b.error.instantiation(S.indicator)):b.type.is_character(y)?b.type.is_character(F)?y.id===F.id?delete w.session.__char_conversion[y.id]:w.session.__char_conversion[y.id]=F.id:w.throw_error(b.error.type("character",F,S.indicator)):w.throw_error(b.error.type("character",y,S.indicator))},"op/3":function(w,S){var y=S.args[0],F=S.args[1],J=S.args[2];if(b.type.is_variable(y)||b.type.is_variable(F)||b.type.is_variable(J))w.throw_error(b.error.instantiation(S.indicator));else if(!b.type.is_integer(y))w.throw_error(b.error.type("integer",y,S.indicator));else if(!b.type.is_atom(F))w.throw_error(b.error.type("atom",F,S.indicator));else if(!b.type.is_atom(J))w.throw_error(b.error.type("atom",J,S.indicator));else if(y.value<0||y.value>1200)w.throw_error(b.error.domain("operator_priority",y,S.indicator));else if(J.id===",")w.throw_error(b.error.permission("modify","operator",J,S.indicator));else if(J.id==="|"&&(y.value<1001||F.id.length!==3))w.throw_error(b.error.permission("modify","operator",J,S.indicator));else if(["fy","fx","yf","xf","xfx","yfx","xfy"].indexOf(F.id)===-1)w.throw_error(b.error.domain("operator_specifier",F,S.indicator));else{var X={prefix:null,infix:null,postfix:null};for(var Z in w.session.__operators)if(!!w.session.__operators.hasOwnProperty(Z)){var ie=w.session.__operators[Z][J.id];ie&&(e(ie,"fx")!==-1&&(X.prefix={priority:Z,type:"fx"}),e(ie,"fy")!==-1&&(X.prefix={priority:Z,type:"fy"}),e(ie,"xf")!==-1&&(X.postfix={priority:Z,type:"xf"}),e(ie,"yf")!==-1&&(X.postfix={priority:Z,type:"yf"}),e(ie,"xfx")!==-1&&(X.infix={priority:Z,type:"xfx"}),e(ie,"xfy")!==-1&&(X.infix={priority:Z,type:"xfy"}),e(ie,"yfx")!==-1&&(X.infix={priority:Z,type:"yfx"}))}var be;switch(F.id){case"fy":case"fx":be="prefix";break;case"yf":case"xf":be="postfix";break;default:be="infix";break}if(((X.prefix&&be==="prefix"||X.postfix&&be==="postfix"||X.infix&&be==="infix")&&X[be].type!==F.id||X.infix&&be==="postfix"||X.postfix&&be==="infix")&&y.value!==0)w.throw_error(b.error.permission("create","operator",J,S.indicator));else return X[be]&&(Ee(w.session.__operators[X[be].priority][J.id],F.id),w.session.__operators[X[be].priority][J.id].length===0&&delete w.session.__operators[X[be].priority][J.id]),y.value>0&&(w.session.__operators[y.value]||(w.session.__operators[y.value.toString()]={}),w.session.__operators[y.value][J.id]||(w.session.__operators[y.value][J.id]=[]),w.session.__operators[y.value][J.id].push(F.id)),!0}}},predicate:{"op/3":function(w,S,y){b.directive["op/3"](w,y)&&w.success(S)},"current_op/3":function(w,S,y){var F=y.args[0],J=y.args[1],X=y.args[2],Z=[];for(var ie in w.session.__operators)for(var be in w.session.__operators[ie])for(var Le=0;Le/2"){var F=w.points,J=w.session.format_success,X=w.session.format_error;w.session.format_success=function(Le){return Le.substitution},w.session.format_error=function(Le){return Le.goal},w.points=[new xe(y.args[0].args[0],S.substitution,S)];var Z=function(Le){w.points=F,w.session.format_success=J,w.session.format_error=X,Le===!1?w.prepend([new xe(S.goal.replace(y.args[1]),S.substitution,S)]):b.type.is_error(Le)?w.throw_error(Le.args[0]):Le===null?(w.prepend([S]),w.__calls.shift()(null)):w.prepend([new xe(S.goal.replace(y.args[0].args[1]).apply(Le),S.substitution.apply(Le),S)])};w.__calls.unshift(Z)}else{var ie=new xe(S.goal.replace(y.args[0]),S.substitution,S),be=new xe(S.goal.replace(y.args[1]),S.substitution,S);w.prepend([ie,be])}},"!/0":function(w,S,y){var F,J,X=[];for(F=S,J=null;F.parent!==null&&F.parent.goal.search(y);)if(J=F,F=F.parent,F.goal!==null){var Z=F.goal.select();if(Z&&Z.id==="call"&&Z.search(y)){F=J;break}}for(var ie=w.points.length-1;ie>=0;ie--){for(var be=w.points[ie],Le=be.parent;Le!==null&&Le!==F.parent;)Le=Le.parent;Le===null&&Le!==F.parent&&X.push(be)}w.points=X.reverse(),w.success(S)},"\\+/1":function(w,S,y){var F=y.args[0];b.type.is_variable(F)?w.throw_error(b.error.instantiation(w.level)):b.type.is_callable(F)?w.prepend([new xe(S.goal.replace(new H(",",[new H(",",[new H("call",[F]),new H("!",[])]),new H("fail",[])])),S.substitution,S),new xe(S.goal.replace(null),S.substitution,S)]):w.throw_error(b.error.type("callable",F,w.level))},"->/2":function(w,S,y){var F=S.goal.replace(new H(",",[y.args[0],new H(",",[new H("!"),y.args[1]])]));w.prepend([new xe(F,S.substitution,S)])},"fail/0":function(w,S,y){},"false/0":function(w,S,y){},"true/0":function(w,S,y){w.success(S)},"call/1":ne(1),"call/2":ne(2),"call/3":ne(3),"call/4":ne(4),"call/5":ne(5),"call/6":ne(6),"call/7":ne(7),"call/8":ne(8),"once/1":function(w,S,y){var F=y.args[0];w.prepend([new xe(S.goal.replace(new H(",",[new H("call",[F]),new H("!",[])])),S.substitution,S)])},"forall/2":function(w,S,y){var F=y.args[0],J=y.args[1];w.prepend([new xe(S.goal.replace(new H("\\+",[new H(",",[new H("call",[F]),new H("\\+",[new H("call",[J])])])])),S.substitution,S)])},"repeat/0":function(w,S,y){w.prepend([new xe(S.goal.replace(null),S.substitution,S),S])},"throw/1":function(w,S,y){b.type.is_variable(y.args[0])?w.throw_error(b.error.instantiation(w.level)):w.throw_error(y.args[0])},"catch/3":function(w,S,y){var F=w.points;w.points=[],w.prepend([new xe(y.args[0],S.substitution,S)]);var J=w.session.format_success,X=w.session.format_error;w.session.format_success=function(ie){return ie.substitution},w.session.format_error=function(ie){return ie.goal};var Z=function(ie){var be=w.points;if(w.points=F,w.session.format_success=J,w.session.format_error=X,b.type.is_error(ie)){for(var Le=[],ot=w.points.length-1;ot>=0;ot--){for(var $t=w.points[ot],dt=$t.parent;dt!==null&&dt!==S.parent;)dt=dt.parent;dt===null&&dt!==S.parent&&Le.push($t)}w.points=Le;var Gt=w.get_flag("occurs_check").indicator==="true/0",$t=new xe,bt=b.unify(ie.args[0],y.args[1],Gt);bt!==null?($t.substitution=S.substitution.apply(bt),$t.goal=S.goal.replace(y.args[2]).apply(bt),$t.parent=S,w.prepend([$t])):w.throw_error(ie.args[0])}else if(ie!==!1){for(var an=ie===null?[]:[new xe(S.goal.apply(ie).replace(null),S.substitution.apply(ie),S)],Qr=[],ot=be.length-1;ot>=0;ot--){Qr.push(be[ot]);var mr=be[ot].goal!==null?be[ot].goal.select():null;if(b.type.is_term(mr)&&mr.indicator==="!/0")break}var br=o(Qr,function(Wr){return Wr.goal===null&&(Wr.goal=new H("true",[])),Wr=new xe(S.goal.replace(new H("catch",[Wr.goal,y.args[1],y.args[2]])),S.substitution.apply(Wr.substitution),Wr.parent),Wr.exclude=y.args[0].variables(),Wr}).reverse();w.prepend(br),w.prepend(an),ie===null&&(this.current_limit=0,w.__calls.shift()(null))}};w.__calls.unshift(Z)},"=/2":function(w,S,y){var F=w.get_flag("occurs_check").indicator==="true/0",J=new xe,X=b.unify(y.args[0],y.args[1],F);X!==null&&(J.goal=S.goal.apply(X).replace(null),J.substitution=S.substitution.apply(X),J.parent=S,w.prepend([J]))},"unify_with_occurs_check/2":function(w,S,y){var F=new xe,J=b.unify(y.args[0],y.args[1],!0);J!==null&&(F.goal=S.goal.apply(J).replace(null),F.substitution=S.substitution.apply(J),F.parent=S,w.prepend([F]))},"\\=/2":function(w,S,y){var F=w.get_flag("occurs_check").indicator==="true/0",J=b.unify(y.args[0],y.args[1],F);J===null&&w.success(S)},"subsumes_term/2":function(w,S,y){var F=w.get_flag("occurs_check").indicator==="true/0",J=b.unify(y.args[1],y.args[0],F);J!==null&&y.args[1].apply(J).equals(y.args[1])&&w.success(S)},"findall/3":function(w,S,y){var F=y.args[0],J=y.args[1],X=y.args[2];if(b.type.is_variable(J))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_callable(J))w.throw_error(b.error.type("callable",J,y.indicator));else if(!b.type.is_variable(X)&&!b.type.is_list(X))w.throw_error(b.error.type("list",X,y.indicator));else{var Z=w.next_free_variable(),ie=new H(",",[J,new H("=",[Z,F])]),be=w.points,Le=w.session.limit,ot=w.session.format_success;w.session.format_success=function($t){return $t.substitution},w.add_goal(ie,!0,S);var dt=[],Gt=function($t){if($t!==!1&&$t!==null&&!b.type.is_error($t))w.__calls.unshift(Gt),dt.push($t.links[Z.id]),w.session.limit=w.current_limit;else if(w.points=be,w.session.limit=Le,w.session.format_success=ot,b.type.is_error($t))w.throw_error($t.args[0]);else if(w.current_limit>0){for(var bt=new H("[]"),an=dt.length-1;an>=0;an--)bt=new H(".",[dt[an],bt]);w.prepend([new xe(S.goal.replace(new H("=",[X,bt])),S.substitution,S)])}};w.__calls.unshift(Gt)}},"bagof/3":function(w,S,y){var F,J=y.args[0],X=y.args[1],Z=y.args[2];if(b.type.is_variable(X))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_callable(X))w.throw_error(b.error.type("callable",X,y.indicator));else if(!b.type.is_variable(Z)&&!b.type.is_list(Z))w.throw_error(b.error.type("list",Z,y.indicator));else{var ie=w.next_free_variable(),be;X.indicator==="^/2"?(be=X.args[0].variables(),X=X.args[1]):be=[],be=be.concat(J.variables());for(var Le=X.variables().filter(function(br){return e(be,br)===-1}),ot=new H("[]"),dt=Le.length-1;dt>=0;dt--)ot=new H(".",[new Ie(Le[dt]),ot]);var Gt=new H(",",[X,new H("=",[ie,new H(",",[ot,J])])]),$t=w.points,bt=w.session.limit,an=w.session.format_success;w.session.format_success=function(br){return br.substitution},w.add_goal(Gt,!0,S);var Qr=[],mr=function(br){if(br!==!1&&br!==null&&!b.type.is_error(br)){w.__calls.unshift(mr);var Wr=!1,Kn=br.links[ie.id].args[0],Ls=br.links[ie.id].args[1];for(var Ti in Qr)if(!!Qr.hasOwnProperty(Ti)){var ps=Qr[Ti];if(ps.variables.equals(Kn)){ps.answers.push(Ls),Wr=!0;break}}Wr||Qr.push({variables:Kn,answers:[Ls]}),w.session.limit=w.current_limit}else if(w.points=$t,w.session.limit=bt,w.session.format_success=an,b.type.is_error(br))w.throw_error(br.args[0]);else if(w.current_limit>0){for(var io=[],Si=0;Si=0;so--)Ns=new H(".",[br[so],Ns]);io.push(new xe(S.goal.replace(new H(",",[new H("=",[ot,Qr[Si].variables]),new H("=",[Z,Ns])])),S.substitution,S))}w.prepend(io)}};w.__calls.unshift(mr)}},"setof/3":function(w,S,y){var F,J=y.args[0],X=y.args[1],Z=y.args[2];if(b.type.is_variable(X))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_callable(X))w.throw_error(b.error.type("callable",X,y.indicator));else if(!b.type.is_variable(Z)&&!b.type.is_list(Z))w.throw_error(b.error.type("list",Z,y.indicator));else{var ie=w.next_free_variable(),be;X.indicator==="^/2"?(be=X.args[0].variables(),X=X.args[1]):be=[],be=be.concat(J.variables());for(var Le=X.variables().filter(function(br){return e(be,br)===-1}),ot=new H("[]"),dt=Le.length-1;dt>=0;dt--)ot=new H(".",[new Ie(Le[dt]),ot]);var Gt=new H(",",[X,new H("=",[ie,new H(",",[ot,J])])]),$t=w.points,bt=w.session.limit,an=w.session.format_success;w.session.format_success=function(br){return br.substitution},w.add_goal(Gt,!0,S);var Qr=[],mr=function(br){if(br!==!1&&br!==null&&!b.type.is_error(br)){w.__calls.unshift(mr);var Wr=!1,Kn=br.links[ie.id].args[0],Ls=br.links[ie.id].args[1];for(var Ti in Qr)if(!!Qr.hasOwnProperty(Ti)){var ps=Qr[Ti];if(ps.variables.equals(Kn)){ps.answers.push(Ls),Wr=!0;break}}Wr||Qr.push({variables:Kn,answers:[Ls]}),w.session.limit=w.current_limit}else if(w.points=$t,w.session.limit=bt,w.session.format_success=an,b.type.is_error(br))w.throw_error(br.args[0]);else if(w.current_limit>0){for(var io=[],Si=0;Si=0;so--)Ns=new H(".",[br[so],Ns]);io.push(new xe(S.goal.replace(new H(",",[new H("=",[ot,Qr[Si].variables]),new H("=",[Z,Ns])])),S.substitution,S))}w.prepend(io)}};w.__calls.unshift(mr)}},"functor/3":function(w,S,y){var F,J=y.args[0],X=y.args[1],Z=y.args[2];if(b.type.is_variable(J)&&(b.type.is_variable(X)||b.type.is_variable(Z)))w.throw_error(b.error.instantiation("functor/3"));else if(!b.type.is_variable(Z)&&!b.type.is_integer(Z))w.throw_error(b.error.type("integer",y.args[2],"functor/3"));else if(!b.type.is_variable(X)&&!b.type.is_atomic(X))w.throw_error(b.error.type("atomic",y.args[1],"functor/3"));else if(b.type.is_integer(X)&&b.type.is_integer(Z)&&Z.value!==0)w.throw_error(b.error.type("atom",y.args[1],"functor/3"));else if(b.type.is_variable(J)){if(y.args[2].value>=0){for(var ie=[],be=0;be0&&F<=y.args[1].args.length){var J=new H("=",[y.args[1].args[F-1],y.args[2]]);w.prepend([new xe(S.goal.replace(J),S.substitution,S)])}}},"=../2":function(w,S,y){var F;if(b.type.is_variable(y.args[0])&&(b.type.is_variable(y.args[1])||b.type.is_non_empty_list(y.args[1])&&b.type.is_variable(y.args[1].args[0])))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_fully_list(y.args[1]))w.throw_error(b.error.type("list",y.args[1],y.indicator));else if(b.type.is_variable(y.args[0])){if(!b.type.is_variable(y.args[1])){var X=[];for(F=y.args[1].args[1];F.indicator==="./2";)X.push(F.args[0]),F=F.args[1];b.type.is_variable(y.args[0])&&b.type.is_variable(F)?w.throw_error(b.error.instantiation(y.indicator)):X.length===0&&b.type.is_compound(y.args[1].args[0])?w.throw_error(b.error.type("atomic",y.args[1].args[0],y.indicator)):X.length>0&&(b.type.is_compound(y.args[1].args[0])||b.type.is_number(y.args[1].args[0]))?w.throw_error(b.error.type("atom",y.args[1].args[0],y.indicator)):X.length===0?w.prepend([new xe(S.goal.replace(new H("=",[y.args[1].args[0],y.args[0]],S)),S.substitution,S)]):w.prepend([new xe(S.goal.replace(new H("=",[new H(y.args[1].args[0].id,X),y.args[0]])),S.substitution,S)])}}else{if(b.type.is_atomic(y.args[0]))F=new H(".",[y.args[0],new H("[]")]);else{F=new H("[]");for(var J=y.args[0].args.length-1;J>=0;J--)F=new H(".",[y.args[0].args[J],F]);F=new H(".",[new H(y.args[0].id),F])}w.prepend([new xe(S.goal.replace(new H("=",[F,y.args[1]])),S.substitution,S)])}},"copy_term/2":function(w,S,y){var F=y.args[0].rename(w);w.prepend([new xe(S.goal.replace(new H("=",[F,y.args[1]])),S.substitution,S.parent)])},"term_variables/2":function(w,S,y){var F=y.args[0],J=y.args[1];if(!b.type.is_fully_list(J))w.throw_error(b.error.type("list",J,y.indicator));else{var X=g(o(Pe(F.variables()),function(Z){return new Ie(Z)}));w.prepend([new xe(S.goal.replace(new H("=",[J,X])),S.substitution,S)])}},"clause/2":function(w,S,y){if(b.type.is_variable(y.args[0]))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_callable(y.args[0]))w.throw_error(b.error.type("callable",y.args[0],y.indicator));else if(!b.type.is_variable(y.args[1])&&!b.type.is_callable(y.args[1]))w.throw_error(b.error.type("callable",y.args[1],y.indicator));else if(w.session.rules[y.args[0].indicator]!==void 0)if(w.is_public_predicate(y.args[0].indicator)){var F=[];for(var J in w.session.rules[y.args[0].indicator])if(!!w.session.rules[y.args[0].indicator].hasOwnProperty(J)){var X=w.session.rules[y.args[0].indicator][J];w.session.renamed_variables={},X=X.rename(w),X.body===null&&(X.body=new H("true"));var Z=new H(",",[new H("=",[X.head,y.args[0]]),new H("=",[X.body,y.args[1]])]);F.push(new xe(S.goal.replace(Z),S.substitution,S))}w.prepend(F)}else w.throw_error(b.error.permission("access","private_procedure",y.args[0].indicator,y.indicator))},"current_predicate/1":function(w,S,y){var F=y.args[0];if(!b.type.is_variable(F)&&(!b.type.is_compound(F)||F.indicator!=="//2"))w.throw_error(b.error.type("predicate_indicator",F,y.indicator));else if(!b.type.is_variable(F)&&!b.type.is_variable(F.args[0])&&!b.type.is_atom(F.args[0]))w.throw_error(b.error.type("atom",F.args[0],y.indicator));else if(!b.type.is_variable(F)&&!b.type.is_variable(F.args[1])&&!b.type.is_integer(F.args[1]))w.throw_error(b.error.type("integer",F.args[1],y.indicator));else{var J=[];for(var X in w.session.rules)if(!!w.session.rules.hasOwnProperty(X)){var Z=X.lastIndexOf("/"),ie=X.substr(0,Z),be=parseInt(X.substr(Z+1,X.length-(Z+1))),Le=new H("/",[new H(ie),new Fe(be,!1)]),ot=new H("=",[Le,F]);J.push(new xe(S.goal.replace(ot),S.substitution,S))}w.prepend(J)}},"asserta/1":function(w,S,y){if(b.type.is_variable(y.args[0]))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_callable(y.args[0]))w.throw_error(b.error.type("callable",y.args[0],y.indicator));else{var F,J;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],J=we(y.args[0].args[1])):(F=y.args[0],J=null),b.type.is_callable(F)?J!==null&&!b.type.is_callable(J)?w.throw_error(b.error.type("callable",J,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator]=[new He(F,J,!0)].concat(w.session.rules[F.indicator]),w.success(S)):w.throw_error(b.error.permission("modify","static_procedure",F.indicator,y.indicator)):w.throw_error(b.error.type("callable",F,y.indicator))}},"assertz/1":function(w,S,y){if(b.type.is_variable(y.args[0]))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_callable(y.args[0]))w.throw_error(b.error.type("callable",y.args[0],y.indicator));else{var F,J;y.args[0].indicator===":-/2"?(F=y.args[0].args[0],J=we(y.args[0].args[1])):(F=y.args[0],J=null),b.type.is_callable(F)?J!==null&&!b.type.is_callable(J)?w.throw_error(b.error.type("callable",J,y.indicator)):w.is_public_predicate(F.indicator)?(w.session.rules[F.indicator]===void 0&&(w.session.rules[F.indicator]=[]),w.session.public_predicates[F.indicator]=!0,w.session.rules[F.indicator].push(new He(F,J,!0)),w.success(S)):w.throw_error(b.error.permission("modify","static_procedure",F.indicator,y.indicator)):w.throw_error(b.error.type("callable",F,y.indicator))}},"retract/1":function(w,S,y){if(b.type.is_variable(y.args[0]))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_callable(y.args[0]))w.throw_error(b.error.type("callable",y.args[0],y.indicator));else{var F,J;if(y.args[0].indicator===":-/2"?(F=y.args[0].args[0],J=y.args[0].args[1]):(F=y.args[0],J=new H("true")),typeof S.retract>"u")if(w.is_public_predicate(F.indicator)){if(w.session.rules[F.indicator]!==void 0){for(var X=[],Z=0;Zw.get_flag("max_arity").value)w.throw_error(b.error.representation("max_arity",y.indicator));else{var F=y.args[0].args[0].id+"/"+y.args[0].args[1].value;w.is_public_predicate(F)?(delete w.session.rules[F],w.success(S)):w.throw_error(b.error.permission("modify","static_procedure",F,y.indicator))}},"atom_length/2":function(w,S,y){if(b.type.is_variable(y.args[0]))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_atom(y.args[0]))w.throw_error(b.error.type("atom",y.args[0],y.indicator));else if(!b.type.is_variable(y.args[1])&&!b.type.is_integer(y.args[1]))w.throw_error(b.error.type("integer",y.args[1],y.indicator));else if(b.type.is_integer(y.args[1])&&y.args[1].value<0)w.throw_error(b.error.domain("not_less_than_zero",y.args[1],y.indicator));else{var F=new Fe(y.args[0].id.length,!1);w.prepend([new xe(S.goal.replace(new H("=",[F,y.args[1]])),S.substitution,S)])}},"atom_concat/3":function(w,S,y){var F,J,X=y.args[0],Z=y.args[1],ie=y.args[2];if(b.type.is_variable(ie)&&(b.type.is_variable(X)||b.type.is_variable(Z)))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(X)&&!b.type.is_atom(X))w.throw_error(b.error.type("atom",X,y.indicator));else if(!b.type.is_variable(Z)&&!b.type.is_atom(Z))w.throw_error(b.error.type("atom",Z,y.indicator));else if(!b.type.is_variable(ie)&&!b.type.is_atom(ie))w.throw_error(b.error.type("atom",ie,y.indicator));else{var be=b.type.is_variable(X),Le=b.type.is_variable(Z);if(!be&&!Le)J=new H("=",[ie,new H(X.id+Z.id)]),w.prepend([new xe(S.goal.replace(J),S.substitution,S)]);else if(be&&!Le)F=ie.id.substr(0,ie.id.length-Z.id.length),F+Z.id===ie.id&&(J=new H("=",[X,new H(F)]),w.prepend([new xe(S.goal.replace(J),S.substitution,S)]));else if(Le&&!be)F=ie.id.substr(X.id.length),X.id+F===ie.id&&(J=new H("=",[Z,new H(F)]),w.prepend([new xe(S.goal.replace(J),S.substitution,S)]));else{for(var ot=[],dt=0;dt<=ie.id.length;dt++){var Gt=new H(ie.id.substr(0,dt)),$t=new H(ie.id.substr(dt));J=new H(",",[new H("=",[Gt,X]),new H("=",[$t,Z])]),ot.push(new xe(S.goal.replace(J),S.substitution,S))}w.prepend(ot)}}},"sub_atom/5":function(w,S,y){var F,J=y.args[0],X=y.args[1],Z=y.args[2],ie=y.args[3],be=y.args[4];if(b.type.is_variable(J))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(X)&&!b.type.is_integer(X))w.throw_error(b.error.type("integer",X,y.indicator));else if(!b.type.is_variable(Z)&&!b.type.is_integer(Z))w.throw_error(b.error.type("integer",Z,y.indicator));else if(!b.type.is_variable(ie)&&!b.type.is_integer(ie))w.throw_error(b.error.type("integer",ie,y.indicator));else if(b.type.is_integer(X)&&X.value<0)w.throw_error(b.error.domain("not_less_than_zero",X,y.indicator));else if(b.type.is_integer(Z)&&Z.value<0)w.throw_error(b.error.domain("not_less_than_zero",Z,y.indicator));else if(b.type.is_integer(ie)&&ie.value<0)w.throw_error(b.error.domain("not_less_than_zero",ie,y.indicator));else{var Le=[],ot=[],dt=[];if(b.type.is_variable(X))for(F=0;F<=J.id.length;F++)Le.push(F);else Le.push(X.value);if(b.type.is_variable(Z))for(F=0;F<=J.id.length;F++)ot.push(F);else ot.push(Z.value);if(b.type.is_variable(ie))for(F=0;F<=J.id.length;F++)dt.push(F);else dt.push(ie.value);var Gt=[];for(var $t in Le)if(!!Le.hasOwnProperty($t)){F=Le[$t];for(var bt in ot)if(!!ot.hasOwnProperty(bt)){var an=ot[bt],Qr=J.id.length-F-an;if(e(dt,Qr)!==-1&&F+an+Qr===J.id.length){var mr=J.id.substr(F,an);if(J.id===J.id.substr(0,F)+mr+J.id.substr(F+an,Qr)){var br=new H("=",[new H(mr),be]),Wr=new H("=",[X,new Fe(F)]),Kn=new H("=",[Z,new Fe(an)]),Ls=new H("=",[ie,new Fe(Qr)]),Ti=new H(",",[new H(",",[new H(",",[Wr,Kn]),Ls]),br]);Gt.push(new xe(S.goal.replace(Ti),S.substitution,S))}}}}w.prepend(Gt)}},"atom_chars/2":function(w,S,y){var F=y.args[0],J=y.args[1];if(b.type.is_variable(F)&&b.type.is_variable(J))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(F)&&!b.type.is_atom(F))w.throw_error(b.error.type("atom",F,y.indicator));else if(b.type.is_variable(F)){for(var ie=J,be=b.type.is_variable(F),Le="";ie.indicator==="./2";){if(b.type.is_character(ie.args[0]))Le+=ie.args[0].id;else if(b.type.is_variable(ie.args[0])&&be){w.throw_error(b.error.instantiation(y.indicator));return}else if(!b.type.is_variable(ie.args[0])){w.throw_error(b.error.type("character",ie.args[0],y.indicator));return}ie=ie.args[1]}b.type.is_variable(ie)&&be?w.throw_error(b.error.instantiation(y.indicator)):!b.type.is_empty_list(ie)&&!b.type.is_variable(ie)?w.throw_error(b.error.type("list",J,y.indicator)):w.prepend([new xe(S.goal.replace(new H("=",[new H(Le),F])),S.substitution,S)])}else{for(var X=new H("[]"),Z=F.id.length-1;Z>=0;Z--)X=new H(".",[new H(F.id.charAt(Z)),X]);w.prepend([new xe(S.goal.replace(new H("=",[J,X])),S.substitution,S)])}},"atom_codes/2":function(w,S,y){var F=y.args[0],J=y.args[1];if(b.type.is_variable(F)&&b.type.is_variable(J))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(F)&&!b.type.is_atom(F))w.throw_error(b.error.type("atom",F,y.indicator));else if(b.type.is_variable(F)){for(var ie=J,be=b.type.is_variable(F),Le="";ie.indicator==="./2";){if(b.type.is_character_code(ie.args[0]))Le+=u(ie.args[0].value);else if(b.type.is_variable(ie.args[0])&&be){w.throw_error(b.error.instantiation(y.indicator));return}else if(!b.type.is_variable(ie.args[0])){w.throw_error(b.error.representation("character_code",y.indicator));return}ie=ie.args[1]}b.type.is_variable(ie)&&be?w.throw_error(b.error.instantiation(y.indicator)):!b.type.is_empty_list(ie)&&!b.type.is_variable(ie)?w.throw_error(b.error.type("list",J,y.indicator)):w.prepend([new xe(S.goal.replace(new H("=",[new H(Le),F])),S.substitution,S)])}else{for(var X=new H("[]"),Z=F.id.length-1;Z>=0;Z--)X=new H(".",[new Fe(n(F.id,Z),!1),X]);w.prepend([new xe(S.goal.replace(new H("=",[J,X])),S.substitution,S)])}},"char_code/2":function(w,S,y){var F=y.args[0],J=y.args[1];if(b.type.is_variable(F)&&b.type.is_variable(J))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(F)&&!b.type.is_character(F))w.throw_error(b.error.type("character",F,y.indicator));else if(!b.type.is_variable(J)&&!b.type.is_integer(J))w.throw_error(b.error.type("integer",J,y.indicator));else if(!b.type.is_variable(J)&&!b.type.is_character_code(J))w.throw_error(b.error.representation("character_code",y.indicator));else if(b.type.is_variable(J)){var X=new Fe(n(F.id,0),!1);w.prepend([new xe(S.goal.replace(new H("=",[X,J])),S.substitution,S)])}else{var Z=new H(u(J.value));w.prepend([new xe(S.goal.replace(new H("=",[Z,F])),S.substitution,S)])}},"number_chars/2":function(w,S,y){var F,J=y.args[0],X=y.args[1];if(b.type.is_variable(J)&&b.type.is_variable(X))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(J)&&!b.type.is_number(J))w.throw_error(b.error.type("number",J,y.indicator));else if(!b.type.is_variable(X)&&!b.type.is_list(X))w.throw_error(b.error.type("list",X,y.indicator));else{var Z=b.type.is_variable(J);if(!b.type.is_variable(X)){var ie=X,be=!0;for(F="";ie.indicator==="./2";){if(b.type.is_character(ie.args[0]))F+=ie.args[0].id;else if(b.type.is_variable(ie.args[0]))be=!1;else if(!b.type.is_variable(ie.args[0])){w.throw_error(b.error.type("character",ie.args[0],y.indicator));return}ie=ie.args[1]}if(be=be&&b.type.is_empty_list(ie),!b.type.is_empty_list(ie)&&!b.type.is_variable(ie)){w.throw_error(b.error.type("list",X,y.indicator));return}if(!be&&Z){w.throw_error(b.error.instantiation(y.indicator));return}else if(be)if(b.type.is_variable(ie)&&Z){w.throw_error(b.error.instantiation(y.indicator));return}else{var Le=w.parse(F),ot=Le.value;!b.type.is_number(ot)||Le.tokens[Le.tokens.length-1].space?w.throw_error(b.error.syntax_by_predicate("parseable_number",y.indicator)):w.prepend([new xe(S.goal.replace(new H("=",[J,ot])),S.substitution,S)]);return}}if(!Z){F=J.toString();for(var dt=new H("[]"),Gt=F.length-1;Gt>=0;Gt--)dt=new H(".",[new H(F.charAt(Gt)),dt]);w.prepend([new xe(S.goal.replace(new H("=",[X,dt])),S.substitution,S)])}}},"number_codes/2":function(w,S,y){var F,J=y.args[0],X=y.args[1];if(b.type.is_variable(J)&&b.type.is_variable(X))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(J)&&!b.type.is_number(J))w.throw_error(b.error.type("number",J,y.indicator));else if(!b.type.is_variable(X)&&!b.type.is_list(X))w.throw_error(b.error.type("list",X,y.indicator));else{var Z=b.type.is_variable(J);if(!b.type.is_variable(X)){var ie=X,be=!0;for(F="";ie.indicator==="./2";){if(b.type.is_character_code(ie.args[0]))F+=u(ie.args[0].value);else if(b.type.is_variable(ie.args[0]))be=!1;else if(!b.type.is_variable(ie.args[0])){w.throw_error(b.error.type("character_code",ie.args[0],y.indicator));return}ie=ie.args[1]}if(be=be&&b.type.is_empty_list(ie),!b.type.is_empty_list(ie)&&!b.type.is_variable(ie)){w.throw_error(b.error.type("list",X,y.indicator));return}if(!be&&Z){w.throw_error(b.error.instantiation(y.indicator));return}else if(be)if(b.type.is_variable(ie)&&Z){w.throw_error(b.error.instantiation(y.indicator));return}else{var Le=w.parse(F),ot=Le.value;!b.type.is_number(ot)||Le.tokens[Le.tokens.length-1].space?w.throw_error(b.error.syntax_by_predicate("parseable_number",y.indicator)):w.prepend([new xe(S.goal.replace(new H("=",[J,ot])),S.substitution,S)]);return}}if(!Z){F=J.toString();for(var dt=new H("[]"),Gt=F.length-1;Gt>=0;Gt--)dt=new H(".",[new Fe(n(F,Gt),!1),dt]);w.prepend([new xe(S.goal.replace(new H("=",[X,dt])),S.substitution,S)])}}},"upcase_atom/2":function(w,S,y){var F=y.args[0],J=y.args[1];b.type.is_variable(F)?w.throw_error(b.error.instantiation(y.indicator)):b.type.is_atom(F)?!b.type.is_variable(J)&&!b.type.is_atom(J)?w.throw_error(b.error.type("atom",J,y.indicator)):w.prepend([new xe(S.goal.replace(new H("=",[J,new H(F.id.toUpperCase(),[])])),S.substitution,S)]):w.throw_error(b.error.type("atom",F,y.indicator))},"downcase_atom/2":function(w,S,y){var F=y.args[0],J=y.args[1];b.type.is_variable(F)?w.throw_error(b.error.instantiation(y.indicator)):b.type.is_atom(F)?!b.type.is_variable(J)&&!b.type.is_atom(J)?w.throw_error(b.error.type("atom",J,y.indicator)):w.prepend([new xe(S.goal.replace(new H("=",[J,new H(F.id.toLowerCase(),[])])),S.substitution,S)]):w.throw_error(b.error.type("atom",F,y.indicator))},"atomic_list_concat/2":function(w,S,y){var F=y.args[0],J=y.args[1];w.prepend([new xe(S.goal.replace(new H("atomic_list_concat",[F,new H("",[]),J])),S.substitution,S)])},"atomic_list_concat/3":function(w,S,y){var F=y.args[0],J=y.args[1],X=y.args[2];if(b.type.is_variable(J)||b.type.is_variable(F)&&b.type.is_variable(X))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_variable(F)&&!b.type.is_list(F))w.throw_error(b.error.type("list",F,y.indicator));else if(!b.type.is_variable(X)&&!b.type.is_atom(X))w.throw_error(b.error.type("atom",X,y.indicator));else if(b.type.is_variable(X)){for(var ie="",be=F;b.type.is_term(be)&&be.indicator==="./2";){if(!b.type.is_atom(be.args[0])&&!b.type.is_number(be.args[0])){w.throw_error(b.error.type("atomic",be.args[0],y.indicator));return}ie!==""&&(ie+=J.id),b.type.is_atom(be.args[0])?ie+=be.args[0].id:ie+=""+be.args[0].value,be=be.args[1]}ie=new H(ie,[]),b.type.is_variable(be)?w.throw_error(b.error.instantiation(y.indicator)):!b.type.is_term(be)||be.indicator!=="[]/0"?w.throw_error(b.error.type("list",F,y.indicator)):w.prepend([new xe(S.goal.replace(new H("=",[ie,X])),S.substitution,S)])}else{var Z=g(o(X.id.split(J.id),function(Le){return new H(Le,[])}));w.prepend([new xe(S.goal.replace(new H("=",[Z,F])),S.substitution,S)])}},"@=/2":function(w,S,y){b.compare(y.args[0],y.args[1])>0&&w.success(S)},"@>=/2":function(w,S,y){b.compare(y.args[0],y.args[1])>=0&&w.success(S)},"compare/3":function(w,S,y){var F=y.args[0],J=y.args[1],X=y.args[2];if(!b.type.is_variable(F)&&!b.type.is_atom(F))w.throw_error(b.error.type("atom",F,y.indicator));else if(b.type.is_atom(F)&&["<",">","="].indexOf(F.id)===-1)w.throw_error(b.type.domain("order",F,y.indicator));else{var Z=b.compare(J,X);Z=Z===0?"=":Z===-1?"<":">",w.prepend([new xe(S.goal.replace(new H("=",[F,new H(Z,[])])),S.substitution,S)])}},"is/2":function(w,S,y){var F=y.args[1].interpret(w);b.type.is_number(F)?w.prepend([new xe(S.goal.replace(new H("=",[y.args[0],F],w.level)),S.substitution,S)]):w.throw_error(F)},"between/3":function(w,S,y){var F=y.args[0],J=y.args[1],X=y.args[2];if(b.type.is_variable(F)||b.type.is_variable(J))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_integer(F))w.throw_error(b.error.type("integer",F,y.indicator));else if(!b.type.is_integer(J))w.throw_error(b.error.type("integer",J,y.indicator));else if(!b.type.is_variable(X)&&!b.type.is_integer(X))w.throw_error(b.error.type("integer",X,y.indicator));else if(b.type.is_variable(X)){var Z=[new xe(S.goal.replace(new H("=",[X,F])),S.substitution,S)];F.value=X.value&&w.success(S)},"succ/2":function(w,S,y){var F=y.args[0],J=y.args[1];b.type.is_variable(F)&&b.type.is_variable(J)?w.throw_error(b.error.instantiation(y.indicator)):!b.type.is_variable(F)&&!b.type.is_integer(F)?w.throw_error(b.error.type("integer",F,y.indicator)):!b.type.is_variable(J)&&!b.type.is_integer(J)?w.throw_error(b.error.type("integer",J,y.indicator)):!b.type.is_variable(F)&&F.value<0?w.throw_error(b.error.domain("not_less_than_zero",F,y.indicator)):!b.type.is_variable(J)&&J.value<0?w.throw_error(b.error.domain("not_less_than_zero",J,y.indicator)):(b.type.is_variable(J)||J.value>0)&&(b.type.is_variable(F)?w.prepend([new xe(S.goal.replace(new H("=",[F,new Fe(J.value-1,!1)])),S.substitution,S)]):w.prepend([new xe(S.goal.replace(new H("=",[J,new Fe(F.value+1,!1)])),S.substitution,S)]))},"=:=/2":function(w,S,y){var F=b.arithmetic_compare(w,y.args[0],y.args[1]);b.type.is_term(F)?w.throw_error(F):F===0&&w.success(S)},"=\\=/2":function(w,S,y){var F=b.arithmetic_compare(w,y.args[0],y.args[1]);b.type.is_term(F)?w.throw_error(F):F!==0&&w.success(S)},"/2":function(w,S,y){var F=b.arithmetic_compare(w,y.args[0],y.args[1]);b.type.is_term(F)?w.throw_error(F):F>0&&w.success(S)},">=/2":function(w,S,y){var F=b.arithmetic_compare(w,y.args[0],y.args[1]);b.type.is_term(F)?w.throw_error(F):F>=0&&w.success(S)},"var/1":function(w,S,y){b.type.is_variable(y.args[0])&&w.success(S)},"atom/1":function(w,S,y){b.type.is_atom(y.args[0])&&w.success(S)},"atomic/1":function(w,S,y){b.type.is_atomic(y.args[0])&&w.success(S)},"compound/1":function(w,S,y){b.type.is_compound(y.args[0])&&w.success(S)},"integer/1":function(w,S,y){b.type.is_integer(y.args[0])&&w.success(S)},"float/1":function(w,S,y){b.type.is_float(y.args[0])&&w.success(S)},"number/1":function(w,S,y){b.type.is_number(y.args[0])&&w.success(S)},"nonvar/1":function(w,S,y){b.type.is_variable(y.args[0])||w.success(S)},"ground/1":function(w,S,y){y.variables().length===0&&w.success(S)},"acyclic_term/1":function(w,S,y){for(var F=S.substitution.apply(S.substitution),J=y.args[0].variables(),X=0;X0?bt[bt.length-1]:null,bt!==null&&(Gt=V(w,bt,0,w.__get_max_priority(),!1))}if(Gt.type===p&&Gt.len===bt.length-1&&an.value==="."){Gt=Gt.value.rename(w);var Qr=new H("=",[J,Gt]);if(ie.variables){var mr=g(o(Pe(Gt.variables()),function(br){return new Ie(br)}));Qr=new H(",",[Qr,new H("=",[ie.variables,mr])])}if(ie.variable_names){var mr=g(o(Pe(Gt.variables()),function(Wr){var Kn;for(Kn in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(Kn)&&w.session.renamed_variables[Kn]===Wr)break;return new H("=",[new H(Kn,[]),new Ie(Wr)])}));Qr=new H(",",[Qr,new H("=",[ie.variable_names,mr])])}if(ie.singletons){var mr=g(o(new He(Gt,null).singleton_variables(),function(Wr){var Kn;for(Kn in w.session.renamed_variables)if(w.session.renamed_variables.hasOwnProperty(Kn)&&w.session.renamed_variables[Kn]===Wr)break;return new H("=",[new H(Kn,[]),new Ie(Wr)])}));Qr=new H(",",[Qr,new H("=",[ie.singletons,mr])])}w.prepend([new xe(S.goal.replace(Qr),S.substitution,S)])}else Gt.type===p?w.throw_error(b.error.syntax(bt[Gt.len],"unexpected token",!1)):w.throw_error(Gt.value)}}},"write/1":function(w,S,y){var F=y.args[0];w.prepend([new xe(S.goal.replace(new H(",",[new H("current_output",[new Ie("S")]),new H("write",[new Ie("S"),F])])),S.substitution,S)])},"write/2":function(w,S,y){var F=y.args[0],J=y.args[1];w.prepend([new xe(S.goal.replace(new H("write_term",[F,J,new H(".",[new H("quoted",[new H("false",[])]),new H(".",[new H("ignore_ops",[new H("false")]),new H(".",[new H("numbervars",[new H("true")]),new H("[]",[])])])])])),S.substitution,S)])},"writeq/1":function(w,S,y){var F=y.args[0];w.prepend([new xe(S.goal.replace(new H(",",[new H("current_output",[new Ie("S")]),new H("writeq",[new Ie("S"),F])])),S.substitution,S)])},"writeq/2":function(w,S,y){var F=y.args[0],J=y.args[1];w.prepend([new xe(S.goal.replace(new H("write_term",[F,J,new H(".",[new H("quoted",[new H("true",[])]),new H(".",[new H("ignore_ops",[new H("false")]),new H(".",[new H("numbervars",[new H("true")]),new H("[]",[])])])])])),S.substitution,S)])},"write_canonical/1":function(w,S,y){var F=y.args[0];w.prepend([new xe(S.goal.replace(new H(",",[new H("current_output",[new Ie("S")]),new H("write_canonical",[new Ie("S"),F])])),S.substitution,S)])},"write_canonical/2":function(w,S,y){var F=y.args[0],J=y.args[1];w.prepend([new xe(S.goal.replace(new H("write_term",[F,J,new H(".",[new H("quoted",[new H("true",[])]),new H(".",[new H("ignore_ops",[new H("true")]),new H(".",[new H("numbervars",[new H("false")]),new H("[]",[])])])])])),S.substitution,S)])},"write_term/2":function(w,S,y){var F=y.args[0],J=y.args[1];w.prepend([new xe(S.goal.replace(new H(",",[new H("current_output",[new Ie("S")]),new H("write_term",[new Ie("S"),F,J])])),S.substitution,S)])},"write_term/3":function(w,S,y){var F=y.args[0],J=y.args[1],X=y.args[2],Z=b.type.is_stream(F)?F:w.get_stream_by_alias(F.id);if(b.type.is_variable(F)||b.type.is_variable(X))w.throw_error(b.error.instantiation(y.indicator));else if(!b.type.is_list(X))w.throw_error(b.error.type("list",X,y.indicator));else if(!b.type.is_stream(F)&&!b.type.is_atom(F))w.throw_error(b.error.domain("stream_or_alias",F,y.indicator));else if(!b.type.is_stream(Z)||Z.stream===null)w.throw_error(b.error.existence("stream",F,y.indicator));else if(Z.input)w.throw_error(b.error.permission("output","stream",F,y.indicator));else if(Z.type==="binary")w.throw_error(b.error.permission("output","binary_stream",F,y.indicator));else if(Z.position==="past_end_of_stream"&&Z.eof_action==="error")w.throw_error(b.error.permission("output","past_end_of_stream",F,y.indicator));else{for(var ie={},be=X,Le;b.type.is_term(be)&&be.indicator==="./2";){if(Le=be.args[0],b.type.is_variable(Le)){w.throw_error(b.error.instantiation(y.indicator));return}else if(!b.type.is_write_option(Le)){w.throw_error(b.error.domain("write_option",Le,y.indicator));return}ie[Le.id]=Le.args[0].id==="true",be=be.args[1]}if(be.indicator!=="[]/0"){b.type.is_variable(be)?w.throw_error(b.error.instantiation(y.indicator)):w.throw_error(b.error.type("list",X,y.indicator));return}else{ie.session=w.session;var ot=J.toString(ie);Z.stream.put(ot,Z.position),typeof Z.position=="number"&&(Z.position+=ot.length),w.success(S)}}},"halt/0":function(w,S,y){w.points=[]},"halt/1":function(w,S,y){var F=y.args[0];b.type.is_variable(F)?w.throw_error(b.error.instantiation(y.indicator)):b.type.is_integer(F)?w.points=[]:w.throw_error(b.error.type("integer",F,y.indicator))},"current_prolog_flag/2":function(w,S,y){var F=y.args[0],J=y.args[1];if(!b.type.is_variable(F)&&!b.type.is_atom(F))w.throw_error(b.error.type("atom",F,y.indicator));else if(!b.type.is_variable(F)&&!b.type.is_flag(F))w.throw_error(b.error.domain("prolog_flag",F,y.indicator));else{var X=[];for(var Z in b.flag)if(!!b.flag.hasOwnProperty(Z)){var ie=new H(",",[new H("=",[new H(Z),F]),new H("=",[w.get_flag(Z),J])]);X.push(new xe(S.goal.replace(ie),S.substitution,S))}w.prepend(X)}},"set_prolog_flag/2":function(w,S,y){var F=y.args[0],J=y.args[1];b.type.is_variable(F)||b.type.is_variable(J)?w.throw_error(b.error.instantiation(y.indicator)):b.type.is_atom(F)?b.type.is_flag(F)?b.type.is_value_flag(F,J)?b.type.is_modifiable_flag(F)?(w.session.flag[F.id]=J,w.success(S)):w.throw_error(b.error.permission("modify","flag",F)):w.throw_error(b.error.domain("flag_value",new H("+",[F,J]),y.indicator)):w.throw_error(b.error.domain("prolog_flag",F,y.indicator)):w.throw_error(b.error.type("atom",F,y.indicator))}},flag:{bounded:{allowed:[new H("true"),new H("false")],value:new H("true"),changeable:!1},max_integer:{allowed:[new Fe(Number.MAX_SAFE_INTEGER)],value:new Fe(Number.MAX_SAFE_INTEGER),changeable:!1},min_integer:{allowed:[new Fe(Number.MIN_SAFE_INTEGER)],value:new Fe(Number.MIN_SAFE_INTEGER),changeable:!1},integer_rounding_function:{allowed:[new H("down"),new H("toward_zero")],value:new H("toward_zero"),changeable:!1},char_conversion:{allowed:[new H("on"),new H("off")],value:new H("on"),changeable:!0},debug:{allowed:[new H("on"),new H("off")],value:new H("off"),changeable:!0},max_arity:{allowed:[new H("unbounded")],value:new H("unbounded"),changeable:!1},unknown:{allowed:[new H("error"),new H("fail"),new H("warning")],value:new H("error"),changeable:!0},double_quotes:{allowed:[new H("chars"),new H("codes"),new H("atom")],value:new H("codes"),changeable:!0},occurs_check:{allowed:[new H("false"),new H("true")],value:new H("false"),changeable:!0},dialect:{allowed:[new H("tau")],value:new H("tau"),changeable:!1},version_data:{allowed:[new H("tau",[new Fe(t.major,!1),new Fe(t.minor,!1),new Fe(t.patch,!1),new H(t.status)])],value:new H("tau",[new Fe(t.major,!1),new Fe(t.minor,!1),new Fe(t.patch,!1),new H(t.status)]),changeable:!1},nodejs:{allowed:[new H("yes"),new H("no")],value:new H(typeof gl<"u"&&gl.exports?"yes":"no"),changeable:!1}},unify:function(w,S,y){y=y===void 0?!1:y;for(var F=[{left:w,right:S}],J={};F.length!==0;){var X=F.pop();if(w=X.left,S=X.right,b.type.is_term(w)&&b.type.is_term(S)){if(w.indicator!==S.indicator)return null;for(var Z=0;ZJ.value?1:0:J}else return F},operate:function(w,S){if(b.type.is_operator(S)){for(var y=b.type.is_operator(S),F=[],J,X=!1,Z=0;Zw.get_flag("max_integer").value||J0?w.start+w.matches[0].length:w.start,J=y?new H("token_not_found"):new H("found",[new H(w.value.toString())]),X=new H(".",[new H("line",[new Fe(w.line+1)]),new H(".",[new H("column",[new Fe(F+1)]),new H(".",[J,new H("[]",[])])])]);return new H("error",[new H("syntax_error",[new H(S)]),X])},syntax_by_predicate:function(w,S){return new H("error",[new H("syntax_error",[new H(w)]),ee(S)])}},warning:{singleton:function(w,S,y){for(var F=new H("[]"),J=w.length-1;J>=0;J--)F=new H(".",[new Ie(w[J]),F]);return new H("warning",[new H("singleton_variables",[F,ee(S)]),new H(".",[new H("line",[new Fe(y,!1)]),new H("[]")])])},failed_goal:function(w,S){return new H("warning",[new H("failed_goal",[w]),new H(".",[new H("line",[new Fe(S,!1)]),new H("[]")])])}},format_variable:function(w){return"_"+w},format_answer:function(w,S,F){S instanceof Te&&(S=S.thread);var F=F||{};if(F.session=S?S.session:void 0,b.type.is_error(w))return"uncaught exception: "+w.args[0].toString();if(w===!1)return"false.";if(w===null)return"limit exceeded ;";var J=0,X="";if(b.type.is_substitution(w)){var Z=w.domain(!0);w=w.filter(function(Le,ot){return!b.type.is_variable(ot)||Z.indexOf(ot.id)!==-1&&Le!==ot.id})}for(var ie in w.links)!w.links.hasOwnProperty(ie)||(J++,X!==""&&(X+=", "),X+=ie.toString(F)+" = "+w.links[ie].toString(F));var be=typeof S>"u"||S.points.length>0?" ;":".";return J===0?"true"+be:X+be},flatten_error:function(w){if(!b.type.is_error(w))return null;w=w.args[0];var S={};return S.type=w.args[0].id,S.thrown=S.type==="syntax_error"?null:w.args[1].id,S.expected=null,S.found=null,S.representation=null,S.existence=null,S.existence_type=null,S.line=null,S.column=null,S.permission_operation=null,S.permission_type=null,S.evaluation_type=null,S.type==="type_error"||S.type==="domain_error"?(S.expected=w.args[0].args[0].id,S.found=w.args[0].args[1].toString()):S.type==="syntax_error"?w.args[1].indicator==="./2"?(S.expected=w.args[0].args[0].id,S.found=w.args[1].args[1].args[1].args[0],S.found=S.found.id==="token_not_found"?S.found.id:S.found.args[0].id,S.line=w.args[1].args[0].args[0].value,S.column=w.args[1].args[1].args[0].args[0].value):S.thrown=w.args[1].id:S.type==="permission_error"?(S.found=w.args[0].args[2].toString(),S.permission_operation=w.args[0].args[0].id,S.permission_type=w.args[0].args[1].id):S.type==="evaluation_error"?S.evaluation_type=w.args[0].args[0].id:S.type==="representation_error"?S.representation=w.args[0].args[0].id:S.type==="existence_error"&&(S.existence=w.args[0].args[1].toString(),S.existence_type=w.args[0].args[0].id),S},create:function(w){return new b.type.Session(w)}};typeof gl<"u"?gl.exports=b:window.pl=b})()});function sme(t,e,r){t.prepend(r.map(o=>new Ta.default.type.State(e.goal.replace(o),e.substitution,e)))}function yH(t){let e=ame.get(t.session);if(e==null)throw new Error("Assertion failed: A project should have been registered for the active session");return e}function lme(t,e){ame.set(t,e),t.consult(`:- use_module(library(${Xgt.id})).`)}var EH,Ta,ome,A0,Vgt,Jgt,ame,Xgt,cme=Et(()=>{Ye();EH=$e(d2()),Ta=$e(mH()),ome=$e(ve("vm")),{is_atom:A0,is_variable:Vgt,is_instantiated_list:Jgt}=Ta.default.type;ame=new WeakMap;Xgt=new Ta.default.type.Module("constraints",{["project_workspaces_by_descriptor/3"]:(t,e,r)=>{let[o,a,n]=r.args;if(!A0(o)||!A0(a)){t.throw_error(Ta.default.error.instantiation(r.indicator));return}let u=W.parseIdent(o.id),A=W.makeDescriptor(u,a.id),h=yH(t).tryWorkspaceByDescriptor(A);Vgt(n)&&h!==null&&sme(t,e,[new Ta.default.type.Term("=",[n,new Ta.default.type.Term(String(h.relativeCwd))])]),A0(n)&&h!==null&&h.relativeCwd===n.id&&t.success(e)},["workspace_field/3"]:(t,e,r)=>{let[o,a,n]=r.args;if(!A0(o)||!A0(a)){t.throw_error(Ta.default.error.instantiation(r.indicator));return}let A=yH(t).tryWorkspaceByCwd(o.id);if(A==null)return;let p=(0,EH.default)(A.manifest.raw,a.id);typeof p>"u"||sme(t,e,[new Ta.default.type.Term("=",[n,new Ta.default.type.Term(typeof p=="object"?JSON.stringify(p):p)])])},["workspace_field_test/3"]:(t,e,r)=>{let[o,a,n]=r.args;t.prepend([new Ta.default.type.State(e.goal.replace(new Ta.default.type.Term("workspace_field_test",[o,a,n,new Ta.default.type.Term("[]",[])])),e.substitution,e)])},["workspace_field_test/4"]:(t,e,r)=>{let[o,a,n,u]=r.args;if(!A0(o)||!A0(a)||!A0(n)||!Jgt(u)){t.throw_error(Ta.default.error.instantiation(r.indicator));return}let p=yH(t).tryWorkspaceByCwd(o.id);if(p==null)return;let h=(0,EH.default)(p.manifest.raw,a.id);if(typeof h>"u")return;let E={$$:h};for(let[v,x]of u.toJavaScript().entries())E[`$${v}`]=x;ome.default.runInNewContext(n.id,E)&&t.success(e)}},["project_workspaces_by_descriptor/3","workspace_field/3","workspace_field_test/3","workspace_field_test/4"])});var b2={};zt(b2,{Constraints:()=>S2,DependencyType:()=>pme});function to(t){if(t instanceof DC.default.type.Num)return t.value;if(t instanceof DC.default.type.Term)switch(t.indicator){case"throw/1":return to(t.args[0]);case"error/1":return to(t.args[0]);case"error/2":if(t.args[0]instanceof DC.default.type.Term&&t.args[0].indicator==="syntax_error/1")return Object.assign(to(t.args[0]),...to(t.args[1]));{let e=to(t.args[0]);return e.message+=` (in ${to(t.args[1])})`,e}case"syntax_error/1":return new Jt(43,`Syntax error: ${to(t.args[0])}`);case"existence_error/2":return new Jt(44,`Existence error: ${to(t.args[0])} ${to(t.args[1])} not found`);case"instantiation_error/0":return new Jt(75,"Instantiation error: an argument is variable when an instantiated argument was expected");case"line/1":return{line:to(t.args[0])};case"column/1":return{column:to(t.args[0])};case"found/1":return{found:to(t.args[0])};case"./2":return[to(t.args[0])].concat(to(t.args[1]));case"//2":return`${to(t.args[0])}/${to(t.args[1])}`;default:return t.id}throw`couldn't pretty print because of unsupported node ${t}`}function Ame(t){let e;try{e=to(t)}catch(r){throw typeof r=="string"?new Jt(42,`Unknown error: ${t} (note: ${r})`):r}return typeof e.line<"u"&&typeof e.column<"u"&&(e.message+=` at line ${e.line}, column ${e.column}`),e}function tm(t){return t.id==="null"?null:`${t.toJavaScript()}`}function Zgt(t){if(t.id==="null")return null;{let e=t.toJavaScript();if(typeof e!="string")return JSON.stringify(e);try{return JSON.stringify(JSON.parse(e))}catch{return JSON.stringify(e)}}}function f0(t){return typeof t=="string"?`'${t}'`:"[]"}var fme,DC,pme,ume,CH,S2,x2=Et(()=>{Ye();Ye();Pt();fme=$e(Gde()),DC=$e(mH());v2();cme();(0,fme.default)(DC.default);pme=(o=>(o.Dependencies="dependencies",o.DevDependencies="devDependencies",o.PeerDependencies="peerDependencies",o))(pme||{}),ume=["dependencies","devDependencies","peerDependencies"];CH=class{constructor(e,r){let o=1e3*e.workspaces.length;this.session=DC.default.create(o),lme(this.session,e),this.session.consult(":- use_module(library(lists))."),this.session.consult(r)}fetchNextAnswer(){return new Promise(e=>{this.session.answer(r=>{e(r)})})}async*makeQuery(e){let r=this.session.query(e);if(r!==!0)throw Ame(r);for(;;){let o=await this.fetchNextAnswer();if(o===null)throw new Jt(79,"Resolution limit exceeded");if(!o)break;if(o.id==="throw")throw Ame(o);yield o}}};S2=class{constructor(e){this.source="";this.project=e;let r=e.configuration.get("constraintsPath");oe.existsSync(r)&&(this.source=oe.readFileSync(r,"utf8"))}static async find(e){return new S2(e)}getProjectDatabase(){let e="";for(let r of ume)e+=`dependency_type(${r}). `;for(let r of this.project.workspacesByCwd.values()){let o=r.relativeCwd;e+=`workspace(${f0(o)}). `,e+=`workspace_ident(${f0(o)}, ${f0(W.stringifyIdent(r.anchoredLocator))}). `,e+=`workspace_version(${f0(o)}, ${f0(r.manifest.version)}). `;for(let a of ume)for(let n of r.manifest[a].values())e+=`workspace_has_dependency(${f0(o)}, ${f0(W.stringifyIdent(n))}, ${f0(n.range)}, ${a}). `}return e+=`workspace(_) :- false. `,e+=`workspace_ident(_, _) :- false. `,e+=`workspace_version(_, _) :- false. `,e+=`workspace_has_dependency(_, _, _, _) :- false. `,e}getDeclarations(){let e="";return e+=`gen_enforced_dependency(_, _, _, _) :- false. `,e+=`gen_enforced_field(_, _, _) :- false. `,e}get fullSource(){return`${this.getProjectDatabase()} ${this.source} ${this.getDeclarations()}`}createSession(){return new CH(this.project,this.fullSource)}async processClassic(){let e=this.createSession();return{enforcedDependencies:await this.genEnforcedDependencies(e),enforcedFields:await this.genEnforcedFields(e)}}async process(){let{enforcedDependencies:e,enforcedFields:r}=await this.processClassic(),o=new Map;for(let{workspace:a,dependencyIdent:n,dependencyRange:u,dependencyType:A}of e){let p=B2([A,W.stringifyIdent(n)]),h=_e.getMapWithDefault(o,a.cwd);_e.getMapWithDefault(h,p).set(u??void 0,new Set)}for(let{workspace:a,fieldPath:n,fieldValue:u}of r){let A=B2(n),p=_e.getMapWithDefault(o,a.cwd);_e.getMapWithDefault(p,A).set(JSON.parse(u)??void 0,new Set)}return{manifestUpdates:o,reportedErrors:new Map}}async genEnforcedDependencies(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), dependency_type(DependencyType), gen_enforced_dependency(WorkspaceCwd, DependencyIdent, DependencyRange, DependencyType).")){let a=z.resolve(this.project.cwd,tm(o.links.WorkspaceCwd)),n=tm(o.links.DependencyIdent),u=tm(o.links.DependencyRange),A=tm(o.links.DependencyType);if(a===null||n===null)throw new Error("Invalid rule");let p=this.project.getWorkspaceByCwd(a),h=W.parseIdent(n);r.push({workspace:p,dependencyIdent:h,dependencyRange:u,dependencyType:A})}return _e.sortMap(r,[({dependencyRange:o})=>o!==null?"0":"1",({workspace:o})=>W.stringifyIdent(o.anchoredLocator),({dependencyIdent:o})=>W.stringifyIdent(o)])}async genEnforcedFields(e){let r=[];for await(let o of e.makeQuery("workspace(WorkspaceCwd), gen_enforced_field(WorkspaceCwd, FieldPath, FieldValue).")){let a=z.resolve(this.project.cwd,tm(o.links.WorkspaceCwd)),n=tm(o.links.FieldPath),u=Zgt(o.links.FieldValue);if(a===null||n===null)throw new Error("Invalid rule");let A=this.project.getWorkspaceByCwd(a);r.push({workspace:A,fieldPath:n,fieldValue:u})}return _e.sortMap(r,[({workspace:o})=>W.stringifyIdent(o.anchoredLocator),({fieldPath:o})=>o])}async*query(e){let r=this.createSession();for await(let o of r.makeQuery(e)){let a={};for(let[n,u]of Object.entries(o.links))n!=="_"&&(a[n]=tm(u));yield a}}}});var Ime=_(Ik=>{"use strict";Object.defineProperty(Ik,"__esModule",{value:!0});function j2(t){let e=[...t.caches],r=e.shift();return r===void 0?wme():{get(o,a,n={miss:()=>Promise.resolve()}){return r.get(o,a,n).catch(()=>j2({caches:e}).get(o,a,n))},set(o,a){return r.set(o,a).catch(()=>j2({caches:e}).set(o,a))},delete(o){return r.delete(o).catch(()=>j2({caches:e}).delete(o))},clear(){return r.clear().catch(()=>j2({caches:e}).clear())}}}function wme(){return{get(t,e,r={miss:()=>Promise.resolve()}){return e().then(a=>Promise.all([a,r.miss(a)])).then(([a])=>a)},set(t,e){return Promise.resolve(e)},delete(t){return Promise.resolve()},clear(){return Promise.resolve()}}}Ik.createFallbackableCache=j2;Ik.createNullCache=wme});var vme=_((FWt,Bme)=>{Bme.exports=Ime()});var Dme=_(TH=>{"use strict";Object.defineProperty(TH,"__esModule",{value:!0});function mdt(t={serializable:!0}){let e={};return{get(r,o,a={miss:()=>Promise.resolve()}){let n=JSON.stringify(r);if(n in e)return Promise.resolve(t.serializable?JSON.parse(e[n]):e[n]);let u=o(),A=a&&a.miss||(()=>Promise.resolve());return u.then(p=>A(p)).then(()=>u)},set(r,o){return e[JSON.stringify(r)]=t.serializable?JSON.stringify(o):o,Promise.resolve(o)},delete(r){return delete e[JSON.stringify(r)],Promise.resolve()},clear(){return e={},Promise.resolve()}}}TH.createInMemoryCache=mdt});var Sme=_((TWt,Pme)=>{Pme.exports=Dme()});var xme=_($c=>{"use strict";Object.defineProperty($c,"__esModule",{value:!0});function ydt(t,e,r){let o={"x-algolia-api-key":r,"x-algolia-application-id":e};return{headers(){return t===LH.WithinHeaders?o:{}},queryParameters(){return t===LH.WithinQueryParameters?o:{}}}}function Edt(t){let e=0,r=()=>(e++,new Promise(o=>{setTimeout(()=>{o(t(r))},Math.min(100*e,1e3))}));return t(r)}function bme(t,e=(r,o)=>Promise.resolve()){return Object.assign(t,{wait(r){return bme(t.then(o=>Promise.all([e(o,r),o])).then(o=>o[1]))}})}function Cdt(t){let e=t.length-1;for(e;e>0;e--){let r=Math.floor(Math.random()*(e+1)),o=t[e];t[e]=t[r],t[r]=o}return t}function wdt(t,e){return e&&Object.keys(e).forEach(r=>{t[r]=e[r](t)}),t}function Idt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}var Bdt="4.22.1",vdt=t=>()=>t.transporter.requester.destroy(),LH={WithinQueryParameters:0,WithinHeaders:1};$c.AuthMode=LH;$c.addMethods=wdt;$c.createAuth=ydt;$c.createRetryablePromise=Edt;$c.createWaitablePromise=bme;$c.destroy=vdt;$c.encode=Idt;$c.shuffle=Cdt;$c.version=Bdt});var Y2=_((NWt,kme)=>{kme.exports=xme()});var Qme=_(NH=>{"use strict";Object.defineProperty(NH,"__esModule",{value:!0});var Ddt={Delete:"DELETE",Get:"GET",Post:"POST",Put:"PUT"};NH.MethodEnum=Ddt});var W2=_((MWt,Fme)=>{Fme.exports=Qme()});var Kme=_(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});var Tme=W2();function OH(t,e){let r=t||{},o=r.data||{};return Object.keys(r).forEach(a=>{["timeout","headers","queryParameters","data","cacheable"].indexOf(a)===-1&&(o[a]=r[a])}),{data:Object.entries(o).length>0?o:void 0,timeout:r.timeout||e,headers:r.headers||{},queryParameters:r.queryParameters||{},cacheable:r.cacheable}}var K2={Read:1,Write:2,Any:3},xC={Up:1,Down:2,Timeouted:3},Lme=2*60*1e3;function UH(t,e=xC.Up){return{...t,status:e,lastUpdate:Date.now()}}function Nme(t){return t.status===xC.Up||Date.now()-t.lastUpdate>Lme}function Ome(t){return t.status===xC.Timeouted&&Date.now()-t.lastUpdate<=Lme}function _H(t){return typeof t=="string"?{protocol:"https",url:t,accept:K2.Any}:{protocol:t.protocol||"https",url:t.url,accept:t.accept||K2.Any}}function Pdt(t,e){return Promise.all(e.map(r=>t.get(r,()=>Promise.resolve(UH(r))))).then(r=>{let o=r.filter(A=>Nme(A)),a=r.filter(A=>Ome(A)),n=[...o,...a],u=n.length>0?n.map(A=>_H(A)):e;return{getTimeout(A,p){return(a.length===0&&A===0?1:a.length+3+A)*p},statelessHosts:u}})}var Sdt=({isTimedOut:t,status:e})=>!t&&~~e===0,bdt=t=>{let e=t.status;return t.isTimedOut||Sdt(t)||~~(e/100)!==2&&~~(e/100)!==4},xdt=({status:t})=>~~(t/100)===2,kdt=(t,e)=>bdt(t)?e.onRetry(t):xdt(t)?e.onSuccess(t):e.onFail(t);function Rme(t,e,r,o){let a=[],n=qme(r,o),u=Gme(t,o),A=r.method,p=r.method!==Tme.MethodEnum.Get?{}:{...r.data,...o.data},h={"x-algolia-agent":t.userAgent.value,...t.queryParameters,...p,...o.queryParameters},E=0,I=(v,x)=>{let C=v.pop();if(C===void 0)throw Wme(MH(a));let R={data:n,headers:u,method:A,url:_me(C,r.path,h),connectTimeout:x(E,t.timeouts.connect),responseTimeout:x(E,o.timeout)},N=V=>{let te={request:R,response:V,host:C,triesLeft:v.length};return a.push(te),te},U={onSuccess:V=>Mme(V),onRetry(V){let te=N(V);return V.isTimedOut&&E++,Promise.all([t.logger.info("Retryable failure",HH(te)),t.hostsCache.set(C,UH(C,V.isTimedOut?xC.Timeouted:xC.Down))]).then(()=>I(v,x))},onFail(V){throw N(V),Ume(V,MH(a))}};return t.requester.send(R).then(V=>kdt(V,U))};return Pdt(t.hostsCache,e).then(v=>I([...v.statelessHosts].reverse(),v.getTimeout))}function Qdt(t){let{hostsCache:e,logger:r,requester:o,requestsCache:a,responsesCache:n,timeouts:u,userAgent:A,hosts:p,queryParameters:h,headers:E}=t,I={hostsCache:e,logger:r,requester:o,requestsCache:a,responsesCache:n,timeouts:u,userAgent:A,headers:E,queryParameters:h,hosts:p.map(v=>_H(v)),read(v,x){let C=OH(x,I.timeouts.read),R=()=>Rme(I,I.hosts.filter(V=>(V.accept&K2.Read)!==0),v,C);if((C.cacheable!==void 0?C.cacheable:v.cacheable)!==!0)return R();let U={request:v,mappedRequestOptions:C,transporter:{queryParameters:I.queryParameters,headers:I.headers}};return I.responsesCache.get(U,()=>I.requestsCache.get(U,()=>I.requestsCache.set(U,R()).then(V=>Promise.all([I.requestsCache.delete(U),V]),V=>Promise.all([I.requestsCache.delete(U),Promise.reject(V)])).then(([V,te])=>te)),{miss:V=>I.responsesCache.set(U,V)})},write(v,x){return Rme(I,I.hosts.filter(C=>(C.accept&K2.Write)!==0),v,OH(x,I.timeouts.write))}};return I}function Fdt(t){let e={value:`Algolia for JavaScript (${t})`,add(r){let o=`; ${r.segment}${r.version!==void 0?` (${r.version})`:""}`;return e.value.indexOf(o)===-1&&(e.value=`${e.value}${o}`),e}};return e}function Mme(t){try{return JSON.parse(t.content)}catch(e){throw Yme(e.message,t)}}function Ume({content:t,status:e},r){let o=t;try{o=JSON.parse(t).message}catch{}return jme(o,e,r)}function Rdt(t,...e){let r=0;return t.replace(/%s/g,()=>encodeURIComponent(e[r++]))}function _me(t,e,r){let o=Hme(r),a=`${t.protocol}://${t.url}/${e.charAt(0)==="/"?e.substr(1):e}`;return o.length&&(a+=`?${o}`),a}function Hme(t){let e=r=>Object.prototype.toString.call(r)==="[object Object]"||Object.prototype.toString.call(r)==="[object Array]";return Object.keys(t).map(r=>Rdt("%s=%s",r,e(t[r])?JSON.stringify(t[r]):t[r])).join("&")}function qme(t,e){if(t.method===Tme.MethodEnum.Get||t.data===void 0&&e.data===void 0)return;let r=Array.isArray(t.data)?t.data:{...t.data,...e.data};return JSON.stringify(r)}function Gme(t,e){let r={...t.headers,...e.headers},o={};return Object.keys(r).forEach(a=>{let n=r[a];o[a.toLowerCase()]=n}),o}function MH(t){return t.map(e=>HH(e))}function HH(t){let e=t.request.headers["x-algolia-api-key"]?{"x-algolia-api-key":"*****"}:{};return{...t,request:{...t.request,headers:{...t.request.headers,...e}}}}function jme(t,e,r){return{name:"ApiError",message:t,status:e,transporterStackTrace:r}}function Yme(t,e){return{name:"DeserializationError",message:t,response:e}}function Wme(t){return{name:"RetryError",message:"Unreachable hosts - your application id may be incorrect. If the error persists, contact support@algolia.com.",transporterStackTrace:t}}Fi.CallEnum=K2;Fi.HostStatusEnum=xC;Fi.createApiError=jme;Fi.createDeserializationError=Yme;Fi.createMappedRequestOptions=OH;Fi.createRetryError=Wme;Fi.createStatefulHost=UH;Fi.createStatelessHost=_H;Fi.createTransporter=Qdt;Fi.createUserAgent=Fdt;Fi.deserializeFailure=Ume;Fi.deserializeSuccess=Mme;Fi.isStatefulHostTimeouted=Ome;Fi.isStatefulHostUp=Nme;Fi.serializeData=qme;Fi.serializeHeaders=Gme;Fi.serializeQueryParameters=Hme;Fi.serializeUrl=_me;Fi.stackFrameWithoutCredentials=HH;Fi.stackTraceWithoutCredentials=MH});var z2=_((_Wt,zme)=>{zme.exports=Kme()});var Vme=_(y0=>{"use strict";Object.defineProperty(y0,"__esModule",{value:!0});var kC=Y2(),Tdt=z2(),V2=W2(),Ldt=t=>{let e=t.region||"us",r=kC.createAuth(kC.AuthMode.WithinHeaders,t.appId,t.apiKey),o=Tdt.createTransporter({hosts:[{url:`analytics.${e}.algolia.com`}],...t,headers:{...r.headers(),"content-type":"application/json",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a=t.appId;return kC.addMethods({appId:a,transporter:o},t.methods)},Ndt=t=>(e,r)=>t.transporter.write({method:V2.MethodEnum.Post,path:"2/abtests",data:e},r),Odt=t=>(e,r)=>t.transporter.write({method:V2.MethodEnum.Delete,path:kC.encode("2/abtests/%s",e)},r),Mdt=t=>(e,r)=>t.transporter.read({method:V2.MethodEnum.Get,path:kC.encode("2/abtests/%s",e)},r),Udt=t=>e=>t.transporter.read({method:V2.MethodEnum.Get,path:"2/abtests"},e),_dt=t=>(e,r)=>t.transporter.write({method:V2.MethodEnum.Post,path:kC.encode("2/abtests/%s/stop",e)},r);y0.addABTest=Ndt;y0.createAnalyticsClient=Ldt;y0.deleteABTest=Odt;y0.getABTest=Mdt;y0.getABTests=Udt;y0.stopABTest=_dt});var Xme=_((qWt,Jme)=>{Jme.exports=Vme()});var $me=_(J2=>{"use strict";Object.defineProperty(J2,"__esModule",{value:!0});var qH=Y2(),Hdt=z2(),Zme=W2(),qdt=t=>{let e=t.region||"us",r=qH.createAuth(qH.AuthMode.WithinHeaders,t.appId,t.apiKey),o=Hdt.createTransporter({hosts:[{url:`personalization.${e}.algolia.com`}],...t,headers:{...r.headers(),"content-type":"application/json",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}});return qH.addMethods({appId:t.appId,transporter:o},t.methods)},Gdt=t=>e=>t.transporter.read({method:Zme.MethodEnum.Get,path:"1/strategies/personalization"},e),jdt=t=>(e,r)=>t.transporter.write({method:Zme.MethodEnum.Post,path:"1/strategies/personalization",data:e},r);J2.createPersonalizationClient=qdt;J2.getPersonalizationStrategy=Gdt;J2.setPersonalizationStrategy=jdt});var tye=_((jWt,eye)=>{eye.exports=$me()});var gye=_(Ft=>{"use strict";Object.defineProperty(Ft,"__esModule",{value:!0});var jt=Y2(),La=z2(),Ir=W2(),Ydt=ve("crypto");function Bk(t){let e=r=>t.request(r).then(o=>{if(t.batch!==void 0&&t.batch(o.hits),!t.shouldStop(o))return o.cursor?e({cursor:o.cursor}):e({page:(r.page||0)+1})});return e({})}var Wdt=t=>{let e=t.appId,r=jt.createAuth(t.authMode!==void 0?t.authMode:jt.AuthMode.WithinHeaders,e,t.apiKey),o=La.createTransporter({hosts:[{url:`${e}-dsn.algolia.net`,accept:La.CallEnum.Read},{url:`${e}.algolia.net`,accept:La.CallEnum.Write}].concat(jt.shuffle([{url:`${e}-1.algolianet.com`},{url:`${e}-2.algolianet.com`},{url:`${e}-3.algolianet.com`}])),...t,headers:{...r.headers(),"content-type":"application/x-www-form-urlencoded",...t.headers},queryParameters:{...r.queryParameters(),...t.queryParameters}}),a={transporter:o,appId:e,addAlgoliaAgent(n,u){o.userAgent.add({segment:n,version:u})},clearCache(){return Promise.all([o.requestsCache.clear(),o.responsesCache.clear()]).then(()=>{})}};return jt.addMethods(a,t.methods)};function rye(){return{name:"MissingObjectIDError",message:"All objects must have an unique objectID (like a primary key) to be valid. Algolia is also able to generate objectIDs automatically but *it's not recommended*. To do it, use the `{'autoGenerateObjectIDIfNotExist': true}` option."}}function nye(){return{name:"ObjectNotFoundError",message:"Object not found."}}function iye(){return{name:"ValidUntilNotFoundError",message:"ValidUntil not found in given secured api key."}}var Kdt=t=>(e,r)=>{let{queryParameters:o,...a}=r||{},n={acl:e,...o!==void 0?{queryParameters:o}:{}},u=(A,p)=>jt.createRetryablePromise(h=>X2(t)(A.key,p).catch(E=>{if(E.status!==404)throw E;return h()}));return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:"1/keys",data:n},a),u)},zdt=t=>(e,r,o)=>{let a=La.createMappedRequestOptions(o);return a.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:Ir.MethodEnum.Post,path:"1/clusters/mapping",data:{cluster:r}},a)},Vdt=t=>(e,r,o)=>t.transporter.write({method:Ir.MethodEnum.Post,path:"1/clusters/mapping/batch",data:{users:e,cluster:r}},o),Jdt=t=>(e,r)=>jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!0,requests:{action:"addEntry",body:[]}}},r),(o,a)=>QC(t)(o.taskID,a)),vk=t=>(e,r,o)=>{let a=(n,u)=>Z2(t)(e,{methods:{waitTask:Zi}}).waitTask(n.taskID,u);return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/operation",e),data:{operation:"copy",destination:r}},o),a)},Xdt=t=>(e,r,o)=>vk(t)(e,r,{...o,scope:[Pk.Rules]}),Zdt=t=>(e,r,o)=>vk(t)(e,r,{...o,scope:[Pk.Settings]}),$dt=t=>(e,r,o)=>vk(t)(e,r,{...o,scope:[Pk.Synonyms]}),emt=t=>(e,r)=>e.method===Ir.MethodEnum.Get?t.transporter.read(e,r):t.transporter.write(e,r),tmt=t=>(e,r)=>{let o=(a,n)=>jt.createRetryablePromise(u=>X2(t)(e,n).then(u).catch(A=>{if(A.status!==404)throw A}));return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Delete,path:jt.encode("1/keys/%s",e)},r),o)},rmt=t=>(e,r,o)=>{let a=r.map(n=>({action:"deleteEntry",body:{objectID:n}}));return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!1,requests:a}},o),(n,u)=>QC(t)(n.taskID,u))},nmt=()=>(t,e)=>{let r=La.serializeQueryParameters(e),o=Ydt.createHmac("sha256",t).update(r).digest("hex");return Buffer.from(o+r).toString("base64")},X2=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Get,path:jt.encode("1/keys/%s",e)},r),sye=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Get,path:jt.encode("1/task/%s",e.toString())},r),imt=t=>e=>t.transporter.read({method:Ir.MethodEnum.Get,path:"/1/dictionaries/*/settings"},e),smt=t=>e=>t.transporter.read({method:Ir.MethodEnum.Get,path:"1/logs"},e),omt=()=>t=>{let e=Buffer.from(t,"base64").toString("ascii"),r=/validUntil=(\d+)/,o=e.match(r);if(o===null)throw iye();return parseInt(o[1],10)-Math.round(new Date().getTime()/1e3)},amt=t=>e=>t.transporter.read({method:Ir.MethodEnum.Get,path:"1/clusters/mapping/top"},e),lmt=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Get,path:jt.encode("1/clusters/mapping/%s",e)},r),cmt=t=>e=>{let{retrieveMappings:r,...o}=e||{};return r===!0&&(o.getClusters=!0),t.transporter.read({method:Ir.MethodEnum.Get,path:"1/clusters/mapping/pending"},o)},Z2=t=>(e,r={})=>{let o={transporter:t.transporter,appId:t.appId,indexName:e};return jt.addMethods(o,r.methods)},umt=t=>e=>t.transporter.read({method:Ir.MethodEnum.Get,path:"1/keys"},e),Amt=t=>e=>t.transporter.read({method:Ir.MethodEnum.Get,path:"1/clusters"},e),fmt=t=>e=>t.transporter.read({method:Ir.MethodEnum.Get,path:"1/indexes"},e),pmt=t=>e=>t.transporter.read({method:Ir.MethodEnum.Get,path:"1/clusters/mapping"},e),hmt=t=>(e,r,o)=>{let a=(n,u)=>Z2(t)(e,{methods:{waitTask:Zi}}).waitTask(n.taskID,u);return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/operation",e),data:{operation:"move",destination:r}},o),a)},gmt=t=>(e,r)=>{let o=(a,n)=>Promise.all(Object.keys(a.taskID).map(u=>Z2(t)(u,{methods:{waitTask:Zi}}).waitTask(a.taskID[u],n)));return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:"1/indexes/*/batch",data:{requests:e}},r),o)},dmt=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:e}},r),mmt=t=>(e,r)=>{let o=e.map(a=>({...a,params:La.serializeQueryParameters(a.params||{})}));return t.transporter.read({method:Ir.MethodEnum.Post,path:"1/indexes/*/queries",data:{requests:o},cacheable:!0},r)},ymt=t=>(e,r)=>Promise.all(e.map(o=>{let{facetName:a,facetQuery:n,...u}=o.params;return Z2(t)(o.indexName,{methods:{searchForFacetValues:fye}}).searchForFacetValues(a,n,{...r,...u})})),Emt=t=>(e,r)=>{let o=La.createMappedRequestOptions(r);return o.queryParameters["X-Algolia-User-ID"]=e,t.transporter.write({method:Ir.MethodEnum.Delete,path:"1/clusters/mapping"},o)},Cmt=t=>(e,r,o)=>{let a=r.map(n=>({action:"addEntry",body:n}));return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!0,requests:a}},o),(n,u)=>QC(t)(n.taskID,u))},wmt=t=>(e,r)=>{let o=(a,n)=>jt.createRetryablePromise(u=>X2(t)(e,n).catch(A=>{if(A.status!==404)throw A;return u()}));return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/keys/%s/restore",e)},r),o)},Imt=t=>(e,r,o)=>{let a=r.map(n=>({action:"addEntry",body:n}));return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("/1/dictionaries/%s/batch",e),data:{clearExistingDictionaryEntries:!1,requests:a}},o),(n,u)=>QC(t)(n.taskID,u))},Bmt=t=>(e,r,o)=>t.transporter.read({method:Ir.MethodEnum.Post,path:jt.encode("/1/dictionaries/%s/search",e),data:{query:r},cacheable:!0},o),vmt=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Post,path:"1/clusters/mapping/search",data:{query:e}},r),Dmt=t=>(e,r)=>jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Put,path:"/1/dictionaries/*/settings",data:e},r),(o,a)=>QC(t)(o.taskID,a)),Pmt=t=>(e,r)=>{let o=Object.assign({},r),{queryParameters:a,...n}=r||{},u=a?{queryParameters:a}:{},A=["acl","indexes","referers","restrictSources","queryParameters","description","maxQueriesPerIPPerHour","maxHitsPerQuery"],p=E=>Object.keys(o).filter(I=>A.indexOf(I)!==-1).every(I=>{if(Array.isArray(E[I])&&Array.isArray(o[I])){let v=E[I];return v.length===o[I].length&&v.every((x,C)=>x===o[I][C])}else return E[I]===o[I]}),h=(E,I)=>jt.createRetryablePromise(v=>X2(t)(e,I).then(x=>p(x)?Promise.resolve():v()));return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Put,path:jt.encode("1/keys/%s",e),data:u},n),h)},QC=t=>(e,r)=>jt.createRetryablePromise(o=>sye(t)(e,r).then(a=>a.status!=="published"?o():void 0)),oye=t=>(e,r)=>{let o=(a,n)=>Zi(t)(a.taskID,n);return jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/batch",t.indexName),data:{requests:e}},r),o)},Smt=t=>e=>Bk({shouldStop:r=>r.cursor===void 0,...e,request:r=>t.transporter.read({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/browse",t.indexName),data:r},e)}),bmt=t=>e=>{let r={hitsPerPage:1e3,...e};return Bk({shouldStop:o=>o.hits.length({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},xmt=t=>e=>{let r={hitsPerPage:1e3,...e};return Bk({shouldStop:o=>o.hits.length({...a,hits:a.hits.map(n=>(delete n._highlightResult,n))}))}})},Dk=t=>(e,r,o)=>{let{batchSize:a,...n}=o||{},u={taskIDs:[],objectIDs:[]},A=(p=0)=>{let h=[],E;for(E=p;E({action:r,body:I})),n).then(I=>(u.objectIDs=u.objectIDs.concat(I.objectIDs),u.taskIDs.push(I.taskID),E++,A(E)))};return jt.createWaitablePromise(A(),(p,h)=>Promise.all(p.taskIDs.map(E=>Zi(t)(E,h))))},kmt=t=>e=>jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/clear",t.indexName)},e),(r,o)=>Zi(t)(r.taskID,o)),Qmt=t=>e=>{let{forwardToReplicas:r,...o}=e||{},a=La.createMappedRequestOptions(o);return r&&(a.queryParameters.forwardToReplicas=1),jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/rules/clear",t.indexName)},a),(n,u)=>Zi(t)(n.taskID,u))},Fmt=t=>e=>{let{forwardToReplicas:r,...o}=e||{},a=La.createMappedRequestOptions(o);return r&&(a.queryParameters.forwardToReplicas=1),jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/synonyms/clear",t.indexName)},a),(n,u)=>Zi(t)(n.taskID,u))},Rmt=t=>(e,r)=>jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/deleteByQuery",t.indexName),data:e},r),(o,a)=>Zi(t)(o.taskID,a)),Tmt=t=>e=>jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Delete,path:jt.encode("1/indexes/%s",t.indexName)},e),(r,o)=>Zi(t)(r.taskID,o)),Lmt=t=>(e,r)=>jt.createWaitablePromise(aye(t)([e],r).then(o=>({taskID:o.taskIDs[0]})),(o,a)=>Zi(t)(o.taskID,a)),aye=t=>(e,r)=>{let o=e.map(a=>({objectID:a}));return Dk(t)(o,im.DeleteObject,r)},Nmt=t=>(e,r)=>{let{forwardToReplicas:o,...a}=r||{},n=La.createMappedRequestOptions(a);return o&&(n.queryParameters.forwardToReplicas=1),jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Delete,path:jt.encode("1/indexes/%s/rules/%s",t.indexName,e)},n),(u,A)=>Zi(t)(u.taskID,A))},Omt=t=>(e,r)=>{let{forwardToReplicas:o,...a}=r||{},n=La.createMappedRequestOptions(a);return o&&(n.queryParameters.forwardToReplicas=1),jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Delete,path:jt.encode("1/indexes/%s/synonyms/%s",t.indexName,e)},n),(u,A)=>Zi(t)(u.taskID,A))},Mmt=t=>e=>lye(t)(e).then(()=>!0).catch(r=>{if(r.status!==404)throw r;return!1}),Umt=t=>(e,r,o)=>t.transporter.read({method:Ir.MethodEnum.Post,path:jt.encode("1/answers/%s/prediction",t.indexName),data:{query:e,queryLanguages:r},cacheable:!0},o),_mt=t=>(e,r)=>{let{query:o,paginate:a,...n}=r||{},u=0,A=()=>Aye(t)(o||"",{...n,page:u}).then(p=>{for(let[h,E]of Object.entries(p.hits))if(e(E))return{object:E,position:parseInt(h,10),page:u};if(u++,a===!1||u>=p.nbPages)throw nye();return A()});return A()},Hmt=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Get,path:jt.encode("1/indexes/%s/%s",t.indexName,e)},r),qmt=()=>(t,e)=>{for(let[r,o]of Object.entries(t.hits))if(o.objectID===e)return parseInt(r,10);return-1},Gmt=t=>(e,r)=>{let{attributesToRetrieve:o,...a}=r||{},n=e.map(u=>({indexName:t.indexName,objectID:u,...o?{attributesToRetrieve:o}:{}}));return t.transporter.read({method:Ir.MethodEnum.Post,path:"1/indexes/*/objects",data:{requests:n}},a)},jmt=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Get,path:jt.encode("1/indexes/%s/rules/%s",t.indexName,e)},r),lye=t=>e=>t.transporter.read({method:Ir.MethodEnum.Get,path:jt.encode("1/indexes/%s/settings",t.indexName),data:{getVersion:2}},e),Ymt=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Get,path:jt.encode("1/indexes/%s/synonyms/%s",t.indexName,e)},r),cye=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Get,path:jt.encode("1/indexes/%s/task/%s",t.indexName,e.toString())},r),Wmt=t=>(e,r)=>jt.createWaitablePromise(uye(t)([e],r).then(o=>({objectID:o.objectIDs[0],taskID:o.taskIDs[0]})),(o,a)=>Zi(t)(o.taskID,a)),uye=t=>(e,r)=>{let{createIfNotExists:o,...a}=r||{},n=o?im.PartialUpdateObject:im.PartialUpdateObjectNoCreate;return Dk(t)(e,n,a)},Kmt=t=>(e,r)=>{let{safe:o,autoGenerateObjectIDIfNotExist:a,batchSize:n,...u}=r||{},A=(C,R,N,U)=>jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/operation",C),data:{operation:N,destination:R}},U),(V,te)=>Zi(t)(V.taskID,te)),p=Math.random().toString(36).substring(7),h=`${t.indexName}_tmp_${p}`,E=GH({appId:t.appId,transporter:t.transporter,indexName:h}),I=[],v=A(t.indexName,h,"copy",{...u,scope:["settings","synonyms","rules"]});I.push(v);let x=(o?v.wait(u):v).then(()=>{let C=E(e,{...u,autoGenerateObjectIDIfNotExist:a,batchSize:n});return I.push(C),o?C.wait(u):C}).then(()=>{let C=A(h,t.indexName,"move",u);return I.push(C),o?C.wait(u):C}).then(()=>Promise.all(I)).then(([C,R,N])=>({objectIDs:R.objectIDs,taskIDs:[C.taskID,...R.taskIDs,N.taskID]}));return jt.createWaitablePromise(x,(C,R)=>Promise.all(I.map(N=>N.wait(R))))},zmt=t=>(e,r)=>jH(t)(e,{...r,clearExistingRules:!0}),Vmt=t=>(e,r)=>YH(t)(e,{...r,clearExistingSynonyms:!0}),Jmt=t=>(e,r)=>jt.createWaitablePromise(GH(t)([e],r).then(o=>({objectID:o.objectIDs[0],taskID:o.taskIDs[0]})),(o,a)=>Zi(t)(o.taskID,a)),GH=t=>(e,r)=>{let{autoGenerateObjectIDIfNotExist:o,...a}=r||{},n=o?im.AddObject:im.UpdateObject;if(n===im.UpdateObject){for(let u of e)if(u.objectID===void 0)return jt.createWaitablePromise(Promise.reject(rye()))}return Dk(t)(e,n,a)},Xmt=t=>(e,r)=>jH(t)([e],r),jH=t=>(e,r)=>{let{forwardToReplicas:o,clearExistingRules:a,...n}=r||{},u=La.createMappedRequestOptions(n);return o&&(u.queryParameters.forwardToReplicas=1),a&&(u.queryParameters.clearExistingRules=1),jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/rules/batch",t.indexName),data:e},u),(A,p)=>Zi(t)(A.taskID,p))},Zmt=t=>(e,r)=>YH(t)([e],r),YH=t=>(e,r)=>{let{forwardToReplicas:o,clearExistingSynonyms:a,replaceExistingSynonyms:n,...u}=r||{},A=La.createMappedRequestOptions(u);return o&&(A.queryParameters.forwardToReplicas=1),(n||a)&&(A.queryParameters.replaceExistingSynonyms=1),jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/synonyms/batch",t.indexName),data:e},A),(p,h)=>Zi(t)(p.taskID,h))},Aye=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/query",t.indexName),data:{query:e},cacheable:!0},r),fye=t=>(e,r,o)=>t.transporter.read({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/facets/%s/query",t.indexName,e),data:{facetQuery:r},cacheable:!0},o),pye=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/rules/search",t.indexName),data:{query:e}},r),hye=t=>(e,r)=>t.transporter.read({method:Ir.MethodEnum.Post,path:jt.encode("1/indexes/%s/synonyms/search",t.indexName),data:{query:e}},r),$mt=t=>(e,r)=>{let{forwardToReplicas:o,...a}=r||{},n=La.createMappedRequestOptions(a);return o&&(n.queryParameters.forwardToReplicas=1),jt.createWaitablePromise(t.transporter.write({method:Ir.MethodEnum.Put,path:jt.encode("1/indexes/%s/settings",t.indexName),data:e},n),(u,A)=>Zi(t)(u.taskID,A))},Zi=t=>(e,r)=>jt.createRetryablePromise(o=>cye(t)(e,r).then(a=>a.status!=="published"?o():void 0)),eyt={AddObject:"addObject",Analytics:"analytics",Browser:"browse",DeleteIndex:"deleteIndex",DeleteObject:"deleteObject",EditSettings:"editSettings",Inference:"inference",ListIndexes:"listIndexes",Logs:"logs",Personalization:"personalization",Recommendation:"recommendation",Search:"search",SeeUnretrievableAttributes:"seeUnretrievableAttributes",Settings:"settings",Usage:"usage"},im={AddObject:"addObject",UpdateObject:"updateObject",PartialUpdateObject:"partialUpdateObject",PartialUpdateObjectNoCreate:"partialUpdateObjectNoCreate",DeleteObject:"deleteObject",DeleteIndex:"delete",ClearIndex:"clear"},Pk={Settings:"settings",Synonyms:"synonyms",Rules:"rules"},tyt={None:"none",StopIfEnoughMatches:"stopIfEnoughMatches"},ryt={Synonym:"synonym",OneWaySynonym:"oneWaySynonym",AltCorrection1:"altCorrection1",AltCorrection2:"altCorrection2",Placeholder:"placeholder"};Ft.ApiKeyACLEnum=eyt;Ft.BatchActionEnum=im;Ft.ScopeEnum=Pk;Ft.StrategyEnum=tyt;Ft.SynonymEnum=ryt;Ft.addApiKey=Kdt;Ft.assignUserID=zdt;Ft.assignUserIDs=Vdt;Ft.batch=oye;Ft.browseObjects=Smt;Ft.browseRules=bmt;Ft.browseSynonyms=xmt;Ft.chunkedBatch=Dk;Ft.clearDictionaryEntries=Jdt;Ft.clearObjects=kmt;Ft.clearRules=Qmt;Ft.clearSynonyms=Fmt;Ft.copyIndex=vk;Ft.copyRules=Xdt;Ft.copySettings=Zdt;Ft.copySynonyms=$dt;Ft.createBrowsablePromise=Bk;Ft.createMissingObjectIDError=rye;Ft.createObjectNotFoundError=nye;Ft.createSearchClient=Wdt;Ft.createValidUntilNotFoundError=iye;Ft.customRequest=emt;Ft.deleteApiKey=tmt;Ft.deleteBy=Rmt;Ft.deleteDictionaryEntries=rmt;Ft.deleteIndex=Tmt;Ft.deleteObject=Lmt;Ft.deleteObjects=aye;Ft.deleteRule=Nmt;Ft.deleteSynonym=Omt;Ft.exists=Mmt;Ft.findAnswers=Umt;Ft.findObject=_mt;Ft.generateSecuredApiKey=nmt;Ft.getApiKey=X2;Ft.getAppTask=sye;Ft.getDictionarySettings=imt;Ft.getLogs=smt;Ft.getObject=Hmt;Ft.getObjectPosition=qmt;Ft.getObjects=Gmt;Ft.getRule=jmt;Ft.getSecuredApiKeyRemainingValidity=omt;Ft.getSettings=lye;Ft.getSynonym=Ymt;Ft.getTask=cye;Ft.getTopUserIDs=amt;Ft.getUserID=lmt;Ft.hasPendingMappings=cmt;Ft.initIndex=Z2;Ft.listApiKeys=umt;Ft.listClusters=Amt;Ft.listIndices=fmt;Ft.listUserIDs=pmt;Ft.moveIndex=hmt;Ft.multipleBatch=gmt;Ft.multipleGetObjects=dmt;Ft.multipleQueries=mmt;Ft.multipleSearchForFacetValues=ymt;Ft.partialUpdateObject=Wmt;Ft.partialUpdateObjects=uye;Ft.removeUserID=Emt;Ft.replaceAllObjects=Kmt;Ft.replaceAllRules=zmt;Ft.replaceAllSynonyms=Vmt;Ft.replaceDictionaryEntries=Cmt;Ft.restoreApiKey=wmt;Ft.saveDictionaryEntries=Imt;Ft.saveObject=Jmt;Ft.saveObjects=GH;Ft.saveRule=Xmt;Ft.saveRules=jH;Ft.saveSynonym=Zmt;Ft.saveSynonyms=YH;Ft.search=Aye;Ft.searchDictionaryEntries=Bmt;Ft.searchForFacetValues=fye;Ft.searchRules=pye;Ft.searchSynonyms=hye;Ft.searchUserIDs=vmt;Ft.setDictionarySettings=Dmt;Ft.setSettings=$mt;Ft.updateApiKey=Pmt;Ft.waitAppTask=QC;Ft.waitTask=Zi});var mye=_((WWt,dye)=>{dye.exports=gye()});var yye=_(Sk=>{"use strict";Object.defineProperty(Sk,"__esModule",{value:!0});function nyt(){return{debug(t,e){return Promise.resolve()},info(t,e){return Promise.resolve()},error(t,e){return Promise.resolve()}}}var iyt={Debug:1,Info:2,Error:3};Sk.LogLevelEnum=iyt;Sk.createNullLogger=nyt});var Cye=_((zWt,Eye)=>{Eye.exports=yye()});var vye=_(WH=>{"use strict";Object.defineProperty(WH,"__esModule",{value:!0});var wye=ve("http"),Iye=ve("https"),syt=ve("url"),Bye={keepAlive:!0},oyt=new wye.Agent(Bye),ayt=new Iye.Agent(Bye);function lyt({agent:t,httpAgent:e,httpsAgent:r,requesterOptions:o={}}={}){let a=e||t||oyt,n=r||t||ayt;return{send(u){return new Promise(A=>{let p=syt.parse(u.url),h=p.query===null?p.pathname:`${p.pathname}?${p.query}`,E={...o,agent:p.protocol==="https:"?n:a,hostname:p.hostname,path:h,method:u.method,headers:{...o&&o.headers?o.headers:{},...u.headers},...p.port!==void 0?{port:p.port||""}:{}},I=(p.protocol==="https:"?Iye:wye).request(E,R=>{let N=[];R.on("data",U=>{N=N.concat(U)}),R.on("end",()=>{clearTimeout(x),clearTimeout(C),A({status:R.statusCode||0,content:Buffer.concat(N).toString(),isTimedOut:!1})})}),v=(R,N)=>setTimeout(()=>{I.abort(),A({status:0,content:N,isTimedOut:!0})},R*1e3),x=v(u.connectTimeout,"Connection timeout"),C;I.on("error",R=>{clearTimeout(x),clearTimeout(C),A({status:0,content:R.message,isTimedOut:!1})}),I.once("response",()=>{clearTimeout(x),C=v(u.responseTimeout,"Socket timeout")}),u.data!==void 0&&I.write(u.data),I.end()})},destroy(){return a.destroy(),n.destroy(),Promise.resolve()}}}WH.createNodeHttpRequester=lyt});var Pye=_((JWt,Dye)=>{Dye.exports=vye()});var kye=_((XWt,xye)=>{"use strict";var Sye=vme(),cyt=Sme(),FC=Xme(),zH=Y2(),KH=tye(),_t=mye(),uyt=Cye(),Ayt=Pye(),fyt=z2();function bye(t,e,r){let o={appId:t,apiKey:e,timeouts:{connect:2,read:5,write:30},requester:Ayt.createNodeHttpRequester(),logger:uyt.createNullLogger(),responsesCache:Sye.createNullCache(),requestsCache:Sye.createNullCache(),hostsCache:cyt.createInMemoryCache(),userAgent:fyt.createUserAgent(zH.version).add({segment:"Node.js",version:process.versions.node})},a={...o,...r},n=()=>u=>KH.createPersonalizationClient({...o,...u,methods:{getPersonalizationStrategy:KH.getPersonalizationStrategy,setPersonalizationStrategy:KH.setPersonalizationStrategy}});return _t.createSearchClient({...a,methods:{search:_t.multipleQueries,searchForFacetValues:_t.multipleSearchForFacetValues,multipleBatch:_t.multipleBatch,multipleGetObjects:_t.multipleGetObjects,multipleQueries:_t.multipleQueries,copyIndex:_t.copyIndex,copySettings:_t.copySettings,copyRules:_t.copyRules,copySynonyms:_t.copySynonyms,moveIndex:_t.moveIndex,listIndices:_t.listIndices,getLogs:_t.getLogs,listClusters:_t.listClusters,multipleSearchForFacetValues:_t.multipleSearchForFacetValues,getApiKey:_t.getApiKey,addApiKey:_t.addApiKey,listApiKeys:_t.listApiKeys,updateApiKey:_t.updateApiKey,deleteApiKey:_t.deleteApiKey,restoreApiKey:_t.restoreApiKey,assignUserID:_t.assignUserID,assignUserIDs:_t.assignUserIDs,getUserID:_t.getUserID,searchUserIDs:_t.searchUserIDs,listUserIDs:_t.listUserIDs,getTopUserIDs:_t.getTopUserIDs,removeUserID:_t.removeUserID,hasPendingMappings:_t.hasPendingMappings,generateSecuredApiKey:_t.generateSecuredApiKey,getSecuredApiKeyRemainingValidity:_t.getSecuredApiKeyRemainingValidity,destroy:zH.destroy,clearDictionaryEntries:_t.clearDictionaryEntries,deleteDictionaryEntries:_t.deleteDictionaryEntries,getDictionarySettings:_t.getDictionarySettings,getAppTask:_t.getAppTask,replaceDictionaryEntries:_t.replaceDictionaryEntries,saveDictionaryEntries:_t.saveDictionaryEntries,searchDictionaryEntries:_t.searchDictionaryEntries,setDictionarySettings:_t.setDictionarySettings,waitAppTask:_t.waitAppTask,customRequest:_t.customRequest,initIndex:u=>A=>_t.initIndex(u)(A,{methods:{batch:_t.batch,delete:_t.deleteIndex,findAnswers:_t.findAnswers,getObject:_t.getObject,getObjects:_t.getObjects,saveObject:_t.saveObject,saveObjects:_t.saveObjects,search:_t.search,searchForFacetValues:_t.searchForFacetValues,waitTask:_t.waitTask,setSettings:_t.setSettings,getSettings:_t.getSettings,partialUpdateObject:_t.partialUpdateObject,partialUpdateObjects:_t.partialUpdateObjects,deleteObject:_t.deleteObject,deleteObjects:_t.deleteObjects,deleteBy:_t.deleteBy,clearObjects:_t.clearObjects,browseObjects:_t.browseObjects,getObjectPosition:_t.getObjectPosition,findObject:_t.findObject,exists:_t.exists,saveSynonym:_t.saveSynonym,saveSynonyms:_t.saveSynonyms,getSynonym:_t.getSynonym,searchSynonyms:_t.searchSynonyms,browseSynonyms:_t.browseSynonyms,deleteSynonym:_t.deleteSynonym,clearSynonyms:_t.clearSynonyms,replaceAllObjects:_t.replaceAllObjects,replaceAllSynonyms:_t.replaceAllSynonyms,searchRules:_t.searchRules,getRule:_t.getRule,deleteRule:_t.deleteRule,saveRule:_t.saveRule,saveRules:_t.saveRules,replaceAllRules:_t.replaceAllRules,browseRules:_t.browseRules,clearRules:_t.clearRules}}),initAnalytics:()=>u=>FC.createAnalyticsClient({...o,...u,methods:{addABTest:FC.addABTest,getABTest:FC.getABTest,getABTests:FC.getABTests,stopABTest:FC.stopABTest,deleteABTest:FC.deleteABTest}}),initPersonalization:n,initRecommendation:()=>u=>(a.logger.info("The `initRecommendation` method is deprecated. Use `initPersonalization` instead."),n()(u))}})}bye.version=zH.version;xye.exports=bye});var JH=_((ZWt,VH)=>{var Qye=kye();VH.exports=Qye;VH.exports.default=Qye});var $H=_((eKt,Tye)=>{"use strict";var Rye=Object.getOwnPropertySymbols,hyt=Object.prototype.hasOwnProperty,gyt=Object.prototype.propertyIsEnumerable;function dyt(t){if(t==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}function myt(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de",Object.getOwnPropertyNames(t)[0]==="5")return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;var o=Object.getOwnPropertyNames(e).map(function(n){return e[n]});if(o.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(n){a[n]=n}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}Tye.exports=myt()?Object.assign:function(t,e){for(var r,o=dyt(t),a,n=1;n{"use strict";var i6=$H(),eu=typeof Symbol=="function"&&Symbol.for,$2=eu?Symbol.for("react.element"):60103,yyt=eu?Symbol.for("react.portal"):60106,Eyt=eu?Symbol.for("react.fragment"):60107,Cyt=eu?Symbol.for("react.strict_mode"):60108,wyt=eu?Symbol.for("react.profiler"):60114,Iyt=eu?Symbol.for("react.provider"):60109,Byt=eu?Symbol.for("react.context"):60110,vyt=eu?Symbol.for("react.forward_ref"):60112,Dyt=eu?Symbol.for("react.suspense"):60113,Pyt=eu?Symbol.for("react.memo"):60115,Syt=eu?Symbol.for("react.lazy"):60116,Lye=typeof Symbol=="function"&&Symbol.iterator;function eB(t){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+t,r=1;rbk.length&&bk.push(t)}function t6(t,e,r,o){var a=typeof t;(a==="undefined"||a==="boolean")&&(t=null);var n=!1;if(t===null)n=!0;else switch(a){case"string":case"number":n=!0;break;case"object":switch(t.$$typeof){case $2:case yyt:n=!0}}if(n)return r(o,t,e===""?"."+e6(t,0):e),1;if(n=0,e=e===""?".":e+":",Array.isArray(t))for(var u=0;u{"use strict";Kye.exports=Wye()});var u6=_((nKt,c6)=>{"use strict";var An=c6.exports;c6.exports.default=An;var Nn="\x1B[",tB="\x1B]",TC="\x07",xk=";",zye=process.env.TERM_PROGRAM==="Apple_Terminal";An.cursorTo=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");return typeof e!="number"?Nn+(t+1)+"G":Nn+(e+1)+";"+(t+1)+"H"};An.cursorMove=(t,e)=>{if(typeof t!="number")throw new TypeError("The `x` argument is required");let r="";return t<0?r+=Nn+-t+"D":t>0&&(r+=Nn+t+"C"),e<0?r+=Nn+-e+"A":e>0&&(r+=Nn+e+"B"),r};An.cursorUp=(t=1)=>Nn+t+"A";An.cursorDown=(t=1)=>Nn+t+"B";An.cursorForward=(t=1)=>Nn+t+"C";An.cursorBackward=(t=1)=>Nn+t+"D";An.cursorLeft=Nn+"G";An.cursorSavePosition=zye?"\x1B7":Nn+"s";An.cursorRestorePosition=zye?"\x1B8":Nn+"u";An.cursorGetPosition=Nn+"6n";An.cursorNextLine=Nn+"E";An.cursorPrevLine=Nn+"F";An.cursorHide=Nn+"?25l";An.cursorShow=Nn+"?25h";An.eraseLines=t=>{let e="";for(let r=0;r[tB,"8",xk,xk,e,TC,t,tB,"8",xk,xk,TC].join("");An.image=(t,e={})=>{let r=`${tB}1337;File=inline=1`;return e.width&&(r+=`;width=${e.width}`),e.height&&(r+=`;height=${e.height}`),e.preserveAspectRatio===!1&&(r+=";preserveAspectRatio=0"),r+":"+t.toString("base64")+TC};An.iTerm={setCwd:(t=process.cwd())=>`${tB}50;CurrentDir=${t}${TC}`,annotation:(t,e={})=>{let r=`${tB}1337;`,o=typeof e.x<"u",a=typeof e.y<"u";if((o||a)&&!(o&&a&&typeof e.length<"u"))throw new Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return t=t.replace(/\|/g,""),r+=e.isHidden?"AddHiddenAnnotation=":"AddAnnotation=",e.length>0?r+=(o?[t,e.length,e.x,e.y]:[e.length,t]).join("|"):r+=t,r+TC}}});var Jye=_((iKt,A6)=>{"use strict";var Vye=(t,e)=>{for(let r of Reflect.ownKeys(e))Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r));return t};A6.exports=Vye;A6.exports.default=Vye});var Zye=_((sKt,Qk)=>{"use strict";var Ryt=Jye(),kk=new WeakMap,Xye=(t,e={})=>{if(typeof t!="function")throw new TypeError("Expected a function");let r,o=0,a=t.displayName||t.name||"",n=function(...u){if(kk.set(n,++o),o===1)r=t.apply(this,u),t=null;else if(e.throw===!0)throw new Error(`Function \`${a}\` can only be called once`);return r};return Ryt(n,t),kk.set(n,o),n};Qk.exports=Xye;Qk.exports.default=Xye;Qk.exports.callCount=t=>{if(!kk.has(t))throw new Error(`The given function \`${t.name}\` is not wrapped by the \`onetime\` package`);return kk.get(t)}});var $ye=_((oKt,Fk)=>{Fk.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"];process.platform!=="win32"&&Fk.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");process.platform==="linux"&&Fk.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")});var h6=_((aKt,OC)=>{var Ei=global.process,sm=function(t){return t&&typeof t=="object"&&typeof t.removeListener=="function"&&typeof t.emit=="function"&&typeof t.reallyExit=="function"&&typeof t.listeners=="function"&&typeof t.kill=="function"&&typeof t.pid=="number"&&typeof t.on=="function"};sm(Ei)?(eEe=ve("assert"),LC=$ye(),tEe=/^win/i.test(Ei.platform),rB=ve("events"),typeof rB!="function"&&(rB=rB.EventEmitter),Ei.__signal_exit_emitter__?Ts=Ei.__signal_exit_emitter__:(Ts=Ei.__signal_exit_emitter__=new rB,Ts.count=0,Ts.emitted={}),Ts.infinite||(Ts.setMaxListeners(1/0),Ts.infinite=!0),OC.exports=function(t,e){if(!sm(global.process))return function(){};eEe.equal(typeof t,"function","a callback must be provided for exit handler"),NC===!1&&f6();var r="exit";e&&e.alwaysLast&&(r="afterexit");var o=function(){Ts.removeListener(r,t),Ts.listeners("exit").length===0&&Ts.listeners("afterexit").length===0&&Rk()};return Ts.on(r,t),o},Rk=function(){!NC||!sm(global.process)||(NC=!1,LC.forEach(function(e){try{Ei.removeListener(e,Tk[e])}catch{}}),Ei.emit=Lk,Ei.reallyExit=p6,Ts.count-=1)},OC.exports.unload=Rk,om=function(e,r,o){Ts.emitted[e]||(Ts.emitted[e]=!0,Ts.emit(e,r,o))},Tk={},LC.forEach(function(t){Tk[t]=function(){if(!!sm(global.process)){var r=Ei.listeners(t);r.length===Ts.count&&(Rk(),om("exit",null,t),om("afterexit",null,t),tEe&&t==="SIGHUP"&&(t="SIGINT"),Ei.kill(Ei.pid,t))}}}),OC.exports.signals=function(){return LC},NC=!1,f6=function(){NC||!sm(global.process)||(NC=!0,Ts.count+=1,LC=LC.filter(function(e){try{return Ei.on(e,Tk[e]),!0}catch{return!1}}),Ei.emit=nEe,Ei.reallyExit=rEe)},OC.exports.load=f6,p6=Ei.reallyExit,rEe=function(e){!sm(global.process)||(Ei.exitCode=e||0,om("exit",Ei.exitCode,null),om("afterexit",Ei.exitCode,null),p6.call(Ei,Ei.exitCode))},Lk=Ei.emit,nEe=function(e,r){if(e==="exit"&&sm(global.process)){r!==void 0&&(Ei.exitCode=r);var o=Lk.apply(this,arguments);return om("exit",Ei.exitCode,null),om("afterexit",Ei.exitCode,null),o}else return Lk.apply(this,arguments)}):OC.exports=function(){return function(){}};var eEe,LC,tEe,rB,Ts,Rk,om,Tk,NC,f6,p6,rEe,Lk,nEe});var sEe=_((lKt,iEe)=>{"use strict";var Tyt=Zye(),Lyt=h6();iEe.exports=Tyt(()=>{Lyt(()=>{process.stderr.write("\x1B[?25h")},{alwaysLast:!0})})});var g6=_(MC=>{"use strict";var Nyt=sEe(),Nk=!1;MC.show=(t=process.stderr)=>{!t.isTTY||(Nk=!1,t.write("\x1B[?25h"))};MC.hide=(t=process.stderr)=>{!t.isTTY||(Nyt(),Nk=!0,t.write("\x1B[?25l"))};MC.toggle=(t,e)=>{t!==void 0&&(Nk=t),Nk?MC.show(e):MC.hide(e)}});var cEe=_(nB=>{"use strict";var lEe=nB&&nB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(nB,"__esModule",{value:!0});var oEe=lEe(u6()),aEe=lEe(g6()),Oyt=(t,{showCursor:e=!1}={})=>{let r=0,o="",a=!1,n=u=>{!e&&!a&&(aEe.default.hide(),a=!0);let A=u+` `;A!==o&&(o=A,t.write(oEe.default.eraseLines(r)+A),r=A.split(` `).length)};return n.clear=()=>{t.write(oEe.default.eraseLines(r)),o="",r=0},n.done=()=>{o="",r=0,e||(aEe.default.show(),a=!1)},n};nB.default={create:Oyt}});var uEe=_((AKt,Myt)=>{Myt.exports=[{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"SYSTEM_TEAMFOUNDATIONCOLLECTIONURI",pr:"SYSTEM_PULLREQUEST_PULLREQUESTID"},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY_BUILD_BASE",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Shippable",constant:"SHIPPABLE",env:"SHIPPABLE",pr:{IS_PULL_REQUEST:"true"}},{name:"Solano CI",constant:"SOLANO",env:"TDDIUM",pr:"TDDIUM_PR_ID"},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}}]});var pEe=_(dl=>{"use strict";var fEe=uEe(),hA=process.env;Object.defineProperty(dl,"_vendors",{value:fEe.map(function(t){return t.constant})});dl.name=null;dl.isPR=null;fEe.forEach(function(t){var e=Array.isArray(t.env)?t.env:[t.env],r=e.every(function(o){return AEe(o)});if(dl[t.constant]=r,r)switch(dl.name=t.name,typeof t.pr){case"string":dl.isPR=!!hA[t.pr];break;case"object":"env"in t.pr?dl.isPR=t.pr.env in hA&&hA[t.pr.env]!==t.pr.ne:"any"in t.pr?dl.isPR=t.pr.any.some(function(o){return!!hA[o]}):dl.isPR=AEe(t.pr);break;default:dl.isPR=null}});dl.isCI=!!(hA.CI||hA.CONTINUOUS_INTEGRATION||hA.BUILD_NUMBER||hA.RUN_ID||dl.name);function AEe(t){return typeof t=="string"?!!hA[t]:Object.keys(t).every(function(e){return hA[e]===t[e]})}});var gEe=_((pKt,hEe)=>{"use strict";hEe.exports=pEe().isCI});var mEe=_((hKt,dEe)=>{"use strict";var Uyt=t=>{let e=new Set;do for(let r of Reflect.ownKeys(t))e.add([t,r]);while((t=Reflect.getPrototypeOf(t))&&t!==Object.prototype);return e};dEe.exports=(t,{include:e,exclude:r}={})=>{let o=a=>{let n=u=>typeof u=="string"?a===u:u.test(a);return e?e.some(n):r?!r.some(n):!0};for(let[a,n]of Uyt(t.constructor.prototype)){if(n==="constructor"||!o(n))continue;let u=Reflect.getOwnPropertyDescriptor(a,n);u&&typeof u.value=="function"&&(t[n]=t[n].bind(t))}return t}});var vEe=_(kn=>{"use strict";Object.defineProperty(kn,"__esModule",{value:!0});var _C,oB,Hk,qk,I6;typeof window>"u"||typeof MessageChannel!="function"?(UC=null,d6=null,m6=function(){if(UC!==null)try{var t=kn.unstable_now();UC(!0,t),UC=null}catch(e){throw setTimeout(m6,0),e}},yEe=Date.now(),kn.unstable_now=function(){return Date.now()-yEe},_C=function(t){UC!==null?setTimeout(_C,0,t):(UC=t,setTimeout(m6,0))},oB=function(t,e){d6=setTimeout(t,e)},Hk=function(){clearTimeout(d6)},qk=function(){return!1},I6=kn.unstable_forceFrameRate=function(){}):(Ok=window.performance,y6=window.Date,EEe=window.setTimeout,CEe=window.clearTimeout,typeof console<"u"&&(wEe=window.cancelAnimationFrame,typeof window.requestAnimationFrame!="function"&&console.error("This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills"),typeof wEe!="function"&&console.error("This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills")),typeof Ok=="object"&&typeof Ok.now=="function"?kn.unstable_now=function(){return Ok.now()}:(IEe=y6.now(),kn.unstable_now=function(){return y6.now()-IEe}),iB=!1,sB=null,Mk=-1,E6=5,C6=0,qk=function(){return kn.unstable_now()>=C6},I6=function(){},kn.unstable_forceFrameRate=function(t){0>t||125_k(u,r))p!==void 0&&0>_k(p,u)?(t[o]=p,t[A]=r,o=A):(t[o]=u,t[n]=r,o=n);else if(p!==void 0&&0>_k(p,r))t[o]=p,t[A]=r,o=A;else break e}}return e}return null}function _k(t,e){var r=t.sortIndex-e.sortIndex;return r!==0?r:t.id-e.id}var tu=[],E0=[],_yt=1,na=null,No=3,jk=!1,am=!1,aB=!1;function Yk(t){for(var e=ic(E0);e!==null;){if(e.callback===null)Gk(E0);else if(e.startTime<=t)Gk(E0),e.sortIndex=e.expirationTime,B6(tu,e);else break;e=ic(E0)}}function v6(t){if(aB=!1,Yk(t),!am)if(ic(tu)!==null)am=!0,_C(D6);else{var e=ic(E0);e!==null&&oB(v6,e.startTime-t)}}function D6(t,e){am=!1,aB&&(aB=!1,Hk()),jk=!0;var r=No;try{for(Yk(e),na=ic(tu);na!==null&&(!(na.expirationTime>e)||t&&!qk());){var o=na.callback;if(o!==null){na.callback=null,No=na.priorityLevel;var a=o(na.expirationTime<=e);e=kn.unstable_now(),typeof a=="function"?na.callback=a:na===ic(tu)&&Gk(tu),Yk(e)}else Gk(tu);na=ic(tu)}if(na!==null)var n=!0;else{var u=ic(E0);u!==null&&oB(v6,u.startTime-e),n=!1}return n}finally{na=null,No=r,jk=!1}}function BEe(t){switch(t){case 1:return-1;case 2:return 250;case 5:return 1073741823;case 4:return 1e4;default:return 5e3}}var Hyt=I6;kn.unstable_ImmediatePriority=1;kn.unstable_UserBlockingPriority=2;kn.unstable_NormalPriority=3;kn.unstable_IdlePriority=5;kn.unstable_LowPriority=4;kn.unstable_runWithPriority=function(t,e){switch(t){case 1:case 2:case 3:case 4:case 5:break;default:t=3}var r=No;No=t;try{return e()}finally{No=r}};kn.unstable_next=function(t){switch(No){case 1:case 2:case 3:var e=3;break;default:e=No}var r=No;No=e;try{return t()}finally{No=r}};kn.unstable_scheduleCallback=function(t,e,r){var o=kn.unstable_now();if(typeof r=="object"&&r!==null){var a=r.delay;a=typeof a=="number"&&0o?(t.sortIndex=a,B6(E0,t),ic(tu)===null&&t===ic(E0)&&(aB?Hk():aB=!0,oB(v6,a-o))):(t.sortIndex=r,B6(tu,t),am||jk||(am=!0,_C(D6))),t};kn.unstable_cancelCallback=function(t){t.callback=null};kn.unstable_wrapCallback=function(t){var e=No;return function(){var r=No;No=e;try{return t.apply(this,arguments)}finally{No=r}}};kn.unstable_getCurrentPriorityLevel=function(){return No};kn.unstable_shouldYield=function(){var t=kn.unstable_now();Yk(t);var e=ic(tu);return e!==na&&na!==null&&e!==null&&e.callback!==null&&e.startTime<=t&&e.expirationTime{"use strict";DEe.exports=vEe()});var PEe=_((mKt,lB)=>{lB.exports=function t(e){"use strict";var r=$H(),o=on(),a=P6();function n(P){for(var D="https://reactjs.org/docs/error-decoder.html?invariant="+P,T=1;Tao||(P.current=El[ao],El[ao]=null,ao--)}function On(P,D){ao++,El[ao]=P.current,P.current=D}var Li={},Mn={current:Li},_i={current:!1},rr=Li;function Oe(P,D){var T=P.type.contextTypes;if(!T)return Li;var q=P.stateNode;if(q&&q.__reactInternalMemoizedUnmaskedChildContext===D)return q.__reactInternalMemoizedMaskedChildContext;var Y={},Ae;for(Ae in T)Y[Ae]=D[Ae];return q&&(P=P.stateNode,P.__reactInternalMemoizedUnmaskedChildContext=D,P.__reactInternalMemoizedMaskedChildContext=Y),Y}function ii(P){return P=P.childContextTypes,P!=null}function Ua(P){zn(_i,P),zn(Mn,P)}function hr(P){zn(_i,P),zn(Mn,P)}function Ac(P,D,T){if(Mn.current!==Li)throw Error(n(168));On(Mn,D,P),On(_i,T,P)}function Au(P,D,T){var q=P.stateNode;if(P=D.childContextTypes,typeof q.getChildContext!="function")return T;q=q.getChildContext();for(var Y in q)if(!(Y in P))throw Error(n(108,he(D)||"Unknown",Y));return r({},T,{},q)}function fc(P){var D=P.stateNode;return D=D&&D.__reactInternalMemoizedMergedChildContext||Li,rr=Mn.current,On(Mn,D,P),On(_i,_i.current,P),!0}function Cl(P,D,T){var q=P.stateNode;if(!q)throw Error(n(169));T?(D=Au(P,D,rr),q.__reactInternalMemoizedMergedChildContext=D,zn(_i,P),zn(Mn,P),On(Mn,D,P)):zn(_i,P),On(_i,T,P)}var DA=a.unstable_runWithPriority,fu=a.unstable_scheduleCallback,Ce=a.unstable_cancelCallback,Rt=a.unstable_shouldYield,pc=a.unstable_requestPaint,Hi=a.unstable_now,pu=a.unstable_getCurrentPriorityLevel,Yt=a.unstable_ImmediatePriority,wl=a.unstable_UserBlockingPriority,PA=a.unstable_NormalPriority,Ap=a.unstable_LowPriority,hc=a.unstable_IdlePriority,SA={},Qn=pc!==void 0?pc:function(){},hi=null,gc=null,bA=!1,sa=Hi(),Ni=1e4>sa?Hi:function(){return Hi()-sa};function _o(){switch(pu()){case Yt:return 99;case wl:return 98;case PA:return 97;case Ap:return 96;case hc:return 95;default:throw Error(n(332))}}function Ze(P){switch(P){case 99:return Yt;case 98:return wl;case 97:return PA;case 96:return Ap;case 95:return hc;default:throw Error(n(332))}}function lo(P,D){return P=Ze(P),DA(P,D)}function dc(P,D,T){return P=Ze(P),fu(P,D,T)}function hu(P){return hi===null?(hi=[P],gc=fu(Yt,gu)):hi.push(P),SA}function qi(){if(gc!==null){var P=gc;gc=null,Ce(P)}gu()}function gu(){if(!bA&&hi!==null){bA=!0;var P=0;try{var D=hi;lo(99,function(){for(;P=D&&(Go=!0),P.firstContext=null)}function ms(P,D){if(aa!==P&&D!==!1&&D!==0)if((typeof D!="number"||D===1073741823)&&(aa=P,D=1073741823),D={context:P,observedBits:D,next:null},Us===null){if(co===null)throw Error(n(308));Us=D,co.dependencies={expirationTime:0,firstContext:D,responders:null}}else Us=Us.next=D;return b?P._currentValue:P._currentValue2}var _s=!1;function Un(P){return{baseState:P,firstUpdate:null,lastUpdate:null,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function Pn(P){return{baseState:P.baseState,firstUpdate:P.firstUpdate,lastUpdate:P.lastUpdate,firstCapturedUpdate:null,lastCapturedUpdate:null,firstEffect:null,lastEffect:null,firstCapturedEffect:null,lastCapturedEffect:null}}function ys(P,D){return{expirationTime:P,suspenseConfig:D,tag:0,payload:null,callback:null,next:null,nextEffect:null}}function We(P,D){P.lastUpdate===null?P.firstUpdate=P.lastUpdate=D:(P.lastUpdate.next=D,P.lastUpdate=D)}function tt(P,D){var T=P.alternate;if(T===null){var q=P.updateQueue,Y=null;q===null&&(q=P.updateQueue=Un(P.memoizedState))}else q=P.updateQueue,Y=T.updateQueue,q===null?Y===null?(q=P.updateQueue=Un(P.memoizedState),Y=T.updateQueue=Un(T.memoizedState)):q=P.updateQueue=Pn(Y):Y===null&&(Y=T.updateQueue=Pn(q));Y===null||q===Y?We(q,D):q.lastUpdate===null||Y.lastUpdate===null?(We(q,D),We(Y,D)):(We(q,D),Y.lastUpdate=D)}function It(P,D){var T=P.updateQueue;T=T===null?P.updateQueue=Un(P.memoizedState):ir(P,T),T.lastCapturedUpdate===null?T.firstCapturedUpdate=T.lastCapturedUpdate=D:(T.lastCapturedUpdate.next=D,T.lastCapturedUpdate=D)}function ir(P,D){var T=P.alternate;return T!==null&&D===T.updateQueue&&(D=P.updateQueue=Pn(D)),D}function $(P,D,T,q,Y,Ae){switch(T.tag){case 1:return P=T.payload,typeof P=="function"?P.call(Ae,q,Y):P;case 3:P.effectTag=P.effectTag&-4097|64;case 0:if(P=T.payload,Y=typeof P=="function"?P.call(Ae,q,Y):P,Y==null)break;return r({},q,Y);case 2:_s=!0}return q}function ye(P,D,T,q,Y){_s=!1,D=ir(P,D);for(var Ae=D.baseState,De=null,vt=0,wt=D.firstUpdate,xt=Ae;wt!==null;){var _r=wt.expirationTime;_rbn?(ai=Fr,Fr=null):ai=Fr.sibling;var tn=di(rt,Fr,ft[bn],Wt);if(tn===null){Fr===null&&(Fr=ai);break}P&&Fr&&tn.alternate===null&&D(rt,Fr),ze=Ae(tn,ze,bn),Sn===null?vr=tn:Sn.sibling=tn,Sn=tn,Fr=ai}if(bn===ft.length)return T(rt,Fr),vr;if(Fr===null){for(;bnbn?(ai=Fr,Fr=null):ai=Fr.sibling;var ho=di(rt,Fr,tn.value,Wt);if(ho===null){Fr===null&&(Fr=ai);break}P&&Fr&&ho.alternate===null&&D(rt,Fr),ze=Ae(ho,ze,bn),Sn===null?vr=ho:Sn.sibling=ho,Sn=ho,Fr=ai}if(tn.done)return T(rt,Fr),vr;if(Fr===null){for(;!tn.done;bn++,tn=ft.next())tn=is(rt,tn.value,Wt),tn!==null&&(ze=Ae(tn,ze,bn),Sn===null?vr=tn:Sn.sibling=tn,Sn=tn);return vr}for(Fr=q(rt,Fr);!tn.done;bn++,tn=ft.next())tn=po(Fr,rt,bn,tn.value,Wt),tn!==null&&(P&&tn.alternate!==null&&Fr.delete(tn.key===null?bn:tn.key),ze=Ae(tn,ze,bn),Sn===null?vr=tn:Sn.sibling=tn,Sn=tn);return P&&Fr.forEach(function(vF){return D(rt,vF)}),vr}return function(rt,ze,ft,Wt){var vr=typeof ft=="object"&&ft!==null&&ft.type===E&&ft.key===null;vr&&(ft=ft.props.children);var Sn=typeof ft=="object"&&ft!==null;if(Sn)switch(ft.$$typeof){case p:e:{for(Sn=ft.key,vr=ze;vr!==null;){if(vr.key===Sn)if(vr.tag===7?ft.type===E:vr.elementType===ft.type){T(rt,vr.sibling),ze=Y(vr,ft.type===E?ft.props.children:ft.props,Wt),ze.ref=QA(rt,vr,ft),ze.return=rt,rt=ze;break e}else{T(rt,vr);break}else D(rt,vr);vr=vr.sibling}ft.type===E?(ze=xu(ft.props.children,rt.mode,Wt,ft.key),ze.return=rt,rt=ze):(Wt=qm(ft.type,ft.key,ft.props,null,rt.mode,Wt),Wt.ref=QA(rt,ze,ft),Wt.return=rt,rt=Wt)}return De(rt);case h:e:{for(vr=ft.key;ze!==null;){if(ze.key===vr)if(ze.tag===4&&ze.stateNode.containerInfo===ft.containerInfo&&ze.stateNode.implementation===ft.implementation){T(rt,ze.sibling),ze=Y(ze,ft.children||[],Wt),ze.return=rt,rt=ze;break e}else{T(rt,ze);break}else D(rt,ze);ze=ze.sibling}ze=Rw(ft,rt.mode,Wt),ze.return=rt,rt=ze}return De(rt)}if(typeof ft=="string"||typeof ft=="number")return ft=""+ft,ze!==null&&ze.tag===6?(T(rt,ze.sibling),ze=Y(ze,ft,Wt),ze.return=rt,rt=ze):(T(rt,ze),ze=Fw(ft,rt.mode,Wt),ze.return=rt,rt=ze),De(rt);if(kA(ft))return zA(rt,ze,ft,Wt);if(ue(ft))return Yo(rt,ze,ft,Wt);if(Sn&&fp(rt,ft),typeof ft>"u"&&!vr)switch(rt.tag){case 1:case 0:throw rt=rt.type,Error(n(152,rt.displayName||rt.name||"Component"))}return T(rt,ze)}}var du=sg(!0),og=sg(!1),mu={},uo={current:mu},FA={current:mu},yc={current:mu};function ca(P){if(P===mu)throw Error(n(174));return P}function ag(P,D){On(yc,D,P),On(FA,P,P),On(uo,mu,P),D=ne(D),zn(uo,P),On(uo,D,P)}function Ec(P){zn(uo,P),zn(FA,P),zn(yc,P)}function Sm(P){var D=ca(yc.current),T=ca(uo.current);D=ee(T,P.type,D),T!==D&&(On(FA,P,P),On(uo,D,P))}function lg(P){FA.current===P&&(zn(uo,P),zn(FA,P))}var ei={current:0};function pp(P){for(var D=P;D!==null;){if(D.tag===13){var T=D.memoizedState;if(T!==null&&(T=T.dehydrated,T===null||Ns(T)||so(T)))return D}else if(D.tag===19&&D.memoizedProps.revealOrder!==void 0){if((D.effectTag&64)!==0)return D}else if(D.child!==null){D.child.return=D,D=D.child;continue}if(D===P)break;for(;D.sibling===null;){if(D.return===null||D.return===P)return null;D=D.return}D.sibling.return=D.return,D=D.sibling}return null}function cg(P,D){return{responder:P,props:D}}var RA=u.ReactCurrentDispatcher,Hs=u.ReactCurrentBatchConfig,yu=0,qa=null,ji=null,ua=null,Eu=null,Es=null,Cc=null,wc=0,j=null,Dt=0,Il=!1,xi=null,Ic=0;function ct(){throw Error(n(321))}function Cu(P,D){if(D===null)return!1;for(var T=0;Twc&&(wc=_r,Hm(wc))):(Sw(_r,wt.suspenseConfig),Ae=wt.eagerReducer===P?wt.eagerState:P(Ae,wt.action)),De=wt,wt=wt.next}while(wt!==null&&wt!==q);xt||(vt=De,Y=Ae),hs(Ae,D.memoizedState)||(Go=!0),D.memoizedState=Ae,D.baseUpdate=vt,D.baseState=Y,T.lastRenderedState=Ae}return[D.memoizedState,T.dispatch]}function Ag(P){var D=TA();return typeof P=="function"&&(P=P()),D.memoizedState=D.baseState=P,P=D.queue={last:null,dispatch:null,lastRenderedReducer:Br,lastRenderedState:P},P=P.dispatch=dg.bind(null,qa,P),[D.memoizedState,P]}function fg(P){return Cs(Br,P)}function pg(P,D,T,q){return P={tag:P,create:D,destroy:T,deps:q,next:null},j===null?(j={lastEffect:null},j.lastEffect=P.next=P):(D=j.lastEffect,D===null?j.lastEffect=P.next=P:(T=D.next,D.next=P,P.next=T,j.lastEffect=P)),P}function gp(P,D,T,q){var Y=TA();Dt|=P,Y.memoizedState=pg(D,T,void 0,q===void 0?null:q)}function Bc(P,D,T,q){var Y=hp();q=q===void 0?null:q;var Ae=void 0;if(ji!==null){var De=ji.memoizedState;if(Ae=De.destroy,q!==null&&Cu(q,De.deps)){pg(0,T,Ae,q);return}}Dt|=P,Y.memoizedState=pg(D,T,Ae,q)}function Ct(P,D){return gp(516,192,P,D)}function bm(P,D){return Bc(516,192,P,D)}function hg(P,D){if(typeof D=="function")return P=P(),D(P),function(){D(null)};if(D!=null)return P=P(),D.current=P,function(){D.current=null}}function gg(){}function wu(P,D){return TA().memoizedState=[P,D===void 0?null:D],P}function xm(P,D){var T=hp();D=D===void 0?null:D;var q=T.memoizedState;return q!==null&&D!==null&&Cu(D,q[1])?q[0]:(T.memoizedState=[P,D],P)}function dg(P,D,T){if(!(25>Ic))throw Error(n(301));var q=P.alternate;if(P===qa||q!==null&&q===qa)if(Il=!0,P={expirationTime:yu,suspenseConfig:null,action:T,eagerReducer:null,eagerState:null,next:null},xi===null&&(xi=new Map),T=xi.get(D),T===void 0)xi.set(D,P);else{for(D=T;D.next!==null;)D=D.next;D.next=P}else{var Y=ga(),Ae=ht.suspense;Y=qA(Y,P,Ae),Ae={expirationTime:Y,suspenseConfig:Ae,action:T,eagerReducer:null,eagerState:null,next:null};var De=D.last;if(De===null)Ae.next=Ae;else{var vt=De.next;vt!==null&&(Ae.next=vt),De.next=Ae}if(D.last=Ae,P.expirationTime===0&&(q===null||q.expirationTime===0)&&(q=D.lastRenderedReducer,q!==null))try{var wt=D.lastRenderedState,xt=q(wt,T);if(Ae.eagerReducer=q,Ae.eagerState=xt,hs(xt,wt))return}catch{}finally{}bc(P,Y)}}var Iu={readContext:ms,useCallback:ct,useContext:ct,useEffect:ct,useImperativeHandle:ct,useLayoutEffect:ct,useMemo:ct,useReducer:ct,useRef:ct,useState:ct,useDebugValue:ct,useResponder:ct,useDeferredValue:ct,useTransition:ct},Ew={readContext:ms,useCallback:wu,useContext:ms,useEffect:Ct,useImperativeHandle:function(P,D,T){return T=T!=null?T.concat([P]):null,gp(4,36,hg.bind(null,D,P),T)},useLayoutEffect:function(P,D){return gp(4,36,P,D)},useMemo:function(P,D){var T=TA();return D=D===void 0?null:D,P=P(),T.memoizedState=[P,D],P},useReducer:function(P,D,T){var q=TA();return D=T!==void 0?T(D):D,q.memoizedState=q.baseState=D,P=q.queue={last:null,dispatch:null,lastRenderedReducer:P,lastRenderedState:D},P=P.dispatch=dg.bind(null,qa,P),[q.memoizedState,P]},useRef:function(P){var D=TA();return P={current:P},D.memoizedState=P},useState:Ag,useDebugValue:gg,useResponder:cg,useDeferredValue:function(P,D){var T=Ag(P),q=T[0],Y=T[1];return Ct(function(){a.unstable_next(function(){var Ae=Hs.suspense;Hs.suspense=D===void 0?null:D;try{Y(P)}finally{Hs.suspense=Ae}})},[P,D]),q},useTransition:function(P){var D=Ag(!1),T=D[0],q=D[1];return[wu(function(Y){q(!0),a.unstable_next(function(){var Ae=Hs.suspense;Hs.suspense=P===void 0?null:P;try{q(!1),Y()}finally{Hs.suspense=Ae}})},[P,T]),T]}},km={readContext:ms,useCallback:xm,useContext:ms,useEffect:bm,useImperativeHandle:function(P,D,T){return T=T!=null?T.concat([P]):null,Bc(4,36,hg.bind(null,D,P),T)},useLayoutEffect:function(P,D){return Bc(4,36,P,D)},useMemo:function(P,D){var T=hp();D=D===void 0?null:D;var q=T.memoizedState;return q!==null&&D!==null&&Cu(D,q[1])?q[0]:(P=P(),T.memoizedState=[P,D],P)},useReducer:Cs,useRef:function(){return hp().memoizedState},useState:fg,useDebugValue:gg,useResponder:cg,useDeferredValue:function(P,D){var T=fg(P),q=T[0],Y=T[1];return bm(function(){a.unstable_next(function(){var Ae=Hs.suspense;Hs.suspense=D===void 0?null:D;try{Y(P)}finally{Hs.suspense=Ae}})},[P,D]),q},useTransition:function(P){var D=fg(!1),T=D[0],q=D[1];return[xm(function(Y){q(!0),a.unstable_next(function(){var Ae=Hs.suspense;Hs.suspense=P===void 0?null:P;try{q(!1),Y()}finally{Hs.suspense=Ae}})},[P,T]),T]}},Aa=null,vc=null,Bl=!1;function Bu(P,D){var T=Pl(5,null,null,0);T.elementType="DELETED",T.type="DELETED",T.stateNode=D,T.return=P,T.effectTag=8,P.lastEffect!==null?(P.lastEffect.nextEffect=T,P.lastEffect=T):P.firstEffect=P.lastEffect=T}function mg(P,D){switch(P.tag){case 5:return D=io(D,P.type,P.pendingProps),D!==null?(P.stateNode=D,!0):!1;case 6:return D=Si(D,P.pendingProps),D!==null?(P.stateNode=D,!0):!1;case 13:return!1;default:return!1}}function LA(P){if(Bl){var D=vc;if(D){var T=D;if(!mg(P,D)){if(D=uc(T),!D||!mg(P,D)){P.effectTag=P.effectTag&-1025|2,Bl=!1,Aa=P;return}Bu(Aa,T)}Aa=P,vc=uu(D)}else P.effectTag=P.effectTag&-1025|2,Bl=!1,Aa=P}}function dp(P){for(P=P.return;P!==null&&P.tag!==5&&P.tag!==3&&P.tag!==13;)P=P.return;Aa=P}function Ga(P){if(!y||P!==Aa)return!1;if(!Bl)return dp(P),Bl=!0,!1;var D=P.type;if(P.tag!==5||D!=="head"&&D!=="body"&&!ke(D,P.memoizedProps))for(D=vc;D;)Bu(P,D),D=uc(D);if(dp(P),P.tag===13){if(!y)throw Error(n(316));if(P=P.memoizedState,P=P!==null?P.dehydrated:null,!P)throw Error(n(317));vc=Os(P)}else vc=Aa?uc(P.stateNode):null;return!0}function yg(){y&&(vc=Aa=null,Bl=!1)}var mp=u.ReactCurrentOwner,Go=!1;function ws(P,D,T,q){D.child=P===null?og(D,null,T,q):du(D,P.child,T,q)}function Ii(P,D,T,q,Y){T=T.render;var Ae=D.ref;return ds(D,Y),q=ug(P,D,T,q,Ae,Y),P!==null&&!Go?(D.updateQueue=P.updateQueue,D.effectTag&=-517,P.expirationTime<=Y&&(P.expirationTime=0),si(P,D,Y)):(D.effectTag|=1,ws(P,D,q,Y),D.child)}function Qm(P,D,T,q,Y,Ae){if(P===null){var De=T.type;return typeof De=="function"&&!Qw(De)&&De.defaultProps===void 0&&T.compare===null&&T.defaultProps===void 0?(D.tag=15,D.type=De,Fm(P,D,De,q,Y,Ae)):(P=qm(T.type,null,q,null,D.mode,Ae),P.ref=D.ref,P.return=D,D.child=P)}return De=P.child,YD)&&HA.set(P,D)))}}function Pg(P,D){P.expirationTimeP?D:P)}function fo(P){if(P.lastExpiredTime!==0)P.callbackExpirationTime=1073741823,P.callbackPriority=99,P.callbackNode=hu(Pw.bind(null,P));else{var D=_m(P),T=P.callbackNode;if(D===0)T!==null&&(P.callbackNode=null,P.callbackExpirationTime=0,P.callbackPriority=90);else{var q=ga();if(D===1073741823?q=99:D===1||D===2?q=95:(q=10*(1073741821-D)-10*(1073741821-q),q=0>=q?99:250>=q?98:5250>=q?97:95),T!==null){var Y=P.callbackPriority;if(P.callbackExpirationTime===D&&Y>=q)return;T!==SA&&Ce(T)}P.callbackExpirationTime=D,P.callbackPriority=q,D=D===1073741823?hu(Pw.bind(null,P)):dc(q,Wv.bind(null,P),{timeout:10*(1073741821-D)-Ni()}),P.callbackNode=D}}}function Wv(P,D){if(Um=0,D)return D=ga(),Gm(P,D),fo(P),null;var T=_m(P);if(T!==0){if(D=P.callbackNode,(yr&(rs|qs))!==En)throw Error(n(327));if(vp(),P===gi&&T===ns||Su(P,T),Or!==null){var q=yr;yr|=rs;var Y=jA(P);do try{pF();break}catch(vt){GA(P,vt)}while(1);if(la(),yr=q,wp.current=Y,Yi===Lm)throw D=Nm,Su(P,T),KA(P,T),fo(P),D;if(Or===null)switch(Y=P.finishedWork=P.current.alternate,P.finishedExpirationTime=T,q=Yi,gi=null,q){case vu:case Lm:throw Error(n(345));case Bi:Gm(P,2=T){P.lastPingedTime=T,Su(P,T);break}}if(Ae=_m(P),Ae!==0&&Ae!==T)break;if(q!==0&&q!==T){P.lastPingedTime=q;break}P.timeoutHandle=Te(bu.bind(null,P),Y);break}bu(P);break;case Dl:if(KA(P,T),q=P.lastSuspendedTime,T===q&&(P.nextKnownPendingLevel=bw(Y)),UA&&(Y=P.lastPingedTime,Y===0||Y>=T)){P.lastPingedTime=T,Su(P,T);break}if(Y=_m(P),Y!==0&&Y!==T)break;if(q!==0&&q!==T){P.lastPingedTime=q;break}if(MA!==1073741823?q=10*(1073741821-MA)-Ni():Wa===1073741823?q=0:(q=10*(1073741821-Wa)-5e3,Y=Ni(),T=10*(1073741821-T)-Y,q=Y-q,0>q&&(q=0),q=(120>q?120:480>q?480:1080>q?1080:1920>q?1920:3e3>q?3e3:4320>q?4320:1960*ww(q/1960))-q,T=q?q=0:(Y=De.busyDelayMs|0,Ae=Ni()-(10*(1073741821-Ae)-(De.timeoutMs|0||5e3)),q=Ae<=Y?0:Y+q-Ae),10 component higher in the tree to provide a loading indicator or placeholder to display.`+yl(Y))}Yi!==Sc&&(Yi=Bi),Ae=Cg(Ae,Y),wt=q;do{switch(wt.tag){case 3:De=Ae,wt.effectTag|=4096,wt.expirationTime=D;var ze=jv(wt,De,D);It(wt,ze);break e;case 1:De=Ae;var ft=wt.type,Wt=wt.stateNode;if((wt.effectTag&64)===0&&(typeof ft.getDerivedStateFromError=="function"||Wt!==null&&typeof Wt.componentDidCatch=="function"&&(Pu===null||!Pu.has(Wt)))){wt.effectTag|=4096,wt.expirationTime=D;var vr=Yv(wt,De,D);It(wt,vr);break e}}wt=wt.return}while(wt!==null)}Or=Jv(Or)}catch(Sn){D=Sn;continue}break}while(1)}function jA(){var P=wp.current;return wp.current=Iu,P===null?Iu:P}function Sw(P,D){PIp&&(Ip=P)}function fF(){for(;Or!==null;)Or=Vv(Or)}function pF(){for(;Or!==null&&!Rt();)Or=Vv(Or)}function Vv(P){var D=Zv(P.alternate,P,ns);return P.memoizedProps=P.pendingProps,D===null&&(D=Jv(P)),Iw.current=null,D}function Jv(P){Or=P;do{var D=Or.alternate;if(P=Or.return,(Or.effectTag&2048)===0){e:{var T=D;D=Or;var q=ns,Y=D.pendingProps;switch(D.tag){case 2:break;case 16:break;case 15:case 0:break;case 1:ii(D.type)&&Ua(D);break;case 3:Ec(D),hr(D),Y=D.stateNode,Y.pendingContext&&(Y.context=Y.pendingContext,Y.pendingContext=null),(T===null||T.child===null)&&Ga(D)&&pa(D),vl(D);break;case 5:lg(D);var Ae=ca(yc.current);if(q=D.type,T!==null&&D.stateNode!=null)ts(T,D,q,Y,Ae),T.ref!==D.ref&&(D.effectTag|=128);else if(Y){if(T=ca(uo.current),Ga(D)){if(Y=D,!y)throw Error(n(175));T=cp(Y.stateNode,Y.type,Y.memoizedProps,Ae,T,Y),Y.updateQueue=T,T=T!==null,T&&pa(D)}else{var De=At(q,Y,Ae,T,D);Dc(De,D,!1,!1),D.stateNode=De,at(De,q,Y,Ae,T)&&pa(D)}D.ref!==null&&(D.effectTag|=128)}else if(D.stateNode===null)throw Error(n(166));break;case 6:if(T&&D.stateNode!=null)jr(T,D,T.memoizedProps,Y);else{if(typeof Y!="string"&&D.stateNode===null)throw Error(n(166));if(T=ca(yc.current),Ae=ca(uo.current),Ga(D)){if(T=D,!y)throw Error(n(176));(T=up(T.stateNode,T.memoizedProps,T))&&pa(D)}else D.stateNode=He(Y,T,Ae,D)}break;case 11:break;case 13:if(zn(ei,D),Y=D.memoizedState,(D.effectTag&64)!==0){D.expirationTime=q;break e}Y=Y!==null,Ae=!1,T===null?D.memoizedProps.fallback!==void 0&&Ga(D):(q=T.memoizedState,Ae=q!==null,Y||q===null||(q=T.child.sibling,q!==null&&(De=D.firstEffect,De!==null?(D.firstEffect=q,q.nextEffect=De):(D.firstEffect=D.lastEffect=q,q.nextEffect=null),q.effectTag=8))),Y&&!Ae&&(D.mode&2)!==0&&(T===null&&D.memoizedProps.unstable_avoidThisFallback!==!0||(ei.current&1)!==0?Yi===vu&&(Yi=ha):((Yi===vu||Yi===ha)&&(Yi=Dl),Ip!==0&&gi!==null&&(KA(gi,ns),eD(gi,Ip)))),S&&Y&&(D.effectTag|=4),w&&(Y||Ae)&&(D.effectTag|=4);break;case 7:break;case 8:break;case 12:break;case 4:Ec(D),vl(D);break;case 10:wi(D);break;case 9:break;case 14:break;case 17:ii(D.type)&&Ua(D);break;case 19:if(zn(ei,D),Y=D.memoizedState,Y===null)break;if(Ae=(D.effectTag&64)!==0,De=Y.rendering,De===null){if(Ae)Pc(Y,!1);else if(Yi!==vu||T!==null&&(T.effectTag&64)!==0)for(T=D.child;T!==null;){if(De=pp(T),De!==null){for(D.effectTag|=64,Pc(Y,!1),T=De.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),Y.lastEffect===null&&(D.firstEffect=null),D.lastEffect=Y.lastEffect,T=q,Y=D.child;Y!==null;)Ae=Y,q=T,Ae.effectTag&=2,Ae.nextEffect=null,Ae.firstEffect=null,Ae.lastEffect=null,De=Ae.alternate,De===null?(Ae.childExpirationTime=0,Ae.expirationTime=q,Ae.child=null,Ae.memoizedProps=null,Ae.memoizedState=null,Ae.updateQueue=null,Ae.dependencies=null):(Ae.childExpirationTime=De.childExpirationTime,Ae.expirationTime=De.expirationTime,Ae.child=De.child,Ae.memoizedProps=De.memoizedProps,Ae.memoizedState=De.memoizedState,Ae.updateQueue=De.updateQueue,q=De.dependencies,Ae.dependencies=q===null?null:{expirationTime:q.expirationTime,firstContext:q.firstContext,responders:q.responders}),Y=Y.sibling;On(ei,ei.current&1|2,D),D=D.child;break e}T=T.sibling}}else{if(!Ae)if(T=pp(De),T!==null){if(D.effectTag|=64,Ae=!0,T=T.updateQueue,T!==null&&(D.updateQueue=T,D.effectTag|=4),Pc(Y,!0),Y.tail===null&&Y.tailMode==="hidden"&&!De.alternate){D=D.lastEffect=Y.lastEffect,D!==null&&(D.nextEffect=null);break}}else Ni()>Y.tailExpiration&&1Y&&(Y=q),De>Y&&(Y=De),Ae=Ae.sibling;T.childExpirationTime=Y}if(D!==null)return D;P!==null&&(P.effectTag&2048)===0&&(P.firstEffect===null&&(P.firstEffect=Or.firstEffect),Or.lastEffect!==null&&(P.lastEffect!==null&&(P.lastEffect.nextEffect=Or.firstEffect),P.lastEffect=Or.lastEffect),1P?D:P}function bu(P){var D=_o();return lo(99,hF.bind(null,P,D)),null}function hF(P,D){do vp();while(vg!==null);if((yr&(rs|qs))!==En)throw Error(n(327));var T=P.finishedWork,q=P.finishedExpirationTime;if(T===null)return null;if(P.finishedWork=null,P.finishedExpirationTime=0,T===P.current)throw Error(n(177));P.callbackNode=null,P.callbackExpirationTime=0,P.callbackPriority=90,P.nextKnownPendingLevel=0;var Y=bw(T);if(P.firstPendingTime=Y,q<=P.lastSuspendedTime?P.firstSuspendedTime=P.lastSuspendedTime=P.nextKnownPendingLevel=0:q<=P.firstSuspendedTime&&(P.firstSuspendedTime=q-1),q<=P.lastPingedTime&&(P.lastPingedTime=0),q<=P.lastExpiredTime&&(P.lastExpiredTime=0),P===gi&&(Or=gi=null,ns=0),1=T?ln(P,D,T):(On(ei,ei.current&1,D),D=si(P,D,T),D!==null?D.sibling:null);On(ei,ei.current&1,D);break;case 19:if(q=D.childExpirationTime>=T,(P.effectTag&64)!==0){if(q)return ja(P,D,T);D.effectTag|=64}if(Y=D.memoizedState,Y!==null&&(Y.rendering=null,Y.tail=null),On(ei,ei.current,D),!q)return null}return si(P,D,T)}Go=!1}}else Go=!1;switch(D.expirationTime=0,D.tag){case 2:if(q=D.type,P!==null&&(P.alternate=null,D.alternate=null,D.effectTag|=2),P=D.pendingProps,Y=Oe(D,Mn.current),ds(D,T),Y=ug(null,D,q,P,Y,T),D.effectTag|=1,typeof Y=="object"&&Y!==null&&typeof Y.render=="function"&&Y.$$typeof===void 0){if(D.tag=1,yw(),ii(q)){var Ae=!0;fc(D)}else Ae=!1;D.memoizedState=Y.state!==null&&Y.state!==void 0?Y.state:null;var De=q.getDerivedStateFromProps;typeof De=="function"&&er(D,q,De,P),Y.updater=$r,D.stateNode=Y,Y._reactInternalFiber=D,qo(D,q,P,T),D=Ep(null,D,q,!0,Ae,T)}else D.tag=0,ws(null,D,Y,T),D=D.child;return D;case 16:if(Y=D.elementType,P!==null&&(P.alternate=null,D.alternate=null,D.effectTag|=2),P=D.pendingProps,me(Y),Y._status!==1)throw Y._result;switch(Y=Y._result,D.type=Y,Ae=D.tag=wF(Y),P=Ci(Y,P),Ae){case 0:D=NA(null,D,Y,P,T);break;case 1:D=yp(null,D,Y,P,T);break;case 11:D=Ii(null,D,Y,P,T);break;case 14:D=Qm(null,D,Y,Ci(Y.type,P),q,T);break;default:throw Error(n(306,Y,""))}return D;case 0:return q=D.type,Y=D.pendingProps,Y=D.elementType===q?Y:Ci(q,Y),NA(P,D,q,Y,T);case 1:return q=D.type,Y=D.pendingProps,Y=D.elementType===q?Y:Ci(q,Y),yp(P,D,q,Y,T);case 3:if(Eg(D),q=D.updateQueue,q===null)throw Error(n(282));if(Y=D.memoizedState,Y=Y!==null?Y.element:null,ye(D,q,D.pendingProps,null,T),q=D.memoizedState.element,q===Y)yg(),D=si(P,D,T);else{if((Y=D.stateNode.hydrate)&&(y?(vc=uu(D.stateNode.containerInfo),Aa=D,Y=Bl=!0):Y=!1),Y)for(T=og(D,null,q,T),D.child=T;T;)T.effectTag=T.effectTag&-3|1024,T=T.sibling;else ws(P,D,q,T),yg();D=D.child}return D;case 5:return Sm(D),P===null&&LA(D),q=D.type,Y=D.pendingProps,Ae=P!==null?P.memoizedProps:null,De=Y.children,ke(q,Y)?De=null:Ae!==null&&ke(q,Ae)&&(D.effectTag|=16),jo(P,D),D.mode&4&&T!==1&&xe(q,Y)?(D.expirationTime=D.childExpirationTime=1,D=null):(ws(P,D,De,T),D=D.child),D;case 6:return P===null&&LA(D),null;case 13:return ln(P,D,T);case 4:return ag(D,D.stateNode.containerInfo),q=D.pendingProps,P===null?D.child=du(D,null,q,T):ws(P,D,q,T),D.child;case 11:return q=D.type,Y=D.pendingProps,Y=D.elementType===q?Y:Ci(q,Y),Ii(P,D,q,Y,T);case 7:return ws(P,D,D.pendingProps,T),D.child;case 8:return ws(P,D,D.pendingProps.children,T),D.child;case 12:return ws(P,D,D.pendingProps.children,T),D.child;case 10:e:{if(q=D.type._context,Y=D.pendingProps,De=D.memoizedProps,Ae=Y.value,Ho(D,Ae),De!==null){var vt=De.value;if(Ae=hs(vt,Ae)?0:(typeof q._calculateChangedBits=="function"?q._calculateChangedBits(vt,Ae):1073741823)|0,Ae===0){if(De.children===Y.children&&!_i.current){D=si(P,D,T);break e}}else for(vt=D.child,vt!==null&&(vt.return=D);vt!==null;){var wt=vt.dependencies;if(wt!==null){De=vt.child;for(var xt=wt.firstContext;xt!==null;){if(xt.context===q&&(xt.observedBits&Ae)!==0){vt.tag===1&&(xt=ys(T,null),xt.tag=2,tt(vt,xt)),vt.expirationTime"u")return!1;var D=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(D.isDisabled||!D.supportsFiber)return!0;try{var T=D.inject(P);xw=function(q){try{D.onCommitFiberRoot(T,q,void 0,(q.current.effectTag&64)===64)}catch{}},kw=function(q){try{D.onCommitFiberUnmount(T,q)}catch{}}}catch{}return!0}function CF(P,D,T,q){this.tag=P,this.key=T,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=D,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=q,this.effectTag=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childExpirationTime=this.expirationTime=0,this.alternate=null}function Pl(P,D,T,q){return new CF(P,D,T,q)}function Qw(P){return P=P.prototype,!(!P||!P.isReactComponent)}function wF(P){if(typeof P=="function")return Qw(P)?1:0;if(P!=null){if(P=P.$$typeof,P===N)return 11;if(P===te)return 14}return 2}function WA(P,D){var T=P.alternate;return T===null?(T=Pl(P.tag,D,P.key,P.mode),T.elementType=P.elementType,T.type=P.type,T.stateNode=P.stateNode,T.alternate=P,P.alternate=T):(T.pendingProps=D,T.effectTag=0,T.nextEffect=null,T.firstEffect=null,T.lastEffect=null),T.childExpirationTime=P.childExpirationTime,T.expirationTime=P.expirationTime,T.child=P.child,T.memoizedProps=P.memoizedProps,T.memoizedState=P.memoizedState,T.updateQueue=P.updateQueue,D=P.dependencies,T.dependencies=D===null?null:{expirationTime:D.expirationTime,firstContext:D.firstContext,responders:D.responders},T.sibling=P.sibling,T.index=P.index,T.ref=P.ref,T}function qm(P,D,T,q,Y,Ae){var De=2;if(q=P,typeof P=="function")Qw(P)&&(De=1);else if(typeof P=="string")De=5;else e:switch(P){case E:return xu(T.children,Y,Ae,D);case R:De=8,Y|=7;break;case I:De=8,Y|=1;break;case v:return P=Pl(12,T,D,Y|8),P.elementType=v,P.type=v,P.expirationTime=Ae,P;case U:return P=Pl(13,T,D,Y),P.type=U,P.elementType=U,P.expirationTime=Ae,P;case V:return P=Pl(19,T,D,Y),P.elementType=V,P.expirationTime=Ae,P;default:if(typeof P=="object"&&P!==null)switch(P.$$typeof){case x:De=10;break e;case C:De=9;break e;case N:De=11;break e;case te:De=14;break e;case ae:De=16,q=null;break e}throw Error(n(130,P==null?P:typeof P,""))}return D=Pl(De,T,D,Y),D.elementType=P,D.type=q,D.expirationTime=Ae,D}function xu(P,D,T,q){return P=Pl(7,P,q,D),P.expirationTime=T,P}function Fw(P,D,T){return P=Pl(6,P,null,D),P.expirationTime=T,P}function Rw(P,D,T){return D=Pl(4,P.children!==null?P.children:[],P.key,D),D.expirationTime=T,D.stateNode={containerInfo:P.containerInfo,pendingChildren:null,implementation:P.implementation},D}function IF(P,D,T){this.tag=D,this.current=null,this.containerInfo=P,this.pingCache=this.pendingChildren=null,this.finishedExpirationTime=0,this.finishedWork=null,this.timeoutHandle=qe,this.pendingContext=this.context=null,this.hydrate=T,this.callbackNode=null,this.callbackPriority=90,this.lastExpiredTime=this.lastPingedTime=this.nextKnownPendingLevel=this.lastSuspendedTime=this.firstSuspendedTime=this.firstPendingTime=0}function $v(P,D){var T=P.firstSuspendedTime;return P=P.lastSuspendedTime,T!==0&&T>=D&&P<=D}function KA(P,D){var T=P.firstSuspendedTime,q=P.lastSuspendedTime;TD||T===0)&&(P.lastSuspendedTime=D),D<=P.lastPingedTime&&(P.lastPingedTime=0),D<=P.lastExpiredTime&&(P.lastExpiredTime=0)}function eD(P,D){D>P.firstPendingTime&&(P.firstPendingTime=D);var T=P.firstSuspendedTime;T!==0&&(D>=T?P.firstSuspendedTime=P.lastSuspendedTime=P.nextKnownPendingLevel=0:D>=P.lastSuspendedTime&&(P.lastSuspendedTime=D+1),D>P.nextKnownPendingLevel&&(P.nextKnownPendingLevel=D))}function Gm(P,D){var T=P.lastExpiredTime;(T===0||T>D)&&(P.lastExpiredTime=D)}function tD(P){var D=P._reactInternalFiber;if(D===void 0)throw typeof P.render=="function"?Error(n(188)):Error(n(268,Object.keys(P)));return P=Ee(D),P===null?null:P.stateNode}function rD(P,D){P=P.memoizedState,P!==null&&P.dehydrated!==null&&P.retryTime{"use strict";SEe.exports=PEe()});var kEe=_((EKt,xEe)=>{"use strict";var qyt={ALIGN_COUNT:8,ALIGN_AUTO:0,ALIGN_FLEX_START:1,ALIGN_CENTER:2,ALIGN_FLEX_END:3,ALIGN_STRETCH:4,ALIGN_BASELINE:5,ALIGN_SPACE_BETWEEN:6,ALIGN_SPACE_AROUND:7,DIMENSION_COUNT:2,DIMENSION_WIDTH:0,DIMENSION_HEIGHT:1,DIRECTION_COUNT:3,DIRECTION_INHERIT:0,DIRECTION_LTR:1,DIRECTION_RTL:2,DISPLAY_COUNT:2,DISPLAY_FLEX:0,DISPLAY_NONE:1,EDGE_COUNT:9,EDGE_LEFT:0,EDGE_TOP:1,EDGE_RIGHT:2,EDGE_BOTTOM:3,EDGE_START:4,EDGE_END:5,EDGE_HORIZONTAL:6,EDGE_VERTICAL:7,EDGE_ALL:8,EXPERIMENTAL_FEATURE_COUNT:1,EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS:0,FLEX_DIRECTION_COUNT:4,FLEX_DIRECTION_COLUMN:0,FLEX_DIRECTION_COLUMN_REVERSE:1,FLEX_DIRECTION_ROW:2,FLEX_DIRECTION_ROW_REVERSE:3,JUSTIFY_COUNT:6,JUSTIFY_FLEX_START:0,JUSTIFY_CENTER:1,JUSTIFY_FLEX_END:2,JUSTIFY_SPACE_BETWEEN:3,JUSTIFY_SPACE_AROUND:4,JUSTIFY_SPACE_EVENLY:5,LOG_LEVEL_COUNT:6,LOG_LEVEL_ERROR:0,LOG_LEVEL_WARN:1,LOG_LEVEL_INFO:2,LOG_LEVEL_DEBUG:3,LOG_LEVEL_VERBOSE:4,LOG_LEVEL_FATAL:5,MEASURE_MODE_COUNT:3,MEASURE_MODE_UNDEFINED:0,MEASURE_MODE_EXACTLY:1,MEASURE_MODE_AT_MOST:2,NODE_TYPE_COUNT:2,NODE_TYPE_DEFAULT:0,NODE_TYPE_TEXT:1,OVERFLOW_COUNT:3,OVERFLOW_VISIBLE:0,OVERFLOW_HIDDEN:1,OVERFLOW_SCROLL:2,POSITION_TYPE_COUNT:2,POSITION_TYPE_RELATIVE:0,POSITION_TYPE_ABSOLUTE:1,PRINT_OPTIONS_COUNT:3,PRINT_OPTIONS_LAYOUT:1,PRINT_OPTIONS_STYLE:2,PRINT_OPTIONS_CHILDREN:4,UNIT_COUNT:4,UNIT_UNDEFINED:0,UNIT_POINT:1,UNIT_PERCENT:2,UNIT_AUTO:3,WRAP_COUNT:3,WRAP_NO_WRAP:0,WRAP_WRAP:1,WRAP_WRAP_REVERSE:2};xEe.exports=qyt});var TEe=_((CKt,REe)=>{"use strict";var Gyt=Object.assign||function(t){for(var e=1;e"}}]),t}(),QEe=function(){Wk(t,null,[{key:"fromJS",value:function(r){var o=r.width,a=r.height;return new t(o,a)}}]);function t(e,r){b6(this,t),this.width=e,this.height=r}return Wk(t,[{key:"fromJS",value:function(r){r(this.width,this.height)}},{key:"toString",value:function(){return""}}]),t}(),FEe=function(){function t(e,r){b6(this,t),this.unit=e,this.value=r}return Wk(t,[{key:"fromJS",value:function(r){r(this.unit,this.value)}},{key:"toString",value:function(){switch(this.unit){case ru.UNIT_POINT:return String(this.value);case ru.UNIT_PERCENT:return this.value+"%";case ru.UNIT_AUTO:return"auto";default:return this.value+"?"}}},{key:"valueOf",value:function(){return this.value}}]),t}();REe.exports=function(t,e){function r(u,A,p){var h=u[A];u[A]=function(){for(var E=arguments.length,I=Array(E),v=0;v1?I-1:0),x=1;x1&&arguments[1]!==void 0?arguments[1]:NaN,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:NaN,h=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ru.DIRECTION_LTR;return u.call(this,A,p,h)}),Gyt({Config:e.Config,Node:e.Node,Layout:t("Layout",jyt),Size:t("Size",QEe),Value:t("Value",FEe),getInstanceCount:function(){return e.getInstanceCount.apply(e,arguments)}},ru)}});var LEe=_((exports,module)=>{(function(t,e){typeof define=="function"&&define.amd?define([],function(){return e}):typeof module=="object"&&module.exports?module.exports=e:(t.nbind=t.nbind||{}).init=e})(exports,function(Module,cb){typeof Module=="function"&&(cb=Module,Module={}),Module.onRuntimeInitialized=function(t,e){return function(){t&&t.apply(this,arguments);try{Module.ccall("nbind_init")}catch(r){e(r);return}e(null,{bind:Module._nbind_value,reflect:Module.NBind.reflect,queryType:Module.NBind.queryType,toggleLightGC:Module.toggleLightGC,lib:Module})}}(Module.onRuntimeInitialized,cb);var Module;Module||(Module=(typeof Module<"u"?Module:null)||{});var moduleOverrides={};for(var key in Module)Module.hasOwnProperty(key)&&(moduleOverrides[key]=Module[key]);var ENVIRONMENT_IS_WEB=!1,ENVIRONMENT_IS_WORKER=!1,ENVIRONMENT_IS_NODE=!1,ENVIRONMENT_IS_SHELL=!1;if(Module.ENVIRONMENT)if(Module.ENVIRONMENT==="WEB")ENVIRONMENT_IS_WEB=!0;else if(Module.ENVIRONMENT==="WORKER")ENVIRONMENT_IS_WORKER=!0;else if(Module.ENVIRONMENT==="NODE")ENVIRONMENT_IS_NODE=!0;else if(Module.ENVIRONMENT==="SHELL")ENVIRONMENT_IS_SHELL=!0;else throw new Error("The provided Module['ENVIRONMENT'] value is not valid. It must be one of: WEB|WORKER|NODE|SHELL.");else ENVIRONMENT_IS_WEB=typeof window=="object",ENVIRONMENT_IS_WORKER=typeof importScripts=="function",ENVIRONMENT_IS_NODE=typeof process=="object"&&typeof ve=="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER,ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){Module.print||(Module.print=console.log),Module.printErr||(Module.printErr=console.warn);var nodeFS,nodePath;Module.read=function(e,r){nodeFS||(nodeFS={}("")),nodePath||(nodePath={}("")),e=nodePath.normalize(e);var o=nodeFS.readFileSync(e);return r?o:o.toString()},Module.readBinary=function(e){var r=Module.read(e,!0);return r.buffer||(r=new Uint8Array(r)),assert(r.buffer),r},Module.load=function(e){globalEval(read(e))},Module.thisProgram||(process.argv.length>1?Module.thisProgram=process.argv[1].replace(/\\/g,"/"):Module.thisProgram="unknown-program"),Module.arguments=process.argv.slice(2),typeof module<"u"&&(module.exports=Module),Module.inspect=function(){return"[Emscripten Module object]"}}else if(ENVIRONMENT_IS_SHELL)Module.print||(Module.print=print),typeof printErr<"u"&&(Module.printErr=printErr),typeof read<"u"?Module.read=read:Module.read=function(){throw"no read() available"},Module.readBinary=function(e){if(typeof readbuffer=="function")return new Uint8Array(readbuffer(e));var r=read(e,"binary");return assert(typeof r=="object"),r},typeof scriptArgs<"u"?Module.arguments=scriptArgs:typeof arguments<"u"&&(Module.arguments=arguments),typeof quit=="function"&&(Module.quit=function(t,e){quit(t)});else if(ENVIRONMENT_IS_WEB||ENVIRONMENT_IS_WORKER){if(Module.read=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.send(null),r.responseText},ENVIRONMENT_IS_WORKER&&(Module.readBinary=function(e){var r=new XMLHttpRequest;return r.open("GET",e,!1),r.responseType="arraybuffer",r.send(null),new Uint8Array(r.response)}),Module.readAsync=function(e,r,o){var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="arraybuffer",a.onload=function(){a.status==200||a.status==0&&a.response?r(a.response):o()},a.onerror=o,a.send(null)},typeof arguments<"u"&&(Module.arguments=arguments),typeof console<"u")Module.print||(Module.print=function(e){console.log(e)}),Module.printErr||(Module.printErr=function(e){console.warn(e)});else{var TRY_USE_DUMP=!1;Module.print||(Module.print=TRY_USE_DUMP&&typeof dump<"u"?function(t){dump(t)}:function(t){})}ENVIRONMENT_IS_WORKER&&(Module.load=importScripts),typeof Module.setWindowTitle>"u"&&(Module.setWindowTitle=function(t){document.title=t})}else throw"Unknown runtime environment. Where are we?";function globalEval(t){eval.call(null,t)}!Module.load&&Module.read&&(Module.load=function(e){globalEval(Module.read(e))}),Module.print||(Module.print=function(){}),Module.printErr||(Module.printErr=Module.print),Module.arguments||(Module.arguments=[]),Module.thisProgram||(Module.thisProgram="./this.program"),Module.quit||(Module.quit=function(t,e){throw e}),Module.print=Module.print,Module.printErr=Module.printErr,Module.preRun=[],Module.postRun=[];for(var key in moduleOverrides)moduleOverrides.hasOwnProperty(key)&&(Module[key]=moduleOverrides[key]);moduleOverrides=void 0;var Runtime={setTempRet0:function(t){return tempRet0=t,t},getTempRet0:function(){return tempRet0},stackSave:function(){return STACKTOP},stackRestore:function(t){STACKTOP=t},getNativeTypeSize:function(t){switch(t){case"i1":case"i8":return 1;case"i16":return 2;case"i32":return 4;case"i64":return 8;case"float":return 4;case"double":return 8;default:{if(t[t.length-1]==="*")return Runtime.QUANTUM_SIZE;if(t[0]==="i"){var e=parseInt(t.substr(1));return assert(e%8===0),e/8}else return 0}}},getNativeFieldSize:function(t){return Math.max(Runtime.getNativeTypeSize(t),Runtime.QUANTUM_SIZE)},STACK_ALIGN:16,prepVararg:function(t,e){return e==="double"||e==="i64"?t&7&&(assert((t&7)===4),t+=4):assert((t&3)===0),t},getAlignSize:function(t,e,r){return!r&&(t=="i64"||t=="double")?8:t?Math.min(e||(t?Runtime.getNativeFieldSize(t):0),Runtime.QUANTUM_SIZE):Math.min(e,8)},dynCall:function(t,e,r){return r&&r.length?Module["dynCall_"+t].apply(null,[e].concat(r)):Module["dynCall_"+t].call(null,e)},functionPointers:[],addFunction:function(t){for(var e=0;e>2],r=(e+t+15|0)&-16;if(HEAP32[DYNAMICTOP_PTR>>2]=r,r>=TOTAL_MEMORY){var o=enlargeMemory();if(!o)return HEAP32[DYNAMICTOP_PTR>>2]=e,0}return e},alignMemory:function(t,e){var r=t=Math.ceil(t/(e||16))*(e||16);return r},makeBigInt:function(t,e,r){var o=r?+(t>>>0)+ +(e>>>0)*4294967296:+(t>>>0)+ +(e|0)*4294967296;return o},GLOBAL_BASE:8,QUANTUM_SIZE:4,__dummy__:0};Module.Runtime=Runtime;var ABORT=0,EXITSTATUS=0;function assert(t,e){t||abort("Assertion failed: "+e)}function getCFunc(ident){var func=Module["_"+ident];if(!func)try{func=eval("_"+ident)}catch(t){}return assert(func,"Cannot call unknown function "+ident+" (perhaps LLVM optimizations or closure removed it?)"),func}var cwrap,ccall;(function(){var JSfuncs={stackSave:function(){Runtime.stackSave()},stackRestore:function(){Runtime.stackRestore()},arrayToC:function(t){var e=Runtime.stackAlloc(t.length);return writeArrayToMemory(t,e),e},stringToC:function(t){var e=0;if(t!=null&&t!==0){var r=(t.length<<2)+1;e=Runtime.stackAlloc(r),stringToUTF8(t,e,r)}return e}},toC={string:JSfuncs.stringToC,array:JSfuncs.arrayToC};ccall=function(e,r,o,a,n){var u=getCFunc(e),A=[],p=0;if(a)for(var h=0;h>0]=e;break;case"i8":HEAP8[t>>0]=e;break;case"i16":HEAP16[t>>1]=e;break;case"i32":HEAP32[t>>2]=e;break;case"i64":tempI64=[e>>>0,(tempDouble=e,+Math_abs(tempDouble)>=1?tempDouble>0?(Math_min(+Math_floor(tempDouble/4294967296),4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/4294967296)>>>0:0)],HEAP32[t>>2]=tempI64[0],HEAP32[t+4>>2]=tempI64[1];break;case"float":HEAPF32[t>>2]=e;break;case"double":HEAPF64[t>>3]=e;break;default:abort("invalid type for setValue: "+r)}}Module.setValue=setValue;function getValue(t,e,r){switch(e=e||"i8",e.charAt(e.length-1)==="*"&&(e="i32"),e){case"i1":return HEAP8[t>>0];case"i8":return HEAP8[t>>0];case"i16":return HEAP16[t>>1];case"i32":return HEAP32[t>>2];case"i64":return HEAP32[t>>2];case"float":return HEAPF32[t>>2];case"double":return HEAPF64[t>>3];default:abort("invalid type for setValue: "+e)}return null}Module.getValue=getValue;var ALLOC_NORMAL=0,ALLOC_STACK=1,ALLOC_STATIC=2,ALLOC_DYNAMIC=3,ALLOC_NONE=4;Module.ALLOC_NORMAL=ALLOC_NORMAL,Module.ALLOC_STACK=ALLOC_STACK,Module.ALLOC_STATIC=ALLOC_STATIC,Module.ALLOC_DYNAMIC=ALLOC_DYNAMIC,Module.ALLOC_NONE=ALLOC_NONE;function allocate(t,e,r,o){var a,n;typeof t=="number"?(a=!0,n=t):(a=!1,n=t.length);var u=typeof e=="string"?e:null,A;if(r==ALLOC_NONE?A=o:A=[typeof _malloc=="function"?_malloc:Runtime.staticAlloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][r===void 0?ALLOC_STATIC:r](Math.max(n,u?1:e.length)),a){var o=A,p;for(assert((A&3)==0),p=A+(n&-4);o>2]=0;for(p=A+n;o>0]=0;return A}if(u==="i8")return t.subarray||t.slice?HEAPU8.set(t,A):HEAPU8.set(new Uint8Array(t),A),A;for(var h=0,E,I,v;h>0],r|=o,!(o==0&&!e||(a++,e&&a==e)););e||(e=a);var n="";if(r<128){for(var u=1024,A;e>0;)A=String.fromCharCode.apply(String,HEAPU8.subarray(t,t+Math.min(e,u))),n=n?n+A:A,t+=u,e-=u;return n}return Module.UTF8ToString(t)}Module.Pointer_stringify=Pointer_stringify;function AsciiToString(t){for(var e="";;){var r=HEAP8[t++>>0];if(!r)return e;e+=String.fromCharCode(r)}}Module.AsciiToString=AsciiToString;function stringToAscii(t,e){return writeAsciiToMemory(t,e,!1)}Module.stringToAscii=stringToAscii;var UTF8Decoder=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function UTF8ArrayToString(t,e){for(var r=e;t[r];)++r;if(r-e>16&&t.subarray&&UTF8Decoder)return UTF8Decoder.decode(t.subarray(e,r));for(var o,a,n,u,A,p,h="";;){if(o=t[e++],!o)return h;if(!(o&128)){h+=String.fromCharCode(o);continue}if(a=t[e++]&63,(o&224)==192){h+=String.fromCharCode((o&31)<<6|a);continue}if(n=t[e++]&63,(o&240)==224?o=(o&15)<<12|a<<6|n:(u=t[e++]&63,(o&248)==240?o=(o&7)<<18|a<<12|n<<6|u:(A=t[e++]&63,(o&252)==248?o=(o&3)<<24|a<<18|n<<12|u<<6|A:(p=t[e++]&63,o=(o&1)<<30|a<<24|n<<18|u<<12|A<<6|p))),o<65536)h+=String.fromCharCode(o);else{var E=o-65536;h+=String.fromCharCode(55296|E>>10,56320|E&1023)}}}Module.UTF8ArrayToString=UTF8ArrayToString;function UTF8ToString(t){return UTF8ArrayToString(HEAPU8,t)}Module.UTF8ToString=UTF8ToString;function stringToUTF8Array(t,e,r,o){if(!(o>0))return 0;for(var a=r,n=r+o-1,u=0;u=55296&&A<=57343&&(A=65536+((A&1023)<<10)|t.charCodeAt(++u)&1023),A<=127){if(r>=n)break;e[r++]=A}else if(A<=2047){if(r+1>=n)break;e[r++]=192|A>>6,e[r++]=128|A&63}else if(A<=65535){if(r+2>=n)break;e[r++]=224|A>>12,e[r++]=128|A>>6&63,e[r++]=128|A&63}else if(A<=2097151){if(r+3>=n)break;e[r++]=240|A>>18,e[r++]=128|A>>12&63,e[r++]=128|A>>6&63,e[r++]=128|A&63}else if(A<=67108863){if(r+4>=n)break;e[r++]=248|A>>24,e[r++]=128|A>>18&63,e[r++]=128|A>>12&63,e[r++]=128|A>>6&63,e[r++]=128|A&63}else{if(r+5>=n)break;e[r++]=252|A>>30,e[r++]=128|A>>24&63,e[r++]=128|A>>18&63,e[r++]=128|A>>12&63,e[r++]=128|A>>6&63,e[r++]=128|A&63}}return e[r]=0,r-a}Module.stringToUTF8Array=stringToUTF8Array;function stringToUTF8(t,e,r){return stringToUTF8Array(t,HEAPU8,e,r)}Module.stringToUTF8=stringToUTF8;function lengthBytesUTF8(t){for(var e=0,r=0;r=55296&&o<=57343&&(o=65536+((o&1023)<<10)|t.charCodeAt(++r)&1023),o<=127?++e:o<=2047?e+=2:o<=65535?e+=3:o<=2097151?e+=4:o<=67108863?e+=5:e+=6}return e}Module.lengthBytesUTF8=lengthBytesUTF8;var UTF16Decoder=typeof TextDecoder<"u"?new TextDecoder("utf-16le"):void 0;function demangle(t){var e=Module.___cxa_demangle||Module.__cxa_demangle;if(e){try{var r=t.substr(1),o=lengthBytesUTF8(r)+1,a=_malloc(o);stringToUTF8(r,a,o);var n=_malloc(4),u=e(a,0,0,n);if(getValue(n,"i32")===0&&u)return Pointer_stringify(u)}catch{}finally{a&&_free(a),n&&_free(n),u&&_free(u)}return t}return Runtime.warnOnce("warning: build with -s DEMANGLE_SUPPORT=1 to link in libcxxabi demangling"),t}function demangleAll(t){var e=/__Z[\w\d_]+/g;return t.replace(e,function(r){var o=demangle(r);return r===o?r:r+" ["+o+"]"})}function jsStackTrace(){var t=new Error;if(!t.stack){try{throw new Error(0)}catch(e){t=e}if(!t.stack)return"(no stack trace available)"}return t.stack.toString()}function stackTrace(){var t=jsStackTrace();return Module.extraStackTrace&&(t+=` `+Module.extraStackTrace()),demangleAll(t)}Module.stackTrace=stackTrace;var HEAP,buffer,HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;function updateGlobalBufferViews(){Module.HEAP8=HEAP8=new Int8Array(buffer),Module.HEAP16=HEAP16=new Int16Array(buffer),Module.HEAP32=HEAP32=new Int32Array(buffer),Module.HEAPU8=HEAPU8=new Uint8Array(buffer),Module.HEAPU16=HEAPU16=new Uint16Array(buffer),Module.HEAPU32=HEAPU32=new Uint32Array(buffer),Module.HEAPF32=HEAPF32=new Float32Array(buffer),Module.HEAPF64=HEAPF64=new Float64Array(buffer)}var STATIC_BASE,STATICTOP,staticSealed,STACK_BASE,STACKTOP,STACK_MAX,DYNAMIC_BASE,DYNAMICTOP_PTR;STATIC_BASE=STATICTOP=STACK_BASE=STACKTOP=STACK_MAX=DYNAMIC_BASE=DYNAMICTOP_PTR=0,staticSealed=!1;function abortOnCannotGrowMemory(){abort("Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value "+TOTAL_MEMORY+", (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime but prevents some optimizations, (3) set Module.TOTAL_MEMORY to a higher value before the program runs, or (4) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0 ")}function enlargeMemory(){abortOnCannotGrowMemory()}var TOTAL_STACK=Module.TOTAL_STACK||5242880,TOTAL_MEMORY=Module.TOTAL_MEMORY||134217728;TOTAL_MEMORY0;){var e=t.shift();if(typeof e=="function"){e();continue}var r=e.func;typeof r=="number"?e.arg===void 0?Module.dynCall_v(r):Module.dynCall_vi(r,e.arg):r(e.arg===void 0?null:e.arg)}}var __ATPRERUN__=[],__ATINIT__=[],__ATMAIN__=[],__ATEXIT__=[],__ATPOSTRUN__=[],runtimeInitialized=!1,runtimeExited=!1;function preRun(){if(Module.preRun)for(typeof Module.preRun=="function"&&(Module.preRun=[Module.preRun]);Module.preRun.length;)addOnPreRun(Module.preRun.shift());callRuntimeCallbacks(__ATPRERUN__)}function ensureInitRuntime(){runtimeInitialized||(runtimeInitialized=!0,callRuntimeCallbacks(__ATINIT__))}function preMain(){callRuntimeCallbacks(__ATMAIN__)}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__),runtimeExited=!0}function postRun(){if(Module.postRun)for(typeof Module.postRun=="function"&&(Module.postRun=[Module.postRun]);Module.postRun.length;)addOnPostRun(Module.postRun.shift());callRuntimeCallbacks(__ATPOSTRUN__)}function addOnPreRun(t){__ATPRERUN__.unshift(t)}Module.addOnPreRun=addOnPreRun;function addOnInit(t){__ATINIT__.unshift(t)}Module.addOnInit=addOnInit;function addOnPreMain(t){__ATMAIN__.unshift(t)}Module.addOnPreMain=addOnPreMain;function addOnExit(t){__ATEXIT__.unshift(t)}Module.addOnExit=addOnExit;function addOnPostRun(t){__ATPOSTRUN__.unshift(t)}Module.addOnPostRun=addOnPostRun;function intArrayFromString(t,e,r){var o=r>0?r:lengthBytesUTF8(t)+1,a=new Array(o),n=stringToUTF8Array(t,a,0,a.length);return e&&(a.length=n),a}Module.intArrayFromString=intArrayFromString;function intArrayToString(t){for(var e=[],r=0;r255&&(o&=255),e.push(String.fromCharCode(o))}return e.join("")}Module.intArrayToString=intArrayToString;function writeStringToMemory(t,e,r){Runtime.warnOnce("writeStringToMemory is deprecated and should not be called! Use stringToUTF8() instead!");var o,a;r&&(a=e+lengthBytesUTF8(t),o=HEAP8[a]),stringToUTF8(t,e,1/0),r&&(HEAP8[a]=o)}Module.writeStringToMemory=writeStringToMemory;function writeArrayToMemory(t,e){HEAP8.set(t,e)}Module.writeArrayToMemory=writeArrayToMemory;function writeAsciiToMemory(t,e,r){for(var o=0;o>0]=t.charCodeAt(o);r||(HEAP8[e>>0]=0)}if(Module.writeAsciiToMemory=writeAsciiToMemory,(!Math.imul||Math.imul(4294967295,5)!==-5)&&(Math.imul=function t(e,r){var o=e>>>16,a=e&65535,n=r>>>16,u=r&65535;return a*u+(o*u+a*n<<16)|0}),Math.imul=Math.imul,!Math.fround){var froundBuffer=new Float32Array(1);Math.fround=function(t){return froundBuffer[0]=t,froundBuffer[0]}}Math.fround=Math.fround,Math.clz32||(Math.clz32=function(t){t=t>>>0;for(var e=0;e<32;e++)if(t&1<<31-e)return e;return 32}),Math.clz32=Math.clz32,Math.trunc||(Math.trunc=function(t){return t<0?Math.ceil(t):Math.floor(t)}),Math.trunc=Math.trunc;var Math_abs=Math.abs,Math_cos=Math.cos,Math_sin=Math.sin,Math_tan=Math.tan,Math_acos=Math.acos,Math_asin=Math.asin,Math_atan=Math.atan,Math_atan2=Math.atan2,Math_exp=Math.exp,Math_log=Math.log,Math_sqrt=Math.sqrt,Math_ceil=Math.ceil,Math_floor=Math.floor,Math_pow=Math.pow,Math_imul=Math.imul,Math_fround=Math.fround,Math_round=Math.round,Math_min=Math.min,Math_clz32=Math.clz32,Math_trunc=Math.trunc,runDependencies=0,runDependencyWatcher=null,dependenciesFulfilled=null;function getUniqueRunDependency(t){return t}function addRunDependency(t){runDependencies++,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies)}Module.addRunDependency=addRunDependency;function removeRunDependency(t){if(runDependencies--,Module.monitorRunDependencies&&Module.monitorRunDependencies(runDependencies),runDependencies==0&&(runDependencyWatcher!==null&&(clearInterval(runDependencyWatcher),runDependencyWatcher=null),dependenciesFulfilled)){var e=dependenciesFulfilled;dependenciesFulfilled=null,e()}}Module.removeRunDependency=removeRunDependency,Module.preloadedImages={},Module.preloadedAudios={};var ASM_CONSTS=[function(t,e,r,o,a,n,u,A){return _nbind.callbackSignatureList[t].apply(this,arguments)}];function _emscripten_asm_const_iiiiiiii(t,e,r,o,a,n,u,A){return ASM_CONSTS[t](e,r,o,a,n,u,A)}function _emscripten_asm_const_iiiii(t,e,r,o,a){return ASM_CONSTS[t](e,r,o,a)}function _emscripten_asm_const_iiidddddd(t,e,r,o,a,n,u,A,p){return ASM_CONSTS[t](e,r,o,a,n,u,A,p)}function _emscripten_asm_const_iiididi(t,e,r,o,a,n,u){return ASM_CONSTS[t](e,r,o,a,n,u)}function _emscripten_asm_const_iiii(t,e,r,o){return ASM_CONSTS[t](e,r,o)}function _emscripten_asm_const_iiiid(t,e,r,o,a){return ASM_CONSTS[t](e,r,o,a)}function _emscripten_asm_const_iiiiii(t,e,r,o,a,n){return ASM_CONSTS[t](e,r,o,a,n)}STATIC_BASE=Runtime.GLOBAL_BASE,STATICTOP=STATIC_BASE+12800,__ATINIT__.push({func:function(){__GLOBAL__sub_I_Yoga_cpp()}},{func:function(){__GLOBAL__sub_I_nbind_cc()}},{func:function(){__GLOBAL__sub_I_common_cc()}},{func:function(){__GLOBAL__sub_I_Binding_cc()}}),allocate([0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,192,127,0,0,192,127,3,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,0,0,0,0,0,0,192,127,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,192,127,0,0,192,127,0,0,0,0,0,0,0,0,255,255,255,255,255,255,255,255,0,0,128,191,0,0,128,191,0,0,192,127,0,0,0,0,0,0,0,0,0,0,128,63,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,3,0,0,0,1,0,0,0,2,0,0,0,0,0,0,0,190,12,0,0,200,12,0,0,208,12,0,0,216,12,0,0,230,12,0,0,242,12,0,0,1,0,0,0,3,0,0,0,0,0,0,0,2,0,0,0,0,0,192,127,3,0,0,0,180,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,182,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,1,0,0,0,4,0,0,0,183,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,181,45,0,0,184,45,0,0,185,45,0,0,181,45,0,0,181,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,148,4,0,0,3,0,0,0,187,45,0,0,164,4,0,0,188,45,0,0,2,0,0,0,189,45,0,0,164,4,0,0,188,45,0,0,185,45,0,0,164,4,0,0,185,45,0,0,164,4,0,0,188,45,0,0,181,45,0,0,182,45,0,0,181,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,5,0,0,0,6,0,0,0,1,0,0,0,7,0,0,0,183,45,0,0,182,45,0,0,181,45,0,0,190,45,0,0,190,45,0,0,182,45,0,0,182,45,0,0,185,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,181,45,0,0,185,45,0,0,182,45,0,0,185,45,0,0,48,5,0,0,3,0,0,0,56,5,0,0,1,0,0,0,189,45,0,0,185,45,0,0,164,4,0,0,76,5,0,0,2,0,0,0,191,45,0,0,186,45,0,0,182,45,0,0,185,45,0,0,192,45,0,0,185,45,0,0,182,45,0,0,186,45,0,0,185,45,0,0,76,5,0,0,76,5,0,0,136,5,0,0,182,45,0,0,181,45,0,0,2,0,0,0,190,45,0,0,136,5,0,0,56,19,0,0,156,5,0,0,2,0,0,0,184,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,8,0,0,0,9,0,0,0,1,0,0,0,10,0,0,0,204,5,0,0,181,45,0,0,181,45,0,0,2,0,0,0,180,45,0,0,204,5,0,0,2,0,0,0,195,45,0,0,236,5,0,0,97,19,0,0,198,45,0,0,211,45,0,0,212,45,0,0,213,45,0,0,214,45,0,0,215,45,0,0,188,45,0,0,182,45,0,0,216,45,0,0,217,45,0,0,218,45,0,0,219,45,0,0,192,45,0,0,181,45,0,0,0,0,0,0,185,45,0,0,110,19,0,0,186,45,0,0,115,19,0,0,221,45,0,0,120,19,0,0,148,4,0,0,132,19,0,0,96,6,0,0,145,19,0,0,222,45,0,0,164,19,0,0,223,45,0,0,173,19,0,0,0,0,0,0,3,0,0,0,104,6,0,0,1,0,0,0,187,45,0,0,0,0,0,0,0,0,0,0,1,0,0,0,11,0,0,0,12,0,0,0,1,0,0,0,13,0,0,0,185,45,0,0,224,45,0,0,164,6,0,0,188,45,0,0,172,6,0,0,180,6,0,0,2,0,0,0,188,6,0,0,7,0,0,0,224,45,0,0,7,0,0,0,164,6,0,0,1,0,0,0,213,45,0,0,185,45,0,0,224,45,0,0,172,6,0,0,185,45,0,0,224,45,0,0,164,6,0,0,185,45,0,0,224,45,0,0,211,45,0,0,211,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,222,45,0,0,211,45,0,0,224,45,0,0,172,6,0,0,222,45,0,0,211,45,0,0,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0,0,0,0,0,0,0,0,28,9,0,0,5,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,2,0,0,0,242,45,0,0,0,4,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,110,111,100,101,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,119,104,105,99,104,32,115,116,105,108,108,32,104,97,115,32,99,104,105,108,100,114,101,110,32,97,116,116,97,99,104,101,100,0,67,97,110,110,111,116,32,114,101,115,101,116,32,97,32,110,111,100,101,32,115,116,105,108,108,32,97,116,116,97,99,104,101,100,32,116,111,32,97,32,112,97,114,101,110,116,0,67,111,117,108,100,32,110,111,116,32,97,108,108,111,99,97,116,101,32,109,101,109,111,114,121,32,102,111,114,32,99,111,110,102,105,103,0,67,97,110,110,111,116,32,115,101,116,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,67,104,105,108,100,32,97,108,114,101,97,100,121,32,104,97,115,32,97,32,112,97,114,101,110,116,44,32,105,116,32,109,117,115,116,32,98,101,32,114,101,109,111,118,101,100,32,102,105,114,115,116,46,0,67,97,110,110,111,116,32,97,100,100,32,99,104,105,108,100,58,32,78,111,100,101,115,32,119,105,116,104,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,32,99,97,110,110,111,116,32,104,97,118,101,32,99,104,105,108,100,114,101,110,46,0,79,110,108,121,32,108,101,97,102,32,110,111,100,101,115,32,119,105,116,104,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,115,115,104,111,117,108,100,32,109,97,110,117,97,108,108,121,32,109,97,114,107,32,116,104,101,109,115,101,108,118,101,115,32,97,115,32,100,105,114,116,121,0,67,97,110,110,111,116,32,103,101,116,32,108,97,121,111,117,116,32,112,114,111,112,101,114,116,105,101,115,32,111,102,32,109,117,108,116,105,45,101,100,103,101,32,115,104,111,114,116,104,97,110,100,115,0,37,115,37,100,46,123,91,115,107,105,112,112,101,100,93,32,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,61,62,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,37,115,37,100,46,123,37,115,0,42,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,97,119,58,32,37,102,32,97,104,58,32,37,102,32,37,115,10,0,37,115,37,100,46,125,37,115,0,119,109,58,32,37,115,44,32,104,109,58,32,37,115,44,32,100,58,32,40,37,102,44,32,37,102,41,32,37,115,10,0,79,117,116,32,111,102,32,99,97,99,104,101,32,101,110,116,114,105,101,115,33,10,0,83,99,97,108,101,32,102,97,99,116,111,114,32,115,104,111,117,108,100,32,110,111,116,32,98,101,32,108,101,115,115,32,116,104,97,110,32,122,101,114,111,0,105,110,105,116,105,97,108,0,37,115,10,0,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,0,85,78,68,69,70,73,78,69,68,0,69,88,65,67,84,76,89,0,65,84,95,77,79,83,84,0,76,65,89,95,85,78,68,69,70,73,78,69,68,0,76,65,89,95,69,88,65,67,84,76,89,0,76,65,89,95,65,84,95,77,79,83,84,0,97,118,97,105,108,97,98,108,101,87,105,100,116,104,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,119,105,100,116,104,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,97,118,97,105,108,97,98,108,101,72,101,105,103,104,116,32,105,115,32,105,110,100,101,102,105,110,105,116,101,32,115,111,32,104,101,105,103,104,116,77,101,97,115,117,114,101,77,111,100,101,32,109,117,115,116,32,98,101,32,89,71,77,101,97,115,117,114,101,77,111,100,101,85,110,100,101,102,105,110,101,100,0,102,108,101,120,0,115,116,114,101,116,99,104,0,109,117,108,116,105,108,105,110,101,45,115,116,114,101,116,99,104,0,69,120,112,101,99,116,101,100,32,110,111,100,101,32,116,111,32,104,97,118,101,32,99,117,115,116,111,109,32,109,101,97,115,117,114,101,32,102,117,110,99,116,105,111,110,0,109,101,97,115,117,114,101,0,69,120,112,101,99,116,32,99,117,115,116,111,109,32,98,97,115,101,108,105,110,101,32,102,117,110,99,116,105,111,110,32,116,111,32,110,111,116,32,114,101,116,117,114,110,32,78,97,78,0,97,98,115,45,109,101,97,115,117,114,101,0,97,98,115,45,108,97,121,111,117,116,0,78,111,100,101,0,99,114,101,97,116,101,68,101,102,97,117,108,116,0,99,114,101,97,116,101,87,105,116,104,67,111,110,102,105,103,0,100,101,115,116,114,111,121,0,114,101,115,101,116,0,99,111,112,121,83,116,121,108,101,0,115,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,115,101,116,80,111,115,105,116,105,111,110,0,115,101,116,80,111,115,105,116,105,111,110,80,101,114,99,101,110,116,0,115,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,115,101,116,65,108,105,103,110,73,116,101,109,115,0,115,101,116,65,108,105,103,110,83,101,108,102,0,115,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,115,101,116,70,108,101,120,87,114,97,112,0,115,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,115,101,116,77,97,114,103,105,110,0,115,101,116,77,97,114,103,105,110,80,101,114,99,101,110,116,0,115,101,116,77,97,114,103,105,110,65,117,116,111,0,115,101,116,79,118,101,114,102,108,111,119,0,115,101,116,68,105,115,112,108,97,121,0,115,101,116,70,108,101,120,0,115,101,116,70,108,101,120,66,97,115,105,115,0,115,101,116,70,108,101,120,66,97,115,105,115,80,101,114,99,101,110,116,0,115,101,116,70,108,101,120,71,114,111,119,0,115,101,116,70,108,101,120,83,104,114,105,110,107,0,115,101,116,87,105,100,116,104,0,115,101,116,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,87,105,100,116,104,65,117,116,111,0,115,101,116,72,101,105,103,104,116,0,115,101,116,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,72,101,105,103,104,116,65,117,116,111,0,115,101,116,77,105,110,87,105,100,116,104,0,115,101,116,77,105,110,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,105,110,72,101,105,103,104,116,0,115,101,116,77,105,110,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,77,97,120,87,105,100,116,104,0,115,101,116,77,97,120,87,105,100,116,104,80,101,114,99,101,110,116,0,115,101,116,77,97,120,72,101,105,103,104,116,0,115,101,116,77,97,120,72,101,105,103,104,116,80,101,114,99,101,110,116,0,115,101,116,65,115,112,101,99,116,82,97,116,105,111,0,115,101,116,66,111,114,100,101,114,0,115,101,116,80,97,100,100,105,110,103,0,115,101,116,80,97,100,100,105,110,103,80,101,114,99,101,110,116,0,103,101,116,80,111,115,105,116,105,111,110,84,121,112,101,0,103,101,116,80,111,115,105,116,105,111,110,0,103,101,116,65,108,105,103,110,67,111,110,116,101,110,116,0,103,101,116,65,108,105,103,110,73,116,101,109,115,0,103,101,116,65,108,105,103,110,83,101,108,102,0,103,101,116,70,108,101,120,68,105,114,101,99,116,105,111,110,0,103,101,116,70,108,101,120,87,114,97,112,0,103,101,116,74,117,115,116,105,102,121,67,111,110,116,101,110,116,0,103,101,116,77,97,114,103,105,110,0,103,101,116,70,108,101,120,66,97,115,105,115,0,103,101,116,70,108,101,120,71,114,111,119,0,103,101,116,70,108,101,120,83,104,114,105,110,107,0,103,101,116,87,105,100,116,104,0,103,101,116,72,101,105,103,104,116,0,103,101,116,77,105,110,87,105,100,116,104,0,103,101,116,77,105,110,72,101,105,103,104,116,0,103,101,116,77,97,120,87,105,100,116,104,0,103,101,116,77,97,120,72,101,105,103,104,116,0,103,101,116,65,115,112,101,99,116,82,97,116,105,111,0,103,101,116,66,111,114,100,101,114,0,103,101,116,79,118,101,114,102,108,111,119,0,103,101,116,68,105,115,112,108,97,121,0,103,101,116,80,97,100,100,105,110,103,0,105,110,115,101,114,116,67,104,105,108,100,0,114,101,109,111,118,101,67,104,105,108,100,0,103,101,116,67,104,105,108,100,67,111,117,110,116,0,103,101,116,80,97,114,101,110,116,0,103,101,116,67,104,105,108,100,0,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,117,110,115,101,116,77,101,97,115,117,114,101,70,117,110,99,0,109,97,114,107,68,105,114,116,121,0,105,115,68,105,114,116,121,0,99,97,108,99,117,108,97,116,101,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,76,101,102,116,0,103,101,116,67,111,109,112,117,116,101,100,82,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,84,111,112,0,103,101,116,67,111,109,112,117,116,101,100,66,111,116,116,111,109,0,103,101,116,67,111,109,112,117,116,101,100,87,105,100,116,104,0,103,101,116,67,111,109,112,117,116,101,100,72,101,105,103,104,116,0,103,101,116,67,111,109,112,117,116,101,100,76,97,121,111,117,116,0,103,101,116,67,111,109,112,117,116,101,100,77,97,114,103,105,110,0,103,101,116,67,111,109,112,117,116,101,100,66,111,114,100,101,114,0,103,101,116,67,111,109,112,117,116,101,100,80,97,100,100,105,110,103,0,67,111,110,102,105,103,0,99,114,101,97,116,101,0,115,101,116,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,115,101,116,80,111,105,110,116,83,99,97,108,101,70,97,99,116,111,114,0,105,115,69,120,112,101,114,105,109,101,110,116,97,108,70,101,97,116,117,114,101,69,110,97,98,108,101,100,0,86,97,108,117,101,0,76,97,121,111,117,116,0,83,105,122,101,0,103,101,116,73,110,115,116,97,110,99,101,67,111,117,110,116,0,73,110,116,54,52,0,1,1,1,2,2,4,4,4,4,8,8,4,8,118,111,105,100,0,98,111,111,108,0,115,116,100,58,58,115,116,114,105,110,103,0,99,98,70,117,110,99,116,105,111,110,32,38,0,99,111,110,115,116,32,99,98,70,117,110,99,116,105,111,110,32,38,0,69,120,116,101,114,110,97,108,0,66,117,102,102,101,114,0,78,66,105,110,100,73,68,0,78,66,105,110,100,0,98,105,110,100,95,118,97,108,117,101,0,114,101,102,108,101,99,116,0,113,117,101,114,121,84,121,112,101,0,108,97,108,108,111,99,0,108,114,101,115,101,116,0,123,114,101,116,117,114,110,40,95,110,98,105,110,100,46,99,97,108,108,98,97,99,107,83,105,103,110,97,116,117,114,101,76,105,115,116,91,36,48,93,46,97,112,112,108,121,40,116,104,105,115,44,97,114,103,117,109,101,110,116,115,41,41,59,125,0,95,110,98,105,110,100,95,110,101,119,0,17,0,10,0,17,17,17,0,0,0,0,5,0,0,0,0,0,0,9,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,15,10,17,17,17,3,10,7,0,1,19,9,11,11,0,0,9,6,11,0,0,11,0,6,17,0,0,0,17,17,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,17,0,10,10,17,17,17,0,10,0,0,2,0,9,11,0,0,0,9,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,13,0,0,0,4,13,0,0,0,0,9,14,0,0,0,0,0,14,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,15,0,0,0,0,15,0,0,0,0,9,16,0,0,0,0,0,16,0,0,16,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,18,0,0,0,18,18,18,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,0,0,0,0,0,0,0,0,0,0,0,10,0,0,0,0,10,0,0,0,0,9,11,0,0,0,0,0,11,0,0,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,12,0,0,0,0,12,0,0,0,0,9,12,0,0,0,0,0,12,0,0,12,0,0,45,43,32,32,32,48,88,48,120,0,40,110,117,108,108,41,0,45,48,88,43,48,88,32,48,88,45,48,120,43,48,120,32,48,120,0,105,110,102,0,73,78,70,0,110,97,110,0,78,65,78,0,48,49,50,51,52,53,54,55,56,57,65,66,67,68,69,70,46,0,84,33,34,25,13,1,2,3,17,75,28,12,16,4,11,29,18,30,39,104,110,111,112,113,98,32,5,6,15,19,20,21,26,8,22,7,40,36,23,24,9,10,14,27,31,37,35,131,130,125,38,42,43,60,61,62,63,67,71,74,77,88,89,90,91,92,93,94,95,96,97,99,100,101,102,103,105,106,107,108,114,115,116,121,122,123,124,0,73,108,108,101,103,97,108,32,98,121,116,101,32,115,101,113,117,101,110,99,101,0,68,111,109,97,105,110,32,101,114,114,111,114,0,82,101,115,117,108,116,32,110,111,116,32,114,101,112,114,101,115,101,110,116,97,98,108,101,0,78,111,116,32,97,32,116,116,121,0,80,101,114,109,105,115,115,105,111,110,32,100,101,110,105,101,100,0,79,112,101,114,97,116,105,111,110,32,110,111,116,32,112,101,114,109,105,116,116,101,100,0,78,111,32,115,117,99,104,32,102,105,108,101,32,111,114,32,100,105,114,101,99,116,111,114,121,0,78,111,32,115,117,99,104,32,112,114,111,99,101,115,115,0,70,105,108,101,32,101,120,105,115,116,115,0,86,97,108,117,101,32,116,111,111,32,108,97,114,103,101,32,102,111,114,32,100,97,116,97,32,116,121,112,101,0,78,111,32,115,112,97,99,101,32,108,101,102,116,32,111,110,32,100,101,118,105,99,101,0,79,117,116,32,111,102,32,109,101,109,111,114,121,0,82,101,115,111,117,114,99,101,32,98,117,115,121,0,73,110,116,101,114,114,117,112,116,101,100,32,115,121,115,116,101,109,32,99,97,108,108,0,82,101,115,111,117,114,99,101,32,116,101,109,112,111,114,97,114,105,108,121,32,117,110,97,118,97,105,108,97,98,108,101,0,73,110,118,97,108,105,100,32,115,101,101,107,0,67,114,111,115,115,45,100,101,118,105,99,101,32,108,105,110,107,0,82,101,97,100,45,111,110,108,121,32,102,105,108,101,32,115,121,115,116,101,109,0,68,105,114,101,99,116,111,114,121,32,110,111,116,32,101,109,112,116,121,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,112,101,101,114,0,79,112,101,114,97,116,105,111,110,32,116,105,109,101,100,32,111,117,116,0,67,111,110,110,101,99,116,105,111,110,32,114,101,102,117,115,101,100,0,72,111,115,116,32,105,115,32,100,111,119,110,0,72,111,115,116,32,105,115,32,117,110,114,101,97,99,104,97,98,108,101,0,65,100,100,114,101,115,115,32,105,110,32,117,115,101,0,66,114,111,107,101,110,32,112,105,112,101,0,73,47,79,32,101,114,114,111,114,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,32,111,114,32,97,100,100,114,101,115,115,0,66,108,111,99,107,32,100,101,118,105,99,101,32,114,101,113,117,105,114,101,100,0,78,111,32,115,117,99,104,32,100,101,118,105,99,101,0,78,111,116,32,97,32,100,105,114,101,99,116,111,114,121,0,73,115,32,97,32,100,105,114,101,99,116,111,114,121,0,84,101,120,116,32,102,105,108,101,32,98,117,115,121,0,69,120,101,99,32,102,111,114,109,97,116,32,101,114,114,111,114,0,73,110,118,97,108,105,100,32,97,114,103,117,109,101,110,116,0,65,114,103,117,109,101,110,116,32,108,105,115,116,32,116,111,111,32,108,111,110,103,0,83,121,109,98,111,108,105,99,32,108,105,110,107,32,108,111,111,112,0,70,105,108,101,110,97,109,101,32,116,111,111,32,108,111,110,103,0,84,111,111,32,109,97,110,121,32,111,112,101,110,32,102,105,108,101,115,32,105,110,32,115,121,115,116,101,109,0,78,111,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,115,32,97,118,97,105,108,97,98,108,101,0,66,97,100,32,102,105,108,101,32,100,101,115,99,114,105,112,116,111,114,0,78,111,32,99,104,105,108,100,32,112,114,111,99,101,115,115,0,66,97,100,32,97,100,100,114,101,115,115,0,70,105,108,101,32,116,111,111,32,108,97,114,103,101,0,84,111,111,32,109,97,110,121,32,108,105,110,107,115,0,78,111,32,108,111,99,107,115,32,97,118,97,105,108,97,98,108,101,0,82,101,115,111,117,114,99,101,32,100,101,97,100,108,111,99,107,32,119,111,117,108,100,32,111,99,99,117,114,0,83,116,97,116,101,32,110,111,116,32,114,101,99,111,118,101,114,97,98,108,101,0,80,114,101,118,105,111,117,115,32,111,119,110,101,114,32,100,105,101,100,0,79,112,101,114,97,116,105,111,110,32,99,97,110,99,101,108,101,100,0,70,117,110,99,116,105,111,110,32,110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,0,78,111,32,109,101,115,115,97,103,101,32,111,102,32,100,101,115,105,114,101,100,32,116,121,112,101,0,73,100,101,110,116,105,102,105,101,114,32,114,101,109,111,118,101,100,0,68,101,118,105,99,101,32,110,111,116,32,97,32,115,116,114,101,97,109,0,78,111,32,100,97,116,97,32,97,118,97,105,108,97,98,108,101,0,68,101,118,105,99,101,32,116,105,109,101,111,117,116,0,79,117,116,32,111,102,32,115,116,114,101,97,109,115,32,114,101,115,111,117,114,99,101,115,0,76,105,110,107,32,104,97,115,32,98,101,101,110,32,115,101,118,101,114,101,100,0,80,114,111,116,111,99,111,108,32,101,114,114,111,114,0,66,97,100,32,109,101,115,115,97,103,101,0,70,105,108,101,32,100,101,115,99,114,105,112,116,111,114,32,105,110,32,98,97,100,32,115,116,97,116,101,0,78,111,116,32,97,32,115,111,99,107,101,116,0,68,101,115,116,105,110,97,116,105,111,110,32,97,100,100,114,101,115,115,32,114,101,113,117,105,114,101,100,0,77,101,115,115,97,103,101,32,116,111,111,32,108,97,114,103,101,0,80,114,111,116,111,99,111,108,32,119,114,111,110,103,32,116,121,112,101,32,102,111,114,32,115,111,99,107,101,116,0,80,114,111,116,111,99,111,108,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,80,114,111,116,111,99,111,108,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,83,111,99,107,101,116,32,116,121,112,101,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,78,111,116,32,115,117,112,112,111,114,116,101,100,0,80,114,111,116,111,99,111,108,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,0,65,100,100,114,101,115,115,32,102,97,109,105,108,121,32,110,111,116,32,115,117,112,112,111,114,116,101,100,32,98,121,32,112,114,111,116,111,99,111,108,0,65,100,100,114,101,115,115,32,110,111,116,32,97,118,97,105,108,97,98,108,101,0,78,101,116,119,111,114,107,32,105,115,32,100,111,119,110,0,78,101,116,119,111,114,107,32,117,110,114,101,97,99,104,97,98,108,101,0,67,111,110,110,101,99,116,105,111,110,32,114,101,115,101,116,32,98,121,32,110,101,116,119,111,114,107,0,67,111,110,110,101,99,116,105,111,110,32,97,98,111,114,116,101,100,0,78,111,32,98,117,102,102,101,114,32,115,112,97,99,101,32,97,118,97,105,108,97,98,108,101,0,83,111,99,107,101,116,32,105,115,32,99,111,110,110,101,99,116,101,100,0,83,111,99,107,101,116,32,110,111,116,32,99,111,110,110,101,99,116,101,100,0,67,97,110,110,111,116,32,115,101,110,100,32,97,102,116,101,114,32,115,111,99,107,101,116,32,115,104,117,116,100,111,119,110,0,79,112,101,114,97,116,105,111,110,32,97,108,114,101,97,100,121,32,105,110,32,112,114,111,103,114,101,115,115,0,79,112,101,114,97,116,105,111,110,32,105,110,32,112,114,111,103,114,101,115,115,0,83,116,97,108,101,32,102,105,108,101,32,104,97,110,100,108,101,0,82,101,109,111,116,101,32,73,47,79,32,101,114,114,111,114,0,81,117,111,116,97,32,101,120,99,101,101,100,101,100,0,78,111,32,109,101,100,105,117,109,32,102,111,117,110,100,0,87,114,111,110,103,32,109,101,100,105,117,109,32,116,121,112,101,0,78,111,32,101,114,114,111,114,32,105,110,102,111,114,109,97,116,105,111,110,0,0],"i8",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=STATICTOP;STATICTOP+=16;function _atexit(t,e){__ATEXIT__.unshift({func:t,arg:e})}function ___cxa_atexit(){return _atexit.apply(null,arguments)}function _abort(){Module.abort()}function __ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj(){Module.printErr("missing function: _ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj"),abort(-1)}function __decorate(t,e,r,o){var a=arguments.length,n=a<3?e:o===null?o=Object.getOwnPropertyDescriptor(e,r):o,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")n=Reflect.decorate(t,e,r,o);else for(var A=t.length-1;A>=0;A--)(u=t[A])&&(n=(a<3?u(n):a>3?u(e,r,n):u(e,r))||n);return a>3&&n&&Object.defineProperty(e,r,n),n}function _defineHidden(t){return function(e,r){Object.defineProperty(e,r,{configurable:!1,enumerable:!1,value:t,writable:!0})}}var _nbind={};function __nbind_free_external(t){_nbind.externalList[t].dereference(t)}function __nbind_reference_external(t){_nbind.externalList[t].reference()}function _llvm_stackrestore(t){var e=_llvm_stacksave,r=e.LLVM_SAVEDSTACKS[t];e.LLVM_SAVEDSTACKS.splice(t,1),Runtime.stackRestore(r)}function __nbind_register_pool(t,e,r,o){_nbind.Pool.pageSize=t,_nbind.Pool.usedPtr=e/4,_nbind.Pool.rootPtr=r,_nbind.Pool.pagePtr=o/4,HEAP32[e/4]=16909060,HEAP8[e]==1&&(_nbind.bigEndian=!0),HEAP32[e/4]=0,_nbind.makeTypeKindTbl=(n={},n[1024]=_nbind.PrimitiveType,n[64]=_nbind.Int64Type,n[2048]=_nbind.BindClass,n[3072]=_nbind.BindClassPtr,n[4096]=_nbind.SharedClassPtr,n[5120]=_nbind.ArrayType,n[6144]=_nbind.ArrayType,n[7168]=_nbind.CStringType,n[9216]=_nbind.CallbackType,n[10240]=_nbind.BindType,n),_nbind.makeTypeNameTbl={Buffer:_nbind.BufferType,External:_nbind.ExternalType,Int64:_nbind.Int64Type,_nbind_new:_nbind.CreateValueType,bool:_nbind.BooleanType,"cbFunction &":_nbind.CallbackType,"const cbFunction &":_nbind.CallbackType,"const std::string &":_nbind.StringType,"std::string":_nbind.StringType},Module.toggleLightGC=_nbind.toggleLightGC,_nbind.callUpcast=Module.dynCall_ii;var a=_nbind.makeType(_nbind.constructType,{flags:2048,id:0,name:""});a.proto=Module,_nbind.BindClass.list.push(a);var n}function _emscripten_set_main_loop_timing(t,e){if(Browser.mainLoop.timingMode=t,Browser.mainLoop.timingValue=e,!Browser.mainLoop.func)return 1;if(t==0)Browser.mainLoop.scheduler=function(){var u=Math.max(0,Browser.mainLoop.tickStartTime+e-_emscripten_get_now())|0;setTimeout(Browser.mainLoop.runner,u)},Browser.mainLoop.method="timeout";else if(t==1)Browser.mainLoop.scheduler=function(){Browser.requestAnimationFrame(Browser.mainLoop.runner)},Browser.mainLoop.method="rAF";else if(t==2){if(!window.setImmediate){let n=function(u){u.source===window&&u.data===o&&(u.stopPropagation(),r.shift()())};var a=n,r=[],o="setimmediate";window.addEventListener("message",n,!0),window.setImmediate=function(A){r.push(A),ENVIRONMENT_IS_WORKER?(Module.setImmediates===void 0&&(Module.setImmediates=[]),Module.setImmediates.push(A),window.postMessage({target:o})):window.postMessage(o,"*")}}Browser.mainLoop.scheduler=function(){window.setImmediate(Browser.mainLoop.runner)},Browser.mainLoop.method="immediate"}return 0}function _emscripten_get_now(){abort()}function _emscripten_set_main_loop(t,e,r,o,a){Module.noExitRuntime=!0,assert(!Browser.mainLoop.func,"emscripten_set_main_loop: there can only be one main loop function at once: call emscripten_cancel_main_loop to cancel the previous one before setting a new one with different parameters."),Browser.mainLoop.func=t,Browser.mainLoop.arg=o;var n;typeof o<"u"?n=function(){Module.dynCall_vi(t,o)}:n=function(){Module.dynCall_v(t)};var u=Browser.mainLoop.currentlyRunningMainloop;if(Browser.mainLoop.runner=function(){if(!ABORT){if(Browser.mainLoop.queue.length>0){var p=Date.now(),h=Browser.mainLoop.queue.shift();if(h.func(h.arg),Browser.mainLoop.remainingBlockers){var E=Browser.mainLoop.remainingBlockers,I=E%1==0?E-1:Math.floor(E);h.counted?Browser.mainLoop.remainingBlockers=I:(I=I+.5,Browser.mainLoop.remainingBlockers=(8*E+I)/9)}if(console.log('main loop blocker "'+h.name+'" took '+(Date.now()-p)+" ms"),Browser.mainLoop.updateStatus(),u1&&Browser.mainLoop.currentFrameNumber%Browser.mainLoop.timingValue!=0){Browser.mainLoop.scheduler();return}else Browser.mainLoop.timingMode==0&&(Browser.mainLoop.tickStartTime=_emscripten_get_now());Browser.mainLoop.method==="timeout"&&Module.ctx&&(Module.printErr("Looks like you are rendering without using requestAnimationFrame for the main loop. You should use 0 for the frame rate in emscripten_set_main_loop in order to use requestAnimationFrame, as that can greatly improve your frame rates!"),Browser.mainLoop.method=""),Browser.mainLoop.runIter(n),!(u0?_emscripten_set_main_loop_timing(0,1e3/e):_emscripten_set_main_loop_timing(1,1),Browser.mainLoop.scheduler()),r)throw"SimulateInfiniteLoop"}var Browser={mainLoop:{scheduler:null,method:"",currentlyRunningMainloop:0,func:null,arg:0,timingMode:0,timingValue:0,currentFrameNumber:0,queue:[],pause:function(){Browser.mainLoop.scheduler=null,Browser.mainLoop.currentlyRunningMainloop++},resume:function(){Browser.mainLoop.currentlyRunningMainloop++;var t=Browser.mainLoop.timingMode,e=Browser.mainLoop.timingValue,r=Browser.mainLoop.func;Browser.mainLoop.func=null,_emscripten_set_main_loop(r,0,!1,Browser.mainLoop.arg,!0),_emscripten_set_main_loop_timing(t,e),Browser.mainLoop.scheduler()},updateStatus:function(){if(Module.setStatus){var t=Module.statusMessage||"Please wait...",e=Browser.mainLoop.remainingBlockers,r=Browser.mainLoop.expectedBlockers;e?e"u"&&(console.log("warning: Browser does not support creating object URLs. Built-in browser image decoding will not be available."),Module.noImageDecoding=!0);var t={};t.canHandle=function(n){return!Module.noImageDecoding&&/\.(jpg|jpeg|png|bmp)$/i.test(n)},t.handle=function(n,u,A,p){var h=null;if(Browser.hasBlobConstructor)try{h=new Blob([n],{type:Browser.getMimetype(u)}),h.size!==n.length&&(h=new Blob([new Uint8Array(n).buffer],{type:Browser.getMimetype(u)}))}catch(x){Runtime.warnOnce("Blob constructor present but fails: "+x+"; falling back to blob builder")}if(!h){var E=new Browser.BlobBuilder;E.append(new Uint8Array(n).buffer),h=E.getBlob()}var I=Browser.URLObject.createObjectURL(h),v=new Image;v.onload=function(){assert(v.complete,"Image "+u+" could not be decoded");var C=document.createElement("canvas");C.width=v.width,C.height=v.height;var R=C.getContext("2d");R.drawImage(v,0,0),Module.preloadedImages[u]=C,Browser.URLObject.revokeObjectURL(I),A&&A(n)},v.onerror=function(C){console.log("Image "+I+" could not be decoded"),p&&p()},v.src=I},Module.preloadPlugins.push(t);var e={};e.canHandle=function(n){return!Module.noAudioDecoding&&n.substr(-4)in{".ogg":1,".wav":1,".mp3":1}},e.handle=function(n,u,A,p){var h=!1;function E(R){h||(h=!0,Module.preloadedAudios[u]=R,A&&A(n))}function I(){h||(h=!0,Module.preloadedAudios[u]=new Audio,p&&p())}if(Browser.hasBlobConstructor){try{var v=new Blob([n],{type:Browser.getMimetype(u)})}catch{return I()}var x=Browser.URLObject.createObjectURL(v),C=new Audio;C.addEventListener("canplaythrough",function(){E(C)},!1),C.onerror=function(N){if(h)return;console.log("warning: browser could not fully decode audio "+u+", trying slower base64 approach");function U(V){for(var te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ae="=",fe="",ue=0,me=0,he=0;he=6;){var Be=ue>>me-6&63;me-=6,fe+=te[Be]}return me==2?(fe+=te[(ue&3)<<4],fe+=ae+ae):me==4&&(fe+=te[(ue&15)<<2],fe+=ae),fe}C.src="data:audio/x-"+u.substr(-3)+";base64,"+U(n),E(C)},C.src=x,Browser.safeSetTimeout(function(){E(C)},1e4)}else return I()},Module.preloadPlugins.push(e);function r(){Browser.pointerLock=document.pointerLockElement===Module.canvas||document.mozPointerLockElement===Module.canvas||document.webkitPointerLockElement===Module.canvas||document.msPointerLockElement===Module.canvas}var o=Module.canvas;o&&(o.requestPointerLock=o.requestPointerLock||o.mozRequestPointerLock||o.webkitRequestPointerLock||o.msRequestPointerLock||function(){},o.exitPointerLock=document.exitPointerLock||document.mozExitPointerLock||document.webkitExitPointerLock||document.msExitPointerLock||function(){},o.exitPointerLock=o.exitPointerLock.bind(document),document.addEventListener("pointerlockchange",r,!1),document.addEventListener("mozpointerlockchange",r,!1),document.addEventListener("webkitpointerlockchange",r,!1),document.addEventListener("mspointerlockchange",r,!1),Module.elementPointerLock&&o.addEventListener("click",function(a){!Browser.pointerLock&&Module.canvas.requestPointerLock&&(Module.canvas.requestPointerLock(),a.preventDefault())},!1))},createContext:function(t,e,r,o){if(e&&Module.ctx&&t==Module.canvas)return Module.ctx;var a,n;if(e){var u={antialias:!1,alpha:!1};if(o)for(var A in o)u[A]=o[A];n=GL.createContext(t,u),n&&(a=GL.getContext(n).GLctx)}else a=t.getContext("2d");return a?(r&&(e||assert(typeof GLctx>"u","cannot set in module if GLctx is used, but we are a non-GL context that would replace it"),Module.ctx=a,e&&GL.makeContextCurrent(n),Module.useWebGL=e,Browser.moduleContextCreatedCallbacks.forEach(function(p){p()}),Browser.init()),a):null},destroyContext:function(t,e,r){},fullscreenHandlersInstalled:!1,lockPointer:void 0,resizeCanvas:void 0,requestFullscreen:function(t,e,r){Browser.lockPointer=t,Browser.resizeCanvas=e,Browser.vrDevice=r,typeof Browser.lockPointer>"u"&&(Browser.lockPointer=!0),typeof Browser.resizeCanvas>"u"&&(Browser.resizeCanvas=!1),typeof Browser.vrDevice>"u"&&(Browser.vrDevice=null);var o=Module.canvas;function a(){Browser.isFullscreen=!1;var u=o.parentNode;(document.fullscreenElement||document.mozFullScreenElement||document.msFullscreenElement||document.webkitFullscreenElement||document.webkitCurrentFullScreenElement)===u?(o.exitFullscreen=document.exitFullscreen||document.cancelFullScreen||document.mozCancelFullScreen||document.msExitFullscreen||document.webkitCancelFullScreen||function(){},o.exitFullscreen=o.exitFullscreen.bind(document),Browser.lockPointer&&o.requestPointerLock(),Browser.isFullscreen=!0,Browser.resizeCanvas&&Browser.setFullscreenCanvasSize()):(u.parentNode.insertBefore(o,u),u.parentNode.removeChild(u),Browser.resizeCanvas&&Browser.setWindowedCanvasSize()),Module.onFullScreen&&Module.onFullScreen(Browser.isFullscreen),Module.onFullscreen&&Module.onFullscreen(Browser.isFullscreen),Browser.updateCanvasDimensions(o)}Browser.fullscreenHandlersInstalled||(Browser.fullscreenHandlersInstalled=!0,document.addEventListener("fullscreenchange",a,!1),document.addEventListener("mozfullscreenchange",a,!1),document.addEventListener("webkitfullscreenchange",a,!1),document.addEventListener("MSFullscreenChange",a,!1));var n=document.createElement("div");o.parentNode.insertBefore(n,o),n.appendChild(o),n.requestFullscreen=n.requestFullscreen||n.mozRequestFullScreen||n.msRequestFullscreen||(n.webkitRequestFullscreen?function(){n.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}:null)||(n.webkitRequestFullScreen?function(){n.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT)}:null),r?n.requestFullscreen({vrDisplay:r}):n.requestFullscreen()},requestFullScreen:function(t,e,r){return Module.printErr("Browser.requestFullScreen() is deprecated. Please call Browser.requestFullscreen instead."),Browser.requestFullScreen=function(o,a,n){return Browser.requestFullscreen(o,a,n)},Browser.requestFullscreen(t,e,r)},nextRAF:0,fakeRequestAnimationFrame:function(t){var e=Date.now();if(Browser.nextRAF===0)Browser.nextRAF=e+1e3/60;else for(;e+2>=Browser.nextRAF;)Browser.nextRAF+=1e3/60;var r=Math.max(Browser.nextRAF-e,0);setTimeout(t,r)},requestAnimationFrame:function t(e){typeof window>"u"?Browser.fakeRequestAnimationFrame(e):(window.requestAnimationFrame||(window.requestAnimationFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame||Browser.fakeRequestAnimationFrame),window.requestAnimationFrame(e))},safeCallback:function(t){return function(){if(!ABORT)return t.apply(null,arguments)}},allowAsyncCallbacks:!0,queuedAsyncCallbacks:[],pauseAsyncCallbacks:function(){Browser.allowAsyncCallbacks=!1},resumeAsyncCallbacks:function(){if(Browser.allowAsyncCallbacks=!0,Browser.queuedAsyncCallbacks.length>0){var t=Browser.queuedAsyncCallbacks;Browser.queuedAsyncCallbacks=[],t.forEach(function(e){e()})}},safeRequestAnimationFrame:function(t){return Browser.requestAnimationFrame(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))})},safeSetTimeout:function(t,e){return Module.noExitRuntime=!0,setTimeout(function(){ABORT||(Browser.allowAsyncCallbacks?t():Browser.queuedAsyncCallbacks.push(t))},e)},safeSetInterval:function(t,e){return Module.noExitRuntime=!0,setInterval(function(){ABORT||Browser.allowAsyncCallbacks&&t()},e)},getMimetype:function(t){return{jpg:"image/jpeg",jpeg:"image/jpeg",png:"image/png",bmp:"image/bmp",ogg:"audio/ogg",wav:"audio/wav",mp3:"audio/mpeg"}[t.substr(t.lastIndexOf(".")+1)]},getUserMedia:function(t){window.getUserMedia||(window.getUserMedia=navigator.getUserMedia||navigator.mozGetUserMedia),window.getUserMedia(t)},getMovementX:function(t){return t.movementX||t.mozMovementX||t.webkitMovementX||0},getMovementY:function(t){return t.movementY||t.mozMovementY||t.webkitMovementY||0},getMouseWheelDelta:function(t){var e=0;switch(t.type){case"DOMMouseScroll":e=t.detail;break;case"mousewheel":e=t.wheelDelta;break;case"wheel":e=t.deltaY;break;default:throw"unrecognized mouse wheel event: "+t.type}return e},mouseX:0,mouseY:0,mouseMovementX:0,mouseMovementY:0,touches:{},lastTouches:{},calculateMouseEvent:function(t){if(Browser.pointerLock)t.type!="mousemove"&&"mozMovementX"in t?Browser.mouseMovementX=Browser.mouseMovementY=0:(Browser.mouseMovementX=Browser.getMovementX(t),Browser.mouseMovementY=Browser.getMovementY(t)),typeof SDL<"u"?(Browser.mouseX=SDL.mouseX+Browser.mouseMovementX,Browser.mouseY=SDL.mouseY+Browser.mouseMovementY):(Browser.mouseX+=Browser.mouseMovementX,Browser.mouseY+=Browser.mouseMovementY);else{var e=Module.canvas.getBoundingClientRect(),r=Module.canvas.width,o=Module.canvas.height,a=typeof window.scrollX<"u"?window.scrollX:window.pageXOffset,n=typeof window.scrollY<"u"?window.scrollY:window.pageYOffset;if(t.type==="touchstart"||t.type==="touchend"||t.type==="touchmove"){var u=t.touch;if(u===void 0)return;var A=u.pageX-(a+e.left),p=u.pageY-(n+e.top);A=A*(r/e.width),p=p*(o/e.height);var h={x:A,y:p};if(t.type==="touchstart")Browser.lastTouches[u.identifier]=h,Browser.touches[u.identifier]=h;else if(t.type==="touchend"||t.type==="touchmove"){var E=Browser.touches[u.identifier];E||(E=h),Browser.lastTouches[u.identifier]=E,Browser.touches[u.identifier]=h}return}var I=t.pageX-(a+e.left),v=t.pageY-(n+e.top);I=I*(r/e.width),v=v*(o/e.height),Browser.mouseMovementX=I-Browser.mouseX,Browser.mouseMovementY=v-Browser.mouseY,Browser.mouseX=I,Browser.mouseY=v}},asyncLoad:function(t,e,r,o){var a=o?"":"al "+t;Module.readAsync(t,function(n){assert(n,'Loading data file "'+t+'" failed (no arrayBuffer).'),e(new Uint8Array(n)),a&&removeRunDependency(a)},function(n){if(r)r();else throw'Loading data file "'+t+'" failed.'}),a&&addRunDependency(a)},resizeListeners:[],updateResizeListeners:function(){var t=Module.canvas;Browser.resizeListeners.forEach(function(e){e(t.width,t.height)})},setCanvasSize:function(t,e,r){var o=Module.canvas;Browser.updateCanvasDimensions(o,t,e),r||Browser.updateResizeListeners()},windowedWidth:0,windowedHeight:0,setFullscreenCanvasSize:function(){if(typeof SDL<"u"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t|8388608,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},setWindowedCanvasSize:function(){if(typeof SDL<"u"){var t=HEAPU32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2];t=t&-8388609,HEAP32[SDL.screen+Runtime.QUANTUM_SIZE*0>>2]=t}Browser.updateResizeListeners()},updateCanvasDimensions:function(t,e,r){e&&r?(t.widthNative=e,t.heightNative=r):(e=t.widthNative,r=t.heightNative);var o=e,a=r;if(Module.forcedAspectRatio&&Module.forcedAspectRatio>0&&(o/a>2];return e},getStr:function(){var t=Pointer_stringify(SYSCALLS.get());return t},get64:function(){var t=SYSCALLS.get(),e=SYSCALLS.get();return t>=0?assert(e===0):assert(e===-1),t},getZero:function(){assert(SYSCALLS.get()===0)}};function ___syscall6(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD();return FS.close(r),0}catch(o){return(typeof FS>"u"||!(o instanceof FS.ErrnoError))&&abort(o),-o.errno}}function ___syscall54(t,e){SYSCALLS.varargs=e;try{return 0}catch(r){return(typeof FS>"u"||!(r instanceof FS.ErrnoError))&&abort(r),-r.errno}}function _typeModule(t){var e=[[0,1,"X"],[1,1,"const X"],[128,1,"X *"],[256,1,"X &"],[384,1,"X &&"],[512,1,"std::shared_ptr"],[640,1,"std::unique_ptr"],[5120,1,"std::vector"],[6144,2,"std::array"],[9216,-1,"std::function"]];function r(p,h,E,I,v,x){if(h==1){var C=I&896;(C==128||C==256||C==384)&&(p="X const")}var R;return x?R=E.replace("X",p).replace("Y",v):R=p.replace("X",E).replace("Y",v),R.replace(/([*&]) (?=[*&])/g,"$1")}function o(p,h,E,I,v){throw new Error(p+" type "+E.replace("X",h+"?")+(I?" with flag "+I:"")+" in "+v)}function a(p,h,E,I,v,x,C,R){x===void 0&&(x="X"),R===void 0&&(R=1);var N=E(p);if(N)return N;var U=I(p),V=U.placeholderFlag,te=e[V];C&&te&&(x=r(C[2],C[0],x,te[0],"?",!0));var ae;V==0&&(ae="Unbound"),V>=10&&(ae="Corrupt"),R>20&&(ae="Deeply nested"),ae&&o(ae,p,x,V,v||"?");var fe=U.paramList[0],ue=a(fe,h,E,I,v,x,te,R+1),me,he={flags:te[0],id:p,name:"",paramList:[ue]},Be=[],we="?";switch(U.placeholderFlag){case 1:me=ue.spec;break;case 2:if((ue.flags&15360)==1024&&ue.spec.ptrSize==1){he.flags=7168;break}case 3:case 6:case 5:me=ue.spec,ue.flags&15360;break;case 8:we=""+U.paramList[1],he.paramList.push(U.paramList[1]);break;case 9:for(var g=0,Ee=U.paramList[1];g>2]=t),t}function _llvm_stacksave(){var t=_llvm_stacksave;return t.LLVM_SAVEDSTACKS||(t.LLVM_SAVEDSTACKS=[]),t.LLVM_SAVEDSTACKS.push(Runtime.stackSave()),t.LLVM_SAVEDSTACKS.length-1}function ___syscall140(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.getStreamFromFD(),o=SYSCALLS.get(),a=SYSCALLS.get(),n=SYSCALLS.get(),u=SYSCALLS.get(),A=a;return FS.llseek(r,A,u),HEAP32[n>>2]=r.position,r.getdents&&A===0&&u===0&&(r.getdents=null),0}catch(p){return(typeof FS>"u"||!(p instanceof FS.ErrnoError))&&abort(p),-p.errno}}function ___syscall146(t,e){SYSCALLS.varargs=e;try{var r=SYSCALLS.get(),o=SYSCALLS.get(),a=SYSCALLS.get(),n=0;___syscall146.buffer||(___syscall146.buffers=[null,[],[]],___syscall146.printChar=function(E,I){var v=___syscall146.buffers[E];assert(v),I===0||I===10?((E===1?Module.print:Module.printErr)(UTF8ArrayToString(v,0)),v.length=0):v.push(I)});for(var u=0;u>2],p=HEAP32[o+(u*8+4)>>2],h=0;h"u"||!(E instanceof FS.ErrnoError))&&abort(E),-E.errno}}function __nbind_finish(){for(var t=0,e=_nbind.BindClass.list;tt.pageSize/2||e>t.pageSize-r){var o=_nbind.typeNameTbl.NBind.proto;return o.lalloc(e)}else return HEAPU32[t.usedPtr]=r+e,t.rootPtr+r},t.lreset=function(e,r){var o=HEAPU32[t.pagePtr];if(o){var a=_nbind.typeNameTbl.NBind.proto;a.lreset(e,r)}else HEAPU32[t.usedPtr]=e},t}();_nbind.Pool=Pool;function constructType(t,e){var r=t==10240?_nbind.makeTypeNameTbl[e.name]||_nbind.BindType:_nbind.makeTypeKindTbl[t],o=new r(e);return typeIdTbl[e.id]=o,_nbind.typeNameTbl[e.name]=o,o}_nbind.constructType=constructType;function getType(t){return typeIdTbl[t]}_nbind.getType=getType;function queryType(t){var e=HEAPU8[t],r=_nbind.structureList[e][1];t/=4,r<0&&(++t,r=HEAPU32[t]+1);var o=Array.prototype.slice.call(HEAPU32.subarray(t+1,t+1+r));return e==9&&(o=[o[0],o.slice(1)]),{paramList:o,placeholderFlag:e}}_nbind.queryType=queryType;function getTypes(t,e){return t.map(function(r){return typeof r=="number"?_nbind.getComplexType(r,constructType,getType,queryType,e):_nbind.typeNameTbl[r]})}_nbind.getTypes=getTypes;function readTypeIdList(t,e){return Array.prototype.slice.call(HEAPU32,t/4,t/4+e)}_nbind.readTypeIdList=readTypeIdList;function readAsciiString(t){for(var e=t;HEAPU8[e++];);return String.fromCharCode.apply("",HEAPU8.subarray(t,e-1))}_nbind.readAsciiString=readAsciiString;function readPolicyList(t){var e={};if(t)for(;;){var r=HEAPU32[t/4];if(!r)break;e[readAsciiString(r)]=!0,t+=4}return e}_nbind.readPolicyList=readPolicyList;function getDynCall(t,e){var r={float32_t:"d",float64_t:"d",int64_t:"d",uint64_t:"d",void:"v"},o=t.map(function(n){return r[n.name]||"i"}).join(""),a=Module["dynCall_"+o];if(!a)throw new Error("dynCall_"+o+" not found for "+e+"("+t.map(function(n){return n.name}).join(", ")+")");return a}_nbind.getDynCall=getDynCall;function addMethod(t,e,r,o){var a=t[e];t.hasOwnProperty(e)&&a?((a.arity||a.arity===0)&&(a=_nbind.makeOverloader(a,a.arity),t[e]=a),a.addMethod(r,o)):(r.arity=o,t[e]=r)}_nbind.addMethod=addMethod;function throwError(t){throw new Error(t)}_nbind.throwError=throwError,_nbind.bigEndian=!1,_a=_typeModule(_typeModule),_nbind.Type=_a.Type,_nbind.makeType=_a.makeType,_nbind.getComplexType=_a.getComplexType,_nbind.structureList=_a.structureList;var BindType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.heap=HEAPU32,r.ptrSize=4,r}return e.prototype.needsWireRead=function(r){return!!this.wireRead||!!this.makeWireRead},e.prototype.needsWireWrite=function(r){return!!this.wireWrite||!!this.makeWireWrite},e}(_nbind.Type);_nbind.BindType=BindType;var PrimitiveType=function(t){__extends(e,t);function e(r){var o=t.call(this,r)||this,a=r.flags&32?{32:HEAPF32,64:HEAPF64}:r.flags&8?{8:HEAPU8,16:HEAPU16,32:HEAPU32}:{8:HEAP8,16:HEAP16,32:HEAP32};return o.heap=a[r.ptrSize*8],o.ptrSize=r.ptrSize,o}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireWrite=function(r,o){return o&&o.Strict&&function(a){if(typeof a=="number")return a;throw new Error("Type mismatch")}},e}(BindType);_nbind.PrimitiveType=PrimitiveType;function pushCString(t,e){if(t==null){if(e&&e.Nullable)return 0;throw new Error("Type mismatch")}if(e&&e.Strict){if(typeof t!="string")throw new Error("Type mismatch")}else t=t.toString();var r=Module.lengthBytesUTF8(t)+1,o=_nbind.Pool.lalloc(r);return Module.stringToUTF8Array(t,HEAPU8,o,r),o}_nbind.pushCString=pushCString;function popCString(t){return t===0?null:Module.Pointer_stringify(t)}_nbind.popCString=popCString;var CStringType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=popCString,r.wireWrite=pushCString,r.readResources=[_nbind.resources.pool],r.writeResources=[_nbind.resources.pool],r}return e.prototype.makeWireWrite=function(r,o){return function(a){return pushCString(a,o)}},e}(BindType);_nbind.CStringType=CStringType;var BooleanType=function(t){__extends(e,t);function e(){var r=t!==null&&t.apply(this,arguments)||this;return r.wireRead=function(o){return!!o},r}return e.prototype.needsWireWrite=function(r){return!!r&&!!r.Strict},e.prototype.makeWireRead=function(r){return"!!("+r+")"},e.prototype.makeWireWrite=function(r,o){return o&&o.Strict&&function(a){if(typeof a=="boolean")return a;throw new Error("Type mismatch")}||r},e}(BindType);_nbind.BooleanType=BooleanType;var Wrapper=function(){function t(){}return t.prototype.persist=function(){this.__nbindState|=1},t}();_nbind.Wrapper=Wrapper;function makeBound(t,e){var r=function(o){__extends(a,o);function a(n,u,A,p){var h=o.call(this)||this;if(!(h instanceof a))return new(Function.prototype.bind.apply(a,Array.prototype.concat.apply([null],arguments)));var E=u,I=A,v=p;if(n!==_nbind.ptrMarker){var x=h.__nbindConstructor.apply(h,arguments);E=4608,v=HEAPU32[x/4],I=HEAPU32[x/4+1]}var C={configurable:!0,enumerable:!1,value:null,writable:!1},R={__nbindFlags:E,__nbindPtr:I};v&&(R.__nbindShared=v,_nbind.mark(h));for(var N=0,U=Object.keys(R);N>=1;var r=_nbind.valueList[t];return _nbind.valueList[t]=firstFreeValue,firstFreeValue=t,r}else{if(e)return _nbind.popShared(t,e);throw new Error("Invalid value slot "+t)}}_nbind.popValue=popValue;var valueBase=18446744073709552e3;function push64(t){return typeof t=="number"?t:pushValue(t)*4096+valueBase}function pop64(t){return t=3?u=Buffer.from(n):u=new Buffer(n),u.copy(o)}else getBuffer(o).set(n)}}_nbind.commitBuffer=commitBuffer;var dirtyList=[],gcTimer=0;function sweep(){for(var t=0,e=dirtyList;t>2]=DYNAMIC_BASE,staticSealed=!0;function invoke_viiiii(t,e,r,o,a,n){try{Module.dynCall_viiiii(t,e,r,o,a,n)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_vif(t,e,r){try{Module.dynCall_vif(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_vid(t,e,r){try{Module.dynCall_vid(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_fiff(t,e,r,o){try{return Module.dynCall_fiff(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_vi(t,e){try{Module.dynCall_vi(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_vii(t,e,r){try{Module.dynCall_vii(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_ii(t,e){try{return Module.dynCall_ii(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_viddi(t,e,r,o,a){try{Module.dynCall_viddi(t,e,r,o,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_vidd(t,e,r,o){try{Module.dynCall_vidd(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_iiii(t,e,r,o){try{return Module.dynCall_iiii(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_diii(t,e,r,o){try{return Module.dynCall_diii(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_di(t,e){try{return Module.dynCall_di(t,e)}catch(r){if(typeof r!="number"&&r!=="longjmp")throw r;Module.setThrew(1,0)}}function invoke_iid(t,e,r){try{return Module.dynCall_iid(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_iii(t,e,r){try{return Module.dynCall_iii(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viiddi(t,e,r,o,a,n){try{Module.dynCall_viiddi(t,e,r,o,a,n)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_viiiiii(t,e,r,o,a,n,u){try{Module.dynCall_viiiiii(t,e,r,o,a,n,u)}catch(A){if(typeof A!="number"&&A!=="longjmp")throw A;Module.setThrew(1,0)}}function invoke_dii(t,e,r){try{return Module.dynCall_dii(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_i(t){try{return Module.dynCall_i(t)}catch(e){if(typeof e!="number"&&e!=="longjmp")throw e;Module.setThrew(1,0)}}function invoke_iiiiii(t,e,r,o,a,n){try{return Module.dynCall_iiiiii(t,e,r,o,a,n)}catch(u){if(typeof u!="number"&&u!=="longjmp")throw u;Module.setThrew(1,0)}}function invoke_viiid(t,e,r,o,a){try{Module.dynCall_viiid(t,e,r,o,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}function invoke_viififi(t,e,r,o,a,n,u){try{Module.dynCall_viififi(t,e,r,o,a,n,u)}catch(A){if(typeof A!="number"&&A!=="longjmp")throw A;Module.setThrew(1,0)}}function invoke_viii(t,e,r,o){try{Module.dynCall_viii(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_v(t){try{Module.dynCall_v(t)}catch(e){if(typeof e!="number"&&e!=="longjmp")throw e;Module.setThrew(1,0)}}function invoke_viid(t,e,r,o){try{Module.dynCall_viid(t,e,r,o)}catch(a){if(typeof a!="number"&&a!=="longjmp")throw a;Module.setThrew(1,0)}}function invoke_idd(t,e,r){try{return Module.dynCall_idd(t,e,r)}catch(o){if(typeof o!="number"&&o!=="longjmp")throw o;Module.setThrew(1,0)}}function invoke_viiii(t,e,r,o,a){try{Module.dynCall_viiii(t,e,r,o,a)}catch(n){if(typeof n!="number"&&n!=="longjmp")throw n;Module.setThrew(1,0)}}Module.asmGlobalArg={Math,Int8Array,Int16Array,Int32Array,Uint8Array,Uint16Array,Uint32Array,Float32Array,Float64Array,NaN:NaN,Infinity:1/0},Module.asmLibraryArg={abort,assert,enlargeMemory,getTotalMemory,abortOnCannotGrowMemory,invoke_viiiii,invoke_vif,invoke_vid,invoke_fiff,invoke_vi,invoke_vii,invoke_ii,invoke_viddi,invoke_vidd,invoke_iiii,invoke_diii,invoke_di,invoke_iid,invoke_iii,invoke_viiddi,invoke_viiiiii,invoke_dii,invoke_i,invoke_iiiiii,invoke_viiid,invoke_viififi,invoke_viii,invoke_v,invoke_viid,invoke_idd,invoke_viiii,_emscripten_asm_const_iiiii,_emscripten_asm_const_iiidddddd,_emscripten_asm_const_iiiid,__nbind_reference_external,_emscripten_asm_const_iiiiiiii,_removeAccessorPrefix,_typeModule,__nbind_register_pool,__decorate,_llvm_stackrestore,___cxa_atexit,__extends,__nbind_get_value_object,__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,_emscripten_set_main_loop_timing,__nbind_register_primitive,__nbind_register_type,_emscripten_memcpy_big,__nbind_register_function,___setErrNo,__nbind_register_class,__nbind_finish,_abort,_nbind_value,_llvm_stacksave,___syscall54,_defineHidden,_emscripten_set_main_loop,_emscripten_get_now,__nbind_register_callback_signature,_emscripten_asm_const_iiiiii,__nbind_free_external,_emscripten_asm_const_iiii,_emscripten_asm_const_iiididi,___syscall6,_atexit,___syscall140,___syscall146,DYNAMICTOP_PTR,tempDoublePtr,ABORT,STACKTOP,STACK_MAX,cttz_i8,___dso_handle};var asm=function(t,e,r){var o=new t.Int8Array(r),a=new t.Int16Array(r),n=new t.Int32Array(r),u=new t.Uint8Array(r),A=new t.Uint16Array(r),p=new t.Uint32Array(r),h=new t.Float32Array(r),E=new t.Float64Array(r),I=e.DYNAMICTOP_PTR|0,v=e.tempDoublePtr|0,x=e.ABORT|0,C=e.STACKTOP|0,R=e.STACK_MAX|0,N=e.cttz_i8|0,U=e.___dso_handle|0,V=0,te=0,ae=0,fe=0,ue=t.NaN,me=t.Infinity,he=0,Be=0,we=0,g=0,Ee=0,Pe=0,ce=t.Math.floor,ne=t.Math.abs,ee=t.Math.sqrt,Ie=t.Math.pow,Fe=t.Math.cos,At=t.Math.sin,H=t.Math.tan,at=t.Math.acos,Re=t.Math.asin,ke=t.Math.atan,xe=t.Math.atan2,He=t.Math.exp,Te=t.Math.log,Ve=t.Math.ceil,qe=t.Math.imul,b=t.Math.min,w=t.Math.max,S=t.Math.clz32,y=t.Math.fround,F=e.abort,J=e.assert,X=e.enlargeMemory,Z=e.getTotalMemory,ie=e.abortOnCannotGrowMemory,be=e.invoke_viiiii,Le=e.invoke_vif,ot=e.invoke_vid,dt=e.invoke_fiff,Gt=e.invoke_vi,$t=e.invoke_vii,bt=e.invoke_ii,an=e.invoke_viddi,Qr=e.invoke_vidd,mr=e.invoke_iiii,br=e.invoke_diii,Wr=e.invoke_di,Kn=e.invoke_iid,Ls=e.invoke_iii,Ti=e.invoke_viiddi,ps=e.invoke_viiiiii,io=e.invoke_dii,Si=e.invoke_i,Ns=e.invoke_iiiiii,so=e.invoke_viiid,uc=e.invoke_viififi,uu=e.invoke_viii,cp=e.invoke_v,up=e.invoke_viid,Os=e.invoke_idd,Dn=e.invoke_viiii,oo=e._emscripten_asm_const_iiiii,Ms=e._emscripten_asm_const_iiidddddd,yl=e._emscripten_asm_const_iiiid,El=e.__nbind_reference_external,ao=e._emscripten_asm_const_iiiiiiii,zn=e._removeAccessorPrefix,On=e._typeModule,Li=e.__nbind_register_pool,Mn=e.__decorate,_i=e._llvm_stackrestore,rr=e.___cxa_atexit,Oe=e.__extends,ii=e.__nbind_get_value_object,Ua=e.__ZN8facebook4yoga14YGNodeToStringEPNSt3__212basic_stringIcNS1_11char_traitsIcEENS1_9allocatorIcEEEEP6YGNode14YGPrintOptionsj,hr=e._emscripten_set_main_loop_timing,Ac=e.__nbind_register_primitive,Au=e.__nbind_register_type,fc=e._emscripten_memcpy_big,Cl=e.__nbind_register_function,DA=e.___setErrNo,fu=e.__nbind_register_class,Ce=e.__nbind_finish,Rt=e._abort,pc=e._nbind_value,Hi=e._llvm_stacksave,pu=e.___syscall54,Yt=e._defineHidden,wl=e._emscripten_set_main_loop,PA=e._emscripten_get_now,Ap=e.__nbind_register_callback_signature,hc=e._emscripten_asm_const_iiiiii,SA=e.__nbind_free_external,Qn=e._emscripten_asm_const_iiii,hi=e._emscripten_asm_const_iiididi,gc=e.___syscall6,bA=e._atexit,sa=e.___syscall140,Ni=e.___syscall146,_o=y(0);let Ze=y(0);function lo(s){s=s|0;var l=0;return l=C,C=C+s|0,C=C+15&-16,l|0}function dc(){return C|0}function hu(s){s=s|0,C=s}function qi(s,l){s=s|0,l=l|0,C=s,R=l}function gu(s,l){s=s|0,l=l|0,V||(V=s,te=l)}function xA(s){s=s|0,Pe=s}function Ha(){return Pe|0}function mc(){var s=0,l=0;Dr(8104,8,400)|0,Dr(8504,408,540)|0,s=9044,l=s+44|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));o[9088]=0,o[9089]=1,n[2273]=0,n[2274]=948,n[2275]=948,rr(17,8104,U|0)|0}function hs(s){s=s|0,pt(s+948|0)}function Ht(s){return s=y(s),((Pu(s)|0)&2147483647)>>>0>2139095040|0}function Fn(s,l,c){s=s|0,l=l|0,c=c|0;e:do if(n[s+(l<<3)+4>>2]|0)s=s+(l<<3)|0;else{if((l|2|0)==3&&n[s+60>>2]|0){s=s+56|0;break}switch(l|0){case 0:case 2:case 4:case 5:{if(n[s+52>>2]|0){s=s+48|0;break e}break}default:}if(n[s+68>>2]|0){s=s+64|0;break}else{s=(l|1|0)==5?948:c;break}}while(0);return s|0}function Ci(s){s=s|0;var l=0;return l=pD(1e3)|0,oa(s,(l|0)!=0,2456),n[2276]=(n[2276]|0)+1,Dr(l|0,8104,1e3)|0,o[s+2>>0]|0&&(n[l+4>>2]=2,n[l+12>>2]=4),n[l+976>>2]=s,l|0}function oa(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;d=C,C=C+16|0,f=d,l||(n[f>>2]=c,Cg(s,5,3197,f)),C=d}function co(){return Ci(956)|0}function Us(s){s=s|0;var l=0;return l=Kt(1e3)|0,aa(l,s),oa(n[s+976>>2]|0,1,2456),n[2276]=(n[2276]|0)+1,n[l+944>>2]=0,l|0}function aa(s,l){s=s|0,l=l|0;var c=0;Dr(s|0,l|0,948)|0,Rm(s+948|0,l+948|0),c=s+960|0,s=l+960|0,l=c+40|0;do n[c>>2]=n[s>>2],c=c+4|0,s=s+4|0;while((c|0)<(l|0))}function la(s){s=s|0;var l=0,c=0,f=0,d=0;if(l=s+944|0,c=n[l>>2]|0,c|0&&(Ho(c+948|0,s)|0,n[l>>2]=0),c=wi(s)|0,c|0){l=0;do n[(gs(s,l)|0)+944>>2]=0,l=l+1|0;while((l|0)!=(c|0))}c=s+948|0,f=n[c>>2]|0,d=s+952|0,l=n[d>>2]|0,(l|0)!=(f|0)&&(n[d>>2]=l+(~((l+-4-f|0)>>>2)<<2)),ds(c),hD(s),n[2276]=(n[2276]|0)+-1}function Ho(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0;f=n[s>>2]|0,k=s+4|0,c=n[k>>2]|0,m=c;e:do if((f|0)==(c|0))d=f,B=4;else for(s=f;;){if((n[s>>2]|0)==(l|0)){d=s,B=4;break e}if(s=s+4|0,(s|0)==(c|0)){s=0;break}}while(0);return(B|0)==4&&((d|0)!=(c|0)?(f=d+4|0,s=m-f|0,l=s>>2,l&&(Mw(d|0,f|0,s|0)|0,c=n[k>>2]|0),s=d+(l<<2)|0,(c|0)==(s|0)||(n[k>>2]=c+(~((c+-4-s|0)>>>2)<<2)),s=1):s=0),s|0}function wi(s){return s=s|0,(n[s+952>>2]|0)-(n[s+948>>2]|0)>>2|0}function gs(s,l){s=s|0,l=l|0;var c=0;return c=n[s+948>>2]|0,(n[s+952>>2]|0)-c>>2>>>0>l>>>0?s=n[c+(l<<2)>>2]|0:s=0,s|0}function ds(s){s=s|0;var l=0,c=0,f=0,d=0;f=C,C=C+32|0,l=f,d=n[s>>2]|0,c=(n[s+4>>2]|0)-d|0,((n[s+8>>2]|0)-d|0)>>>0>c>>>0&&(d=c>>2,Bp(l,d,d,s+8|0),vg(s,l),_A(l)),C=f}function ms(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0;M=wi(s)|0;do if(M|0){if((n[(gs(s,0)|0)+944>>2]|0)==(s|0)){if(!(Ho(s+948|0,l)|0))break;Dr(l+400|0,8504,540)|0,n[l+944>>2]=0,Ne(s);break}B=n[(n[s+976>>2]|0)+12>>2]|0,k=s+948|0,Q=(B|0)==0,c=0,m=0;do f=n[(n[k>>2]|0)+(m<<2)>>2]|0,(f|0)==(l|0)?Ne(s):(d=Us(f)|0,n[(n[k>>2]|0)+(c<<2)>>2]=d,n[d+944>>2]=s,Q||TR[B&15](f,d,s,c),c=c+1|0),m=m+1|0;while((m|0)!=(M|0));if(c>>>0>>0){Q=s+948|0,k=s+952|0,B=c,c=n[k>>2]|0;do m=(n[Q>>2]|0)+(B<<2)|0,f=m+4|0,d=c-f|0,l=d>>2,l&&(Mw(m|0,f|0,d|0)|0,c=n[k>>2]|0),d=c,f=m+(l<<2)|0,(d|0)!=(f|0)&&(c=d+(~((d+-4-f|0)>>>2)<<2)|0,n[k>>2]=c),B=B+1|0;while((B|0)!=(M|0))}}while(0)}function _s(s){s=s|0;var l=0,c=0,f=0,d=0;Un(s,(wi(s)|0)==0,2491),Un(s,(n[s+944>>2]|0)==0,2545),l=s+948|0,c=n[l>>2]|0,f=s+952|0,d=n[f>>2]|0,(d|0)!=(c|0)&&(n[f>>2]=d+(~((d+-4-c|0)>>>2)<<2)),ds(l),l=s+976|0,c=n[l>>2]|0,Dr(s|0,8104,1e3)|0,o[c+2>>0]|0&&(n[s+4>>2]=2,n[s+12>>2]=4),n[l>>2]=c}function Un(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;d=C,C=C+16|0,f=d,l||(n[f>>2]=c,Ao(s,5,3197,f)),C=d}function Pn(){return n[2276]|0}function ys(){var s=0;return s=pD(20)|0,We((s|0)!=0,2592),n[2277]=(n[2277]|0)+1,n[s>>2]=n[239],n[s+4>>2]=n[240],n[s+8>>2]=n[241],n[s+12>>2]=n[242],n[s+16>>2]=n[243],s|0}function We(s,l){s=s|0,l=l|0;var c=0,f=0;f=C,C=C+16|0,c=f,s||(n[c>>2]=l,Ao(0,5,3197,c)),C=f}function tt(s){s=s|0,hD(s),n[2277]=(n[2277]|0)+-1}function It(s,l){s=s|0,l=l|0;var c=0;l?(Un(s,(wi(s)|0)==0,2629),c=1):(c=0,l=0),n[s+964>>2]=l,n[s+988>>2]=c}function ir(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=C,C=C+16|0,m=f+8|0,d=f+4|0,B=f,n[d>>2]=l,Un(s,(n[l+944>>2]|0)==0,2709),Un(s,(n[s+964>>2]|0)==0,2763),$(s),l=s+948|0,n[B>>2]=(n[l>>2]|0)+(c<<2),n[m>>2]=n[B>>2],ye(l,m,d)|0,n[(n[d>>2]|0)+944>>2]=s,Ne(s),C=f}function $(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,k=0;if(c=wi(s)|0,c|0&&(n[(gs(s,0)|0)+944>>2]|0)!=(s|0)){f=n[(n[s+976>>2]|0)+12>>2]|0,d=s+948|0,m=(f|0)==0,l=0;do B=n[(n[d>>2]|0)+(l<<2)>>2]|0,k=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],n[f>>2]=Xe,_A(se),f=n[O>>2]|0;break}m=f,B=((m-d>>2)+1|0)/-2|0,k=f+(B<<2)|0,d=Q-m|0,m=d>>2,m&&(Mw(k|0,f|0,d|0)|0,f=n[M>>2]|0),Xe=k+(m<<2)|0,n[O>>2]=Xe,n[M>>2]=f+(B<<2),f=Xe}while(0);n[f>>2]=n[c>>2],n[O>>2]=(n[O>>2]|0)+4,l=Dg(s,Qe,l)|0,_A(Qe)}while(0);return C=et,l|0}function Ne(s){s=s|0;var l=0;do{if(l=s+984|0,o[l>>0]|0)break;o[l>>0]=1,h[s+504>>2]=y(ue),s=n[s+944>>2]|0}while((s|0)!=0)}function pt(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-4-f|0)>>>2)<<2)),gt(c))}function ht(s){return s=s|0,n[s+944>>2]|0}function Tt(s){s=s|0,Un(s,(n[s+964>>2]|0)!=0,2832),Ne(s)}function er(s){return s=s|0,(o[s+984>>0]|0)!=0|0}function $r(s,l){s=s|0,l=l|0,FUe(s,l,400)|0&&(Dr(s|0,l|0,400)|0,Ne(s))}function Gi(s){s=s|0;var l=Ze;return l=y(h[s+44>>2]),s=Ht(l)|0,y(s?y(0):l)}function es(s){s=s|0;var l=Ze;return l=y(h[s+48>>2]),Ht(l)|0&&(l=o[(n[s+976>>2]|0)+2>>0]|0?y(1):y(0)),y(l)}function bi(s,l){s=s|0,l=l|0,n[s+980>>2]=l}function qo(s){return s=s|0,n[s+980>>2]|0}function kA(s,l){s=s|0,l=l|0;var c=0;c=s+4|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Ne(s))}function QA(s){return s=s|0,n[s+4>>2]|0}function fp(s,l){s=s|0,l=l|0;var c=0;c=s+8|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Ne(s))}function sg(s){return s=s|0,n[s+8>>2]|0}function du(s,l){s=s|0,l=l|0;var c=0;c=s+12|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Ne(s))}function og(s){return s=s|0,n[s+12>>2]|0}function mu(s,l){s=s|0,l=l|0;var c=0;c=s+16|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Ne(s))}function uo(s){return s=s|0,n[s+16>>2]|0}function FA(s,l){s=s|0,l=l|0;var c=0;c=s+20|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Ne(s))}function yc(s){return s=s|0,n[s+20>>2]|0}function ca(s,l){s=s|0,l=l|0;var c=0;c=s+24|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Ne(s))}function ag(s){return s=s|0,n[s+24>>2]|0}function Ec(s,l){s=s|0,l=l|0;var c=0;c=s+28|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Ne(s))}function Sm(s){return s=s|0,n[s+28>>2]|0}function lg(s,l){s=s|0,l=l|0;var c=0;c=s+32|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Ne(s))}function ei(s){return s=s|0,n[s+32>>2]|0}function pp(s,l){s=s|0,l=l|0;var c=0;c=s+36|0,(n[c>>2]|0)!=(l|0)&&(n[c>>2]=l,Ne(s))}function cg(s){return s=s|0,n[s+36>>2]|0}function RA(s,l){s=s|0,l=y(l);var c=0;c=s+40|0,y(h[c>>2])!=l&&(h[c>>2]=l,Ne(s))}function Hs(s,l){s=s|0,l=y(l);var c=0;c=s+44|0,y(h[c>>2])!=l&&(h[c>>2]=l,Ne(s))}function yu(s,l){s=s|0,l=y(l);var c=0;c=s+48|0,y(h[c>>2])!=l&&(h[c>>2]=l,Ne(s))}function qa(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=(m^1)&1,f=s+52|0,d=s+56|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function ji(s,l){s=s|0,l=y(l);var c=0,f=0;f=s+52|0,c=s+56|0,y(h[f>>2])==l&&(n[c>>2]|0)==2||(h[f>>2]=l,f=Ht(l)|0,n[c>>2]=f?3:2,Ne(s))}function ua(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+52|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Eu(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ht(c)|0,f=(m^1)&1,d=s+132+(l<<3)|0,l=s+132+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Ne(s))}function Es(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ht(c)|0,f=m?0:2,d=s+132+(l<<3)|0,l=s+132+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Ne(s))}function Cc(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=l+132+(c<<3)|0,l=n[f+4>>2]|0,c=s,n[c>>2]=n[f>>2],n[c+4>>2]=l}function wc(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ht(c)|0,f=(m^1)&1,d=s+60+(l<<3)|0,l=s+60+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Ne(s))}function j(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ht(c)|0,f=m?0:2,d=s+60+(l<<3)|0,l=s+60+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Ne(s))}function Dt(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=l+60+(c<<3)|0,l=n[f+4>>2]|0,c=s,n[c>>2]=n[f>>2],n[c+4>>2]=l}function Il(s,l){s=s|0,l=l|0;var c=0;c=s+60+(l<<3)+4|0,(n[c>>2]|0)!=3&&(h[s+60+(l<<3)>>2]=y(ue),n[c>>2]=3,Ne(s))}function xi(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ht(c)|0,f=(m^1)&1,d=s+204+(l<<3)|0,l=s+204+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Ne(s))}function Ic(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ht(c)|0,f=m?0:2,d=s+204+(l<<3)|0,l=s+204+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Ne(s))}function ct(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=l+204+(c<<3)|0,l=n[f+4>>2]|0,c=s,n[c>>2]=n[f>>2],n[c+4>>2]=l}function Cu(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0,m=0;m=Ht(c)|0,f=(m^1)&1,d=s+276+(l<<3)|0,l=s+276+(l<<3)+4|0,m|y(h[d>>2])==c&&(n[l>>2]|0)==(f|0)||(h[d>>2]=c,n[l>>2]=f,Ne(s))}function ug(s,l){return s=s|0,l=l|0,y(h[s+276+(l<<3)>>2])}function yw(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=(m^1)&1,f=s+348|0,d=s+352|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function TA(s,l){s=s|0,l=y(l);var c=0,f=0;f=s+348|0,c=s+352|0,y(h[f>>2])==l&&(n[c>>2]|0)==2||(h[f>>2]=l,f=Ht(l)|0,n[c>>2]=f?3:2,Ne(s))}function hp(s){s=s|0;var l=0;l=s+352|0,(n[l>>2]|0)!=3&&(h[s+348>>2]=y(ue),n[l>>2]=3,Ne(s))}function Br(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+348|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Cs(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=(m^1)&1,f=s+356|0,d=s+360|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function Ag(s,l){s=s|0,l=y(l);var c=0,f=0;f=s+356|0,c=s+360|0,y(h[f>>2])==l&&(n[c>>2]|0)==2||(h[f>>2]=l,f=Ht(l)|0,n[c>>2]=f?3:2,Ne(s))}function fg(s){s=s|0;var l=0;l=s+360|0,(n[l>>2]|0)!=3&&(h[s+356>>2]=y(ue),n[l>>2]=3,Ne(s))}function pg(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+356|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function gp(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=(m^1)&1,f=s+364|0,d=s+368|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function Bc(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=m?0:2,f=s+364|0,d=s+368|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function Ct(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+364|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function bm(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=(m^1)&1,f=s+372|0,d=s+376|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function hg(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=m?0:2,f=s+372|0,d=s+376|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function gg(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+372|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function wu(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=(m^1)&1,f=s+380|0,d=s+384|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function xm(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=m?0:2,f=s+380|0,d=s+384|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function dg(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+380|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Iu(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=(m^1)&1,f=s+388|0,d=s+392|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function Ew(s,l){s=s|0,l=y(l);var c=0,f=0,d=0,m=0;m=Ht(l)|0,c=m?0:2,f=s+388|0,d=s+392|0,m|y(h[f>>2])==l&&(n[d>>2]|0)==(c|0)||(h[f>>2]=l,n[d>>2]=c,Ne(s))}function km(s,l){s=s|0,l=l|0;var c=0,f=0;f=l+388|0,c=n[f+4>>2]|0,l=s,n[l>>2]=n[f>>2],n[l+4>>2]=c}function Aa(s,l){s=s|0,l=y(l);var c=0;c=s+396|0,y(h[c>>2])!=l&&(h[c>>2]=l,Ne(s))}function vc(s){return s=s|0,y(h[s+396>>2])}function Bl(s){return s=s|0,y(h[s+400>>2])}function Bu(s){return s=s|0,y(h[s+404>>2])}function mg(s){return s=s|0,y(h[s+408>>2])}function LA(s){return s=s|0,y(h[s+412>>2])}function dp(s){return s=s|0,y(h[s+416>>2])}function Ga(s){return s=s|0,y(h[s+420>>2])}function yg(s,l){switch(s=s|0,l=l|0,Un(s,(l|0)<6,2918),l|0){case 0:{l=(n[s+496>>2]|0)==2?5:4;break}case 2:{l=(n[s+496>>2]|0)==2?4:5;break}default:}return y(h[s+424+(l<<2)>>2])}function mp(s,l){switch(s=s|0,l=l|0,Un(s,(l|0)<6,2918),l|0){case 0:{l=(n[s+496>>2]|0)==2?5:4;break}case 2:{l=(n[s+496>>2]|0)==2?4:5;break}default:}return y(h[s+448+(l<<2)>>2])}function Go(s,l){switch(s=s|0,l=l|0,Un(s,(l|0)<6,2918),l|0){case 0:{l=(n[s+496>>2]|0)==2?5:4;break}case 2:{l=(n[s+496>>2]|0)==2?4:5;break}default:}return y(h[s+472+(l<<2)>>2])}function ws(s,l){s=s|0,l=l|0;var c=0,f=Ze;return c=n[s+4>>2]|0,(c|0)==(n[l+4>>2]|0)?c?(f=y(h[s>>2]),s=y(ne(y(f-y(h[l>>2]))))>2]=0,n[f+4>>2]=0,n[f+8>>2]=0,Ua(f|0,s|0,l|0,0),Ao(s,3,(o[f+11>>0]|0)<0?n[f>>2]|0:f,c),t3e(f),C=c}function jo(s,l,c,f){s=y(s),l=y(l),c=c|0,f=f|0;var d=Ze;s=y(s*l),d=y(bR(s,y(1)));do if(Ii(d,y(0))|0)s=y(s-d);else{if(s=y(s-d),Ii(d,y(1))|0){s=y(s+y(1));break}if(c){s=y(s+y(1));break}f||(d>y(.5)?d=y(1):(f=Ii(d,y(.5))|0,d=y(f?1:0)),s=y(s+d))}while(0);return y(s/l)}function NA(s,l,c,f,d,m,B,k,Q,M,O,G,se){s=s|0,l=y(l),c=c|0,f=y(f),d=d|0,m=y(m),B=B|0,k=y(k),Q=y(Q),M=y(M),O=y(O),G=y(G),se=se|0;var je=0,Me=Ze,Qe=Ze,et=Ze,Xe=Ze,lt=Ze,Ue=Ze;return Q>2]),Me!=y(0))?(et=y(jo(l,Me,0,0)),Xe=y(jo(f,Me,0,0)),Qe=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lr=1);e:do if(n[s+964>>2]|0)if(Qe=y(ln(s,2,B)),et=y(ln(s,0,B)),G=s+916|0,mo=y(h[G>>2]),go=y(h[s+920>>2]),xn=y(h[s+932>>2]),NA(d,l,m,c,n[s+924>>2]|0,mo,n[s+928>>2]|0,go,xn,y(h[s+936>>2]),Qe,et,O)|0)Xe=22;else if(je=n[s+520>>2]|0,!je)Xe=21;else for(se=0;;){if(G=s+524+(se*24|0)|0,xn=y(h[G>>2]),go=y(h[s+524+(se*24|0)+4>>2]),mo=y(h[s+524+(se*24|0)+16>>2]),NA(d,l,m,c,n[s+524+(se*24|0)+8>>2]|0,xn,n[s+524+(se*24|0)+12>>2]|0,go,mo,y(h[s+524+(se*24|0)+20>>2]),Qe,et,O)|0){Xe=22;break e}if(se=se+1|0,se>>>0>=je>>>0){Xe=21;break}}else{if(Q){if(G=s+916|0,!(Ii(y(h[G>>2]),l)|0)){Xe=21;break}if(!(Ii(y(h[s+920>>2]),c)|0)){Xe=21;break}if((n[s+924>>2]|0)!=(d|0)){Xe=21;break}G=(n[s+928>>2]|0)==(m|0)?G:0,Xe=22;break}if(je=n[s+520>>2]|0,!je)Xe=21;else for(se=0;;){if(G=s+524+(se*24|0)|0,Ii(y(h[G>>2]),l)|0&&Ii(y(h[s+524+(se*24|0)+4>>2]),c)|0&&(n[s+524+(se*24|0)+8>>2]|0)==(d|0)&&(n[s+524+(se*24|0)+12>>2]|0)==(m|0)){Xe=22;break e}if(se=se+1|0,se>>>0>=je>>>0){Xe=21;break}}}while(0);do if((Xe|0)==21)o[11697]|0?(G=0,Xe=28):(G=0,Xe=31);else if((Xe|0)==22){if(se=(o[11697]|0)!=0,!((G|0)!=0&(Lr^1)))if(se){Xe=28;break}else{Xe=31;break}Me=G+16|0,n[s+908>>2]=n[Me>>2],je=G+20|0,n[s+912>>2]=n[je>>2],(o[11698]|0)==0|se^1||(n[lt>>2]=OA(Ge)|0,n[lt+4>>2]=Ge,Ao(s,4,2972,lt),se=n[s+972>>2]|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xr),Ht(l)|0?xr=l:xr=y(_n(y(Lg(l,et)),Qe)),lf=y(c-Xe),l=y(lf-lt),Ht(l)|0?Eo=l:Eo=y(_n(y(Lg(l,Ge)),Ue)),Qe=Vn?xr:Eo,Rn=Vn?Eo:xr;e:do if((ar|0)==1)for(f=0,G=0;;){if(O=gs(s,G)|0,!f)y(rs(O))>y(0)&&y(qs(O))>y(0)?f=O:f=0;else if(Tm(O)|0){je=0;break e}if(G=G+1|0,G>>>0>=Ws>>>0){je=f;break}}else je=0;while(0);Nt=je+500|0,Mr=je+504|0,f=0,O=0,l=y(0),se=0;do{if(G=n[(n[wo>>2]|0)+(se<<2)>>2]|0,(n[G+36>>2]|0)==1)vu(G),o[G+985>>0]=1,o[G+984>>0]=0;else{vl(G),Q&&Cp(G,mt(G,Ds)|0,Qe,Rn,xr);do if((n[G+24>>2]|0)!=1)if((G|0)==(je|0)){n[Nt>>2]=n[2278],h[Mr>>2]=y(0);break}else{Lm(s,G,xr,d,Eo,xr,Eo,m,Ds,M);break}else O|0&&(n[O+960>>2]=G),n[G+960>>2]=0,O=G,f=(f|0)==0?G:f;while(0);vs=y(h[G+504>>2]),l=y(l+y(vs+y(ln(G,Rr,xr))))}se=se+1|0}while((se|0)!=(Ws|0));for(mo=l>Qe,Fl=kc&((ar|0)==2&mo)?1:ar,xn=(Rl|0)==1,ya=xn&(Q^1),Rp=(Fl|0)==1,Tp=(Fl|0)==2,xl=976+(Rr<<2)|0,Lp=(Rl|2|0)==2,Mp=xn&(kc^1),Ru=1040+(ur<<2)|0,Tu=1040+(Rr<<2)|0,Np=976+(ur<<2)|0,Op=(Rl|0)!=1,mo=kc&((ar|0)!=0&mo),go=s+976|0,xn=xn^1,l=Qe,Lr=0,yo=0,vs=y(0),Qc=y(0);;){e:do if(Lr>>>0>>0)for(Mr=n[wo>>2]|0,se=0,Ge=y(0),Ue=y(0),et=y(0),Qe=y(0),G=0,O=0,je=Lr;;){if(Nt=n[Mr+(je<<2)>>2]|0,(n[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+4>>2]|0)==3){O=0;break}O=(n[(Sc(G,ur)|0)+4>>2]|0)!=3}else O=0;while(0);Vt=y(h[Xa>>2]),Xt=y(h[Gs>>2]),hf=n[Ql>>2]|0,li=n[Wo>>2]|0,fa(G,Vn?Vt:Xt,Vn?Xt:Vt,Ds,Vn?hf:li,Vn?li:hf,xr,Eo,Q&(O^1),3488,M)|0,o[kl>>0]=o[kl>>0]|o[G+508>>0],G=n[G+960>>2]|0}while((G|0)!=0)}}else l=y(0);if(l=y(Pr+l),li=l>0]=li|u[kl>>0],Tp&l>y(0)?(O=n[xl>>2]|0,(n[s+364+(O<<3)+4>>2]|0)!=0&&(js=y(jr(s+364+(O<<3)|0,Co)),js>=y(0))?Qe=y(_n(y(0),y(js-y(sr-l)))):Qe=y(0)):Qe=l,Nt=Lr>>>0>>0,Nt){je=n[wo>>2]|0,se=Lr,O=0;do G=n[je+(se<<2)>>2]|0,n[G+24>>2]|0||(O=((n[(Dl(G,Rr)|0)+4>>2]|0)==3&1)+O|0,O=O+((n[(Sc(G,Rr)|0)+4>>2]|0)==3&1)|0),se=se+1|0;while((se|0)!=(ar|0));O?(Xe=y(0),c=y(0)):Xr=101}else Xr=101;e:do if((Xr|0)==101)switch(Xr=0,Up|0){case 1:{O=0,Xe=y(Qe*y(.5)),c=y(0);break e}case 2:{O=0,Xe=Qe,c=y(0);break e}case 3:{if(m>>>0<=1){O=0,Xe=y(0),c=y(0);break e}c=y((m+-1|0)>>>0),O=0,Xe=y(0),c=y(y(_n(Qe,y(0)))/c);break e}case 5:{c=y(Qe/y((m+1|0)>>>0)),O=0,Xe=c;break e}case 4:{c=y(Qe/y(m>>>0)),O=0,Xe=y(c*y(.5));break e}default:{O=0,Xe=y(0),c=y(0);break e}}while(0);if(l=y(_p+Xe),Nt){et=y(Qe/y(O|0)),se=n[wo>>2]|0,G=Lr,Qe=y(0);do{O=n[se+(G<<2)>>2]|0;e:do if((n[O+36>>2]|0)!=1){switch(n[O+24>>2]|0){case 1:{if(gi(O,Rr)|0){if(!Q)break e;Vt=y(Or(O,Rr,sr)),Vt=y(Vt+y(Cr(s,Rr))),Vt=y(Vt+y(K(O,Rr,xr))),h[O+400+(n[Tu>>2]<<2)>>2]=Vt;break e}break}case 0:if(li=(n[(Dl(O,Rr)|0)+4>>2]|0)==3,Vt=y(et+l),l=li?Vt:l,Q&&(li=O+400+(n[Tu>>2]<<2)|0,h[li>>2]=y(l+y(h[li>>2]))),li=(n[(Sc(O,Rr)|0)+4>>2]|0)==3,Vt=y(et+l),l=li?Vt:l,ya){Vt=y(c+y(ln(O,Rr,xr))),Qe=Rn,l=y(l+y(Vt+y(h[O+504>>2])));break e}else{l=y(l+y(c+y(ns(O,Rr,xr)))),Qe=y(_n(Qe,y(ns(O,ur,xr))));break e}default:}Q&&(Vt=y(Xe+y(Cr(s,Rr))),li=O+400+(n[Tu>>2]<<2)|0,h[li>>2]=y(Vt+y(h[li>>2])))}while(0);G=G+1|0}while((G|0)!=(ar|0))}else Qe=y(0);if(c=y(Hp+l),Lp?Xe=y(y(Bi(s,ur,y(Ys+Qe),Tc,B))-Ys):Xe=Rn,et=y(y(Bi(s,ur,y(Ys+(Mp?Rn:Qe)),Tc,B))-Ys),Nt&Q){G=Lr;do{se=n[(n[wo>>2]|0)+(G<<2)>>2]|0;do if((n[se+36>>2]|0)!=1){if((n[se+24>>2]|0)==1){if(gi(se,ur)|0){if(Vt=y(Or(se,ur,Rn)),Vt=y(Vt+y(Cr(s,ur))),Vt=y(Vt+y(K(se,ur,xr))),O=n[Ru>>2]|0,h[se+400+(O<<2)>>2]=Vt,!(Ht(Vt)|0))break}else O=n[Ru>>2]|0;Vt=y(Cr(s,ur)),h[se+400+(O<<2)>>2]=y(Vt+y(K(se,ur,xr)));break}O=ha(s,se)|0;do if((O|0)==4){if((n[(Dl(se,ur)|0)+4>>2]|0)==3){Xr=139;break}if((n[(Sc(se,ur)|0)+4>>2]|0)==3){Xr=139;break}if(ts(se,ur,Rn)|0){l=Me;break}hf=n[se+908+(n[xl>>2]<<2)>>2]|0,n[Gs>>2]=hf,l=y(h[se+396>>2]),li=Ht(l)|0,Qe=(n[v>>2]=hf,y(h[v>>2])),li?l=et:(Pr=y(ln(se,ur,xr)),Vt=y(Qe/l),l=y(l*Qe),l=y(Pr+(Vn?Vt:l))),h[Xa>>2]=l,h[Gs>>2]=y(y(ln(se,Rr,xr))+Qe),n[Wo>>2]=1,n[Ql>>2]=1,yr(se,Rr,sr,xr,Wo,Gs),yr(se,ur,Rn,xr,Ql,Xa),l=y(h[Gs>>2]),Pr=y(h[Xa>>2]),Vt=Vn?l:Pr,l=Vn?Pr:l,li=((Ht(Vt)|0)^1)&1,fa(se,Vt,l,Ds,li,((Ht(l)|0)^1)&1,xr,Eo,1,3493,M)|0,l=Me}else Xr=139;while(0);e:do if((Xr|0)==139){Xr=0,l=y(Xe-y(ns(se,ur,xr)));do if((n[(Dl(se,ur)|0)+4>>2]|0)==3){if((n[(Sc(se,ur)|0)+4>>2]|0)!=3)break;l=y(Me+y(_n(y(0),y(l*y(.5)))));break e}while(0);if((n[(Sc(se,ur)|0)+4>>2]|0)==3){l=Me;break}if((n[(Dl(se,ur)|0)+4>>2]|0)==3){l=y(Me+y(_n(y(0),l)));break}switch(O|0){case 1:{l=Me;break e}case 2:{l=y(Me+y(l*y(.5)));break e}default:{l=y(Me+l);break e}}}while(0);Vt=y(vs+l),li=se+400+(n[Ru>>2]<<2)|0,h[li>>2]=y(Vt+y(h[li>>2]))}while(0);G=G+1|0}while((G|0)!=(ar|0))}if(vs=y(vs+et),Qc=y(_n(Qc,c)),m=yo+1|0,ar>>>0>=Ws>>>0)break;l=sr,Lr=ar,yo=m}do if(Q){if(O=m>>>0>1,!O&&!(Yi(s)|0))break;if(!(Ht(Rn)|0)){l=y(Rn-vs);e:do switch(n[s+12>>2]|0){case 3:{Me=y(Me+l),Ue=y(0);break}case 2:{Me=y(Me+y(l*y(.5))),Ue=y(0);break}case 4:{Rn>vs?Ue=y(l/y(m>>>0)):Ue=y(0);break}case 7:if(Rn>vs){Me=y(Me+y(l/y(m<<1>>>0))),Ue=y(l/y(m>>>0)),Ue=O?Ue:y(0);break e}else{Me=y(Me+y(l*y(.5))),Ue=y(0);break e}case 6:{Ue=y(l/y(yo>>>0)),Ue=Rn>vs&O?Ue:y(0);break}default:Ue=y(0)}while(0);if(m|0)for(Nt=1040+(ur<<2)|0,Mr=976+(ur<<2)|0,je=0,G=0;;){e:do if(G>>>0>>0)for(Qe=y(0),et=y(0),l=y(0),se=G;;){O=n[(n[wo>>2]|0)+(se<<2)>>2]|0;do if((n[O+36>>2]|0)!=1&&(n[O+24>>2]|0)==0){if((n[O+940>>2]|0)!=(je|0))break e;if(Nm(O,ur)|0&&(Vt=y(h[O+908+(n[Mr>>2]<<2)>>2]),l=y(_n(l,y(Vt+y(ln(O,ur,xr)))))),(ha(s,O)|0)!=5)break;js=y(Wa(O)),js=y(js+y(K(O,0,xr))),Vt=y(h[O+912>>2]),Vt=y(y(Vt+y(ln(O,0,xr)))-js),js=y(_n(et,js)),Vt=y(_n(Qe,Vt)),Qe=Vt,et=js,l=y(_n(l,y(js+Vt)))}while(0);if(O=se+1|0,O>>>0>>0)se=O;else{se=O;break}}else et=y(0),l=y(0),se=G;while(0);if(lt=y(Ue+l),c=Me,Me=y(Me+lt),G>>>0>>0){Xe=y(c+et),O=G;do{G=n[(n[wo>>2]|0)+(O<<2)>>2]|0;e:do if((n[G+36>>2]|0)!=1&&(n[G+24>>2]|0)==0)switch(ha(s,G)|0){case 1:{Vt=y(c+y(K(G,ur,xr))),h[G+400+(n[Nt>>2]<<2)>>2]=Vt;break e}case 3:{Vt=y(y(Me-y(re(G,ur,xr)))-y(h[G+908+(n[Mr>>2]<<2)>>2])),h[G+400+(n[Nt>>2]<<2)>>2]=Vt;break e}case 2:{Vt=y(c+y(y(lt-y(h[G+908+(n[Mr>>2]<<2)>>2]))*y(.5))),h[G+400+(n[Nt>>2]<<2)>>2]=Vt;break e}case 4:{if(Vt=y(c+y(K(G,ur,xr))),h[G+400+(n[Nt>>2]<<2)>>2]=Vt,ts(G,ur,Rn)|0||(Vn?(Qe=y(h[G+908>>2]),l=y(Qe+y(ln(G,Rr,xr))),et=lt):(et=y(h[G+912>>2]),et=y(et+y(ln(G,ur,xr))),l=lt,Qe=y(h[G+908>>2])),Ii(l,Qe)|0&&Ii(et,y(h[G+912>>2]))|0))break e;fa(G,l,et,Ds,1,1,xr,Eo,1,3501,M)|0;break e}case 5:{h[G+404>>2]=y(y(Xe-y(Wa(G)))+y(Or(G,0,Rn)));break e}default:break e}while(0);O=O+1|0}while((O|0)!=(se|0))}if(je=je+1|0,(je|0)==(m|0))break;G=se}}}while(0);if(h[s+908>>2]=y(Bi(s,2,Fc,B,B)),h[s+912>>2]=y(Bi(s,0,lf,k,B)),(Fl|0)!=0&&(cf=n[s+32>>2]|0,uf=(Fl|0)==2,!(uf&(cf|0)!=2))?uf&(cf|0)==2&&(l=y(Rc+sr),l=y(_n(y(Lg(l,y(MA(s,Rr,Qc,Co)))),Rc)),Xr=198):(l=y(Bi(s,Rr,Qc,Co,B)),Xr=198),(Xr|0)==198&&(h[s+908+(n[976+(Rr<<2)>>2]<<2)>>2]=l),(Rl|0)!=0&&(ff=n[s+32>>2]|0,pf=(Rl|0)==2,!(pf&(ff|0)!=2))?pf&(ff|0)==2&&(l=y(Ys+Rn),l=y(_n(y(Lg(l,y(MA(s,ur,y(Ys+vs),Tc)))),Ys)),Xr=204):(l=y(Bi(s,ur,y(Ys+vs),Tc,B)),Xr=204),(Xr|0)==204&&(h[s+908+(n[976+(ur<<2)>>2]<<2)>>2]=l),Q){if((n[Af>>2]|0)==2){G=976+(ur<<2)|0,se=1040+(ur<<2)|0,O=0;do je=gs(s,O)|0,n[je+24>>2]|0||(hf=n[G>>2]|0,Vt=y(h[s+908+(hf<<2)>>2]),li=je+400+(n[se>>2]<<2)|0,Vt=y(Vt-y(h[li>>2])),h[li>>2]=y(Vt-y(h[je+908+(hf<<2)>>2]))),O=O+1|0;while((O|0)!=(Ws|0))}if(f|0){O=Vn?Fl:d;do Om(s,f,xr,O,Eo,Ds,M),f=n[f+960>>2]|0;while((f|0)!=0)}if(O=(Rr|2|0)==3,G=(ur|2|0)==3,O|G){f=0;do se=n[(n[wo>>2]|0)+(f<<2)>>2]|0,(n[se+36>>2]|0)!=1&&(O&&Ip(s,se,Rr),G&&Ip(s,se,ur)),f=f+1|0;while((f|0)!=(Ws|0))}}}while(0);C=Tl}function pa(s,l){s=s|0,l=y(l);var c=0;oa(s,l>=y(0),3147),c=l==y(0),h[s+4>>2]=c?y(0):l}function Dc(s,l,c,f){s=s|0,l=y(l),c=y(c),f=f|0;var d=Ze,m=Ze,B=0,k=0,Q=0;n[2278]=(n[2278]|0)+1,vl(s),ts(s,2,l)|0?(d=y(jr(n[s+992>>2]|0,l)),Q=1,d=y(d+y(ln(s,2,l)))):(d=y(jr(s+380|0,l)),d>=y(0)?Q=2:(Q=((Ht(l)|0)^1)&1,d=l)),ts(s,0,c)|0?(m=y(jr(n[s+996>>2]|0,c)),k=1,m=y(m+y(ln(s,0,l)))):(m=y(jr(s+388|0,c)),m>=y(0)?k=2:(k=((Ht(c)|0)^1)&1,m=c)),B=s+976|0,fa(s,d,m,f,Q,k,l,c,1,3189,n[B>>2]|0)|0&&(Cp(s,n[s+496>>2]|0,l,c,l),Pc(s,y(h[(n[B>>2]|0)+4>>2]),y(0),y(0)),o[11696]|0)&&Qm(s,7)}function vl(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;k=C,C=C+32|0,B=k+24|0,m=k+16|0,f=k+8|0,d=k,c=0;do l=s+380+(c<<3)|0,(n[s+380+(c<<3)+4>>2]|0)!=0&&(Q=l,M=n[Q+4>>2]|0,O=f,n[O>>2]=n[Q>>2],n[O+4>>2]=M,O=s+364+(c<<3)|0,M=n[O+4>>2]|0,Q=d,n[Q>>2]=n[O>>2],n[Q+4>>2]=M,n[m>>2]=n[f>>2],n[m+4>>2]=n[f+4>>2],n[B>>2]=n[d>>2],n[B+4>>2]=n[d+4>>2],ws(m,B)|0)||(l=s+348+(c<<3)|0),n[s+992+(c<<2)>>2]=l,c=c+1|0;while((c|0)!=2);C=k}function ts(s,l,c){s=s|0,l=l|0,c=y(c);var f=0;switch(s=n[s+992+(n[976+(l<<2)>>2]<<2)>>2]|0,n[s+4>>2]|0){case 0:case 3:{s=0;break}case 1:{y(h[s>>2])>2])>2]|0){case 2:{l=y(y(y(h[s>>2])*l)/y(100));break}case 1:{l=y(h[s>>2]);break}default:l=y(ue)}return y(l)}function Cp(s,l,c,f,d){s=s|0,l=l|0,c=y(c),f=y(f),d=y(d);var m=0,B=Ze;l=n[s+944>>2]|0?l:1,m=fr(n[s+4>>2]|0,l)|0,l=ww(m,l)|0,c=y(Mm(s,m,c)),f=y(Mm(s,l,f)),B=y(c+y(K(s,m,d))),h[s+400+(n[1040+(m<<2)>>2]<<2)>>2]=B,c=y(c+y(re(s,m,d))),h[s+400+(n[1e3+(m<<2)>>2]<<2)>>2]=c,c=y(f+y(K(s,l,d))),h[s+400+(n[1040+(l<<2)>>2]<<2)>>2]=c,d=y(f+y(re(s,l,d))),h[s+400+(n[1e3+(l<<2)>>2]<<2)>>2]=d}function Pc(s,l,c,f){s=s|0,l=y(l),c=y(c),f=y(f);var d=0,m=0,B=Ze,k=Ze,Q=0,M=0,O=Ze,G=0,se=Ze,je=Ze,Me=Ze,Qe=Ze;if(l!=y(0)&&(d=s+400|0,Qe=y(h[d>>2]),m=s+404|0,Me=y(h[m>>2]),G=s+416|0,je=y(h[G>>2]),M=s+420|0,B=y(h[M>>2]),se=y(Qe+c),O=y(Me+f),f=y(se+je),k=y(O+B),Q=(n[s+988>>2]|0)==1,h[d>>2]=y(jo(Qe,l,0,Q)),h[m>>2]=y(jo(Me,l,0,Q)),c=y(bR(y(je*l),y(1))),Ii(c,y(0))|0?m=0:m=(Ii(c,y(1))|0)^1,c=y(bR(y(B*l),y(1))),Ii(c,y(0))|0?d=0:d=(Ii(c,y(1))|0)^1,Qe=y(jo(f,l,Q&m,Q&(m^1))),h[G>>2]=y(Qe-y(jo(se,l,0,Q))),Qe=y(jo(k,l,Q&d,Q&(d^1))),h[M>>2]=y(Qe-y(jo(O,l,0,Q))),m=(n[s+952>>2]|0)-(n[s+948>>2]|0)>>2,m|0)){d=0;do Pc(gs(s,d)|0,l,se,O),d=d+1|0;while((d|0)!=(m|0))}}function Cw(s,l,c,f,d){switch(s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,c|0){case 5:case 0:{s=i7(n[489]|0,f,d)|0;break}default:s=XUe(f,d)|0}return s|0}function Cg(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;d=C,C=C+16|0,m=d,n[m>>2]=f,wg(s,0,l,c,m),C=d}function wg(s,l,c,f,d){if(s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,s=s|0?s:956,D7[n[s+8>>2]&1](s,l,c,f,d)|0,(c|0)==5)Rt();else return}function Ya(s,l,c){s=s|0,l=l|0,c=c|0,o[s+l>>0]=c&1}function Rm(s,l){s=s|0,l=l|0;var c=0,f=0;n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,c=l+4|0,f=(n[c>>2]|0)-(n[l>>2]|0)>>2,f|0&&(Ig(s,f),Qt(s,n[l>>2]|0,n[c>>2]|0,f))}function Ig(s,l){s=s|0,l=l|0;var c=0;if((L(s)|0)>>>0>>0&&Jr(s),l>>>0>1073741823)Rt();else{c=Kt(l<<2)|0,n[s+4>>2]=c,n[s>>2]=c,n[s+8>>2]=c+(l<<2);return}}function Qt(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,f=s+4|0,s=c-l|0,(s|0)>0&&(Dr(n[f>>2]|0,l|0,s|0)|0,n[f>>2]=(n[f>>2]|0)+(s>>>2<<2))}function L(s){return s=s|0,1073741823}function K(s,l,c){return s=s|0,l=l|0,c=y(c),pe(l)|0&&(n[s+96>>2]|0)!=0?s=s+92|0:s=Fn(s+60|0,n[1040+(l<<2)>>2]|0,992)|0,y(Je(s,c))}function re(s,l,c){return s=s|0,l=l|0,c=y(c),pe(l)|0&&(n[s+104>>2]|0)!=0?s=s+100|0:s=Fn(s+60|0,n[1e3+(l<<2)>>2]|0,992)|0,y(Je(s,c))}function pe(s){return s=s|0,(s|1|0)==3|0}function Je(s,l){return s=s|0,l=y(l),(n[s+4>>2]|0)==3?l=y(0):l=y(jr(s,l)),y(l)}function mt(s,l){return s=s|0,l=l|0,s=n[s>>2]|0,((s|0)==0?(l|0)>1?l:1:s)|0}function fr(s,l){s=s|0,l=l|0;var c=0;e:do if((l|0)==2){switch(s|0){case 2:{s=3;break e}case 3:break;default:{c=4;break e}}s=2}else c=4;while(0);return s|0}function Cr(s,l){s=s|0,l=l|0;var c=Ze;return pe(l)|0&&(n[s+312>>2]|0)!=0&&(c=y(h[s+308>>2]),c>=y(0))||(c=y(_n(y(h[(Fn(s+276|0,n[1040+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(c)}function yn(s,l){s=s|0,l=l|0;var c=Ze;return pe(l)|0&&(n[s+320>>2]|0)!=0&&(c=y(h[s+316>>2]),c>=y(0))||(c=y(_n(y(h[(Fn(s+276|0,n[1e3+(l<<2)>>2]|0,992)|0)>>2]),y(0)))),y(c)}function oi(s,l,c){s=s|0,l=l|0,c=y(c);var f=Ze;return pe(l)|0&&(n[s+240>>2]|0)!=0&&(f=y(jr(s+236|0,c)),f>=y(0))||(f=y(_n(y(jr(Fn(s+204|0,n[1040+(l<<2)>>2]|0,992)|0,c)),y(0)))),y(f)}function Oi(s,l,c){s=s|0,l=l|0,c=y(c);var f=Ze;return pe(l)|0&&(n[s+248>>2]|0)!=0&&(f=y(jr(s+244|0,c)),f>=y(0))||(f=y(_n(y(jr(Fn(s+204|0,n[1e3+(l<<2)>>2]|0,992)|0,c)),y(0)))),y(f)}function Bg(s,l,c,f,d,m,B){s=s|0,l=y(l),c=y(c),f=f|0,d=d|0,m=y(m),B=y(B);var k=Ze,Q=Ze,M=Ze,O=Ze,G=Ze,se=Ze,je=0,Me=0,Qe=0;Qe=C,C=C+16|0,je=Qe,Me=s+964|0,Un(s,(n[Me>>2]|0)!=0,3519),k=y(En(s,2,l)),Q=y(En(s,0,l)),M=y(ln(s,2,l)),O=y(ln(s,0,l)),Ht(l)|0?G=l:G=y(_n(y(0),y(y(l-M)-k))),Ht(c)|0?se=c:se=y(_n(y(0),y(y(c-O)-Q))),(f|0)==1&(d|0)==1?(h[s+908>>2]=y(Bi(s,2,y(l-M),m,m)),l=y(Bi(s,0,y(c-O),B,m))):(P7[n[Me>>2]&1](je,s,G,f,se,d),G=y(k+y(h[je>>2])),se=y(l-M),h[s+908>>2]=y(Bi(s,2,(f|2|0)==2?G:se,m,m)),se=y(Q+y(h[je+4>>2])),l=y(c-O),l=y(Bi(s,0,(d|2|0)==2?se:l,B,m))),h[s+912>>2]=l,C=Qe}function jv(s,l,c,f,d,m,B){s=s|0,l=y(l),c=y(c),f=f|0,d=d|0,m=y(m),B=y(B);var k=Ze,Q=Ze,M=Ze,O=Ze;M=y(En(s,2,m)),k=y(En(s,0,m)),O=y(ln(s,2,m)),Q=y(ln(s,0,m)),l=y(l-O),h[s+908>>2]=y(Bi(s,2,(f|2|0)==2?M:l,m,m)),c=y(c-Q),h[s+912>>2]=y(Bi(s,0,(d|2|0)==2?k:c,B,m))}function Yv(s,l,c,f,d,m,B){s=s|0,l=y(l),c=y(c),f=f|0,d=d|0,m=y(m),B=y(B);var k=0,Q=Ze,M=Ze;return k=(f|0)==2,!(l<=y(0)&k)&&!(c<=y(0)&(d|0)==2)&&!((f|0)==1&(d|0)==1)?s=0:(Q=y(ln(s,0,m)),M=y(ln(s,2,m)),k=l>2]=y(Bi(s,2,k?y(0):l,m,m)),l=y(c-Q),k=c>2]=y(Bi(s,0,k?y(0):l,B,m)),s=1),s|0}function ww(s,l){return s=s|0,l=l|0,UA(s)|0?s=fr(2,l)|0:s=0,s|0}function wp(s,l,c){return s=s|0,l=l|0,c=y(c),c=y(oi(s,l,c)),y(c+y(Cr(s,l)))}function Iw(s,l,c){return s=s|0,l=l|0,c=y(c),c=y(Oi(s,l,c)),y(c+y(yn(s,l)))}function En(s,l,c){s=s|0,l=l|0,c=y(c);var f=Ze;return f=y(wp(s,l,c)),y(f+y(Iw(s,l,c)))}function Tm(s){return s=s|0,n[s+24>>2]|0?s=0:y(rs(s))!=y(0)?s=1:s=y(qs(s))!=y(0),s|0}function rs(s){s=s|0;var l=Ze;if(n[s+944>>2]|0){if(l=y(h[s+44>>2]),Ht(l)|0)return l=y(h[s+40>>2]),s=l>y(0)&((Ht(l)|0)^1),y(s?l:y(0))}else l=y(0);return y(l)}function qs(s){s=s|0;var l=Ze,c=0,f=Ze;do if(n[s+944>>2]|0){if(l=y(h[s+48>>2]),Ht(l)|0){if(c=o[(n[s+976>>2]|0)+2>>0]|0,c<<24>>24==0&&(f=y(h[s+40>>2]),f>24?y(1):y(0)}}else l=y(0);while(0);return y(l)}function vu(s){s=s|0;var l=0,c=0;if(Xm(s+400|0,0,540)|0,o[s+985>>0]=1,$(s),c=wi(s)|0,c|0){l=s+948|0,s=0;do vu(n[(n[l>>2]|0)+(s<<2)>>2]|0),s=s+1|0;while((s|0)!=(c|0))}}function Lm(s,l,c,f,d,m,B,k,Q,M){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=y(m),B=y(B),k=k|0,Q=Q|0,M=M|0;var O=0,G=Ze,se=0,je=0,Me=Ze,Qe=Ze,et=0,Xe=Ze,lt=0,Ue=Ze,Ge=0,Nt=0,Mr=0,ar=0,Xt=0,Pr=0,Lr=0,sr=0,xn=0,go=0;xn=C,C=C+16|0,Mr=xn+12|0,ar=xn+8|0,Xt=xn+4|0,Pr=xn,sr=fr(n[s+4>>2]|0,Q)|0,Ge=pe(sr)|0,G=y(jr(Bw(l)|0,Ge?m:B)),Nt=ts(l,2,m)|0,Lr=ts(l,0,B)|0;do if(!(Ht(G)|0)&&!(Ht(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Pr>>2]=1,!et)&&(h[Mr>>2]=y(Qe*y(d-Ue)),n[Xt>>2]=1),yr(l,2,m,m,Xt,Mr),yr(l,0,B,m,Pr,ar),c=y(h[Mr>>2]),d=y(h[ar>>2]),fa(l,c,d,Q,n[Xt>>2]|0,n[Pr>>2]|0,m,B,0,3565,M)|0,B=y(h[l+908+(n[976+(sr<<2)>>2]<<2)>>2]),h[l+504>>2]=y(_n(B,y(En(l,sr,m))))}while(0);n[l+500>>2]=n[2278],C=xn}function Bi(s,l,c,f,d){return s=s|0,l=l|0,c=y(c),f=y(f),d=y(d),f=y(MA(s,l,c,f)),y(_n(f,y(En(s,l,d))))}function ha(s,l){return s=s|0,l=l|0,l=l+20|0,l=n[((n[l>>2]|0)==0?s+16|0:l)>>2]|0,(l|0)==5&&UA(n[s+4>>2]|0)|0&&(l=1),l|0}function Dl(s,l){return s=s|0,l=l|0,pe(l)|0&&(n[s+96>>2]|0)!=0?l=4:l=n[1040+(l<<2)>>2]|0,s+60+(l<<3)|0}function Sc(s,l){return s=s|0,l=l|0,pe(l)|0&&(n[s+104>>2]|0)!=0?l=5:l=n[1e3+(l<<2)>>2]|0,s+60+(l<<3)|0}function yr(s,l,c,f,d,m){switch(s=s|0,l=l|0,c=y(c),f=y(f),d=d|0,m=m|0,c=y(jr(s+380+(n[976+(l<<2)>>2]<<3)|0,c)),c=y(c+y(ln(s,l,f))),n[d>>2]|0){case 2:case 1:{d=Ht(c)|0,f=y(h[m>>2]),h[m>>2]=d|f>2]=2,h[m>>2]=c);break}default:}}function gi(s,l){return s=s|0,l=l|0,s=s+132|0,pe(l)|0&&(n[(Fn(s,4,948)|0)+4>>2]|0)!=0?s=1:s=(n[(Fn(s,n[1040+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,s|0}function Or(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0;return s=s+132|0,pe(l)|0&&(f=Fn(s,4,948)|0,(n[f+4>>2]|0)!=0)?d=4:(f=Fn(s,n[1040+(l<<2)>>2]|0,948)|0,n[f+4>>2]|0?d=4:c=y(0)),(d|0)==4&&(c=y(jr(f,c))),y(c)}function ns(s,l,c){s=s|0,l=l|0,c=y(c);var f=Ze;return f=y(h[s+908+(n[976+(l<<2)>>2]<<2)>>2]),f=y(f+y(K(s,l,c))),y(f+y(re(s,l,c)))}function Yi(s){s=s|0;var l=0,c=0,f=0;e:do if(UA(n[s+4>>2]|0)|0)l=0;else if((n[s+16>>2]|0)!=5)if(c=wi(s)|0,!c)l=0;else for(l=0;;){if(f=gs(s,l)|0,(n[f+24>>2]|0)==0&&(n[f+20>>2]|0)==5){l=1;break e}if(l=l+1|0,l>>>0>=c>>>0){l=0;break}}else l=1;while(0);return l|0}function Nm(s,l){s=s|0,l=l|0;var c=Ze;return c=y(h[s+908+(n[976+(l<<2)>>2]<<2)>>2]),c>=y(0)&((Ht(c)|0)^1)|0}function Wa(s){s=s|0;var l=Ze,c=0,f=0,d=0,m=0,B=0,k=0,Q=Ze;if(c=n[s+968>>2]|0,c)Q=y(h[s+908>>2]),l=y(h[s+912>>2]),l=y(w7[c&0](s,Q,l)),Un(s,(Ht(l)|0)^1,3573);else{m=wi(s)|0;do if(m|0){for(c=0,d=0;;){if(f=gs(s,d)|0,n[f+940>>2]|0){B=8;break}if((n[f+24>>2]|0)!=1)if(k=(ha(s,f)|0)==5,k){c=f;break}else c=(c|0)==0?f:c;if(d=d+1|0,d>>>0>=m>>>0){B=8;break}}if((B|0)==8&&!c)break;return l=y(Wa(c)),y(l+y(h[c+404>>2]))}while(0);l=y(h[s+912>>2])}return y(l)}function MA(s,l,c,f){s=s|0,l=l|0,c=y(c),f=y(f);var d=Ze,m=0;return UA(l)|0?(l=1,m=3):pe(l)|0?(l=0,m=3):(f=y(ue),d=y(ue)),(m|0)==3&&(d=y(jr(s+364+(l<<3)|0,f)),f=y(jr(s+380+(l<<3)|0,f))),m=f=y(0)&((Ht(f)|0)^1)),c=m?f:c,m=d>=y(0)&((Ht(d)|0)^1)&c>2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=y(h[s+908+(Ue<<2)>>2]),lt=y(y(lt-y(h[l+908+(Ue<<2)>>2]))*y(.5)),h[l+400+(n[1040+(et<<2)>>2]<<2)>>2]=lt;break}!(gi(l,et)|0)&&(n[s+8>>2]|0)==2&&(Ue=n[976+(et<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(lt-y(h[l+908+(Ue<<2)>>2])),h[l+400+(n[1040+(et<<2)>>2]<<2)>>2]=lt)}while(0);or(l,Me)|0&&!(gi(l,Me)|0)?(Ue=n[976+(Me<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(lt-y(h[l+908+(Ue<<2)>>2])),lt=y(lt-y(yn(s,Me))),lt=y(lt-y(re(l,Me,c))),lt=y(lt-y(Du(l,Me,Qe?d:c))),h[l+400+(n[1040+(Me<<2)>>2]<<2)>>2]=lt):Xe=30;do if((Xe|0)==30&&!(gi(l,Me)|0)){if((ha(s,l)|0)==2){Ue=n[976+(Me<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(y(lt-y(h[l+908+(Ue<<2)>>2]))*y(.5)),h[l+400+(n[1040+(Me<<2)>>2]<<2)>>2]=lt;break}Ue=(ha(s,l)|0)==3,Ue^(n[s+28>>2]|0)==2&&(Ue=n[976+(Me<<2)>>2]|0,lt=y(h[s+908+(Ue<<2)>>2]),lt=y(lt-y(h[l+908+(Ue<<2)>>2])),h[l+400+(n[1040+(Me<<2)>>2]<<2)>>2]=lt)}while(0)}function Ip(s,l,c){s=s|0,l=l|0,c=c|0;var f=Ze,d=0;d=n[976+(c<<2)>>2]|0,f=y(h[l+908+(d<<2)>>2]),f=y(y(h[s+908+(d<<2)>>2])-f),f=y(f-y(h[l+400+(n[1040+(c<<2)>>2]<<2)>>2])),h[l+400+(n[1e3+(c<<2)>>2]<<2)>>2]=f}function UA(s){return s=s|0,(s|1|0)==1|0}function Bw(s){s=s|0;var l=Ze;switch(n[s+56>>2]|0){case 0:case 3:{l=y(h[s+40>>2]),l>y(0)&((Ht(l)|0)^1)?s=o[(n[s+976>>2]|0)+2>>0]|0?1056:992:s=1056;break}default:s=s+52|0}return s|0}function vw(s,l){return s=s|0,l=l|0,(o[s+l>>0]|0)!=0|0}function or(s,l){return s=s|0,l=l|0,s=s+132|0,pe(l)|0&&(n[(Fn(s,5,948)|0)+4>>2]|0)!=0?s=1:s=(n[(Fn(s,n[1e3+(l<<2)>>2]|0,948)|0)+4>>2]|0)!=0,s|0}function Du(s,l,c){s=s|0,l=l|0,c=y(c);var f=0,d=0;return s=s+132|0,pe(l)|0&&(f=Fn(s,5,948)|0,(n[f+4>>2]|0)!=0)?d=4:(f=Fn(s,n[1e3+(l<<2)>>2]|0,948)|0,n[f+4>>2]|0?d=4:c=y(0)),(d|0)==4&&(c=y(jr(f,c))),y(c)}function Mm(s,l,c){return s=s|0,l=l|0,c=y(c),gi(s,l)|0?c=y(Or(s,l,c)):c=y(-y(Du(s,l,c))),y(c)}function Pu(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function Bp(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>1073741823)Rt();else{d=Kt(l<<2)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<2)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<2)}function vg(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function _A(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-4-l|0)>>>2)<<2)),s=n[s>>2]|0,s|0&>(s)}function HA(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0;if(B=s+4|0,k=n[B>>2]|0,d=k-f|0,m=d>>2,s=l+(m<<2)|0,s>>>0>>0){f=k;do n[f>>2]=n[s>>2],s=s+4|0,f=(n[B>>2]|0)+4|0,n[B>>2]=f;while(s>>>0>>0)}m|0&&Mw(k+(0-m<<2)|0,l|0,d|0)|0}function Dg(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0;return k=l+4|0,Q=n[k>>2]|0,d=n[s>>2]|0,B=c,m=B-d|0,f=Q+(0-(m>>2)<<2)|0,n[k>>2]=f,(m|0)>0&&Dr(f|0,d|0,m|0)|0,d=s+4|0,m=l+8|0,f=(n[d>>2]|0)-B|0,(f|0)>0&&(Dr(n[m>>2]|0,c|0,f|0)|0,n[m>>2]=(n[m>>2]|0)+(f>>>2<<2)),B=n[s>>2]|0,n[s>>2]=n[k>>2],n[k>>2]=B,B=n[d>>2]|0,n[d>>2]=n[m>>2],n[m>>2]=B,B=s+8|0,c=l+12|0,s=n[B>>2]|0,n[B>>2]=n[c>>2],n[c>>2]=s,n[l>>2]=n[k>>2],Q|0}function Dw(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;if(B=n[l>>2]|0,m=n[c>>2]|0,(B|0)!=(m|0)){d=s+8|0,c=((m+-4-B|0)>>>2)+1|0,s=B,f=n[d>>2]|0;do n[f>>2]=n[s>>2],f=(n[d>>2]|0)+4|0,n[d>>2]=f,s=s+4|0;while((s|0)!=(m|0));n[l>>2]=B+(c<<2)}}function Um(){mc()}function ga(){var s=0;return s=Kt(4)|0,qA(s),s|0}function qA(s){s=s|0,n[s>>2]=ys()|0}function bc(s){s=s|0,s|0&&(Pg(s),gt(s))}function Pg(s){s=s|0,tt(n[s>>2]|0)}function _m(s,l,c){s=s|0,l=l|0,c=c|0,Ya(n[s>>2]|0,l,c)}function fo(s,l){s=s|0,l=y(l),pa(n[s>>2]|0,l)}function Wv(s,l){return s=s|0,l=l|0,vw(n[s>>2]|0,l)|0}function Pw(){var s=0;return s=Kt(8)|0,Kv(s,0),s|0}function Kv(s,l){s=s|0,l=l|0,l?l=Ci(n[l>>2]|0)|0:l=co()|0,n[s>>2]=l,n[s+4>>2]=0,bi(l,s)}function AF(s){s=s|0;var l=0;return l=Kt(8)|0,Kv(l,s),l|0}function zv(s){s=s|0,s|0&&(Su(s),gt(s))}function Su(s){s=s|0;var l=0;la(n[s>>2]|0),l=s+4|0,s=n[l>>2]|0,n[l>>2]=0,s|0&&(GA(s),gt(s))}function GA(s){s=s|0,jA(s)}function jA(s){s=s|0,s=n[s>>2]|0,s|0&&SA(s|0)}function Sw(s){return s=s|0,qo(s)|0}function Hm(s){s=s|0;var l=0,c=0;c=s+4|0,l=n[c>>2]|0,n[c>>2]=0,l|0&&(GA(l),gt(l)),_s(n[s>>2]|0)}function fF(s,l){s=s|0,l=l|0,$r(n[s>>2]|0,n[l>>2]|0)}function pF(s,l){s=s|0,l=l|0,ca(n[s>>2]|0,l)}function Vv(s,l,c){s=s|0,l=l|0,c=+c,Eu(n[s>>2]|0,l,y(c))}function Jv(s,l,c){s=s|0,l=l|0,c=+c,Es(n[s>>2]|0,l,y(c))}function bw(s,l){s=s|0,l=l|0,du(n[s>>2]|0,l)}function bu(s,l){s=s|0,l=l|0,mu(n[s>>2]|0,l)}function hF(s,l){s=s|0,l=l|0,FA(n[s>>2]|0,l)}function gF(s,l){s=s|0,l=l|0,kA(n[s>>2]|0,l)}function vp(s,l){s=s|0,l=l|0,Ec(n[s>>2]|0,l)}function dF(s,l){s=s|0,l=l|0,fp(n[s>>2]|0,l)}function Xv(s,l,c){s=s|0,l=l|0,c=+c,wc(n[s>>2]|0,l,y(c))}function YA(s,l,c){s=s|0,l=l|0,c=+c,j(n[s>>2]|0,l,y(c))}function mF(s,l){s=s|0,l=l|0,Il(n[s>>2]|0,l)}function yF(s,l){s=s|0,l=l|0,lg(n[s>>2]|0,l)}function Zv(s,l){s=s|0,l=l|0,pp(n[s>>2]|0,l)}function xw(s,l){s=s|0,l=+l,RA(n[s>>2]|0,y(l))}function kw(s,l){s=s|0,l=+l,qa(n[s>>2]|0,y(l))}function EF(s,l){s=s|0,l=+l,ji(n[s>>2]|0,y(l))}function CF(s,l){s=s|0,l=+l,Hs(n[s>>2]|0,y(l))}function Pl(s,l){s=s|0,l=+l,yu(n[s>>2]|0,y(l))}function Qw(s,l){s=s|0,l=+l,yw(n[s>>2]|0,y(l))}function wF(s,l){s=s|0,l=+l,TA(n[s>>2]|0,y(l))}function WA(s){s=s|0,hp(n[s>>2]|0)}function qm(s,l){s=s|0,l=+l,Cs(n[s>>2]|0,y(l))}function xu(s,l){s=s|0,l=+l,Ag(n[s>>2]|0,y(l))}function Fw(s){s=s|0,fg(n[s>>2]|0)}function Rw(s,l){s=s|0,l=+l,gp(n[s>>2]|0,y(l))}function IF(s,l){s=s|0,l=+l,Bc(n[s>>2]|0,y(l))}function $v(s,l){s=s|0,l=+l,bm(n[s>>2]|0,y(l))}function KA(s,l){s=s|0,l=+l,hg(n[s>>2]|0,y(l))}function eD(s,l){s=s|0,l=+l,wu(n[s>>2]|0,y(l))}function Gm(s,l){s=s|0,l=+l,xm(n[s>>2]|0,y(l))}function tD(s,l){s=s|0,l=+l,Iu(n[s>>2]|0,y(l))}function rD(s,l){s=s|0,l=+l,Ew(n[s>>2]|0,y(l))}function jm(s,l){s=s|0,l=+l,Aa(n[s>>2]|0,y(l))}function nD(s,l,c){s=s|0,l=l|0,c=+c,Cu(n[s>>2]|0,l,y(c))}function BF(s,l,c){s=s|0,l=l|0,c=+c,xi(n[s>>2]|0,l,y(c))}function P(s,l,c){s=s|0,l=l|0,c=+c,Ic(n[s>>2]|0,l,y(c))}function D(s){return s=s|0,ag(n[s>>2]|0)|0}function T(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=C,C=C+16|0,d=f,Cc(d,n[l>>2]|0,c),q(s,d),C=f}function q(s,l){s=s|0,l=l|0,Y(s,n[l+4>>2]|0,+y(h[l>>2]))}function Y(s,l,c){s=s|0,l=l|0,c=+c,n[s>>2]=l,E[s+8>>3]=c}function Ae(s){return s=s|0,og(n[s>>2]|0)|0}function De(s){return s=s|0,uo(n[s>>2]|0)|0}function vt(s){return s=s|0,yc(n[s>>2]|0)|0}function wt(s){return s=s|0,QA(n[s>>2]|0)|0}function xt(s){return s=s|0,Sm(n[s>>2]|0)|0}function _r(s){return s=s|0,sg(n[s>>2]|0)|0}function is(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=C,C=C+16|0,d=f,Dt(d,n[l>>2]|0,c),q(s,d),C=f}function di(s){return s=s|0,ei(n[s>>2]|0)|0}function po(s){return s=s|0,cg(n[s>>2]|0)|0}function zA(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,ua(f,n[l>>2]|0),q(s,f),C=c}function Yo(s){return s=s|0,+ +y(Gi(n[s>>2]|0))}function rt(s){return s=s|0,+ +y(es(n[s>>2]|0))}function ze(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,Br(f,n[l>>2]|0),q(s,f),C=c}function ft(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,pg(f,n[l>>2]|0),q(s,f),C=c}function Wt(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,Ct(f,n[l>>2]|0),q(s,f),C=c}function vr(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,gg(f,n[l>>2]|0),q(s,f),C=c}function Sn(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,dg(f,n[l>>2]|0),q(s,f),C=c}function Fr(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,km(f,n[l>>2]|0),q(s,f),C=c}function bn(s){return s=s|0,+ +y(vc(n[s>>2]|0))}function ai(s,l){return s=s|0,l=l|0,+ +y(ug(n[s>>2]|0,l))}function tn(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=C,C=C+16|0,d=f,ct(d,n[l>>2]|0,c),q(s,d),C=f}function ho(s,l,c){s=s|0,l=l|0,c=c|0,ir(n[s>>2]|0,n[l>>2]|0,c)}function vF(s,l){s=s|0,l=l|0,ms(n[s>>2]|0,n[l>>2]|0)}function tve(s){return s=s|0,wi(n[s>>2]|0)|0}function rve(s){return s=s|0,s=ht(n[s>>2]|0)|0,s?s=Sw(s)|0:s=0,s|0}function nve(s,l){return s=s|0,l=l|0,s=gs(n[s>>2]|0,l)|0,s?s=Sw(s)|0:s=0,s|0}function ive(s,l){s=s|0,l=l|0;var c=0,f=0;f=Kt(4)|0,Jj(f,l),c=s+4|0,l=n[c>>2]|0,n[c>>2]=f,l|0&&(GA(l),gt(l)),It(n[s>>2]|0,1)}function Jj(s,l){s=s|0,l=l|0,dve(s,l)}function sve(s,l,c,f,d,m){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=m|0;var B=0,k=0;B=C,C=C+16|0,k=B,ove(k,qo(l)|0,+c,f,+d,m),h[s>>2]=y(+E[k>>3]),h[s+4>>2]=y(+E[k+8>>3]),C=B}function ove(s,l,c,f,d,m){s=s|0,l=l|0,c=+c,f=f|0,d=+d,m=m|0;var B=0,k=0,Q=0,M=0,O=0;B=C,C=C+32|0,O=B+8|0,M=B+20|0,Q=B,k=B+16|0,E[O>>3]=c,n[M>>2]=f,E[Q>>3]=d,n[k>>2]=m,ave(s,n[l+4>>2]|0,O,M,Q,k),C=B}function ave(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,k=0;B=C,C=C+16|0,k=B,za(k),l=da(l)|0,lve(s,l,+E[c>>3],n[f>>2]|0,+E[d>>3],n[m>>2]|0),Va(k),C=B}function da(s){return s=s|0,n[s>>2]|0}function lve(s,l,c,f,d,m){s=s|0,l=l|0,c=+c,f=f|0,d=+d,m=m|0;var B=0;B=Sl(cve()|0)|0,c=+VA(c),f=DF(f)|0,d=+VA(d),uve(s,hi(0,B|0,l|0,+c,f|0,+d,DF(m)|0)|0)}function cve(){var s=0;return o[7608]|0||(hve(9120),s=7608,n[s>>2]=1,n[s+4>>2]=0),9120}function Sl(s){return s=s|0,n[s+8>>2]|0}function VA(s){return s=+s,+ +PF(s)}function DF(s){return s=s|0,Zj(s)|0}function uve(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;d=C,C=C+32|0,c=d,f=l,f&1?(Ave(c,0),ii(f|0,c|0)|0,fve(s,c),pve(c)):(n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=n[l+8>>2],n[s+12>>2]=n[l+12>>2]),C=d}function Ave(s,l){s=s|0,l=l|0,Xj(s,l),n[s+8>>2]=0,o[s+24>>0]=0}function fve(s,l){s=s|0,l=l|0,l=l+8|0,n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=n[l+8>>2],n[s+12>>2]=n[l+12>>2]}function pve(s){s=s|0,o[s+24>>0]=0}function Xj(s,l){s=s|0,l=l|0,n[s>>2]=l}function Zj(s){return s=s|0,s|0}function PF(s){return s=+s,+s}function hve(s){s=s|0,bl(s,gve()|0,4)}function gve(){return 1064}function bl(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c,n[s+8>>2]=Ap(l|0,c+1|0)|0}function dve(s,l){s=s|0,l=l|0,l=n[l>>2]|0,n[s>>2]=l,El(l|0)}function mve(s){s=s|0;var l=0,c=0;c=s+4|0,l=n[c>>2]|0,n[c>>2]=0,l|0&&(GA(l),gt(l)),It(n[s>>2]|0,0)}function yve(s){s=s|0,Tt(n[s>>2]|0)}function Eve(s){return s=s|0,er(n[s>>2]|0)|0}function Cve(s,l,c,f){s=s|0,l=+l,c=+c,f=f|0,Dc(n[s>>2]|0,y(l),y(c),f)}function wve(s){return s=s|0,+ +y(Bl(n[s>>2]|0))}function Ive(s){return s=s|0,+ +y(mg(n[s>>2]|0))}function Bve(s){return s=s|0,+ +y(Bu(n[s>>2]|0))}function vve(s){return s=s|0,+ +y(LA(n[s>>2]|0))}function Dve(s){return s=s|0,+ +y(dp(n[s>>2]|0))}function Pve(s){return s=s|0,+ +y(Ga(n[s>>2]|0))}function Sve(s,l){s=s|0,l=l|0,E[s>>3]=+y(Bl(n[l>>2]|0)),E[s+8>>3]=+y(mg(n[l>>2]|0)),E[s+16>>3]=+y(Bu(n[l>>2]|0)),E[s+24>>3]=+y(LA(n[l>>2]|0)),E[s+32>>3]=+y(dp(n[l>>2]|0)),E[s+40>>3]=+y(Ga(n[l>>2]|0))}function bve(s,l){return s=s|0,l=l|0,+ +y(yg(n[s>>2]|0,l))}function xve(s,l){return s=s|0,l=l|0,+ +y(mp(n[s>>2]|0,l))}function kve(s,l){return s=s|0,l=l|0,+ +y(Go(n[s>>2]|0,l))}function Qve(){return Pn()|0}function Fve(){Rve(),Tve(),Lve(),Nve(),Ove(),Mve()}function Rve(){OLe(11713,4938,1)}function Tve(){rLe(10448)}function Lve(){OTe(10408)}function Nve(){oTe(10324)}function Ove(){hFe(10096)}function Mve(){Uve(9132)}function Uve(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0,Me=0,Qe=0,et=0,Xe=0,lt=0,Ue=0,Ge=0,Nt=0,Mr=0,ar=0,Xt=0,Pr=0,Lr=0,sr=0,xn=0,go=0,mo=0,yo=0,ya=0,Rp=0,Tp=0,xl=0,Lp=0,Ru=0,Tu=0,Np=0,Op=0,Mp=0,Xr=0,kl=0,Up=0,kc=0,_p=0,Hp=0,Lu=0,Nu=0,Qc=0,Gs=0,Xa=0,Wo=0,Ql=0,nf=0,sf=0,Ou=0,of=0,af=0,js=0,vs=0,Fl=0,Rn=0,lf=0,Eo=0,Fc=0,Co=0,Rc=0,cf=0,uf=0,Tc=0,Ys=0,Rl=0,Af=0,ff=0,pf=0,xr=0,Vn=0,Ds=0,wo=0,Ws=0,Rr=0,ur=0,Tl=0;l=C,C=C+672|0,c=l+656|0,Tl=l+648|0,ur=l+640|0,Rr=l+632|0,Ws=l+624|0,wo=l+616|0,Ds=l+608|0,Vn=l+600|0,xr=l+592|0,pf=l+584|0,ff=l+576|0,Af=l+568|0,Rl=l+560|0,Ys=l+552|0,Tc=l+544|0,uf=l+536|0,cf=l+528|0,Rc=l+520|0,Co=l+512|0,Fc=l+504|0,Eo=l+496|0,lf=l+488|0,Rn=l+480|0,Fl=l+472|0,vs=l+464|0,js=l+456|0,af=l+448|0,of=l+440|0,Ou=l+432|0,sf=l+424|0,nf=l+416|0,Ql=l+408|0,Wo=l+400|0,Xa=l+392|0,Gs=l+384|0,Qc=l+376|0,Nu=l+368|0,Lu=l+360|0,Hp=l+352|0,_p=l+344|0,kc=l+336|0,Up=l+328|0,kl=l+320|0,Xr=l+312|0,Mp=l+304|0,Op=l+296|0,Np=l+288|0,Tu=l+280|0,Ru=l+272|0,Lp=l+264|0,xl=l+256|0,Tp=l+248|0,Rp=l+240|0,ya=l+232|0,yo=l+224|0,mo=l+216|0,go=l+208|0,xn=l+200|0,sr=l+192|0,Lr=l+184|0,Pr=l+176|0,Xt=l+168|0,ar=l+160|0,Mr=l+152|0,Nt=l+144|0,Ge=l+136|0,Ue=l+128|0,lt=l+120|0,Xe=l+112|0,et=l+104|0,Qe=l+96|0,Me=l+88|0,je=l+80|0,se=l+72|0,G=l+64|0,O=l+56|0,M=l+48|0,Q=l+40|0,k=l+32|0,B=l+24|0,m=l+16|0,d=l+8|0,f=l,_ve(s,3646),Hve(s,3651,2)|0,qve(s,3665,2)|0,Gve(s,3682,18)|0,n[Tl>>2]=19,n[Tl+4>>2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0)}function Hve(s,l,c){return s=s|0,l=l|0,c=c|0,YQe(s,pn(l)|0,c,0),s|0}function qve(s,l,c){return s=s|0,l=l|0,c=c|0,xQe(s,pn(l)|0,c,0),s|0}function Gve(s,l,c){return s=s|0,l=l|0,c=c|0,gQe(s,pn(l)|0,c,0),s|0}function Tw(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],$ke(s,l,d),C=f,s|0}function jve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Tke(s,l,d),C=f,s|0}function ku(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],yke(s,l,d),C=f,s|0}function Sg(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],rke(s,l,d),C=f,s|0}function Is(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],_xe(s,l,d),C=f,s|0}function JA(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],vxe(s,l,d),C=f,s|0}function SF(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],lxe(s,l,d),C=f,s|0}function bg(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Tbe(s,l,d),C=f,s|0}function XA(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ybe(s,l,d),C=f,s|0}function iD(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],rbe(s,l,d),C=f,s|0}function Yve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],_Se(s,l,d),C=f,s|0}function Wve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],vSe(s,l,d),C=f,s|0}function Kve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],cSe(s,l,d),C=f,s|0}function zve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],zPe(s,l,d),C=f,s|0}function Vve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],QPe(s,l,d),C=f,s|0}function Jve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],hPe(s,l,d),C=f,s|0}function Xve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ZDe(s,l,d),C=f,s|0}function Zve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],TDe(s,l,d),C=f,s|0}function $ve(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],eDe(s,l,d),C=f,s|0}function eDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tDe(s,c,d,1),C=f}function pn(s){return s=s|0,s|0}function tDe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=bF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=rDe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,nDe(m,f)|0,f),C=d}function bF(){var s=0,l=0;if(o[7616]|0||(t9(9136),rr(24,9136,U|0)|0,l=7616,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9136)|0)){s=9136,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));t9(9136)}return 9136}function rDe(s){return s=s|0,0}function nDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=bF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],e9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(oDe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function hn(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0;B=C,C=C+32|0,se=B+24|0,G=B+20|0,Q=B+16|0,O=B+12|0,M=B+8|0,k=B+4|0,je=B,n[G>>2]=l,n[Q>>2]=c,n[O>>2]=f,n[M>>2]=d,n[k>>2]=m,m=s+28|0,n[je>>2]=n[m>>2],n[se>>2]=n[je>>2],iDe(s+24|0,se,G,O,M,Q,k)|0,n[m>>2]=n[n[m>>2]>>2],C=B}function iDe(s,l,c,f,d,m,B){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0,s=sDe(l)|0,l=Kt(24)|0,$j(l+4|0,n[c>>2]|0,n[f>>2]|0,n[d>>2]|0,n[m>>2]|0,n[B>>2]|0),n[l>>2]=n[s>>2],n[s>>2]=l,l|0}function sDe(s){return s=s|0,n[s>>2]|0}function $j(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,n[s>>2]=l,n[s+4>>2]=c,n[s+8>>2]=f,n[s+12>>2]=d,n[s+16>>2]=m}function gr(s,l){return s=s|0,l=l|0,l|s|0}function e9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function oDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=aDe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,lDe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],e9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,cDe(s,k),uDe(k),C=M;return}}function aDe(s){return s=s|0,357913941}function lDe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function cDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function uDe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function t9(s){s=s|0,pDe(s)}function ADe(s){s=s|0,fDe(s+24|0)}function Tr(s){return s=s|0,n[s>>2]|0}function fDe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function pDe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,3,l,hDe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Kr(){return 9228}function hDe(){return 1140}function gDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=C,C=C+16|0,f=c+8|0,d=c,m=dDe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=mDe(l,f)|0,C=c,l|0}function zr(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,n[s>>2]=l,n[s+4>>2]=c,n[s+8>>2]=f,n[s+12>>2]=d,n[s+16>>2]=m}function dDe(s){return s=s|0,(n[(bF()|0)+24>>2]|0)+(s*12|0)|0}function mDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;return d=C,C=C+48|0,f=d,c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),rf[c&31](f,s),f=yDe(f)|0,C=d,f|0}function yDe(s){s=s|0;var l=0,c=0,f=0,d=0;return d=C,C=C+32|0,l=d+12|0,c=d,f=xF(r9()|0)|0,f?(kF(l,f),QF(c,l),EDe(s,c),s=FF(l)|0):s=CDe(s)|0,C=d,s|0}function r9(){var s=0;return o[7632]|0||(kDe(9184),rr(25,9184,U|0)|0,s=7632,n[s>>2]=1,n[s+4>>2]=0),9184}function xF(s){return s=s|0,n[s+36>>2]|0}function kF(s,l){s=s|0,l=l|0,n[s>>2]=l,n[s+4>>2]=s,n[s+8>>2]=0}function QF(s,l){s=s|0,l=l|0,n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=0}function EDe(s,l){s=s|0,l=l|0,vDe(l,s,s+8|0,s+16|0,s+24|0,s+32|0,s+40|0)|0}function FF(s){return s=s|0,n[(n[s+4>>2]|0)+8>>2]|0}function CDe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,k=0,Q=0;Q=C,C=C+16|0,c=Q+4|0,f=Q,d=Ka(8)|0,m=d,B=Kt(48)|0,k=B,l=k+48|0;do n[k>>2]=n[s>>2],k=k+4|0,s=s+4|0;while((k|0)<(l|0));return l=m+4|0,n[l>>2]=B,k=Kt(8)|0,B=n[l>>2]|0,n[f>>2]=0,n[c>>2]=n[f>>2],n9(k,B,c),n[d>>2]=k,C=Q,m|0}function n9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1092,n[c+12>>2]=l,n[s+4>>2]=c}function wDe(s){s=s|0,Jm(s),gt(s)}function IDe(s){s=s|0,s=n[s+12>>2]|0,s|0&>(s)}function BDe(s){s=s|0,gt(s)}function vDe(s,l,c,f,d,m,B){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0,m=DDe(n[s>>2]|0,l,c,f,d,m,B)|0,B=s+4|0,n[(n[B>>2]|0)+8>>2]=m,n[(n[B>>2]|0)+8>>2]|0}function DDe(s,l,c,f,d,m,B){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0;var k=0,Q=0;return k=C,C=C+16|0,Q=k,za(Q),s=da(s)|0,B=PDe(s,+E[l>>3],+E[c>>3],+E[f>>3],+E[d>>3],+E[m>>3],+E[B>>3])|0,Va(Q),C=k,B|0}function PDe(s,l,c,f,d,m,B){s=s|0,l=+l,c=+c,f=+f,d=+d,m=+m,B=+B;var k=0;return k=Sl(SDe()|0)|0,l=+VA(l),c=+VA(c),f=+VA(f),d=+VA(d),m=+VA(m),Ms(0,k|0,s|0,+l,+c,+f,+d,+m,+ +VA(B))|0}function SDe(){var s=0;return o[7624]|0||(bDe(9172),s=7624,n[s>>2]=1,n[s+4>>2]=0),9172}function bDe(s){s=s|0,bl(s,xDe()|0,6)}function xDe(){return 1112}function kDe(s){s=s|0,Dp(s)}function QDe(s){s=s|0,i9(s+24|0),s9(s+16|0)}function i9(s){s=s|0,RDe(s)}function s9(s){s=s|0,FDe(s)}function FDe(s){s=s|0;var l=0,c=0;if(l=n[s>>2]|0,l|0)do c=l,l=n[l>>2]|0,gt(c);while((l|0)!=0);n[s>>2]=0}function RDe(s){s=s|0;var l=0,c=0;if(l=n[s>>2]|0,l|0)do c=l,l=n[l>>2]|0,gt(c);while((l|0)!=0);n[s>>2]=0}function Dp(s){s=s|0;var l=0;n[s+16>>2]=0,n[s+20>>2]=0,l=s+24|0,n[l>>2]=0,n[s+28>>2]=l,n[s+36>>2]=0,o[s+40>>0]=0,o[s+41>>0]=0}function TDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],LDe(s,c,d,0),C=f}function LDe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=RF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=NDe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,ODe(m,f)|0,f),C=d}function RF(){var s=0,l=0;if(o[7640]|0||(a9(9232),rr(26,9232,U|0)|0,l=7640,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9232)|0)){s=9232,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));a9(9232)}return 9232}function NDe(s){return s=s|0,0}function ODe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=RF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],o9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(MDe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function o9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function MDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=UDe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,_De(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],o9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,HDe(s,k),qDe(k),C=M;return}}function UDe(s){return s=s|0,357913941}function _De(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function HDe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function qDe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function a9(s){s=s|0,YDe(s)}function GDe(s){s=s|0,jDe(s+24|0)}function jDe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function YDe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,1,l,WDe()|0,3),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function WDe(){return 1144}function KDe(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0;var m=0,B=0,k=0,Q=0;m=C,C=C+16|0,B=m+8|0,k=m,Q=zDe(s)|0,s=n[Q+4>>2]|0,n[k>>2]=n[Q>>2],n[k+4>>2]=s,n[B>>2]=n[k>>2],n[B+4>>2]=n[k+4>>2],VDe(l,B,c,f,d),C=m}function zDe(s){return s=s|0,(n[(RF()|0)+24>>2]|0)+(s*12|0)|0}function VDe(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0;var m=0,B=0,k=0,Q=0,M=0;M=C,C=C+16|0,B=M+2|0,k=M+1|0,Q=M,m=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(m=n[(n[s>>2]|0)+m>>2]|0),Qu(B,c),c=+Fu(B,c),Qu(k,f),f=+Fu(k,f),ZA(Q,d),Q=$A(Q,d)|0,I7[m&1](s,c,f,Q),C=M}function Qu(s,l){s=s|0,l=+l}function Fu(s,l){return s=s|0,l=+l,+ +XDe(l)}function ZA(s,l){s=s|0,l=l|0}function $A(s,l){return s=s|0,l=l|0,JDe(l)|0}function JDe(s){return s=s|0,s|0}function XDe(s){return s=+s,+s}function ZDe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],$De(s,c,d,1),C=f}function $De(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=TF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=ePe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,tPe(m,f)|0,f),C=d}function TF(){var s=0,l=0;if(o[7648]|0||(c9(9268),rr(27,9268,U|0)|0,l=7648,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9268)|0)){s=9268,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));c9(9268)}return 9268}function ePe(s){return s=s|0,0}function tPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=TF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],l9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(rPe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function l9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function rPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=nPe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,iPe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],l9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,sPe(s,k),oPe(k),C=M;return}}function nPe(s){return s=s|0,357913941}function iPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function sPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function oPe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function c9(s){s=s|0,cPe(s)}function aPe(s){s=s|0,lPe(s+24|0)}function lPe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function cPe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,4,l,uPe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function uPe(){return 1160}function APe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=C,C=C+16|0,f=c+8|0,d=c,m=fPe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=pPe(l,f)|0,C=c,l|0}function fPe(s){return s=s|0,(n[(TF()|0)+24>>2]|0)+(s*12|0)|0}function pPe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),u9(Og[c&31](s)|0)|0}function u9(s){return s=s|0,s&1|0}function hPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],gPe(s,c,d,0),C=f}function gPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=LF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=dPe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,mPe(m,f)|0,f),C=d}function LF(){var s=0,l=0;if(o[7656]|0||(f9(9304),rr(28,9304,U|0)|0,l=7656,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9304)|0)){s=9304,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));f9(9304)}return 9304}function dPe(s){return s=s|0,0}function mPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=LF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],A9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(yPe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function A9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function yPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=EPe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,CPe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],A9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,wPe(s,k),IPe(k),C=M;return}}function EPe(s){return s=s|0,357913941}function CPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function wPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function IPe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function f9(s){s=s|0,DPe(s)}function BPe(s){s=s|0,vPe(s+24|0)}function vPe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function DPe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,5,l,PPe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function PPe(){return 1164}function SPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=C,C=C+16|0,d=f+8|0,m=f,B=bPe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],xPe(l,d,c),C=f}function bPe(s){return s=s|0,(n[(LF()|0)+24>>2]|0)+(s*12|0)|0}function xPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=C,C=C+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Pp(d,c),c=Sp(d,c)|0,rf[f&31](s,c),bp(d),C=m}function Pp(s,l){s=s|0,l=l|0,kPe(s,l)}function Sp(s,l){return s=s|0,l=l|0,s|0}function bp(s){s=s|0,GA(s)}function kPe(s,l){s=s|0,l=l|0,NF(s,l)}function NF(s,l){s=s|0,l=l|0,n[s>>2]=l}function QPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],FPe(s,c,d,0),C=f}function FPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=OF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=RPe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,TPe(m,f)|0,f),C=d}function OF(){var s=0,l=0;if(o[7664]|0||(h9(9340),rr(29,9340,U|0)|0,l=7664,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9340)|0)){s=9340,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));h9(9340)}return 9340}function RPe(s){return s=s|0,0}function TPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=OF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],p9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(LPe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function p9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function LPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=NPe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,OPe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],p9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,MPe(s,k),UPe(k),C=M;return}}function NPe(s){return s=s|0,357913941}function OPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function MPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function UPe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function h9(s){s=s|0,qPe(s)}function _Pe(s){s=s|0,HPe(s+24|0)}function HPe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function qPe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,4,l,GPe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function GPe(){return 1180}function jPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=YPe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=WPe(l,d,c)|0,C=f,c|0}function YPe(s){return s=s|0,(n[(OF()|0)+24>>2]|0)+(s*12|0)|0}function WPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;return m=C,C=C+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),xg(d,c),d=kg(d,c)|0,d=sD(RR[f&15](s,d)|0)|0,C=m,d|0}function xg(s,l){s=s|0,l=l|0}function kg(s,l){return s=s|0,l=l|0,KPe(l)|0}function sD(s){return s=s|0,s|0}function KPe(s){return s=s|0,s|0}function zPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],VPe(s,c,d,0),C=f}function VPe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=MF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=JPe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,XPe(m,f)|0,f),C=d}function MF(){var s=0,l=0;if(o[7672]|0||(d9(9376),rr(30,9376,U|0)|0,l=7672,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9376)|0)){s=9376,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));d9(9376)}return 9376}function JPe(s){return s=s|0,0}function XPe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=MF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],g9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(ZPe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function g9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function ZPe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=$Pe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,eSe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],g9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,tSe(s,k),rSe(k),C=M;return}}function $Pe(s){return s=s|0,357913941}function eSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function tSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function rSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function d9(s){s=s|0,sSe(s)}function nSe(s){s=s|0,iSe(s+24|0)}function iSe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function sSe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,5,l,m9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function m9(){return 1196}function oSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=C,C=C+16|0,f=c+8|0,d=c,m=aSe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=lSe(l,f)|0,C=c,l|0}function aSe(s){return s=s|0,(n[(MF()|0)+24>>2]|0)+(s*12|0)|0}function lSe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),sD(Og[c&31](s)|0)|0}function cSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],uSe(s,c,d,1),C=f}function uSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=UF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=ASe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,fSe(m,f)|0,f),C=d}function UF(){var s=0,l=0;if(o[7680]|0||(E9(9412),rr(31,9412,U|0)|0,l=7680,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9412)|0)){s=9412,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));E9(9412)}return 9412}function ASe(s){return s=s|0,0}function fSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=UF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],y9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(pSe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function y9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function pSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=hSe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,gSe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],y9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,dSe(s,k),mSe(k),C=M;return}}function hSe(s){return s=s|0,357913941}function gSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function dSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function mSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function E9(s){s=s|0,CSe(s)}function ySe(s){s=s|0,ESe(s+24|0)}function ESe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function CSe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,6,l,C9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function C9(){return 1200}function wSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=C,C=C+16|0,f=c+8|0,d=c,m=ISe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=BSe(l,f)|0,C=c,l|0}function ISe(s){return s=s|0,(n[(UF()|0)+24>>2]|0)+(s*12|0)|0}function BSe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),oD(Og[c&31](s)|0)|0}function oD(s){return s=s|0,s|0}function vSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],DSe(s,c,d,0),C=f}function DSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=_F()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=PSe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,SSe(m,f)|0,f),C=d}function _F(){var s=0,l=0;if(o[7688]|0||(I9(9448),rr(32,9448,U|0)|0,l=7688,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9448)|0)){s=9448,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));I9(9448)}return 9448}function PSe(s){return s=s|0,0}function SSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=_F()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],w9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(bSe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function w9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function bSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=xSe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,kSe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],w9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,QSe(s,k),FSe(k),C=M;return}}function xSe(s){return s=s|0,357913941}function kSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function QSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function FSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function I9(s){s=s|0,LSe(s)}function RSe(s){s=s|0,TSe(s+24|0)}function TSe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function LSe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,6,l,B9()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function B9(){return 1204}function NSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=C,C=C+16|0,d=f+8|0,m=f,B=OSe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],MSe(l,d,c),C=f}function OSe(s){return s=s|0,(n[(_F()|0)+24>>2]|0)+(s*12|0)|0}function MSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=C,C=C+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),HF(d,c),d=qF(d,c)|0,rf[f&31](s,d),C=m}function HF(s,l){s=s|0,l=l|0}function qF(s,l){return s=s|0,l=l|0,USe(l)|0}function USe(s){return s=s|0,s|0}function _Se(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],HSe(s,c,d,0),C=f}function HSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=GF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=qSe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,GSe(m,f)|0,f),C=d}function GF(){var s=0,l=0;if(o[7696]|0||(D9(9484),rr(33,9484,U|0)|0,l=7696,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9484)|0)){s=9484,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));D9(9484)}return 9484}function qSe(s){return s=s|0,0}function GSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=GF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],v9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(jSe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function v9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function jSe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=YSe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,WSe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],v9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,KSe(s,k),zSe(k),C=M;return}}function YSe(s){return s=s|0,357913941}function WSe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function KSe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function zSe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function D9(s){s=s|0,XSe(s)}function VSe(s){s=s|0,JSe(s+24|0)}function JSe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function XSe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,1,l,ZSe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function ZSe(){return 1212}function $Se(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0;d=C,C=C+16|0,m=d+8|0,B=d,k=ebe(s)|0,s=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],tbe(l,m,c,f),C=d}function ebe(s){return s=s|0,(n[(GF()|0)+24>>2]|0)+(s*12|0)|0}function tbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0;k=C,C=C+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(d=n[(n[s>>2]|0)+d>>2]|0),HF(m,c),m=qF(m,c)|0,xg(B,f),B=kg(B,f)|0,Hw[d&15](s,m,B),C=k}function rbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],nbe(s,c,d,1),C=f}function nbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=jF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=ibe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,sbe(m,f)|0,f),C=d}function jF(){var s=0,l=0;if(o[7704]|0||(S9(9520),rr(34,9520,U|0)|0,l=7704,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9520)|0)){s=9520,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));S9(9520)}return 9520}function ibe(s){return s=s|0,0}function sbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=jF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],P9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(obe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function P9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function obe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=abe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,lbe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],P9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,cbe(s,k),ube(k),C=M;return}}function abe(s){return s=s|0,357913941}function lbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function cbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function ube(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function S9(s){s=s|0,pbe(s)}function Abe(s){s=s|0,fbe(s+24|0)}function fbe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function pbe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,1,l,hbe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function hbe(){return 1224}function gbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;return d=C,C=C+16|0,m=d+8|0,B=d,k=dbe(s)|0,s=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],f=+mbe(l,m,c),C=d,+f}function dbe(s){return s=s|0,(n[(jF()|0)+24>>2]|0)+(s*12|0)|0}function mbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return m=C,C=C+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),ZA(d,c),d=$A(d,c)|0,B=+PF(+v7[f&7](s,d)),C=m,+B}function ybe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Ebe(s,c,d,1),C=f}function Ebe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=YF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=Cbe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,wbe(m,f)|0,f),C=d}function YF(){var s=0,l=0;if(o[7712]|0||(x9(9556),rr(35,9556,U|0)|0,l=7712,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9556)|0)){s=9556,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));x9(9556)}return 9556}function Cbe(s){return s=s|0,0}function wbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=YF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],b9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Ibe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function b9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Ibe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Bbe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,vbe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],b9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,Dbe(s,k),Pbe(k),C=M;return}}function Bbe(s){return s=s|0,357913941}function vbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Dbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function Pbe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function x9(s){s=s|0,xbe(s)}function Sbe(s){s=s|0,bbe(s+24|0)}function bbe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function xbe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,5,l,kbe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function kbe(){return 1232}function Qbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=Fbe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=+Rbe(l,d),C=f,+c}function Fbe(s){return s=s|0,(n[(YF()|0)+24>>2]|0)+(s*12|0)|0}function Rbe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),+ +PF(+B7[c&15](s))}function Tbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Lbe(s,c,d,1),C=f}function Lbe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=WF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=Nbe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,Obe(m,f)|0,f),C=d}function WF(){var s=0,l=0;if(o[7720]|0||(Q9(9592),rr(36,9592,U|0)|0,l=7720,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9592)|0)){s=9592,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));Q9(9592)}return 9592}function Nbe(s){return s=s|0,0}function Obe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=WF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],k9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Mbe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function k9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Mbe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Ube(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,_be(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],k9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,Hbe(s,k),qbe(k),C=M;return}}function Ube(s){return s=s|0,357913941}function _be(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Hbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function qbe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function Q9(s){s=s|0,Ybe(s)}function Gbe(s){s=s|0,jbe(s+24|0)}function jbe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function Ybe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,7,l,Wbe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Wbe(){return 1276}function Kbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=C,C=C+16|0,f=c+8|0,d=c,m=zbe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=Vbe(l,f)|0,C=c,l|0}function zbe(s){return s=s|0,(n[(WF()|0)+24>>2]|0)+(s*12|0)|0}function Vbe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;return d=C,C=C+16|0,f=d,c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),rf[c&31](f,s),f=F9(f)|0,C=d,f|0}function F9(s){s=s|0;var l=0,c=0,f=0,d=0;return d=C,C=C+32|0,l=d+12|0,c=d,f=xF(R9()|0)|0,f?(kF(l,f),QF(c,l),Jbe(s,c),s=FF(l)|0):s=Xbe(s)|0,C=d,s|0}function R9(){var s=0;return o[7736]|0||(axe(9640),rr(25,9640,U|0)|0,s=7736,n[s>>2]=1,n[s+4>>2]=0),9640}function Jbe(s,l){s=s|0,l=l|0,txe(l,s,s+8|0)|0}function Xbe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,k=0;return c=C,C=C+16|0,d=c+4|0,B=c,f=Ka(8)|0,l=f,k=Kt(16)|0,n[k>>2]=n[s>>2],n[k+4>>2]=n[s+4>>2],n[k+8>>2]=n[s+8>>2],n[k+12>>2]=n[s+12>>2],m=l+4|0,n[m>>2]=k,s=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],KF(s,m,d),n[f>>2]=s,C=c,l|0}function KF(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1244,n[c+12>>2]=l,n[s+4>>2]=c}function Zbe(s){s=s|0,Jm(s),gt(s)}function $be(s){s=s|0,s=n[s+12>>2]|0,s|0&>(s)}function exe(s){s=s|0,gt(s)}function txe(s,l,c){return s=s|0,l=l|0,c=c|0,l=rxe(n[s>>2]|0,l,c)|0,c=s+4|0,n[(n[c>>2]|0)+8>>2]=l,n[(n[c>>2]|0)+8>>2]|0}function rxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;return f=C,C=C+16|0,d=f,za(d),s=da(s)|0,c=nxe(s,n[l>>2]|0,+E[c>>3])|0,Va(d),C=f,c|0}function nxe(s,l,c){s=s|0,l=l|0,c=+c;var f=0;return f=Sl(ixe()|0)|0,l=DF(l)|0,yl(0,f|0,s|0,l|0,+ +VA(c))|0}function ixe(){var s=0;return o[7728]|0||(sxe(9628),s=7728,n[s>>2]=1,n[s+4>>2]=0),9628}function sxe(s){s=s|0,bl(s,oxe()|0,2)}function oxe(){return 1264}function axe(s){s=s|0,Dp(s)}function lxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],cxe(s,c,d,1),C=f}function cxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=zF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=uxe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,Axe(m,f)|0,f),C=d}function zF(){var s=0,l=0;if(o[7744]|0||(L9(9684),rr(37,9684,U|0)|0,l=7744,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9684)|0)){s=9684,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));L9(9684)}return 9684}function uxe(s){return s=s|0,0}function Axe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=zF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],T9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(fxe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function T9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function fxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=pxe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,hxe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],T9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,gxe(s,k),dxe(k),C=M;return}}function pxe(s){return s=s|0,357913941}function hxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function gxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function dxe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function L9(s){s=s|0,Exe(s)}function mxe(s){s=s|0,yxe(s+24|0)}function yxe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function Exe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,5,l,Cxe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Cxe(){return 1280}function wxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=Ixe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=Bxe(l,d,c)|0,C=f,c|0}function Ixe(s){return s=s|0,(n[(zF()|0)+24>>2]|0)+(s*12|0)|0}function Bxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return B=C,C=C+32|0,d=B,m=B+16|0,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),ZA(m,c),m=$A(m,c)|0,Hw[f&15](d,s,m),m=F9(d)|0,C=B,m|0}function vxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Dxe(s,c,d,1),C=f}function Dxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=VF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=Pxe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,Sxe(m,f)|0,f),C=d}function VF(){var s=0,l=0;if(o[7752]|0||(O9(9720),rr(38,9720,U|0)|0,l=7752,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9720)|0)){s=9720,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));O9(9720)}return 9720}function Pxe(s){return s=s|0,0}function Sxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=VF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],N9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(bxe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function N9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function bxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=xxe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,kxe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],N9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,Qxe(s,k),Fxe(k),C=M;return}}function xxe(s){return s=s|0,357913941}function kxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Qxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function Fxe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function O9(s){s=s|0,Lxe(s)}function Rxe(s){s=s|0,Txe(s+24|0)}function Txe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function Lxe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,8,l,Nxe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Nxe(){return 1288}function Oxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;return c=C,C=C+16|0,f=c+8|0,d=c,m=Mxe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],l=Uxe(l,f)|0,C=c,l|0}function Mxe(s){return s=s|0,(n[(VF()|0)+24>>2]|0)+(s*12|0)|0}function Uxe(s,l){s=s|0,l=l|0;var c=0;return c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),Zj(Og[c&31](s)|0)|0}function _xe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Hxe(s,c,d,0),C=f}function Hxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=JF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=qxe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,Gxe(m,f)|0,f),C=d}function JF(){var s=0,l=0;if(o[7760]|0||(U9(9756),rr(39,9756,U|0)|0,l=7760,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9756)|0)){s=9756,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));U9(9756)}return 9756}function qxe(s){return s=s|0,0}function Gxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=JF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],M9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(jxe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function M9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function jxe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Yxe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,Wxe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],M9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,Kxe(s,k),zxe(k),C=M;return}}function Yxe(s){return s=s|0,357913941}function Wxe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Kxe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function zxe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function U9(s){s=s|0,Xxe(s)}function Vxe(s){s=s|0,Jxe(s+24|0)}function Jxe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function Xxe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,8,l,Zxe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Zxe(){return 1292}function $xe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=0;f=C,C=C+16|0,d=f+8|0,m=f,B=eke(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],tke(l,d,c),C=f}function eke(s){return s=s|0,(n[(JF()|0)+24>>2]|0)+(s*12|0)|0}function tke(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0;m=C,C=C+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Qu(d,c),c=+Fu(d,c),C7[f&31](s,c),C=m}function rke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],nke(s,c,d,0),C=f}function nke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=XF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=ike(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,ske(m,f)|0,f),C=d}function XF(){var s=0,l=0;if(o[7768]|0||(H9(9792),rr(40,9792,U|0)|0,l=7768,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9792)|0)){s=9792,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));H9(9792)}return 9792}function ike(s){return s=s|0,0}function ske(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=XF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],_9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(oke(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function _9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function oke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=ake(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,lke(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],_9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,cke(s,k),uke(k),C=M;return}}function ake(s){return s=s|0,357913941}function lke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function cke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function uke(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function H9(s){s=s|0,pke(s)}function Ake(s){s=s|0,fke(s+24|0)}function fke(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function pke(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,1,l,hke()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function hke(){return 1300}function gke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f;var d=0,m=0,B=0,k=0;d=C,C=C+16|0,m=d+8|0,B=d,k=dke(s)|0,s=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],mke(l,m,c,f),C=d}function dke(s){return s=s|0,(n[(XF()|0)+24>>2]|0)+(s*12|0)|0}function mke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f;var d=0,m=0,B=0,k=0;k=C,C=C+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(d=n[(n[s>>2]|0)+d>>2]|0),ZA(m,c),m=$A(m,c)|0,Qu(B,f),f=+Fu(B,f),b7[d&15](s,m,f),C=k}function yke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Eke(s,c,d,0),C=f}function Eke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=ZF()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=Cke(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,wke(m,f)|0,f),C=d}function ZF(){var s=0,l=0;if(o[7776]|0||(G9(9828),rr(41,9828,U|0)|0,l=7776,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9828)|0)){s=9828,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));G9(9828)}return 9828}function Cke(s){return s=s|0,0}function wke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=ZF()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],q9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Ike(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function q9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Ike(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Bke(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,vke(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],q9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,Dke(s,k),Pke(k),C=M;return}}function Bke(s){return s=s|0,357913941}function vke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Dke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function Pke(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function G9(s){s=s|0,xke(s)}function Ske(s){s=s|0,bke(s+24|0)}function bke(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function xke(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,7,l,kke()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function kke(){return 1312}function Qke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=C,C=C+16|0,d=f+8|0,m=f,B=Fke(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Rke(l,d,c),C=f}function Fke(s){return s=s|0,(n[(ZF()|0)+24>>2]|0)+(s*12|0)|0}function Rke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=C,C=C+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),ZA(d,c),d=$A(d,c)|0,rf[f&31](s,d),C=m}function Tke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Lke(s,c,d,0),C=f}function Lke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=$F()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=Nke(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,Oke(m,f)|0,f),C=d}function $F(){var s=0,l=0;if(o[7784]|0||(Y9(9864),rr(42,9864,U|0)|0,l=7784,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9864)|0)){s=9864,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));Y9(9864)}return 9864}function Nke(s){return s=s|0,0}function Oke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=$F()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],j9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(Mke(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function j9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function Mke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=Uke(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,_ke(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],j9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,Hke(s,k),qke(k),C=M;return}}function Uke(s){return s=s|0,357913941}function _ke(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function Hke(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function qke(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function Y9(s){s=s|0,Yke(s)}function Gke(s){s=s|0,jke(s+24|0)}function jke(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function Yke(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,8,l,Wke()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function Wke(){return 1320}function Kke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=C,C=C+16|0,d=f+8|0,m=f,B=zke(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],Vke(l,d,c),C=f}function zke(s){return s=s|0,(n[($F()|0)+24>>2]|0)+(s*12|0)|0}function Vke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;m=C,C=C+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),Jke(d,c),d=Xke(d,c)|0,rf[f&31](s,d),C=m}function Jke(s,l){s=s|0,l=l|0}function Xke(s,l){return s=s|0,l=l|0,Zke(l)|0}function Zke(s){return s=s|0,s|0}function $ke(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],eQe(s,c,d,0),C=f}function eQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=eR()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=tQe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,rQe(m,f)|0,f),C=d}function eR(){var s=0,l=0;if(o[7792]|0||(K9(9900),rr(43,9900,U|0)|0,l=7792,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9900)|0)){s=9900,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));K9(9900)}return 9900}function tQe(s){return s=s|0,0}function rQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=eR()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],W9(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(nQe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function W9(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function nQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=iQe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,sQe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],W9(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,oQe(s,k),aQe(k),C=M;return}}function iQe(s){return s=s|0,357913941}function sQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function oQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function aQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function K9(s){s=s|0,uQe(s)}function lQe(s){s=s|0,cQe(s+24|0)}function cQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function uQe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,22,l,AQe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function AQe(){return 1344}function fQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0;c=C,C=C+16|0,f=c+8|0,d=c,m=pQe(s)|0,s=n[m+4>>2]|0,n[d>>2]=n[m>>2],n[d+4>>2]=s,n[f>>2]=n[d>>2],n[f+4>>2]=n[d+4>>2],hQe(l,f),C=c}function pQe(s){return s=s|0,(n[(eR()|0)+24>>2]|0)+(s*12|0)|0}function hQe(s,l){s=s|0,l=l|0;var c=0;c=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(c=n[(n[s>>2]|0)+c>>2]|0),tf[c&127](s)}function gQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=tR()|0,s=dQe(c)|0,hn(m,l,d,s,mQe(c,f)|0,f)}function tR(){var s=0,l=0;if(o[7800]|0||(V9(9936),rr(44,9936,U|0)|0,l=7800,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9936)|0)){s=9936,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));V9(9936)}return 9936}function dQe(s){return s=s|0,s|0}function mQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=tR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(z9(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(yQe(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function z9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function yQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=EQe(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,CQe(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,z9(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,wQe(s,d),IQe(d),C=k;return}}function EQe(s){return s=s|0,536870911}function CQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function wQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function IQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function V9(s){s=s|0,DQe(s)}function BQe(s){s=s|0,vQe(s+24|0)}function vQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function DQe(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,23,l,B9()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function PQe(s,l){s=s|0,l=l|0,bQe(n[(SQe(s)|0)>>2]|0,l)}function SQe(s){return s=s|0,(n[(tR()|0)+24>>2]|0)+(s<<3)|0}function bQe(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,HF(f,l),l=qF(f,l)|0,tf[s&127](l),C=c}function xQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=rR()|0,s=kQe(c)|0,hn(m,l,d,s,QQe(c,f)|0,f)}function rR(){var s=0,l=0;if(o[7808]|0||(X9(9972),rr(45,9972,U|0)|0,l=7808,n[l>>2]=1,n[l+4>>2]=0),!(Tr(9972)|0)){s=9972,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));X9(9972)}return 9972}function kQe(s){return s=s|0,s|0}function QQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=rR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(J9(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(FQe(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function J9(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function FQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=RQe(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,TQe(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,J9(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,LQe(s,d),NQe(d),C=k;return}}function RQe(s){return s=s|0,536870911}function TQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function LQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function NQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function X9(s){s=s|0,UQe(s)}function OQe(s){s=s|0,MQe(s+24|0)}function MQe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function UQe(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,9,l,_Qe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function _Qe(){return 1348}function HQe(s,l){return s=s|0,l=l|0,GQe(n[(qQe(s)|0)>>2]|0,l)|0}function qQe(s){return s=s|0,(n[(rR()|0)+24>>2]|0)+(s<<3)|0}function GQe(s,l){s=s|0,l=l|0;var c=0,f=0;return c=C,C=C+16|0,f=c,Z9(f,l),l=$9(f,l)|0,l=sD(Og[s&31](l)|0)|0,C=c,l|0}function Z9(s,l){s=s|0,l=l|0}function $9(s,l){return s=s|0,l=l|0,jQe(l)|0}function jQe(s){return s=s|0,s|0}function YQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=nR()|0,s=WQe(c)|0,hn(m,l,d,s,KQe(c,f)|0,f)}function nR(){var s=0,l=0;if(o[7816]|0||(t5(10008),rr(46,10008,U|0)|0,l=7816,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10008)|0)){s=10008,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));t5(10008)}return 10008}function WQe(s){return s=s|0,s|0}function KQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=nR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(e5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(zQe(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function e5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function zQe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=VQe(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,JQe(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,e5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,XQe(s,d),ZQe(d),C=k;return}}function VQe(s){return s=s|0,536870911}function JQe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function XQe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function ZQe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function t5(s){s=s|0,tFe(s)}function $Qe(s){s=s|0,eFe(s+24|0)}function eFe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function tFe(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,15,l,m9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function rFe(s){return s=s|0,iFe(n[(nFe(s)|0)>>2]|0)|0}function nFe(s){return s=s|0,(n[(nR()|0)+24>>2]|0)+(s<<3)|0}function iFe(s){return s=s|0,sD(CD[s&7]()|0)|0}function sFe(){var s=0;return o[7832]|0||(pFe(10052),rr(25,10052,U|0)|0,s=7832,n[s>>2]=1,n[s+4>>2]=0),10052}function oFe(s,l){s=s|0,l=l|0,n[s>>2]=aFe()|0,n[s+4>>2]=lFe()|0,n[s+12>>2]=l,n[s+8>>2]=cFe()|0,n[s+32>>2]=2}function aFe(){return 11709}function lFe(){return 1188}function cFe(){return aD()|0}function uFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(AFe(c),gt(c)):l|0&&(Su(l),gt(l))}function xp(s,l){return s=s|0,l=l|0,l&s|0}function AFe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function aD(){var s=0;return o[7824]|0||(n[2511]=fFe()|0,n[2512]=0,s=7824,n[s>>2]=1,n[s+4>>2]=0),10044}function fFe(){return 0}function pFe(s){s=s|0,Dp(s)}function hFe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0;l=C,C=C+32|0,c=l+24|0,m=l+16|0,d=l+8|0,f=l,gFe(s,4827),dFe(s,4834,3)|0,mFe(s,3682,47)|0,n[m>>2]=9,n[m+4>>2]=0,n[c>>2]=n[m>>2],n[c+4>>2]=n[m+4>>2],yFe(s,4841,c)|0,n[d>>2]=1,n[d+4>>2]=0,n[c>>2]=n[d>>2],n[c+4>>2]=n[d+4>>2],EFe(s,4871,c)|0,n[f>>2]=10,n[f+4>>2]=0,n[c>>2]=n[f>>2],n[c+4>>2]=n[f+4>>2],CFe(s,4891,c)|0,C=l}function gFe(s,l){s=s|0,l=l|0;var c=0;c=ZRe()|0,n[s>>2]=c,$Re(c,l),kp(n[s>>2]|0)}function dFe(s,l,c){return s=s|0,l=l|0,c=c|0,NRe(s,pn(l)|0,c,0),s|0}function mFe(s,l,c){return s=s|0,l=l|0,c=c|0,wRe(s,pn(l)|0,c,0),s|0}function yFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],rRe(s,l,d),C=f,s|0}function EFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],OFe(s,l,d),C=f,s|0}function CFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=n[c+4>>2]|0,n[m>>2]=n[c>>2],n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],wFe(s,l,d),C=f,s|0}function wFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],IFe(s,c,d,1),C=f}function IFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=iR()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=BFe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,vFe(m,f)|0,f),C=d}function iR(){var s=0,l=0;if(o[7840]|0||(n5(10100),rr(48,10100,U|0)|0,l=7840,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10100)|0)){s=10100,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));n5(10100)}return 10100}function BFe(s){return s=s|0,0}function vFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=iR()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],r5(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(DFe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function r5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function DFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=PFe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,SFe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],r5(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,bFe(s,k),xFe(k),C=M;return}}function PFe(s){return s=s|0,357913941}function SFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function bFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function xFe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function n5(s){s=s|0,FFe(s)}function kFe(s){s=s|0,QFe(s+24|0)}function QFe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function FFe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,6,l,RFe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function RFe(){return 1364}function TFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;return f=C,C=C+16|0,d=f+8|0,m=f,B=LFe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],c=NFe(l,d,c)|0,C=f,c|0}function LFe(s){return s=s|0,(n[(iR()|0)+24>>2]|0)+(s*12|0)|0}function NFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;return m=C,C=C+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),ZA(d,c),d=$A(d,c)|0,d=u9(RR[f&15](s,d)|0)|0,C=m,d|0}function OFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],MFe(s,c,d,0),C=f}function MFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=sR()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=UFe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,_Fe(m,f)|0,f),C=d}function sR(){var s=0,l=0;if(o[7848]|0||(s5(10136),rr(49,10136,U|0)|0,l=7848,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10136)|0)){s=10136,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));s5(10136)}return 10136}function UFe(s){return s=s|0,0}function _Fe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=sR()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],i5(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(HFe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function i5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function HFe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=qFe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,GFe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],i5(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,jFe(s,k),YFe(k),C=M;return}}function qFe(s){return s=s|0,357913941}function GFe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function jFe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function YFe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function s5(s){s=s|0,zFe(s)}function WFe(s){s=s|0,KFe(s+24|0)}function KFe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function zFe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,9,l,VFe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function VFe(){return 1372}function JFe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=0;f=C,C=C+16|0,d=f+8|0,m=f,B=XFe(s)|0,s=n[B+4>>2]|0,n[m>>2]=n[B>>2],n[m+4>>2]=s,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],ZFe(l,d,c),C=f}function XFe(s){return s=s|0,(n[(sR()|0)+24>>2]|0)+(s*12|0)|0}function ZFe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=Ze;m=C,C=C+16|0,d=m,f=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(f=n[(n[s>>2]|0)+f>>2]|0),$Fe(d,c),B=y(eRe(d,c)),E7[f&1](s,B),C=m}function $Fe(s,l){s=s|0,l=+l}function eRe(s,l){return s=s|0,l=+l,y(tRe(l))}function tRe(s){return s=+s,y(s)}function rRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,d=f+8|0,m=f,k=n[c>>2]|0,B=n[c+4>>2]|0,c=pn(l)|0,n[m>>2]=k,n[m+4>>2]=B,n[d>>2]=n[m>>2],n[d+4>>2]=n[m+4>>2],nRe(s,c,d,0),C=f}function nRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0,Q=0,M=0,O=0;d=C,C=C+32|0,m=d+16|0,O=d+8|0,k=d,M=n[c>>2]|0,Q=n[c+4>>2]|0,B=n[s>>2]|0,s=oR()|0,n[O>>2]=M,n[O+4>>2]=Q,n[m>>2]=n[O>>2],n[m+4>>2]=n[O+4>>2],c=iRe(m)|0,n[k>>2]=M,n[k+4>>2]=Q,n[m>>2]=n[k>>2],n[m+4>>2]=n[k+4>>2],hn(B,l,s,c,sRe(m,f)|0,f),C=d}function oR(){var s=0,l=0;if(o[7856]|0||(a5(10172),rr(50,10172,U|0)|0,l=7856,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10172)|0)){s=10172,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));a5(10172)}return 10172}function iRe(s){return s=s|0,0}function sRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0;return O=C,C=C+32|0,d=O+24|0,B=O+16|0,k=O,Q=O+8|0,m=n[s>>2]|0,f=n[s+4>>2]|0,n[k>>2]=m,n[k+4>>2]=f,G=oR()|0,M=G+24|0,s=gr(l,4)|0,n[Q>>2]=s,l=G+28|0,c=n[l>>2]|0,c>>>0<(n[G+32>>2]|0)>>>0?(n[B>>2]=m,n[B+4>>2]=f,n[d>>2]=n[B>>2],n[d+4>>2]=n[B+4>>2],o5(c,d,s),s=(n[l>>2]|0)+12|0,n[l>>2]=s):(oRe(M,k,Q),s=n[l>>2]|0),C=O,((s-(n[M>>2]|0)|0)/12|0)+-1|0}function o5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=n[l+4>>2]|0,n[s>>2]=n[l>>2],n[s+4>>2]=f,n[s+8>>2]=c}function oRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;if(M=C,C=C+48|0,f=M+32|0,B=M+24|0,k=M,Q=s+4|0,d=(((n[Q>>2]|0)-(n[s>>2]|0)|0)/12|0)+1|0,m=aRe(s)|0,m>>>0>>0)Jr(s);else{O=n[s>>2]|0,se=((n[s+8>>2]|0)-O|0)/12|0,G=se<<1,lRe(k,se>>>0>>1>>>0?G>>>0>>0?d:G:m,((n[Q>>2]|0)-O|0)/12|0,s+8|0),Q=k+8|0,m=n[Q>>2]|0,d=n[l+4>>2]|0,c=n[c>>2]|0,n[B>>2]=n[l>>2],n[B+4>>2]=d,n[f>>2]=n[B>>2],n[f+4>>2]=n[B+4>>2],o5(m,f,c),n[Q>>2]=(n[Q>>2]|0)+12,cRe(s,k),uRe(k),C=M;return}}function aRe(s){return s=s|0,357913941}function lRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>357913941)Rt();else{d=Kt(l*12|0)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c*12|0)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l*12|0)}function cRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(((d|0)/-12|0)*12|0)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function uRe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~(((f+-12-l|0)>>>0)/12|0)*12|0)),s=n[s>>2]|0,s|0&>(s)}function a5(s){s=s|0,pRe(s)}function ARe(s){s=s|0,fRe(s+24|0)}function fRe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~(((l+-12-f|0)>>>0)/12|0)*12|0)),gt(c))}function pRe(s){s=s|0;var l=0;l=Kr()|0,zr(s,2,3,l,hRe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function hRe(){return 1380}function gRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0;d=C,C=C+16|0,m=d+8|0,B=d,k=dRe(s)|0,s=n[k+4>>2]|0,n[B>>2]=n[k>>2],n[B+4>>2]=s,n[m>>2]=n[B>>2],n[m+4>>2]=n[B+4>>2],mRe(l,m,c,f),C=d}function dRe(s){return s=s|0,(n[(oR()|0)+24>>2]|0)+(s*12|0)|0}function mRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0;k=C,C=C+16|0,m=k+1|0,B=k,d=n[l>>2]|0,l=n[l+4>>2]|0,s=s+(l>>1)|0,l&1&&(d=n[(n[s>>2]|0)+d>>2]|0),ZA(m,c),m=$A(m,c)|0,yRe(B,f),B=ERe(B,f)|0,Hw[d&15](s,m,B),C=k}function yRe(s,l){s=s|0,l=l|0}function ERe(s,l){return s=s|0,l=l|0,CRe(l)|0}function CRe(s){return s=s|0,(s|0)!=0|0}function wRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=aR()|0,s=IRe(c)|0,hn(m,l,d,s,BRe(c,f)|0,f)}function aR(){var s=0,l=0;if(o[7864]|0||(c5(10208),rr(51,10208,U|0)|0,l=7864,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10208)|0)){s=10208,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));c5(10208)}return 10208}function IRe(s){return s=s|0,s|0}function BRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=aR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(l5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(vRe(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function l5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function vRe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=DRe(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,PRe(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,l5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,SRe(s,d),bRe(d),C=k;return}}function DRe(s){return s=s|0,536870911}function PRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function SRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function bRe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function c5(s){s=s|0,QRe(s)}function xRe(s){s=s|0,kRe(s+24|0)}function kRe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function QRe(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,24,l,FRe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function FRe(){return 1392}function RRe(s,l){s=s|0,l=l|0,LRe(n[(TRe(s)|0)>>2]|0,l)}function TRe(s){return s=s|0,(n[(aR()|0)+24>>2]|0)+(s<<3)|0}function LRe(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,Z9(f,l),l=$9(f,l)|0,tf[s&127](l),C=c}function NRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=lR()|0,s=ORe(c)|0,hn(m,l,d,s,MRe(c,f)|0,f)}function lR(){var s=0,l=0;if(o[7872]|0||(A5(10244),rr(52,10244,U|0)|0,l=7872,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10244)|0)){s=10244,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));A5(10244)}return 10244}function ORe(s){return s=s|0,s|0}function MRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=lR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(u5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(URe(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function u5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function URe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=_Re(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,HRe(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,u5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,qRe(s,d),GRe(d),C=k;return}}function _Re(s){return s=s|0,536870911}function HRe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function qRe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function GRe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function A5(s){s=s|0,WRe(s)}function jRe(s){s=s|0,YRe(s+24|0)}function YRe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function WRe(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,16,l,KRe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function KRe(){return 1400}function zRe(s){return s=s|0,JRe(n[(VRe(s)|0)>>2]|0)|0}function VRe(s){return s=s|0,(n[(lR()|0)+24>>2]|0)+(s<<3)|0}function JRe(s){return s=s|0,XRe(CD[s&7]()|0)|0}function XRe(s){return s=s|0,s|0}function ZRe(){var s=0;return o[7880]|0||(sTe(10280),rr(25,10280,U|0)|0,s=7880,n[s>>2]=1,n[s+4>>2]=0),10280}function $Re(s,l){s=s|0,l=l|0,n[s>>2]=eTe()|0,n[s+4>>2]=tTe()|0,n[s+12>>2]=l,n[s+8>>2]=rTe()|0,n[s+32>>2]=4}function eTe(){return 11711}function tTe(){return 1356}function rTe(){return aD()|0}function nTe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(iTe(c),gt(c)):l|0&&(Pg(l),gt(l))}function iTe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function sTe(s){s=s|0,Dp(s)}function oTe(s){s=s|0,aTe(s,4920),lTe(s)|0,cTe(s)|0}function aTe(s,l){s=s|0,l=l|0;var c=0;c=R9()|0,n[s>>2]=c,kTe(c,l),kp(n[s>>2]|0)}function lTe(s){s=s|0;var l=0;return l=n[s>>2]|0,Qg(l,CTe()|0),s|0}function cTe(s){s=s|0;var l=0;return l=n[s>>2]|0,Qg(l,uTe()|0),s|0}function uTe(){var s=0;return o[7888]|0||(f5(10328),rr(53,10328,U|0)|0,s=7888,n[s>>2]=1,n[s+4>>2]=0),Tr(10328)|0||f5(10328),10328}function Qg(s,l){s=s|0,l=l|0,hn(s,0,l,0,0,0)}function f5(s){s=s|0,pTe(s),Fg(s,10)}function ATe(s){s=s|0,fTe(s+24|0)}function fTe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function pTe(s){s=s|0;var l=0;l=Kr()|0,zr(s,5,1,l,mTe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function hTe(s,l,c){s=s|0,l=l|0,c=+c,gTe(s,l,c)}function Fg(s,l){s=s|0,l=l|0,n[s+20>>2]=l}function gTe(s,l,c){s=s|0,l=l|0,c=+c;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+16|0,m=f+8|0,k=f+13|0,d=f,B=f+12|0,ZA(k,l),n[m>>2]=$A(k,l)|0,Qu(B,c),E[d>>3]=+Fu(B,c),dTe(s,m,d),C=f}function dTe(s,l,c){s=s|0,l=l|0,c=c|0,Y(s+8|0,n[l>>2]|0,+E[c>>3]),o[s+24>>0]=1}function mTe(){return 1404}function yTe(s,l){return s=s|0,l=+l,ETe(s,l)|0}function ETe(s,l){s=s|0,l=+l;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return f=C,C=C+16|0,m=f+4|0,B=f+8|0,k=f,d=Ka(8)|0,c=d,Q=Kt(16)|0,ZA(m,s),s=$A(m,s)|0,Qu(B,l),Y(Q,s,+Fu(B,l)),B=c+4|0,n[B>>2]=Q,s=Kt(8)|0,B=n[B>>2]|0,n[k>>2]=0,n[m>>2]=n[k>>2],KF(s,B,m),n[d>>2]=s,C=f,c|0}function CTe(){var s=0;return o[7896]|0||(p5(10364),rr(54,10364,U|0)|0,s=7896,n[s>>2]=1,n[s+4>>2]=0),Tr(10364)|0||p5(10364),10364}function p5(s){s=s|0,BTe(s),Fg(s,55)}function wTe(s){s=s|0,ITe(s+24|0)}function ITe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function BTe(s){s=s|0;var l=0;l=Kr()|0,zr(s,5,4,l,STe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function vTe(s){s=s|0,DTe(s)}function DTe(s){s=s|0,PTe(s)}function PTe(s){s=s|0,h5(s+8|0),o[s+24>>0]=1}function h5(s){s=s|0,n[s>>2]=0,E[s+8>>3]=0}function STe(){return 1424}function bTe(){return xTe()|0}function xTe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0;return l=C,C=C+16|0,d=l+4|0,B=l,c=Ka(8)|0,s=c,f=Kt(16)|0,h5(f),m=s+4|0,n[m>>2]=f,f=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],KF(f,m,d),n[c>>2]=f,C=l,s|0}function kTe(s,l){s=s|0,l=l|0,n[s>>2]=QTe()|0,n[s+4>>2]=FTe()|0,n[s+12>>2]=l,n[s+8>>2]=RTe()|0,n[s+32>>2]=5}function QTe(){return 11710}function FTe(){return 1416}function RTe(){return lD()|0}function TTe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(LTe(c),gt(c)):l|0&>(l)}function LTe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function lD(){var s=0;return o[7904]|0||(n[2600]=NTe()|0,n[2601]=0,s=7904,n[s>>2]=1,n[s+4>>2]=0),10400}function NTe(){return n[357]|0}function OTe(s){s=s|0,MTe(s,4926),UTe(s)|0}function MTe(s,l){s=s|0,l=l|0;var c=0;c=r9()|0,n[s>>2]=c,JTe(c,l),kp(n[s>>2]|0)}function UTe(s){s=s|0;var l=0;return l=n[s>>2]|0,Qg(l,_Te()|0),s|0}function _Te(){var s=0;return o[7912]|0||(g5(10412),rr(56,10412,U|0)|0,s=7912,n[s>>2]=1,n[s+4>>2]=0),Tr(10412)|0||g5(10412),10412}function g5(s){s=s|0,GTe(s),Fg(s,57)}function HTe(s){s=s|0,qTe(s+24|0)}function qTe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function GTe(s){s=s|0;var l=0;l=Kr()|0,zr(s,5,5,l,KTe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function jTe(s){s=s|0,YTe(s)}function YTe(s){s=s|0,WTe(s)}function WTe(s){s=s|0;var l=0,c=0;l=s+8|0,c=l+48|0;do n[l>>2]=0,l=l+4|0;while((l|0)<(c|0));o[s+56>>0]=1}function KTe(){return 1432}function zTe(){return VTe()|0}function VTe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0,k=0;B=C,C=C+16|0,s=B+4|0,l=B,c=Ka(8)|0,f=c,d=Kt(48)|0,m=d,k=m+48|0;do n[m>>2]=0,m=m+4|0;while((m|0)<(k|0));return m=f+4|0,n[m>>2]=d,k=Kt(8)|0,m=n[m>>2]|0,n[l>>2]=0,n[s>>2]=n[l>>2],n9(k,m,s),n[c>>2]=k,C=B,f|0}function JTe(s,l){s=s|0,l=l|0,n[s>>2]=XTe()|0,n[s+4>>2]=ZTe()|0,n[s+12>>2]=l,n[s+8>>2]=$Te()|0,n[s+32>>2]=6}function XTe(){return 11704}function ZTe(){return 1436}function $Te(){return lD()|0}function eLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(tLe(c),gt(c)):l|0&>(l)}function tLe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function rLe(s){s=s|0,nLe(s,4933),iLe(s)|0,sLe(s)|0}function nLe(s,l){s=s|0,l=l|0;var c=0;c=xLe()|0,n[s>>2]=c,kLe(c,l),kp(n[s>>2]|0)}function iLe(s){s=s|0;var l=0;return l=n[s>>2]|0,Qg(l,ELe()|0),s|0}function sLe(s){s=s|0;var l=0;return l=n[s>>2]|0,Qg(l,oLe()|0),s|0}function oLe(){var s=0;return o[7920]|0||(d5(10452),rr(58,10452,U|0)|0,s=7920,n[s>>2]=1,n[s+4>>2]=0),Tr(10452)|0||d5(10452),10452}function d5(s){s=s|0,cLe(s),Fg(s,1)}function aLe(s){s=s|0,lLe(s+24|0)}function lLe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function cLe(s){s=s|0;var l=0;l=Kr()|0,zr(s,5,1,l,pLe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function uLe(s,l,c){s=s|0,l=+l,c=+c,ALe(s,l,c)}function ALe(s,l,c){s=s|0,l=+l,c=+c;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+32|0,m=f+8|0,k=f+17|0,d=f,B=f+16|0,Qu(k,l),E[m>>3]=+Fu(k,l),Qu(B,c),E[d>>3]=+Fu(B,c),fLe(s,m,d),C=f}function fLe(s,l,c){s=s|0,l=l|0,c=c|0,m5(s+8|0,+E[l>>3],+E[c>>3]),o[s+24>>0]=1}function m5(s,l,c){s=s|0,l=+l,c=+c,E[s>>3]=l,E[s+8>>3]=c}function pLe(){return 1472}function hLe(s,l){return s=+s,l=+l,gLe(s,l)|0}function gLe(s,l){s=+s,l=+l;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return f=C,C=C+16|0,B=f+4|0,k=f+8|0,Q=f,d=Ka(8)|0,c=d,m=Kt(16)|0,Qu(B,s),s=+Fu(B,s),Qu(k,l),m5(m,s,+Fu(k,l)),k=c+4|0,n[k>>2]=m,m=Kt(8)|0,k=n[k>>2]|0,n[Q>>2]=0,n[B>>2]=n[Q>>2],y5(m,k,B),n[d>>2]=m,C=f,c|0}function y5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1452,n[c+12>>2]=l,n[s+4>>2]=c}function dLe(s){s=s|0,Jm(s),gt(s)}function mLe(s){s=s|0,s=n[s+12>>2]|0,s|0&>(s)}function yLe(s){s=s|0,gt(s)}function ELe(){var s=0;return o[7928]|0||(E5(10488),rr(59,10488,U|0)|0,s=7928,n[s>>2]=1,n[s+4>>2]=0),Tr(10488)|0||E5(10488),10488}function E5(s){s=s|0,ILe(s),Fg(s,60)}function CLe(s){s=s|0,wLe(s+24|0)}function wLe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function ILe(s){s=s|0;var l=0;l=Kr()|0,zr(s,5,6,l,PLe()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function BLe(s){s=s|0,vLe(s)}function vLe(s){s=s|0,DLe(s)}function DLe(s){s=s|0,C5(s+8|0),o[s+24>>0]=1}function C5(s){s=s|0,n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,n[s+12>>2]=0}function PLe(){return 1492}function SLe(){return bLe()|0}function bLe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0;return l=C,C=C+16|0,d=l+4|0,B=l,c=Ka(8)|0,s=c,f=Kt(16)|0,C5(f),m=s+4|0,n[m>>2]=f,f=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],y5(f,m,d),n[c>>2]=f,C=l,s|0}function xLe(){var s=0;return o[7936]|0||(NLe(10524),rr(25,10524,U|0)|0,s=7936,n[s>>2]=1,n[s+4>>2]=0),10524}function kLe(s,l){s=s|0,l=l|0,n[s>>2]=QLe()|0,n[s+4>>2]=FLe()|0,n[s+12>>2]=l,n[s+8>>2]=RLe()|0,n[s+32>>2]=7}function QLe(){return 11700}function FLe(){return 1484}function RLe(){return lD()|0}function TLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(LLe(c),gt(c)):l|0&>(l)}function LLe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function NLe(s){s=s|0,Dp(s)}function OLe(s,l,c){s=s|0,l=l|0,c=c|0,s=pn(l)|0,l=MLe(c)|0,c=ULe(c,0)|0,gNe(s,l,c,cR()|0,0)}function MLe(s){return s=s|0,s|0}function ULe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=cR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(I5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(WLe(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function cR(){var s=0,l=0;if(o[7944]|0||(w5(10568),rr(61,10568,U|0)|0,l=7944,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10568)|0)){s=10568,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));w5(10568)}return 10568}function w5(s){s=s|0,qLe(s)}function _Le(s){s=s|0,HLe(s+24|0)}function HLe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function qLe(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,17,l,C9()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function GLe(s){return s=s|0,YLe(n[(jLe(s)|0)>>2]|0)|0}function jLe(s){return s=s|0,(n[(cR()|0)+24>>2]|0)+(s<<3)|0}function YLe(s){return s=s|0,oD(CD[s&7]()|0)|0}function I5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function WLe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=KLe(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,zLe(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,I5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,VLe(s,d),JLe(d),C=k;return}}function KLe(s){return s=s|0,536870911}function zLe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function VLe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function JLe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function XLe(){ZLe()}function ZLe(){$Le(10604)}function $Le(s){s=s|0,eNe(s,4955)}function eNe(s,l){s=s|0,l=l|0;var c=0;c=tNe()|0,n[s>>2]=c,rNe(c,l),kp(n[s>>2]|0)}function tNe(){var s=0;return o[7952]|0||(ANe(10612),rr(25,10612,U|0)|0,s=7952,n[s>>2]=1,n[s+4>>2]=0),10612}function rNe(s,l){s=s|0,l=l|0,n[s>>2]=oNe()|0,n[s+4>>2]=aNe()|0,n[s+12>>2]=l,n[s+8>>2]=lNe()|0,n[s+32>>2]=8}function kp(s){s=s|0;var l=0,c=0;l=C,C=C+16|0,c=l,Ym()|0,n[c>>2]=s,nNe(10608,c),C=l}function Ym(){return o[11714]|0||(n[2652]=0,rr(62,10608,U|0)|0,o[11714]=1),10608}function nNe(s,l){s=s|0,l=l|0;var c=0;c=Kt(8)|0,n[c+4>>2]=n[l>>2],n[c>>2]=n[s>>2],n[s>>2]=c}function iNe(s){s=s|0,sNe(s)}function sNe(s){s=s|0;var l=0,c=0;if(l=n[s>>2]|0,l|0)do c=l,l=n[l>>2]|0,gt(c);while((l|0)!=0);n[s>>2]=0}function oNe(){return 11715}function aNe(){return 1496}function lNe(){return aD()|0}function cNe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(uNe(c),gt(c)):l|0&>(l)}function uNe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function ANe(s){s=s|0,Dp(s)}function fNe(s,l){s=s|0,l=l|0;var c=0,f=0;Ym()|0,c=n[2652]|0;e:do if(c|0){for(;f=n[c+4>>2]|0,!(f|0&&(n7(uR(f)|0,s)|0)==0);)if(c=n[c>>2]|0,!c)break e;pNe(f,l)}while(0)}function uR(s){return s=s|0,n[s+12>>2]|0}function pNe(s,l){s=s|0,l=l|0;var c=0;s=s+36|0,c=n[s>>2]|0,c|0&&(GA(c),gt(c)),c=Kt(4)|0,Jj(c,l),n[s>>2]=c}function AR(){return o[11716]|0||(n[2664]=0,rr(63,10656,U|0)|0,o[11716]=1),10656}function B5(){var s=0;return o[11717]|0?s=n[2665]|0:(hNe(),n[2665]=1504,o[11717]=1,s=1504),s|0}function hNe(){o[11740]|0||(o[11718]=gr(gr(8,0)|0,0)|0,o[11719]=gr(gr(0,0)|0,0)|0,o[11720]=gr(gr(0,16)|0,0)|0,o[11721]=gr(gr(8,0)|0,0)|0,o[11722]=gr(gr(0,0)|0,0)|0,o[11723]=gr(gr(8,0)|0,0)|0,o[11724]=gr(gr(0,0)|0,0)|0,o[11725]=gr(gr(8,0)|0,0)|0,o[11726]=gr(gr(0,0)|0,0)|0,o[11727]=gr(gr(8,0)|0,0)|0,o[11728]=gr(gr(0,0)|0,0)|0,o[11729]=gr(gr(0,0)|0,32)|0,o[11730]=gr(gr(0,0)|0,32)|0,o[11740]=1)}function v5(){return 1572}function gNe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,k=0,Q=0,M=0,O=0;m=C,C=C+32|0,O=m+16|0,M=m+12|0,Q=m+8|0,k=m+4|0,B=m,n[O>>2]=s,n[M>>2]=l,n[Q>>2]=c,n[k>>2]=f,n[B>>2]=d,AR()|0,dNe(10656,O,M,Q,k,B),C=m}function dNe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0;B=Kt(24)|0,$j(B+4|0,n[l>>2]|0,n[c>>2]|0,n[f>>2]|0,n[d>>2]|0,n[m>>2]|0),n[B>>2]=n[s>>2],n[s>>2]=B}function D5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0,Me=0,Qe=0,et=0,Xe=0,lt=0;if(lt=C,C=C+32|0,Me=lt+20|0,Qe=lt+8|0,et=lt+4|0,Xe=lt,l=n[l>>2]|0,l|0){je=Me+4|0,Q=Me+8|0,M=Qe+4|0,O=Qe+8|0,G=Qe+8|0,se=Me+8|0;do{if(B=l+4|0,k=fR(B)|0,k|0){if(d=Lw(k)|0,n[Me>>2]=0,n[je>>2]=0,n[Q>>2]=0,f=(Nw(k)|0)+1|0,mNe(Me,f),f|0)for(;f=f+-1|0,xc(Qe,n[d>>2]|0),m=n[je>>2]|0,m>>>0<(n[se>>2]|0)>>>0?(n[m>>2]=n[Qe>>2],n[je>>2]=(n[je>>2]|0)+4):pR(Me,Qe),f;)d=d+4|0;f=Ow(k)|0,n[Qe>>2]=0,n[M>>2]=0,n[O>>2]=0;e:do if(n[f>>2]|0)for(d=0,m=0;;){if((d|0)==(m|0)?yNe(Qe,f):(n[d>>2]=n[f>>2],n[M>>2]=(n[M>>2]|0)+4),f=f+4|0,!(n[f>>2]|0))break e;d=n[M>>2]|0,m=n[G>>2]|0}while(0);n[et>>2]=cD(B)|0,n[Xe>>2]=Tr(k)|0,ENe(c,s,et,Xe,Me,Qe),hR(Qe),ef(Me)}l=n[l>>2]|0}while((l|0)!=0)}C=lt}function fR(s){return s=s|0,n[s+12>>2]|0}function Lw(s){return s=s|0,n[s+12>>2]|0}function Nw(s){return s=s|0,n[s+16>>2]|0}function mNe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;d=C,C=C+32|0,c=d,f=n[s>>2]|0,(n[s+8>>2]|0)-f>>2>>>0>>0&&(R5(c,l,(n[s+4>>2]|0)-f>>2,s+8|0),T5(s,c),L5(c)),C=d}function pR(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0;if(B=C,C=C+32|0,c=B,f=s+4|0,d=((n[f>>2]|0)-(n[s>>2]|0)>>2)+1|0,m=F5(s)|0,m>>>0>>0)Jr(s);else{k=n[s>>2]|0,M=(n[s+8>>2]|0)-k|0,Q=M>>1,R5(c,M>>2>>>0>>1>>>0?Q>>>0>>0?d:Q:m,(n[f>>2]|0)-k>>2,s+8|0),m=c+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,T5(s,c),L5(c),C=B;return}}function Ow(s){return s=s|0,n[s+8>>2]|0}function yNe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0;if(B=C,C=C+32|0,c=B,f=s+4|0,d=((n[f>>2]|0)-(n[s>>2]|0)>>2)+1|0,m=Q5(s)|0,m>>>0>>0)Jr(s);else{k=n[s>>2]|0,M=(n[s+8>>2]|0)-k|0,Q=M>>1,MNe(c,M>>2>>>0>>1>>>0?Q>>>0>>0?d:Q:m,(n[f>>2]|0)-k>>2,s+8|0),m=c+8|0,n[n[m>>2]>>2]=n[l>>2],n[m>>2]=(n[m>>2]|0)+4,UNe(s,c),_Ne(c),C=B;return}}function cD(s){return s=s|0,n[s>>2]|0}function ENe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,CNe(s,l,c,f,d,m)}function hR(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-4-f|0)>>>2)<<2)),gt(c))}function ef(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-4-f|0)>>>2)<<2)),gt(c))}function CNe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,k=0,Q=0,M=0,O=0,G=0;B=C,C=C+48|0,O=B+40|0,k=B+32|0,G=B+24|0,Q=B+12|0,M=B,za(k),s=da(s)|0,n[G>>2]=n[l>>2],c=n[c>>2]|0,f=n[f>>2]|0,gR(Q,d),wNe(M,m),n[O>>2]=n[G>>2],INe(s,O,c,f,Q,M),hR(M),ef(Q),Va(k),C=B}function gR(s,l){s=s|0,l=l|0;var c=0,f=0;n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,c=l+4|0,f=(n[c>>2]|0)-(n[l>>2]|0)>>2,f|0&&(NNe(s,f),ONe(s,n[l>>2]|0,n[c>>2]|0,f))}function wNe(s,l){s=s|0,l=l|0;var c=0,f=0;n[s>>2]=0,n[s+4>>2]=0,n[s+8>>2]=0,c=l+4|0,f=(n[c>>2]|0)-(n[l>>2]|0)>>2,f|0&&(TNe(s,f),LNe(s,n[l>>2]|0,n[c>>2]|0,f))}function INe(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,k=0,Q=0,M=0,O=0,G=0;B=C,C=C+32|0,O=B+28|0,G=B+24|0,k=B+12|0,Q=B,M=Sl(BNe()|0)|0,n[G>>2]=n[l>>2],n[O>>2]=n[G>>2],l=Rg(O)|0,c=P5(c)|0,f=dR(f)|0,n[k>>2]=n[d>>2],O=d+4|0,n[k+4>>2]=n[O>>2],G=d+8|0,n[k+8>>2]=n[G>>2],n[G>>2]=0,n[O>>2]=0,n[d>>2]=0,d=mR(k)|0,n[Q>>2]=n[m>>2],O=m+4|0,n[Q+4>>2]=n[O>>2],G=m+8|0,n[Q+8>>2]=n[G>>2],n[G>>2]=0,n[O>>2]=0,n[m>>2]=0,ao(0,M|0,s|0,l|0,c|0,f|0,d|0,vNe(Q)|0)|0,hR(Q),ef(k),C=B}function BNe(){var s=0;return o[7968]|0||(FNe(10708),s=7968,n[s>>2]=1,n[s+4>>2]=0),10708}function Rg(s){return s=s|0,b5(s)|0}function P5(s){return s=s|0,S5(s)|0}function dR(s){return s=s|0,oD(s)|0}function mR(s){return s=s|0,PNe(s)|0}function vNe(s){return s=s|0,DNe(s)|0}function DNe(s){s=s|0;var l=0,c=0,f=0;if(f=(n[s+4>>2]|0)-(n[s>>2]|0)|0,c=f>>2,f=Ka(f+4|0)|0,n[f>>2]=c,c|0){l=0;do n[f+4+(l<<2)>>2]=S5(n[(n[s>>2]|0)+(l<<2)>>2]|0)|0,l=l+1|0;while((l|0)!=(c|0))}return f|0}function S5(s){return s=s|0,s|0}function PNe(s){s=s|0;var l=0,c=0,f=0;if(f=(n[s+4>>2]|0)-(n[s>>2]|0)|0,c=f>>2,f=Ka(f+4|0)|0,n[f>>2]=c,c|0){l=0;do n[f+4+(l<<2)>>2]=b5((n[s>>2]|0)+(l<<2)|0)|0,l=l+1|0;while((l|0)!=(c|0))}return f|0}function b5(s){s=s|0;var l=0,c=0,f=0,d=0;return d=C,C=C+32|0,l=d+12|0,c=d,f=xF(x5()|0)|0,f?(kF(l,f),QF(c,l),lUe(s,c),s=FF(l)|0):s=SNe(s)|0,C=d,s|0}function x5(){var s=0;return o[7960]|0||(QNe(10664),rr(25,10664,U|0)|0,s=7960,n[s>>2]=1,n[s+4>>2]=0),10664}function SNe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,k=0;return c=C,C=C+16|0,d=c+4|0,B=c,f=Ka(8)|0,l=f,k=Kt(4)|0,n[k>>2]=n[s>>2],m=l+4|0,n[m>>2]=k,s=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],k5(s,m,d),n[f>>2]=s,C=c,l|0}function k5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1656,n[c+12>>2]=l,n[s+4>>2]=c}function bNe(s){s=s|0,Jm(s),gt(s)}function xNe(s){s=s|0,s=n[s+12>>2]|0,s|0&>(s)}function kNe(s){s=s|0,gt(s)}function QNe(s){s=s|0,Dp(s)}function FNe(s){s=s|0,bl(s,RNe()|0,5)}function RNe(){return 1676}function TNe(s,l){s=s|0,l=l|0;var c=0;if((Q5(s)|0)>>>0>>0&&Jr(s),l>>>0>1073741823)Rt();else{c=Kt(l<<2)|0,n[s+4>>2]=c,n[s>>2]=c,n[s+8>>2]=c+(l<<2);return}}function LNe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,f=s+4|0,s=c-l|0,(s|0)>0&&(Dr(n[f>>2]|0,l|0,s|0)|0,n[f>>2]=(n[f>>2]|0)+(s>>>2<<2))}function Q5(s){return s=s|0,1073741823}function NNe(s,l){s=s|0,l=l|0;var c=0;if((F5(s)|0)>>>0>>0&&Jr(s),l>>>0>1073741823)Rt();else{c=Kt(l<<2)|0,n[s+4>>2]=c,n[s>>2]=c,n[s+8>>2]=c+(l<<2);return}}function ONe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,f=s+4|0,s=c-l|0,(s|0)>0&&(Dr(n[f>>2]|0,l|0,s|0)|0,n[f>>2]=(n[f>>2]|0)+(s>>>2<<2))}function F5(s){return s=s|0,1073741823}function MNe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>1073741823)Rt();else{d=Kt(l<<2)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<2)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<2)}function UNe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>2)<<2)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function _Ne(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-4-l|0)>>>2)<<2)),s=n[s>>2]|0,s|0&>(s)}function R5(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>1073741823)Rt();else{d=Kt(l<<2)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<2)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<2)}function T5(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|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0),B=n[se>>2]|0,B|0){n[O>>2]=0,n[s>>2]=0,n[l>>2]=0;do xc(je,n[(Wm(n[B+4>>2]|0)|0)>>2]|0),k=n[s>>2]|0,k>>>0<(n[c>>2]|0)>>>0?(n[k>>2]=n[je>>2],n[s>>2]=(n[s>>2]|0)+4):pR(O,je),B=n[B>>2]|0;while((B|0)!=0);WNe(f,G,O),ef(O)}n[Me>>2]=n[G>>2],M=O5(Q)|0,n[O>>2]=n[Me>>2],D5(O,M,d),s9(se),m=n[m>>2]|0}while((m|0)!=0)}C=Qe}function qNe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,iOe(s,l,c,f)}function GNe(s,l,c){s=s|0,l=l|0,c=c|0,nOe(s,l,c)}function Wm(s){return s=s|0,s|0}function jNe(s,l,c){s=s|0,l=l|0,c=c|0,$Ne(s,l,c)}function N5(s){return s=s|0,s+16|0}function YNe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;if(m=C,C=C+16|0,d=m+8|0,c=m,n[s>>2]=0,f=n[l>>2]|0,n[d>>2]=f,n[c>>2]=s,c=ZNe(c)|0,f|0){if(f=Kt(12)|0,B=(M5(d)|0)+4|0,s=n[B+4>>2]|0,l=f+4|0,n[l>>2]=n[B>>2],n[l+4>>2]=s,l=n[n[d>>2]>>2]|0,n[d>>2]=l,!l)s=f;else for(l=f;s=Kt(12)|0,Q=(M5(d)|0)+4|0,k=n[Q+4>>2]|0,B=s+4|0,n[B>>2]=n[Q>>2],n[B+4>>2]=k,n[l>>2]=s,B=n[n[d>>2]>>2]|0,n[d>>2]=B,B;)l=s;n[s>>2]=n[c>>2],n[c>>2]=f}C=m}function WNe(s,l,c){s=s|0,l=l|0,c=c|0,KNe(s,l,c)}function O5(s){return s=s|0,s+24|0}function KNe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+32|0,B=f+24|0,d=f+16|0,k=f+12|0,m=f,za(d),s=da(s)|0,n[k>>2]=n[l>>2],gR(m,c),n[B>>2]=n[k>>2],zNe(s,B,m),ef(m),Va(d),C=f}function zNe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=C,C=C+32|0,B=f+16|0,k=f+12|0,d=f,m=Sl(VNe()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=Rg(B)|0,n[d>>2]=n[c>>2],B=c+4|0,n[d+4>>2]=n[B>>2],k=c+8|0,n[d+8>>2]=n[k>>2],n[k>>2]=0,n[B>>2]=0,n[c>>2]=0,oo(0,m|0,s|0,l|0,mR(d)|0)|0,ef(d),C=f}function VNe(){var s=0;return o[7976]|0||(JNe(10720),s=7976,n[s>>2]=1,n[s+4>>2]=0),10720}function JNe(s){s=s|0,bl(s,XNe()|0,2)}function XNe(){return 1732}function ZNe(s){return s=s|0,n[s>>2]|0}function M5(s){return s=s|0,n[s>>2]|0}function $Ne(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=C,C=C+32|0,m=f+16|0,d=f+8|0,B=f,za(d),s=da(s)|0,n[B>>2]=n[l>>2],c=n[c>>2]|0,n[m>>2]=n[B>>2],U5(s,m,c),Va(d),C=f}function U5(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=C,C=C+16|0,m=f+4|0,B=f,d=Sl(eOe()|0)|0,n[B>>2]=n[l>>2],n[m>>2]=n[B>>2],l=Rg(m)|0,oo(0,d|0,s|0,l|0,P5(c)|0)|0,C=f}function eOe(){var s=0;return o[7984]|0||(tOe(10732),s=7984,n[s>>2]=1,n[s+4>>2]=0),10732}function tOe(s){s=s|0,bl(s,rOe()|0,2)}function rOe(){return 1744}function nOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;f=C,C=C+32|0,m=f+16|0,d=f+8|0,B=f,za(d),s=da(s)|0,n[B>>2]=n[l>>2],c=n[c>>2]|0,n[m>>2]=n[B>>2],U5(s,m,c),Va(d),C=f}function iOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0;d=C,C=C+32|0,B=d+16|0,m=d+8|0,k=d,za(m),s=da(s)|0,n[k>>2]=n[l>>2],c=o[c>>0]|0,f=o[f>>0]|0,n[B>>2]=n[k>>2],sOe(s,B,c,f),Va(m),C=d}function sOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0;d=C,C=C+16|0,B=d+4|0,k=d,m=Sl(oOe()|0)|0,n[k>>2]=n[l>>2],n[B>>2]=n[k>>2],l=Rg(B)|0,c=Km(c)|0,hc(0,m|0,s|0,l|0,c|0,Km(f)|0)|0,C=d}function oOe(){var s=0;return o[7992]|0||(lOe(10744),s=7992,n[s>>2]=1,n[s+4>>2]=0),10744}function Km(s){return s=s|0,aOe(s)|0}function aOe(s){return s=s|0,s&255|0}function lOe(s){s=s|0,bl(s,cOe()|0,3)}function cOe(){return 1756}function uOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;switch(se=C,C=C+32|0,k=se+8|0,Q=se+4|0,M=se+20|0,O=se,NF(s,0),f=aUe(l)|0,n[k>>2]=0,G=k+4|0,n[G>>2]=0,n[k+8>>2]=0,f<<24>>24){case 0:{o[M>>0]=0,AOe(Q,c,M),uD(s,Q)|0,jA(Q);break}case 8:{G=BR(l)|0,o[M>>0]=8,xc(O,n[G+4>>2]|0),fOe(Q,c,M,O,G+8|0),uD(s,Q)|0,jA(Q);break}case 9:{if(m=BR(l)|0,l=n[m+4>>2]|0,l|0)for(B=k+8|0,d=m+12|0;l=l+-1|0,xc(Q,n[d>>2]|0),f=n[G>>2]|0,f>>>0<(n[B>>2]|0)>>>0?(n[f>>2]=n[Q>>2],n[G>>2]=(n[G>>2]|0)+4):pR(k,Q),l;)d=d+4|0;o[M>>0]=9,xc(O,n[m+8>>2]|0),pOe(Q,c,M,O,k),uD(s,Q)|0,jA(Q);break}default:G=BR(l)|0,o[M>>0]=f,xc(O,n[G+4>>2]|0),hOe(Q,c,M,O),uD(s,Q)|0,jA(Q)}ef(k),C=se}function AOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;f=C,C=C+16|0,d=f,za(d),l=da(l)|0,SOe(s,l,o[c>>0]|0),Va(d),C=f}function uD(s,l){s=s|0,l=l|0;var c=0;return c=n[s>>2]|0,c|0&&SA(c|0),n[s>>2]=n[l>>2],n[l>>2]=0,s|0}function fOe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,k=0,Q=0;m=C,C=C+32|0,k=m+16|0,B=m+8|0,Q=m,za(B),l=da(l)|0,c=o[c>>0]|0,n[Q>>2]=n[f>>2],d=n[d>>2]|0,n[k>>2]=n[Q>>2],BOe(s,l,c,k,d),Va(B),C=m}function pOe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,k=0,Q=0,M=0;m=C,C=C+32|0,Q=m+24|0,B=m+16|0,M=m+12|0,k=m,za(B),l=da(l)|0,c=o[c>>0]|0,n[M>>2]=n[f>>2],gR(k,d),n[Q>>2]=n[M>>2],EOe(s,l,c,Q,k),ef(k),Va(B),C=m}function hOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0;d=C,C=C+32|0,B=d+16|0,m=d+8|0,k=d,za(m),l=da(l)|0,c=o[c>>0]|0,n[k>>2]=n[f>>2],n[B>>2]=n[k>>2],gOe(s,l,c,B),Va(m),C=d}function gOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0,B=0,k=0;d=C,C=C+16|0,m=d+4|0,k=d,B=Sl(dOe()|0)|0,c=Km(c)|0,n[k>>2]=n[f>>2],n[m>>2]=n[k>>2],AD(s,oo(0,B|0,l|0,c|0,Rg(m)|0)|0),C=d}function dOe(){var s=0;return o[8e3]|0||(mOe(10756),s=8e3,n[s>>2]=1,n[s+4>>2]=0),10756}function AD(s,l){s=s|0,l=l|0,NF(s,l)}function mOe(s){s=s|0,bl(s,yOe()|0,2)}function yOe(){return 1772}function EOe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,k=0,Q=0,M=0;m=C,C=C+32|0,Q=m+16|0,M=m+12|0,B=m,k=Sl(COe()|0)|0,c=Km(c)|0,n[M>>2]=n[f>>2],n[Q>>2]=n[M>>2],f=Rg(Q)|0,n[B>>2]=n[d>>2],Q=d+4|0,n[B+4>>2]=n[Q>>2],M=d+8|0,n[B+8>>2]=n[M>>2],n[M>>2]=0,n[Q>>2]=0,n[d>>2]=0,AD(s,hc(0,k|0,l|0,c|0,f|0,mR(B)|0)|0),ef(B),C=m}function COe(){var s=0;return o[8008]|0||(wOe(10768),s=8008,n[s>>2]=1,n[s+4>>2]=0),10768}function wOe(s){s=s|0,bl(s,IOe()|0,3)}function IOe(){return 1784}function BOe(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,k=0,Q=0;m=C,C=C+16|0,k=m+4|0,Q=m,B=Sl(vOe()|0)|0,c=Km(c)|0,n[Q>>2]=n[f>>2],n[k>>2]=n[Q>>2],f=Rg(k)|0,AD(s,hc(0,B|0,l|0,c|0,f|0,dR(d)|0)|0),C=m}function vOe(){var s=0;return o[8016]|0||(DOe(10780),s=8016,n[s>>2]=1,n[s+4>>2]=0),10780}function DOe(s){s=s|0,bl(s,POe()|0,3)}function POe(){return 1800}function SOe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;f=Sl(bOe()|0)|0,AD(s,Qn(0,f|0,l|0,Km(c)|0)|0)}function bOe(){var s=0;return o[8024]|0||(xOe(10792),s=8024,n[s>>2]=1,n[s+4>>2]=0),10792}function xOe(s){s=s|0,bl(s,kOe()|0,1)}function kOe(){return 1816}function QOe(){FOe(),ROe(),TOe()}function FOe(){n[2702]=p7(65536)|0}function ROe(){eMe(10856)}function TOe(){LOe(10816)}function LOe(s){s=s|0,NOe(s,5044),OOe(s)|0}function NOe(s,l){s=s|0,l=l|0;var c=0;c=x5()|0,n[s>>2]=c,zOe(c,l),kp(n[s>>2]|0)}function OOe(s){s=s|0;var l=0;return l=n[s>>2]|0,Qg(l,MOe()|0),s|0}function MOe(){var s=0;return o[8032]|0||(_5(10820),rr(64,10820,U|0)|0,s=8032,n[s>>2]=1,n[s+4>>2]=0),Tr(10820)|0||_5(10820),10820}function _5(s){s=s|0,HOe(s),Fg(s,25)}function UOe(s){s=s|0,_Oe(s+24|0)}function _Oe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function HOe(s){s=s|0;var l=0;l=Kr()|0,zr(s,5,18,l,YOe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function qOe(s,l){s=s|0,l=l|0,GOe(s,l)}function GOe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;c=C,C=C+16|0,f=c,d=c+4|0,xg(d,l),n[f>>2]=kg(d,l)|0,jOe(s,f),C=c}function jOe(s,l){s=s|0,l=l|0,H5(s+4|0,n[l>>2]|0),o[s+8>>0]=1}function H5(s,l){s=s|0,l=l|0,n[s>>2]=l}function YOe(){return 1824}function WOe(s){return s=s|0,KOe(s)|0}function KOe(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,k=0;return c=C,C=C+16|0,d=c+4|0,B=c,f=Ka(8)|0,l=f,k=Kt(4)|0,xg(d,s),H5(k,kg(d,s)|0),m=l+4|0,n[m>>2]=k,s=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],k5(s,m,d),n[f>>2]=s,C=c,l|0}function Ka(s){s=s|0;var l=0,c=0;return s=s+7&-8,s>>>0<=32768&&(l=n[2701]|0,s>>>0<=(65536-l|0)>>>0)?(c=(n[2702]|0)+l|0,n[2701]=l+s,s=c):(s=p7(s+8|0)|0,n[s>>2]=n[2703],n[2703]=s,s=s+8|0),s|0}function zOe(s,l){s=s|0,l=l|0,n[s>>2]=VOe()|0,n[s+4>>2]=JOe()|0,n[s+12>>2]=l,n[s+8>>2]=XOe()|0,n[s+32>>2]=9}function VOe(){return 11744}function JOe(){return 1832}function XOe(){return lD()|0}function ZOe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&($Oe(c),gt(c)):l|0&>(l)}function $Oe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function eMe(s){s=s|0,tMe(s,5052),rMe(s)|0,nMe(s,5058,26)|0,iMe(s,5069,1)|0,sMe(s,5077,10)|0,oMe(s,5087,19)|0,aMe(s,5094,27)|0}function tMe(s,l){s=s|0,l=l|0;var c=0;c=$4e()|0,n[s>>2]=c,eUe(c,l),kp(n[s>>2]|0)}function rMe(s){s=s|0;var l=0;return l=n[s>>2]|0,Qg(l,U4e()|0),s|0}function nMe(s,l,c){return s=s|0,l=l|0,c=c|0,w4e(s,pn(l)|0,c,0),s|0}function iMe(s,l,c){return s=s|0,l=l|0,c=c|0,o4e(s,pn(l)|0,c,0),s|0}function sMe(s,l,c){return s=s|0,l=l|0,c=c|0,MMe(s,pn(l)|0,c,0),s|0}function oMe(s,l,c){return s=s|0,l=l|0,c=c|0,BMe(s,pn(l)|0,c,0),s|0}function q5(s,l){s=s|0,l=l|0;var c=0,f=0;e:for(;;){for(c=n[2703]|0;;){if((c|0)==(l|0))break e;if(f=n[c>>2]|0,n[2703]=f,!c)c=f;else break}gt(c)}n[2701]=s}function aMe(s,l,c){return s=s|0,l=l|0,c=c|0,lMe(s,pn(l)|0,c,0),s|0}function lMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=yR()|0,s=cMe(c)|0,hn(m,l,d,s,uMe(c,f)|0,f)}function yR(){var s=0,l=0;if(o[8040]|0||(j5(10860),rr(65,10860,U|0)|0,l=8040,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10860)|0)){s=10860,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));j5(10860)}return 10860}function cMe(s){return s=s|0,s|0}function uMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=yR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(G5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(AMe(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function G5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function AMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=fMe(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,pMe(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,G5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,hMe(s,d),gMe(d),C=k;return}}function fMe(s){return s=s|0,536870911}function pMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function hMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function gMe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function j5(s){s=s|0,yMe(s)}function dMe(s){s=s|0,mMe(s+24|0)}function mMe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function yMe(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,11,l,EMe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function EMe(){return 1840}function CMe(s,l,c){s=s|0,l=l|0,c=c|0,IMe(n[(wMe(s)|0)>>2]|0,l,c)}function wMe(s){return s=s|0,(n[(yR()|0)+24>>2]|0)+(s<<3)|0}function IMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;f=C,C=C+16|0,m=f+1|0,d=f,xg(m,l),l=kg(m,l)|0,xg(d,c),c=kg(d,c)|0,rf[s&31](l,c),C=f}function BMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=ER()|0,s=vMe(c)|0,hn(m,l,d,s,DMe(c,f)|0,f)}function ER(){var s=0,l=0;if(o[8048]|0||(W5(10896),rr(66,10896,U|0)|0,l=8048,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10896)|0)){s=10896,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));W5(10896)}return 10896}function vMe(s){return s=s|0,s|0}function DMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=ER()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(Y5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(PMe(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function Y5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function PMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=SMe(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,bMe(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,Y5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,xMe(s,d),kMe(d),C=k;return}}function SMe(s){return s=s|0,536870911}function bMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function xMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function kMe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function W5(s){s=s|0,RMe(s)}function QMe(s){s=s|0,FMe(s+24|0)}function FMe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function RMe(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,11,l,TMe()|0,1),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function TMe(){return 1852}function LMe(s,l){return s=s|0,l=l|0,OMe(n[(NMe(s)|0)>>2]|0,l)|0}function NMe(s){return s=s|0,(n[(ER()|0)+24>>2]|0)+(s<<3)|0}function OMe(s,l){s=s|0,l=l|0;var c=0,f=0;return c=C,C=C+16|0,f=c,xg(f,l),l=kg(f,l)|0,l=oD(Og[s&31](l)|0)|0,C=c,l|0}function MMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=CR()|0,s=UMe(c)|0,hn(m,l,d,s,_Me(c,f)|0,f)}function CR(){var s=0,l=0;if(o[8056]|0||(z5(10932),rr(67,10932,U|0)|0,l=8056,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10932)|0)){s=10932,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));z5(10932)}return 10932}function UMe(s){return s=s|0,s|0}function _Me(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=CR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(K5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(HMe(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function K5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function HMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=qMe(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,GMe(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,K5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,jMe(s,d),YMe(d),C=k;return}}function qMe(s){return s=s|0,536870911}function GMe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function jMe(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function YMe(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function z5(s){s=s|0,zMe(s)}function WMe(s){s=s|0,KMe(s+24|0)}function KMe(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function zMe(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,7,l,VMe()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function VMe(){return 1860}function JMe(s,l,c){return s=s|0,l=l|0,c=c|0,ZMe(n[(XMe(s)|0)>>2]|0,l,c)|0}function XMe(s){return s=s|0,(n[(CR()|0)+24>>2]|0)+(s<<3)|0}function ZMe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0;return f=C,C=C+32|0,B=f+12|0,m=f+8|0,k=f,Q=f+16|0,d=f+4|0,$Me(Q,l),e4e(k,Q,l),Pp(d,c),c=Sp(d,c)|0,n[B>>2]=n[k>>2],Hw[s&15](m,B,c),c=t4e(m)|0,jA(m),bp(d),C=f,c|0}function $Me(s,l){s=s|0,l=l|0}function e4e(s,l,c){s=s|0,l=l|0,c=c|0,r4e(s,c)}function t4e(s){return s=s|0,da(s)|0}function r4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0;d=C,C=C+16|0,c=d,f=l,f&1?(n4e(c,0),ii(f|0,c|0)|0,i4e(s,c),s4e(c)):n[s>>2]=n[l>>2],C=d}function n4e(s,l){s=s|0,l=l|0,Xj(s,l),n[s+4>>2]=0,o[s+8>>0]=0}function i4e(s,l){s=s|0,l=l|0,n[s>>2]=n[l+4>>2]}function s4e(s){s=s|0,o[s+8>>0]=0}function o4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=wR()|0,s=a4e(c)|0,hn(m,l,d,s,l4e(c,f)|0,f)}function wR(){var s=0,l=0;if(o[8064]|0||(J5(10968),rr(68,10968,U|0)|0,l=8064,n[l>>2]=1,n[l+4>>2]=0),!(Tr(10968)|0)){s=10968,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));J5(10968)}return 10968}function a4e(s){return s=s|0,s|0}function l4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=wR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(V5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(c4e(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function V5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function c4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=u4e(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,A4e(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,V5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,f4e(s,d),p4e(d),C=k;return}}function u4e(s){return s=s|0,536870911}function A4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function f4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function p4e(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function J5(s){s=s|0,d4e(s)}function h4e(s){s=s|0,g4e(s+24|0)}function g4e(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function d4e(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,1,l,m4e()|0,5),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function m4e(){return 1872}function y4e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,C4e(n[(E4e(s)|0)>>2]|0,l,c,f,d,m)}function E4e(s){return s=s|0,(n[(wR()|0)+24>>2]|0)+(s<<3)|0}function C4e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,k=0,Q=0,M=0,O=0,G=0;B=C,C=C+32|0,k=B+16|0,Q=B+12|0,M=B+8|0,O=B+4|0,G=B,Pp(k,l),l=Sp(k,l)|0,Pp(Q,c),c=Sp(Q,c)|0,Pp(M,f),f=Sp(M,f)|0,Pp(O,d),d=Sp(O,d)|0,Pp(G,m),m=Sp(G,m)|0,y7[s&1](l,c,f,d,m),bp(G),bp(O),bp(M),bp(Q),bp(k),C=B}function w4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;m=n[s>>2]|0,d=IR()|0,s=I4e(c)|0,hn(m,l,d,s,B4e(c,f)|0,f)}function IR(){var s=0,l=0;if(o[8072]|0||(Z5(11004),rr(69,11004,U|0)|0,l=8072,n[l>>2]=1,n[l+4>>2]=0),!(Tr(11004)|0)){s=11004,l=s+36|0;do n[s>>2]=0,s=s+4|0;while((s|0)<(l|0));Z5(11004)}return 11004}function I4e(s){return s=s|0,s|0}function B4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0,k=0,Q=0;return k=C,C=C+16|0,d=k,m=k+4|0,n[d>>2]=s,Q=IR()|0,B=Q+24|0,l=gr(l,4)|0,n[m>>2]=l,c=Q+28|0,f=n[c>>2]|0,f>>>0<(n[Q+32>>2]|0)>>>0?(X5(f,s,l),l=(n[c>>2]|0)+8|0,n[c>>2]=l):(v4e(B,d,m),l=n[c>>2]|0),C=k,(l-(n[B>>2]|0)>>3)+-1|0}function X5(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,n[s+4>>2]=c}function v4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0;if(k=C,C=C+32|0,d=k,m=s+4|0,B=((n[m>>2]|0)-(n[s>>2]|0)>>3)+1|0,f=D4e(s)|0,f>>>0>>0)Jr(s);else{Q=n[s>>2]|0,O=(n[s+8>>2]|0)-Q|0,M=O>>2,P4e(d,O>>3>>>0>>1>>>0?M>>>0>>0?B:M:f,(n[m>>2]|0)-Q>>3,s+8|0),B=d+8|0,X5(n[B>>2]|0,n[l>>2]|0,n[c>>2]|0),n[B>>2]=(n[B>>2]|0)+8,S4e(s,d),b4e(d),C=k;return}}function D4e(s){return s=s|0,536870911}function P4e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0;n[s+12>>2]=0,n[s+16>>2]=f;do if(l)if(l>>>0>536870911)Rt();else{d=Kt(l<<3)|0;break}else d=0;while(0);n[s>>2]=d,f=d+(c<<3)|0,n[s+8>>2]=f,n[s+4>>2]=f,n[s+12>>2]=d+(l<<3)}function S4e(s,l){s=s|0,l=l|0;var c=0,f=0,d=0,m=0,B=0;f=n[s>>2]|0,B=s+4|0,m=l+4|0,d=(n[B>>2]|0)-f|0,c=(n[m>>2]|0)+(0-(d>>3)<<3)|0,n[m>>2]=c,(d|0)>0?(Dr(c|0,f|0,d|0)|0,f=m,c=n[m>>2]|0):f=m,m=n[s>>2]|0,n[s>>2]=c,n[f>>2]=m,m=l+8|0,d=n[B>>2]|0,n[B>>2]=n[m>>2],n[m>>2]=d,m=s+8|0,B=l+12|0,s=n[m>>2]|0,n[m>>2]=n[B>>2],n[B>>2]=s,n[l>>2]=n[f>>2]}function b4e(s){s=s|0;var l=0,c=0,f=0;l=n[s+4>>2]|0,c=s+8|0,f=n[c>>2]|0,(f|0)!=(l|0)&&(n[c>>2]=f+(~((f+-8-l|0)>>>3)<<3)),s=n[s>>2]|0,s|0&>(s)}function Z5(s){s=s|0,Q4e(s)}function x4e(s){s=s|0,k4e(s+24|0)}function k4e(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function Q4e(s){s=s|0;var l=0;l=Kr()|0,zr(s,1,12,l,F4e()|0,2),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function F4e(){return 1896}function R4e(s,l,c){s=s|0,l=l|0,c=c|0,L4e(n[(T4e(s)|0)>>2]|0,l,c)}function T4e(s){return s=s|0,(n[(IR()|0)+24>>2]|0)+(s<<3)|0}function L4e(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;f=C,C=C+16|0,m=f+4|0,d=f,N4e(m,l),l=O4e(m,l)|0,Pp(d,c),c=Sp(d,c)|0,rf[s&31](l,c),bp(d),C=f}function N4e(s,l){s=s|0,l=l|0}function O4e(s,l){return s=s|0,l=l|0,M4e(l)|0}function M4e(s){return s=s|0,s|0}function U4e(){var s=0;return o[8080]|0||($5(11040),rr(70,11040,U|0)|0,s=8080,n[s>>2]=1,n[s+4>>2]=0),Tr(11040)|0||$5(11040),11040}function $5(s){s=s|0,q4e(s),Fg(s,71)}function _4e(s){s=s|0,H4e(s+24|0)}function H4e(s){s=s|0;var l=0,c=0,f=0;c=n[s>>2]|0,f=c,c|0&&(s=s+4|0,l=n[s>>2]|0,(l|0)!=(c|0)&&(n[s>>2]=l+(~((l+-8-f|0)>>>3)<<3)),gt(c))}function q4e(s){s=s|0;var l=0;l=Kr()|0,zr(s,5,7,l,W4e()|0,0),n[s+24>>2]=0,n[s+28>>2]=0,n[s+32>>2]=0}function G4e(s){s=s|0,j4e(s)}function j4e(s){s=s|0,Y4e(s)}function Y4e(s){s=s|0,o[s+8>>0]=1}function W4e(){return 1936}function K4e(){return z4e()|0}function z4e(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0;return l=C,C=C+16|0,d=l+4|0,B=l,c=Ka(8)|0,s=c,m=s+4|0,n[m>>2]=Kt(1)|0,f=Kt(8)|0,m=n[m>>2]|0,n[B>>2]=0,n[d>>2]=n[B>>2],V4e(f,m,d),n[c>>2]=f,C=l,s|0}function V4e(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]=l,c=Kt(16)|0,n[c+4>>2]=0,n[c+8>>2]=0,n[c>>2]=1916,n[c+12>>2]=l,n[s+4>>2]=c}function J4e(s){s=s|0,Jm(s),gt(s)}function X4e(s){s=s|0,s=n[s+12>>2]|0,s|0&>(s)}function Z4e(s){s=s|0,gt(s)}function $4e(){var s=0;return o[8088]|0||(oUe(11076),rr(25,11076,U|0)|0,s=8088,n[s>>2]=1,n[s+4>>2]=0),11076}function eUe(s,l){s=s|0,l=l|0,n[s>>2]=tUe()|0,n[s+4>>2]=rUe()|0,n[s+12>>2]=l,n[s+8>>2]=nUe()|0,n[s+32>>2]=10}function tUe(){return 11745}function rUe(){return 1940}function nUe(){return aD()|0}function iUe(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,(xp(f,896)|0)==512?c|0&&(sUe(c),gt(c)):l|0&>(l)}function sUe(s){s=s|0,s=n[s+4>>2]|0,s|0&&Qp(s)}function oUe(s){s=s|0,Dp(s)}function xc(s,l){s=s|0,l=l|0,n[s>>2]=l}function BR(s){return s=s|0,n[s>>2]|0}function aUe(s){return s=s|0,o[n[s>>2]>>0]|0}function lUe(s,l){s=s|0,l=l|0;var c=0,f=0;c=C,C=C+16|0,f=c,n[f>>2]=n[s>>2],cUe(l,f)|0,C=c}function cUe(s,l){s=s|0,l=l|0;var c=0;return c=uUe(n[s>>2]|0,l)|0,l=s+4|0,n[(n[l>>2]|0)+8>>2]=c,n[(n[l>>2]|0)+8>>2]|0}function uUe(s,l){s=s|0,l=l|0;var c=0,f=0;return c=C,C=C+16|0,f=c,za(f),s=da(s)|0,l=AUe(s,n[l>>2]|0)|0,Va(f),C=c,l|0}function za(s){s=s|0,n[s>>2]=n[2701],n[s+4>>2]=n[2703]}function AUe(s,l){s=s|0,l=l|0;var c=0;return c=Sl(fUe()|0)|0,Qn(0,c|0,s|0,dR(l)|0)|0}function Va(s){s=s|0,q5(n[s>>2]|0,n[s+4>>2]|0)}function fUe(){var s=0;return o[8096]|0||(pUe(11120),s=8096,n[s>>2]=1,n[s+4>>2]=0),11120}function pUe(s){s=s|0,bl(s,hUe()|0,1)}function hUe(){return 1948}function gUe(){dUe()}function dUe(){var s=0,l=0,c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0,Me=0,Qe=0;if(Me=C,C=C+16|0,O=Me+4|0,G=Me,Li(65536,10804,n[2702]|0,10812),c=B5()|0,l=n[c>>2]|0,s=n[l>>2]|0,s|0)for(f=n[c+8>>2]|0,c=n[c+4>>2]|0;Ac(s|0,u[c>>0]|0|0,o[f>>0]|0),l=l+4|0,s=n[l>>2]|0,s;)f=f+1|0,c=c+1|0;if(s=v5()|0,l=n[s>>2]|0,l|0)do Au(l|0,n[s+4>>2]|0),s=s+8|0,l=n[s>>2]|0;while((l|0)!=0);Au(mUe()|0,5167),M=Ym()|0,s=n[M>>2]|0;e:do if(s|0){do yUe(n[s+4>>2]|0),s=n[s>>2]|0;while((s|0)!=0);if(s=n[M>>2]|0,s|0){Q=M;do{for(;d=s,s=n[s>>2]|0,d=n[d+4>>2]|0,!!(EUe(d)|0);)if(n[G>>2]=Q,n[O>>2]=n[G>>2],CUe(M,O)|0,!s)break e;if(wUe(d),Q=n[Q>>2]|0,l=e7(d)|0,m=Hi()|0,B=C,C=C+((1*(l<<2)|0)+15&-16)|0,k=C,C=C+((1*(l<<2)|0)+15&-16)|0,l=n[(N5(d)|0)>>2]|0,l|0)for(c=B,f=k;n[c>>2]=n[(Wm(n[l+4>>2]|0)|0)>>2],n[f>>2]=n[l+8>>2],l=n[l>>2]|0,l;)c=c+4|0,f=f+4|0;Qe=Wm(d)|0,l=IUe(d)|0,c=e7(d)|0,f=BUe(d)|0,fu(Qe|0,l|0,B|0,k|0,c|0,f|0,uR(d)|0),_i(m|0)}while((s|0)!=0)}}while(0);if(s=n[(AR()|0)>>2]|0,s|0)do Qe=s+4|0,M=fR(Qe)|0,d=Ow(M)|0,m=Lw(M)|0,B=(Nw(M)|0)+1|0,k=fD(M)|0,Q=t7(Qe)|0,M=Tr(M)|0,O=cD(Qe)|0,G=vR(Qe)|0,Cl(0,d|0,m|0,B|0,k|0,Q|0,M|0,O|0,G|0,DR(Qe)|0),s=n[s>>2]|0;while((s|0)!=0);s=n[(Ym()|0)>>2]|0;e:do if(s|0){t:for(;;){if(l=n[s+4>>2]|0,l|0&&(se=n[(Wm(l)|0)>>2]|0,je=n[(O5(l)|0)>>2]|0,je|0)){c=je;do{l=c+4|0,f=fR(l)|0;r:do if(f|0)switch(Tr(f)|0){case 0:break t;case 4:case 3:case 2:{k=Ow(f)|0,Q=Lw(f)|0,M=(Nw(f)|0)+1|0,O=fD(f)|0,G=Tr(f)|0,Qe=cD(l)|0,Cl(se|0,k|0,Q|0,M|0,O|0,0,G|0,Qe|0,vR(l)|0,DR(l)|0);break r}case 1:{B=Ow(f)|0,k=Lw(f)|0,Q=(Nw(f)|0)+1|0,M=fD(f)|0,O=t7(l)|0,G=Tr(f)|0,Qe=cD(l)|0,Cl(se|0,B|0,k|0,Q|0,M|0,O|0,G|0,Qe|0,vR(l)|0,DR(l)|0);break r}case 5:{M=Ow(f)|0,O=Lw(f)|0,G=(Nw(f)|0)+1|0,Qe=fD(f)|0,Cl(se|0,M|0,O|0,G|0,Qe|0,vUe(f)|0,Tr(f)|0,0,0,0);break r}default:break r}while(0);c=n[c>>2]|0}while((c|0)!=0)}if(s=n[s>>2]|0,!s)break e}Rt()}while(0);Ce(),C=Me}function mUe(){return 11703}function yUe(s){s=s|0,o[s+40>>0]=0}function EUe(s){return s=s|0,(o[s+40>>0]|0)!=0|0}function CUe(s,l){return s=s|0,l=l|0,l=DUe(l)|0,s=n[l>>2]|0,n[l>>2]=n[s>>2],gt(s),n[l>>2]|0}function wUe(s){s=s|0,o[s+40>>0]=1}function e7(s){return s=s|0,n[s+20>>2]|0}function IUe(s){return s=s|0,n[s+8>>2]|0}function BUe(s){return s=s|0,n[s+32>>2]|0}function fD(s){return s=s|0,n[s+4>>2]|0}function t7(s){return s=s|0,n[s+4>>2]|0}function vR(s){return s=s|0,n[s+8>>2]|0}function DR(s){return s=s|0,n[s+16>>2]|0}function vUe(s){return s=s|0,n[s+20>>2]|0}function DUe(s){return s=s|0,n[s>>2]|0}function pD(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0,Me=0,Qe=0,et=0,Xe=0,lt=0,Ue=0,Ge=0,Nt=0;Nt=C,C=C+16|0,se=Nt;do if(s>>>0<245){if(M=s>>>0<11?16:s+11&-8,s=M>>>3,G=n[2783]|0,c=G>>>s,c&3|0)return l=(c&1^1)+s|0,s=11172+(l<<1<<2)|0,c=s+8|0,f=n[c>>2]|0,d=f+8|0,m=n[d>>2]|0,(s|0)==(m|0)?n[2783]=G&~(1<>2]=s,n[c>>2]=m),Ge=l<<3,n[f+4>>2]=Ge|3,Ge=f+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1,Ge=d,C=Nt,Ge|0;if(O=n[2785]|0,M>>>0>O>>>0){if(c|0)return l=2<>>12&16,l=l>>>B,c=l>>>5&8,l=l>>>c,d=l>>>2&4,l=l>>>d,s=l>>>1&2,l=l>>>s,f=l>>>1&1,f=(c|B|d|s|f)+(l>>>f)|0,l=11172+(f<<1<<2)|0,s=l+8|0,d=n[s>>2]|0,B=d+8|0,c=n[B>>2]|0,(l|0)==(c|0)?(s=G&~(1<>2]=l,n[s>>2]=c,s=G),m=(f<<3)-M|0,n[d+4>>2]=M|3,f=d+M|0,n[f+4>>2]=m|1,n[f+m>>2]=m,O|0&&(d=n[2788]|0,l=O>>>3,c=11172+(l<<1<<2)|0,l=1<>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=d,n[l+12>>2]=d,n[d+8>>2]=l,n[d+12>>2]=c),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(n[2783]=G|l,l=c,s=c+8|0),n[s>>2]=f,n[l+12>>2]=f,n[f+8>>2]=l,n[f+12>>2]=c),n[2785]=m,n[2788]=B),Ge=Q+8|0,C=Nt,Ge|0}else G=M}else G=M}else G=M}else if(s>>>0<=4294967231)if(s=s+11|0,M=s&-8,Q=n[2784]|0,Q){f=0-M|0,s=s>>>8,s?M>>>0>16777215?k=31:(G=(s+1048320|0)>>>16&8,Ue=s<>>16&4,Ue=Ue<>>16&2,k=14-(O|G|k)+(Ue<>>15)|0,k=M>>>(k+7|0)&1|k<<1):k=0,c=n[11436+(k<<2)>>2]|0;e:do if(!c)c=0,s=0,Ue=57;else for(s=0,B=M<<((k|0)==31?0:25-(k>>>1)|0),m=0;;){if(d=(n[c+4>>2]&-8)-M|0,d>>>0>>0)if(d)s=c,f=d;else{s=c,f=0,d=c,Ue=61;break e}if(d=n[c+20>>2]|0,c=n[c+16+(B>>>31<<2)>>2]|0,m=(d|0)==0|(d|0)==(c|0)?m:d,d=(c|0)==0,d){c=m,Ue=57;break}else B=B<<((d^1)&1)}while(0);if((Ue|0)==57){if((c|0)==0&(s|0)==0){if(s=2<>>12&16,G=G>>>B,m=G>>>5&8,G=G>>>m,k=G>>>2&4,G=G>>>k,O=G>>>1&2,G=G>>>O,c=G>>>1&1,s=0,c=n[11436+((m|B|k|O|c)+(G>>>c)<<2)>>2]|0}c?(d=c,Ue=61):(k=s,B=f)}if((Ue|0)==61)for(;;)if(Ue=0,c=(n[d+4>>2]&-8)-M|0,G=c>>>0>>0,c=G?c:f,s=G?d:s,d=n[d+16+(((n[d+16>>2]|0)==0&1)<<2)>>2]|0,d)f=c,Ue=61;else{k=s,B=c;break}if((k|0)!=0&&B>>>0<((n[2785]|0)-M|0)>>>0){if(m=k+M|0,k>>>0>=m>>>0)return Ge=0,C=Nt,Ge|0;d=n[k+24>>2]|0,l=n[k+12>>2]|0;do if((l|0)==(k|0)){if(s=k+20|0,l=n[s>>2]|0,!l&&(s=k+16|0,l=n[s>>2]|0,!l)){l=0;break}for(;;){if(c=l+20|0,f=n[c>>2]|0,f|0){l=f,s=c;continue}if(c=l+16|0,f=n[c>>2]|0,f)l=f,s=c;else break}n[s>>2]=0}else Ge=n[k+8>>2]|0,n[Ge+12>>2]=l,n[l+8>>2]=Ge;while(0);do if(d){if(s=n[k+28>>2]|0,c=11436+(s<<2)|0,(k|0)==(n[c>>2]|0)){if(n[c>>2]=l,!l){f=Q&~(1<>2]|0)!=(k|0)&1)<<2)>>2]=l,!l){f=Q;break}n[l+24>>2]=d,s=n[k+16>>2]|0,s|0&&(n[l+16>>2]=s,n[s+24>>2]=l),s=n[k+20>>2]|0,s&&(n[l+20>>2]=s,n[s+24>>2]=l),f=Q}else f=Q;while(0);do if(B>>>0>=16){if(n[k+4>>2]=M|3,n[m+4>>2]=B|1,n[m+B>>2]=B,l=B>>>3,B>>>0<256){c=11172+(l<<1<<2)|0,s=n[2783]|0,l=1<>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=m,n[l+12>>2]=m,n[m+8>>2]=l,n[m+12>>2]=c;break}if(l=B>>>8,l?B>>>0>16777215?l=31:(Ue=(l+1048320|0)>>>16&8,Ge=l<>>16&4,Ge=Ge<>>16&2,l=14-(lt|Ue|l)+(Ge<>>15)|0,l=B>>>(l+7|0)&1|l<<1):l=0,c=11436+(l<<2)|0,n[m+28>>2]=l,s=m+16|0,n[s+4>>2]=0,n[s>>2]=0,s=1<>2]=m,n[m+24>>2]=c,n[m+12>>2]=m,n[m+8>>2]=m;break}for(s=B<<((l|0)==31?0:25-(l>>>1)|0),c=n[c>>2]|0;;){if((n[c+4>>2]&-8|0)==(B|0)){Ue=97;break}if(f=c+16+(s>>>31<<2)|0,l=n[f>>2]|0,l)s=s<<1,c=l;else{Ue=96;break}}if((Ue|0)==96){n[f>>2]=m,n[m+24>>2]=c,n[m+12>>2]=m,n[m+8>>2]=m;break}else if((Ue|0)==97){Ue=c+8|0,Ge=n[Ue>>2]|0,n[Ge+12>>2]=m,n[Ue>>2]=m,n[m+8>>2]=Ge,n[m+12>>2]=c,n[m+24>>2]=0;break}}else Ge=B+M|0,n[k+4>>2]=Ge|3,Ge=k+Ge+4|0,n[Ge>>2]=n[Ge>>2]|1;while(0);return Ge=k+8|0,C=Nt,Ge|0}else G=M}else G=M;else G=-1;while(0);if(c=n[2785]|0,c>>>0>=G>>>0)return l=c-G|0,s=n[2788]|0,l>>>0>15?(Ge=s+G|0,n[2788]=Ge,n[2785]=l,n[Ge+4>>2]=l|1,n[Ge+l>>2]=l,n[s+4>>2]=G|3):(n[2785]=0,n[2788]=0,n[s+4>>2]=c|3,Ge=s+c+4|0,n[Ge>>2]=n[Ge>>2]|1),Ge=s+8|0,C=Nt,Ge|0;if(B=n[2786]|0,B>>>0>G>>>0)return lt=B-G|0,n[2786]=lt,Ge=n[2789]|0,Ue=Ge+G|0,n[2789]=Ue,n[Ue+4>>2]=lt|1,n[Ge+4>>2]=G|3,Ge=Ge+8|0,C=Nt,Ge|0;if(n[2901]|0?s=n[2903]|0:(n[2903]=4096,n[2902]=4096,n[2904]=-1,n[2905]=-1,n[2906]=0,n[2894]=0,s=se&-16^1431655768,n[se>>2]=s,n[2901]=s,s=4096),k=G+48|0,Q=G+47|0,m=s+Q|0,d=0-s|0,M=m&d,M>>>0<=G>>>0||(s=n[2893]|0,s|0&&(O=n[2891]|0,se=O+M|0,se>>>0<=O>>>0|se>>>0>s>>>0)))return Ge=0,C=Nt,Ge|0;e:do if(n[2894]&4)l=0,Ue=133;else{c=n[2789]|0;t:do if(c){for(f=11580;s=n[f>>2]|0,!(s>>>0<=c>>>0&&(Qe=f+4|0,(s+(n[Qe>>2]|0)|0)>>>0>c>>>0));)if(s=n[f+8>>2]|0,s)f=s;else{Ue=118;break t}if(l=m-B&d,l>>>0<2147483647)if(s=Fp(l|0)|0,(s|0)==((n[f>>2]|0)+(n[Qe>>2]|0)|0)){if((s|0)!=-1){B=l,m=s,Ue=135;break e}}else f=s,Ue=126;else l=0}else Ue=118;while(0);do if((Ue|0)==118)if(c=Fp(0)|0,(c|0)!=-1&&(l=c,je=n[2902]|0,Me=je+-1|0,l=((Me&l|0)==0?0:(Me+l&0-je)-l|0)+M|0,je=n[2891]|0,Me=l+je|0,l>>>0>G>>>0&l>>>0<2147483647)){if(Qe=n[2893]|0,Qe|0&&Me>>>0<=je>>>0|Me>>>0>Qe>>>0){l=0;break}if(s=Fp(l|0)|0,(s|0)==(c|0)){B=l,m=c,Ue=135;break e}else f=s,Ue=126}else l=0;while(0);do if((Ue|0)==126){if(c=0-l|0,!(k>>>0>l>>>0&(l>>>0<2147483647&(f|0)!=-1)))if((f|0)==-1){l=0;break}else{B=l,m=f,Ue=135;break e}if(s=n[2903]|0,s=Q-l+s&0-s,s>>>0>=2147483647){B=l,m=f,Ue=135;break e}if((Fp(s|0)|0)==-1){Fp(c|0)|0,l=0;break}else{B=s+l|0,m=f,Ue=135;break e}}while(0);n[2894]=n[2894]|4,Ue=133}while(0);if((Ue|0)==133&&M>>>0<2147483647&&(lt=Fp(M|0)|0,Qe=Fp(0)|0,et=Qe-lt|0,Xe=et>>>0>(G+40|0)>>>0,!((lt|0)==-1|Xe^1|lt>>>0>>0&((lt|0)!=-1&(Qe|0)!=-1)^1))&&(B=Xe?et:l,m=lt,Ue=135),(Ue|0)==135){l=(n[2891]|0)+B|0,n[2891]=l,l>>>0>(n[2892]|0)>>>0&&(n[2892]=l),Q=n[2789]|0;do if(Q){for(l=11580;;){if(s=n[l>>2]|0,c=l+4|0,f=n[c>>2]|0,(m|0)==(s+f|0)){Ue=145;break}if(d=n[l+8>>2]|0,d)l=d;else break}if((Ue|0)==145&&(n[l+12>>2]&8|0)==0&&Q>>>0>>0&Q>>>0>=s>>>0){n[c>>2]=f+B,Ge=Q+8|0,Ge=(Ge&7|0)==0?0:0-Ge&7,Ue=Q+Ge|0,Ge=(n[2786]|0)+(B-Ge)|0,n[2789]=Ue,n[2786]=Ge,n[Ue+4>>2]=Ge|1,n[Ue+Ge+4>>2]=40,n[2790]=n[2905];break}for(m>>>0<(n[2787]|0)>>>0&&(n[2787]=m),c=m+B|0,l=11580;;){if((n[l>>2]|0)==(c|0)){Ue=153;break}if(s=n[l+8>>2]|0,s)l=s;else break}if((Ue|0)==153&&(n[l+12>>2]&8|0)==0){n[l>>2]=m,O=l+4|0,n[O>>2]=(n[O>>2]|0)+B,O=m+8|0,O=m+((O&7|0)==0?0:0-O&7)|0,l=c+8|0,l=c+((l&7|0)==0?0:0-l&7)|0,M=O+G|0,k=l-O-G|0,n[O+4>>2]=G|3;do if((l|0)!=(Q|0)){if((l|0)==(n[2788]|0)){Ge=(n[2785]|0)+k|0,n[2785]=Ge,n[2788]=M,n[M+4>>2]=Ge|1,n[M+Ge>>2]=Ge;break}if(s=n[l+4>>2]|0,(s&3|0)==1){B=s&-8,f=s>>>3;e:do if(s>>>0<256)if(s=n[l+8>>2]|0,c=n[l+12>>2]|0,(c|0)==(s|0)){n[2783]=n[2783]&~(1<>2]=c,n[c+8>>2]=s;break}else{m=n[l+24>>2]|0,s=n[l+12>>2]|0;do if((s|0)==(l|0)){if(f=l+16|0,c=f+4|0,s=n[c>>2]|0,!s)if(s=n[f>>2]|0,s)c=f;else{s=0;break}for(;;){if(f=s+20|0,d=n[f>>2]|0,d|0){s=d,c=f;continue}if(f=s+16|0,d=n[f>>2]|0,d)s=d,c=f;else break}n[c>>2]=0}else Ge=n[l+8>>2]|0,n[Ge+12>>2]=s,n[s+8>>2]=Ge;while(0);if(!m)break;c=n[l+28>>2]|0,f=11436+(c<<2)|0;do if((l|0)!=(n[f>>2]|0)){if(n[m+16+(((n[m+16>>2]|0)!=(l|0)&1)<<2)>>2]=s,!s)break e}else{if(n[f>>2]=s,s|0)break;n[2784]=n[2784]&~(1<>2]=m,c=l+16|0,f=n[c>>2]|0,f|0&&(n[s+16>>2]=f,n[f+24>>2]=s),c=n[c+4>>2]|0,!c)break;n[s+20>>2]=c,n[c+24>>2]=s}while(0);l=l+B|0,d=B+k|0}else d=k;if(l=l+4|0,n[l>>2]=n[l>>2]&-2,n[M+4>>2]=d|1,n[M+d>>2]=d,l=d>>>3,d>>>0<256){c=11172+(l<<1<<2)|0,s=n[2783]|0,l=1<>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=M,n[l+12>>2]=M,n[M+8>>2]=l,n[M+12>>2]=c;break}l=d>>>8;do if(!l)l=0;else{if(d>>>0>16777215){l=31;break}Ue=(l+1048320|0)>>>16&8,Ge=l<>>16&4,Ge=Ge<>>16&2,l=14-(lt|Ue|l)+(Ge<>>15)|0,l=d>>>(l+7|0)&1|l<<1}while(0);if(f=11436+(l<<2)|0,n[M+28>>2]=l,s=M+16|0,n[s+4>>2]=0,n[s>>2]=0,s=n[2784]|0,c=1<>2]=M,n[M+24>>2]=f,n[M+12>>2]=M,n[M+8>>2]=M;break}for(s=d<<((l|0)==31?0:25-(l>>>1)|0),c=n[f>>2]|0;;){if((n[c+4>>2]&-8|0)==(d|0)){Ue=194;break}if(f=c+16+(s>>>31<<2)|0,l=n[f>>2]|0,l)s=s<<1,c=l;else{Ue=193;break}}if((Ue|0)==193){n[f>>2]=M,n[M+24>>2]=c,n[M+12>>2]=M,n[M+8>>2]=M;break}else if((Ue|0)==194){Ue=c+8|0,Ge=n[Ue>>2]|0,n[Ge+12>>2]=M,n[Ue>>2]=M,n[M+8>>2]=Ge,n[M+12>>2]=c,n[M+24>>2]=0;break}}else Ge=(n[2786]|0)+k|0,n[2786]=Ge,n[2789]=M,n[M+4>>2]=Ge|1;while(0);return Ge=O+8|0,C=Nt,Ge|0}for(l=11580;s=n[l>>2]|0,!(s>>>0<=Q>>>0&&(Ge=s+(n[l+4>>2]|0)|0,Ge>>>0>Q>>>0));)l=n[l+8>>2]|0;d=Ge+-47|0,s=d+8|0,s=d+((s&7|0)==0?0:0-s&7)|0,d=Q+16|0,s=s>>>0>>0?Q:s,l=s+8|0,c=m+8|0,c=(c&7|0)==0?0:0-c&7,Ue=m+c|0,c=B+-40-c|0,n[2789]=Ue,n[2786]=c,n[Ue+4>>2]=c|1,n[Ue+c+4>>2]=40,n[2790]=n[2905],c=s+4|0,n[c>>2]=27,n[l>>2]=n[2895],n[l+4>>2]=n[2896],n[l+8>>2]=n[2897],n[l+12>>2]=n[2898],n[2895]=m,n[2896]=B,n[2898]=0,n[2897]=l,l=s+24|0;do Ue=l,l=l+4|0,n[l>>2]=7;while((Ue+8|0)>>>0>>0);if((s|0)!=(Q|0)){if(m=s-Q|0,n[c>>2]=n[c>>2]&-2,n[Q+4>>2]=m|1,n[s>>2]=m,l=m>>>3,m>>>0<256){c=11172+(l<<1<<2)|0,s=n[2783]|0,l=1<>2]|0):(n[2783]=s|l,l=c,s=c+8|0),n[s>>2]=Q,n[l+12>>2]=Q,n[Q+8>>2]=l,n[Q+12>>2]=c;break}if(l=m>>>8,l?m>>>0>16777215?c=31:(Ue=(l+1048320|0)>>>16&8,Ge=l<>>16&4,Ge=Ge<>>16&2,c=14-(lt|Ue|c)+(Ge<>>15)|0,c=m>>>(c+7|0)&1|c<<1):c=0,f=11436+(c<<2)|0,n[Q+28>>2]=c,n[Q+20>>2]=0,n[d>>2]=0,l=n[2784]|0,s=1<>2]=Q,n[Q+24>>2]=f,n[Q+12>>2]=Q,n[Q+8>>2]=Q;break}for(s=m<<((c|0)==31?0:25-(c>>>1)|0),c=n[f>>2]|0;;){if((n[c+4>>2]&-8|0)==(m|0)){Ue=216;break}if(f=c+16+(s>>>31<<2)|0,l=n[f>>2]|0,l)s=s<<1,c=l;else{Ue=215;break}}if((Ue|0)==215){n[f>>2]=Q,n[Q+24>>2]=c,n[Q+12>>2]=Q,n[Q+8>>2]=Q;break}else if((Ue|0)==216){Ue=c+8|0,Ge=n[Ue>>2]|0,n[Ge+12>>2]=Q,n[Ue>>2]=Q,n[Q+8>>2]=Ge,n[Q+12>>2]=c,n[Q+24>>2]=0;break}}}else{Ge=n[2787]|0,(Ge|0)==0|m>>>0>>0&&(n[2787]=m),n[2895]=m,n[2896]=B,n[2898]=0,n[2792]=n[2901],n[2791]=-1,l=0;do Ge=11172+(l<<1<<2)|0,n[Ge+12>>2]=Ge,n[Ge+8>>2]=Ge,l=l+1|0;while((l|0)!=32);Ge=m+8|0,Ge=(Ge&7|0)==0?0:0-Ge&7,Ue=m+Ge|0,Ge=B+-40-Ge|0,n[2789]=Ue,n[2786]=Ge,n[Ue+4>>2]=Ge|1,n[Ue+Ge+4>>2]=40,n[2790]=n[2905]}while(0);if(l=n[2786]|0,l>>>0>G>>>0)return lt=l-G|0,n[2786]=lt,Ge=n[2789]|0,Ue=Ge+G|0,n[2789]=Ue,n[Ue+4>>2]=lt|1,n[Ge+4>>2]=G|3,Ge=Ge+8|0,C=Nt,Ge|0}return n[(zm()|0)>>2]=12,Ge=0,C=Nt,Ge|0}function hD(s){s=s|0;var l=0,c=0,f=0,d=0,m=0,B=0,k=0,Q=0;if(!!s){c=s+-8|0,d=n[2787]|0,s=n[s+-4>>2]|0,l=s&-8,Q=c+l|0;do if(s&1)k=c,B=c;else{if(f=n[c>>2]|0,!(s&3)||(B=c+(0-f)|0,m=f+l|0,B>>>0>>0))return;if((B|0)==(n[2788]|0)){if(s=Q+4|0,l=n[s>>2]|0,(l&3|0)!=3){k=B,l=m;break}n[2785]=m,n[s>>2]=l&-2,n[B+4>>2]=m|1,n[B+m>>2]=m;return}if(c=f>>>3,f>>>0<256)if(s=n[B+8>>2]|0,l=n[B+12>>2]|0,(l|0)==(s|0)){n[2783]=n[2783]&~(1<>2]=l,n[l+8>>2]=s,k=B,l=m;break}d=n[B+24>>2]|0,s=n[B+12>>2]|0;do if((s|0)==(B|0)){if(c=B+16|0,l=c+4|0,s=n[l>>2]|0,!s)if(s=n[c>>2]|0,s)l=c;else{s=0;break}for(;;){if(c=s+20|0,f=n[c>>2]|0,f|0){s=f,l=c;continue}if(c=s+16|0,f=n[c>>2]|0,f)s=f,l=c;else break}n[l>>2]=0}else k=n[B+8>>2]|0,n[k+12>>2]=s,n[s+8>>2]=k;while(0);if(d){if(l=n[B+28>>2]|0,c=11436+(l<<2)|0,(B|0)==(n[c>>2]|0)){if(n[c>>2]=s,!s){n[2784]=n[2784]&~(1<>2]|0)!=(B|0)&1)<<2)>>2]=s,!s){k=B,l=m;break}n[s+24>>2]=d,l=B+16|0,c=n[l>>2]|0,c|0&&(n[s+16>>2]=c,n[c+24>>2]=s),l=n[l+4>>2]|0,l?(n[s+20>>2]=l,n[l+24>>2]=s,k=B,l=m):(k=B,l=m)}else k=B,l=m}while(0);if(!(B>>>0>=Q>>>0)&&(s=Q+4|0,f=n[s>>2]|0,!!(f&1))){if(f&2)n[s>>2]=f&-2,n[k+4>>2]=l|1,n[B+l>>2]=l,d=l;else{if(s=n[2788]|0,(Q|0)==(n[2789]|0)){if(Q=(n[2786]|0)+l|0,n[2786]=Q,n[2789]=k,n[k+4>>2]=Q|1,(k|0)!=(s|0))return;n[2788]=0,n[2785]=0;return}if((Q|0)==(s|0)){Q=(n[2785]|0)+l|0,n[2785]=Q,n[2788]=B,n[k+4>>2]=Q|1,n[B+Q>>2]=Q;return}d=(f&-8)+l|0,c=f>>>3;do if(f>>>0<256)if(l=n[Q+8>>2]|0,s=n[Q+12>>2]|0,(s|0)==(l|0)){n[2783]=n[2783]&~(1<>2]=s,n[s+8>>2]=l;break}else{m=n[Q+24>>2]|0,s=n[Q+12>>2]|0;do if((s|0)==(Q|0)){if(c=Q+16|0,l=c+4|0,s=n[l>>2]|0,!s)if(s=n[c>>2]|0,s)l=c;else{c=0;break}for(;;){if(c=s+20|0,f=n[c>>2]|0,f|0){s=f,l=c;continue}if(c=s+16|0,f=n[c>>2]|0,f)s=f,l=c;else break}n[l>>2]=0,c=s}else c=n[Q+8>>2]|0,n[c+12>>2]=s,n[s+8>>2]=c,c=s;while(0);if(m|0){if(s=n[Q+28>>2]|0,l=11436+(s<<2)|0,(Q|0)==(n[l>>2]|0)){if(n[l>>2]=c,!c){n[2784]=n[2784]&~(1<>2]|0)!=(Q|0)&1)<<2)>>2]=c,!c)break;n[c+24>>2]=m,s=Q+16|0,l=n[s>>2]|0,l|0&&(n[c+16>>2]=l,n[l+24>>2]=c),s=n[s+4>>2]|0,s|0&&(n[c+20>>2]=s,n[s+24>>2]=c)}}while(0);if(n[k+4>>2]=d|1,n[B+d>>2]=d,(k|0)==(n[2788]|0)){n[2785]=d;return}}if(s=d>>>3,d>>>0<256){c=11172+(s<<1<<2)|0,l=n[2783]|0,s=1<>2]|0):(n[2783]=l|s,s=c,l=c+8|0),n[l>>2]=k,n[s+12>>2]=k,n[k+8>>2]=s,n[k+12>>2]=c;return}s=d>>>8,s?d>>>0>16777215?s=31:(B=(s+1048320|0)>>>16&8,Q=s<>>16&4,Q=Q<>>16&2,s=14-(m|B|s)+(Q<>>15)|0,s=d>>>(s+7|0)&1|s<<1):s=0,f=11436+(s<<2)|0,n[k+28>>2]=s,n[k+20>>2]=0,n[k+16>>2]=0,l=n[2784]|0,c=1<>>1)|0),c=n[f>>2]|0;;){if((n[c+4>>2]&-8|0)==(d|0)){s=73;break}if(f=c+16+(l>>>31<<2)|0,s=n[f>>2]|0,s)l=l<<1,c=s;else{s=72;break}}if((s|0)==72){n[f>>2]=k,n[k+24>>2]=c,n[k+12>>2]=k,n[k+8>>2]=k;break}else if((s|0)==73){B=c+8|0,Q=n[B>>2]|0,n[Q+12>>2]=k,n[B>>2]=k,n[k+8>>2]=Q,n[k+12>>2]=c,n[k+24>>2]=0;break}}else n[2784]=l|c,n[f>>2]=k,n[k+24>>2]=f,n[k+12>>2]=k,n[k+8>>2]=k;while(0);if(Q=(n[2791]|0)+-1|0,n[2791]=Q,!Q)s=11588;else return;for(;s=n[s>>2]|0,s;)s=s+8|0;n[2791]=-1}}}function PUe(){return 11628}function SUe(s){s=s|0;var l=0,c=0;return l=C,C=C+16|0,c=l,n[c>>2]=kUe(n[s+60>>2]|0)|0,s=gD(gc(6,c|0)|0)|0,C=l,s|0}function r7(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0;G=C,C=C+48|0,M=G+16|0,m=G,d=G+32|0,k=s+28|0,f=n[k>>2]|0,n[d>>2]=f,Q=s+20|0,f=(n[Q>>2]|0)-f|0,n[d+4>>2]=f,n[d+8>>2]=l,n[d+12>>2]=c,f=f+c|0,B=s+60|0,n[m>>2]=n[B>>2],n[m+4>>2]=d,n[m+8>>2]=2,m=gD(Ni(146,m|0)|0)|0;e:do if((f|0)!=(m|0)){for(l=2;!((m|0)<0);)if(f=f-m|0,je=n[d+4>>2]|0,se=m>>>0>je>>>0,d=se?d+8|0:d,l=(se<<31>>31)+l|0,je=m-(se?je:0)|0,n[d>>2]=(n[d>>2]|0)+je,se=d+4|0,n[se>>2]=(n[se>>2]|0)-je,n[M>>2]=n[B>>2],n[M+4>>2]=d,n[M+8>>2]=l,m=gD(Ni(146,M|0)|0)|0,(f|0)==(m|0)){O=3;break e}n[s+16>>2]=0,n[k>>2]=0,n[Q>>2]=0,n[s>>2]=n[s>>2]|32,(l|0)==2?c=0:c=c-(n[d+4>>2]|0)|0}else O=3;while(0);return(O|0)==3&&(je=n[s+44>>2]|0,n[s+16>>2]=je+(n[s+48>>2]|0),n[k>>2]=je,n[Q>>2]=je),C=G,c|0}function bUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;return d=C,C=C+32|0,m=d,f=d+20|0,n[m>>2]=n[s+60>>2],n[m+4>>2]=0,n[m+8>>2]=l,n[m+12>>2]=f,n[m+16>>2]=c,(gD(sa(140,m|0)|0)|0)<0?(n[f>>2]=-1,s=-1):s=n[f>>2]|0,C=d,s|0}function gD(s){return s=s|0,s>>>0>4294963200&&(n[(zm()|0)>>2]=0-s,s=-1),s|0}function zm(){return(xUe()|0)+64|0}function xUe(){return PR()|0}function PR(){return 2084}function kUe(s){return s=s|0,s|0}function QUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;return d=C,C=C+32|0,f=d,n[s+36>>2]=1,(n[s>>2]&64|0)==0&&(n[f>>2]=n[s+60>>2],n[f+4>>2]=21523,n[f+8>>2]=d+16,pu(54,f|0)|0)&&(o[s+75>>0]=-1),f=r7(s,l,c)|0,C=d,f|0}function n7(s,l){s=s|0,l=l|0;var c=0,f=0;if(c=o[s>>0]|0,f=o[l>>0]|0,c<<24>>24==0||c<<24>>24!=f<<24>>24)s=f;else{do s=s+1|0,l=l+1|0,c=o[s>>0]|0,f=o[l>>0]|0;while(!(c<<24>>24==0||c<<24>>24!=f<<24>>24));s=f}return(c&255)-(s&255)|0}function FUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0;e:do if(!c)s=0;else{for(;f=o[s>>0]|0,d=o[l>>0]|0,f<<24>>24==d<<24>>24;)if(c=c+-1|0,c)s=s+1|0,l=l+1|0;else{s=0;break e}s=(f&255)-(d&255)|0}while(0);return s|0}function i7(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0,Me=0,Qe=0;Qe=C,C=C+224|0,O=Qe+120|0,G=Qe+80|0,je=Qe,Me=Qe+136|0,f=G,d=f+40|0;do n[f>>2]=0,f=f+4|0;while((f|0)<(d|0));return n[O>>2]=n[c>>2],(SR(0,l,O,je,G)|0)<0?c=-1:((n[s+76>>2]|0)>-1?se=RUe(s)|0:se=0,c=n[s>>2]|0,M=c&32,(o[s+74>>0]|0)<1&&(n[s>>2]=c&-33),f=s+48|0,n[f>>2]|0?c=SR(s,l,O,je,G)|0:(d=s+44|0,m=n[d>>2]|0,n[d>>2]=Me,B=s+28|0,n[B>>2]=Me,k=s+20|0,n[k>>2]=Me,n[f>>2]=80,Q=s+16|0,n[Q>>2]=Me+80,c=SR(s,l,O,je,G)|0,m&&(ED[n[s+36>>2]&7](s,0,0)|0,c=(n[k>>2]|0)==0?-1:c,n[d>>2]=m,n[f>>2]=0,n[Q>>2]=0,n[B>>2]=0,n[k>>2]=0)),f=n[s>>2]|0,n[s>>2]=f|M,se|0&&TUe(s),c=(f&32|0)==0?c:-1),C=Qe,c|0}function SR(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0,Me=0,Qe=0,et=0,Xe=0,lt=0,Ue=0,Ge=0,Nt=0,Mr=0,ar=0,Xt=0,Pr=0,Lr=0,sr=0;sr=C,C=C+64|0,ar=sr+16|0,Xt=sr,Nt=sr+24|0,Pr=sr+8|0,Lr=sr+20|0,n[ar>>2]=l,lt=(s|0)!=0,Ue=Nt+40|0,Ge=Ue,Nt=Nt+39|0,Mr=Pr+4|0,B=0,m=0,O=0;e:for(;;){do if((m|0)>-1)if((B|0)>(2147483647-m|0)){n[(zm()|0)>>2]=75,m=-1;break}else{m=B+m|0;break}while(0);if(B=o[l>>0]|0,B<<24>>24)k=l;else{Xe=87;break}t:for(;;){switch(B<<24>>24){case 37:{B=k,Xe=9;break t}case 0:{B=k;break t}default:}et=k+1|0,n[ar>>2]=et,B=o[et>>0]|0,k=et}t:do if((Xe|0)==9)for(;;){if(Xe=0,(o[k+1>>0]|0)!=37)break t;if(B=B+1|0,k=k+2|0,n[ar>>2]=k,(o[k>>0]|0)==37)Xe=9;else break}while(0);if(B=B-l|0,lt&&ss(s,l,B),B|0){l=k;continue}Q=k+1|0,B=(o[Q>>0]|0)+-48|0,B>>>0<10?(et=(o[k+2>>0]|0)==36,Qe=et?B:-1,O=et?1:O,Q=et?k+3|0:Q):Qe=-1,n[ar>>2]=Q,B=o[Q>>0]|0,k=(B<<24>>24)+-32|0;t:do if(k>>>0<32)for(M=0,G=B;;){if(B=1<>2]=Q,B=o[Q>>0]|0,k=(B<<24>>24)+-32|0,k>>>0>=32)break;G=B}else M=0;while(0);if(B<<24>>24==42){if(k=Q+1|0,B=(o[k>>0]|0)+-48|0,B>>>0<10&&(o[Q+2>>0]|0)==36)n[d+(B<<2)>>2]=10,B=n[f+((o[k>>0]|0)+-48<<3)>>2]|0,O=1,Q=Q+3|0;else{if(O|0){m=-1;break}lt?(O=(n[c>>2]|0)+(4-1)&~(4-1),B=n[O>>2]|0,n[c>>2]=O+4,O=0,Q=k):(B=0,O=0,Q=k)}n[ar>>2]=Q,et=(B|0)<0,B=et?0-B|0:B,M=et?M|8192:M}else{if(B=s7(ar)|0,(B|0)<0){m=-1;break}Q=n[ar>>2]|0}do if((o[Q>>0]|0)==46){if((o[Q+1>>0]|0)!=42){n[ar>>2]=Q+1,k=s7(ar)|0,Q=n[ar>>2]|0;break}if(G=Q+2|0,k=(o[G>>0]|0)+-48|0,k>>>0<10&&(o[Q+3>>0]|0)==36){n[d+(k<<2)>>2]=10,k=n[f+((o[G>>0]|0)+-48<<3)>>2]|0,Q=Q+4|0,n[ar>>2]=Q;break}if(O|0){m=-1;break e}lt?(et=(n[c>>2]|0)+(4-1)&~(4-1),k=n[et>>2]|0,n[c>>2]=et+4):k=0,n[ar>>2]=G,Q=G}else k=-1;while(0);for(Me=0;;){if(((o[Q>>0]|0)+-65|0)>>>0>57){m=-1;break e}if(et=Q+1|0,n[ar>>2]=et,G=o[(o[Q>>0]|0)+-65+(5178+(Me*58|0))>>0]|0,se=G&255,(se+-1|0)>>>0<8)Me=se,Q=et;else break}if(!(G<<24>>24)){m=-1;break}je=(Qe|0)>-1;do if(G<<24>>24==19)if(je){m=-1;break e}else Xe=49;else{if(je){n[d+(Qe<<2)>>2]=se,je=f+(Qe<<3)|0,Qe=n[je+4>>2]|0,Xe=Xt,n[Xe>>2]=n[je>>2],n[Xe+4>>2]=Qe,Xe=49;break}if(!lt){m=0;break e}o7(Xt,se,c)}while(0);if((Xe|0)==49&&(Xe=0,!lt)){B=0,l=et;continue}Q=o[Q>>0]|0,Q=(Me|0)!=0&(Q&15|0)==3?Q&-33:Q,je=M&-65537,Qe=(M&8192|0)==0?M:je;t:do switch(Q|0){case 110:switch((Me&255)<<24>>24){case 0:{n[n[Xt>>2]>>2]=m,B=0,l=et;continue e}case 1:{n[n[Xt>>2]>>2]=m,B=0,l=et;continue e}case 2:{B=n[Xt>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=et;continue e}case 3:{a[n[Xt>>2]>>1]=m,B=0,l=et;continue e}case 4:{o[n[Xt>>2]>>0]=m,B=0,l=et;continue e}case 6:{n[n[Xt>>2]>>2]=m,B=0,l=et;continue e}case 7:{B=n[Xt>>2]|0,n[B>>2]=m,n[B+4>>2]=((m|0)<0)<<31>>31,B=0,l=et;continue e}default:{B=0,l=et;continue e}}case 112:{Q=120,k=k>>>0>8?k:8,l=Qe|8,Xe=61;break}case 88:case 120:{l=Qe,Xe=61;break}case 111:{Q=Xt,l=n[Q>>2]|0,Q=n[Q+4>>2]|0,se=NUe(l,Q,Ue)|0,je=Ge-se|0,M=0,G=5642,k=(Qe&8|0)==0|(k|0)>(je|0)?k:je+1|0,je=Qe,Xe=67;break}case 105:case 100:if(Q=Xt,l=n[Q>>2]|0,Q=n[Q+4>>2]|0,(Q|0)<0){l=dD(0,0,l|0,Q|0)|0,Q=Pe,M=Xt,n[M>>2]=l,n[M+4>>2]=Q,M=1,G=5642,Xe=66;break t}else{M=(Qe&2049|0)!=0&1,G=(Qe&2048|0)==0?(Qe&1|0)==0?5642:5644:5643,Xe=66;break t}case 117:{Q=Xt,M=0,G=5642,l=n[Q>>2]|0,Q=n[Q+4>>2]|0,Xe=66;break}case 99:{o[Nt>>0]=n[Xt>>2],l=Nt,M=0,G=5642,se=Ue,Q=1,k=je;break}case 109:{Q=OUe(n[(zm()|0)>>2]|0)|0,Xe=71;break}case 115:{Q=n[Xt>>2]|0,Q=Q|0?Q:5652,Xe=71;break}case 67:{n[Pr>>2]=n[Xt>>2],n[Mr>>2]=0,n[Xt>>2]=Pr,se=-1,Q=Pr,Xe=75;break}case 83:{l=n[Xt>>2]|0,k?(se=k,Q=l,Xe=75):(Bs(s,32,B,0,Qe),l=0,Xe=84);break}case 65:case 71:case 70:case 69:case 97:case 103:case 102:case 101:{B=UUe(s,+E[Xt>>3],B,k,Qe,Q)|0,l=et;continue e}default:M=0,G=5642,se=Ue,Q=k,k=Qe}while(0);t:do if((Xe|0)==61)Qe=Xt,Me=n[Qe>>2]|0,Qe=n[Qe+4>>2]|0,se=LUe(Me,Qe,Ue,Q&32)|0,G=(l&8|0)==0|(Me|0)==0&(Qe|0)==0,M=G?0:2,G=G?5642:5642+(Q>>4)|0,je=l,l=Me,Q=Qe,Xe=67;else if((Xe|0)==66)se=Vm(l,Q,Ue)|0,je=Qe,Xe=67;else if((Xe|0)==71)Xe=0,Qe=MUe(Q,0,k)|0,Me=(Qe|0)==0,l=Q,M=0,G=5642,se=Me?Q+k|0:Qe,Q=Me?k:Qe-Q|0,k=je;else if((Xe|0)==75){for(Xe=0,G=Q,l=0,k=0;M=n[G>>2]|0,!(!M||(k=a7(Lr,M)|0,(k|0)<0|k>>>0>(se-l|0)>>>0));)if(l=k+l|0,se>>>0>l>>>0)G=G+4|0;else break;if((k|0)<0){m=-1;break e}if(Bs(s,32,B,l,Qe),!l)l=0,Xe=84;else for(M=0;;){if(k=n[Q>>2]|0,!k){Xe=84;break t}if(k=a7(Lr,k)|0,M=k+M|0,(M|0)>(l|0)){Xe=84;break t}if(ss(s,Lr,k),M>>>0>=l>>>0){Xe=84;break}else Q=Q+4|0}}while(0);if((Xe|0)==67)Xe=0,Q=(l|0)!=0|(Q|0)!=0,Qe=(k|0)!=0|Q,Q=((Q^1)&1)+(Ge-se)|0,l=Qe?se:Ue,se=Ue,Q=Qe?(k|0)>(Q|0)?k:Q:k,k=(k|0)>-1?je&-65537:je;else if((Xe|0)==84){Xe=0,Bs(s,32,B,l,Qe^8192),B=(B|0)>(l|0)?B:l,l=et;continue}Me=se-l|0,je=(Q|0)<(Me|0)?Me:Q,Qe=je+M|0,B=(B|0)<(Qe|0)?Qe:B,Bs(s,32,B,Qe,k),ss(s,G,M),Bs(s,48,B,Qe,k^65536),Bs(s,48,je,Me,0),ss(s,l,Me),Bs(s,32,B,Qe,k^8192),l=et}e:do if((Xe|0)==87&&!s)if(!O)m=0;else{for(m=1;l=n[d+(m<<2)>>2]|0,!!l;)if(o7(f+(m<<3)|0,l,c),m=m+1|0,(m|0)>=10){m=1;break e}for(;;){if(n[d+(m<<2)>>2]|0){m=-1;break e}if(m=m+1|0,(m|0)>=10){m=1;break}}}while(0);return C=sr,m|0}function RUe(s){return s=s|0,0}function TUe(s){s=s|0}function ss(s,l,c){s=s|0,l=l|0,c=c|0,n[s>>2]&32||zUe(l,c,s)|0}function s7(s){s=s|0;var l=0,c=0,f=0;if(c=n[s>>2]|0,f=(o[c>>0]|0)+-48|0,f>>>0<10){l=0;do l=f+(l*10|0)|0,c=c+1|0,n[s>>2]=c,f=(o[c>>0]|0)+-48|0;while(f>>>0<10)}else l=0;return l|0}function o7(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;e:do if(l>>>0<=20)do switch(l|0){case 9:{f=(n[c>>2]|0)+(4-1)&~(4-1),l=n[f>>2]|0,n[c>>2]=f+4,n[s>>2]=l;break e}case 10:{f=(n[c>>2]|0)+(4-1)&~(4-1),l=n[f>>2]|0,n[c>>2]=f+4,f=s,n[f>>2]=l,n[f+4>>2]=((l|0)<0)<<31>>31;break e}case 11:{f=(n[c>>2]|0)+(4-1)&~(4-1),l=n[f>>2]|0,n[c>>2]=f+4,f=s,n[f>>2]=l,n[f+4>>2]=0;break e}case 12:{f=(n[c>>2]|0)+(8-1)&~(8-1),l=f,d=n[l>>2]|0,l=n[l+4>>2]|0,n[c>>2]=f+8,f=s,n[f>>2]=d,n[f+4>>2]=l;break e}case 13:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,f=(f&65535)<<16>>16,d=s,n[d>>2]=f,n[d+4>>2]=((f|0)<0)<<31>>31;break e}case 14:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,d=s,n[d>>2]=f&65535,n[d+4>>2]=0;break e}case 15:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,f=(f&255)<<24>>24,d=s,n[d>>2]=f,n[d+4>>2]=((f|0)<0)<<31>>31;break e}case 16:{d=(n[c>>2]|0)+(4-1)&~(4-1),f=n[d>>2]|0,n[c>>2]=d+4,d=s,n[d>>2]=f&255,n[d+4>>2]=0;break e}case 17:{d=(n[c>>2]|0)+(8-1)&~(8-1),m=+E[d>>3],n[c>>2]=d+8,E[s>>3]=m;break e}case 18:{d=(n[c>>2]|0)+(8-1)&~(8-1),m=+E[d>>3],n[c>>2]=d+8,E[s>>3]=m;break e}default:break e}while(0);while(0)}function LUe(s,l,c,f){if(s=s|0,l=l|0,c=c|0,f=f|0,!((s|0)==0&(l|0)==0))do c=c+-1|0,o[c>>0]=u[5694+(s&15)>>0]|0|f,s=mD(s|0,l|0,4)|0,l=Pe;while(!((s|0)==0&(l|0)==0));return c|0}function NUe(s,l,c){if(s=s|0,l=l|0,c=c|0,!((s|0)==0&(l|0)==0))do c=c+-1|0,o[c>>0]=s&7|48,s=mD(s|0,l|0,3)|0,l=Pe;while(!((s|0)==0&(l|0)==0));return c|0}function Vm(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;if(l>>>0>0|(l|0)==0&s>>>0>4294967295){for(;f=QR(s|0,l|0,10,0)|0,c=c+-1|0,o[c>>0]=f&255|48,f=s,s=kR(s|0,l|0,10,0)|0,l>>>0>9|(l|0)==9&f>>>0>4294967295;)l=Pe;l=s}else l=s;if(l)for(;c=c+-1|0,o[c>>0]=(l>>>0)%10|0|48,!(l>>>0<10);)l=(l>>>0)/10|0;return c|0}function OUe(s){return s=s|0,jUe(s,n[(GUe()|0)+188>>2]|0)|0}function MUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;m=l&255,f=(c|0)!=0;e:do if(f&(s&3|0)!=0)for(d=l&255;;){if((o[s>>0]|0)==d<<24>>24){B=6;break e}if(s=s+1|0,c=c+-1|0,f=(c|0)!=0,!(f&(s&3|0)!=0)){B=5;break}}else B=5;while(0);(B|0)==5&&(f?B=6:c=0);e:do if((B|0)==6&&(d=l&255,(o[s>>0]|0)!=d<<24>>24)){f=qe(m,16843009)|0;t:do if(c>>>0>3){for(;m=n[s>>2]^f,!((m&-2139062144^-2139062144)&m+-16843009|0);)if(s=s+4|0,c=c+-4|0,c>>>0<=3){B=11;break t}}else B=11;while(0);if((B|0)==11&&!c){c=0;break}for(;;){if((o[s>>0]|0)==d<<24>>24)break e;if(s=s+1|0,c=c+-1|0,!c){c=0;break}}}while(0);return(c|0?s:0)|0}function Bs(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0;if(B=C,C=C+256|0,m=B,(c|0)>(f|0)&(d&73728|0)==0){if(d=c-f|0,Xm(m|0,l|0,(d>>>0<256?d:256)|0)|0,d>>>0>255){l=c-f|0;do ss(s,m,256),d=d+-256|0;while(d>>>0>255);d=l&255}ss(s,m,d)}C=B}function a7(s,l){return s=s|0,l=l|0,s?s=HUe(s,l,0)|0:s=0,s|0}function UUe(s,l,c,f,d,m){s=s|0,l=+l,c=c|0,f=f|0,d=d|0,m=m|0;var B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0,Me=0,Qe=0,et=0,Xe=0,lt=0,Ue=0,Ge=0,Nt=0,Mr=0,ar=0,Xt=0,Pr=0,Lr=0,sr=0,xn=0;xn=C,C=C+560|0,Q=xn+8|0,et=xn,sr=xn+524|0,Lr=sr,M=xn+512|0,n[et>>2]=0,Pr=M+12|0,l7(l)|0,(Pe|0)<0?(l=-l,ar=1,Mr=5659):(ar=(d&2049|0)!=0&1,Mr=(d&2048|0)==0?(d&1|0)==0?5660:5665:5662),l7(l)|0,Xt=Pe&2146435072;do if(Xt>>>0<2146435072|(Xt|0)==2146435072&0<0){if(je=+_Ue(l,et)*2,B=je!=0,B&&(n[et>>2]=(n[et>>2]|0)+-1),lt=m|32,(lt|0)==97){Me=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q>>>0<=M>>>0);)if(B=Q+-4|0,!(n[B>>2]|0))Q=B;else break;if(B=(n[et>>2]|0)-O|0,n[et>>2]=B,(B|0)>0)G=Q;else break}else M=Xt;if((B|0)<0){f=((k+25|0)/9|0)+1|0,Qe=(lt|0)==102;do{if(Me=0-B|0,Me=(Me|0)<9?Me:9,M>>>0>>0){O=(1<>>Me,se=0,B=M;do Ge=n[B>>2]|0,n[B>>2]=(Ge>>>Me)+se,se=qe(Ge&O,G)|0,B=B+4|0;while(B>>>0>>0);B=(n[M>>2]|0)==0?M+4|0:M,se?(n[Q>>2]=se,M=B,B=Q+4|0):(M=B,B=Q)}else M=(n[M>>2]|0)==0?M+4|0:M,B=Q;Q=Qe?Xt:M,Q=(B-Q>>2|0)>(f|0)?Q+(f<<2)|0:B,B=(n[et>>2]|0)+Me|0,n[et>>2]=B}while((B|0)<0);B=M,f=Q}else B=M,f=Q;if(Ge=Xt,B>>>0>>0){if(Q=(Ge-B>>2)*9|0,O=n[B>>2]|0,O>>>0>=10){M=10;do M=M*10|0,Q=Q+1|0;while(O>>>0>=M>>>0)}}else Q=0;if(Qe=(lt|0)==103,Xe=(k|0)!=0,M=k-((lt|0)!=102?Q:0)+((Xe&Qe)<<31>>31)|0,(M|0)<(((f-Ge>>2)*9|0)+-9|0)){if(M=M+9216|0,Me=Xt+4+(((M|0)/9|0)+-1024<<2)|0,M=((M|0)%9|0)+1|0,(M|0)<9){O=10;do O=O*10|0,M=M+1|0;while((M|0)!=9)}else O=10;if(G=n[Me>>2]|0,se=(G>>>0)%(O>>>0)|0,M=(Me+4|0)==(f|0),M&(se|0)==0)M=Me;else if(je=(((G>>>0)/(O>>>0)|0)&1|0)==0?9007199254740992:9007199254740994,Ue=(O|0)/2|0,l=se>>>0>>0?.5:M&(se|0)==(Ue|0)?1:1.5,ar&&(Ue=(o[Mr>>0]|0)==45,l=Ue?-l:l,je=Ue?-je:je),M=G-se|0,n[Me>>2]=M,je+l!=je){if(Ue=M+O|0,n[Me>>2]=Ue,Ue>>>0>999999999)for(Q=Me;M=Q+-4|0,n[Q>>2]=0,M>>>0>>0&&(B=B+-4|0,n[B>>2]=0),Ue=(n[M>>2]|0)+1|0,n[M>>2]=Ue,Ue>>>0>999999999;)Q=M;else M=Me;if(Q=(Ge-B>>2)*9|0,G=n[B>>2]|0,G>>>0>=10){O=10;do O=O*10|0,Q=Q+1|0;while(G>>>0>=O>>>0)}}else M=Me;M=M+4|0,M=f>>>0>M>>>0?M:f,Ue=B}else M=f,Ue=B;for(lt=M;;){if(lt>>>0<=Ue>>>0){et=0;break}if(B=lt+-4|0,!(n[B>>2]|0))lt=B;else{et=1;break}}f=0-Q|0;do if(Qe)if(B=((Xe^1)&1)+k|0,(B|0)>(Q|0)&(Q|0)>-5?(O=m+-1|0,k=B+-1-Q|0):(O=m+-2|0,k=B+-1|0),B=d&8,B)Me=B;else{if(et&&(Nt=n[lt+-4>>2]|0,(Nt|0)!=0))if((Nt>>>0)%10|0)M=0;else{M=0,B=10;do B=B*10|0,M=M+1|0;while(!((Nt>>>0)%(B>>>0)|0|0))}else M=9;if(B=((lt-Ge>>2)*9|0)+-9|0,(O|32|0)==102){Me=B-M|0,Me=(Me|0)>0?Me:0,k=(k|0)<(Me|0)?k:Me,Me=0;break}else{Me=B+Q-M|0,Me=(Me|0)>0?Me:0,k=(k|0)<(Me|0)?k:Me,Me=0;break}}else O=m,Me=d&8;while(0);if(Qe=k|Me,G=(Qe|0)!=0&1,se=(O|32|0)==102,se)Xe=0,B=(Q|0)>0?Q:0;else{if(B=(Q|0)<0?f:Q,B=Vm(B,((B|0)<0)<<31>>31,Pr)|0,M=Pr,(M-B|0)<2)do B=B+-1|0,o[B>>0]=48;while((M-B|0)<2);o[B+-1>>0]=(Q>>31&2)+43,B=B+-2|0,o[B>>0]=O,Xe=B,B=M-B|0}if(B=ar+1+k+G+B|0,Bs(s,32,c,B,d),ss(s,Mr,ar),Bs(s,48,c,B,d^65536),se){O=Ue>>>0>Xt>>>0?Xt:Ue,Me=sr+9|0,G=Me,se=sr+8|0,M=O;do{if(Q=Vm(n[M>>2]|0,0,Me)|0,(M|0)==(O|0))(Q|0)==(Me|0)&&(o[se>>0]=48,Q=se);else if(Q>>>0>sr>>>0){Xm(sr|0,48,Q-Lr|0)|0;do Q=Q+-1|0;while(Q>>>0>sr>>>0)}ss(s,Q,G-Q|0),M=M+4|0}while(M>>>0<=Xt>>>0);if(Qe|0&&ss(s,5710,1),M>>>0>>0&(k|0)>0)for(;;){if(Q=Vm(n[M>>2]|0,0,Me)|0,Q>>>0>sr>>>0){Xm(sr|0,48,Q-Lr|0)|0;do Q=Q+-1|0;while(Q>>>0>sr>>>0)}if(ss(s,Q,(k|0)<9?k:9),M=M+4|0,Q=k+-9|0,M>>>0>>0&(k|0)>9)k=Q;else{k=Q;break}}Bs(s,48,k+9|0,9,0)}else{if(Qe=et?lt:Ue+4|0,(k|0)>-1){et=sr+9|0,Me=(Me|0)==0,f=et,G=0-Lr|0,se=sr+8|0,O=Ue;do{Q=Vm(n[O>>2]|0,0,et)|0,(Q|0)==(et|0)&&(o[se>>0]=48,Q=se);do if((O|0)==(Ue|0)){if(M=Q+1|0,ss(s,Q,1),Me&(k|0)<1){Q=M;break}ss(s,5710,1),Q=M}else{if(Q>>>0<=sr>>>0)break;Xm(sr|0,48,Q+G|0)|0;do Q=Q+-1|0;while(Q>>>0>sr>>>0)}while(0);Lr=f-Q|0,ss(s,Q,(k|0)>(Lr|0)?Lr:k),k=k-Lr|0,O=O+4|0}while(O>>>0>>0&(k|0)>-1)}Bs(s,48,k+18|0,18,0),ss(s,Xe,Pr-Xe|0)}Bs(s,32,c,B,d^8192)}else sr=(m&32|0)!=0,B=ar+3|0,Bs(s,32,c,B,d&-65537),ss(s,Mr,ar),ss(s,l!=l|!1?sr?5686:5690:sr?5678:5682,3),Bs(s,32,c,B,d^8192);while(0);return C=xn,((B|0)<(c|0)?c:B)|0}function l7(s){s=+s;var l=0;return E[v>>3]=s,l=n[v>>2]|0,Pe=n[v+4>>2]|0,l|0}function _Ue(s,l){return s=+s,l=l|0,+ +c7(s,l)}function c7(s,l){s=+s,l=l|0;var c=0,f=0,d=0;switch(E[v>>3]=s,c=n[v>>2]|0,f=n[v+4>>2]|0,d=mD(c|0,f|0,52)|0,d&2047){case 0:{s!=0?(s=+c7(s*18446744073709552e3,l),c=(n[l>>2]|0)+-64|0):c=0,n[l>>2]=c;break}case 2047:break;default:n[l>>2]=(d&2047)+-1022,n[v>>2]=c,n[v+4>>2]=f&-2146435073|1071644672,s=+E[v>>3]}return+s}function HUe(s,l,c){s=s|0,l=l|0,c=c|0;do if(s){if(l>>>0<128){o[s>>0]=l,s=1;break}if(!(n[n[(qUe()|0)+188>>2]>>2]|0))if((l&-128|0)==57216){o[s>>0]=l,s=1;break}else{n[(zm()|0)>>2]=84,s=-1;break}if(l>>>0<2048){o[s>>0]=l>>>6|192,o[s+1>>0]=l&63|128,s=2;break}if(l>>>0<55296|(l&-8192|0)==57344){o[s>>0]=l>>>12|224,o[s+1>>0]=l>>>6&63|128,o[s+2>>0]=l&63|128,s=3;break}if((l+-65536|0)>>>0<1048576){o[s>>0]=l>>>18|240,o[s+1>>0]=l>>>12&63|128,o[s+2>>0]=l>>>6&63|128,o[s+3>>0]=l&63|128,s=4;break}else{n[(zm()|0)>>2]=84,s=-1;break}}else s=1;while(0);return s|0}function qUe(){return PR()|0}function GUe(){return PR()|0}function jUe(s,l){s=s|0,l=l|0;var c=0,f=0;for(f=0;;){if((u[5712+f>>0]|0)==(s|0)){s=2;break}if(c=f+1|0,(c|0)==87){c=5800,f=87,s=5;break}else f=c}if((s|0)==2&&(f?(c=5800,s=5):c=5800),(s|0)==5)for(;;){do s=c,c=c+1|0;while((o[s>>0]|0)!=0);if(f=f+-1|0,f)s=5;else break}return YUe(c,n[l+20>>2]|0)|0}function YUe(s,l){return s=s|0,l=l|0,WUe(s,l)|0}function WUe(s,l){return s=s|0,l=l|0,l?l=KUe(n[l>>2]|0,n[l+4>>2]|0,s)|0:l=0,(l|0?l:s)|0}function KUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0;se=(n[s>>2]|0)+1794895138|0,m=Tg(n[s+8>>2]|0,se)|0,f=Tg(n[s+12>>2]|0,se)|0,d=Tg(n[s+16>>2]|0,se)|0;e:do if(m>>>0>>2>>>0&&(G=l-(m<<2)|0,f>>>0>>0&d>>>0>>0)&&((d|f)&3|0)==0){for(G=f>>>2,O=d>>>2,M=0;;){if(k=m>>>1,Q=M+k|0,B=Q<<1,d=B+G|0,f=Tg(n[s+(d<<2)>>2]|0,se)|0,d=Tg(n[s+(d+1<<2)>>2]|0,se)|0,!(d>>>0>>0&f>>>0<(l-d|0)>>>0)){f=0;break e}if(o[s+(d+f)>>0]|0){f=0;break e}if(f=n7(c,s+d|0)|0,!f)break;if(f=(f|0)<0,(m|0)==1){f=0;break e}else M=f?M:Q,m=f?k:m-k|0}f=B+O|0,d=Tg(n[s+(f<<2)>>2]|0,se)|0,f=Tg(n[s+(f+1<<2)>>2]|0,se)|0,f>>>0>>0&d>>>0<(l-f|0)>>>0?f=(o[s+(f+d)>>0]|0)==0?s+f|0:0:f=0}else f=0;while(0);return f|0}function Tg(s,l){s=s|0,l=l|0;var c=0;return c=m7(s|0)|0,((l|0)==0?s:c)|0}function zUe(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0,k=0;f=c+16|0,d=n[f>>2]|0,d?m=5:VUe(c)|0?f=0:(d=n[f>>2]|0,m=5);e:do if((m|0)==5){if(k=c+20|0,B=n[k>>2]|0,f=B,(d-B|0)>>>0>>0){f=ED[n[c+36>>2]&7](c,s,l)|0;break}t:do if((o[c+75>>0]|0)>-1){for(B=l;;){if(!B){m=0,d=s;break t}if(d=B+-1|0,(o[s+d>>0]|0)==10)break;B=d}if(f=ED[n[c+36>>2]&7](c,s,B)|0,f>>>0>>0)break e;m=B,d=s+B|0,l=l-B|0,f=n[k>>2]|0}else m=0,d=s;while(0);Dr(f|0,d|0,l|0)|0,n[k>>2]=(n[k>>2]|0)+l,f=m+l|0}while(0);return f|0}function VUe(s){s=s|0;var l=0,c=0;return l=s+74|0,c=o[l>>0]|0,o[l>>0]=c+255|c,l=n[s>>2]|0,l&8?(n[s>>2]=l|32,s=-1):(n[s+8>>2]=0,n[s+4>>2]=0,c=n[s+44>>2]|0,n[s+28>>2]=c,n[s+20>>2]=c,n[s+16>>2]=c+(n[s+48>>2]|0),s=0),s|0}function _n(s,l){s=y(s),l=y(l);var c=0,f=0;c=u7(s)|0;do if((c&2147483647)>>>0<=2139095040){if(f=u7(l)|0,(f&2147483647)>>>0<=2139095040)if((f^c|0)<0){s=(c|0)<0?l:s;break}else{s=s>2]=s,n[v>>2]|0|0}function Lg(s,l){s=y(s),l=y(l);var c=0,f=0;c=A7(s)|0;do if((c&2147483647)>>>0<=2139095040){if(f=A7(l)|0,(f&2147483647)>>>0<=2139095040)if((f^c|0)<0){s=(c|0)<0?s:l;break}else{s=s>2]=s,n[v>>2]|0|0}function bR(s,l){s=y(s),l=y(l);var c=0,f=0,d=0,m=0,B=0,k=0,Q=0,M=0;m=(h[v>>2]=s,n[v>>2]|0),k=(h[v>>2]=l,n[v>>2]|0),c=m>>>23&255,B=k>>>23&255,Q=m&-2147483648,d=k<<1;e:do if((d|0)!=0&&!((c|0)==255|((JUe(l)|0)&2147483647)>>>0>2139095040)){if(f=m<<1,f>>>0<=d>>>0)return l=y(s*y(0)),y((f|0)==(d|0)?l:s);if(c)f=m&8388607|8388608;else{if(c=m<<9,(c|0)>-1){f=c,c=0;do c=c+-1|0,f=f<<1;while((f|0)>-1)}else c=0;f=m<<1-c}if(B)k=k&8388607|8388608;else{if(m=k<<9,(m|0)>-1){d=0;do d=d+-1|0,m=m<<1;while((m|0)>-1)}else d=0;B=d,k=k<<1-d}d=f-k|0,m=(d|0)>-1;t:do if((c|0)>(B|0)){for(;;){if(m)if(d)f=d;else break;if(f=f<<1,c=c+-1|0,d=f-k|0,m=(d|0)>-1,(c|0)<=(B|0))break t}l=y(s*y(0));break e}while(0);if(m)if(d)f=d;else{l=y(s*y(0));break}if(f>>>0<8388608)do f=f<<1,c=c+-1|0;while(f>>>0<8388608);(c|0)>0?c=f+-8388608|c<<23:c=f>>>(1-c|0),l=(n[v>>2]=c|Q,y(h[v>>2]))}else M=3;while(0);return(M|0)==3&&(l=y(s*l),l=y(l/l)),y(l)}function JUe(s){return s=y(s),h[v>>2]=s,n[v>>2]|0|0}function XUe(s,l){return s=s|0,l=l|0,i7(n[582]|0,s,l)|0}function Jr(s){s=s|0,Rt()}function Jm(s){s=s|0}function ZUe(s,l){return s=s|0,l=l|0,0}function $Ue(s){return s=s|0,(f7(s+4|0)|0)==-1?(tf[n[(n[s>>2]|0)+8>>2]&127](s),s=1):s=0,s|0}function f7(s){s=s|0;var l=0;return l=n[s>>2]|0,n[s>>2]=l+-1,l+-1|0}function Qp(s){s=s|0,$Ue(s)|0&&e3e(s)}function e3e(s){s=s|0;var l=0;l=s+8|0,(n[l>>2]|0)!=0&&(f7(l)|0)!=-1||tf[n[(n[s>>2]|0)+16>>2]&127](s)}function Kt(s){s=s|0;var l=0;for(l=(s|0)==0?1:s;s=pD(l)|0,!(s|0);){if(s=r3e()|0,!s){s=0;break}S7[s&0]()}return s|0}function p7(s){return s=s|0,Kt(s)|0}function gt(s){s=s|0,hD(s)}function t3e(s){s=s|0,(o[s+11>>0]|0)<0&>(n[s>>2]|0)}function r3e(){var s=0;return s=n[2923]|0,n[2923]=s+0,s|0}function n3e(){}function dD(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,f=l-f-(c>>>0>s>>>0|0)>>>0,Pe=f,s-c>>>0|0|0}function xR(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,c=s+c>>>0,Pe=l+f+(c>>>0>>0|0)>>>0,c|0|0}function Xm(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0,B=0;if(m=s+c|0,l=l&255,(c|0)>=67){for(;s&3;)o[s>>0]=l,s=s+1|0;for(f=m&-4|0,d=f-64|0,B=l|l<<8|l<<16|l<<24;(s|0)<=(d|0);)n[s>>2]=B,n[s+4>>2]=B,n[s+8>>2]=B,n[s+12>>2]=B,n[s+16>>2]=B,n[s+20>>2]=B,n[s+24>>2]=B,n[s+28>>2]=B,n[s+32>>2]=B,n[s+36>>2]=B,n[s+40>>2]=B,n[s+44>>2]=B,n[s+48>>2]=B,n[s+52>>2]=B,n[s+56>>2]=B,n[s+60>>2]=B,s=s+64|0;for(;(s|0)<(f|0);)n[s>>2]=B,s=s+4|0}for(;(s|0)<(m|0);)o[s>>0]=l,s=s+1|0;return m-c|0}function h7(s,l,c){return s=s|0,l=l|0,c=c|0,(c|0)<32?(Pe=l<>>32-c,s<>>c,s>>>c|(l&(1<>>c-32|0)}function Dr(s,l,c){s=s|0,l=l|0,c=c|0;var f=0,d=0,m=0;if((c|0)>=8192)return fc(s|0,l|0,c|0)|0;if(m=s|0,d=s+c|0,(s&3)==(l&3)){for(;s&3;){if(!c)return m|0;o[s>>0]=o[l>>0]|0,s=s+1|0,l=l+1|0,c=c-1|0}for(c=d&-4|0,f=c-64|0;(s|0)<=(f|0);)n[s>>2]=n[l>>2],n[s+4>>2]=n[l+4>>2],n[s+8>>2]=n[l+8>>2],n[s+12>>2]=n[l+12>>2],n[s+16>>2]=n[l+16>>2],n[s+20>>2]=n[l+20>>2],n[s+24>>2]=n[l+24>>2],n[s+28>>2]=n[l+28>>2],n[s+32>>2]=n[l+32>>2],n[s+36>>2]=n[l+36>>2],n[s+40>>2]=n[l+40>>2],n[s+44>>2]=n[l+44>>2],n[s+48>>2]=n[l+48>>2],n[s+52>>2]=n[l+52>>2],n[s+56>>2]=n[l+56>>2],n[s+60>>2]=n[l+60>>2],s=s+64|0,l=l+64|0;for(;(s|0)<(c|0);)n[s>>2]=n[l>>2],s=s+4|0,l=l+4|0}else for(c=d-4|0;(s|0)<(c|0);)o[s>>0]=o[l>>0]|0,o[s+1>>0]=o[l+1>>0]|0,o[s+2>>0]=o[l+2>>0]|0,o[s+3>>0]=o[l+3>>0]|0,s=s+4|0,l=l+4|0;for(;(s|0)<(d|0);)o[s>>0]=o[l>>0]|0,s=s+1|0,l=l+1|0;return m|0}function g7(s){s=s|0;var l=0;return l=o[N+(s&255)>>0]|0,(l|0)<8?l|0:(l=o[N+(s>>8&255)>>0]|0,(l|0)<8?l+8|0:(l=o[N+(s>>16&255)>>0]|0,(l|0)<8?l+16|0:(o[N+(s>>>24)>>0]|0)+24|0))}function d7(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0;var m=0,B=0,k=0,Q=0,M=0,O=0,G=0,se=0,je=0,Me=0;if(O=s,Q=l,M=Q,B=c,se=f,k=se,!M)return m=(d|0)!=0,k?m?(n[d>>2]=s|0,n[d+4>>2]=l&0,se=0,d=0,Pe=se,d|0):(se=0,d=0,Pe=se,d|0):(m&&(n[d>>2]=(O>>>0)%(B>>>0),n[d+4>>2]=0),se=0,d=(O>>>0)/(B>>>0)>>>0,Pe=se,d|0);m=(k|0)==0;do if(B){if(!m){if(m=(S(k|0)|0)-(S(M|0)|0)|0,m>>>0<=31){G=m+1|0,k=31-m|0,l=m-31>>31,B=G,s=O>>>(G>>>0)&l|M<>>(G>>>0)&l,m=0,k=O<>2]=s|0,n[d+4>>2]=Q|l&0,se=0,d=0,Pe=se,d|0):(se=0,d=0,Pe=se,d|0)}if(m=B-1|0,m&B|0){k=(S(B|0)|0)+33-(S(M|0)|0)|0,Me=64-k|0,G=32-k|0,Q=G>>31,je=k-32|0,l=je>>31,B=k,s=G-1>>31&M>>>(je>>>0)|(M<>>(k>>>0))&l,l=l&M>>>(k>>>0),m=O<>>(je>>>0))&Q|O<>31;break}return d|0&&(n[d>>2]=m&O,n[d+4>>2]=0),(B|0)==1?(je=Q|l&0,Me=s|0|0,Pe=je,Me|0):(Me=g7(B|0)|0,je=M>>>(Me>>>0)|0,Me=M<<32-Me|O>>>(Me>>>0)|0,Pe=je,Me|0)}else{if(m)return d|0&&(n[d>>2]=(M>>>0)%(B>>>0),n[d+4>>2]=0),je=0,Me=(M>>>0)/(B>>>0)>>>0,Pe=je,Me|0;if(!O)return d|0&&(n[d>>2]=0,n[d+4>>2]=(M>>>0)%(k>>>0)),je=0,Me=(M>>>0)/(k>>>0)>>>0,Pe=je,Me|0;if(m=k-1|0,!(m&k))return d|0&&(n[d>>2]=s|0,n[d+4>>2]=m&M|l&0),je=0,Me=M>>>((g7(k|0)|0)>>>0),Pe=je,Me|0;if(m=(S(k|0)|0)-(S(M|0)|0)|0,m>>>0<=30){l=m+1|0,k=31-m|0,B=l,s=M<>>(l>>>0),l=M>>>(l>>>0),m=0,k=O<>2]=s|0,n[d+4>>2]=Q|l&0,je=0,Me=0,Pe=je,Me|0):(je=0,Me=0,Pe=je,Me|0)}while(0);if(!B)M=k,Q=0,k=0;else{G=c|0|0,O=se|f&0,M=xR(G|0,O|0,-1,-1)|0,c=Pe,Q=k,k=0;do f=Q,Q=m>>>31|Q<<1,m=k|m<<1,f=s<<1|f>>>31|0,se=s>>>31|l<<1|0,dD(M|0,c|0,f|0,se|0)|0,Me=Pe,je=Me>>31|((Me|0)<0?-1:0)<<1,k=je&1,s=dD(f|0,se|0,je&G|0,(((Me|0)<0?-1:0)>>31|((Me|0)<0?-1:0)<<1)&O|0)|0,l=Pe,B=B-1|0;while((B|0)!=0);M=Q,Q=0}return B=0,d|0&&(n[d>>2]=s,n[d+4>>2]=l),je=(m|0)>>>31|(M|B)<<1|(B<<1|m>>>31)&0|Q,Me=(m<<1|0>>>31)&-2|k,Pe=je,Me|0}function kR(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,d7(s,l,c,f,0)|0}function Fp(s){s=s|0;var l=0,c=0;return c=s+15&-16|0,l=n[I>>2]|0,s=l+c|0,(c|0)>0&(s|0)<(l|0)|(s|0)<0?(ie()|0,DA(12),-1):(n[I>>2]=s,(s|0)>(Z()|0)&&(X()|0)==0?(n[I>>2]=l,DA(12),-1):l|0)}function Mw(s,l,c){s=s|0,l=l|0,c=c|0;var f=0;if((l|0)<(s|0)&(s|0)<(l+c|0)){for(f=s,l=l+c|0,s=s+c|0;(c|0)>0;)s=s-1|0,l=l-1|0,c=c-1|0,o[s>>0]=o[l>>0]|0;s=f}else Dr(s,l,c)|0;return s|0}function QR(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0;var d=0,m=0;return m=C,C=C+16|0,d=m|0,d7(s,l,c,f,d)|0,C=m,Pe=n[d+4>>2]|0,n[d>>2]|0|0}function m7(s){return s=s|0,(s&255)<<24|(s>>8&255)<<16|(s>>16&255)<<8|s>>>24|0}function i3e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,y7[s&1](l|0,c|0,f|0,d|0,m|0)}function s3e(s,l,c){s=s|0,l=l|0,c=y(c),E7[s&1](l|0,y(c))}function o3e(s,l,c){s=s|0,l=l|0,c=+c,C7[s&31](l|0,+c)}function a3e(s,l,c,f){return s=s|0,l=l|0,c=y(c),f=y(f),y(w7[s&0](l|0,y(c),y(f)))}function l3e(s,l){s=s|0,l=l|0,tf[s&127](l|0)}function c3e(s,l,c){s=s|0,l=l|0,c=c|0,rf[s&31](l|0,c|0)}function u3e(s,l){return s=s|0,l=l|0,Og[s&31](l|0)|0}function A3e(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0,I7[s&1](l|0,+c,+f,d|0)}function f3e(s,l,c,f){s=s|0,l=l|0,c=+c,f=+f,W3e[s&1](l|0,+c,+f)}function p3e(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,ED[s&7](l|0,c|0,f|0)|0}function h3e(s,l,c,f){return s=s|0,l=l|0,c=c|0,f=f|0,+K3e[s&1](l|0,c|0,f|0)}function g3e(s,l){return s=s|0,l=l|0,+B7[s&15](l|0)}function d3e(s,l,c){return s=s|0,l=l|0,c=+c,z3e[s&1](l|0,+c)|0}function m3e(s,l,c){return s=s|0,l=l|0,c=c|0,RR[s&15](l|0,c|0)|0}function y3e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=+f,d=+d,m=m|0,V3e[s&1](l|0,c|0,+f,+d,m|0)}function E3e(s,l,c,f,d,m,B){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,B=B|0,J3e[s&1](l|0,c|0,f|0,d|0,m|0,B|0)}function C3e(s,l,c){return s=s|0,l=l|0,c=c|0,+v7[s&7](l|0,c|0)}function w3e(s){return s=s|0,CD[s&7]()|0}function I3e(s,l,c,f,d,m){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,D7[s&1](l|0,c|0,f|0,d|0,m|0)|0}function B3e(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=+d,X3e[s&1](l|0,c|0,f|0,+d)}function v3e(s,l,c,f,d,m,B){s=s|0,l=l|0,c=c|0,f=y(f),d=d|0,m=y(m),B=B|0,P7[s&1](l|0,c|0,y(f),d|0,y(m),B|0)}function D3e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,Hw[s&15](l|0,c|0,f|0)}function P3e(s){s=s|0,S7[s&0]()}function S3e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f,b7[s&15](l|0,c|0,+f)}function b3e(s,l,c){return s=s|0,l=+l,c=+c,Z3e[s&1](+l,+c)|0}function x3e(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,TR[s&15](l|0,c|0,f|0,d|0)}function k3e(s,l,c,f,d){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,F(0)}function Q3e(s,l){s=s|0,l=y(l),F(1)}function ma(s,l){s=s|0,l=+l,F(2)}function F3e(s,l,c){return s=s|0,l=y(l),c=y(c),F(3),Ze}function Er(s){s=s|0,F(4)}function Uw(s,l){s=s|0,l=l|0,F(5)}function Ja(s){return s=s|0,F(6),0}function R3e(s,l,c,f){s=s|0,l=+l,c=+c,f=f|0,F(7)}function T3e(s,l,c){s=s|0,l=+l,c=+c,F(8)}function L3e(s,l,c){return s=s|0,l=l|0,c=c|0,F(9),0}function N3e(s,l,c){return s=s|0,l=l|0,c=c|0,F(10),0}function Ng(s){return s=s|0,F(11),0}function O3e(s,l){return s=s|0,l=+l,F(12),0}function _w(s,l){return s=s|0,l=l|0,F(13),0}function M3e(s,l,c,f,d){s=s|0,l=l|0,c=+c,f=+f,d=d|0,F(14)}function U3e(s,l,c,f,d,m){s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,m=m|0,F(15)}function FR(s,l){return s=s|0,l=l|0,F(16),0}function _3e(){return F(17),0}function H3e(s,l,c,f,d){return s=s|0,l=l|0,c=c|0,f=f|0,d=d|0,F(18),0}function q3e(s,l,c,f){s=s|0,l=l|0,c=c|0,f=+f,F(19)}function G3e(s,l,c,f,d,m){s=s|0,l=l|0,c=y(c),f=f|0,d=y(d),m=m|0,F(20)}function yD(s,l,c){s=s|0,l=l|0,c=c|0,F(21)}function j3e(){F(22)}function Zm(s,l,c){s=s|0,l=l|0,c=+c,F(23)}function Y3e(s,l){return s=+s,l=+l,F(24),0}function $m(s,l,c,f){s=s|0,l=l|0,c=c|0,f=f|0,F(25)}var y7=[k3e,HNe],E7=[Q3e,fo],C7=[ma,xw,kw,EF,CF,Pl,Qw,wF,qm,xu,Rw,IF,$v,KA,eD,Gm,tD,rD,jm,ma,ma,ma,ma,ma,ma,ma,ma,ma,ma,ma,ma,ma],w7=[F3e],tf=[Er,Jm,wDe,IDe,BDe,Zbe,$be,exe,dLe,mLe,yLe,bNe,xNe,kNe,J4e,X4e,Z4e,hs,zv,Hm,WA,Fw,mve,yve,ADe,QDe,GDe,aPe,BPe,_Pe,nSe,ySe,RSe,VSe,Abe,Sbe,Gbe,mxe,Rxe,Vxe,Ake,Ske,Gke,lQe,BQe,OQe,$Qe,bc,kFe,WFe,ARe,xRe,jRe,ATe,wTe,vTe,HTe,jTe,aLe,CLe,BLe,_Le,iNe,i9,UOe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dD,___udivdi3:kR,dynCall_vif:s3e,setThrew:gu,dynCall_viii:D3e,_bitshift64Lshr:mD,_bitshift64Shl:h7,dynCall_vi:l3e,dynCall_viiddi:y3e,dynCall_diii:h3e,dynCall_iii:m3e,_memset:Xm,_sbrk:Fp,_memcpy:Dr,__GLOBAL__sub_I_Yoga_cpp:Um,dynCall_vii:c3e,___uremdi3:QR,dynCall_vid:o3e,stackAlloc:lo,_nbind_init:gUe,getTempRet0:Ha,dynCall_di:g3e,dynCall_iid:d3e,setTempRet0:xA,_i64Add:xR,dynCall_fiff:a3e,dynCall_iiii:p3e,_emscripten_get_global_libc:PUe,dynCall_viid:S3e,dynCall_viiid:B3e,dynCall_viififi:v3e,dynCall_ii:u3e,__GLOBAL__sub_I_Binding_cc:QOe,dynCall_viiii:x3e,dynCall_iiiiii:I3e,stackSave:dc,dynCall_viiiii:i3e,__GLOBAL__sub_I_nbind_cc:Fve,dynCall_vidd:f3e,_free:hD,runPostSets:n3e,dynCall_viiiiii:E3e,establishStackSpace:qi,_memmove:Mw,stackRestore:hu,_malloc:pD,__GLOBAL__sub_I_common_cc:XLe,dynCall_viddi:A3e,dynCall_dii:C3e,dynCall_v:P3e}}(Module.asmGlobalArg,Module.asmLibraryArg,buffer),_llvm_bswap_i32=Module._llvm_bswap_i32=asm._llvm_bswap_i32,getTempRet0=Module.getTempRet0=asm.getTempRet0,___udivdi3=Module.___udivdi3=asm.___udivdi3,setThrew=Module.setThrew=asm.setThrew,_bitshift64Lshr=Module._bitshift64Lshr=asm._bitshift64Lshr,_bitshift64Shl=Module._bitshift64Shl=asm._bitshift64Shl,_memset=Module._memset=asm._memset,_sbrk=Module._sbrk=asm._sbrk,_memcpy=Module._memcpy=asm._memcpy,stackAlloc=Module.stackAlloc=asm.stackAlloc,___uremdi3=Module.___uremdi3=asm.___uremdi3,_nbind_init=Module._nbind_init=asm._nbind_init,_i64Subtract=Module._i64Subtract=asm._i64Subtract,setTempRet0=Module.setTempRet0=asm.setTempRet0,_i64Add=Module._i64Add=asm._i64Add,_emscripten_get_global_libc=Module._emscripten_get_global_libc=asm._emscripten_get_global_libc,__GLOBAL__sub_I_Yoga_cpp=Module.__GLOBAL__sub_I_Yoga_cpp=asm.__GLOBAL__sub_I_Yoga_cpp,__GLOBAL__sub_I_Binding_cc=Module.__GLOBAL__sub_I_Binding_cc=asm.__GLOBAL__sub_I_Binding_cc,stackSave=Module.stackSave=asm.stackSave,__GLOBAL__sub_I_nbind_cc=Module.__GLOBAL__sub_I_nbind_cc=asm.__GLOBAL__sub_I_nbind_cc,_free=Module._free=asm._free,runPostSets=Module.runPostSets=asm.runPostSets,establishStackSpace=Module.establishStackSpace=asm.establishStackSpace,_memmove=Module._memmove=asm._memmove,stackRestore=Module.stackRestore=asm.stackRestore,_malloc=Module._malloc=asm._malloc,__GLOBAL__sub_I_common_cc=Module.__GLOBAL__sub_I_common_cc=asm.__GLOBAL__sub_I_common_cc,dynCall_viiiii=Module.dynCall_viiiii=asm.dynCall_viiiii,dynCall_vif=Module.dynCall_vif=asm.dynCall_vif,dynCall_vid=Module.dynCall_vid=asm.dynCall_vid,dynCall_fiff=Module.dynCall_fiff=asm.dynCall_fiff,dynCall_vi=Module.dynCall_vi=asm.dynCall_vi,dynCall_vii=Module.dynCall_vii=asm.dynCall_vii,dynCall_ii=Module.dynCall_ii=asm.dynCall_ii,dynCall_viddi=Module.dynCall_viddi=asm.dynCall_viddi,dynCall_vidd=Module.dynCall_vidd=asm.dynCall_vidd,dynCall_iiii=Module.dynCall_iiii=asm.dynCall_iiii,dynCall_diii=Module.dynCall_diii=asm.dynCall_diii,dynCall_di=Module.dynCall_di=asm.dynCall_di,dynCall_iid=Module.dynCall_iid=asm.dynCall_iid,dynCall_iii=Module.dynCall_iii=asm.dynCall_iii,dynCall_viiddi=Module.dynCall_viiddi=asm.dynCall_viiddi,dynCall_viiiiii=Module.dynCall_viiiiii=asm.dynCall_viiiiii,dynCall_dii=Module.dynCall_dii=asm.dynCall_dii,dynCall_i=Module.dynCall_i=asm.dynCall_i,dynCall_iiiiii=Module.dynCall_iiiiii=asm.dynCall_iiiiii,dynCall_viiid=Module.dynCall_viiid=asm.dynCall_viiid,dynCall_viififi=Module.dynCall_viififi=asm.dynCall_viififi,dynCall_viii=Module.dynCall_viii=asm.dynCall_viii,dynCall_v=Module.dynCall_v=asm.dynCall_v,dynCall_viid=Module.dynCall_viid=asm.dynCall_viid,dynCall_idd=Module.dynCall_idd=asm.dynCall_idd,dynCall_viiii=Module.dynCall_viiii=asm.dynCall_viiii;Runtime.stackAlloc=Module.stackAlloc,Runtime.stackSave=Module.stackSave,Runtime.stackRestore=Module.stackRestore,Runtime.establishStackSpace=Module.establishStackSpace,Runtime.setTempRet0=Module.setTempRet0,Runtime.getTempRet0=Module.getTempRet0,Module.asm=asm;function ExitStatus(t){this.name="ExitStatus",this.message="Program terminated with exit("+t+")",this.status=t}ExitStatus.prototype=new Error,ExitStatus.prototype.constructor=ExitStatus;var initialStackTop,preloadStartTime=null,calledMain=!1;dependenciesFulfilled=function t(){Module.calledRun||run(),Module.calledRun||(dependenciesFulfilled=t)},Module.callMain=Module.callMain=function t(e){e=e||[],ensureInitRuntime();var r=e.length+1;function o(){for(var p=0;p<4-1;p++)a.push(0)}var a=[allocate(intArrayFromString(Module.thisProgram),"i8",ALLOC_NORMAL)];o();for(var n=0;n0||(preRun(),runDependencies>0)||Module.calledRun)return;function e(){Module.calledRun||(Module.calledRun=!0,!ABORT&&(ensureInitRuntime(),preMain(),Module.onRuntimeInitialized&&Module.onRuntimeInitialized(),Module._main&&shouldRunNow&&Module.callMain(t),postRun()))}Module.setStatus?(Module.setStatus("Running..."),setTimeout(function(){setTimeout(function(){Module.setStatus("")},1),e()},1)):e()}Module.run=Module.run=run;function exit(t,e){e&&Module.noExitRuntime||(Module.noExitRuntime||(ABORT=!0,EXITSTATUS=t,STACKTOP=initialStackTop,exitRuntime(),Module.onExit&&Module.onExit(t)),ENVIRONMENT_IS_NODE&&process.exit(t),Module.quit(t,new ExitStatus(t)))}Module.exit=Module.exit=exit;var abortDecorators=[];function abort(t){Module.onAbort&&Module.onAbort(t),t!==void 0?(Module.print(t),Module.printErr(t),t=JSON.stringify(t)):t="",ABORT=!0,EXITSTATUS=1;var e=` If this abort() is unexpected, build with -s ASSERTIONS=1 which can give more information.`,r="abort("+t+") at "+stackTrace()+e;throw abortDecorators&&abortDecorators.forEach(function(o){r=o(r,t)}),r}if(Module.abort=Module.abort=abort,Module.preInit)for(typeof Module.preInit=="function"&&(Module.preInit=[Module.preInit]);Module.preInit.length>0;)Module.preInit.pop()();var shouldRunNow=!0;Module.noInitialRun&&(shouldRunNow=!1),run()})});var lm=_((IKt,NEe)=>{"use strict";var Yyt=TEe(),Wyt=LEe(),x6=!1,k6=null;Wyt({},function(t,e){if(!x6){if(x6=!0,t)throw t;k6=e}});if(!x6)throw new Error("Failed to load the yoga module - it needed to be loaded synchronously, but didn't");NEe.exports=Yyt(k6.bind,k6.lib)});var F6=_((BKt,Q6)=>{"use strict";var OEe=t=>Number.isNaN(t)?!1:t>=4352&&(t<=4447||t===9001||t===9002||11904<=t&&t<=12871&&t!==12351||12880<=t&&t<=19903||19968<=t&&t<=42182||43360<=t&&t<=43388||44032<=t&&t<=55203||63744<=t&&t<=64255||65040<=t&&t<=65049||65072<=t&&t<=65131||65281<=t&&t<=65376||65504<=t&&t<=65510||110592<=t&&t<=110593||127488<=t&&t<=127569||131072<=t&&t<=262141);Q6.exports=OEe;Q6.exports.default=OEe});var UEe=_((vKt,MEe)=>{"use strict";MEe.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\u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FFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}});var Kk=_((DKt,R6)=>{"use strict";var Kyt=NP(),zyt=F6(),Vyt=UEe(),_Ee=t=>{if(typeof t!="string"||t.length===0||(t=Kyt(t),t.length===0))return 0;t=t.replace(Vyt()," ");let e=0;for(let r=0;r=127&&o<=159||o>=768&&o<=879||(o>65535&&r++,e+=zyt(o)?2:1)}return e};R6.exports=_Ee;R6.exports.default=_Ee});var L6=_((PKt,T6)=>{"use strict";var Jyt=Kk(),HEe=t=>{let e=0;for(let r of t.split(` `))e=Math.max(e,Jyt(r));return e};T6.exports=HEe;T6.exports.default=HEe});var qEe=_(cB=>{"use strict";var Xyt=cB&&cB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(cB,"__esModule",{value:!0});var Zyt=Xyt(L6()),N6={};cB.default=t=>{if(t.length===0)return{width:0,height:0};if(N6[t])return N6[t];let e=Zyt.default(t),r=t.split(` `).length;return N6[t]={width:e,height:r},{width:e,height:r}}});var GEe=_(uB=>{"use strict";var $yt=uB&&uB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(uB,"__esModule",{value:!0});var dn=$yt(lm()),eEt=(t,e)=>{"position"in e&&t.setPositionType(e.position==="absolute"?dn.default.POSITION_TYPE_ABSOLUTE:dn.default.POSITION_TYPE_RELATIVE)},tEt=(t,e)=>{"marginLeft"in e&&t.setMargin(dn.default.EDGE_START,e.marginLeft||0),"marginRight"in e&&t.setMargin(dn.default.EDGE_END,e.marginRight||0),"marginTop"in e&&t.setMargin(dn.default.EDGE_TOP,e.marginTop||0),"marginBottom"in e&&t.setMargin(dn.default.EDGE_BOTTOM,e.marginBottom||0)},rEt=(t,e)=>{"paddingLeft"in e&&t.setPadding(dn.default.EDGE_LEFT,e.paddingLeft||0),"paddingRight"in e&&t.setPadding(dn.default.EDGE_RIGHT,e.paddingRight||0),"paddingTop"in e&&t.setPadding(dn.default.EDGE_TOP,e.paddingTop||0),"paddingBottom"in e&&t.setPadding(dn.default.EDGE_BOTTOM,e.paddingBottom||0)},nEt=(t,e)=>{var r;"flexGrow"in e&&t.setFlexGrow((r=e.flexGrow)!==null&&r!==void 0?r:0),"flexShrink"in e&&t.setFlexShrink(typeof e.flexShrink=="number"?e.flexShrink:1),"flexDirection"in e&&(e.flexDirection==="row"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_ROW),e.flexDirection==="row-reverse"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_ROW_REVERSE),e.flexDirection==="column"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_COLUMN),e.flexDirection==="column-reverse"&&t.setFlexDirection(dn.default.FLEX_DIRECTION_COLUMN_REVERSE)),"flexBasis"in e&&(typeof e.flexBasis=="number"?t.setFlexBasis(e.flexBasis):typeof e.flexBasis=="string"?t.setFlexBasisPercent(Number.parseInt(e.flexBasis,10)):t.setFlexBasis(NaN)),"alignItems"in e&&((e.alignItems==="stretch"||!e.alignItems)&&t.setAlignItems(dn.default.ALIGN_STRETCH),e.alignItems==="flex-start"&&t.setAlignItems(dn.default.ALIGN_FLEX_START),e.alignItems==="center"&&t.setAlignItems(dn.default.ALIGN_CENTER),e.alignItems==="flex-end"&&t.setAlignItems(dn.default.ALIGN_FLEX_END)),"alignSelf"in e&&((e.alignSelf==="auto"||!e.alignSelf)&&t.setAlignSelf(dn.default.ALIGN_AUTO),e.alignSelf==="flex-start"&&t.setAlignSelf(dn.default.ALIGN_FLEX_START),e.alignSelf==="center"&&t.setAlignSelf(dn.default.ALIGN_CENTER),e.alignSelf==="flex-end"&&t.setAlignSelf(dn.default.ALIGN_FLEX_END)),"justifyContent"in e&&((e.justifyContent==="flex-start"||!e.justifyContent)&&t.setJustifyContent(dn.default.JUSTIFY_FLEX_START),e.justifyContent==="center"&&t.setJustifyContent(dn.default.JUSTIFY_CENTER),e.justifyContent==="flex-end"&&t.setJustifyContent(dn.default.JUSTIFY_FLEX_END),e.justifyContent==="space-between"&&t.setJustifyContent(dn.default.JUSTIFY_SPACE_BETWEEN),e.justifyContent==="space-around"&&t.setJustifyContent(dn.default.JUSTIFY_SPACE_AROUND))},iEt=(t,e)=>{var r,o;"width"in e&&(typeof e.width=="number"?t.setWidth(e.width):typeof e.width=="string"?t.setWidthPercent(Number.parseInt(e.width,10)):t.setWidthAuto()),"height"in e&&(typeof e.height=="number"?t.setHeight(e.height):typeof e.height=="string"?t.setHeightPercent(Number.parseInt(e.height,10)):t.setHeightAuto()),"minWidth"in e&&(typeof e.minWidth=="string"?t.setMinWidthPercent(Number.parseInt(e.minWidth,10)):t.setMinWidth((r=e.minWidth)!==null&&r!==void 0?r:0)),"minHeight"in e&&(typeof e.minHeight=="string"?t.setMinHeightPercent(Number.parseInt(e.minHeight,10)):t.setMinHeight((o=e.minHeight)!==null&&o!==void 0?o:0))},sEt=(t,e)=>{"display"in e&&t.setDisplay(e.display==="flex"?dn.default.DISPLAY_FLEX:dn.default.DISPLAY_NONE)},oEt=(t,e)=>{if("borderStyle"in e){let r=typeof e.borderStyle=="string"?1:0;t.setBorder(dn.default.EDGE_TOP,r),t.setBorder(dn.default.EDGE_BOTTOM,r),t.setBorder(dn.default.EDGE_LEFT,r),t.setBorder(dn.default.EDGE_RIGHT,r)}};uB.default=(t,e={})=>{eEt(t,e),tEt(t,e),rEt(t,e),nEt(t,e),iEt(t,e),sEt(t,e),oEt(t,e)}});var WEe=_((xKt,YEe)=>{"use strict";var AB=Kk(),aEt=NP(),lEt=DI(),M6=new Set(["\x1B","\x9B"]),cEt=39,jEe=t=>`${M6.values().next().value}[${t}m`,uEt=t=>t.split(" ").map(e=>AB(e)),O6=(t,e,r)=>{let o=[...e],a=!1,n=AB(aEt(t[t.length-1]));for(let[u,A]of o.entries()){let p=AB(A);if(n+p<=r?t[t.length-1]+=A:(t.push(A),n=0),M6.has(A))a=!0;else if(a&&A==="m"){a=!1;continue}a||(n+=p,n===r&&u0&&t.length>1&&(t[t.length-2]+=t.pop())},AEt=t=>{let e=t.split(" "),r=e.length;for(;r>0&&!(AB(e[r-1])>0);)r--;return r===e.length?t:e.slice(0,r).join(" ")+e.slice(r).join("")},fEt=(t,e,r={})=>{if(r.trim!==!1&&t.trim()==="")return"";let o="",a="",n,u=uEt(t),A=[""];for(let[p,h]of t.split(" ").entries()){r.trim!==!1&&(A[A.length-1]=A[A.length-1].trimLeft());let E=AB(A[A.length-1]);if(p!==0&&(E>=e&&(r.wordWrap===!1||r.trim===!1)&&(A.push(""),E=0),(E>0||r.trim===!1)&&(A[A.length-1]+=" ",E++)),r.hard&&u[p]>e){let I=e-E,v=1+Math.floor((u[p]-I-1)/e);Math.floor((u[p]-1)/e)e&&E>0&&u[p]>0){if(r.wordWrap===!1&&Ee&&r.wordWrap===!1){O6(A,h,e);continue}A[A.length-1]+=h}r.trim!==!1&&(A=A.map(AEt)),o=A.join(` `);for(let[p,h]of[...o].entries()){if(a+=h,M6.has(h)){let I=parseFloat(/\d[^m]*/.exec(o.slice(p,p+4)));n=I===cEt?null:I}let E=lEt.codes.get(Number(n));n&&E&&(o[p+1]===` `?a+=jEe(E):h===` `&&(a+=jEe(n)))}return a};YEe.exports=(t,e,r)=>String(t).normalize().replace(/\r\n/g,` `).split(` `).map(o=>fEt(o,e,r)).join(` `)});var VEe=_((kKt,zEe)=>{"use strict";var KEe="[\uD800-\uDBFF][\uDC00-\uDFFF]",pEt=t=>t&&t.exact?new RegExp(`^${KEe}$`):new RegExp(KEe,"g");zEe.exports=pEt});var U6=_((QKt,$Ee)=>{"use strict";var hEt=F6(),gEt=VEe(),JEe=DI(),ZEe=["\x1B","\x9B"],zk=t=>`${ZEe[0]}[${t}m`,XEe=(t,e,r)=>{let o=[];t=[...t];for(let a of t){let n=a;a.match(";")&&(a=a.split(";")[0][0]+"0");let u=JEe.codes.get(parseInt(a,10));if(u){let A=t.indexOf(u.toString());A>=0?t.splice(A,1):o.push(zk(e?u:n))}else if(e){o.push(zk(0));break}else o.push(zk(n))}if(e&&(o=o.filter((a,n)=>o.indexOf(a)===n),r!==void 0)){let a=zk(JEe.codes.get(parseInt(r,10)));o=o.reduce((n,u)=>u===a?[u,...n]:[...n,u],[])}return o.join("")};$Ee.exports=(t,e,r)=>{let o=[...t.normalize()],a=[];r=typeof r=="number"?r:o.length;let n=!1,u,A=0,p="";for(let[h,E]of o.entries()){let I=!1;if(ZEe.includes(E)){let v=/\d[^m]*/.exec(t.slice(h,h+18));u=v&&v.length>0?v[0]:void 0,Ae&&A<=r)p+=E;else if(A===e&&!n&&u!==void 0)p=XEe(a);else if(A>=r){p+=XEe(a,!0,u);break}}return p}});var tCe=_((FKt,eCe)=>{"use strict";var C0=U6(),dEt=Kk();function Vk(t,e,r){if(t.charAt(e)===" ")return e;for(let o=1;o<=3;o++)if(r){if(t.charAt(e+o)===" ")return e+o}else if(t.charAt(e-o)===" ")return e-o;return e}eCe.exports=(t,e,r)=>{r={position:"end",preferTruncationOnSpace:!1,...r};let{position:o,space:a,preferTruncationOnSpace:n}=r,u="\u2026",A=1;if(typeof t!="string")throw new TypeError(`Expected \`input\` to be a string, got ${typeof t}`);if(typeof e!="number")throw new TypeError(`Expected \`columns\` to be a number, got ${typeof e}`);if(e<1)return"";if(e===1)return u;let p=dEt(t);if(p<=e)return t;if(o==="start"){if(n){let h=Vk(t,p-e+1,!0);return u+C0(t,h,p).trim()}return a===!0&&(u+=" ",A=2),u+C0(t,p-e+A,p)}if(o==="middle"){a===!0&&(u=" "+u+" ",A=3);let h=Math.floor(e/2);if(n){let E=Vk(t,h),I=Vk(t,p-(e-h)+1,!0);return C0(t,0,E)+u+C0(t,I,p).trim()}return C0(t,0,h)+u+C0(t,p-(e-h)+A,p)}if(o==="end"){if(n){let h=Vk(t,e-1);return C0(t,0,h)+u}return a===!0&&(u=" "+u,A=2),C0(t,0,e-A)+u}throw new Error(`Expected \`options.position\` to be either \`start\`, \`middle\` or \`end\`, got ${o}`)}});var H6=_(fB=>{"use strict";var rCe=fB&&fB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(fB,"__esModule",{value:!0});var mEt=rCe(WEe()),yEt=rCe(tCe()),_6={};fB.default=(t,e,r)=>{let o=t+String(e)+String(r);if(_6[o])return _6[o];let a=t;if(r==="wrap"&&(a=mEt.default(t,e,{trim:!1,hard:!0})),r.startsWith("truncate")){let n="end";r==="truncate-middle"&&(n="middle"),r==="truncate-start"&&(n="start"),a=yEt.default(t,e,{position:n})}return _6[o]=a,a}});var G6=_(q6=>{"use strict";Object.defineProperty(q6,"__esModule",{value:!0});var nCe=t=>{let e="";if(t.childNodes.length>0)for(let r of t.childNodes){let o="";r.nodeName==="#text"?o=r.nodeValue:((r.nodeName==="ink-text"||r.nodeName==="ink-virtual-text")&&(o=nCe(r)),o.length>0&&typeof r.internal_transform=="function"&&(o=r.internal_transform(o))),e+=o}return e};q6.default=nCe});var j6=_(pi=>{"use strict";var pB=pi&&pi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(pi,"__esModule",{value:!0});pi.setTextNodeValue=pi.createTextNode=pi.setStyle=pi.setAttribute=pi.removeChildNode=pi.insertBeforeNode=pi.appendChildNode=pi.createNode=pi.TEXT_NAME=void 0;var EEt=pB(lm()),iCe=pB(qEe()),CEt=pB(GEe()),wEt=pB(H6()),IEt=pB(G6());pi.TEXT_NAME="#text";pi.createNode=t=>{var e;let r={nodeName:t,style:{},attributes:{},childNodes:[],parentNode:null,yogaNode:t==="ink-virtual-text"?void 0:EEt.default.Node.create()};return t==="ink-text"&&((e=r.yogaNode)===null||e===void 0||e.setMeasureFunc(BEt.bind(null,r))),r};pi.appendChildNode=(t,e)=>{var r;e.parentNode&&pi.removeChildNode(e.parentNode,e),e.parentNode=t,t.childNodes.push(e),e.yogaNode&&((r=t.yogaNode)===null||r===void 0||r.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&Jk(t)};pi.insertBeforeNode=(t,e,r)=>{var o,a;e.parentNode&&pi.removeChildNode(e.parentNode,e),e.parentNode=t;let n=t.childNodes.indexOf(r);if(n>=0){t.childNodes.splice(n,0,e),e.yogaNode&&((o=t.yogaNode)===null||o===void 0||o.insertChild(e.yogaNode,n));return}t.childNodes.push(e),e.yogaNode&&((a=t.yogaNode)===null||a===void 0||a.insertChild(e.yogaNode,t.yogaNode.getChildCount())),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&Jk(t)};pi.removeChildNode=(t,e)=>{var r,o;e.yogaNode&&((o=(r=e.parentNode)===null||r===void 0?void 0:r.yogaNode)===null||o===void 0||o.removeChild(e.yogaNode)),e.parentNode=null;let a=t.childNodes.indexOf(e);a>=0&&t.childNodes.splice(a,1),(t.nodeName==="ink-text"||t.nodeName==="ink-virtual-text")&&Jk(t)};pi.setAttribute=(t,e,r)=>{t.attributes[e]=r};pi.setStyle=(t,e)=>{t.style=e,t.yogaNode&&CEt.default(t.yogaNode,e)};pi.createTextNode=t=>{let e={nodeName:"#text",nodeValue:t,yogaNode:void 0,parentNode:null,style:{}};return pi.setTextNodeValue(e,t),e};var BEt=function(t,e){var r,o;let a=t.nodeName==="#text"?t.nodeValue:IEt.default(t),n=iCe.default(a);if(n.width<=e||n.width>=1&&e>0&&e<1)return n;let u=(o=(r=t.style)===null||r===void 0?void 0:r.textWrap)!==null&&o!==void 0?o:"wrap",A=wEt.default(a,e,u);return iCe.default(A)},sCe=t=>{var e;if(!(!t||!t.parentNode))return(e=t.yogaNode)!==null&&e!==void 0?e:sCe(t.parentNode)},Jk=t=>{let e=sCe(t);e?.markDirty()};pi.setTextNodeValue=(t,e)=>{typeof e!="string"&&(e=String(e)),t.nodeValue=e,Jk(t)}});var uCe=_(hB=>{"use strict";var cCe=hB&&hB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(hB,"__esModule",{value:!0});var oCe=P6(),vEt=cCe(bEe()),aCe=cCe(lm()),Oo=j6(),lCe=t=>{t?.unsetMeasureFunc(),t?.freeRecursive()};hB.default=vEt.default({schedulePassiveEffects:oCe.unstable_scheduleCallback,cancelPassiveEffects:oCe.unstable_cancelCallback,now:Date.now,getRootHostContext:()=>({isInsideText:!1}),prepareForCommit:()=>{},resetAfterCommit:t=>{if(t.isStaticDirty){t.isStaticDirty=!1,typeof t.onImmediateRender=="function"&&t.onImmediateRender();return}typeof t.onRender=="function"&&t.onRender()},getChildHostContext:(t,e)=>{let r=t.isInsideText,o=e==="ink-text"||e==="ink-virtual-text";return r===o?t:{isInsideText:o}},shouldSetTextContent:()=>!1,createInstance:(t,e,r,o)=>{if(o.isInsideText&&t==="ink-box")throw new Error(" can\u2019t be nested inside component");let a=t==="ink-text"&&o.isInsideText?"ink-virtual-text":t,n=Oo.createNode(a);for(let[u,A]of Object.entries(e))u!=="children"&&(u==="style"?Oo.setStyle(n,A):u==="internal_transform"?n.internal_transform=A:u==="internal_static"?n.internal_static=!0:Oo.setAttribute(n,u,A));return n},createTextInstance:(t,e,r)=>{if(!r.isInsideText)throw new Error(`Text string "${t}" must be rendered inside component`);return Oo.createTextNode(t)},resetTextContent:()=>{},hideTextInstance:t=>{Oo.setTextNodeValue(t,"")},unhideTextInstance:(t,e)=>{Oo.setTextNodeValue(t,e)},getPublicInstance:t=>t,hideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(aCe.default.DISPLAY_NONE)},unhideInstance:t=>{var e;(e=t.yogaNode)===null||e===void 0||e.setDisplay(aCe.default.DISPLAY_FLEX)},appendInitialChild:Oo.appendChildNode,appendChild:Oo.appendChildNode,insertBefore:Oo.insertBeforeNode,finalizeInitialChildren:(t,e,r,o)=>(t.internal_static&&(o.isStaticDirty=!0,o.staticNode=t),!1),supportsMutation:!0,appendChildToContainer:Oo.appendChildNode,insertInContainerBefore:Oo.insertBeforeNode,removeChildFromContainer:(t,e)=>{Oo.removeChildNode(t,e),lCe(e.yogaNode)},prepareUpdate:(t,e,r,o,a)=>{t.internal_static&&(a.isStaticDirty=!0);let n={},u=Object.keys(o);for(let A of u)if(o[A]!==r[A]){if(A==="style"&&typeof o.style=="object"&&typeof r.style=="object"){let h=o.style,E=r.style,I=Object.keys(h);for(let v of I){if(v==="borderStyle"||v==="borderColor"){if(typeof n.style!="object"){let x={};n.style=x}n.style.borderStyle=h.borderStyle,n.style.borderColor=h.borderColor}if(h[v]!==E[v]){if(typeof n.style!="object"){let x={};n.style=x}n.style[v]=h[v]}}continue}n[A]=o[A]}return n},commitUpdate:(t,e)=>{for(let[r,o]of Object.entries(e))r!=="children"&&(r==="style"?Oo.setStyle(t,o):r==="internal_transform"?t.internal_transform=o:r==="internal_static"?t.internal_static=!0:Oo.setAttribute(t,r,o))},commitTextUpdate:(t,e,r)=>{Oo.setTextNodeValue(t,r)},removeChild:(t,e)=>{Oo.removeChildNode(t,e),lCe(e.yogaNode)}})});var fCe=_((OKt,ACe)=>{"use strict";ACe.exports=(t,e=1,r)=>{if(r={indent:" ",includeEmptyLines:!1,...r},typeof t!="string")throw new TypeError(`Expected \`input\` to be a \`string\`, got \`${typeof t}\``);if(typeof e!="number")throw new TypeError(`Expected \`count\` to be a \`number\`, got \`${typeof e}\``);if(typeof r.indent!="string")throw new TypeError(`Expected \`options.indent\` to be a \`string\`, got \`${typeof r.indent}\``);if(e===0)return t;let o=r.includeEmptyLines?/^/gm:/^(?!\s*$)/gm;return t.replace(o,r.indent.repeat(e))}});var pCe=_(gB=>{"use strict";var DEt=gB&&gB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(gB,"__esModule",{value:!0});var Xk=DEt(lm());gB.default=t=>t.getComputedWidth()-t.getComputedPadding(Xk.default.EDGE_LEFT)-t.getComputedPadding(Xk.default.EDGE_RIGHT)-t.getComputedBorder(Xk.default.EDGE_LEFT)-t.getComputedBorder(Xk.default.EDGE_RIGHT)});var hCe=_((UKt,PEt)=>{PEt.exports={single:{topLeft:"\u250C",topRight:"\u2510",bottomRight:"\u2518",bottomLeft:"\u2514",vertical:"\u2502",horizontal:"\u2500"},double:{topLeft:"\u2554",topRight:"\u2557",bottomRight:"\u255D",bottomLeft:"\u255A",vertical:"\u2551",horizontal:"\u2550"},round:{topLeft:"\u256D",topRight:"\u256E",bottomRight:"\u256F",bottomLeft:"\u2570",vertical:"\u2502",horizontal:"\u2500"},bold:{topLeft:"\u250F",topRight:"\u2513",bottomRight:"\u251B",bottomLeft:"\u2517",vertical:"\u2503",horizontal:"\u2501"},singleDouble:{topLeft:"\u2553",topRight:"\u2556",bottomRight:"\u255C",bottomLeft:"\u2559",vertical:"\u2551",horizontal:"\u2500"},doubleSingle:{topLeft:"\u2552",topRight:"\u2555",bottomRight:"\u255B",bottomLeft:"\u2558",vertical:"\u2502",horizontal:"\u2550"},classic:{topLeft:"+",topRight:"+",bottomRight:"+",bottomLeft:"+",vertical:"|",horizontal:"-"}}});var dCe=_((_Kt,Y6)=>{"use strict";var gCe=hCe();Y6.exports=gCe;Y6.exports.default=gCe});var yCe=_((HKt,mCe)=>{"use strict";var SEt=(t,e,r)=>{let o=t.indexOf(e);if(o===-1)return t;let a=e.length,n=0,u="";do u+=t.substr(n,o-n)+e+r,n=o+a,o=t.indexOf(e,n);while(o!==-1);return u+=t.substr(n),u},bEt=(t,e,r,o)=>{let a=0,n="";do{let u=t[o-1]==="\r";n+=t.substr(a,(u?o-1:o)-a)+e+(u?`\r `:` `)+r,a=o+1,o=t.indexOf(` `,a)}while(o!==-1);return n+=t.substr(a),n};mCe.exports={stringReplaceAll:SEt,stringEncaseCRLFWithFirstIndex:bEt}});var BCe=_((qKt,ICe)=>{"use strict";var xEt=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ECe=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,kEt=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,QEt=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,FEt=new Map([["n",` `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function wCe(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):FEt.get(t)||t}function REt(t,e){let r=[],o=e.trim().split(/\s*,\s*/g),a;for(let n of o){let u=Number(n);if(!Number.isNaN(u))r.push(u);else if(a=n.match(kEt))r.push(a[2].replace(QEt,(A,p,h)=>p?wCe(p):h));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function TEt(t){ECe.lastIndex=0;let e=[],r;for(;(r=ECe.exec(t))!==null;){let o=r[1];if(r[2]){let a=REt(o,r[2]);e.push([o].concat(a))}else e.push([o])}return e}function CCe(t,e){let r={};for(let a of e)for(let n of a.styles)r[n[0]]=a.inverse?null:n.slice(1);let o=t;for(let[a,n]of Object.entries(r))if(!!Array.isArray(n)){if(!(a in o))throw new Error(`Unknown Chalk style: ${a}`);o=n.length>0?o[a](...n):o[a]}return o}ICe.exports=(t,e)=>{let r=[],o=[],a=[];if(e.replace(xEt,(n,u,A,p,h,E)=>{if(u)a.push(wCe(u));else if(p){let I=a.join("");a=[],o.push(r.length===0?I:CCe(t,r)(I)),r.push({inverse:A,styles:TEt(p)})}else if(h){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");o.push(CCe(t,r)(a.join(""))),a=[],r.pop()}else a.push(E)}),o.push(a.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return o.join("")}});var rQ=_((GKt,xCe)=>{"use strict";var dB=DI(),{stdout:K6,stderr:z6}=dL(),{stringReplaceAll:LEt,stringEncaseCRLFWithFirstIndex:NEt}=yCe(),{isArray:Zk}=Array,DCe=["ansi","ansi","ansi256","ansi16m"],HC=Object.create(null),OEt=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=K6?K6.level:0;t.level=e.level===void 0?r:e.level},V6=class{constructor(e){return PCe(e)}},PCe=t=>{let e={};return OEt(e,t),e.template=(...r)=>bCe(e.template,...r),Object.setPrototypeOf(e,$k.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=V6,e.template};function $k(t){return PCe(t)}for(let[t,e]of Object.entries(dB))HC[t]={get(){let r=eQ(this,J6(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};HC.visible={get(){let t=eQ(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var SCe=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of SCe)HC[t]={get(){let{level:e}=this;return function(...r){let o=J6(dB.color[DCe[e]][t](...r),dB.color.close,this._styler);return eQ(this,o,this._isEmpty)}}};for(let t of SCe){let e="bg"+t[0].toUpperCase()+t.slice(1);HC[e]={get(){let{level:r}=this;return function(...o){let a=J6(dB.bgColor[DCe[r]][t](...o),dB.bgColor.close,this._styler);return eQ(this,a,this._isEmpty)}}}}var MEt=Object.defineProperties(()=>{},{...HC,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t}}}),J6=(t,e,r)=>{let o,a;return r===void 0?(o=t,a=e):(o=r.openAll+t,a=e+r.closeAll),{open:t,close:e,openAll:o,closeAll:a,parent:r}},eQ=(t,e,r)=>{let o=(...a)=>Zk(a[0])&&Zk(a[0].raw)?vCe(o,bCe(o,...a)):vCe(o,a.length===1?""+a[0]:a.join(" "));return Object.setPrototypeOf(o,MEt),o._generator=t,o._styler=e,o._isEmpty=r,o},vCe=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:o,closeAll:a}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=LEt(e,r.close,r.open),r=r.parent;let n=e.indexOf(` `);return n!==-1&&(e=NEt(e,a,o,n)),o+e+a},W6,bCe=(t,...e)=>{let[r]=e;if(!Zk(r)||!Zk(r.raw))return e.join(" ");let o=e.slice(1),a=[r.raw[0]];for(let n=1;n{"use strict";var UEt=yB&&yB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(yB,"__esModule",{value:!0});var mB=UEt(rQ()),_Et=/^(rgb|hsl|hsv|hwb)\(\s?(\d+),\s?(\d+),\s?(\d+)\s?\)$/,HEt=/^(ansi|ansi256)\(\s?(\d+)\s?\)$/,nQ=(t,e)=>e==="foreground"?t:"bg"+t[0].toUpperCase()+t.slice(1);yB.default=(t,e,r)=>{if(!e)return t;if(e in mB.default){let a=nQ(e,r);return mB.default[a](t)}if(e.startsWith("#")){let a=nQ("hex",r);return mB.default[a](e)(t)}if(e.startsWith("ansi")){let a=HEt.exec(e);if(!a)return t;let n=nQ(a[1],r),u=Number(a[2]);return mB.default[n](u)(t)}if(e.startsWith("rgb")||e.startsWith("hsl")||e.startsWith("hsv")||e.startsWith("hwb")){let a=_Et.exec(e);if(!a)return t;let n=nQ(a[1],r),u=Number(a[2]),A=Number(a[3]),p=Number(a[4]);return mB.default[n](u,A,p)(t)}return t}});var QCe=_(EB=>{"use strict";var kCe=EB&&EB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(EB,"__esModule",{value:!0});var qEt=kCe(dCe()),Z6=kCe(X6());EB.default=(t,e,r,o)=>{if(typeof r.style.borderStyle=="string"){let a=r.yogaNode.getComputedWidth(),n=r.yogaNode.getComputedHeight(),u=r.style.borderColor,A=qEt.default[r.style.borderStyle],p=Z6.default(A.topLeft+A.horizontal.repeat(a-2)+A.topRight,u,"foreground"),h=(Z6.default(A.vertical,u,"foreground")+` `).repeat(n-2),E=Z6.default(A.bottomLeft+A.horizontal.repeat(a-2)+A.bottomRight,u,"foreground");o.write(t,e,p,{transformers:[]}),o.write(t,e+1,h,{transformers:[]}),o.write(t+a-1,e+1,h,{transformers:[]}),o.write(t,e+n-1,E,{transformers:[]})}}});var RCe=_(CB=>{"use strict";var cm=CB&&CB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(CB,"__esModule",{value:!0});var GEt=cm(lm()),jEt=cm(L6()),YEt=cm(fCe()),WEt=cm(H6()),KEt=cm(pCe()),zEt=cm(G6()),VEt=cm(QCe()),JEt=(t,e)=>{var r;let o=(r=t.childNodes[0])===null||r===void 0?void 0:r.yogaNode;if(o){let a=o.getComputedLeft(),n=o.getComputedTop();e=` `.repeat(n)+YEt.default(e,a)}return e},FCe=(t,e,r)=>{var o;let{offsetX:a=0,offsetY:n=0,transformers:u=[],skipStaticElements:A}=r;if(A&&t.internal_static)return;let{yogaNode:p}=t;if(p){if(p.getDisplay()===GEt.default.DISPLAY_NONE)return;let h=a+p.getComputedLeft(),E=n+p.getComputedTop(),I=u;if(typeof t.internal_transform=="function"&&(I=[t.internal_transform,...u]),t.nodeName==="ink-text"){let v=zEt.default(t);if(v.length>0){let x=jEt.default(v),C=KEt.default(p);if(x>C){let R=(o=t.style.textWrap)!==null&&o!==void 0?o:"wrap";v=WEt.default(v,C,R)}v=JEt(t,v),e.write(h,E,v,{transformers:I})}return}if(t.nodeName==="ink-box"&&VEt.default(h,E,t,e),t.nodeName==="ink-root"||t.nodeName==="ink-box")for(let v of t.childNodes)FCe(v,e,{offsetX:h,offsetY:E,transformers:I,skipStaticElements:A})}};CB.default=FCe});var LCe=_((KKt,TCe)=>{"use strict";TCe.exports=t=>{t=Object.assign({onlyFirst:!1},t);let e=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:[a-zA-Z\\d]*(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(e,t.onlyFirst?void 0:"g")}});var OCe=_((zKt,$6)=>{"use strict";var XEt=LCe(),NCe=t=>typeof t=="string"?t.replace(XEt(),""):t;$6.exports=NCe;$6.exports.default=NCe});var _Ce=_((VKt,UCe)=>{"use strict";var MCe="[\uD800-\uDBFF][\uDC00-\uDFFF]";UCe.exports=t=>t&&t.exact?new RegExp(`^${MCe}$`):new RegExp(MCe,"g")});var qCe=_((JKt,eq)=>{"use strict";var ZEt=OCe(),$Et=_Ce(),HCe=t=>ZEt(t).replace($Et()," ").length;eq.exports=HCe;eq.exports.default=HCe});var YCe=_(wB=>{"use strict";var jCe=wB&&wB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wB,"__esModule",{value:!0});var GCe=jCe(U6()),eCt=jCe(qCe()),tq=class{constructor(e){this.writes=[];let{width:r,height:o}=e;this.width=r,this.height=o}write(e,r,o,a){let{transformers:n}=a;!o||this.writes.push({x:e,y:r,text:o,transformers:n})}get(){let e=[];for(let o=0;oo.trimRight()).join(` `),height:e.length}}};wB.default=tq});var zCe=_(IB=>{"use strict";var rq=IB&&IB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(IB,"__esModule",{value:!0});var tCt=rq(lm()),WCe=rq(RCe()),KCe=rq(YCe());IB.default=(t,e)=>{var r;if(t.yogaNode.setWidth(e),t.yogaNode){t.yogaNode.calculateLayout(void 0,void 0,tCt.default.DIRECTION_LTR);let o=new KCe.default({width:t.yogaNode.getComputedWidth(),height:t.yogaNode.getComputedHeight()});WCe.default(t,o,{skipStaticElements:!0});let a;!((r=t.staticNode)===null||r===void 0)&&r.yogaNode&&(a=new KCe.default({width:t.staticNode.yogaNode.getComputedWidth(),height:t.staticNode.yogaNode.getComputedHeight()}),WCe.default(t.staticNode,a,{skipStaticElements:!1}));let{output:n,height:u}=o.get();return{output:n,outputHeight:u,staticOutput:a?`${a.get().output} `:""}}return{output:"",outputHeight:0,staticOutput:""}}});var ZCe=_(($Kt,XCe)=>{"use strict";var VCe=ve("stream"),JCe=["assert","count","countReset","debug","dir","dirxml","error","group","groupCollapsed","groupEnd","info","log","table","time","timeEnd","timeLog","trace","warn"],nq={},rCt=t=>{let e=new VCe.PassThrough,r=new VCe.PassThrough;e.write=a=>t("stdout",a),r.write=a=>t("stderr",a);let o=new console.Console(e,r);for(let a of JCe)nq[a]=console[a],console[a]=o[a];return()=>{for(let a of JCe)console[a]=nq[a];nq={}}};XCe.exports=rCt});var sq=_(iq=>{"use strict";Object.defineProperty(iq,"__esModule",{value:!0});iq.default=new WeakMap});var aq=_(oq=>{"use strict";Object.defineProperty(oq,"__esModule",{value:!0});var nCt=on(),$Ce=nCt.createContext({exit:()=>{}});$Ce.displayName="InternalAppContext";oq.default=$Ce});var cq=_(lq=>{"use strict";Object.defineProperty(lq,"__esModule",{value:!0});var iCt=on(),ewe=iCt.createContext({stdin:void 0,setRawMode:()=>{},isRawModeSupported:!1,internal_exitOnCtrlC:!0});ewe.displayName="InternalStdinContext";lq.default=ewe});var Aq=_(uq=>{"use strict";Object.defineProperty(uq,"__esModule",{value:!0});var sCt=on(),twe=sCt.createContext({stdout:void 0,write:()=>{}});twe.displayName="InternalStdoutContext";uq.default=twe});var pq=_(fq=>{"use strict";Object.defineProperty(fq,"__esModule",{value:!0});var oCt=on(),rwe=oCt.createContext({stderr:void 0,write:()=>{}});rwe.displayName="InternalStderrContext";fq.default=rwe});var iQ=_(hq=>{"use strict";Object.defineProperty(hq,"__esModule",{value:!0});var aCt=on(),nwe=aCt.createContext({activeId:void 0,add:()=>{},remove:()=>{},activate:()=>{},deactivate:()=>{},enableFocus:()=>{},disableFocus:()=>{},focusNext:()=>{},focusPrevious:()=>{}});nwe.displayName="InternalFocusContext";hq.default=nwe});var swe=_((ozt,iwe)=>{"use strict";var lCt=/[|\\{}()[\]^$+*?.-]/g;iwe.exports=t=>{if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(lCt,"\\$&")}});var cwe=_((azt,lwe)=>{"use strict";var cCt=swe(),uCt=typeof process=="object"&&process&&typeof process.cwd=="function"?process.cwd():".",awe=[].concat(ve("module").builtinModules,"bootstrap_node","node").map(t=>new RegExp(`(?:\\((?:node:)?${t}(?:\\.js)?:\\d+:\\d+\\)$|^\\s*at (?:node:)?${t}(?:\\.js)?:\\d+:\\d+$)`));awe.push(/\((?:node:)?internal\/[^:]+:\d+:\d+\)$/,/\s*at (?:node:)?internal\/[^:]+:\d+:\d+$/,/\/\.node-spawn-wrap-\w+-\w+\/node:\d+:\d+\)?$/);var BB=class{constructor(e){e={ignoredPackages:[],...e},"internals"in e||(e.internals=BB.nodeInternals()),"cwd"in e||(e.cwd=uCt),this._cwd=e.cwd.replace(/\\/g,"/"),this._internals=[].concat(e.internals,ACt(e.ignoredPackages)),this._wrapCallSite=e.wrapCallSite||!1}static nodeInternals(){return[...awe]}clean(e,r=0){r=" ".repeat(r),Array.isArray(e)||(e=e.split(` `)),!/^\s*at /.test(e[0])&&/^\s*at /.test(e[1])&&(e=e.slice(1));let o=!1,a=null,n=[];return e.forEach(u=>{if(u=u.replace(/\\/g,"/"),this._internals.some(p=>p.test(u)))return;let A=/^\s*at /.test(u);o?u=u.trimEnd().replace(/^(\s+)at /,"$1"):(u=u.trim(),A&&(u=u.slice(3))),u=u.replace(`${this._cwd}/`,""),u&&(A?(a&&(n.push(a),a=null),n.push(u)):(o=!0,a=u))}),n.map(u=>`${r}${u} `).join("")}captureString(e,r=this.captureString){typeof e=="function"&&(r=e,e=1/0);let{stackTraceLimit:o}=Error;e&&(Error.stackTraceLimit=e);let a={};Error.captureStackTrace(a,r);let{stack:n}=a;return Error.stackTraceLimit=o,this.clean(n)}capture(e,r=this.capture){typeof e=="function"&&(r=e,e=1/0);let{prepareStackTrace:o,stackTraceLimit:a}=Error;Error.prepareStackTrace=(A,p)=>this._wrapCallSite?p.map(this._wrapCallSite):p,e&&(Error.stackTraceLimit=e);let n={};Error.captureStackTrace(n,r);let{stack:u}=n;return Object.assign(Error,{prepareStackTrace:o,stackTraceLimit:a}),u}at(e=this.at){let[r]=this.capture(1,e);if(!r)return{};let o={line:r.getLineNumber(),column:r.getColumnNumber()};owe(o,r.getFileName(),this._cwd),r.isConstructor()&&(o.constructor=!0),r.isEval()&&(o.evalOrigin=r.getEvalOrigin()),r.isNative()&&(o.native=!0);let a;try{a=r.getTypeName()}catch{}a&&a!=="Object"&&a!=="[object Object]"&&(o.type=a);let n=r.getFunctionName();n&&(o.function=n);let u=r.getMethodName();return u&&n!==u&&(o.method=u),o}parseLine(e){let r=e&&e.match(fCt);if(!r)return null;let o=r[1]==="new",a=r[2],n=r[3],u=r[4],A=Number(r[5]),p=Number(r[6]),h=r[7],E=r[8],I=r[9],v=r[10]==="native",x=r[11]===")",C,R={};if(E&&(R.line=Number(E)),I&&(R.column=Number(I)),x&&h){let N=0;for(let U=h.length-1;U>0;U--)if(h.charAt(U)===")")N++;else if(h.charAt(U)==="("&&h.charAt(U-1)===" "&&(N--,N===-1&&h.charAt(U-1)===" ")){let V=h.slice(0,U-1);h=h.slice(U+1),a+=` (${V}`;break}}if(a){let N=a.match(pCt);N&&(a=N[1],C=N[2])}return owe(R,h,this._cwd),o&&(R.constructor=!0),n&&(R.evalOrigin=n,R.evalLine=A,R.evalColumn=p,R.evalFile=u&&u.replace(/\\/g,"/")),v&&(R.native=!0),a&&(R.function=a),C&&a!==C&&(R.method=C),R}};function owe(t,e,r){e&&(e=e.replace(/\\/g,"/"),e.startsWith(`${r}/`)&&(e=e.slice(r.length+1)),t.file=e)}function ACt(t){if(t.length===0)return[];let e=t.map(r=>cCt(r));return new RegExp(`[/\\\\]node_modules[/\\\\](?:${e.join("|")})[/\\\\][^:]+:\\d+:\\d+`)}var fCt=new RegExp("^(?:\\s*at )?(?:(new) )?(?:(.*?) \\()?(?:eval at ([^ ]+) \\((.+?):(\\d+):(\\d+)\\), )?(?:(.+?):(\\d+):(\\d+)|(native))(\\)?)$"),pCt=/^(.*?) \[as (.*?)\]$/;lwe.exports=BB});var Awe=_((lzt,uwe)=>{"use strict";uwe.exports=(t,e)=>t.replace(/^\t+/gm,r=>" ".repeat(r.length*(e||2)))});var pwe=_((czt,fwe)=>{"use strict";var hCt=Awe(),gCt=(t,e)=>{let r=[],o=t-e,a=t+e;for(let n=o;n<=a;n++)r.push(n);return r};fwe.exports=(t,e,r)=>{if(typeof t!="string")throw new TypeError("Source code is missing.");if(!e||e<1)throw new TypeError("Line number must start from `1`.");if(t=hCt(t).split(/\r?\n/),!(e>t.length))return r={around:3,...r},gCt(e,r.around).filter(o=>t[o-1]!==void 0).map(o=>({line:o,value:t[o-1]}))}});var sQ=_(nu=>{"use strict";var dCt=nu&&nu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),mCt=nu&&nu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),yCt=nu&&nu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&dCt(e,t,r);return mCt(e,t),e},ECt=nu&&nu.__rest||function(t,e){var r={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&e.indexOf(o)<0&&(r[o]=t[o]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,o=Object.getOwnPropertySymbols(t);a{var{children:r}=t,o=ECt(t,["children"]);let a=Object.assign(Object.assign({},o),{marginLeft:o.marginLeft||o.marginX||o.margin||0,marginRight:o.marginRight||o.marginX||o.margin||0,marginTop:o.marginTop||o.marginY||o.margin||0,marginBottom:o.marginBottom||o.marginY||o.margin||0,paddingLeft:o.paddingLeft||o.paddingX||o.padding||0,paddingRight:o.paddingRight||o.paddingX||o.padding||0,paddingTop:o.paddingTop||o.paddingY||o.padding||0,paddingBottom:o.paddingBottom||o.paddingY||o.padding||0});return hwe.default.createElement("ink-box",{ref:e,style:a},r)});gq.displayName="Box";gq.defaultProps={flexDirection:"row",flexGrow:0,flexShrink:1};nu.default=gq});var yq=_(vB=>{"use strict";var dq=vB&&vB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(vB,"__esModule",{value:!0});var CCt=dq(on()),qC=dq(rQ()),gwe=dq(X6()),mq=({color:t,backgroundColor:e,dimColor:r,bold:o,italic:a,underline:n,strikethrough:u,inverse:A,wrap:p,children:h})=>{if(h==null)return null;let E=I=>(r&&(I=qC.default.dim(I)),t&&(I=gwe.default(I,t,"foreground")),e&&(I=gwe.default(I,e,"background")),o&&(I=qC.default.bold(I)),a&&(I=qC.default.italic(I)),n&&(I=qC.default.underline(I)),u&&(I=qC.default.strikethrough(I)),A&&(I=qC.default.inverse(I)),I);return CCt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row",textWrap:p},internal_transform:E},h)};mq.displayName="Text";mq.defaultProps={dimColor:!1,bold:!1,italic:!1,underline:!1,strikethrough:!1,wrap:"wrap"};vB.default=mq});var Ewe=_(iu=>{"use strict";var wCt=iu&&iu.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),ICt=iu&&iu.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),BCt=iu&&iu.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&wCt(e,t,r);return ICt(e,t),e},DB=iu&&iu.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(iu,"__esModule",{value:!0});var dwe=BCt(ve("fs")),fs=DB(on()),mwe=DB(cwe()),vCt=DB(pwe()),Zf=DB(sQ()),gA=DB(yq()),ywe=new mwe.default({cwd:process.cwd(),internals:mwe.default.nodeInternals()}),DCt=({error:t})=>{let e=t.stack?t.stack.split(` `).slice(1):void 0,r=e?ywe.parseLine(e[0]):void 0,o,a=0;if(r?.file&&r?.line&&dwe.existsSync(r.file)){let n=dwe.readFileSync(r.file,"utf8");if(o=vCt.default(n,r.line),o)for(let{line:u}of o)a=Math.max(a,String(u).length)}return fs.default.createElement(Zf.default,{flexDirection:"column",padding:1},fs.default.createElement(Zf.default,null,fs.default.createElement(gA.default,{backgroundColor:"red",color:"white"}," ","ERROR"," "),fs.default.createElement(gA.default,null," ",t.message)),r&&fs.default.createElement(Zf.default,{marginTop:1},fs.default.createElement(gA.default,{dimColor:!0},r.file,":",r.line,":",r.column)),r&&o&&fs.default.createElement(Zf.default,{marginTop:1,flexDirection:"column"},o.map(({line:n,value:u})=>fs.default.createElement(Zf.default,{key:n},fs.default.createElement(Zf.default,{width:a+1},fs.default.createElement(gA.default,{dimColor:n!==r.line,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0},String(n).padStart(a," "),":")),fs.default.createElement(gA.default,{key:n,backgroundColor:n===r.line?"red":void 0,color:n===r.line?"white":void 0}," "+u)))),t.stack&&fs.default.createElement(Zf.default,{marginTop:1,flexDirection:"column"},t.stack.split(` `).slice(1).map(n=>{let u=ywe.parseLine(n);return u?fs.default.createElement(Zf.default,{key:n},fs.default.createElement(gA.default,{dimColor:!0},"- "),fs.default.createElement(gA.default,{dimColor:!0,bold:!0},u.function),fs.default.createElement(gA.default,{dimColor:!0,color:"gray"}," ","(",u.file,":",u.line,":",u.column,")")):fs.default.createElement(Zf.default,{key:n},fs.default.createElement(gA.default,{dimColor:!0},"- "),fs.default.createElement(gA.default,{dimColor:!0,bold:!0},n))})))};iu.default=DCt});var wwe=_(su=>{"use strict";var PCt=su&&su.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),SCt=su&&su.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),bCt=su&&su.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&PCt(e,t,r);return SCt(e,t),e},Am=su&&su.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(su,"__esModule",{value:!0});var um=bCt(on()),Cwe=Am(g6()),xCt=Am(aq()),kCt=Am(cq()),QCt=Am(Aq()),FCt=Am(pq()),RCt=Am(iQ()),TCt=Am(Ewe()),LCt=" ",NCt="\x1B[Z",OCt="\x1B",oQ=class extends um.PureComponent{constructor(){super(...arguments),this.state={isFocusEnabled:!0,activeFocusId:void 0,focusables:[],error:void 0},this.rawModeEnabledCount=0,this.handleSetRawMode=e=>{let{stdin:r}=this.props;if(!this.isRawModeSupported())throw r===process.stdin?new Error(`Raw mode is not supported on the current process.stdin, which Ink uses as input stream by default. Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`):new Error(`Raw mode is not supported on the stdin provided to Ink. Read about how to prevent this error on https://github.com/vadimdemedes/ink/#israwmodesupported`);if(r.setEncoding("utf8"),e){this.rawModeEnabledCount===0&&(r.addListener("data",this.handleInput),r.resume(),r.setRawMode(!0)),this.rawModeEnabledCount++;return}--this.rawModeEnabledCount===0&&(r.setRawMode(!1),r.removeListener("data",this.handleInput),r.pause())},this.handleInput=e=>{e===""&&this.props.exitOnCtrlC&&this.handleExit(),e===OCt&&this.state.activeFocusId&&this.setState({activeFocusId:void 0}),this.state.isFocusEnabled&&this.state.focusables.length>0&&(e===LCt&&this.focusNext(),e===NCt&&this.focusPrevious())},this.handleExit=e=>{this.isRawModeSupported()&&this.handleSetRawMode(!1),this.props.onExit(e)},this.enableFocus=()=>{this.setState({isFocusEnabled:!0})},this.disableFocus=()=>{this.setState({isFocusEnabled:!1})},this.focusNext=()=>{this.setState(e=>{let r=e.focusables[0].id;return{activeFocusId:this.findNextFocusable(e)||r}})},this.focusPrevious=()=>{this.setState(e=>{let r=e.focusables[e.focusables.length-1].id;return{activeFocusId:this.findPreviousFocusable(e)||r}})},this.addFocusable=(e,{autoFocus:r})=>{this.setState(o=>{let a=o.activeFocusId;return!a&&r&&(a=e),{activeFocusId:a,focusables:[...o.focusables,{id:e,isActive:!0}]}})},this.removeFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.filter(o=>o.id!==e)}))},this.activateFocusable=e=>{this.setState(r=>({focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!0})}))},this.deactivateFocusable=e=>{this.setState(r=>({activeFocusId:r.activeFocusId===e?void 0:r.activeFocusId,focusables:r.focusables.map(o=>o.id!==e?o:{id:e,isActive:!1})}))},this.findNextFocusable=e=>{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r+1;o{let r=e.focusables.findIndex(o=>o.id===e.activeFocusId);for(let o=r-1;o>=0;o--)if(e.focusables[o].isActive)return e.focusables[o].id}}static getDerivedStateFromError(e){return{error:e}}isRawModeSupported(){return this.props.stdin.isTTY}render(){return um.default.createElement(xCt.default.Provider,{value:{exit:this.handleExit}},um.default.createElement(kCt.default.Provider,{value:{stdin:this.props.stdin,setRawMode:this.handleSetRawMode,isRawModeSupported:this.isRawModeSupported(),internal_exitOnCtrlC:this.props.exitOnCtrlC}},um.default.createElement(QCt.default.Provider,{value:{stdout:this.props.stdout,write:this.props.writeToStdout}},um.default.createElement(FCt.default.Provider,{value:{stderr:this.props.stderr,write:this.props.writeToStderr}},um.default.createElement(RCt.default.Provider,{value:{activeId:this.state.activeFocusId,add:this.addFocusable,remove:this.removeFocusable,activate:this.activateFocusable,deactivate:this.deactivateFocusable,enableFocus:this.enableFocus,disableFocus:this.disableFocus,focusNext:this.focusNext,focusPrevious:this.focusPrevious}},this.state.error?um.default.createElement(TCt.default,{error:this.state.error}):this.props.children)))))}componentDidMount(){Cwe.default.hide(this.props.stdout)}componentWillUnmount(){Cwe.default.show(this.props.stdout),this.isRawModeSupported()&&this.handleSetRawMode(!1)}componentDidCatch(e){this.handleExit(e)}};su.default=oQ;oQ.displayName="InternalApp"});var vwe=_(ou=>{"use strict";var MCt=ou&&ou.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),UCt=ou&&ou.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),_Ct=ou&&ou.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&MCt(e,t,r);return UCt(e,t),e},au=ou&&ou.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(ou,"__esModule",{value:!0});var HCt=au(on()),Iwe=lM(),qCt=au(cEe()),GCt=au(u6()),jCt=au(gEe()),YCt=au(mEe()),Eq=au(uCe()),WCt=au(zCe()),KCt=au(h6()),zCt=au(ZCe()),VCt=_Ct(j6()),JCt=au(sq()),XCt=au(wwe()),GC=process.env.CI==="false"?!1:jCt.default,Bwe=()=>{},Cq=class{constructor(e){this.resolveExitPromise=()=>{},this.rejectExitPromise=()=>{},this.unsubscribeExit=()=>{},this.onRender=()=>{if(this.isUnmounted)return;let{output:r,outputHeight:o,staticOutput:a}=WCt.default(this.rootNode,this.options.stdout.columns||80),n=a&&a!==` `;if(this.options.debug){n&&(this.fullStaticOutput+=a),this.options.stdout.write(this.fullStaticOutput+r);return}if(GC){n&&this.options.stdout.write(a),this.lastOutput=r;return}if(n&&(this.fullStaticOutput+=a),o>=this.options.stdout.rows){this.options.stdout.write(GCt.default.clearTerminal+this.fullStaticOutput+r),this.lastOutput=r;return}n&&(this.log.clear(),this.options.stdout.write(a),this.log(r)),!n&&r!==this.lastOutput&&this.throttledLog(r),this.lastOutput=r},YCt.default(this),this.options=e,this.rootNode=VCt.createNode("ink-root"),this.rootNode.onRender=e.debug?this.onRender:Iwe(this.onRender,32,{leading:!0,trailing:!0}),this.rootNode.onImmediateRender=this.onRender,this.log=qCt.default.create(e.stdout),this.throttledLog=e.debug?this.log:Iwe(this.log,void 0,{leading:!0,trailing:!0}),this.isUnmounted=!1,this.lastOutput="",this.fullStaticOutput="",this.container=Eq.default.createContainer(this.rootNode,!1,!1),this.unsubscribeExit=KCt.default(this.unmount,{alwaysLast:!1}),e.patchConsole&&this.patchConsole(),GC||(e.stdout.on("resize",this.onRender),this.unsubscribeResize=()=>{e.stdout.off("resize",this.onRender)})}render(e){let r=HCt.default.createElement(XCt.default,{stdin:this.options.stdin,stdout:this.options.stdout,stderr:this.options.stderr,writeToStdout:this.writeToStdout,writeToStderr:this.writeToStderr,exitOnCtrlC:this.options.exitOnCtrlC,onExit:this.unmount},e);Eq.default.updateContainer(r,this.container,null,Bwe)}writeToStdout(e){if(!this.isUnmounted){if(this.options.debug){this.options.stdout.write(e+this.fullStaticOutput+this.lastOutput);return}if(GC){this.options.stdout.write(e);return}this.log.clear(),this.options.stdout.write(e),this.log(this.lastOutput)}}writeToStderr(e){if(!this.isUnmounted){if(this.options.debug){this.options.stderr.write(e),this.options.stdout.write(this.fullStaticOutput+this.lastOutput);return}if(GC){this.options.stderr.write(e);return}this.log.clear(),this.options.stderr.write(e),this.log(this.lastOutput)}}unmount(e){this.isUnmounted||(this.onRender(),this.unsubscribeExit(),typeof this.restoreConsole=="function"&&this.restoreConsole(),typeof this.unsubscribeResize=="function"&&this.unsubscribeResize(),GC?this.options.stdout.write(this.lastOutput+` `):this.options.debug||this.log.done(),this.isUnmounted=!0,Eq.default.updateContainer(null,this.container,null,Bwe),JCt.default.delete(this.options.stdout),e instanceof Error?this.rejectExitPromise(e):this.resolveExitPromise())}waitUntilExit(){return this.exitPromise||(this.exitPromise=new Promise((e,r)=>{this.resolveExitPromise=e,this.rejectExitPromise=r})),this.exitPromise}clear(){!GC&&!this.options.debug&&this.log.clear()}patchConsole(){this.options.debug||(this.restoreConsole=zCt.default((e,r)=>{e==="stdout"&&this.writeToStdout(r),e==="stderr"&&(r.startsWith("The above error occurred")||this.writeToStderr(r))}))}};ou.default=Cq});var Pwe=_(PB=>{"use strict";var Dwe=PB&&PB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(PB,"__esModule",{value:!0});var ZCt=Dwe(vwe()),aQ=Dwe(sq()),$Ct=ve("stream"),ewt=(t,e)=>{let r=Object.assign({stdout:process.stdout,stdin:process.stdin,stderr:process.stderr,debug:!1,exitOnCtrlC:!0,patchConsole:!0},twt(e)),o=rwt(r.stdout,()=>new ZCt.default(r));return o.render(t),{rerender:o.render,unmount:()=>o.unmount(),waitUntilExit:o.waitUntilExit,cleanup:()=>aQ.default.delete(r.stdout),clear:o.clear}};PB.default=ewt;var twt=(t={})=>t instanceof $Ct.Stream?{stdout:t,stdin:process.stdin}:t,rwt=(t,e)=>{let r;return aQ.default.has(t)?r=aQ.default.get(t):(r=e(),aQ.default.set(t,r)),r}});var bwe=_($f=>{"use strict";var nwt=$f&&$f.__createBinding||(Object.create?function(t,e,r,o){o===void 0&&(o=r),Object.defineProperty(t,o,{enumerable:!0,get:function(){return e[r]}})}:function(t,e,r,o){o===void 0&&(o=r),t[o]=e[r]}),iwt=$f&&$f.__setModuleDefault||(Object.create?function(t,e){Object.defineProperty(t,"default",{enumerable:!0,value:e})}:function(t,e){t.default=e}),swt=$f&&$f.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(t!=null)for(var r in t)r!=="default"&&Object.hasOwnProperty.call(t,r)&&nwt(e,t,r);return iwt(e,t),e};Object.defineProperty($f,"__esModule",{value:!0});var SB=swt(on()),Swe=t=>{let{items:e,children:r,style:o}=t,[a,n]=SB.useState(0),u=SB.useMemo(()=>e.slice(a),[e,a]);SB.useLayoutEffect(()=>{n(e.length)},[e.length]);let A=u.map((h,E)=>r(h,a+E)),p=SB.useMemo(()=>Object.assign({position:"absolute",flexDirection:"column"},o),[o]);return SB.default.createElement("ink-box",{internal_static:!0,style:p},A)};Swe.displayName="Static";$f.default=Swe});var kwe=_(bB=>{"use strict";var owt=bB&&bB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(bB,"__esModule",{value:!0});var awt=owt(on()),xwe=({children:t,transform:e})=>t==null?null:awt.default.createElement("ink-text",{style:{flexGrow:0,flexShrink:1,flexDirection:"row"},internal_transform:e},t);xwe.displayName="Transform";bB.default=xwe});var Fwe=_(xB=>{"use strict";var lwt=xB&&xB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xB,"__esModule",{value:!0});var cwt=lwt(on()),Qwe=({count:t=1})=>cwt.default.createElement("ink-text",null,` `.repeat(t));Qwe.displayName="Newline";xB.default=Qwe});var Lwe=_(kB=>{"use strict";var Rwe=kB&&kB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(kB,"__esModule",{value:!0});var uwt=Rwe(on()),Awt=Rwe(sQ()),Twe=()=>uwt.default.createElement(Awt.default,{flexGrow:1});Twe.displayName="Spacer";kB.default=Twe});var lQ=_(QB=>{"use strict";var fwt=QB&&QB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(QB,"__esModule",{value:!0});var pwt=on(),hwt=fwt(cq()),gwt=()=>pwt.useContext(hwt.default);QB.default=gwt});var Owe=_(FB=>{"use strict";var dwt=FB&&FB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(FB,"__esModule",{value:!0});var Nwe=on(),mwt=dwt(lQ()),ywt=(t,e={})=>{let{stdin:r,setRawMode:o,internal_exitOnCtrlC:a}=mwt.default();Nwe.useEffect(()=>{if(e.isActive!==!1)return o(!0),()=>{o(!1)}},[e.isActive,o]),Nwe.useEffect(()=>{if(e.isActive===!1)return;let n=u=>{let A=String(u),p={upArrow:A==="\x1B[A",downArrow:A==="\x1B[B",leftArrow:A==="\x1B[D",rightArrow:A==="\x1B[C",pageDown:A==="\x1B[6~",pageUp:A==="\x1B[5~",return:A==="\r",escape:A==="\x1B",ctrl:!1,shift:!1,tab:A===" "||A==="\x1B[Z",backspace:A==="\b",delete:A==="\x7F"||A==="\x1B[3~",meta:!1};A<=""&&!p.return&&(A=String.fromCharCode(A.charCodeAt(0)+"a".charCodeAt(0)-1),p.ctrl=!0),A.startsWith("\x1B")&&(A=A.slice(1),p.meta=!0);let h=A>="A"&&A<="Z",E=A>="\u0410"&&A<="\u042F";A.length===1&&(h||E)&&(p.shift=!0),p.tab&&A==="[Z"&&(p.shift=!0),(p.tab||p.backspace||p.delete)&&(A=""),(!(A==="c"&&p.ctrl)||!a)&&t(A,p)};return r?.on("data",n),()=>{r?.off("data",n)}},[e.isActive,r,a,t])};FB.default=ywt});var Mwe=_(RB=>{"use strict";var Ewt=RB&&RB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(RB,"__esModule",{value:!0});var Cwt=on(),wwt=Ewt(aq()),Iwt=()=>Cwt.useContext(wwt.default);RB.default=Iwt});var Uwe=_(TB=>{"use strict";var Bwt=TB&&TB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(TB,"__esModule",{value:!0});var vwt=on(),Dwt=Bwt(Aq()),Pwt=()=>vwt.useContext(Dwt.default);TB.default=Pwt});var _we=_(LB=>{"use strict";var Swt=LB&&LB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(LB,"__esModule",{value:!0});var bwt=on(),xwt=Swt(pq()),kwt=()=>bwt.useContext(xwt.default);LB.default=kwt});var qwe=_(OB=>{"use strict";var Hwe=OB&&OB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(OB,"__esModule",{value:!0});var NB=on(),Qwt=Hwe(iQ()),Fwt=Hwe(lQ()),Rwt=({isActive:t=!0,autoFocus:e=!1}={})=>{let{isRawModeSupported:r,setRawMode:o}=Fwt.default(),{activeId:a,add:n,remove:u,activate:A,deactivate:p}=NB.useContext(Qwt.default),h=NB.useMemo(()=>Math.random().toString().slice(2,7),[]);return NB.useEffect(()=>(n(h,{autoFocus:e}),()=>{u(h)}),[h,e]),NB.useEffect(()=>{t?A(h):p(h)},[t,h]),NB.useEffect(()=>{if(!(!r||!t))return o(!0),()=>{o(!1)}},[t]),{isFocused:Boolean(h)&&a===h}};OB.default=Rwt});var Gwe=_(MB=>{"use strict";var Twt=MB&&MB.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(MB,"__esModule",{value:!0});var Lwt=on(),Nwt=Twt(iQ()),Owt=()=>{let t=Lwt.useContext(Nwt.default);return{enableFocus:t.enableFocus,disableFocus:t.disableFocus,focusNext:t.focusNext,focusPrevious:t.focusPrevious}};MB.default=Owt});var jwe=_(wq=>{"use strict";Object.defineProperty(wq,"__esModule",{value:!0});wq.default=t=>{var e,r,o,a;return{width:(r=(e=t.yogaNode)===null||e===void 0?void 0:e.getComputedWidth())!==null&&r!==void 0?r:0,height:(a=(o=t.yogaNode)===null||o===void 0?void 0:o.getComputedHeight())!==null&&a!==void 0?a:0}}});var sc=_(ro=>{"use strict";Object.defineProperty(ro,"__esModule",{value:!0});var Mwt=Pwe();Object.defineProperty(ro,"render",{enumerable:!0,get:function(){return Mwt.default}});var Uwt=sQ();Object.defineProperty(ro,"Box",{enumerable:!0,get:function(){return Uwt.default}});var _wt=yq();Object.defineProperty(ro,"Text",{enumerable:!0,get:function(){return _wt.default}});var Hwt=bwe();Object.defineProperty(ro,"Static",{enumerable:!0,get:function(){return Hwt.default}});var qwt=kwe();Object.defineProperty(ro,"Transform",{enumerable:!0,get:function(){return qwt.default}});var Gwt=Fwe();Object.defineProperty(ro,"Newline",{enumerable:!0,get:function(){return Gwt.default}});var jwt=Lwe();Object.defineProperty(ro,"Spacer",{enumerable:!0,get:function(){return jwt.default}});var Ywt=Owe();Object.defineProperty(ro,"useInput",{enumerable:!0,get:function(){return Ywt.default}});var Wwt=Mwe();Object.defineProperty(ro,"useApp",{enumerable:!0,get:function(){return Wwt.default}});var Kwt=lQ();Object.defineProperty(ro,"useStdin",{enumerable:!0,get:function(){return Kwt.default}});var zwt=Uwe();Object.defineProperty(ro,"useStdout",{enumerable:!0,get:function(){return zwt.default}});var Vwt=_we();Object.defineProperty(ro,"useStderr",{enumerable:!0,get:function(){return Vwt.default}});var Jwt=qwe();Object.defineProperty(ro,"useFocus",{enumerable:!0,get:function(){return Jwt.default}});var Xwt=Gwe();Object.defineProperty(ro,"useFocusManager",{enumerable:!0,get:function(){return Xwt.default}});var Zwt=jwe();Object.defineProperty(ro,"measureElement",{enumerable:!0,get:function(){return Zwt.default}})});var Bq={};zt(Bq,{Gem:()=>Iq});var Ywe,fm,Iq,cQ=Et(()=>{Ywe=$e(sc()),fm=$e(on()),Iq=(0,fm.memo)(({active:t})=>{let e=(0,fm.useMemo)(()=>t?"\u25C9":"\u25EF",[t]),r=(0,fm.useMemo)(()=>t?"green":"yellow",[t]);return fm.default.createElement(Ywe.Text,{color:r},e)})});var Kwe={};zt(Kwe,{useKeypress:()=>pm});function pm({active:t},e,r){let{stdin:o}=(0,Wwe.useStdin)(),a=(0,uQ.useCallback)((n,u)=>e(n,u),r);(0,uQ.useEffect)(()=>{if(!(!t||!o))return o.on("keypress",a),()=>{o.off("keypress",a)}},[t,a,o])}var Wwe,uQ,UB=Et(()=>{Wwe=$e(sc()),uQ=$e(on())});var Vwe={};zt(Vwe,{FocusRequest:()=>zwe,useFocusRequest:()=>vq});var zwe,vq,Dq=Et(()=>{UB();zwe=(r=>(r.BEFORE="before",r.AFTER="after",r))(zwe||{}),vq=function({active:t},e,r){pm({active:t},(o,a)=>{a.name==="tab"&&(a.shift?e("before"):e("after"))},r)}});var Jwe={};zt(Jwe,{useListInput:()=>_B});var _B,AQ=Et(()=>{UB();_B=function(t,e,{active:r,minus:o,plus:a,set:n,loop:u=!0}){pm({active:r},(A,p)=>{let h=e.indexOf(t);switch(p.name){case o:{let E=h-1;if(u){n(e[(e.length+E)%e.length]);return}if(E<0)return;n(e[E])}break;case a:{let E=h+1;if(u){n(e[E%e.length]);return}if(E>=e.length)return;n(e[E])}break}},[e,t,a,n,u])}});var fQ={};zt(fQ,{ScrollableItems:()=>$wt});var w0,Na,$wt,pQ=Et(()=>{w0=$e(sc()),Na=$e(on());Dq();AQ();$wt=({active:t=!0,children:e=[],radius:r=10,size:o=1,loop:a=!0,onFocusRequest:n,willReachEnd:u})=>{let A=N=>{if(N.key===null)throw new Error("Expected all children to have a key");return N.key},p=Na.default.Children.map(e,N=>A(N)),h=p[0],[E,I]=(0,Na.useState)(h),v=p.indexOf(E);(0,Na.useEffect)(()=>{p.includes(E)||I(h)},[e]),(0,Na.useEffect)(()=>{u&&v>=p.length-2&&u()},[v]),vq({active:t&&!!n},N=>{n?.(N)},[n]),_B(E,p,{active:t,minus:"up",plus:"down",set:I,loop:a});let x=v-r,C=v+r;C>p.length&&(x-=C-p.length,C=p.length),x<0&&(C+=-x,x=0),C>=p.length&&(C=p.length-1);let R=[];for(let N=x;N<=C;++N){let U=p[N],V=t&&U===E;R.push(Na.default.createElement(w0.Box,{key:U,height:o},Na.default.createElement(w0.Box,{marginLeft:1,marginRight:1},Na.default.createElement(w0.Text,null,V?Na.default.createElement(w0.Text,{color:"cyan",bold:!0},">"):" ")),Na.default.createElement(w0.Box,null,Na.default.cloneElement(e[N],{active:V}))))}return Na.default.createElement(w0.Box,{flexDirection:"column",width:"100%"},R)}});var Xwe,ep,Zwe,Pq,$we,Sq=Et(()=>{Xwe=$e(sc()),ep=$e(on()),Zwe=ve("readline"),Pq=ep.default.createContext(null),$we=({children:t})=>{let{stdin:e,setRawMode:r}=(0,Xwe.useStdin)();(0,ep.useEffect)(()=>{r&&r(!0),e&&(0,Zwe.emitKeypressEvents)(e)},[e,r]);let[o,a]=(0,ep.useState)(new Map),n=(0,ep.useMemo)(()=>({getAll:()=>o,get:u=>o.get(u),set:(u,A)=>a(new Map([...o,[u,A]]))}),[o,a]);return ep.default.createElement(Pq.Provider,{value:n,children:t})}});var bq={};zt(bq,{useMinistore:()=>eIt});function eIt(t,e){let r=(0,hQ.useContext)(Pq);if(r===null)throw new Error("Expected this hook to run with a ministore context attached");if(typeof t>"u")return r.getAll();let o=(0,hQ.useCallback)(n=>{r.set(t,n)},[t,r.set]),a=r.get(t);return typeof a>"u"&&(a=e),[a,o]}var hQ,xq=Et(()=>{hQ=$e(on());Sq()});var dQ={};zt(dQ,{renderForm:()=>tIt});async function tIt(t,e,{stdin:r,stdout:o,stderr:a}){let n,u=p=>{let{exit:h}=(0,gQ.useApp)();pm({active:!0},(E,I)=>{I.name==="return"&&(n=p,h())},[h,p])},{waitUntilExit:A}=(0,gQ.render)(kq.default.createElement($we,null,kq.default.createElement(t,{...e,useSubmit:u})),{stdin:r,stdout:o,stderr:a});return await A(),n}var gQ,kq,mQ=Et(()=>{gQ=$e(sc()),kq=$e(on());Sq();UB()});var nIe=_(HB=>{"use strict";Object.defineProperty(HB,"__esModule",{value:!0});HB.UncontrolledTextInput=void 0;var tIe=on(),Qq=on(),eIe=sc(),hm=rQ(),rIe=({value:t,placeholder:e="",focus:r=!0,mask:o,highlightPastedText:a=!1,showCursor:n=!0,onChange:u,onSubmit:A})=>{let[{cursorOffset:p,cursorWidth:h},E]=Qq.useState({cursorOffset:(t||"").length,cursorWidth:0});Qq.useEffect(()=>{E(R=>{if(!r||!n)return R;let N=t||"";return R.cursorOffset>N.length-1?{cursorOffset:N.length,cursorWidth:0}:R})},[t,r,n]);let I=a?h:0,v=o?o.repeat(t.length):t,x=v,C=e?hm.grey(e):void 0;if(n&&r){C=e.length>0?hm.inverse(e[0])+hm.grey(e.slice(1)):hm.inverse(" "),x=v.length>0?"":hm.inverse(" ");let R=0;for(let N of v)R>=p-I&&R<=p?x+=hm.inverse(N):x+=N,R++;v.length>0&&p===v.length&&(x+=hm.inverse(" "))}return eIe.useInput((R,N)=>{if(N.upArrow||N.downArrow||N.ctrl&&R==="c"||N.tab||N.shift&&N.tab)return;if(N.return){A&&A(t);return}let U=p,V=t,te=0;N.leftArrow?n&&U--:N.rightArrow?n&&U++:N.backspace||N.delete?p>0&&(V=t.slice(0,p-1)+t.slice(p,t.length),U--):(V=t.slice(0,p)+R+t.slice(p,t.length),U+=R.length,R.length>1&&(te=R.length)),p<0&&(U=0),p>t.length&&(U=t.length),E({cursorOffset:U,cursorWidth:te}),V!==t&&u(V)},{isActive:r}),tIe.createElement(eIe.Text,null,e?v.length>0?x:C:x)};HB.default=rIe;HB.UncontrolledTextInput=t=>{let[e,r]=Qq.useState("");return tIe.createElement(rIe,Object.assign({},t,{value:e,onChange:r}))}});var oIe={};zt(oIe,{Pad:()=>Fq});var iIe,sIe,Fq,Rq=Et(()=>{iIe=$e(sc()),sIe=$e(on()),Fq=({length:t,active:e})=>{if(t===0)return null;let r=t>1?` ${"-".repeat(t-1)}`:" ";return sIe.default.createElement(iIe.Text,{dimColor:!e},r)}});var aIe={};zt(aIe,{ItemOptions:()=>rIt});var GB,B0,rIt,lIe=Et(()=>{GB=$e(sc()),B0=$e(on());AQ();cQ();Rq();rIt=function({active:t,skewer:e,options:r,value:o,onChange:a,sizes:n=[]}){let u=r.filter(({label:p})=>!!p).map(({value:p})=>p),A=r.findIndex(p=>p.value===o&&p.label!="");return _B(o,u,{active:t,minus:"left",plus:"right",set:a}),B0.default.createElement(B0.default.Fragment,null,r.map(({label:p},h)=>{let E=h===A,I=n[h]-1||0,v=p.replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g,""),x=Math.max(0,I-v.length-2);return p?B0.default.createElement(GB.Box,{key:p,width:I,marginLeft:1},B0.default.createElement(GB.Text,{wrap:"truncate"},B0.default.createElement(Iq,{active:E})," ",p),e?B0.default.createElement(Fq,{active:t,length:x}):null):B0.default.createElement(GB.Box,{key:`spacer-${h}`,width:I,marginLeft:1})}))}});var vIe=_((XVt,BIe)=>{var qq;BIe.exports=()=>(typeof qq>"u"&&(qq=ve("zlib").brotliDecompressSync(Buffer.from("W+94VqNs2wWroLyB16aprZ1SqBPiGBuovDK7hpe9UNWCwn5B2fapBEG5q+GLtoZ2wLihqpqXVMbYBrKfIwpmlllKJHMYqhBBjRwNzis7OszQG2/Y9mGQsTByLBpWtDG6WqLPmIiZrIlGLnQaouOor5hHHLkn3kvPi+zzRUC4f+Qt/ylgxV9kSpxw68X1SjPI2J2kXLuKX0uYkEgQiYbSNz13ci61Z1j+20CEcau/CIaIWra43JP2VJ/jFZ/49f9t2ru2N6trDYklynt2Siek1xWykagmo2E4xvwmK1otFd8SJLvLL98Hv9wIj3dmM7w0mFtNzX8+rzM7TGeS8kCgG27R15ovdVB27JwyicTp0qH+t6b/qzWmMT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yo0xu9ff5mf/83l2Gcn8e","base64")).toString()),qq)});var YIe=_((IJt,jIe)=>{var Xq=Symbol("arg flag"),Oa=class extends Error{constructor(e,r){super(e),this.name="ArgError",this.code=r,Object.setPrototypeOf(this,Oa.prototype)}};function sv(t,{argv:e=process.argv.slice(2),permissive:r=!1,stopAtPositional:o=!1}={}){if(!t)throw new Oa("argument specification object is required","ARG_CONFIG_NO_SPEC");let a={_:[]},n={},u={};for(let A of Object.keys(t)){if(!A)throw new Oa("argument key cannot be an empty string","ARG_CONFIG_EMPTY_KEY");if(A[0]!=="-")throw new Oa(`argument key must start with '-' but found: '${A}'`,"ARG_CONFIG_NONOPT_KEY");if(A.length===1)throw new Oa(`argument key must have a name; singular '-' keys are not allowed: ${A}`,"ARG_CONFIG_NONAME_KEY");if(typeof t[A]=="string"){n[A]=t[A];continue}let p=t[A],h=!1;if(Array.isArray(p)&&p.length===1&&typeof p[0]=="function"){let[E]=p;p=(I,v,x=[])=>(x.push(E(I,v,x[x.length-1])),x),h=E===Boolean||E[Xq]===!0}else if(typeof p=="function")h=p===Boolean||p[Xq]===!0;else throw new Oa(`type missing or not a function or valid array type: ${A}`,"ARG_CONFIG_VAD_TYPE");if(A[1]!=="-"&&A.length>2)throw new Oa(`short argument keys (with a single hyphen) must have only one character: ${A}`,"ARG_CONFIG_SHORTOPT_TOOLONG");u[A]=[p,h]}for(let A=0,p=e.length;A0){a._=a._.concat(e.slice(A));break}if(h==="--"){a._=a._.concat(e.slice(A+1));break}if(h.length>1&&h[0]==="-"){let E=h[1]==="-"||h.length===2?[h]:h.slice(1).split("").map(I=>`-${I}`);for(let I=0;I1&&e[A+1][0]==="-"&&!(e[A+1].match(/^-?\d*(\.(?=\d))?\d*$/)&&(N===Number||typeof BigInt<"u"&&N===BigInt))){let V=x===R?"":` (alias for ${R})`;throw new Oa(`option requires argument: ${x}${V}`,"ARG_MISSING_REQUIRED_LONGARG")}a[R]=N(e[A+1],R,a[R]),++A}else a[R]=N(C,R,a[R])}}else a._.push(h)}return a}sv.flag=t=>(t[Xq]=!0,t);sv.COUNT=sv.flag((t,e,r)=>(r||0)+1);sv.ArgError=Oa;jIe.exports=sv});var $Ie=_((ZJt,ZIe)=>{var tG;ZIe.exports=()=>(typeof tG>"u"&&(tG=ve("zlib").brotliDecompressSync(Buffer.from("W6cWIYpg4+CAx/MhGBUlnXWIAMsC3pB/VC8EqaqhUbS2Y/UDkZvxDTqLEB9ngDs5Ij2i30/NeprqW8YyX4tnrFY8PZwv5Urs7VwIEeTXXn3/3z9fJ06DyVop3U4vTqkezRNXrHyJEfBY3DLhUp07yxR/mmwO6WW6KCJtmeQj70ppT2kRgefTraqaYFozPP6JVdeZBdYkaxXE71tbqieYRt4mG/DZM/9oVd3U6/VcoIxoVSu7zjHo03sUw/OETtP8Rzy/3jftVSQB6yJVrkylJP7ORnKhSlGw6D63T3EMZomB0QeIwjru9+S35nb3fW8MZlkDkFsil/zGukjeZPHGP1QYkZTNYmm0LAOEHePe0bYcI2OurirJcc8pEmACWI/T/xP2IHNslGKbkSVw2h/i/v9MZ6s6t/+1hRBCgBBS1tb7XjLt7Fg/lk0gIWP1FdD7MX0f+eI3Q+yKNzgIOI6RtP1zdEAp3oUy22rgT0ai7rJi8lNmnyMmuxMnaQ1mfYtXwkouphWDob9sR8vjyd6aEGLr3Ek+RywqeF/6Gl+87DkWyMk5+zd1VtbJrw48IiR6JvP+HfJ8TCU6XPuxwOd32CHq5W9P+pTHQoyoDlzwAmeVt/I0LMUBFmzJ9mT4djmVrAOcNJG/AK3IWn2uOzArOYn5vwzwEyDHWOZILTrA/v6ggB/k4+2SXE1QdnfJO1Ib/5QzZMW2dvbqmXdqUhR3gBXSn930ewsIjdFDwsvyCwp6ucTVVkf82RT648J1246FceYU47eoQN5CmDAeVcmXzZCHY+oAj1IUCrLHjZTZeijhisMdAKCtsmLosAUWPYCy78Tkjm6lCB/zVnTMFZUsYP8+TD6YeTp5JxU/lwojYD3pgFr0I92s1PL9bTK9y7fivNDe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G&&typeof aG=="object"&&typeof lG<"u"?lG.exports=t():typeof define=="function"&&define.amd?define([],t):typeof window<"u"?window.isWindows=t():typeof global<"u"?global.isWindows=t():typeof self<"u"?self.isWindows=t():this.isWindows=t()})(function(){"use strict";return function(){return process&&(process.platform==="win32"||/^(msys|cygwin)$/.test(process.env.OSTYPE))}})});var l1e=_((JXt,a1e)=>{"use strict";cG.ifExists=$It;var YC=ve("util"),oc=ve("path"),s1e=i1e(),JIt=/^#!\s*(?:\/usr\/bin\/env)?\s*([^ \t]+)(.*)$/,XIt={createPwshFile:!0,createCmdFile:s1e(),fs:ve("fs")},ZIt=new Map([[".js","node"],[".cjs","node"],[".mjs","node"],[".cmd","cmd"],[".bat","cmd"],[".ps1","pwsh"],[".sh","sh"]]);function o1e(t){let e={...XIt,...t},r=e.fs;return e.fs_={chmod:r.chmod?YC.promisify(r.chmod):async()=>{},mkdir:YC.promisify(r.mkdir),readFile:YC.promisify(r.readFile),stat:YC.promisify(r.stat),unlink:YC.promisify(r.unlink),writeFile:YC.promisify(r.writeFile)},e}async function cG(t,e,r){let o=o1e(r);await o.fs_.stat(t),await t1t(t,e,o)}function $It(t,e,r){return cG(t,e,r).catch(()=>{})}function e1t(t,e){return e.fs_.unlink(t).catch(()=>{})}async function t1t(t,e,r){let o=await o1t(t,r);return await r1t(e,r),n1t(t,e,o,r)}function r1t(t,e){return e.fs_.mkdir(oc.dirname(t),{recursive:!0})}function n1t(t,e,r,o){let a=o1e(o),n=[{generator:c1t,extension:""}];return a.createCmdFile&&n.push({generator:l1t,extension:".cmd"}),a.createPwshFile&&n.push({generator:u1t,extension:".ps1"}),Promise.all(n.map(u=>a1t(t,e+u.extension,r,u.generator,a)))}function i1t(t,e){return e1t(t,e)}function s1t(t,e){return A1t(t,e)}async function o1t(t,e){let a=(await e.fs_.readFile(t,"utf8")).trim().split(/\r*\n/)[0].match(JIt);if(!a){let n=oc.extname(t).toLowerCase();return{program:ZIt.get(n)||null,additionalArgs:""}}return{program:a[1],additionalArgs:a[2]}}async function a1t(t,e,r,o,a){let n=a.preserveSymlinks?"--preserve-symlinks":"",u=[r.additionalArgs,n].filter(A=>A).join(" ");return a=Object.assign({},a,{prog:r.program,args:u}),await i1t(e,a),await a.fs_.writeFile(e,o(t,e,a),"utf8"),s1t(e,a)}function l1t(t,e,r){let a=oc.relative(oc.dirname(e),t).split("/").join("\\"),n=oc.isAbsolute(a)?`"${a}"`:`"%~dp0\\${a}"`,u,A=r.prog,p=r.args||"",h=uG(r.nodePath).win32;A?(u=`"%~dp0\\${A}.exe"`,a=n):(A=n,p="",a="");let E=r.progArgs?`${r.progArgs.join(" ")} `:"",I=h?`@SET NODE_PATH=${h}\r `:"";return u?I+=`@IF EXIST ${u} (\r ${u} ${p} ${a} ${E}%*\r ) ELSE (\r @SETLOCAL\r @SET PATHEXT=%PATHEXT:;.JS;=;%\r ${A} ${p} ${a} ${E}%*\r )\r `:I+=`@${A} ${p} ${a} ${E}%*\r `,I}function c1t(t,e,r){let o=oc.relative(oc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n;o=o.split("\\").join("/");let u=oc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,A=r.args||"",p=uG(r.nodePath).posix;a?(n=`"$basedir/${r.prog}"`,o=u):(a=u,A="",o="");let h=r.progArgs?`${r.progArgs.join(" ")} `:"",E=`#!/bin/sh basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") case \`uname\` in *CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; esac `,I=r.nodePath?`export NODE_PATH="${p}" `:"";return n?E+=`${I}if [ -x ${n} ]; then exec ${n} ${A} ${o} ${h}"$@" else exec ${a} ${A} ${o} ${h}"$@" fi `:E+=`${I}${a} ${A} ${o} ${h}"$@" exit $? `,E}function u1t(t,e,r){let o=oc.relative(oc.dirname(e),t),a=r.prog&&r.prog.split("\\").join("/"),n=a&&`"${a}$exe"`,u;o=o.split("\\").join("/");let A=oc.isAbsolute(o)?`"${o}"`:`"$basedir/${o}"`,p=r.args||"",h=uG(r.nodePath),E=h.win32,I=h.posix;n?(u=`"$basedir/${r.prog}$exe"`,o=A):(n=A,p="",o="");let v=r.progArgs?`${r.progArgs.join(" ")} `:"",x=`#!/usr/bin/env pwsh $basedir=Split-Path $MyInvocation.MyCommand.Definition -Parent $exe="" ${r.nodePath?`$env_node_path=$env:NODE_PATH $env:NODE_PATH="${E}" `:""}if ($PSVersionTable.PSVersion -lt "6.0" -or $IsWindows) { # Fix case when both the Windows and Linux builds of Node # are installed in the same directory $exe=".exe" }`;return r.nodePath&&(x+=` else { $env:NODE_PATH="${I}" }`),u?x+=` $ret=0 if (Test-Path ${u}) { # Support pipeline input if ($MyInvocation.ExpectingInput) { $input | & ${u} ${p} ${o} ${v}$args } else { & ${u} ${p} ${o} ${v}$args } $ret=$LASTEXITCODE } else { # Support pipeline input if ($MyInvocation.ExpectingInput) { $input | & ${n} ${p} ${o} ${v}$args } else { & ${n} ${p} ${o} ${v}$args } $ret=$LASTEXITCODE } ${r.nodePath?`$env:NODE_PATH=$env_node_path `:""}exit $ret `:x+=` # Support pipeline input if ($MyInvocation.ExpectingInput) { $input | & ${n} ${p} ${o} ${v}$args } else { & ${n} ${p} ${o} ${v}$args } ${r.nodePath?`$env:NODE_PATH=$env_node_path `:""}exit $LASTEXITCODE `,x}function A1t(t,e){return e.fs_.chmod(t,493)}function uG(t){if(!t)return{win32:"",posix:""};let e=typeof t=="string"?t.split(oc.delimiter):Array.from(t),r={};for(let o=0;o`/mnt/${A.toLowerCase()}`):e[o];r.win32=r.win32?`${r.win32};${a}`:a,r.posix=r.posix?`${r.posix}:${n}`:n,r[o]={win32:a,posix:n}}return r}a1e.exports=cG});var vG=_((m$t,x1e)=>{x1e.exports=ve("stream")});var R1e=_((y$t,F1e)=>{"use strict";function k1e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function M1t(t){for(var e=1;e0?this.tail.next=o:this.head=o,this.tail=o,++this.length}},{key:"unshift",value:function(r){var o={data:r,next:this.head};this.length===0&&(this.tail=o),this.head=o,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var o=this.head,a=""+o.data;o=o.next;)a+=r+o.data;return a}},{key:"concat",value:function(r){if(this.length===0)return xQ.alloc(0);for(var o=xQ.allocUnsafe(r>>>0),a=this.head,n=0;a;)Y1t(a.data,o,n),n+=a.data.length,a=a.next;return o}},{key:"consume",value:function(r,o){var a;return ru.length?u.length:r;if(A===u.length?n+=u:n+=u.slice(0,r),r-=A,r===0){A===u.length?(++a,o.next?this.head=o.next:this.head=this.tail=null):(this.head=o,o.data=u.slice(A));break}++a}return this.length-=a,n}},{key:"_getBuffer",value:function(r){var o=xQ.allocUnsafe(r),a=this.head,n=1;for(a.data.copy(o),r-=a.data.length;a=a.next;){var u=a.data,A=r>u.length?u.length:r;if(u.copy(o,o.length-r,0,A),r-=A,r===0){A===u.length?(++n,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=u.slice(A));break}++n}return this.length-=n,o}},{key:j1t,value:function(r,o){return DG(this,M1t({},o,{depth:0,customInspect:!1}))}}]),t}()});var SG=_((E$t,L1e)=>{"use strict";function W1t(t,e){var r=this,o=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return o||a?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(PG,this,t)):process.nextTick(PG,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(kQ,r):(r._writableState.errorEmitted=!0,process.nextTick(T1e,r,n)):process.nextTick(T1e,r,n):e?(process.nextTick(kQ,r),e(n)):process.nextTick(kQ,r)}),this)}function T1e(t,e){PG(t,e),kQ(t)}function kQ(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function K1t(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function PG(t,e){t.emit("error",e)}function z1t(t,e){var r=t._readableState,o=t._writableState;r&&r.autoDestroy||o&&o.autoDestroy?t.destroy(e):t.emit("error",e)}L1e.exports={destroy:W1t,undestroy:K1t,errorOrDestroy:z1t}});var F0=_((C$t,M1e)=>{"use strict";var O1e={};function lc(t,e,r){r||(r=Error);function o(n,u,A){return typeof e=="string"?e:e(n,u,A)}class a extends r{constructor(u,A,p){super(o(u,A,p))}}a.prototype.name=r.name,a.prototype.code=t,O1e[t]=a}function N1e(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(o=>String(o)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return`of ${e} ${String(t)}`}function V1t(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function J1t(t,e,r){return(r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function X1t(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}lc("ERR_INVALID_OPT_VALUE",function(t,e){return'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);lc("ERR_INVALID_ARG_TYPE",function(t,e,r){let o;typeof e=="string"&&V1t(e,"not ")?(o="must not be",e=e.replace(/^not /,"")):o="must be";let a;if(J1t(t," argument"))a=`The ${t} ${o} ${N1e(e,"type")}`;else{let n=X1t(t,".")?"property":"argument";a=`The "${t}" ${n} ${o} ${N1e(e,"type")}`}return a+=`. Received type ${typeof r}`,a},TypeError);lc("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");lc("ERR_METHOD_NOT_IMPLEMENTED",function(t){return"The "+t+" method is not implemented"});lc("ERR_STREAM_PREMATURE_CLOSE","Premature close");lc("ERR_STREAM_DESTROYED",function(t){return"Cannot call "+t+" after a stream was destroyed"});lc("ERR_MULTIPLE_CALLBACK","Callback called multiple times");lc("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");lc("ERR_STREAM_WRITE_AFTER_END","write after end");lc("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);lc("ERR_UNKNOWN_ENCODING",function(t){return"Unknown encoding: "+t},TypeError);lc("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");M1e.exports.codes=O1e});var bG=_((w$t,U1e)=>{"use strict";var Z1t=F0().codes.ERR_INVALID_OPT_VALUE;function $1t(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function e2t(t,e,r,o){var a=$1t(e,o,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var n=o?r:"highWaterMark";throw new Z1t(n,a)}return Math.floor(a)}return t.objectMode?16:16*1024}U1e.exports={getHighWaterMark:e2t}});var _1e=_((I$t,xG)=>{typeof Object.create=="function"?xG.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:xG.exports=function(e,r){if(r){e.super_=r;var o=function(){};o.prototype=r.prototype,e.prototype=new o,e.prototype.constructor=e}}});var R0=_((B$t,QG)=>{try{if(kG=ve("util"),typeof kG.inherits!="function")throw"";QG.exports=kG.inherits}catch{QG.exports=_1e()}var kG});var q1e=_((v$t,H1e)=>{H1e.exports=ve("util").deprecate});var TG=_((D$t,z1e)=>{"use strict";z1e.exports=Ri;function j1e(t){var e=this;this.next=null,this.entry=null,this.finish=function(){S2t(e,t)}}var JC;Ri.WritableState=mv;var t2t={deprecate:q1e()},Y1e=vG(),FQ=ve("buffer").Buffer,r2t=global.Uint8Array||function(){};function n2t(t){return FQ.from(t)}function i2t(t){return FQ.isBuffer(t)||t instanceof r2t}var RG=SG(),s2t=bG(),o2t=s2t.getHighWaterMark,T0=F0().codes,a2t=T0.ERR_INVALID_ARG_TYPE,l2t=T0.ERR_METHOD_NOT_IMPLEMENTED,c2t=T0.ERR_MULTIPLE_CALLBACK,u2t=T0.ERR_STREAM_CANNOT_PIPE,A2t=T0.ERR_STREAM_DESTROYED,f2t=T0.ERR_STREAM_NULL_VALUES,p2t=T0.ERR_STREAM_WRITE_AFTER_END,h2t=T0.ERR_UNKNOWN_ENCODING,XC=RG.errorOrDestroy;R0()(Ri,Y1e);function g2t(){}function mv(t,e,r){JC=JC||Cm(),t=t||{},typeof r!="boolean"&&(r=e instanceof JC),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=o2t(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var o=t.decodeStrings===!1;this.decodeStrings=!o,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){I2t(e,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new j1e(this)}mv.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(mv.prototype,"buffer",{get:t2t.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}})();var QQ;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(QQ=Function.prototype[Symbol.hasInstance],Object.defineProperty(Ri,Symbol.hasInstance,{value:function(e){return QQ.call(this,e)?!0:this!==Ri?!1:e&&e._writableState instanceof mv}})):QQ=function(e){return e instanceof this};function Ri(t){JC=JC||Cm();var e=this instanceof JC;if(!e&&!QQ.call(Ri,this))return new Ri(t);this._writableState=new mv(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),Y1e.call(this)}Ri.prototype.pipe=function(){XC(this,new u2t)};function d2t(t,e){var r=new p2t;XC(t,r),process.nextTick(e,r)}function m2t(t,e,r,o){var a;return r===null?a=new f2t:typeof r!="string"&&!e.objectMode&&(a=new a2t("chunk",["string","Buffer"],r)),a?(XC(t,a),process.nextTick(o,a),!1):!0}Ri.prototype.write=function(t,e,r){var o=this._writableState,a=!1,n=!o.objectMode&&i2t(t);return n&&!FQ.isBuffer(t)&&(t=n2t(t)),typeof e=="function"&&(r=e,e=null),n?e="buffer":e||(e=o.defaultEncoding),typeof r!="function"&&(r=g2t),o.ending?d2t(this,r):(n||m2t(this,o,t,r))&&(o.pendingcb++,a=E2t(this,o,n,t,e,r)),a};Ri.prototype.cork=function(){this._writableState.corked++};Ri.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&W1e(this,t))};Ri.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new h2t(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(Ri.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function y2t(t,e,r){return!t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=FQ.from(e,r)),e}Object.defineProperty(Ri.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function E2t(t,e,r,o,a,n){if(!r){var u=y2t(e,o,a);o!==u&&(r=!0,a="buffer",o=u)}var A=e.objectMode?1:o.length;e.length+=A;var p=e.length{"use strict";var b2t=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};J1e.exports=EA;var V1e=OG(),NG=TG();R0()(EA,V1e);for(LG=b2t(NG.prototype),RQ=0;RQ{var LQ=ve("buffer"),sp=LQ.Buffer;function X1e(t,e){for(var r in t)e[r]=t[r]}sp.from&&sp.alloc&&sp.allocUnsafe&&sp.allocUnsafeSlow?Z1e.exports=LQ:(X1e(LQ,MG),MG.Buffer=ZC);function ZC(t,e,r){return sp(t,e,r)}X1e(sp,ZC);ZC.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return sp(t,e,r)};ZC.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var o=sp(t);return e!==void 0?typeof r=="string"?o.fill(e,r):o.fill(e):o.fill(0),o};ZC.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return sp(t)};ZC.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return LQ.SlowBuffer(t)}});var HG=_(t2e=>{"use strict";var _G=$1e().Buffer,e2e=_G.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function Q2t(t){if(!t)return"utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0}}function F2t(t){var e=Q2t(t);if(typeof e!="string"&&(_G.isEncoding===e2e||!e2e(t)))throw new Error("Unknown encoding: "+t);return e||t}t2e.StringDecoder=yv;function yv(t){this.encoding=F2t(t);var e;switch(this.encoding){case"utf16le":this.text=M2t,this.end=U2t,e=4;break;case"utf8":this.fillLast=L2t,e=4;break;case"base64":this.text=_2t,this.end=H2t,e=3;break;default:this.write=q2t,this.end=G2t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_G.allocUnsafe(e)}yv.prototype.write=function(t){if(t.length===0)return"";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function R2t(t,e,r){var o=e.length-1;if(o=0?(a>0&&(t.lastNeed=a-1),a):--o=0?(a>0&&(t.lastNeed=a-2),a):--o=0?(a>0&&(a===2?a=0:t.lastNeed=a-3),a):0))}function T2t(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function L2t(t){var e=this.lastTotal-this.lastNeed,r=T2t(this,t,e);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length}function N2t(t,e){var r=R2t(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var o=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,o),t.toString("utf8",e,o)}function O2t(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function M2t(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var o=r.charCodeAt(r.length-1);if(o>=55296&&o<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function U2t(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function _2t(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function H2t(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function q2t(t){return t.toString(this.encoding)}function G2t(t){return t&&t.length?this.write(t):""}});var NQ=_((b$t,i2e)=>{"use strict";var r2e=F0().codes.ERR_STREAM_PREMATURE_CLOSE;function j2t(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,o=new Array(r),a=0;a{"use strict";var OQ;function L0(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var K2t=NQ(),N0=Symbol("lastResolve"),wm=Symbol("lastReject"),Ev=Symbol("error"),MQ=Symbol("ended"),Im=Symbol("lastPromise"),qG=Symbol("handlePromise"),Bm=Symbol("stream");function O0(t,e){return{value:t,done:e}}function z2t(t){var e=t[N0];if(e!==null){var r=t[Bm].read();r!==null&&(t[Im]=null,t[N0]=null,t[wm]=null,e(O0(r,!1)))}}function V2t(t){process.nextTick(z2t,t)}function J2t(t,e){return function(r,o){t.then(function(){if(e[MQ]){r(O0(void 0,!0));return}e[qG](r,o)},o)}}var X2t=Object.getPrototypeOf(function(){}),Z2t=Object.setPrototypeOf((OQ={get stream(){return this[Bm]},next:function(){var e=this,r=this[Ev];if(r!==null)return Promise.reject(r);if(this[MQ])return Promise.resolve(O0(void 0,!0));if(this[Bm].destroyed)return new Promise(function(u,A){process.nextTick(function(){e[Ev]?A(e[Ev]):u(O0(void 0,!0))})});var o=this[Im],a;if(o)a=new Promise(J2t(o,this));else{var n=this[Bm].read();if(n!==null)return Promise.resolve(O0(n,!1));a=new Promise(this[qG])}return this[Im]=a,a}},L0(OQ,Symbol.asyncIterator,function(){return this}),L0(OQ,"return",function(){var e=this;return new Promise(function(r,o){e[Bm].destroy(null,function(a){if(a){o(a);return}r(O0(void 0,!0))})})}),OQ),X2t),$2t=function(e){var r,o=Object.create(Z2t,(r={},L0(r,Bm,{value:e,writable:!0}),L0(r,N0,{value:null,writable:!0}),L0(r,wm,{value:null,writable:!0}),L0(r,Ev,{value:null,writable:!0}),L0(r,MQ,{value:e._readableState.endEmitted,writable:!0}),L0(r,qG,{value:function(n,u){var A=o[Bm].read();A?(o[Im]=null,o[N0]=null,o[wm]=null,n(O0(A,!1))):(o[N0]=n,o[wm]=u)},writable:!0}),r));return o[Im]=null,K2t(e,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=o[wm];n!==null&&(o[Im]=null,o[N0]=null,o[wm]=null,n(a)),o[Ev]=a;return}var u=o[N0];u!==null&&(o[Im]=null,o[N0]=null,o[wm]=null,u(O0(void 0,!0))),o[MQ]=!0}),e.on("readable",V2t.bind(null,o)),o};s2e.exports=$2t});var u2e=_((k$t,c2e)=>{"use strict";function a2e(t,e,r,o,a,n,u){try{var A=t[n](u),p=A.value}catch(h){r(h);return}A.done?e(p):Promise.resolve(p).then(o,a)}function eBt(t){return function(){var e=this,r=arguments;return new Promise(function(o,a){var n=t.apply(e,r);function u(p){a2e(n,o,a,u,A,"next",p)}function A(p){a2e(n,o,a,u,A,"throw",p)}u(void 0)})}}function l2e(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,o)}return r}function tBt(t){for(var e=1;e{"use strict";C2e.exports=mn;var $C;mn.ReadableState=h2e;var Q$t=ve("events").EventEmitter,p2e=function(e,r){return e.listeners(r).length},wv=vG(),UQ=ve("buffer").Buffer,sBt=global.Uint8Array||function(){};function oBt(t){return UQ.from(t)}function aBt(t){return UQ.isBuffer(t)||t instanceof sBt}var GG=ve("util"),en;GG&&GG.debuglog?en=GG.debuglog("stream"):en=function(){};var lBt=R1e(),JG=SG(),cBt=bG(),uBt=cBt.getHighWaterMark,_Q=F0().codes,ABt=_Q.ERR_INVALID_ARG_TYPE,fBt=_Q.ERR_STREAM_PUSH_AFTER_EOF,pBt=_Q.ERR_METHOD_NOT_IMPLEMENTED,hBt=_Q.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,ew,jG,YG;R0()(mn,wv);var Cv=JG.errorOrDestroy,WG=["error","close","destroy","pause","resume"];function gBt(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]]}function h2e(t,e,r){$C=$C||Cm(),t=t||{},typeof r!="boolean"&&(r=e instanceof $C),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=uBt(this,t,"readableHighWaterMark",r),this.buffer=new lBt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(ew||(ew=HG().StringDecoder),this.decoder=new ew(t.encoding),this.encoding=t.encoding)}function mn(t){if($C=$C||Cm(),!(this instanceof mn))return new mn(t);var e=this instanceof $C;this._readableState=new h2e(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),wv.call(this)}Object.defineProperty(mn.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){!this._readableState||(this._readableState.destroyed=e)}});mn.prototype.destroy=JG.destroy;mn.prototype._undestroy=JG.undestroy;mn.prototype._destroy=function(t,e){e(t)};mn.prototype.push=function(t,e){var r=this._readableState,o;return r.objectMode?o=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=UQ.from(t,e),e=""),o=!0),g2e(this,t,e,!1,o)};mn.prototype.unshift=function(t){return g2e(this,t,null,!0,!1)};function g2e(t,e,r,o,a){en("readableAddChunk",e);var n=t._readableState;if(e===null)n.reading=!1,yBt(t,n);else{var u;if(a||(u=dBt(n,e)),u)Cv(t,u);else if(n.objectMode||e&&e.length>0)if(typeof e!="string"&&!n.objectMode&&Object.getPrototypeOf(e)!==UQ.prototype&&(e=oBt(e)),o)n.endEmitted?Cv(t,new hBt):KG(t,n,e,!0);else if(n.ended)Cv(t,new fBt);else{if(n.destroyed)return!1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?KG(t,n,e,!1):VG(t,n)):KG(t,n,e,!1)}else o||(n.reading=!1,VG(t,n))}return!n.ended&&(n.length=A2e?t=A2e:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function f2e(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=mBt(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}mn.prototype.read=function(t){en("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return en("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?zG(this):HQ(this),null;if(t=f2e(t,e),t===0&&e.ended)return e.length===0&&zG(this),null;var o=e.needReadable;en("need readable",o),(e.length===0||e.length-t0?a=y2e(t,e):a=null,a===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&zG(this)),a!==null&&this.emit("data",a),a};function yBt(t,e){if(en("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length)}e.ended=!0,e.sync?HQ(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,d2e(t)))}}function HQ(t){var e=t._readableState;en("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||(en("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(d2e,t))}function d2e(t){var e=t._readableState;en("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,XG(t)}function VG(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(EBt,t,e))}function EBt(t,e){for(;!e.reading&&!e.ended&&(e.length1&&E2e(o.pipes,t)!==-1)&&!h&&(en("false write response, pause",o.awaitDrain),o.awaitDrain++),r.pause())}function v(N){en("onerror",N),R(),t.removeListener("error",v),p2e(t,"error")===0&&Cv(t,N)}gBt(t,"error",v);function x(){t.removeListener("finish",C),R()}t.once("close",x);function C(){en("onfinish"),t.removeListener("close",x),R()}t.once("finish",C);function R(){en("unpipe"),r.unpipe(t)}return t.emit("pipe",r),o.flowing||(en("pipe resume"),r.resume()),t};function CBt(t){return function(){var r=t._readableState;en("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&p2e(t,"data")&&(r.flowing=!0,XG(t))}}mn.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var o=e.pipes,a=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n0,o.flowing!==!1&&this.resume()):t==="readable"&&!o.endEmitted&&!o.readableListening&&(o.readableListening=o.needReadable=!0,o.flowing=!1,o.emittedReadable=!1,en("on readable",o.length,o.reading),o.length?HQ(this):o.reading||process.nextTick(wBt,this)),r};mn.prototype.addListener=mn.prototype.on;mn.prototype.removeListener=function(t,e){var r=wv.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(m2e,this),r};mn.prototype.removeAllListeners=function(t){var e=wv.prototype.removeAllListeners.apply(this,arguments);return(t==="readable"||t===void 0)&&process.nextTick(m2e,this),e};function m2e(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume()}function wBt(t){en("readable nexttick read 0"),t.read(0)}mn.prototype.resume=function(){var t=this._readableState;return t.flowing||(en("resume"),t.flowing=!t.readableListening,IBt(this,t)),t.paused=!1,this};function IBt(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(BBt,t,e))}function BBt(t,e){en("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),XG(t),e.flowing&&!e.reading&&t.read(0)}mn.prototype.pause=function(){return en("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(en("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function XG(t){var e=t._readableState;for(en("flow",e.flowing);e.flowing&&t.read()!==null;);}mn.prototype.wrap=function(t){var e=this,r=this._readableState,o=!1;t.on("end",function(){if(en("wrapped end"),r.decoder&&!r.ended){var u=r.decoder.end();u&&u.length&&e.push(u)}e.push(null)}),t.on("data",function(u){if(en("wrapped data"),r.decoder&&(u=r.decoder.write(u)),!(r.objectMode&&u==null)&&!(!r.objectMode&&(!u||!u.length))){var A=e.push(u);A||(o=!0,t.pause())}});for(var a in t)this[a]===void 0&&typeof t[a]=="function"&&(this[a]=function(A){return function(){return t[A].apply(t,arguments)}}(a));for(var n=0;n=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function zG(t){var e=t._readableState;en("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(vBt,e,t))}function vBt(t,e){if(en("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy()}}typeof Symbol=="function"&&(mn.from=function(t,e){return YG===void 0&&(YG=u2e()),YG(mn,t,e)});function E2e(t,e){for(var r=0,o=t.length;r{"use strict";I2e.exports=op;var qQ=F0().codes,DBt=qQ.ERR_METHOD_NOT_IMPLEMENTED,PBt=qQ.ERR_MULTIPLE_CALLBACK,SBt=qQ.ERR_TRANSFORM_ALREADY_TRANSFORMING,bBt=qQ.ERR_TRANSFORM_WITH_LENGTH_0,GQ=Cm();R0()(op,GQ);function xBt(t,e){var r=this._transformState;r.transforming=!1;var o=r.writecb;if(o===null)return this.emit("error",new PBt);r.writechunk=null,r.writecb=null,e!=null&&this.push(e),o(t);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{"use strict";v2e.exports=Iv;var B2e=ZG();R0()(Iv,B2e);function Iv(t){if(!(this instanceof Iv))return new Iv(t);B2e.call(this,t)}Iv.prototype._transform=function(t,e,r){r(null,t)}});var k2e=_((L$t,x2e)=>{"use strict";var $G;function QBt(t){var e=!1;return function(){e||(e=!0,t.apply(void 0,arguments))}}var b2e=F0().codes,FBt=b2e.ERR_MISSING_ARGS,RBt=b2e.ERR_STREAM_DESTROYED;function P2e(t){if(t)throw t}function TBt(t){return t.setHeader&&typeof t.abort=="function"}function LBt(t,e,r,o){o=QBt(o);var a=!1;t.on("close",function(){a=!0}),$G===void 0&&($G=NQ()),$G(t,{readable:e,writable:r},function(u){if(u)return o(u);a=!0,o()});var n=!1;return function(u){if(!a&&!n){if(n=!0,TBt(t))return t.abort();if(typeof t.destroy=="function")return t.destroy();o(u||new RBt("pipe"))}}}function S2e(t){t()}function NBt(t,e){return t.pipe(e)}function OBt(t){return!t.length||typeof t[t.length-1]!="function"?P2e:t.pop()}function MBt(){for(var t=arguments.length,e=new Array(t),r=0;r0;return LBt(u,p,h,function(E){a||(a=E),E&&n.forEach(S2e),!p&&(n.forEach(S2e),o(a))})});return e.reduce(NBt)}x2e.exports=MBt});var tw=_((cc,vv)=>{var Bv=ve("stream");process.env.READABLE_STREAM==="disable"&&Bv?(vv.exports=Bv.Readable,Object.assign(vv.exports,Bv),vv.exports.Stream=Bv):(cc=vv.exports=OG(),cc.Stream=Bv||cc,cc.Readable=cc,cc.Writable=TG(),cc.Duplex=Cm(),cc.Transform=ZG(),cc.PassThrough=D2e(),cc.finished=NQ(),cc.pipeline=k2e())});var R2e=_((N$t,F2e)=>{"use strict";var{Buffer:cu}=ve("buffer"),Q2e=Symbol.for("BufferList");function ni(t){if(!(this instanceof ni))return new ni(t);ni._init.call(this,t)}ni._init=function(e){Object.defineProperty(this,Q2e,{value:!0}),this._bufs=[],this.length=0,e&&this.append(e)};ni.prototype._new=function(e){return new ni(e)};ni.prototype._offset=function(e){if(e===0)return[0,0];let r=0;for(let o=0;othis.length||e<0)return;let r=this._offset(e);return this._bufs[r[0]][r[1]]};ni.prototype.slice=function(e,r){return typeof e=="number"&&e<0&&(e+=this.length),typeof r=="number"&&r<0&&(r+=this.length),this.copy(null,0,e,r)};ni.prototype.copy=function(e,r,o,a){if((typeof o!="number"||o<0)&&(o=0),(typeof a!="number"||a>this.length)&&(a=this.length),o>=this.length||a<=0)return e||cu.alloc(0);let n=!!e,u=this._offset(o),A=a-o,p=A,h=n&&r||0,E=u[1];if(o===0&&a===this.length){if(!n)return this._bufs.length===1?this._bufs[0]:cu.concat(this._bufs,this.length);for(let I=0;Iv)this._bufs[I].copy(e,h,E),h+=v;else{this._bufs[I].copy(e,h,E,E+p),h+=v;break}p-=v,E&&(E=0)}return e.length>h?e.slice(0,h):e};ni.prototype.shallowSlice=function(e,r){if(e=e||0,r=typeof r!="number"?this.length:r,e<0&&(e+=this.length),r<0&&(r+=this.length),e===r)return this._new();let o=this._offset(e),a=this._offset(r),n=this._bufs.slice(o[0],a[0]+1);return a[1]===0?n.pop():n[n.length-1]=n[n.length-1].slice(0,a[1]),o[1]!==0&&(n[0]=n[0].slice(o[1])),this._new(n)};ni.prototype.toString=function(e,r,o){return this.slice(r,o).toString(e)};ni.prototype.consume=function(e){if(e=Math.trunc(e),Number.isNaN(e)||e<=0)return this;for(;this._bufs.length;)if(e>=this._bufs[0].length)e-=this._bufs[0].length,this.length-=this._bufs[0].length,this._bufs.shift();else{this._bufs[0]=this._bufs[0].slice(e),this.length-=e;break}return this};ni.prototype.duplicate=function(){let e=this._new();for(let r=0;rthis.length?this.length:e;let o=this._offset(e),a=o[0],n=o[1];for(;a=t.length){let p=u.indexOf(t,n);if(p!==-1)return this._reverseOffset([a,p]);n=u.length-t.length+1}else{let p=this._reverseOffset([a,n]);if(this._match(p,t))return p;n++}n=0}return-1};ni.prototype._match=function(t,e){if(this.length-t{"use strict";var ej=tw().Duplex,UBt=R0(),Dv=R2e();function Uo(t){if(!(this instanceof Uo))return new Uo(t);if(typeof t=="function"){this._callback=t;let e=function(o){this._callback&&(this._callback(o),this._callback=null)}.bind(this);this.on("pipe",function(o){o.on("error",e)}),this.on("unpipe",function(o){o.removeListener("error",e)}),t=null}Dv._init.call(this,t),ej.call(this)}UBt(Uo,ej);Object.assign(Uo.prototype,Dv.prototype);Uo.prototype._new=function(e){return new Uo(e)};Uo.prototype._write=function(e,r,o){this._appendBuffer(e),typeof o=="function"&&o()};Uo.prototype._read=function(e){if(!this.length)return this.push(null);e=Math.min(e,this.length),this.push(this.slice(0,e)),this.consume(e)};Uo.prototype.end=function(e){ej.prototype.end.call(this,e),this._callback&&(this._callback(null,this.slice()),this._callback=null)};Uo.prototype._destroy=function(e,r){this._bufs.length=0,this.length=0,r(e)};Uo.prototype._isBufferList=function(e){return e instanceof Uo||e instanceof Dv||Uo.isBufferList(e)};Uo.isBufferList=Dv.isBufferList;jQ.exports=Uo;jQ.exports.BufferListStream=Uo;jQ.exports.BufferList=Dv});var nj=_(nw=>{var _Bt=Buffer.alloc,HBt="0000000000000000000",qBt="7777777777777777777",L2e="0".charCodeAt(0),N2e=Buffer.from("ustar\0","binary"),GBt=Buffer.from("00","binary"),jBt=Buffer.from("ustar ","binary"),YBt=Buffer.from(" \0","binary"),WBt=parseInt("7777",8),Pv=257,rj=263,KBt=function(t,e,r){return typeof t!="number"?r:(t=~~t,t>=e?e:t>=0||(t+=e,t>=0)?t:0)},zBt=function(t){switch(t){case 0:return"file";case 1:return"link";case 2:return"symlink";case 3:return"character-device";case 4:return"block-device";case 5:return"directory";case 6:return"fifo";case 7:return"contiguous-file";case 72:return"pax-header";case 55:return"pax-global-header";case 27:return"gnu-long-link-path";case 28:case 30:return"gnu-long-path"}return null},VBt=function(t){switch(t){case"file":return 0;case"link":return 1;case"symlink":return 2;case"character-device":return 3;case"block-device":return 4;case"directory":return 5;case"fifo":return 6;case"contiguous-file":return 7;case"pax-header":return 72}return 0},O2e=function(t,e,r,o){for(;re?qBt.slice(0,e)+" ":HBt.slice(0,e-t.length)+t+" "};function JBt(t){var e;if(t[0]===128)e=!0;else if(t[0]===255)e=!1;else return null;for(var r=[],o=t.length-1;o>0;o--){var a=t[o];e?r.push(a):r.push(255-a)}var n=0,u=r.length;for(o=0;o=Math.pow(10,r)&&r++,e+r+t};nw.decodeLongPath=function(t,e){return rw(t,0,t.length,e)};nw.encodePax=function(t){var e="";t.name&&(e+=tj(" path="+t.name+` `)),t.linkname&&(e+=tj(" linkpath="+t.linkname+` `));var r=t.pax;if(r)for(var o in r)e+=tj(" "+o+"="+r[o]+` `);return Buffer.from(e)};nw.decodePax=function(t){for(var e={};t.length;){for(var r=0;r100;){var a=r.indexOf("/");if(a===-1)return null;o+=o?"/"+r.slice(0,a):r.slice(0,a),r=r.slice(a+1)}return Buffer.byteLength(r)>100||Buffer.byteLength(o)>155||t.linkname&&Buffer.byteLength(t.linkname)>100?null:(e.write(r),e.write(M0(t.mode&WBt,6),100),e.write(M0(t.uid,6),108),e.write(M0(t.gid,6),116),e.write(M0(t.size,11),124),e.write(M0(t.mtime.getTime()/1e3|0,11),136),e[156]=L2e+VBt(t.type),t.linkname&&e.write(t.linkname,157),N2e.copy(e,Pv),GBt.copy(e,rj),t.uname&&e.write(t.uname,265),t.gname&&e.write(t.gname,297),e.write(M0(t.devmajor||0,6),329),e.write(M0(t.devminor||0,6),337),o&&e.write(o,345),e.write(M0(M2e(e),6),148),e)};nw.decode=function(t,e,r){var o=t[156]===0?0:t[156]-L2e,a=rw(t,0,100,e),n=U0(t,100,8),u=U0(t,108,8),A=U0(t,116,8),p=U0(t,124,12),h=U0(t,136,12),E=zBt(o),I=t[157]===0?null:rw(t,157,100,e),v=rw(t,265,32),x=rw(t,297,32),C=U0(t,329,8),R=U0(t,337,8),N=M2e(t);if(N===8*32)return null;if(N!==U0(t,148,8))throw new Error("Invalid tar header. Maybe the tar is corrupted or it needs to be gunzipped?");if(N2e.compare(t,Pv,Pv+6)===0)t[345]&&(a=rw(t,345,155,e)+"/"+a);else if(!(jBt.compare(t,Pv,Pv+6)===0&&YBt.compare(t,rj,rj+2)===0)){if(!r)throw new Error("Invalid tar header: unknown format.")}return o===0&&a&&a[a.length-1]==="/"&&(o=5),{name:a,mode:n,uid:u,gid:A,size:p,mtime:new Date(1e3*h),type:E,linkname:I,uname:v,gname:x,devmajor:C,devminor:R}}});var Y2e=_((U$t,j2e)=>{var _2e=ve("util"),XBt=T2e(),Sv=nj(),H2e=tw().Writable,q2e=tw().PassThrough,G2e=function(){},U2e=function(t){return t&=511,t&&512-t},ZBt=function(t,e){var r=new YQ(t,e);return r.end(),r},$Bt=function(t,e){return e.path&&(t.name=e.path),e.linkpath&&(t.linkname=e.linkpath),e.size&&(t.size=parseInt(e.size,10)),t.pax=e,t},YQ=function(t,e){this._parent=t,this.offset=e,q2e.call(this,{autoDestroy:!1})};_2e.inherits(YQ,q2e);YQ.prototype.destroy=function(t){this._parent.destroy(t)};var ap=function(t){if(!(this instanceof ap))return new ap(t);H2e.call(this,t),t=t||{},this._offset=0,this._buffer=XBt(),this._missing=0,this._partial=!1,this._onparse=G2e,this._header=null,this._stream=null,this._overflow=null,this._cb=null,this._locked=!1,this._destroyed=!1,this._pax=null,this._paxGlobal=null,this._gnuLongPath=null,this._gnuLongLinkPath=null;var e=this,r=e._buffer,o=function(){e._continue()},a=function(v){if(e._locked=!1,v)return e.destroy(v);e._stream||o()},n=function(){e._stream=null;var v=U2e(e._header.size);v?e._parse(v,u):e._parse(512,I),e._locked||o()},u=function(){e._buffer.consume(U2e(e._header.size)),e._parse(512,I),o()},A=function(){var v=e._header.size;e._paxGlobal=Sv.decodePax(r.slice(0,v)),r.consume(v),n()},p=function(){var v=e._header.size;e._pax=Sv.decodePax(r.slice(0,v)),e._paxGlobal&&(e._pax=Object.assign({},e._paxGlobal,e._pax)),r.consume(v),n()},h=function(){var v=e._header.size;this._gnuLongPath=Sv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},E=function(){var v=e._header.size;this._gnuLongLinkPath=Sv.decodeLongPath(r.slice(0,v),t.filenameEncoding),r.consume(v),n()},I=function(){var v=e._offset,x;try{x=e._header=Sv.decode(r.slice(0,512),t.filenameEncoding,t.allowUnknownFormat)}catch(C){e.emit("error",C)}if(r.consume(512),!x){e._parse(512,I),o();return}if(x.type==="gnu-long-path"){e._parse(x.size,h),o();return}if(x.type==="gnu-long-link-path"){e._parse(x.size,E),o();return}if(x.type==="pax-global-header"){e._parse(x.size,A),o();return}if(x.type==="pax-header"){e._parse(x.size,p),o();return}if(e._gnuLongPath&&(x.name=e._gnuLongPath,e._gnuLongPath=null),e._gnuLongLinkPath&&(x.linkname=e._gnuLongLinkPath,e._gnuLongLinkPath=null),e._pax&&(e._header=x=$Bt(x,e._pax),e._pax=null),e._locked=!0,!x.size||x.type==="directory"){e._parse(512,I),e.emit("entry",x,ZBt(e,v),a);return}e._stream=new YQ(e,v),e.emit("entry",x,e._stream,a),e._parse(x.size,n),o()};this._onheader=I,this._parse(512,I)};_2e.inherits(ap,H2e);ap.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.emit("close"))};ap.prototype._parse=function(t,e){this._destroyed||(this._offset+=t,this._missing=t,e===this._onheader&&(this._partial=!1),this._onparse=e)};ap.prototype._continue=function(){if(!this._destroyed){var t=this._cb;this._cb=G2e,this._overflow?this._write(this._overflow,void 0,t):t()}};ap.prototype._write=function(t,e,r){if(!this._destroyed){var o=this._stream,a=this._buffer,n=this._missing;if(t.length&&(this._partial=!0),t.lengthn&&(u=t.slice(n),t=t.slice(0,n)),o?o.end(t):a.append(t),this._overflow=u,this._onparse()}};ap.prototype._final=function(t){if(this._partial)return this.destroy(new Error("Unexpected end of data"));t()};j2e.exports=ap});var K2e=_((_$t,W2e)=>{W2e.exports=ve("fs").constants||ve("constants")});var Z2e=_((H$t,X2e)=>{var iw=K2e(),z2e=NM(),KQ=R0(),evt=Buffer.alloc,V2e=tw().Readable,sw=tw().Writable,tvt=ve("string_decoder").StringDecoder,WQ=nj(),rvt=parseInt("755",8),nvt=parseInt("644",8),J2e=evt(1024),sj=function(){},ij=function(t,e){e&=511,e&&t.push(J2e.slice(0,512-e))};function ivt(t){switch(t&iw.S_IFMT){case iw.S_IFBLK:return"block-device";case iw.S_IFCHR:return"character-device";case iw.S_IFDIR:return"directory";case iw.S_IFIFO:return"fifo";case iw.S_IFLNK:return"symlink"}return"file"}var zQ=function(t){sw.call(this),this.written=0,this._to=t,this._destroyed=!1};KQ(zQ,sw);zQ.prototype._write=function(t,e,r){if(this.written+=t.length,this._to.push(t))return r();this._to._drain=r};zQ.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var VQ=function(){sw.call(this),this.linkname="",this._decoder=new tvt("utf-8"),this._destroyed=!1};KQ(VQ,sw);VQ.prototype._write=function(t,e,r){this.linkname+=this._decoder.write(t),r()};VQ.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var bv=function(){sw.call(this),this._destroyed=!1};KQ(bv,sw);bv.prototype._write=function(t,e,r){r(new Error("No body allowed for this entry"))};bv.prototype.destroy=function(){this._destroyed||(this._destroyed=!0,this.emit("close"))};var CA=function(t){if(!(this instanceof CA))return new CA(t);V2e.call(this,t),this._drain=sj,this._finalized=!1,this._finalizing=!1,this._destroyed=!1,this._stream=null};KQ(CA,V2e);CA.prototype.entry=function(t,e,r){if(this._stream)throw new Error("already piping an entry");if(!(this._finalized||this._destroyed)){typeof e=="function"&&(r=e,e=null),r||(r=sj);var o=this;if((!t.size||t.type==="symlink")&&(t.size=0),t.type||(t.type=ivt(t.mode)),t.mode||(t.mode=t.type==="directory"?rvt:nvt),t.uid||(t.uid=0),t.gid||(t.gid=0),t.mtime||(t.mtime=new Date),typeof e=="string"&&(e=Buffer.from(e)),Buffer.isBuffer(e)){t.size=e.length,this._encode(t);var a=this.push(e);return ij(o,t.size),a?process.nextTick(r):this._drain=r,new bv}if(t.type==="symlink"&&!t.linkname){var n=new VQ;return z2e(n,function(A){if(A)return o.destroy(),r(A);t.linkname=n.linkname,o._encode(t),r()}),n}if(this._encode(t),t.type!=="file"&&t.type!=="contiguous-file")return process.nextTick(r),new bv;var u=new zQ(this);return this._stream=u,z2e(u,function(A){if(o._stream=null,A)return o.destroy(),r(A);if(u.written!==t.size)return o.destroy(),r(new Error("size mismatch"));ij(o,t.size),o._finalizing&&o.finalize(),r()}),u}};CA.prototype.finalize=function(){if(this._stream){this._finalizing=!0;return}this._finalized||(this._finalized=!0,this.push(J2e),this.push(null))};CA.prototype.destroy=function(t){this._destroyed||(this._destroyed=!0,t&&this.emit("error",t),this.emit("close"),this._stream&&this._stream.destroy&&this._stream.destroy())};CA.prototype._encode=function(t){if(!t.pax){var e=WQ.encode(t);if(e){this.push(e);return}}this._encodePax(t)};CA.prototype._encodePax=function(t){var e=WQ.encodePax({name:t.name,linkname:t.linkname,pax:t.pax}),r={name:"PaxHeader",mode:t.mode,uid:t.uid,gid:t.gid,size:e.length,mtime:t.mtime,type:"pax-header",linkname:t.linkname&&"PaxHeader",uname:t.uname,gname:t.gname,devmajor:t.devmajor,devminor:t.devminor};this.push(WQ.encode(r)),this.push(e),ij(this,e.length),r.size=t.size,r.type=t.type,this.push(WQ.encode(r))};CA.prototype._read=function(t){var e=this._drain;this._drain=sj,e()};X2e.exports=CA});var $2e=_(oj=>{oj.extract=Y2e();oj.pack=Z2e()});var ABe=_((aer,uBe)=>{"use strict";var vm=class{constructor(e,r,o){this.__specs=e||{},Object.keys(this.__specs).forEach(a=>{if(typeof this.__specs[a]=="string"){let n=this.__specs[a],u=this.__specs[n];if(u){let A=u.aliases||[];A.push(a,n),u.aliases=[...new Set(A)],this.__specs[a]=u}else throw new Error(`Alias refers to invalid key: ${n} -> ${a}`)}}),this.__opts=r||{},this.__providers=lBe(o.filter(a=>a!=null&&typeof a=="object")),this.__isFiggyPudding=!0}get(e){return fj(this,e,!0)}get[Symbol.toStringTag](){return"FiggyPudding"}forEach(e,r=this){for(let[o,a]of this.entries())e.call(r,a,o,this)}toJSON(){let e={};return this.forEach((r,o)=>{e[o]=r}),e}*entries(e){for(let o of Object.keys(this.__specs))yield[o,this.get(o)];let r=e||this.__opts.other;if(r){let o=new Set;for(let a of this.__providers){let n=a.entries?a.entries(r):Evt(a);for(let[u,A]of n)r(u)&&!o.has(u)&&(o.add(u),yield[u,A])}}}*[Symbol.iterator](){for(let[e,r]of this.entries())yield[e,r]}*keys(){for(let[e]of this.entries())yield e}*values(){for(let[,e]of this.entries())yield e}concat(...e){return new Proxy(new vm(this.__specs,this.__opts,lBe(this.__providers).concat(e)),cBe)}};try{let t=ve("util");vm.prototype[t.inspect.custom]=function(e,r){return this[Symbol.toStringTag]+" "+t.inspect(this.toJSON(),r)}}catch{}function mvt(t){throw Object.assign(new Error(`invalid config key requested: ${t}`),{code:"EBADKEY"})}function fj(t,e,r){let o=t.__specs[e];if(r&&!o&&(!t.__opts.other||!t.__opts.other(e)))mvt(e);else{o||(o={});let a;for(let n of t.__providers){if(a=aBe(e,n),a===void 0&&o.aliases&&o.aliases.length){for(let u of o.aliases)if(u!==e&&(a=aBe(u,n),a!==void 0))break}if(a!==void 0)break}return a===void 0&&o.default!==void 0?typeof o.default=="function"?o.default(t):o.default:a}}function aBe(t,e){let r;return e.__isFiggyPudding?r=fj(e,t,!1):typeof e.get=="function"?r=e.get(t):r=e[t],r}var cBe={has(t,e){return e in t.__specs&&fj(t,e,!1)!==void 0},ownKeys(t){return Object.keys(t.__specs)},get(t,e){return typeof e=="symbol"||e.slice(0,2)==="__"||e in vm.prototype?t[e]:t.get(e)},set(t,e,r){if(typeof e=="symbol"||e.slice(0,2)==="__")return t[e]=r,!0;throw new Error("figgyPudding options cannot be modified. Use .concat() instead.")},deleteProperty(){throw new Error("figgyPudding options cannot be deleted. Use .concat() and shadow them instead.")}};uBe.exports=yvt;function yvt(t,e){function r(...o){return new Proxy(new vm(t,e,o),cBe)}return r}function lBe(t){let e=[];return t.forEach(r=>e.unshift(r)),e}function Evt(t){return Object.keys(t).map(e=>[e,t[e]])}});var hBe=_((ler,BA)=>{"use strict";var kv=ve("crypto"),Cvt=ABe(),wvt=ve("stream").Transform,fBe=["sha256","sha384","sha512"],Ivt=/^[a-z0-9+/]+(?:=?=?)$/i,Bvt=/^([^-]+)-([^?]+)([?\S*]*)$/,vvt=/^([^-]+)-([A-Za-z0-9+/=]{44,88})(\?[\x21-\x7E]*)*$/,Dvt=/^[\x21-\x7E]+$/,ia=Cvt({algorithms:{default:["sha512"]},error:{default:!1},integrity:{},options:{default:[]},pickAlgorithm:{default:()=>Rvt},Promise:{default:()=>Promise},sep:{default:" "},single:{default:!1},size:{},strict:{default:!1}}),H0=class{get isHash(){return!0}constructor(e,r){r=ia(r);let o=!!r.strict;this.source=e.trim();let a=this.source.match(o?vvt:Bvt);if(!a||o&&!fBe.some(u=>u===a[1]))return;this.algorithm=a[1],this.digest=a[2];let n=a[3];this.options=n?n.slice(1).split("?"):[]}hexDigest(){return this.digest&&Buffer.from(this.digest,"base64").toString("hex")}toJSON(){return this.toString()}toString(e){if(e=ia(e),e.strict&&!(fBe.some(o=>o===this.algorithm)&&this.digest.match(Ivt)&&(this.options||[]).every(o=>o.match(Dvt))))return"";let r=this.options&&this.options.length?`?${this.options.join("?")}`:"";return`${this.algorithm}-${this.digest}${r}`}},Dm=class{get isIntegrity(){return!0}toJSON(){return this.toString()}toString(e){e=ia(e);let r=e.sep||" ";return e.strict&&(r=r.replace(/\S+/g," ")),Object.keys(this).map(o=>this[o].map(a=>H0.prototype.toString.call(a,e)).filter(a=>a.length).join(r)).filter(o=>o.length).join(r)}concat(e,r){r=ia(r);let o=typeof e=="string"?e:xv(e,r);return IA(`${this.toString(r)} ${o}`,r)}hexDigest(){return IA(this,{single:!0}).hexDigest()}match(e,r){r=ia(r);let o=IA(e,r),a=o.pickAlgorithm(r);return this[a]&&o[a]&&this[a].find(n=>o[a].find(u=>n.digest===u.digest))||!1}pickAlgorithm(e){e=ia(e);let r=e.pickAlgorithm,o=Object.keys(this);if(!o.length)throw new Error(`No algorithms available for ${JSON.stringify(this.toString())}`);return o.reduce((a,n)=>r(a,n)||a)}};BA.exports.parse=IA;function IA(t,e){if(e=ia(e),typeof t=="string")return pj(t,e);if(t.algorithm&&t.digest){let r=new Dm;return r[t.algorithm]=[t],pj(xv(r,e),e)}else return pj(xv(t,e),e)}function pj(t,e){return e.single?new H0(t,e):t.trim().split(/\s+/).reduce((r,o)=>{let a=new H0(o,e);if(a.algorithm&&a.digest){let n=a.algorithm;r[n]||(r[n]=[]),r[n].push(a)}return r},new Dm)}BA.exports.stringify=xv;function xv(t,e){return e=ia(e),t.algorithm&&t.digest?H0.prototype.toString.call(t,e):typeof t=="string"?xv(IA(t,e),e):Dm.prototype.toString.call(t,e)}BA.exports.fromHex=Pvt;function Pvt(t,e,r){r=ia(r);let o=r.options&&r.options.length?`?${r.options.join("?")}`:"";return IA(`${e}-${Buffer.from(t,"hex").toString("base64")}${o}`,r)}BA.exports.fromData=Svt;function Svt(t,e){e=ia(e);let r=e.algorithms,o=e.options&&e.options.length?`?${e.options.join("?")}`:"";return r.reduce((a,n)=>{let u=kv.createHash(n).update(t).digest("base64"),A=new H0(`${n}-${u}${o}`,e);if(A.algorithm&&A.digest){let p=A.algorithm;a[p]||(a[p]=[]),a[p].push(A)}return a},new Dm)}BA.exports.fromStream=bvt;function bvt(t,e){e=ia(e);let r=e.Promise||Promise,o=hj(e);return new r((a,n)=>{t.pipe(o),t.on("error",n),o.on("error",n);let u;o.on("integrity",A=>{u=A}),o.on("end",()=>a(u)),o.on("data",()=>{})})}BA.exports.checkData=xvt;function xvt(t,e,r){if(r=ia(r),e=IA(e,r),!Object.keys(e).length){if(r.error)throw Object.assign(new Error("No valid integrity hashes to check against"),{code:"EINTEGRITY"});return!1}let o=e.pickAlgorithm(r),a=kv.createHash(o).update(t).digest("base64"),n=IA({algorithm:o,digest:a}),u=n.match(e,r);if(u||!r.error)return u;if(typeof r.size=="number"&&t.length!==r.size){let A=new Error(`data size mismatch when checking ${e}. Wanted: ${r.size} Found: ${t.length}`);throw A.code="EBADSIZE",A.found=t.length,A.expected=r.size,A.sri=e,A}else{let A=new Error(`Integrity checksum failed when using ${o}: Wanted ${e}, but got ${n}. (${t.length} bytes)`);throw A.code="EINTEGRITY",A.found=n,A.expected=e,A.algorithm=o,A.sri=e,A}}BA.exports.checkStream=kvt;function kvt(t,e,r){r=ia(r);let o=r.Promise||Promise,a=hj(r.concat({integrity:e}));return new o((n,u)=>{t.pipe(a),t.on("error",u),a.on("error",u);let A;a.on("verified",p=>{A=p}),a.on("end",()=>n(A)),a.on("data",()=>{})})}BA.exports.integrityStream=hj;function hj(t){t=ia(t);let e=t.integrity&&IA(t.integrity,t),r=e&&Object.keys(e).length,o=r&&e.pickAlgorithm(t),a=r&&e[o],n=Array.from(new Set(t.algorithms.concat(o?[o]:[]))),u=n.map(kv.createHash),A=0,p=new wvt({transform(h,E,I){A+=h.length,u.forEach(v=>v.update(h,E)),I(null,h,E)}}).on("end",()=>{let h=t.options&&t.options.length?`?${t.options.join("?")}`:"",E=IA(u.map((v,x)=>`${n[x]}-${v.digest("base64")}${h}`).join(" "),t),I=r&&E.match(e,t);if(typeof t.size=="number"&&A!==t.size){let v=new Error(`stream size mismatch when checking ${e}. Wanted: ${t.size} Found: ${A}`);v.code="EBADSIZE",v.found=A,v.expected=t.size,v.sri=e,p.emit("error",v)}else if(t.integrity&&!I){let v=new Error(`${e} integrity checksum failed when using ${o}: wanted ${a} but got ${E}. (${A} bytes)`);v.code="EINTEGRITY",v.found=E,v.expected=a,v.algorithm=o,v.sri=e,p.emit("error",v)}else p.emit("size",A),p.emit("integrity",E),I&&p.emit("verified",I)});return p}BA.exports.create=Qvt;function Qvt(t){t=ia(t);let e=t.algorithms,r=t.options.length?`?${t.options.join("?")}`:"",o=e.map(kv.createHash);return{update:function(a,n){return o.forEach(u=>u.update(a,n)),this},digest:function(a){return e.reduce((u,A)=>{let p=o.shift().digest("base64"),h=new H0(`${A}-${p}${r}`,t);if(h.algorithm&&h.digest){let E=h.algorithm;u[E]||(u[E]=[]),u[E].push(h)}return u},new Dm)}}}var Fvt=new Set(kv.getHashes()),pBe=["md5","whirlpool","sha1","sha224","sha256","sha384","sha512","sha3","sha3-256","sha3-384","sha3-512","sha3_256","sha3_384","sha3_512"].filter(t=>Fvt.has(t));function Rvt(t,e){return pBe.indexOf(t.toLowerCase())>=pBe.indexOf(e.toLowerCase())?t:e}});var GBe=_((Air,qBe)=>{var RDt=cN();function TDt(t){return RDt(t)?void 0:t}qBe.exports=TDt});var YBe=_((fir,jBe)=>{var LDt=Hb(),NDt=x8(),ODt=R8(),MDt=jd(),UDt=md(),_Dt=GBe(),HDt=v_(),qDt=b8(),GDt=1,jDt=2,YDt=4,WDt=HDt(function(t,e){var r={};if(t==null)return r;var o=!1;e=LDt(e,function(n){return n=MDt(n,t),o||(o=n.length>1),n}),UDt(t,qDt(t),r),o&&(r=NDt(r,GDt|jDt|YDt,_Dt));for(var a=e.length;a--;)ODt(r,e[a]);return r});jBe.exports=WDt});Pt();Ye();Pt();var JBe=ve("child_process"),XBe=$e(rd());qt();var AC=new Map([]);var a2={};zt(a2,{BaseCommand:()=>ut,WorkspaceRequiredError:()=>nr,getCli:()=>ehe,getDynamicLibs:()=>$pe,getPluginConfiguration:()=>pC,openWorkspace:()=>fC,pluginCommands:()=>AC,runExit:()=>nk});qt();var ut=class extends nt{constructor(){super(...arguments);this.cwd=ge.String("--cwd",{hidden:!0})}validateAndExecute(){if(typeof this.cwd<"u")throw new it("The --cwd option is ambiguous when used anywhere else than the very first parameter provided in the command line, before even the command path");return super.validateAndExecute()}};Ye();Pt();qt();var nr=class extends it{constructor(e,r){let o=z.relative(e,r),a=z.join(e,Ot.fileName);super(`This command can only be run from within a workspace of your project (${o} isn't a workspace of ${a}).`)}};Ye();Pt();iA();Nl();k1();qt();var TAt=$e(Jn());$a();var $pe=()=>new Map([["@yarnpkg/cli",a2],["@yarnpkg/core",o2],["@yarnpkg/fslib",zw],["@yarnpkg/libzip",x1],["@yarnpkg/parsers",rI],["@yarnpkg/shell",T1],["clipanion",hI],["semver",TAt],["typanion",zo]]);Ye();async function fC(t,e){let{project:r,workspace:o}=await St.find(t,e);if(!o)throw new nr(r.cwd,e);return o}Ye();Pt();iA();Nl();k1();qt();var tPt=$e(Jn());$a();var $8={};zt($8,{AddCommand:()=>Qh,BinCommand:()=>Fh,CacheCleanCommand:()=>Rh,ClipanionCommand:()=>zd,ConfigCommand:()=>Oh,ConfigGetCommand:()=>Th,ConfigSetCommand:()=>Lh,ConfigUnsetCommand:()=>Nh,DedupeCommand:()=>Mh,EntryCommand:()=>mC,ExecCommand:()=>Uh,ExplainCommand:()=>qh,ExplainPeerRequirementsCommand:()=>_h,HelpCommand:()=>Vd,InfoCommand:()=>Gh,LinkCommand:()=>Yh,NodeCommand:()=>Wh,PluginCheckCommand:()=>Kh,PluginImportCommand:()=>Jh,PluginImportSourcesCommand:()=>Xh,PluginListCommand:()=>zh,PluginRemoveCommand:()=>Zh,PluginRuntimeCommand:()=>$h,RebuildCommand:()=>e0,RemoveCommand:()=>t0,RunCommand:()=>r0,RunIndexCommand:()=>Zd,SetResolutionCommand:()=>n0,SetVersionCommand:()=>Hh,SetVersionSourcesCommand:()=>Vh,UnlinkCommand:()=>i0,UpCommand:()=>Vf,VersionCommand:()=>Jd,WhyCommand:()=>s0,WorkspaceCommand:()=>l0,WorkspacesListCommand:()=>a0,YarnCommand:()=>jh,dedupeUtils:()=>pk,default:()=>Sgt,suggestUtils:()=>Xc});var Qde=$e(rd());Ye();Ye();Ye();qt();var H0e=$e(f2());$a();var Xc={};zt(Xc,{Modifier:()=>B8,Strategy:()=>uk,Target:()=>p2,WorkspaceModifier:()=>N0e,applyModifier:()=>ept,extractDescriptorFromPath:()=>v8,extractRangeModifier:()=>O0e,fetchDescriptorFrom:()=>D8,findProjectDescriptors:()=>_0e,getModifier:()=>h2,getSuggestedDescriptors:()=>g2,makeWorkspaceDescriptor:()=>U0e,toWorkspaceModifier:()=>M0e});Ye();Ye();Pt();var I8=$e(Jn()),Zft="workspace:",p2=(o=>(o.REGULAR="dependencies",o.DEVELOPMENT="devDependencies",o.PEER="peerDependencies",o))(p2||{}),B8=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="",o))(B8||{}),N0e=(o=>(o.CARET="^",o.TILDE="~",o.EXACT="*",o))(N0e||{}),uk=(n=>(n.KEEP="keep",n.REUSE="reuse",n.PROJECT="project",n.LATEST="latest",n.CACHE="cache",n))(uk||{});function h2(t,e){return t.exact?"":t.caret?"^":t.tilde?"~":e.configuration.get("defaultSemverRangePrefix")}var $ft=/^([\^~]?)[0-9]+(?:\.[0-9]+){0,2}(?:-\S+)?$/;function O0e(t,{project:e}){let r=t.match($ft);return r?r[1]:e.configuration.get("defaultSemverRangePrefix")}function ept(t,e){let{protocol:r,source:o,params:a,selector:n}=W.parseRange(t.range);return I8.default.valid(n)&&(n=`${e}${t.range}`),W.makeDescriptor(t,W.makeRange({protocol:r,source:o,params:a,selector:n}))}function M0e(t){switch(t){case"^":return"^";case"~":return"~";case"":return"*";default:throw new Error(`Assertion failed: Unknown modifier: "${t}"`)}}function U0e(t,e){return W.makeDescriptor(t.anchoredDescriptor,`${Zft}${M0e(e)}`)}async function _0e(t,{project:e,target:r}){let o=new Map,a=n=>{let u=o.get(n.descriptorHash);return u||o.set(n.descriptorHash,u={descriptor:n,locators:[]}),u};for(let n of e.workspaces)if(r==="peerDependencies"){let u=n.manifest.peerDependencies.get(t.identHash);u!==void 0&&a(u).locators.push(n.anchoredLocator)}else{let u=n.manifest.dependencies.get(t.identHash),A=n.manifest.devDependencies.get(t.identHash);r==="devDependencies"?A!==void 0?a(A).locators.push(n.anchoredLocator):u!==void 0&&a(u).locators.push(n.anchoredLocator):u!==void 0?a(u).locators.push(n.anchoredLocator):A!==void 0&&a(A).locators.push(n.anchoredLocator)}return o}async function v8(t,{cwd:e,workspace:r}){return await tpt(async o=>{z.isAbsolute(t)||(t=z.relative(r.cwd,z.resolve(e,t)),t.match(/^\.{0,2}\//)||(t=`./${t}`));let{project:a}=r,n=await D8(W.makeIdent(null,"archive"),t,{project:r.project,cache:o,workspace:r});if(!n)throw new Error("Assertion failed: The descriptor should have been found");let u=new Qi,A=a.configuration.makeResolver(),p=a.configuration.makeFetcher(),h={checksums:a.storedChecksums,project:a,cache:o,fetcher:p,report:u,resolver:A},E=A.bindDescriptor(n,r.anchoredLocator,h),I=W.convertDescriptorToLocator(E),v=await p.fetch(I,h),x=await Ot.find(v.prefixPath,{baseFs:v.packageFs});if(!x.name)throw new Error("Target path doesn't have a name");return W.makeDescriptor(x.name,t)})}async function g2(t,{project:e,workspace:r,cache:o,target:a,fixed:n,modifier:u,strategies:A,maxResults:p=1/0}){if(!(p>=0))throw new Error(`Invalid maxResults (${p})`);let[h,E]=t.range!=="unknown"?n||kr.validRange(t.range)||!t.range.match(/^[a-z0-9._-]+$/i)?[t.range,"latest"]:["unknown",t.range]:["unknown","latest"];if(h!=="unknown")return{suggestions:[{descriptor:t,name:`Use ${W.prettyDescriptor(e.configuration,t)}`,reason:"(unambiguous explicit request)"}],rejections:[]};let I=typeof r<"u"&&r!==null&&r.manifest[a].get(t.identHash)||null,v=[],x=[],C=async R=>{try{await R()}catch(N){x.push(N)}};for(let R of A){if(v.length>=p)break;switch(R){case"keep":await C(async()=>{I&&v.push({descriptor:I,name:`Keep ${W.prettyDescriptor(e.configuration,I)}`,reason:"(no changes)"})});break;case"reuse":await C(async()=>{for(let{descriptor:N,locators:U}of(await _0e(t,{project:e,target:a})).values()){if(U.length===1&&U[0].locatorHash===r.anchoredLocator.locatorHash&&A.includes("keep"))continue;let V=`(originally used by ${W.prettyLocator(e.configuration,U[0])}`;V+=U.length>1?` and ${U.length-1} other${U.length>2?"s":""})`:")",v.push({descriptor:N,name:`Reuse ${W.prettyDescriptor(e.configuration,N)}`,reason:V})}});break;case"cache":await C(async()=>{for(let N of e.storedDescriptors.values())N.identHash===t.identHash&&v.push({descriptor:N,name:`Reuse ${W.prettyDescriptor(e.configuration,N)}`,reason:"(already used somewhere in the lockfile)"})});break;case"project":await C(async()=>{if(r.manifest.name!==null&&t.identHash===r.manifest.name.identHash)return;let N=e.tryWorkspaceByIdent(t);if(N===null)return;let U=U0e(N,u);v.push({descriptor:U,name:`Attach ${W.prettyDescriptor(e.configuration,U)}`,reason:`(local workspace at ${de.pretty(e.configuration,N.relativeCwd,de.Type.PATH)})`})});break;case"latest":{let N=e.configuration.get("enableNetwork"),U=e.configuration.get("enableOfflineMode");await C(async()=>{if(a==="peerDependencies")v.push({descriptor:W.makeDescriptor(t,"*"),name:"Use *",reason:"(catch-all peer dependency pattern)"});else if(!N&&!U)v.push({descriptor:null,name:"Resolve from latest",reason:de.pretty(e.configuration,"(unavailable because enableNetwork is toggled off)","grey")});else{let V=await D8(t,E,{project:e,cache:o,workspace:r,modifier:u});V&&v.push({descriptor:V,name:`Use ${W.prettyDescriptor(e.configuration,V)}`,reason:`(resolved from ${U?"the cache":"latest"})`})}})}break}}return{suggestions:v.slice(0,p),rejections:x.slice(0,p)}}async function D8(t,e,{project:r,cache:o,workspace:a,preserveModifier:n=!0,modifier:u}){let A=r.configuration.normalizeDependency(W.makeDescriptor(t,e)),p=new Qi,h=r.configuration.makeFetcher(),E=r.configuration.makeResolver(),I={project:r,fetcher:h,cache:o,checksums:r.storedChecksums,report:p,cacheOptions:{skipIntegrityCheck:!0}},v={...I,resolver:E,fetchOptions:I},x=E.bindDescriptor(A,a.anchoredLocator,v),C=await E.getCandidates(x,{},v);if(C.length===0)return null;let R=C[0],{protocol:N,source:U,params:V,selector:te}=W.parseRange(W.convertToManifestRange(R.reference));if(N===r.configuration.get("defaultProtocol")&&(N=null),I8.default.valid(te)){let ae=te;if(typeof u<"u")te=u+te;else if(n!==!1){let me=typeof n=="string"?n:A.range;te=O0e(me,{project:r})+te}let fe=W.makeDescriptor(R,W.makeRange({protocol:N,source:U,params:V,selector:te}));(await E.getCandidates(r.configuration.normalizeDependency(fe),{},v)).length!==1&&(te=ae)}return W.makeDescriptor(R,W.makeRange({protocol:N,source:U,params:V,selector:te}))}async function tpt(t){return await oe.mktempPromise(async e=>{let r=Ke.create(e);return r.useWithSource(e,{enableMirror:!1,compressionLevel:0},e,{overwrite:!0}),await t(new Nr(e,{configuration:r,check:!1,immutable:!1}))})}var Qh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.dev=ge.Boolean("-D,--dev",!1,{description:"Add a package as a dev dependency"});this.peer=ge.Boolean("-P,--peer",!1,{description:"Add a package as a peer dependency"});this.optional=ge.Boolean("-O,--optional",!1,{description:"Add / upgrade a package to an optional regular / peer dependency"});this.preferDev=ge.Boolean("--prefer-dev",!1,{description:"Add / upgrade a package to a dev dependency"});this.interactive=ge.Boolean("-i,--interactive",{description:"Reuse the specified package from other workspaces in the project"});this.cached=ge.Boolean("--cached",!1,{description:"Reuse the highest version already used somewhere within the project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:Ks(hl)});this.silent=ge.Boolean("--silent",{hidden:!0});this.packages=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=A||r.get("preferReuse"),h=h2(this,o),E=[p?"reuse":void 0,"project",this.cached?"cache":void 0,"latest"].filter(U=>typeof U<"u"),I=A?1/0:1,v=await Promise.all(this.packages.map(async U=>{let V=U.match(/^\.{0,2}\//)?await v8(U,{cwd:this.context.cwd,workspace:a}):W.tryParseDescriptor(U),te=U.match(/^(https?:|git@github)/);if(te)throw new it(`It seems you are trying to add a package using a ${de.pretty(r,`${te[0]}...`,de.Type.RANGE)} url; we now require package names to be explicitly specified. Try running the command again with the package name prefixed: ${de.pretty(r,"yarn add",de.Type.CODE)} ${de.pretty(r,W.makeDescriptor(W.makeIdent(null,"my-package"),`${te[0]}...`),de.Type.DESCRIPTOR)}`);if(!V)throw new it(`The ${de.pretty(r,U,de.Type.CODE)} string didn't match the required format (package-name@range). Did you perhaps forget to explicitly reference the package name?`);let ae=rpt(a,V,{dev:this.dev,peer:this.peer,preferDev:this.preferDev,optional:this.optional});return await Promise.all(ae.map(async ue=>{let me=await g2(V,{project:o,workspace:a,cache:n,fixed:u,target:ue,modifier:h,strategies:E,maxResults:I});return{request:V,suggestedDescriptors:me,target:ue}}))})).then(U=>U.flat()),x=await fA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async U=>{for(let{request:V,suggestedDescriptors:{suggestions:te,rejections:ae}}of v)if(te.filter(ue=>ue.descriptor!==null).length===0){let[ue]=ae;if(typeof ue>"u")throw new Error("Assertion failed: Expected an error to have been set");o.configuration.get("enableNetwork")?U.reportError(27,`${W.prettyDescriptor(r,V)} can't be resolved to a satisfying range`):U.reportError(27,`${W.prettyDescriptor(r,V)} can't be resolved to a satisfying range (note: network resolution has been disabled)`),U.reportSeparator(),U.reportExceptionOnce(ue)}});if(x.hasErrors())return x.exitCode();let C=!1,R=[],N=[];for(let{suggestedDescriptors:{suggestions:U},target:V}of v){let te,ae=U.filter(he=>he.descriptor!==null),fe=ae[0].descriptor,ue=ae.every(he=>W.areDescriptorsEqual(he.descriptor,fe));ae.length===1||ue?te=fe:(C=!0,{answer:te}=await(0,H0e.prompt)({type:"select",name:"answer",message:"Which range do you want to use?",choices:U.map(({descriptor:he,name:Be,reason:we})=>he?{name:Be,hint:we,descriptor:he}:{name:Be,hint:we,disabled:!0}),onCancel:()=>process.exit(130),result(he){return this.find(he,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=a.manifest[V].get(te.identHash);(typeof me>"u"||me.descriptorHash!==te.descriptorHash)&&(a.manifest[V].set(te.identHash,te),this.optional&&(V==="dependencies"?a.manifest.ensureDependencyMeta({...te,range:"unknown"}).optional=!0:V==="peerDependencies"&&(a.manifest.ensurePeerDependencyMeta({...te,range:"unknown"}).optional=!0)),typeof me>"u"?R.push([a,V,te,E]):N.push([a,V,me,te]))}return await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyAddition,R),await r.triggerMultipleHooks(U=>U.afterWorkspaceDependencyReplacement,N),C&&this.context.stdout.write(` `),await o.installWithNewReport({json:this.json,stdout:this.context.stdout,quiet:this.context.quiet},{cache:n,mode:this.mode})}};Qh.paths=[["add"]],Qh.usage=nt.Usage({description:"add dependencies to the project",details:"\n This command adds a package to the package.json for the nearest workspace.\n\n - If it didn't exist before, the package will by default be added to the regular `dependencies` field, but this behavior can be overriden thanks to the `-D,--dev` flag (which will cause the dependency to be added to the `devDependencies` field instead) and the `-P,--peer` flag (which will do the same but for `peerDependencies`).\n\n - If the package was already listed in your dependencies, it will by default be upgraded whether it's part of your `dependencies` or `devDependencies` (it won't ever update `peerDependencies`, though).\n\n - If set, the `--prefer-dev` flag will operate as a more flexible `-D,--dev` in that it will add the package to your `devDependencies` if it isn't already listed in either `dependencies` or `devDependencies`, but it will also happily upgrade your `dependencies` if that's what you already use (whereas `-D,--dev` would throw an exception).\n\n - If set, the `-O,--optional` flag will add the package to the `optionalDependencies` field and, in combination with the `-P,--peer` flag, it will add the package as an optional peer dependency. If the package was already listed in your `dependencies`, it will be upgraded to `optionalDependencies`. If the package was already listed in your `peerDependencies`, in combination with the `-P,--peer` flag, it will be upgraded to an optional peer dependency: `\"peerDependenciesMeta\": { \"\": { \"optional\": true } }`\n\n - If the added package doesn't specify a range at all its `latest` tag will be resolved and the returned version will be used to generate a new semver range (using the `^` modifier by default unless otherwise configured via the `defaultSemverRangePrefix` configuration, or the `~` modifier if `-T,--tilde` is specified, or no modifier at all if `-E,--exact` is specified). Two exceptions to this rule: the first one is that if the package is a workspace then its local version will be used, and the second one is that if you use `-P,--peer` the default range will be `*` and won't be resolved at all.\n\n - If the added package specifies a range (such as `^1.0.0`, `latest`, or `rc`), Yarn will add this range as-is in the resulting package.json entry (in particular, tags such as `rc` will be encoded as-is rather than being converted into a semver range).\n\n If the `--cached` option is used, Yarn will preferably reuse the highest version already used somewhere within the project, even if through a transitive dependency.\n\n If the `-i,--interactive` option is used (or if the `preferInteractive` settings is toggled on) the command will first try to check whether other workspaces in the project use the specified package and, if so, will offer to reuse them.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n For a compilation of all the supported protocols, please consult the dedicated page from our website: https://yarnpkg.com/protocols.\n ",examples:[["Add a regular package to the current workspace","$0 add lodash"],["Add a specific version for a package to the current workspace","$0 add lodash@1.2.3"],["Add a package from a GitHub repository (the master branch) to the current workspace using a URL","$0 add lodash@https://github.com/lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol","$0 add lodash@github:lodash/lodash"],["Add a package from a GitHub repository (the master branch) to the current workspace using the GitHub protocol (shorthand)","$0 add lodash@lodash/lodash"],["Add a package from a specific branch of a GitHub repository to the current workspace using the GitHub protocol (shorthand)","$0 add lodash-es@lodash/lodash#es"]]});function rpt(t,e,{dev:r,peer:o,preferDev:a,optional:n}){let u=t.manifest["dependencies"].has(e.identHash),A=t.manifest["devDependencies"].has(e.identHash),p=t.manifest["peerDependencies"].has(e.identHash);if((r||o)&&u)throw new it(`Package "${W.prettyIdent(t.project.configuration,e)}" is already listed as a regular dependency - remove the -D,-P flags or remove it from your dependencies first`);if(!r&&!o&&p)throw new it(`Package "${W.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - use either of -D or -P, or remove it from your peer dependencies first`);if(n&&A)throw new it(`Package "${W.prettyIdent(t.project.configuration,e)}" is already listed as a dev dependency - remove the -O flag or remove it from your dev dependencies first`);if(n&&!o&&p)throw new it(`Package "${W.prettyIdent(t.project.configuration,e)}" is already listed as a peer dependency - remove the -O flag or add the -P flag or remove it from your peer dependencies first`);if((r||a)&&n)throw new it(`Package "${W.prettyIdent(t.project.configuration,e)}" cannot simultaneously be a dev dependency and an optional dependency`);let h=[];return o&&h.push("peerDependencies"),(r||a)&&h.push("devDependencies"),n&&h.push("dependencies"),h.length>0?h:A?["devDependencies"]:p?["peerDependencies"]:["dependencies"]}Ye();Ye();qt();var Fh=class extends ut{constructor(){super(...arguments);this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Print both the binary name and the locator of the package that provides the binary"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.name=ge.String({required:!1})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await St.find(r,this.context.cwd);if(await o.restoreInstallState(),this.name){let A=(await un.getPackageAccessibleBinaries(a,{project:o})).get(this.name);if(!A)throw new it(`Couldn't find a binary named "${this.name}" for package "${W.prettyLocator(r,a)}"`);let[,p]=A;return this.context.stdout.write(`${p} `),0}return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async u=>{let A=await un.getPackageAccessibleBinaries(a,{project:o}),h=Array.from(A.keys()).reduce((E,I)=>Math.max(E,I.length),0);for(let[E,[I,v]]of A)u.reportJson({name:E,source:W.stringifyIdent(I),path:v});if(this.verbose)for(let[E,[I]]of A)u.reportInfo(null,`${E.padEnd(h," ")} ${W.prettyLocator(r,I)}`);else for(let E of A.keys())u.reportInfo(null,E)})).exitCode()}};Fh.paths=[["bin"]],Fh.usage=nt.Usage({description:"get the path to a binary script",details:` When used without arguments, this command will print the list of all the binaries available in the current workspace. Adding the \`-v,--verbose\` flag will cause the output to contain both the binary name and the locator of the package that provides the binary. When an argument is specified, this command will just print the path to the binary on the standard output and exit. Note that the reported path may be stored within a zip archive. `,examples:[["List all the available binaries","$0 bin"],["Print the path to a specific binary","$0 bin eslint"]]});Ye();Pt();qt();var Rh=class extends ut{constructor(){super(...arguments);this.mirror=ge.Boolean("--mirror",!1,{description:"Remove the global cache files instead of the local cache files"});this.all=ge.Boolean("--all",!1,{description:"Remove both the global cache files and the local cache files of the current project"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await Nr.find(r);return(await Lt.start({configuration:r,stdout:this.context.stdout},async()=>{let n=(this.all||this.mirror)&&o.mirrorCwd!==null,u=!this.mirror;n&&(await oe.removePromise(o.mirrorCwd),await r.triggerHook(A=>A.cleanGlobalArtifacts,r)),u&&await oe.removePromise(o.cwd)})).exitCode()}};Rh.paths=[["cache","clean"],["cache","clear"]],Rh.usage=nt.Usage({description:"remove the shared cache files",details:` This command will remove all the files from the cache. `,examples:[["Remove all the local archives","$0 cache clean"],["Remove all the archives stored in the ~/.yarn directory","$0 cache clean --mirror"]]});Ye();qt();var G0e=$e(d2()),P8=ve("util"),Th=class extends ut{constructor(){super(...arguments);this.why=ge.Boolean("--why",!1,{description:"Print the explanation for why a setting has its value"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.unsafe=ge.Boolean("--no-redacted",!1,{description:"Don't redact secrets (such as tokens) from the output"});this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=this.name.replace(/[.[].*$/,""),a=this.name.replace(/^[^.[]*/,"");if(typeof r.settings.get(o)>"u")throw new it(`Couldn't find a configuration settings named "${o}"`);let u=r.getSpecial(o,{hideSecrets:!this.unsafe,getNativePaths:!0}),A=_e.convertMapsToIndexableObjects(u),p=a?(0,G0e.default)(A,a):A,h=await Lt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async E=>{E.reportJson(p)});if(!this.json){if(typeof p=="string")return this.context.stdout.write(`${p} `),h.exitCode();P8.inspect.styles.name="cyan",this.context.stdout.write(`${(0,P8.inspect)(p,{depth:1/0,colors:r.get("enableColors"),compact:!1})} `)}return h.exitCode()}};Th.paths=[["config","get"]],Th.usage=nt.Usage({description:"read a configuration settings",details:` This command will print a configuration setting. Secrets (such as tokens) will be redacted from the output by default. If this behavior isn't desired, set the \`--no-redacted\` to get the untransformed value. `,examples:[["Print a simple configuration setting","yarn config get yarnPath"],["Print a complex configuration setting","yarn config get packageExtensions"],["Print a nested field from the configuration",`yarn config get 'npmScopes["my-company"].npmRegistryServer'`],["Print a token from the configuration","yarn config get npmAuthToken --no-redacted"],["Print a configuration setting as JSON","yarn config get packageExtensions --json"]]});Ye();qt();var Rge=$e(k8()),Tge=$e(d2()),Lge=$e(Q8()),F8=ve("util"),Lh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Set complex configuration settings to JSON values"});this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String();this.value=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new it("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new it(`Couldn't find a configuration settings named "${a}"`);if(a==="enableStrictSettings")throw new it("This setting only affects the file it's in, and thus cannot be set from the CLI");let A=this.json?JSON.parse(this.value):this.value;await(this.home?C=>Ke.updateHomeConfiguration(C):C=>Ke.updateConfiguration(o(),C))(C=>{if(n){let R=(0,Rge.default)(C);return(0,Lge.default)(R,this.name,A),R}else return{...C,[a]:A}});let E=(await Ke.find(this.context.cwd,this.context.plugins)).getSpecial(a,{hideSecrets:!0,getNativePaths:!0}),I=_e.convertMapsToIndexableObjects(E),v=n?(0,Tge.default)(I,n):I;return(await Lt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async C=>{F8.inspect.styles.name="cyan",C.reportInfo(0,`Successfully set ${this.name} to ${(0,F8.inspect)(v,{depth:1/0,colors:r.get("enableColors"),compact:!1})}`)})).exitCode()}};Lh.paths=[["config","set"]],Lh.usage=nt.Usage({description:"change a configuration settings",details:` This command will set a configuration setting. When used without the \`--json\` flag, it can only set a simple configuration setting (a string, a number, or a boolean). When used with the \`--json\` flag, it can set both simple and complex configuration settings, including Arrays and Objects. `,examples:[["Set a simple configuration setting (a string, a number, or a boolean)","yarn config set initScope myScope"],["Set a simple configuration setting (a string, a number, or a boolean) using the `--json` flag",'yarn config set initScope --json \\"myScope\\"'],["Set a complex configuration setting (an Array) using the `--json` flag",`yarn config set unsafeHttpWhitelist --json '["*.example.com", "example.com"]'`],["Set a complex configuration setting (an Object) using the `--json` flag",`yarn config set packageExtensions --json '{ "@babel/parser@*": { "dependencies": { "@babel/types": "*" } } }'`],["Set a nested configuration setting",'yarn config set npmScopes.company.npmRegistryServer "https://npm.example.com"'],["Set a nested configuration setting using indexed access for non-simple keys",`yarn config set 'npmRegistries["//npm.example.com"].npmAuthToken' "ffffffff-ffff-ffff-ffff-ffffffffffff"`]]});Ye();qt();var Wge=$e(k8()),Kge=$e(Uge()),zge=$e(T8()),Nh=class extends ut{constructor(){super(...arguments);this.home=ge.Boolean("-H,--home",!1,{description:"Update the home configuration instead of the project configuration"});this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=()=>{if(!r.projectCwd)throw new it("This command must be run from within a project folder");return r.projectCwd},a=this.name.replace(/[.[].*$/,""),n=this.name.replace(/^[^.[]*\.?/,"");if(typeof r.settings.get(a)>"u")throw new it(`Couldn't find a configuration settings named "${a}"`);let A=this.home?h=>Ke.updateHomeConfiguration(h):h=>Ke.updateConfiguration(o(),h);return(await Lt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout},async h=>{let E=!1;await A(I=>{if(!(0,Kge.default)(I,this.name))return h.reportWarning(0,`Configuration doesn't contain setting ${this.name}; there is nothing to unset`),E=!0,I;let v=n?(0,Wge.default)(I):{...I};return(0,zge.default)(v,this.name),v}),E||h.reportInfo(0,`Successfully unset ${this.name}`)})).exitCode()}};Nh.paths=[["config","unset"]],Nh.usage=nt.Usage({description:"unset a configuration setting",details:` This command will unset a configuration setting. `,examples:[["Unset a simple configuration setting","yarn config unset initScope"],["Unset a complex configuration setting","yarn config unset packageExtensions"],["Unset a nested configuration setting","yarn config unset npmScopes.company.npmRegistryServer"]]});Ye();Pt();qt();var fk=ve("util"),Oh=class extends ut{constructor(){super(...arguments);this.noDefaults=ge.Boolean("--no-defaults",!1,{description:"Omit the default values from the display"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.verbose=ge.Boolean("-v,--verbose",{hidden:!0});this.why=ge.Boolean("--why",{hidden:!0});this.names=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins,{strict:!1}),o=await NE({configuration:r,stdout:this.context.stdout,forceError:this.json},[{option:this.verbose,message:"The --verbose option is deprecated, the settings' descriptions are now always displayed"},{option:this.why,message:"The --why option is deprecated, the settings' sources are now always displayed"}]);if(o!==null)return o;let a=this.names.length>0?[...new Set(this.names)].sort():[...r.settings.keys()].sort(),n,u=await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async A=>{if(r.invalid.size>0&&!this.json){for(let[p,h]of r.invalid)A.reportError(34,`Invalid configuration key "${p}" in ${h}`);A.reportSeparator()}if(this.json)for(let p of a){let h=r.settings.get(p);typeof h>"u"&&A.reportError(34,`No configuration key named "${p}"`);let E=r.getSpecial(p,{hideSecrets:!0,getNativePaths:!0}),I=r.sources.get(p)??"",v=I&&I[0]!=="<"?le.fromPortablePath(I):I;A.reportJson({key:p,effective:E,source:v,...h})}else{let p={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},h={},E={children:h};for(let I of a){if(this.noDefaults&&!r.sources.has(I))continue;let v=r.settings.get(I),x=r.sources.get(I)??"",C=r.getSpecial(I,{hideSecrets:!0,getNativePaths:!0}),R={Description:{label:"Description",value:de.tuple(de.Type.MARKDOWN,{text:v.description,format:this.cli.format(),paragraphs:!1})},Source:{label:"Source",value:de.tuple(x[0]==="<"?de.Type.CODE:de.Type.PATH,x)}};h[I]={value:de.tuple(de.Type.CODE,I),children:R};let N=(U,V)=>{for(let[te,ae]of V)if(ae instanceof Map){let fe={};U[te]={children:fe},N(fe,ae)}else U[te]={label:te,value:de.tuple(de.Type.NO_HINT,(0,fk.inspect)(ae,p))}};C instanceof Map?N(R,C):R.Value={label:"Value",value:de.tuple(de.Type.NO_HINT,(0,fk.inspect)(C,p))}}a.length!==1&&(n=void 0),$s.emitTree(E,{configuration:r,json:this.json,stdout:this.context.stdout,separators:2})}});if(!this.json&&typeof n<"u"){let A=a[0],p=(0,fk.inspect)(r.getSpecial(A,{hideSecrets:!0,getNativePaths:!0}),{colors:r.get("enableColors")});this.context.stdout.write(` `),this.context.stdout.write(`${p} `)}return u.exitCode()}};Oh.paths=[["config"]],Oh.usage=nt.Usage({description:"display the current configuration",details:` This command prints the current active configuration settings. `,examples:[["Print the active configuration settings","$0 config"]]});Ye();qt();$a();var pk={};zt(pk,{Strategy:()=>m2,acceptedStrategies:()=>M0t,dedupe:()=>L8});Ye();Ye();var Vge=$e(Zo()),m2=(e=>(e.HIGHEST="highest",e))(m2||{}),M0t=new Set(Object.values(m2)),U0t={highest:async(t,e,{resolver:r,fetcher:o,resolveOptions:a,fetchOptions:n})=>{let u=new Map;for(let[p,h]of t.storedResolutions){let E=t.storedDescriptors.get(p);if(typeof E>"u")throw new Error(`Assertion failed: The descriptor (${p}) should have been registered`);_e.getSetWithDefault(u,E.identHash).add(h)}let A=new Map(_e.mapAndFilter(t.storedDescriptors.values(),p=>W.isVirtualDescriptor(p)?_e.mapAndFilter.skip:[p.descriptorHash,_e.makeDeferred()]));for(let p of t.storedDescriptors.values()){let h=A.get(p.descriptorHash);if(typeof h>"u")throw new Error(`Assertion failed: The descriptor (${p.descriptorHash}) should have been registered`);let E=t.storedResolutions.get(p.descriptorHash);if(typeof E>"u")throw new Error(`Assertion failed: The resolution (${p.descriptorHash}) should have been registered`);let I=t.originalPackages.get(E);if(typeof I>"u")throw new Error(`Assertion failed: The package (${E}) should have been registered`);Promise.resolve().then(async()=>{let v=r.getResolutionDependencies(p,a),x=Object.fromEntries(await _e.allSettledSafe(Object.entries(v).map(async([te,ae])=>{let fe=A.get(ae.descriptorHash);if(typeof fe>"u")throw new Error(`Assertion failed: The descriptor (${ae.descriptorHash}) should have been registered`);let ue=await fe.promise;if(!ue)throw new Error("Assertion failed: Expected the dependency to have been through the dedupe process itself");return[te,ue.updatedPackage]})));if(e.length&&!Vge.default.isMatch(W.stringifyIdent(p),e)||!r.shouldPersistResolution(I,a))return I;let C=u.get(p.identHash);if(typeof C>"u")throw new Error(`Assertion failed: The resolutions (${p.identHash}) should have been registered`);if(C.size===1)return I;let R=[...C].map(te=>{let ae=t.originalPackages.get(te);if(typeof ae>"u")throw new Error(`Assertion failed: The package (${te}) should have been registered`);return ae}),N=await r.getSatisfying(p,x,R,a),U=N.locators?.[0];if(typeof U>"u"||!N.sorted)return I;let V=t.originalPackages.get(U.locatorHash);if(typeof V>"u")throw new Error(`Assertion failed: The package (${U.locatorHash}) should have been registered`);return V}).then(async v=>{let x=await t.preparePackage(v,{resolver:r,resolveOptions:a});h.resolve({descriptor:p,currentPackage:I,updatedPackage:v,resolvedPackage:x})}).catch(v=>{h.reject(v)})}return[...A.values()].map(p=>p.promise)}};async function L8(t,{strategy:e,patterns:r,cache:o,report:a}){let{configuration:n}=t,u=new Qi,A=n.makeResolver(),p=n.makeFetcher(),h={cache:o,checksums:t.storedChecksums,fetcher:p,project:t,report:u,cacheOptions:{skipIntegrityCheck:!0}},E={project:t,resolver:A,report:u,fetchOptions:h};return await a.startTimerPromise("Deduplication step",async()=>{let I=U0t[e],v=await I(t,r,{resolver:A,resolveOptions:E,fetcher:p,fetchOptions:h}),x=Xs.progressViaCounter(v.length);await a.reportProgress(x);let C=0;await Promise.all(v.map(U=>U.then(V=>{if(V===null||V.currentPackage.locatorHash===V.updatedPackage.locatorHash)return;C++;let{descriptor:te,currentPackage:ae,updatedPackage:fe}=V;a.reportInfo(0,`${W.prettyDescriptor(n,te)} can be deduped from ${W.prettyLocator(n,ae)} to ${W.prettyLocator(n,fe)}`),a.reportJson({descriptor:W.stringifyDescriptor(te),currentResolution:W.stringifyLocator(ae),updatedResolution:W.stringifyLocator(fe)}),t.storedResolutions.set(te.descriptorHash,fe.locatorHash)}).finally(()=>x.tick())));let R;switch(C){case 0:R="No packages";break;case 1:R="One package";break;default:R=`${C} packages`}let N=de.pretty(n,e,de.Type.CODE);return a.reportInfo(0,`${R} can be deduped using the ${N} strategy`),C})}var Mh=class extends ut{constructor(){super(...arguments);this.strategy=ge.String("-s,--strategy","highest",{description:"The strategy to use when deduping dependencies",validator:Ks(m2)});this.check=ge.Boolean("-c,--check",!1,{description:"Exit with exit code 1 when duplicates are found, without persisting the dependency tree"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:Ks(hl)});this.patterns=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=await Nr.find(r);await o.restoreInstallState({restoreResolutions:!1});let n=0,u=await Lt.start({configuration:r,includeFooter:!1,stdout:this.context.stdout,json:this.json},async A=>{n=await L8(o,{strategy:this.strategy,patterns:this.patterns,cache:a,report:A})});return u.hasErrors()?u.exitCode():this.check?n?1:0:await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:a,mode:this.mode})}};Mh.paths=[["dedupe"]],Mh.usage=nt.Usage({description:"deduplicate dependencies with overlapping ranges",details:"\n Duplicates are defined as descriptors with overlapping ranges being resolved and locked to different locators. They are a natural consequence of Yarn's deterministic installs, but they can sometimes pile up and unnecessarily increase the size of your project.\n\n This command dedupes dependencies in the current project using different strategies (only one is implemented at the moment):\n\n - `highest`: Reuses (where possible) the locators with the highest versions. This means that dependencies can only be upgraded, never downgraded. It's also guaranteed that it never takes more than a single pass to dedupe the entire dependency tree.\n\n **Note:** Even though it never produces a wrong dependency tree, this command should be used with caution, as it modifies the dependency tree, which can sometimes cause problems when packages don't strictly follow semver recommendations. Because of this, it is recommended to also review the changes manually.\n\n If set, the `-c,--check` flag will only report the found duplicates, without persisting the modified dependency tree. If changes are found, the command will exit with a non-zero exit code, making it suitable for CI purposes.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n ### In-depth explanation:\n\n Yarn doesn't deduplicate dependencies by default, otherwise installs wouldn't be deterministic and the lockfile would be useless. What it actually does is that it tries to not duplicate dependencies in the first place.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@*`will cause Yarn to reuse `foo@2.3.4`, even if the latest `foo` is actually `foo@2.10.14`, thus preventing unnecessary duplication.\n\n Duplication happens when Yarn can't unlock dependencies that have already been locked inside the lockfile.\n\n **Example:** If `foo@^2.3.4` (a dependency of a dependency) has already been resolved to `foo@2.3.4`, running `yarn add foo@2.10.14` will cause Yarn to install `foo@2.10.14` because the existing resolution doesn't satisfy the range `2.10.14`. This behavior can lead to (sometimes) unwanted duplication, since now the lockfile contains 2 separate resolutions for the 2 `foo` descriptors, even though they have overlapping ranges, which means that the lockfile can be simplified so that both descriptors resolve to `foo@2.10.14`.\n ",examples:[["Dedupe all packages","$0 dedupe"],["Dedupe all packages using a specific strategy","$0 dedupe --strategy highest"],["Dedupe a specific package","$0 dedupe lodash"],["Dedupe all packages with the `@babel/*` scope","$0 dedupe '@babel/*'"],["Check for duplicates (can be used as a CI step)","$0 dedupe --check"]]});Ye();qt();var zd=class extends ut{async execute(){let{plugins:e}=await Ke.find(this.context.cwd,this.context.plugins),r=[];for(let u of e){let{commands:A}=u[1];if(A){let h=as.from(A).definitions();r.push([u[0],h])}}let o=this.cli.definitions(),a=(u,A)=>u.split(" ").slice(1).join()===A.split(" ").slice(1).join(),n=Jge()["@yarnpkg/builder"].bundles.standard;for(let u of r){let A=u[1];for(let p of A)o.find(h=>a(h.path,p.path)).plugin={name:u[0],isDefault:n.includes(u[0])}}this.context.stdout.write(`${JSON.stringify(o,null,2)} `)}};zd.paths=[["--clipanion=definitions"]];var Vd=class extends ut{async execute(){this.context.stdout.write(this.cli.usage(null))}};Vd.paths=[["help"],["--help"],["-h"]];Ye();Pt();qt();var mC=class extends ut{constructor(){super(...arguments);this.leadingArgument=ge.String();this.args=ge.Proxy()}async execute(){if(this.leadingArgument.match(/[\\/]/)&&!W.tryParseIdent(this.leadingArgument)){let r=z.resolve(this.context.cwd,le.toPortablePath(this.leadingArgument));return await this.cli.run(this.args,{cwd:r})}else return await this.cli.run(["run",this.leadingArgument,...this.args])}};Ye();var Jd=class extends ut{async execute(){this.context.stdout.write(`${rn||""} `)}};Jd.paths=[["-v"],["--version"]];Ye();Ye();qt();var Uh=class extends ut{constructor(){super(...arguments);this.commandName=ge.String();this.args=ge.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,locator:a}=await St.find(r,this.context.cwd);return await o.restoreInstallState(),await un.executePackageShellcode(a,this.commandName,this.args,{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,project:o})}};Uh.paths=[["exec"]],Uh.usage=nt.Usage({description:"execute a shell script",details:` This command simply executes a shell script within the context of the root directory of the active workspace using the portable shell. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment). `,examples:[["Execute a single shell command","$0 exec echo Hello World"],["Execute a shell script",'$0 exec "tsc & babel src --out-dir lib"']]});Ye();qt();$a();var _h=class extends ut{constructor(){super(...arguments);this.hash=ge.String({validator:oP(Cy(),[oI(/^p[0-9a-f]{5}$/)])})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);return await o.restoreInstallState({restoreResolutions:!1}),await o.applyLightResolution(),await H0t(this.hash,o,{stdout:this.context.stdout})}};_h.paths=[["explain","peer-requirements"]],_h.usage=nt.Usage({description:"explain a set of peer requirements",details:` A set of peer requirements represents all peer requirements that a dependent must satisfy when providing a given peer request to a requester and its descendants. When the hash argument is specified, this command prints a detailed explanation of all requirements of the set corresponding to the hash and whether they're satisfied or not. When used without arguments, this command lists all sets of peer requirements and the corresponding hash that can be used to get detailed information about a given set. **Note:** A hash is a six-letter p-prefixed code that can be obtained from peer dependency warnings or from the list of all peer requirements (\`yarn explain peer-requirements\`). `,examples:[["Explain the corresponding set of peer requirements for a hash","$0 explain peer-requirements p1a4ed"],["List all sets of peer requirements","$0 explain peer-requirements"]]});async function H0t(t,e,r){let o=e.peerWarnings.find(n=>n.hash===t);if(typeof o>"u")throw new Error(`No peerDependency requirements found for hash: "${t}"`);return(await Lt.start({configuration:e.configuration,stdout:r.stdout,includeFooter:!1,includePrefix:!1},async n=>{let u=de.mark(e.configuration);switch(o.type){case 2:{n.reportInfo(0,`We have a problem with ${de.pretty(e.configuration,o.requested,de.Type.IDENT)}, which is provided with version ${W.prettyReference(e.configuration,o.version)}.`),n.reportInfo(0,"It is needed by the following direct dependencies of workspaces in your project:"),n.reportSeparator();for(let h of o.requesters.values()){let E=e.storedPackages.get(h.locatorHash);if(!E)throw new Error("Assertion failed: Expected the package to be registered");let I=E?.peerDependencies.get(o.requested.identHash);if(!I)throw new Error("Assertion failed: Expected the package to list the peer dependency");let v=kr.satisfiesWithPrereleases(o.version,I.range)?u.Check:u.Cross;n.reportInfo(null,` ${v} ${W.prettyLocator(e.configuration,h)} (via ${W.prettyRange(e.configuration,I.range)})`)}let A=[...o.links.values()].filter(h=>!o.requesters.has(h.locatorHash));if(A.length>0){n.reportSeparator(),n.reportInfo(0,`However, those packages themselves have more dependencies listing ${W.prettyIdent(e.configuration,o.requested)} as peer dependency:`),n.reportSeparator();for(let h of A){let E=e.storedPackages.get(h.locatorHash);if(!E)throw new Error("Assertion failed: Expected the package to be registered");let I=E?.peerDependencies.get(o.requested.identHash);if(!I)throw new Error("Assertion failed: Expected the package to list the peer dependency");let v=kr.satisfiesWithPrereleases(o.version,I.range)?u.Check:u.Cross;n.reportInfo(null,` ${v} ${W.prettyLocator(e.configuration,h)} (via ${W.prettyRange(e.configuration,I.range)})`)}}let p=Array.from(o.links.values(),h=>{let E=e.storedPackages.get(h.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: Expected the package to be registered");let I=E.peerDependencies.get(o.requested.identHash);if(typeof I>"u")throw new Error("Assertion failed: Expected the ident to be registered");return I.range});if(p.length>1){let h=kr.simplifyRanges(p);n.reportSeparator(),h===null?(n.reportInfo(0,"Unfortunately, put together, we found no single range that can satisfy all those peer requirements."),n.reportInfo(0,`Your best option may be to try to upgrade some dependencies with ${de.pretty(e.configuration,"yarn up",de.Type.CODE)}, or silence the warning via ${de.pretty(e.configuration,"logFilters",de.Type.CODE)}.`)):n.reportInfo(0,`Put together, the final range we computed is ${de.pretty(e.configuration,h,de.Type.RANGE)}`)}}break;default:n.reportInfo(0,`The ${de.pretty(e.configuration,"yarn explain peer-requirements",de.Type.CODE)} command doesn't support this warning type yet.`);break}})).exitCode()}Ye();qt();$a();Ye();Ye();Pt();qt();var Xge=$e(Jn()),Hh=class extends ut{constructor(){super(...arguments);this.useYarnPath=ge.Boolean("--yarn-path",{description:"Set the yarnPath setting even if the version can be accessed by Corepack"});this.onlyIfNeeded=ge.Boolean("--only-if-needed",!1,{description:"Only lock the Yarn version if it isn't already locked"});this.version=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);if(this.onlyIfNeeded&&r.get("yarnPath")){let A=r.sources.get("yarnPath");if(!A)throw new Error("Assertion failed: Expected 'yarnPath' to have a source");let p=r.projectCwd??r.startingCwd;if(z.contains(p,A))return 0}let o=()=>{if(typeof rn>"u")throw new it("The --install flag can only be used without explicit version specifier from the Yarn CLI");return`file://${process.argv[1]}`},a,n=(A,p)=>({version:p,url:A.replace(/\{\}/g,p)});if(this.version==="self")a={url:o(),version:rn??"self"};else if(this.version==="latest"||this.version==="berry"||this.version==="stable")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await y2(r,"stable"));else if(this.version==="canary")a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await y2(r,"canary"));else if(this.version==="classic")a={url:"https://classic.yarnpkg.com/latest.js",version:"classic"};else if(this.version.match(/^https?:/))a={url:this.version,version:"remote"};else if(this.version.match(/^\.{0,2}[\\/]/)||le.isAbsolute(this.version))a={url:`file://${z.resolve(le.toPortablePath(this.version))}`,version:"file"};else if(kr.satisfiesWithPrereleases(this.version,">=2.0.0"))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",this.version);else if(kr.satisfiesWithPrereleases(this.version,"^0.x || ^1.x"))a=n("https://github.com/yarnpkg/yarn/releases/download/v{}/yarn-{}.js",this.version);else if(kr.validRange(this.version))a=n("https://repo.yarnpkg.com/{}/packages/yarnpkg-cli/bin/yarn.js",await q0t(r,this.version));else throw new it(`Invalid version descriptor "${this.version}"`);return(await Lt.start({configuration:r,stdout:this.context.stdout,includeLogs:!this.context.quiet},async A=>{let p=async()=>{let h="file://";return a.url.startsWith(h)?(A.reportInfo(0,`Retrieving ${de.pretty(r,a.url,de.Type.PATH)}`),await oe.readFilePromise(a.url.slice(h.length))):(A.reportInfo(0,`Downloading ${de.pretty(r,a.url,de.Type.URL)}`),await nn.get(a.url,{configuration:r}))};await N8(r,a.version,p,{report:A,useYarnPath:this.useYarnPath})})).exitCode()}};Hh.paths=[["set","version"]],Hh.usage=nt.Usage({description:"lock the Yarn version used by the project",details:"\n This command will set a specific release of Yarn to be used by Corepack: https://nodejs.org/api/corepack.html.\n\n By default it only will set the `packageManager` field at the root of your project, but if the referenced release cannot be represented this way, if you already have `yarnPath` configured, or if you set the `--yarn-path` command line flag, then the release will also be downloaded from the Yarn GitHub repository, stored inside your project, and referenced via the `yarnPath` settings from your project `.yarnrc.yml` file.\n\n A very good use case for this command is to enforce the version of Yarn used by any single member of your team inside the same project - by doing this you ensure that you have control over Yarn upgrades and downgrades (including on your deployment servers), and get rid of most of the headaches related to someone using a slightly different version and getting different behavior.\n\n The version specifier can be:\n\n - a tag:\n - `latest` / `berry` / `stable` -> the most recent stable berry (`>=2.0.0`) release\n - `canary` -> the most recent canary (release candidate) berry (`>=2.0.0`) release\n - `classic` -> the most recent classic (`^0.x || ^1.x`) release\n\n - a semver range (e.g. `2.x`) -> the most recent version satisfying the range (limited to berry releases)\n\n - a semver version (e.g. `2.4.1`, `1.22.1`)\n\n - a local file referenced through either a relative or absolute path\n\n - `self` -> the version used to invoke the command\n ",examples:[["Download the latest release from the Yarn repository","$0 set version latest"],["Download the latest canary release from the Yarn repository","$0 set version canary"],["Download the latest classic release from the Yarn repository","$0 set version classic"],["Download the most recent Yarn 3 build","$0 set version 3.x"],["Download a specific Yarn 2 build","$0 set version 2.0.0-rc.30"],["Switch back to a specific Yarn 1 release","$0 set version 1.22.1"],["Use a release from the local filesystem","$0 set version ./yarn.cjs"],["Use a release from a URL","$0 set version https://repo.yarnpkg.com/3.1.0/packages/yarnpkg-cli/bin/yarn.js"],["Download the version used to invoke the command","$0 set version self"]]});async function q0t(t,e){let o=(await nn.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0})).tags.filter(a=>kr.satisfiesWithPrereleases(a,e));if(o.length===0)throw new it(`No matching release found for range ${de.pretty(t,e,de.Type.RANGE)}.`);return o[0]}async function y2(t,e){let r=await nn.get("https://repo.yarnpkg.com/tags",{configuration:t,jsonResponse:!0});if(!r.latest[e])throw new it(`Tag ${de.pretty(t,e,de.Type.RANGE)} not found`);return r.latest[e]}async function N8(t,e,r,{report:o,useYarnPath:a}){let n,u=async()=>(typeof n>"u"&&(n=await r()),n);if(e===null){let te=await u();await oe.mktempPromise(async ae=>{let fe=z.join(ae,"yarn.cjs");await oe.writeFilePromise(fe,te);let{stdout:ue}=await Ur.execvp(process.execPath,[le.fromPortablePath(fe),"--version"],{cwd:ae,env:{...t.env,YARN_IGNORE_PATH:"1"}});if(e=ue.trim(),!Xge.default.valid(e))throw new Error(`Invalid semver version. ${de.pretty(t,"yarn --version",de.Type.CODE)} returned: ${e}`)})}let A=t.projectCwd??t.startingCwd,p=z.resolve(A,".yarn/releases"),h=z.resolve(p,`yarn-${e}.cjs`),E=z.relative(t.startingCwd,h),I=_e.isTaggedYarnVersion(e),v=t.get("yarnPath"),x=!I,C=x||!!v||!!a;if(a===!1){if(x)throw new Jt(0,"You explicitly opted out of yarnPath usage in your command line, but the version you specified cannot be represented by Corepack");C=!1}else!C&&!process.env.COREPACK_ROOT&&(o.reportWarning(0,`You don't seem to have ${de.applyHyperlink(t,"Corepack","https://nodejs.org/api/corepack.html")} enabled; we'll have to rely on ${de.applyHyperlink(t,"yarnPath","https://yarnpkg.com/configuration/yarnrc#yarnPath")} instead`),C=!0);if(C){let te=await u();o.reportInfo(0,`Saving the new release in ${de.pretty(t,E,"magenta")}`),await oe.removePromise(z.dirname(h)),await oe.mkdirPromise(z.dirname(h),{recursive:!0}),await oe.writeFilePromise(h,te,{mode:493}),await Ke.updateConfiguration(A,{yarnPath:z.relative(A,h)})}else await oe.removePromise(z.dirname(h)),await Ke.updateConfiguration(A,{yarnPath:Ke.deleteProperty});let R=await Ot.tryFind(A)||new Ot;R.packageManager=`yarn@${I?e:await y2(t,"stable")}`;let N={};R.exportTo(N);let U=z.join(A,Ot.fileName),V=`${JSON.stringify(N,null,R.indent)} `;return await oe.changeFilePromise(U,V,{automaticNewlines:!0}),{bundleVersion:e}}function Zge(t){return wr[AP(t)]}var G0t=/## (?YN[0-9]{4}) - `(?[A-Z_]+)`\n\n(?
(?:.(?!##))+)/gs;async function j0t(t){let r=`https://repo.yarnpkg.com/${_e.isTaggedYarnVersion(rn)?rn:await y2(t,"canary")}/packages/gatsby/content/advanced/error-codes.md`,o=await nn.get(r,{configuration:t});return new Map(Array.from(o.toString().matchAll(G0t),({groups:a})=>{if(!a)throw new Error("Assertion failed: Expected the match to have been successful");let n=Zge(a.code);if(a.name!==n)throw new Error(`Assertion failed: Invalid error code data: Expected "${a.name}" to be named "${n}"`);return[a.code,a.details]}))}var qh=class extends ut{constructor(){super(...arguments);this.code=ge.String({required:!1,validator:aI(Cy(),[oI(/^YN[0-9]{4}$/)])});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);if(typeof this.code<"u"){let o=Zge(this.code),a=de.pretty(r,o,de.Type.CODE),n=this.cli.format().header(`${this.code} - ${a}`),A=(await j0t(r)).get(this.code),p=typeof A<"u"?de.jsonOrPretty(this.json,r,de.tuple(de.Type.MARKDOWN,{text:A,format:this.cli.format(),paragraphs:!0})):`This error code does not have a description. You can help us by editing this page on GitHub \u{1F642}: ${de.jsonOrPretty(this.json,r,de.tuple(de.Type.URL,"https://github.com/yarnpkg/berry/blob/master/packages/gatsby/content/advanced/error-codes.md"))} `;this.json?this.context.stdout.write(`${JSON.stringify({code:this.code,name:o,details:p})} `):this.context.stdout.write(`${n} ${p} `)}else{let o={children:_e.mapAndFilter(Object.entries(wr),([a,n])=>Number.isNaN(Number(a))?_e.mapAndFilter.skip:{label:Ku(Number(a)),value:de.tuple(de.Type.CODE,n)})};$s.emitTree(o,{configuration:r,stdout:this.context.stdout,json:this.json})}}};qh.paths=[["explain"]],qh.usage=nt.Usage({description:"explain an error code",details:` When the code argument is specified, this command prints its name and its details. When used without arguments, this command lists all error codes and their names. `,examples:[["Explain an error code","$0 explain YN0006"],["List all error codes","$0 explain"]]});Ye();Pt();qt();var $ge=$e(Zo()),Gh=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Print versions of a package from the whole project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Print information for all packages, including transitive dependencies"});this.extra=ge.Array("-X,--extra",[],{description:"An array of requests of extra data provided by plugins"});this.cache=ge.Boolean("--cache",!1,{description:"Print information about the cache entry of a package (path, size, checksum)"});this.dependents=ge.Boolean("--dependents",!1,{description:"Print all dependents for each matching package"});this.manifest=ge.Boolean("--manifest",!1,{description:"Print data obtained by looking at the package archive (license, homepage, ...)"});this.nameOnly=ge.Boolean("--name-only",!1,{description:"Only print the name for the matching packages"});this.virtuals=ge.Boolean("--virtuals",!1,{description:"Print each instance of the virtual packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a&&!this.all)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState();let u=new Set(this.extra);this.cache&&u.add("cache"),this.dependents&&u.add("dependents"),this.manifest&&u.add("manifest");let A=(ae,{recursive:fe})=>{let ue=ae.anchoredLocator.locatorHash,me=new Map,he=[ue];for(;he.length>0;){let Be=he.shift();if(me.has(Be))continue;let we=o.storedPackages.get(Be);if(typeof we>"u")throw new Error("Assertion failed: Expected the package to be registered");if(me.set(Be,we),W.isVirtualLocator(we)&&he.push(W.devirtualizeLocator(we).locatorHash),!(!fe&&Be!==ue))for(let g of we.dependencies.values()){let Ee=o.storedResolutions.get(g.descriptorHash);if(typeof Ee>"u")throw new Error("Assertion failed: Expected the resolution to be registered");he.push(Ee)}}return me.values()},p=({recursive:ae})=>{let fe=new Map;for(let ue of o.workspaces)for(let me of A(ue,{recursive:ae}))fe.set(me.locatorHash,me);return fe.values()},h=({all:ae,recursive:fe})=>ae&&fe?o.storedPackages.values():ae?p({recursive:fe}):A(a,{recursive:fe}),E=({all:ae,recursive:fe})=>{let ue=h({all:ae,recursive:fe}),me=this.patterns.map(we=>{let g=W.parseLocator(we),Ee=$ge.default.makeRe(W.stringifyIdent(g)),Pe=W.isVirtualLocator(g),ce=Pe?W.devirtualizeLocator(g):g;return ne=>{let ee=W.stringifyIdent(ne);if(!Ee.test(ee))return!1;if(g.reference==="unknown")return!0;let Ie=W.isVirtualLocator(ne),Fe=Ie?W.devirtualizeLocator(ne):ne;return!(Pe&&Ie&&g.reference!==ne.reference||ce.reference!==Fe.reference)}}),he=_e.sortMap([...ue],we=>W.stringifyLocator(we));return{selection:he.filter(we=>me.length===0||me.some(g=>g(we))),sortedLookup:he}},{selection:I,sortedLookup:v}=E({all:this.all,recursive:this.recursive});if(I.length===0)throw new it("No package matched your request");let x=new Map;if(this.dependents)for(let ae of v)for(let fe of ae.dependencies.values()){let ue=o.storedResolutions.get(fe.descriptorHash);if(typeof ue>"u")throw new Error("Assertion failed: Expected the resolution to be registered");_e.getArrayWithDefault(x,ue).push(ae)}let C=new Map;for(let ae of v){if(!W.isVirtualLocator(ae))continue;let fe=W.devirtualizeLocator(ae);_e.getArrayWithDefault(C,fe.locatorHash).push(ae)}let R={},N={children:R},U=r.makeFetcher(),V={project:o,fetcher:U,cache:n,checksums:o.storedChecksums,report:new Qi,cacheOptions:{skipIntegrityCheck:!0}},te=[async(ae,fe,ue)=>{if(!fe.has("manifest"))return;let me=await U.fetch(ae,V),he;try{he=await Ot.find(me.prefixPath,{baseFs:me.packageFs})}finally{me.releaseFs?.()}ue("Manifest",{License:de.tuple(de.Type.NO_HINT,he.license),Homepage:de.tuple(de.Type.URL,he.raw.homepage??null)})},async(ae,fe,ue)=>{if(!fe.has("cache"))return;let me=o.storedChecksums.get(ae.locatorHash)??null,he=n.getLocatorPath(ae,me),Be;if(he!==null)try{Be=await oe.statPromise(he)}catch{}let we=typeof Be<"u"?[Be.size,de.Type.SIZE]:void 0;ue("Cache",{Checksum:de.tuple(de.Type.NO_HINT,me),Path:de.tuple(de.Type.PATH,he),Size:we})}];for(let ae of I){let fe=W.isVirtualLocator(ae);if(!this.virtuals&&fe)continue;let ue={},me={value:[ae,de.Type.LOCATOR],children:ue};if(R[W.stringifyLocator(ae)]=me,this.nameOnly){delete me.children;continue}let he=C.get(ae.locatorHash);typeof he<"u"&&(ue.Instances={label:"Instances",value:de.tuple(de.Type.NUMBER,he.length)}),ue.Version={label:"Version",value:de.tuple(de.Type.NO_HINT,ae.version)};let Be=(g,Ee)=>{let Pe={};if(ue[g]=Pe,Array.isArray(Ee))Pe.children=Ee.map(ce=>({value:ce}));else{let ce={};Pe.children=ce;for(let[ne,ee]of Object.entries(Ee))typeof ee>"u"||(ce[ne]={label:ne,value:ee})}};if(!fe){for(let g of te)await g(ae,u,Be);await r.triggerHook(g=>g.fetchPackageInfo,ae,u,Be)}ae.bin.size>0&&!fe&&Be("Exported Binaries",[...ae.bin.keys()].map(g=>de.tuple(de.Type.PATH,g)));let we=x.get(ae.locatorHash);typeof we<"u"&&we.length>0&&Be("Dependents",we.map(g=>de.tuple(de.Type.LOCATOR,g))),ae.dependencies.size>0&&!fe&&Be("Dependencies",[...ae.dependencies.values()].map(g=>{let Ee=o.storedResolutions.get(g.descriptorHash),Pe=typeof Ee<"u"?o.storedPackages.get(Ee)??null:null;return de.tuple(de.Type.RESOLUTION,{descriptor:g,locator:Pe})})),ae.peerDependencies.size>0&&fe&&Be("Peer dependencies",[...ae.peerDependencies.values()].map(g=>{let Ee=ae.dependencies.get(g.identHash),Pe=typeof Ee<"u"?o.storedResolutions.get(Ee.descriptorHash)??null:null,ce=Pe!==null?o.storedPackages.get(Pe)??null:null;return de.tuple(de.Type.RESOLUTION,{descriptor:g,locator:ce})}))}$s.emitTree(N,{configuration:r,json:this.json,stdout:this.context.stdout,separators:this.nameOnly?0:2})}};Gh.paths=[["info"]],Gh.usage=nt.Usage({description:"see information related to packages",details:"\n This command prints various information related to the specified packages, accepting glob patterns.\n\n By default, if the locator reference is missing, Yarn will default to print the information about all the matching direct dependencies of the package for the active workspace. To instead print all versions of the package that are direct dependencies of any of your workspaces, use the `-A,--all` flag. Adding the `-R,--recursive` flag will also report transitive dependencies.\n\n Some fields will be hidden by default in order to keep the output readable, but can be selectively displayed by using additional options (`--dependents`, `--manifest`, `--virtuals`, ...) described in the option descriptions.\n\n Note that this command will only print the information directly related to the selected packages - if you wish to know why the package is there in the first place, use `yarn why` which will do just that (it also provides a `-R,--recursive` flag that may be of some help).\n ",examples:[["Show information about Lodash","$0 info lodash"]]});Ye();Pt();Nl();var hk=$e(rd());qt();var O8=$e(Jn());$a();var Y0t=[{selector:t=>t===-1,name:"nodeLinker",value:"node-modules"},{selector:t=>t!==-1&&t<8,name:"enableGlobalCache",value:!1},{selector:t=>t!==-1&&t<8,name:"compressionLevel",value:"mixed"}],jh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.immutable=ge.Boolean("--immutable",{description:"Abort with an error exit code if the lockfile was to be modified"});this.immutableCache=ge.Boolean("--immutable-cache",{description:"Abort with an error exit code if the cache folder was to be modified"});this.refreshLockfile=ge.Boolean("--refresh-lockfile",{description:"Refresh the package metadata stored in the lockfile"});this.checkCache=ge.Boolean("--check-cache",{description:"Always refetch the packages and ensure that their checksums are consistent"});this.checkResolutions=ge.Boolean("--check-resolutions",{description:"Validates that the package resolutions are coherent"});this.inlineBuilds=ge.Boolean("--inline-builds",{description:"Verbosely print the output of the build steps of dependencies"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:Ks(hl)});this.cacheFolder=ge.String("--cache-folder",{hidden:!0});this.frozenLockfile=ge.Boolean("--frozen-lockfile",{hidden:!0});this.ignoreEngines=ge.Boolean("--ignore-engines",{hidden:!0});this.nonInteractive=ge.Boolean("--non-interactive",{hidden:!0});this.preferOffline=ge.Boolean("--prefer-offline",{hidden:!0});this.production=ge.Boolean("--production",{hidden:!0});this.registry=ge.String("--registry",{hidden:!0});this.silent=ge.Boolean("--silent",{hidden:!0});this.networkTimeout=ge.String("--network-timeout",{hidden:!0})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);typeof this.inlineBuilds<"u"&&r.useWithSource("",{enableInlineBuilds:this.inlineBuilds},r.startingCwd,{overwrite:!0});let o=!!process.env.FUNCTION_TARGET||!!process.env.GOOGLE_RUNTIME,a=await NE({configuration:r,stdout:this.context.stdout},[{option:this.ignoreEngines,message:"The --ignore-engines option is deprecated; engine checking isn't a core feature anymore",error:!hk.default.VERCEL},{option:this.registry,message:"The --registry option is deprecated; prefer setting npmRegistryServer in your .yarnrc.yml file"},{option:this.preferOffline,message:"The --prefer-offline flag is deprecated; use the --cached flag with 'yarn add' instead",error:!hk.default.VERCEL},{option:this.production,message:"The --production option is deprecated on 'install'; use 'yarn workspaces focus' instead",error:!0},{option:this.nonInteractive,message:"The --non-interactive option is deprecated",error:!o},{option:this.frozenLockfile,message:"The --frozen-lockfile option is deprecated; use --immutable and/or --immutable-cache instead",callback:()=>this.immutable=this.frozenLockfile},{option:this.cacheFolder,message:"The cache-folder option has been deprecated; use rc settings instead",error:!hk.default.NETLIFY}]);if(a!==null)return a;let n=this.mode==="update-lockfile";if(n&&(this.immutable||this.immutableCache))throw new it(`${de.pretty(r,"--immutable",de.Type.CODE)} and ${de.pretty(r,"--immutable-cache",de.Type.CODE)} cannot be used with ${de.pretty(r,"--mode=update-lockfile",de.Type.CODE)}`);let u=(this.immutable??r.get("enableImmutableInstalls"))&&!n,A=this.immutableCache&&!n;if(r.projectCwd!==null){let R=await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U=!1;await z0t(r,u)&&(N.reportInfo(48,"Automatically removed core plugins that are now builtins \u{1F44D}"),U=!0),await K0t(r,u)&&(N.reportInfo(48,"Automatically fixed merge conflicts \u{1F44D}"),U=!0),U&&N.reportSeparator()});if(R.hasErrors())return R.exitCode()}if(r.projectCwd!==null){let R=await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{if(Ke.telemetry?.isNew)Ke.telemetry.commitTips(),N.reportInfo(65,"Yarn will periodically gather anonymous telemetry: https://yarnpkg.com/advanced/telemetry"),N.reportInfo(65,`Run ${de.pretty(r,"yarn config set --home enableTelemetry 0",de.Type.CODE)} to disable`),N.reportSeparator();else if(Ke.telemetry?.shouldShowTips){let U=await nn.get("https://repo.yarnpkg.com/tags",{configuration:r,jsonResponse:!0}).catch(()=>null);if(U!==null){let V=null;if(rn!==null){let ae=O8.default.prerelease(rn)?"canary":"stable",fe=U.latest[ae];O8.default.gt(fe,rn)&&(V=[ae,fe])}if(V)Ke.telemetry.commitTips(),N.reportInfo(88,`${de.applyStyle(r,`A new ${V[0]} version of Yarn is available:`,de.Style.BOLD)} ${W.prettyReference(r,V[1])}!`),N.reportInfo(88,`Upgrade now by running ${de.pretty(r,`yarn set version ${V[1]}`,de.Type.CODE)}`),N.reportSeparator();else{let te=Ke.telemetry.selectTip(U.tips);te&&(N.reportInfo(89,de.pretty(r,te.message,de.Type.MARKDOWN_INLINE)),te.url&&N.reportInfo(89,`Learn more at ${te.url}`),N.reportSeparator())}}}});if(R.hasErrors())return R.exitCode()}let{project:p,workspace:h}=await St.find(r,this.context.cwd),E=p.lockfileLastVersion;if(E!==null){let R=await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async N=>{let U={};for(let V of Y0t)V.selector(E)&&typeof r.sources.get(V.name)>"u"&&(r.use("",{[V.name]:V.value},p.cwd,{overwrite:!0}),U[V.name]=V.value);Object.keys(U).length>0&&(await Ke.updateConfiguration(p.cwd,U),N.reportInfo(87,"Migrated your project to the latest Yarn version \u{1F680}"),N.reportSeparator())});if(R.hasErrors())return R.exitCode()}let I=await Nr.find(r,{immutable:A,check:this.checkCache});if(!h)throw new nr(p.cwd,this.context.cwd);await p.restoreInstallState({restoreResolutions:!1});let v=r.get("enableHardenedMode");v&&typeof r.sources.get("enableHardenedMode")>"u"&&await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout,includeFooter:!1},async R=>{R.reportWarning(0,"Yarn detected that the current workflow is executed from a public pull request. For safety the hardened mode has been enabled."),R.reportWarning(0,`It will prevent malicious lockfile manipulations, in exchange for a slower install time. You can opt-out if necessary; check our ${de.applyHyperlink(r,"documentation","https://yarnpkg.com/features/security#hardened-mode")} for more details.`),R.reportSeparator()}),(this.refreshLockfile??v)&&(p.lockfileNeedsRefresh=!0);let x=this.checkResolutions??v;return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout,forceSectionAlignment:!0,includeLogs:!0,includeVersion:!0},async R=>{await p.install({cache:I,report:R,immutable:u,checkResolutions:x,mode:this.mode})})).exitCode()}};jh.paths=[["install"],nt.Default],jh.usage=nt.Usage({description:"install the project dependencies",details:"\n This command sets up your project if needed. The installation is split into four different steps that each have their own characteristics:\n\n - **Resolution:** First the package manager will resolve your dependencies. The exact way a dependency version is privileged over another isn't standardized outside of the regular semver guarantees. If a package doesn't resolve to what you would expect, check that all dependencies are correctly declared (also check our website for more information: ).\n\n - **Fetch:** Then we download all the dependencies if needed, and make sure that they're all stored within our cache (check the value of `cacheFolder` in `yarn config` to see where the cache files are stored).\n\n - **Link:** Then we send the dependency tree information to internal plugins tasked with writing them on the disk in some form (for example by generating the `.pnp.cjs` file you might know).\n\n - **Build:** Once the dependency tree has been written on the disk, the package manager will now be free to run the build scripts for all packages that might need it, in a topological order compatible with the way they depend on one another. See https://yarnpkg.com/advanced/lifecycle-scripts for detail.\n\n Note that running this command is not part of the recommended workflow. Yarn supports zero-installs, which means that as long as you store your cache and your `.pnp.cjs` file inside your repository, everything will work without requiring any install right after cloning your repository or switching branches.\n\n If the `--immutable` option is set (defaults to true on CI), Yarn will abort with an error exit code if the lockfile was to be modified (other paths can be added using the `immutablePatterns` configuration setting). For backward compatibility we offer an alias under the name of `--frozen-lockfile`, but it will be removed in a later release.\n\n If the `--immutable-cache` option is set, Yarn will abort with an error exit code if the cache folder was to be modified (either because files would be added, or because they'd be removed).\n\n If the `--refresh-lockfile` option is set, Yarn will keep the same resolution for the packages currently in the lockfile but will refresh their metadata. If used together with `--immutable`, it can validate that the lockfile information are consistent. This flag is enabled by default when Yarn detects it runs within a pull request context.\n\n If the `--check-cache` option is set, Yarn will always refetch the packages and will ensure that their checksum matches what's 1/ described in the lockfile 2/ inside the existing cache files (if present). This is recommended as part of your CI workflow if you're both following the Zero-Installs model and accepting PRs from third-parties, as they'd otherwise have the ability to alter the checked-in packages before submitting them.\n\n If the `--inline-builds` option is set, Yarn will verbosely print the output of the build steps of your dependencies (instead of writing them into individual files). This is likely useful mostly for debug purposes only when using Docker-like environments.\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n ",examples:[["Install the project","$0 install"],["Validate a project when using Zero-Installs","$0 install --immutable --immutable-cache"],["Validate a project when using Zero-Installs (slightly safer if you accept external PRs)","$0 install --immutable --immutable-cache --check-cache"]]});var W0t="<<<<<<<";async function K0t(t,e){if(!t.projectCwd)return!1;let r=z.join(t.projectCwd,dr.lockfile);if(!await oe.existsPromise(r)||!(await oe.readFilePromise(r,"utf8")).includes(W0t))return!1;if(e)throw new Jt(47,"Cannot autofix a lockfile when running an immutable install");let a=await Ur.execvp("git",["rev-parse","MERGE_HEAD","HEAD"],{cwd:t.projectCwd});if(a.code!==0&&(a=await Ur.execvp("git",["rev-parse","REBASE_HEAD","HEAD"],{cwd:t.projectCwd})),a.code!==0&&(a=await Ur.execvp("git",["rev-parse","CHERRY_PICK_HEAD","HEAD"],{cwd:t.projectCwd})),a.code!==0)throw new Jt(83,"Git returned an error when trying to find the commits pertaining to the conflict");let n=await Promise.all(a.stdout.trim().split(/\n/).map(async A=>{let p=await Ur.execvp("git",["show",`${A}:./${dr.lockfile}`],{cwd:t.projectCwd});if(p.code!==0)throw new Jt(83,`Git returned an error when trying to access the lockfile content in ${A}`);try{return Ki(p.stdout)}catch{throw new Jt(46,"A variant of the conflicting lockfile failed to parse")}}));n=n.filter(A=>!!A.__metadata);for(let A of n){if(A.__metadata.version<7)for(let p of Object.keys(A)){if(p==="__metadata")continue;let h=W.parseDescriptor(p,!0),E=t.normalizeDependency(h),I=W.stringifyDescriptor(E);I!==p&&(A[I]=A[p],delete A[p])}for(let p of Object.keys(A)){if(p==="__metadata")continue;let h=A[p].checksum;typeof h=="string"&&h.includes("/")||(A[p].checksum=`${A.__metadata.cacheKey}/${h}`)}}let u=Object.assign({},...n);u.__metadata.version=`${Math.min(...n.map(A=>parseInt(A.__metadata.version??0)))}`,u.__metadata.cacheKey="merged";for(let[A,p]of Object.entries(u))typeof p=="string"&&delete u[A];return await oe.changeFilePromise(r,Ba(u),{automaticNewlines:!0}),!0}async function z0t(t,e){if(!t.projectCwd)return!1;let r=[],o=z.join(t.projectCwd,".yarn/plugins/@yarnpkg");return await Ke.updateConfiguration(t.projectCwd,{plugins:n=>{if(!Array.isArray(n))return n;let u=n.filter(A=>{if(!A.path)return!0;let p=z.resolve(t.projectCwd,A.path),h=v1.has(A.spec)&&z.contains(o,p);return h&&r.push(p),!h});return u.length===0?Ke.deleteProperty:u.length===n.length?n:u}},{immutable:e})?(await Promise.all(r.map(async n=>{await oe.removePromise(n)})),!0):!1}Ye();Pt();qt();var Yh=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Link all workspaces belonging to the target projects to the current one"});this.private=ge.Boolean("-p,--private",!1,{description:"Also link private workspaces belonging to the target projects to the current one"});this.relative=ge.Boolean("-r,--relative",!1,{description:"Link workspaces using relative paths instead of absolute paths"});this.destinations=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=o.topLevelWorkspace,A=[];for(let p of this.destinations){let h=z.resolve(this.context.cwd,le.toPortablePath(p)),E=await Ke.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:I,workspace:v}=await St.find(E,h);if(o.cwd===I.cwd)throw new it(`Invalid destination '${p}'; Can't link the project to itself`);if(!v)throw new nr(I.cwd,h);if(this.all){let x=!1;for(let C of I.workspaces)C.manifest.name&&(!C.manifest.private||this.private)&&(A.push(C),x=!0);if(!x)throw new it(`No workspace found to be linked in the target project: ${p}`)}else{if(!v.manifest.name)throw new it(`The target workspace at '${p}' doesn't have a name and thus cannot be linked`);if(v.manifest.private&&!this.private)throw new it(`The target workspace at '${p}' is marked private - use the --private flag to link it anyway`);A.push(v)}}for(let p of A){let h=W.stringifyIdent(p.anchoredLocator),E=this.relative?z.relative(o.cwd,p.cwd):p.cwd;u.manifest.resolutions.push({pattern:{descriptor:{fullName:h}},reference:`portal:${E}`})}return await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}};Yh.paths=[["link"]],Yh.usage=nt.Usage({description:"connect the local project to another one",details:"\n This command will set a new `resolutions` field in the project-level manifest and point it to the workspace at the specified location (even if part of another project).\n ",examples:[["Register one or more remote workspaces for use in the current project","$0 link ~/ts-loader ~/jest"],["Register all workspaces from a remote project for use in the current project","$0 link ~/jest --all"]]});qt();var Wh=class extends ut{constructor(){super(...arguments);this.args=ge.Proxy()}async execute(){return this.cli.run(["exec","node",...this.args])}};Wh.paths=[["node"]],Wh.usage=nt.Usage({description:"run node with the hook already setup",details:` This command simply runs Node. It also makes sure to call it in a way that's compatible with the current project (for example, on PnP projects the environment will be setup in such a way that PnP will be correctly injected into the environment). The Node process will use the exact same version of Node as the one used to run Yarn itself, which might be a good way to ensure that your commands always use a consistent Node version. `,examples:[["Run a Node script","$0 node ./my-script.js"]]});Ye();qt();var Kh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await Ke.findRcFiles(this.context.cwd);return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{for(let u of o)if(!!u.data?.plugins)for(let A of u.data.plugins){if(!A.checksum||!A.spec.match(/^https?:/))continue;let p=await nn.get(A.spec,{configuration:r}),h=wn.makeHash(p);if(A.checksum===h)continue;let E=de.pretty(r,A.path,de.Type.PATH),I=de.pretty(r,A.spec,de.Type.URL),v=`${E} is different from the file provided by ${I}`;n.reportJson({...A,newChecksum:h}),n.reportError(0,v)}})).exitCode()}};Kh.paths=[["plugin","check"]],Kh.usage=nt.Usage({category:"Plugin-related commands",description:"find all third-party plugins that differ from their own spec",details:` Check only the plugins from https. If this command detects any plugin differences in the CI environment, it will throw an error. `,examples:[["find all third-party plugins that differ from their own spec","$0 plugin check"]]});Ye();Ye();Pt();qt();var ide=ve("os");Ye();Pt();qt();var ede=ve("os");Ye();Nl();qt();var V0t="https://raw.githubusercontent.com/yarnpkg/berry/master/plugins.yml";async function Xd(t,e){let r=await nn.get(V0t,{configuration:t}),o=Ki(r.toString());return Object.fromEntries(Object.entries(o).filter(([a,n])=>!e||kr.satisfiesWithPrereleases(e,n.range??"<4.0.0-rc.1")))}var zh=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{let n=await Xd(r,rn);for(let[u,{experimental:A,...p}]of Object.entries(n)){let h=u;A&&(h+=" [experimental]"),a.reportJson({name:u,experimental:A,...p}),a.reportInfo(null,h)}})).exitCode()}};zh.paths=[["plugin","list"]],zh.usage=nt.Usage({category:"Plugin-related commands",description:"list the available official plugins",details:"\n This command prints the plugins available directly from the Yarn repository. Only those plugins can be referenced by name in `yarn plugin import`.\n ",examples:[["List the official plugins","$0 plugin list"]]});var J0t=/^[0-9]+$/,X0t=process.platform==="win32";function tde(t){return J0t.test(t)?`pull/${t}/head`:t}var Z0t=({repository:t,branch:e},r)=>[["git","init",le.fromPortablePath(r)],["git","remote","add","origin",t],["git","fetch","origin","--depth=1",tde(e)],["git","reset","--hard","FETCH_HEAD"]],$0t=({branch:t})=>[["git","fetch","origin","--depth=1",tde(t),"--force"],["git","reset","--hard","FETCH_HEAD"],["git","clean","-dfx","-e","packages/yarnpkg-cli/bundles"]],egt=({plugins:t,noMinify:e},r,o)=>[["yarn","build:cli",...new Array().concat(...t.map(a=>["--plugin",z.resolve(o,a)])),...e?["--no-minify"]:[],"|"],[X0t?"move":"mv","packages/yarnpkg-cli/bundles/yarn.js",le.fromPortablePath(r),"|"]],Vh=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.plugins=ge.Array("--plugin",[],{description:"An array of additional plugins that should be included in the bundle"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"If set, the bundle will be built but not added to the project"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a bundle for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.skipPlugins=ge.Boolean("--skip-plugins",!1,{description:"Skip updating the contrib plugins"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=typeof this.installPath<"u"?z.resolve(this.context.cwd,le.toPortablePath(this.installPath)):z.resolve(le.toPortablePath((0,ede.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Lt.start({configuration:r,stdout:this.context.stdout},async u=>{await M8(this,{configuration:r,report:u,target:a}),u.reportSeparator(),u.reportInfo(0,"Building a fresh bundle"),u.reportSeparator();let A=await Ur.execvp("git",["rev-parse","--short","HEAD"],{cwd:a,strict:!0}),p=z.join(a,`packages/yarnpkg-cli/bundles/yarn-${A.stdout.trim()}.js`);oe.existsSync(p)||(await E2(egt(this,p,a),{configuration:r,context:this.context,target:a}),u.reportSeparator());let h=await oe.readFilePromise(p);if(!this.dryRun){let{bundleVersion:E}=await N8(r,null,async()=>h,{report:u});this.skipPlugins||await tgt(this,E,{project:o,report:u,target:a})}})).exitCode()}};Vh.paths=[["set","version","from","sources"]],Vh.usage=nt.Usage({description:"build Yarn from master",details:` This command will clone the Yarn repository into a temporary folder, then build it. The resulting bundle will then be copied into the local project. By default, it also updates all contrib plugins to the same commit the bundle is built from. This behavior can be disabled by using the \`--skip-plugins\` flag. `,examples:[["Build Yarn from master","$0 set version from sources"]]});async function E2(t,{configuration:e,context:r,target:o}){for(let[a,...n]of t){let u=n[n.length-1]==="|";if(u&&n.pop(),u)await Ur.pipevp(a,n,{cwd:o,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,strict:!0});else{r.stdout.write(`${de.pretty(e,` $ ${[a,...n].join(" ")}`,"grey")} `);try{await Ur.execvp(a,n,{cwd:o,strict:!0})}catch(A){throw r.stdout.write(A.stdout||A.stack),A}}}}async function M8(t,{configuration:e,report:r,target:o}){let a=!1;if(!t.force&&oe.existsSync(z.join(o,".git"))){r.reportInfo(0,"Fetching the latest commits"),r.reportSeparator();try{await E2($0t(t),{configuration:e,context:t.context,target:o}),a=!0}catch{r.reportSeparator(),r.reportWarning(0,"Repository update failed; we'll try to regenerate it")}}a||(r.reportInfo(0,"Cloning the remote repository"),r.reportSeparator(),await oe.removePromise(o),await oe.mkdirPromise(o,{recursive:!0}),await E2(Z0t(t,o),{configuration:e,context:t.context,target:o}))}async function tgt(t,e,{project:r,report:o,target:a}){let n=await Xd(r.configuration,e),u=new Set(Object.keys(n));for(let A of r.configuration.plugins.keys())!u.has(A)||await U8(A,t,{project:r,report:o,target:a})}Ye();Ye();Pt();qt();var rde=$e(Jn()),nde=ve("vm");var Jh=class extends ut{constructor(){super(...arguments);this.name=ge.String();this.checksum=ge.Boolean("--checksum",!0,{description:"Whether to care if this plugin is modified"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Lt.start({configuration:r,stdout:this.context.stdout},async a=>{let{project:n}=await St.find(r,this.context.cwd),u,A;if(this.name.match(/^\.{0,2}[\\/]/)||le.isAbsolute(this.name)){let p=z.resolve(this.context.cwd,le.toPortablePath(this.name));a.reportInfo(0,`Reading ${de.pretty(r,p,de.Type.PATH)}`),u=z.relative(n.cwd,p),A=await oe.readFilePromise(p)}else{let p;if(this.name.match(/^https?:/)){try{new URL(this.name)}catch{throw new Jt(52,`Plugin specifier "${this.name}" is neither a plugin name nor a valid url`)}u=this.name,p=this.name}else{let h=W.parseLocator(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-"));if(h.reference!=="unknown"&&!rde.default.valid(h.reference))throw new Jt(0,"Official plugins only accept strict version references. Use an explicit URL if you wish to download them from another location.");let E=W.stringifyIdent(h),I=await Xd(r,rn);if(!Object.hasOwn(I,E)){let v=`Couldn't find a plugin named ${W.prettyIdent(r,h)} on the remote registry. `;throw r.plugins.has(E)?v+=`A plugin named ${W.prettyIdent(r,h)} is already installed; possibly attempting to import a built-in plugin.`:v+=`Note that only the plugins referenced on our website (${de.pretty(r,"https://github.com/yarnpkg/berry/blob/master/plugins.yml",de.Type.URL)}) can be referenced by their name; any other plugin will have to be referenced through its public url (for example ${de.pretty(r,"https://github.com/yarnpkg/berry/raw/master/packages/plugin-typescript/bin/%40yarnpkg/plugin-typescript.js",de.Type.URL)}).`,new Jt(51,v)}u=E,p=I[E].url,h.reference!=="unknown"?p=p.replace(/\/master\//,`/${E}/${h.reference}/`):rn!==null&&(p=p.replace(/\/master\//,`/@yarnpkg/cli/${rn}/`))}a.reportInfo(0,`Downloading ${de.pretty(r,p,"green")}`),A=await nn.get(p,{configuration:r})}await _8(u,A,{checksum:this.checksum,project:n,report:a})})).exitCode()}};Jh.paths=[["plugin","import"]],Jh.usage=nt.Usage({category:"Plugin-related commands",description:"download a plugin",details:` This command downloads the specified plugin from its remote location and updates the configuration to reference it in further CLI invocations. Three types of plugin references are accepted: - If the plugin is stored within the Yarn repository, it can be referenced by name. - Third-party plugins can be referenced directly through their public urls. - Local plugins can be referenced by their path on the disk. If the \`--no-checksum\` option is set, Yarn will no longer care if the plugin is modified. Plugins cannot be downloaded from the npm registry, and aren't allowed to have dependencies (they need to be bundled into a single file, possibly thanks to the \`@yarnpkg/builder\` package). `,examples:[['Download and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import @yarnpkg/plugin-exec"],['Download and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import exec"],["Download and activate a community plugin","$0 plugin import https://example.org/path/to/plugin.js"],["Activate a local plugin","$0 plugin import ./path/to/plugin.js"]]});async function _8(t,e,{checksum:r=!0,project:o,report:a}){let{configuration:n}=o,u={},A={exports:u};(0,nde.runInNewContext)(e.toString(),{module:A,exports:u});let h=`.yarn/plugins/${A.exports.name}.cjs`,E=z.resolve(o.cwd,h);a.reportInfo(0,`Saving the new plugin in ${de.pretty(n,h,"magenta")}`),await oe.mkdirPromise(z.dirname(E),{recursive:!0}),await oe.writeFilePromise(E,e);let I={path:h,spec:t};r&&(I.checksum=wn.makeHash(e)),await Ke.addPlugin(o.cwd,[I])}var rgt=({pluginName:t,noMinify:e},r)=>[["yarn",`build:${t}`,...e?["--no-minify"]:[],"|"]],Xh=class extends ut{constructor(){super(...arguments);this.installPath=ge.String("--path",{description:"The path where the repository should be cloned to"});this.repository=ge.String("--repository","https://github.com/yarnpkg/berry.git",{description:"The repository that should be cloned"});this.branch=ge.String("--branch","master",{description:"The branch of the repository that should be cloned"});this.noMinify=ge.Boolean("--no-minify",!1,{description:"Build a plugin for development (debugging) - non-minified and non-mangled"});this.force=ge.Boolean("-f,--force",!1,{description:"Always clone the repository instead of trying to fetch the latest commits"});this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=typeof this.installPath<"u"?z.resolve(this.context.cwd,le.toPortablePath(this.installPath)):z.resolve(le.toPortablePath((0,ide.tmpdir)()),"yarnpkg-sources",wn.makeHash(this.repository).slice(0,6));return(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{let{project:u}=await St.find(r,this.context.cwd),A=W.parseIdent(this.name.replace(/^((@yarnpkg\/)?plugin-)?/,"@yarnpkg/plugin-")),p=W.stringifyIdent(A),h=await Xd(r,rn);if(!Object.hasOwn(h,p))throw new Jt(51,`Couldn't find a plugin named "${p}" on the remote registry. Note that only the plugins referenced on our website (https://github.com/yarnpkg/berry/blob/master/plugins.yml) can be built and imported from sources.`);let E=p;await M8(this,{configuration:r,report:n,target:o}),await U8(E,this,{project:u,report:n,target:o})})).exitCode()}};Xh.paths=[["plugin","import","from","sources"]],Xh.usage=nt.Usage({category:"Plugin-related commands",description:"build a plugin from sources",details:` This command clones the Yarn repository into a temporary folder, builds the specified contrib plugin and updates the configuration to reference it in further CLI invocations. The plugins can be referenced by their short name if sourced from the official Yarn repository. `,examples:[['Build and activate the "@yarnpkg/plugin-exec" plugin',"$0 plugin import from sources @yarnpkg/plugin-exec"],['Build and activate the "@yarnpkg/plugin-exec" plugin (shorthand)',"$0 plugin import from sources exec"]]});async function U8(t,{context:e,noMinify:r},{project:o,report:a,target:n}){let u=t.replace(/@yarnpkg\//,""),{configuration:A}=o;a.reportSeparator(),a.reportInfo(0,`Building a fresh ${u}`),a.reportSeparator(),await E2(rgt({pluginName:u,noMinify:r},n),{configuration:A,context:e,target:n}),a.reportSeparator();let p=z.resolve(n,`packages/${u}/bundles/${t}.js`),h=await oe.readFilePromise(p);await _8(t,h,{project:o,report:a})}Ye();Pt();qt();var Zh=class extends ut{constructor(){super(...arguments);this.name=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);return(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{let u=this.name,A=W.parseIdent(u);if(!r.plugins.has(u))throw new it(`${W.prettyIdent(r,A)} isn't referenced by the current configuration`);let p=`.yarn/plugins/${u}.cjs`,h=z.resolve(o.cwd,p);oe.existsSync(h)&&(n.reportInfo(0,`Removing ${de.pretty(r,p,de.Type.PATH)}...`),await oe.removePromise(h)),n.reportInfo(0,"Updating the configuration..."),await Ke.updateConfiguration(o.cwd,{plugins:E=>{if(!Array.isArray(E))return E;let I=E.filter(v=>v.path!==p);return I.length===0?Ke.deleteProperty:I.length===E.length?E:I}})})).exitCode()}};Zh.paths=[["plugin","remove"]],Zh.usage=nt.Usage({category:"Plugin-related commands",description:"remove a plugin",details:` This command deletes the specified plugin from the .yarn/plugins folder and removes it from the configuration. **Note:** The plugins have to be referenced by their name property, which can be obtained using the \`yarn plugin runtime\` command. Shorthands are not allowed. `,examples:[["Remove a plugin imported from the Yarn repository","$0 plugin remove @yarnpkg/plugin-typescript"],["Remove a plugin imported from a local file","$0 plugin remove my-local-plugin"]]});Ye();qt();var $h=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins);return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async a=>{for(let n of r.plugins.keys()){let u=this.context.plugins.plugins.has(n),A=n;u&&(A+=" [builtin]"),a.reportJson({name:n,builtin:u}),a.reportInfo(null,`${A}`)}})).exitCode()}};$h.paths=[["plugin","runtime"]],$h.usage=nt.Usage({category:"Plugin-related commands",description:"list the active plugins",details:` This command prints the currently active plugins. Will be displayed both builtin plugins and external plugins. `,examples:[["List the currently active plugins","$0 plugin runtime"]]});Ye();Ye();qt();var e0=class extends ut{constructor(){super(...arguments);this.idents=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);let u=new Set;for(let A of this.idents)u.add(W.parseIdent(A).identHash);if(await o.restoreInstallState({restoreResolutions:!1}),await o.resolveEverything({cache:n,report:new Qi}),u.size>0)for(let A of o.storedPackages.values())u.has(A.identHash)&&(o.storedBuildState.delete(A.locatorHash),o.skippedBuilds.delete(A.locatorHash));else o.storedBuildState.clear(),o.skippedBuilds.clear();return await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};e0.paths=[["rebuild"]],e0.usage=nt.Usage({description:"rebuild the project's native packages",details:` This command will automatically cause Yarn to forget about previous compilations of the given packages and to run them again. Note that while Yarn forgets the compilation, the previous artifacts aren't erased from the filesystem and may affect the next builds (in good or bad). To avoid this, you may remove the .yarn/unplugged folder, or any other relevant location where packages might have been stored (Yarn may offer a way to do that automatically in the future). By default all packages will be rebuilt, but you can filter the list by specifying the names of the packages you want to clear from memory. `,examples:[["Rebuild all packages","$0 rebuild"],["Rebuild fsevents only","$0 rebuild fsevents"]]});Ye();Ye();Ye();qt();var H8=$e(Zo());$a();var t0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Apply the operation to all workspaces from the current project"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:Ks(hl)});this.patterns=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.all?o.workspaces:[a],A=["dependencies","devDependencies","peerDependencies"],p=[],h=!1,E=[];for(let C of this.patterns){let R=!1,N=W.parseIdent(C);for(let U of u){let V=[...U.manifest.peerDependenciesMeta.keys()];for(let te of(0,H8.default)(V,C))U.manifest.peerDependenciesMeta.delete(te),h=!0,R=!0;for(let te of A){let ae=U.manifest.getForScope(te),fe=[...ae.values()].map(ue=>W.stringifyIdent(ue));for(let ue of(0,H8.default)(fe,W.stringifyIdent(N))){let{identHash:me}=W.parseIdent(ue),he=ae.get(me);if(typeof he>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");U.manifest[te].delete(me),E.push([U,te,he]),h=!0,R=!0}}}R||p.push(C)}let I=p.length>1?"Patterns":"Pattern",v=p.length>1?"don't":"doesn't",x=this.all?"any":"this";if(p.length>0)throw new it(`${I} ${de.prettyList(r,p,de.Type.CODE)} ${v} match any packages referenced by ${x} workspace`);return h?(await r.triggerMultipleHooks(C=>C.afterWorkspaceDependencyRemoval,E),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})):0}};t0.paths=[["remove"]],t0.usage=nt.Usage({description:"remove dependencies from the project",details:` This command will remove the packages matching the specified patterns from the current workspace. If the \`--mode=\` option is set, Yarn will change which artifacts are generated. The modes currently supported are: - \`skip-build\` will not run the build scripts at all. Note that this is different from setting \`enableScripts\` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run. - \`update-lockfile\` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost. This command accepts glob patterns as arguments (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them. `,examples:[["Remove a dependency from the current project","$0 remove lodash"],["Remove a dependency from all workspaces at once","$0 remove lodash --all"],["Remove all dependencies starting with `eslint-`","$0 remove 'eslint-*'"],["Remove all dependencies with the `@babel` scope","$0 remove '@babel/*'"],["Remove all dependencies matching `react-dom` or `react-helmet`","$0 remove 'react-{dom,helmet}'"]]});Ye();Ye();qt();var sde=ve("util"),Zd=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);return(await Lt.start({configuration:r,stdout:this.context.stdout,json:this.json},async u=>{let A=a.manifest.scripts,p=_e.sortMap(A.keys(),I=>I),h={breakLength:1/0,colors:r.get("enableColors"),maxArrayLength:2},E=p.reduce((I,v)=>Math.max(I,v.length),0);for(let[I,v]of A.entries())u.reportInfo(null,`${I.padEnd(E," ")} ${(0,sde.inspect)(v,h)}`),u.reportJson({name:I,script:v})})).exitCode()}};Zd.paths=[["run"]];Ye();Ye();qt();var r0=class extends ut{constructor(){super(...arguments);this.inspect=ge.String("--inspect",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.inspectBrk=ge.String("--inspect-brk",!1,{tolerateBoolean:!0,description:"Forwarded to the underlying Node process when executing a binary"});this.topLevel=ge.Boolean("-T,--top-level",!1,{description:"Check the root workspace for scripts and/or binaries instead of the current one"});this.binariesOnly=ge.Boolean("-B,--binaries-only",!1,{description:"Ignore any user defined scripts and only check for binaries"});this.require=ge.String("--require",{description:"Forwarded to the underlying Node process when executing a binary"});this.silent=ge.Boolean("--silent",{hidden:!0});this.scriptName=ge.String();this.args=ge.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a,locator:n}=await St.find(r,this.context.cwd);await o.restoreInstallState();let u=this.topLevel?o.topLevelWorkspace.anchoredLocator:n;if(!this.binariesOnly&&await un.hasPackageScript(u,this.scriptName,{project:o}))return await un.executePackageScript(u,this.scriptName,this.args,{project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});let A=await un.getPackageAccessibleBinaries(u,{project:o});if(A.get(this.scriptName)){let h=[];return this.inspect&&(typeof this.inspect=="string"?h.push(`--inspect=${this.inspect}`):h.push("--inspect")),this.inspectBrk&&(typeof this.inspectBrk=="string"?h.push(`--inspect-brk=${this.inspectBrk}`):h.push("--inspect-brk")),this.require&&h.push(`--require=${this.require}`),await un.executePackageAccessibleBinary(u,this.scriptName,this.args,{cwd:this.context.cwd,project:o,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,nodeArgs:h,packageAccessibleBinaries:A})}if(!this.topLevel&&!this.binariesOnly&&a&&this.scriptName.includes(":")){let E=(await Promise.all(o.workspaces.map(async I=>I.manifest.scripts.has(this.scriptName)?I:null))).filter(I=>I!==null);if(E.length===1)return await un.executeWorkspaceScript(E[0],this.scriptName,this.args,{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})}if(this.topLevel)throw this.scriptName==="node-gyp"?new it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${W.prettyLocator(r,n)}). This typically happens because some package depends on "node-gyp" to build itself, but didn't list it in their dependencies. To fix that, please run "yarn add node-gyp" into your top-level workspace. You also can open an issue on the repository of the specified package to suggest them to use an optional peer dependency.`):new it(`Couldn't find a script name "${this.scriptName}" in the top-level (used by ${W.prettyLocator(r,n)}).`);{if(this.scriptName==="global")throw new it("The 'yarn global' commands have been removed in 2.x - consider using 'yarn dlx' or a third-party plugin instead");let h=[this.scriptName].concat(this.args);for(let[E,I]of AC)for(let v of I)if(h.length>=v.length&&JSON.stringify(h.slice(0,v.length))===JSON.stringify(v))throw new it(`Couldn't find a script named "${this.scriptName}", but a matching command can be found in the ${E} plugin. You can install it with "yarn plugin import ${E}".`);throw new it(`Couldn't find a script named "${this.scriptName}".`)}}};r0.paths=[["run"]],r0.usage=nt.Usage({description:"run a script defined in the package.json",details:` This command will run a tool. The exact tool that will be executed will depend on the current state of your workspace: - If the \`scripts\` field from your local package.json contains a matching script name, its definition will get executed. - Otherwise, if one of the local workspace's dependencies exposes a binary with a matching name, this binary will get executed. - Otherwise, if the specified name contains a colon character and if one of the workspaces in the project contains exactly one script with a matching name, then this script will get executed. Whatever happens, the cwd of the spawned process will be the workspace that declares the script (which makes it possible to call commands cross-workspaces using the third syntax). `,examples:[["Run the tests from the local workspace","$0 run test"],['Same thing, but without the "run" keyword',"$0 test"],["Inspect Webpack while running","$0 run --inspect-brk webpack"]]});Ye();Ye();qt();var n0=class extends ut{constructor(){super(...arguments);this.descriptor=ge.String();this.resolution=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(await o.restoreInstallState({restoreResolutions:!1}),!a)throw new nr(o.cwd,this.context.cwd);let u=W.parseDescriptor(this.descriptor,!0),A=W.makeDescriptor(u,this.resolution);return o.storedDescriptors.set(u.descriptorHash,u),o.storedDescriptors.set(A.descriptorHash,A),o.resolutionAliases.set(u.descriptorHash,A.descriptorHash),await o.installWithNewReport({stdout:this.context.stdout},{cache:n})}};n0.paths=[["set","resolution"]],n0.usage=nt.Usage({description:"enforce a package resolution",details:'\n This command updates the resolution table so that `descriptor` is resolved by `resolution`.\n\n Note that by default this command only affect the current resolution table - meaning that this "manual override" will disappear if you remove the lockfile, or if the package disappear from the table. If you wish to make the enforced resolution persist whatever happens, edit the `resolutions` field in your top-level manifest.\n\n Note that no attempt is made at validating that `resolution` is a valid resolution entry for `descriptor`.\n ',examples:[["Force all instances of lodash@npm:^1.2.3 to resolve to 1.5.0","$0 set resolution lodash@npm:^1.2.3 1.5.0"]]});Ye();Pt();qt();var ode=$e(Zo()),i0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unlink all workspaces belonging to the target project from the current one"});this.leadingArguments=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);let u=o.topLevelWorkspace,A=new Set;if(this.leadingArguments.length===0&&this.all)for(let{pattern:p,reference:h}of u.manifest.resolutions)h.startsWith("portal:")&&A.add(p.descriptor.fullName);if(this.leadingArguments.length>0)for(let p of this.leadingArguments){let h=z.resolve(this.context.cwd,le.toPortablePath(p));if(_e.isPathLike(p)){let E=await Ke.find(h,this.context.plugins,{useRc:!1,strict:!1}),{project:I,workspace:v}=await St.find(E,h);if(!v)throw new nr(I.cwd,h);if(this.all){for(let x of I.workspaces)x.manifest.name&&A.add(W.stringifyIdent(x.anchoredLocator));if(A.size===0)throw new it("No workspace found to be unlinked in the target project")}else{if(!v.manifest.name)throw new it("The target workspace doesn't have a name and thus cannot be unlinked");A.add(W.stringifyIdent(v.anchoredLocator))}}else{let E=[...u.manifest.resolutions.map(({pattern:I})=>I.descriptor.fullName)];for(let I of(0,ode.default)(E,p))A.add(I)}}return u.manifest.resolutions=u.manifest.resolutions.filter(({pattern:p})=>!A.has(p.descriptor.fullName)),await o.installWithNewReport({stdout:this.context.stdout,quiet:this.context.quiet},{cache:n})}};i0.paths=[["unlink"]],i0.usage=nt.Usage({description:"disconnect the local project from another one",details:` This command will remove any resolutions in the project-level manifest that would have been added via a yarn link with similar arguments. `,examples:[["Unregister a remote workspace in the current project","$0 unlink ~/ts-loader"],["Unregister all workspaces from a remote project in the current project","$0 unlink ~/jest --all"],["Unregister all previously linked workspaces","$0 unlink --all"],["Unregister all workspaces matching a glob","$0 unlink '@babel/*' 'pkg-{a,b}'"]]});Ye();Ye();Ye();qt();var ade=$e(f2()),q8=$e(Zo());$a();var Vf=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Offer various choices, depending on the detected upgrade paths"});this.fixed=ge.Boolean("-F,--fixed",!1,{description:"Store dependency tags as-is instead of resolving them"});this.exact=ge.Boolean("-E,--exact",!1,{description:"Don't use any semver modifier on the resolved range"});this.tilde=ge.Boolean("-T,--tilde",!1,{description:"Use the `~` semver modifier on the resolved range"});this.caret=ge.Boolean("-C,--caret",!1,{description:"Use the `^` semver modifier on the resolved range"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Resolve again ALL resolutions for those packages"});this.mode=ge.String("--mode",{description:"Change what artifacts installs generate",validator:Ks(hl)});this.patterns=ge.Rest()}async execute(){return this.recursive?await this.executeUpRecursive():await this.executeUpClassic()}async executeUpRecursive(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=[...o.storedDescriptors.values()],A=u.map(E=>W.stringifyIdent(E)),p=new Set;for(let E of this.patterns){if(W.parseDescriptor(E).range!=="unknown")throw new it("Ranges aren't allowed when using --recursive");for(let I of(0,q8.default)(A,E)){let v=W.parseIdent(I);p.add(v.identHash)}}let h=u.filter(E=>p.has(E.identHash));for(let E of h)o.storedDescriptors.delete(E.descriptorHash),o.storedResolutions.delete(E.descriptorHash);return await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}async executeUpClassic(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=this.fixed,A=this.interactive??r.get("preferInteractive"),p=h2(this,o),h=A?["keep","reuse","project","latest"]:["project","latest"],E=[],I=[];for(let N of this.patterns){let U=!1,V=W.parseDescriptor(N),te=W.stringifyIdent(V);for(let ae of o.workspaces)for(let fe of["dependencies","devDependencies"]){let me=[...ae.manifest.getForScope(fe).values()].map(Be=>W.stringifyIdent(Be)),he=te==="*"?me:(0,q8.default)(me,te);for(let Be of he){let we=W.parseIdent(Be),g=ae.manifest[fe].get(we.identHash);if(typeof g>"u")throw new Error("Assertion failed: Expected the descriptor to be registered");let Ee=W.makeDescriptor(we,V.range);E.push(Promise.resolve().then(async()=>[ae,fe,g,await g2(Ee,{project:o,workspace:ae,cache:n,target:fe,fixed:u,modifier:p,strategies:h})])),U=!0}}U||I.push(N)}if(I.length>1)throw new it(`Patterns ${de.prettyList(r,I,de.Type.CODE)} don't match any packages referenced by any workspace`);if(I.length>0)throw new it(`Pattern ${de.prettyList(r,I,de.Type.CODE)} doesn't match any packages referenced by any workspace`);let v=await Promise.all(E),x=await fA.start({configuration:r,stdout:this.context.stdout,suggestInstall:!1},async N=>{for(let[,,U,{suggestions:V,rejections:te}]of v){let ae=V.filter(fe=>fe.descriptor!==null);if(ae.length===0){let[fe]=te;if(typeof fe>"u")throw new Error("Assertion failed: Expected an error to have been set");let ue=this.cli.error(fe);o.configuration.get("enableNetwork")?N.reportError(27,`${W.prettyDescriptor(r,U)} can't be resolved to a satisfying range ${ue}`):N.reportError(27,`${W.prettyDescriptor(r,U)} can't be resolved to a satisfying range (note: network resolution has been disabled) ${ue}`)}else ae.length>1&&!A&&N.reportError(27,`${W.prettyDescriptor(r,U)} has multiple possible upgrade strategies; use -i to disambiguate manually`)}});if(x.hasErrors())return x.exitCode();let C=!1,R=[];for(let[N,U,,{suggestions:V}]of v){let te,ae=V.filter(he=>he.descriptor!==null),fe=ae[0].descriptor,ue=ae.every(he=>W.areDescriptorsEqual(he.descriptor,fe));ae.length===1||ue?te=fe:(C=!0,{answer:te}=await(0,ade.prompt)({type:"select",name:"answer",message:`Which range do you want to use in ${W.prettyWorkspace(r,N)} \u276F ${U}?`,choices:V.map(({descriptor:he,name:Be,reason:we})=>he?{name:Be,hint:we,descriptor:he}:{name:Be,hint:we,disabled:!0}),onCancel:()=>process.exit(130),result(he){return this.find(he,"descriptor")},stdin:this.context.stdin,stdout:this.context.stdout}));let me=N.manifest[U].get(te.identHash);if(typeof me>"u")throw new Error("Assertion failed: This descriptor should have a matching entry");if(me.descriptorHash!==te.descriptorHash)N.manifest[U].set(te.identHash,te),R.push([N,U,me,te]);else{let he=r.makeResolver(),Be={project:o,resolver:he},we=r.normalizeDependency(me),g=he.bindDescriptor(we,N.anchoredLocator,Be);o.forgetResolution(g)}}return await r.triggerMultipleHooks(N=>N.afterWorkspaceDependencyReplacement,R),C&&this.context.stdout.write(` `),await o.installWithNewReport({stdout:this.context.stdout},{cache:n,mode:this.mode})}};Vf.paths=[["up"]],Vf.usage=nt.Usage({description:"upgrade dependencies across the project",details:"\n This command upgrades the packages matching the list of specified patterns to their latest available version across the whole project (regardless of whether they're part of `dependencies` or `devDependencies` - `peerDependencies` won't be affected). This is a project-wide command: all workspaces will be upgraded in the process.\n\n If `-R,--recursive` is set the command will change behavior and no other switch will be allowed. When operating under this mode `yarn up` will force all ranges matching the selected packages to be resolved again (often to the highest available versions) before being stored in the lockfile. It however won't touch your manifests anymore, so depending on your needs you might want to run both `yarn up` and `yarn up -R` to cover all bases.\n\n If `-i,--interactive` is set (or if the `preferInteractive` settings is toggled on) the command will offer various choices, depending on the detected upgrade paths. Some upgrades require this flag in order to resolve ambiguities.\n\n The, `-C,--caret`, `-E,--exact` and `-T,--tilde` options have the same meaning as in the `add` command (they change the modifier used when the range is missing or a tag, and are ignored when the range is explicitly set).\n\n If the `--mode=` option is set, Yarn will change which artifacts are generated. The modes currently supported are:\n\n - `skip-build` will not run the build scripts at all. Note that this is different from setting `enableScripts` to false because the latter will disable build scripts, and thus affect the content of the artifacts generated on disk, whereas the former will just disable the build step - but not the scripts themselves, which just won't run.\n\n - `update-lockfile` will skip the link step altogether, and only fetch packages that are missing from the lockfile (or that have no associated checksums). This mode is typically used by tools like Renovate or Dependabot to keep a lockfile up-to-date without incurring the full install cost.\n\n Generally you can see `yarn up` as a counterpart to what was `yarn upgrade --latest` in Yarn 1 (ie it ignores the ranges previously listed in your manifests), but unlike `yarn upgrade` which only upgraded dependencies in the current workspace, `yarn up` will upgrade all workspaces at the same time.\n\n This command accepts glob patterns as arguments (if valid Descriptors and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n **Note:** The ranges have to be static, only the package scopes and names can contain glob patterns.\n ",examples:[["Upgrade all instances of lodash to the latest release","$0 up lodash"],["Upgrade all instances of lodash to the latest release, but ask confirmation for each","$0 up lodash -i"],["Upgrade all instances of lodash to 1.2.3","$0 up lodash@1.2.3"],["Upgrade all instances of packages with the `@babel` scope to the latest release","$0 up '@babel/*'"],["Upgrade all instances of packages containing the word `jest` to the latest release","$0 up '*jest*'"],["Upgrade all instances of packages with the `@babel` scope to 7.0.0","$0 up '@babel/*@7.0.0'"]]}),Vf.schema=[cI("recursive",Yu.Forbids,["interactive","exact","tilde","caret"],{ignore:[void 0,!1]})];Ye();Ye();Ye();qt();var s0=class extends ut{constructor(){super(...arguments);this.recursive=ge.Boolean("-R,--recursive",!1,{description:"List, for each workspace, what are all the paths that lead to the dependency"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.peers=ge.Boolean("--peers",!1,{description:"Also print the peer dependencies that match the specified name"});this.package=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=W.parseIdent(this.package).identHash,u=this.recursive?igt(o,n,{configuration:r,peers:this.peers}):ngt(o,n,{configuration:r,peers:this.peers});$s.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1})}};s0.paths=[["why"]],s0.usage=nt.Usage({description:"display the reason why a package is needed",details:` This command prints the exact reasons why a package appears in the dependency tree. If \`-R,--recursive\` is set, the listing will go in depth and will list, for each workspaces, what are all the paths that lead to the dependency. Note that the display is somewhat optimized in that it will not print the package listing twice for a single package, so if you see a leaf named "Foo" when looking for "Bar", it means that "Foo" already got printed higher in the tree. `,examples:[["Explain why lodash is used in your project","$0 why lodash"]]});function ngt(t,e,{configuration:r,peers:o}){let a=_e.sortMap(t.storedPackages.values(),A=>W.stringifyLocator(A)),n={},u={children:n};for(let A of a){let p={};for(let E of A.dependencies.values()){if(!o&&A.peerDependencies.has(E.identHash))continue;let I=t.storedResolutions.get(E.descriptorHash);if(!I)throw new Error("Assertion failed: The resolution should have been registered");let v=t.storedPackages.get(I);if(!v)throw new Error("Assertion failed: The package should have been registered");if(v.identHash!==e)continue;{let C=W.stringifyLocator(A);n[C]={value:[A,de.Type.LOCATOR],children:p}}let x=W.stringifyLocator(v);p[x]={value:[{descriptor:E,locator:v},de.Type.DEPENDENT]}}}return u}function igt(t,e,{configuration:r,peers:o}){let a=_e.sortMap(t.workspaces,v=>W.stringifyLocator(v.anchoredLocator)),n=new Set,u=new Set,A=v=>{if(n.has(v.locatorHash))return u.has(v.locatorHash);if(n.add(v.locatorHash),v.identHash===e)return u.add(v.locatorHash),!0;let x=!1;v.identHash===e&&(x=!0);for(let C of v.dependencies.values()){if(!o&&v.peerDependencies.has(C.identHash))continue;let R=t.storedResolutions.get(C.descriptorHash);if(!R)throw new Error("Assertion failed: The resolution should have been registered");let N=t.storedPackages.get(R);if(!N)throw new Error("Assertion failed: The package should have been registered");A(N)&&(x=!0)}return x&&u.add(v.locatorHash),x};for(let v of a)A(v.anchoredPackage);let p=new Set,h={},E={children:h},I=(v,x,C)=>{if(!u.has(v.locatorHash))return;let R=C!==null?de.tuple(de.Type.DEPENDENT,{locator:v,descriptor:C}):de.tuple(de.Type.LOCATOR,v),N={},U={value:R,children:N},V=W.stringifyLocator(v);if(x[V]=U,!(C!==null&&t.tryWorkspaceByLocator(v))&&!p.has(v.locatorHash)){p.add(v.locatorHash);for(let te of v.dependencies.values()){if(!o&&v.peerDependencies.has(te.identHash))continue;let ae=t.storedResolutions.get(te.descriptorHash);if(!ae)throw new Error("Assertion failed: The resolution should have been registered");let fe=t.storedPackages.get(ae);if(!fe)throw new Error("Assertion failed: The package should have been registered");I(fe,N,te)}}};for(let v of a)I(v.anchoredPackage,h,null);return E}Ye();var Z8={};zt(Z8,{GitFetcher:()=>w2,GitResolver:()=>I2,default:()=>Dgt,gitUtils:()=>ra});Ye();Pt();var ra={};zt(ra,{TreeishProtocols:()=>C2,clone:()=>X8,fetchBase:()=>xde,fetchChangedFiles:()=>kde,fetchChangedWorkspaces:()=>Bgt,fetchRoot:()=>bde,isGitUrl:()=>CC,lsRemote:()=>Sde,normalizeLocator:()=>Igt,normalizeRepoUrl:()=>yC,resolveUrl:()=>J8,splitRepoUrl:()=>o0,validateRepoUrl:()=>V8});Ye();Pt();qt();var vde=$e(wde()),Dde=$e(mU()),EC=$e(ve("querystring")),K8=$e(Jn());function W8(t,e,r){let o=t.indexOf(r);return t.lastIndexOf(e,o>-1?o:1/0)}function Ide(t){try{return new URL(t)}catch{return}}function Cgt(t){let e=W8(t,"@","#"),r=W8(t,":","#");return r>e&&(t=`${t.slice(0,r)}/${t.slice(r+1)}`),W8(t,":","#")===-1&&t.indexOf("//")===-1&&(t=`ssh://${t}`),t}function Bde(t){return Ide(t)||Ide(Cgt(t))}function yC(t,{git:e=!1}={}){if(t=t.replace(/^git\+https:/,"https:"),t=t.replace(/^(?:github:|https:\/\/github\.com\/|git:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)(?:\.git)?(#.*)?$/,"https://github.com/$1/$2.git$3"),t=t.replace(/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/,"https://github.com/$1/$2.git#$3"),e){let r=Bde(t);r&&(t=r.href),t=t.replace(/^git\+([^:]+):/,"$1:")}return t}function Pde(){return{...process.env,GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND||`${process.env.GIT_SSH||"ssh"} -o BatchMode=yes`}}var wgt=[/^ssh:/,/^git(?:\+[^:]+)?:/,/^(?:git\+)?https?:[^#]+\/[^#]+(?:\.git)(?:#.*)?$/,/^git@[^#]+\/[^#]+\.git(?:#.*)?$/,/^(?:github:|https:\/\/github\.com\/)?(?!\.{1,2}\/)([a-zA-Z._0-9-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z._0-9-]+?)(?:\.git)?(?:#.*)?$/,/^https:\/\/github\.com\/(?!\.{1,2}\/)([a-zA-Z0-9._-]+)\/(?!\.{1,2}(?:#|$))([a-zA-Z0-9._-]+?)\/tarball\/(.+)?$/],C2=(a=>(a.Commit="commit",a.Head="head",a.Tag="tag",a.Semver="semver",a))(C2||{});function CC(t){return t?wgt.some(e=>!!t.match(e)):!1}function o0(t){t=yC(t);let e=t.indexOf("#");if(e===-1)return{repo:t,treeish:{protocol:"head",request:"HEAD"},extra:{}};let r=t.slice(0,e),o=t.slice(e+1);if(o.match(/^[a-z]+=/)){let a=EC.default.parse(o);for(let[p,h]of Object.entries(a))if(typeof h!="string")throw new Error(`Assertion failed: The ${p} parameter must be a literal string`);let n=Object.values(C2).find(p=>Object.hasOwn(a,p)),[u,A]=typeof n<"u"?[n,a[n]]:["head","HEAD"];for(let p of Object.values(C2))delete a[p];return{repo:r,treeish:{protocol:u,request:A},extra:a}}else{let a=o.indexOf(":"),[n,u]=a===-1?[null,o]:[o.slice(0,a),o.slice(a+1)];return{repo:r,treeish:{protocol:n,request:u},extra:{}}}}function Igt(t){return W.makeLocator(t,yC(t.reference))}function V8(t,{configuration:e}){let r=yC(t,{git:!0});if(!nn.getNetworkSettings(`https://${(0,vde.default)(r).resource}`,{configuration:e}).enableNetwork)throw new Jt(80,`Request to '${r}' has been blocked because of your configuration settings`);return r}async function Sde(t,e){let r=V8(t,{configuration:e}),o=await z8("listing refs",["ls-remote",r],{cwd:e.startingCwd,env:Pde()},{configuration:e,normalizedRepoUrl:r}),a=new Map,n=/^([a-f0-9]{40})\t([^\n]+)/gm,u;for(;(u=n.exec(o.stdout))!==null;)a.set(u[2],u[1]);return a}async function J8(t,e){let{repo:r,treeish:{protocol:o,request:a},extra:n}=o0(t),u=await Sde(r,e),A=(h,E)=>{switch(h){case"commit":{if(!E.match(/^[a-f0-9]{40}$/))throw new Error("Invalid commit hash");return EC.default.stringify({...n,commit:E})}case"head":{let I=u.get(E==="HEAD"?E:`refs/heads/${E}`);if(typeof I>"u")throw new Error(`Unknown head ("${E}")`);return EC.default.stringify({...n,commit:I})}case"tag":{let I=u.get(`refs/tags/${E}`);if(typeof I>"u")throw new Error(`Unknown tag ("${E}")`);return EC.default.stringify({...n,commit:I})}case"semver":{let I=kr.validRange(E);if(!I)throw new Error(`Invalid range ("${E}")`);let v=new Map([...u.entries()].filter(([C])=>C.startsWith("refs/tags/")).map(([C,R])=>[K8.default.parse(C.slice(10)),R]).filter(C=>C[0]!==null)),x=K8.default.maxSatisfying([...v.keys()],I);if(x===null)throw new Error(`No matching range ("${E}")`);return EC.default.stringify({...n,commit:v.get(x)})}case null:{let I;if((I=p("commit",E))!==null||(I=p("tag",E))!==null||(I=p("head",E))!==null)return I;throw E.match(/^[a-f0-9]+$/)?new Error(`Couldn't resolve "${E}" as either a commit, a tag, or a head - if a commit, use the 40-characters commit hash`):new Error(`Couldn't resolve "${E}" as either a commit, a tag, or a head`)}default:throw new Error(`Invalid Git resolution protocol ("${h}")`)}},p=(h,E)=>{try{return A(h,E)}catch{return null}};return yC(`${r}#${A(o,a)}`)}async function X8(t,e){return await e.getLimit("cloneConcurrency")(async()=>{let{repo:r,treeish:{protocol:o,request:a}}=o0(t);if(o!=="commit")throw new Error("Invalid treeish protocol when cloning");let n=V8(r,{configuration:e}),u=await oe.mktempPromise(),A={cwd:u,env:Pde()};return await z8("cloning the repository",["clone","-c core.autocrlf=false",n,le.fromPortablePath(u)],A,{configuration:e,normalizedRepoUrl:n}),await z8("switching branch",["checkout",`${a}`],A,{configuration:e,normalizedRepoUrl:n}),u})}async function bde(t){let e,r=t;do{if(e=r,await oe.existsPromise(z.join(e,".git")))return e;r=z.dirname(e)}while(r!==e);return null}async function xde(t,{baseRefs:e}){if(e.length===0)throw new it("Can't run this command with zero base refs specified.");let r=[];for(let A of e){let{code:p}=await Ur.execvp("git",["merge-base",A,"HEAD"],{cwd:t});p===0&&r.push(A)}if(r.length===0)throw new it(`No ancestor could be found between any of HEAD and ${e.join(", ")}`);let{stdout:o}=await Ur.execvp("git",["merge-base","HEAD",...r],{cwd:t,strict:!0}),a=o.trim(),{stdout:n}=await Ur.execvp("git",["show","--quiet","--pretty=format:%s",a],{cwd:t,strict:!0}),u=n.trim();return{hash:a,title:u}}async function kde(t,{base:e,project:r}){let o=_e.buildIgnorePattern(r.configuration.get("changesetIgnorePatterns")),{stdout:a}=await Ur.execvp("git",["diff","--name-only",`${e}`],{cwd:t,strict:!0}),n=a.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>z.resolve(t,le.toPortablePath(h))),{stdout:u}=await Ur.execvp("git",["ls-files","--others","--exclude-standard"],{cwd:t,strict:!0}),A=u.split(/\r\n|\r|\n/).filter(h=>h.length>0).map(h=>z.resolve(t,le.toPortablePath(h))),p=[...new Set([...n,...A].sort())];return o?p.filter(h=>!z.relative(r.cwd,h).match(o)):p}async function Bgt({ref:t,project:e}){if(e.configuration.projectCwd===null)throw new it("This command can only be run from within a Yarn project");let r=[z.resolve(e.cwd,dr.lockfile),z.resolve(e.cwd,e.configuration.get("cacheFolder")),z.resolve(e.cwd,e.configuration.get("installStatePath")),z.resolve(e.cwd,e.configuration.get("virtualFolder"))];await e.configuration.triggerHook(u=>u.populateYarnPaths,e,u=>{u!=null&&r.push(u)});let o=await bde(e.configuration.projectCwd);if(o==null)throw new it("This command can only be run on Git repositories");let a=await xde(o,{baseRefs:typeof t=="string"?[t]:e.configuration.get("changesetBaseRefs")}),n=await kde(o,{base:a.hash,project:e});return new Set(_e.mapAndFilter(n,u=>{let A=e.tryWorkspaceByFilePath(u);return A===null?_e.mapAndFilter.skip:r.some(p=>u.startsWith(p))?_e.mapAndFilter.skip:A}))}async function z8(t,e,r,{configuration:o,normalizedRepoUrl:a}){try{return await Ur.execvp("git",e,{...r,strict:!0})}catch(n){if(!(n instanceof Ur.ExecError))throw n;let u=n.reportExtra,A=n.stderr.toString();throw new Jt(1,`Failed ${t}`,p=>{p.reportError(1,` ${de.prettyField(o,{label:"Repository URL",value:de.tuple(de.Type.URL,a)})}`);for(let h of A.matchAll(/^(.+?): (.*)$/gm)){let[,E,I]=h;E=E.toLowerCase();let v=E==="error"?"Error":`${(0,Dde.default)(E)} Error`;p.reportError(1,` ${de.prettyField(o,{label:v,value:de.tuple(de.Type.NO_HINT,I)})}`)}u?.(p)})}}var w2=class{supports(e,r){return CC(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,a=new Map(r.checksums);a.set(e.locatorHash,o);let n={...r,checksums:a},u=await this.downloadHosted(e,n);if(u!==null)return u;let[A,p,h]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote repository`),loader:()=>this.cloneFromRemote(e,n),...r.cacheOptions});return{packageFs:A,releaseFs:p,prefixPath:W.getIdentVendorPath(e),checksum:h}}async downloadHosted(e,r){return r.project.configuration.reduceHook(o=>o.fetchHostedRepository,null,e,r)}async cloneFromRemote(e,r){let o=await X8(e.reference,r.project.configuration),a=o0(e.reference),n=z.join(o,"package.tgz");await un.prepareExternalProject(o,n,{configuration:r.project.configuration,report:r.report,workspace:a.extra.workspace,locator:e});let u=await oe.readFilePromise(n);return await _e.releaseAfterUseAsync(async()=>await Xi.convertToZip(u,{configuration:r.project.configuration,prefixPath:W.getIdentVendorPath(e),stripComponents:1}))}};Ye();Ye();var I2=class{supportsDescriptor(e,r){return CC(e.range)}supportsLocator(e,r){return CC(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=await J8(e.range,o.project.configuration);return[W.makeLocator(e,a)]}async getSatisfying(e,r,o,a){let n=o0(e.range);return{locators:o.filter(A=>{if(A.identHash!==e.identHash)return!1;let p=o0(A.reference);return!(n.repo!==p.repo||n.treeish.protocol==="commit"&&n.treeish.request!==p.treeish.request)}),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var vgt={configuration:{changesetBaseRefs:{description:"The base git refs that the current HEAD is compared against when detecting changes. Supports git branches, tags, and commits.",type:"STRING",isArray:!0,isNullable:!1,default:["master","origin/master","upstream/master","main","origin/main","upstream/main"]},changesetIgnorePatterns:{description:"Array of glob patterns; files matching them will be ignored when fetching the changed files",type:"STRING",default:[],isArray:!0},cloneConcurrency:{description:"Maximal number of concurrent clones",type:"NUMBER",default:2}},fetchers:[w2],resolvers:[I2]};var Dgt=vgt;qt();var a0=class extends ut{constructor(){super(...arguments);this.since=ge.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Find packages via dependencies/devDependencies instead of using the workspaces field"});this.noPrivate=ge.Boolean("--no-private",{description:"Exclude workspaces that have the private field set to true"});this.verbose=ge.Boolean("-v,--verbose",!1,{description:"Also return the cross-dependencies between workspaces"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);return(await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async n=>{let u=this.since?await ra.fetchChangedWorkspaces({ref:this.since,project:o}):o.workspaces,A=new Set(u);if(this.recursive)for(let p of[...u].map(h=>h.getRecursiveWorkspaceDependents()))for(let h of p)A.add(h);for(let p of A){let{manifest:h}=p;if(h.private&&this.noPrivate)continue;let E;if(this.verbose){let I=new Set,v=new Set;for(let x of Ot.hardDependencies)for(let[C,R]of h.getForScope(x)){let N=o.tryWorkspaceByDescriptor(R);N===null?o.workspacesByIdent.has(C)&&v.add(R):I.add(N)}E={workspaceDependencies:Array.from(I).map(x=>x.relativeCwd),mismatchedWorkspaceDependencies:Array.from(v).map(x=>W.stringifyDescriptor(x))}}n.reportInfo(null,`${p.relativeCwd}`),n.reportJson({location:p.relativeCwd,name:h.name?W.stringifyIdent(h.name):null,...E})}})).exitCode()}};a0.paths=[["workspaces","list"]],a0.usage=nt.Usage({category:"Workspace-related commands",description:"list all available workspaces",details:"\n This command will print the list of all workspaces in the project.\n\n - If `--since` is set, Yarn will only list workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `--no-private` is set, Yarn will not list any workspaces that have the `private` field set to `true`.\n\n - If both the `-v,--verbose` and `--json` options are set, Yarn will also return the cross-dependencies between each workspaces (useful when you wish to automatically generate Buck / Bazel rules).\n "});Ye();Ye();qt();var l0=class extends ut{constructor(){super(...arguments);this.workspaceName=ge.String();this.commandName=ge.String();this.args=ge.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);let n=o.workspaces,u=new Map(n.map(p=>[W.stringifyIdent(p.anchoredLocator),p])),A=u.get(this.workspaceName);if(A===void 0){let p=Array.from(u.keys()).sort();throw new it(`Workspace '${this.workspaceName}' not found. Did you mean any of the following: - ${p.join(` - `)}?`)}return this.cli.run([this.commandName,...this.args],{cwd:A.cwd})}};l0.paths=[["workspace"]],l0.usage=nt.Usage({category:"Workspace-related commands",description:"run a command within the specified workspace",details:` This command will run a given sub-command on a single workspace. `,examples:[["Add a package to a single workspace","yarn workspace components add -D react"],["Run build script on a single workspace","yarn workspace components run build"]]});var Pgt={configuration:{enableImmutableInstalls:{description:"If true (the default on CI), prevents the install command from modifying the lockfile",type:"BOOLEAN",default:Qde.isCI},defaultSemverRangePrefix:{description:"The default save prefix: '^', '~' or ''",type:"STRING",values:["^","~",""],default:"^"},preferReuse:{description:"If true, `yarn add` will attempt to reuse the most common dependency range in other workspaces.",type:"BOOLEAN",default:!1}},commands:[Rh,Th,Lh,Nh,n0,Vh,Hh,a0,zd,Vd,mC,Jd,Qh,Fh,Oh,Mh,Uh,_h,qh,Gh,jh,Yh,i0,Wh,Kh,Xh,Jh,Zh,zh,$h,e0,t0,Zd,r0,Vf,s0,l0]},Sgt=Pgt;var iH={};zt(iH,{default:()=>xgt});Ye();var kt={optional:!0},eH=[["@tailwindcss/aspect-ratio@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@tailwindcss/line-clamp@<0.2.1",{peerDependencies:{tailwindcss:"^2.0.2"}}],["@fullhuman/postcss-purgecss@3.1.3 || 3.1.3-alpha.0",{peerDependencies:{postcss:"^8.0.0"}}],["@samverschueren/stream-to-observable@<0.3.1",{peerDependenciesMeta:{rxjs:kt,zenObservable:kt}}],["any-observable@<0.5.1",{peerDependenciesMeta:{rxjs:kt,zenObservable:kt}}],["@pm2/agent@<1.0.4",{dependencies:{debug:"*"}}],["debug@<4.2.0",{peerDependenciesMeta:{["supports-color"]:kt}}],["got@<11",{dependencies:{["@types/responselike"]:"^1.0.0",["@types/keyv"]:"^3.1.1"}}],["cacheable-lookup@<4.1.2",{dependencies:{["@types/keyv"]:"^3.1.1"}}],["http-link-dataloader@*",{peerDependencies:{graphql:"^0.13.1 || ^14.0.0"}}],["typescript-language-server@*",{dependencies:{["vscode-jsonrpc"]:"^5.0.1",["vscode-languageserver-protocol"]:"^3.15.0"}}],["postcss-syntax@*",{peerDependenciesMeta:{["postcss-html"]:kt,["postcss-jsx"]:kt,["postcss-less"]:kt,["postcss-markdown"]:kt,["postcss-scss"]:kt}}],["jss-plugin-rule-value-function@<=10.1.1",{dependencies:{["tiny-warning"]:"^1.0.2"}}],["ink-select-input@<4.1.0",{peerDependencies:{react:"^16.8.2"}}],["license-webpack-plugin@<2.3.18",{peerDependenciesMeta:{webpack:kt}}],["snowpack@>=3.3.0",{dependencies:{["node-gyp"]:"^7.1.0"}}],["promise-inflight@*",{peerDependenciesMeta:{bluebird:kt}}],["reactcss@*",{peerDependencies:{react:"*"}}],["react-color@<=2.19.0",{peerDependencies:{react:"*"}}],["gatsby-plugin-i18n@*",{dependencies:{ramda:"^0.24.1"}}],["useragent@^2.0.0",{dependencies:{request:"^2.88.0",yamlparser:"0.0.x",semver:"5.5.x"}}],["@apollographql/apollo-tools@<=0.5.2",{peerDependencies:{graphql:"^14.2.1 || ^15.0.0"}}],["material-table@^2.0.0",{dependencies:{"@babel/runtime":"^7.11.2"}}],["@babel/parser@*",{dependencies:{"@babel/types":"^7.8.3"}}],["fork-ts-checker-webpack-plugin@<=6.3.4",{peerDependencies:{eslint:">= 6",typescript:">= 2.7",webpack:">= 4","vue-template-compiler":"*"},peerDependenciesMeta:{eslint:kt,"vue-template-compiler":kt}}],["rc-animate@<=3.1.1",{peerDependencies:{react:">=16.9.0","react-dom":">=16.9.0"}}],["react-bootstrap-table2-paginator@*",{dependencies:{classnames:"^2.2.6"}}],["react-draggable@<=4.4.3",{peerDependencies:{react:">= 16.3.0","react-dom":">= 16.3.0"}}],["apollo-upload-client@<14",{peerDependencies:{graphql:"14 - 15"}}],["react-instantsearch-core@<=6.7.0",{peerDependencies:{algoliasearch:">= 3.1 < 5"}}],["react-instantsearch-dom@<=6.7.0",{dependencies:{"react-fast-compare":"^3.0.0"}}],["ws@<7.2.1",{peerDependencies:{bufferutil:"^4.0.1","utf-8-validate":"^5.0.2"},peerDependenciesMeta:{bufferutil:kt,"utf-8-validate":kt}}],["react-portal@<4.2.2",{peerDependencies:{"react-dom":"^15.0.0-0 || ^16.0.0-0 || ^17.0.0-0"}}],["react-scripts@<=4.0.1",{peerDependencies:{react:"*"}}],["testcafe@<=1.10.1",{dependencies:{"@babel/plugin-transform-for-of":"^7.12.1","@babel/runtime":"^7.12.5"}}],["testcafe-legacy-api@<=4.2.0",{dependencies:{"testcafe-hammerhead":"^17.0.1","read-file-relative":"^1.2.0"}}],["@google-cloud/firestore@<=4.9.3",{dependencies:{protobufjs:"^6.8.6"}}],["gatsby-source-apiserver@*",{dependencies:{["babel-polyfill"]:"^6.26.0"}}],["@webpack-cli/package-utils@<=1.0.1-alpha.4",{dependencies:{["cross-spawn"]:"^7.0.3"}}],["gatsby-remark-prismjs@<3.3.28",{dependencies:{lodash:"^4"}}],["gatsby-plugin-favicon@*",{peerDependencies:{webpack:"*"}}],["gatsby-plugin-sharp@<=4.6.0-next.3",{dependencies:{debug:"^4.3.1"}}],["gatsby-react-router-scroll@<=5.6.0-next.0",{dependencies:{["prop-types"]:"^15.7.2"}}],["@rebass/forms@*",{dependencies:{["@styled-system/should-forward-prop"]:"^5.0.0"},peerDependencies:{react:"^16.8.6"}}],["rebass@*",{peerDependencies:{react:"^16.8.6"}}],["@ant-design/react-slick@<=0.28.3",{peerDependencies:{react:">=16.0.0"}}],["mqtt@<4.2.7",{dependencies:{duplexify:"^4.1.1"}}],["vue-cli-plugin-vuetify@<=2.0.3",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":kt,"vuetify-loader":kt}}],["vue-cli-plugin-vuetify@<=2.0.4",{dependencies:{"null-loader":"^3.0.0"}}],["vue-cli-plugin-vuetify@>=2.4.3",{peerDependencies:{vue:"*"}}],["@vuetify/cli-plugin-utils@<=0.0.4",{dependencies:{semver:"^6.3.0"},peerDependenciesMeta:{"sass-loader":kt}}],["@vue/cli-plugin-typescript@<=5.0.0-alpha.0",{dependencies:{"babel-loader":"^8.1.0"}}],["@vue/cli-plugin-typescript@<=5.0.0-beta.0",{dependencies:{"@babel/core":"^7.12.16"},peerDependencies:{"vue-template-compiler":"^2.0.0"},peerDependenciesMeta:{"vue-template-compiler":kt}}],["cordova-ios@<=6.3.0",{dependencies:{underscore:"^1.9.2"}}],["cordova-lib@<=10.0.1",{dependencies:{underscore:"^1.9.2"}}],["git-node-fs@*",{peerDependencies:{"js-git":"^0.7.8"},peerDependenciesMeta:{"js-git":kt}}],["consolidate@<0.16.0",{peerDependencies:{mustache:"^3.0.0"},peerDependenciesMeta:{mustache:kt}}],["consolidate@<=0.16.0",{peerDependencies:{velocityjs:"^2.0.1",tinyliquid:"^0.2.34","liquid-node":"^3.0.1",jade:"^1.11.0","then-jade":"*",dust:"^0.3.0","dustjs-helpers":"^1.7.4","dustjs-linkedin":"^2.7.5",swig:"^1.4.2","swig-templates":"^2.0.3","razor-tmpl":"^1.3.1",atpl:">=0.7.6",liquor:"^0.0.5",twig:"^1.15.2",ejs:"^3.1.5",eco:"^1.1.0-rc-3",jazz:"^0.0.18",jqtpl:"~1.1.0",hamljs:"^0.6.2",hamlet:"^0.3.3",whiskers:"^0.4.0","haml-coffee":"^1.14.1","hogan.js":"^3.0.2",templayed:">=0.2.3",handlebars:"^4.7.6",underscore:"^1.11.0",lodash:"^4.17.20",pug:"^3.0.0","then-pug":"*",qejs:"^3.0.5",walrus:"^0.10.1",mustache:"^4.0.1",just:"^0.1.8",ect:"^0.5.9",mote:"^0.2.0",toffee:"^0.3.6",dot:"^1.1.3","bracket-template":"^1.1.5",ractive:"^1.3.12",nunjucks:"^3.2.2",htmling:"^0.0.8","babel-core":"^6.26.3",plates:"~0.4.11","react-dom":"^16.13.1",react:"^16.13.1","arc-templates":"^0.5.3",vash:"^0.13.0",slm:"^2.0.0",marko:"^3.14.4",teacup:"^2.0.0","coffee-script":"^1.12.7",squirrelly:"^5.1.0",twing:"^5.0.2"},peerDependenciesMeta:{velocityjs:kt,tinyliquid:kt,"liquid-node":kt,jade:kt,"then-jade":kt,dust:kt,"dustjs-helpers":kt,"dustjs-linkedin":kt,swig:kt,"swig-templates":kt,"razor-tmpl":kt,atpl:kt,liquor:kt,twig:kt,ejs:kt,eco:kt,jazz:kt,jqtpl:kt,hamljs:kt,hamlet:kt,whiskers:kt,"haml-coffee":kt,"hogan.js":kt,templayed:kt,handlebars:kt,underscore:kt,lodash:kt,pug:kt,"then-pug":kt,qejs:kt,walrus:kt,mustache:kt,just:kt,ect:kt,mote:kt,toffee:kt,dot:kt,"bracket-template":kt,ractive:kt,nunjucks:kt,htmling:kt,"babel-core":kt,plates:kt,"react-dom":kt,react:kt,"arc-templates":kt,vash:kt,slm:kt,marko:kt,teacup:kt,"coffee-script":kt,squirrelly:kt,twing:kt}}],["vue-loader@<=16.3.3",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",webpack:"^4.1.0 || ^5.0.0-0"},peerDependenciesMeta:{"@vue/compiler-sfc":kt}}],["vue-loader@^16.7.0",{peerDependencies:{"@vue/compiler-sfc":"^3.0.8",vue:"^3.2.13"},peerDependenciesMeta:{"@vue/compiler-sfc":kt,vue:kt}}],["scss-parser@<=1.0.5",{dependencies:{lodash:"^4.17.21"}}],["query-ast@<1.0.5",{dependencies:{lodash:"^4.17.21"}}],["redux-thunk@<=2.3.0",{peerDependencies:{redux:"^4.0.0"}}],["skypack@<=0.3.2",{dependencies:{tar:"^6.1.0"}}],["@npmcli/metavuln-calculator@<2.0.0",{dependencies:{"json-parse-even-better-errors":"^2.3.1"}}],["bin-links@<2.3.0",{dependencies:{"mkdirp-infer-owner":"^1.0.2"}}],["rollup-plugin-polyfill-node@<=0.8.0",{peerDependencies:{rollup:"^1.20.0 || ^2.0.0"}}],["snowpack@<3.8.6",{dependencies:{"magic-string":"^0.25.7"}}],["elm-webpack-loader@*",{dependencies:{temp:"^0.9.4"}}],["winston-transport@<=4.4.0",{dependencies:{logform:"^2.2.0"}}],["jest-vue-preprocessor@*",{dependencies:{"@babel/core":"7.8.7","@babel/template":"7.8.6"},peerDependencies:{pug:"^2.0.4"},peerDependenciesMeta:{pug:kt}}],["redux-persist@*",{peerDependencies:{react:">=16"},peerDependenciesMeta:{react:kt}}],["sodium@>=3",{dependencies:{"node-gyp":"^3.8.0"}}],["babel-plugin-graphql-tag@<=3.1.0",{peerDependencies:{graphql:"^14.0.0 || ^15.0.0"}}],["@playwright/test@<=1.14.1",{dependencies:{"jest-matcher-utils":"^26.4.2"}}],...["babel-plugin-remove-graphql-queries@<3.14.0-next.1","babel-preset-gatsby-package@<1.14.0-next.1","create-gatsby@<1.14.0-next.1","gatsby-admin@<0.24.0-next.1","gatsby-cli@<3.14.0-next.1","gatsby-core-utils@<2.14.0-next.1","gatsby-design-tokens@<3.14.0-next.1","gatsby-legacy-polyfills@<1.14.0-next.1","gatsby-plugin-benchmark-reporting@<1.14.0-next.1","gatsby-plugin-graphql-config@<0.23.0-next.1","gatsby-plugin-image@<1.14.0-next.1","gatsby-plugin-mdx@<2.14.0-next.1","gatsby-plugin-netlify-cms@<5.14.0-next.1","gatsby-plugin-no-sourcemaps@<3.14.0-next.1","gatsby-plugin-page-creator@<3.14.0-next.1","gatsby-plugin-preact@<5.14.0-next.1","gatsby-plugin-preload-fonts@<2.14.0-next.1","gatsby-plugin-schema-snapshot@<2.14.0-next.1","gatsby-plugin-styletron@<6.14.0-next.1","gatsby-plugin-subfont@<3.14.0-next.1","gatsby-plugin-utils@<1.14.0-next.1","gatsby-recipes@<0.25.0-next.1","gatsby-source-shopify@<5.6.0-next.1","gatsby-source-wikipedia@<3.14.0-next.1","gatsby-transformer-screenshot@<3.14.0-next.1","gatsby-worker@<0.5.0-next.1"].map(t=>[t,{dependencies:{"@babel/runtime":"^7.14.8"}}]),["gatsby-core-utils@<2.14.0-next.1",{dependencies:{got:"8.3.2"}}],["gatsby-plugin-gatsby-cloud@<=3.1.0-next.0",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["gatsby-plugin-gatsby-cloud@<=3.2.0-next.1",{peerDependencies:{webpack:"*"}}],["babel-plugin-remove-graphql-queries@<=3.14.0-next.1",{dependencies:{"gatsby-core-utils":"^2.8.0-next.1"}}],["gatsby-plugin-netlify@3.13.0-next.1",{dependencies:{"gatsby-core-utils":"^2.13.0-next.0"}}],["clipanion-v3-codemod@<=0.2.0",{peerDependencies:{jscodeshift:"^0.11.0"}}],["react-live@*",{peerDependencies:{"react-dom":"*",react:"*"}}],["webpack@<4.44.1",{peerDependenciesMeta:{"webpack-cli":kt,"webpack-command":kt}}],["webpack@<5.0.0-beta.23",{peerDependenciesMeta:{"webpack-cli":kt}}],["webpack-dev-server@<3.10.2",{peerDependenciesMeta:{"webpack-cli":kt}}],["@docusaurus/responsive-loader@<1.5.0",{peerDependenciesMeta:{sharp:kt,jimp:kt}}],["eslint-module-utils@*",{peerDependenciesMeta:{"eslint-import-resolver-node":kt,"eslint-import-resolver-typescript":kt,"eslint-import-resolver-webpack":kt,"@typescript-eslint/parser":kt}}],["eslint-plugin-import@*",{peerDependenciesMeta:{"@typescript-eslint/parser":kt}}],["critters-webpack-plugin@<3.0.2",{peerDependenciesMeta:{"html-webpack-plugin":kt}}],["terser@<=5.10.0",{dependencies:{acorn:"^8.5.0"}}],["babel-preset-react-app@10.0.x <10.0.2",{dependencies:{"@babel/plugin-proposal-private-property-in-object":"^7.16.7"}}],["eslint-config-react-app@*",{peerDependenciesMeta:{typescript:kt}}],["@vue/eslint-config-typescript@<11.0.0",{peerDependenciesMeta:{typescript:kt}}],["unplugin-vue2-script-setup@<0.9.1",{peerDependencies:{"@vue/composition-api":"^1.4.3","@vue/runtime-dom":"^3.2.26"}}],["@cypress/snapshot@*",{dependencies:{debug:"^3.2.7"}}],["auto-relay@<=0.14.0",{peerDependencies:{"reflect-metadata":"^0.1.13"}}],["vue-template-babel-compiler@<1.2.0",{peerDependencies:{["vue-template-compiler"]:"^2.6.0"}}],["@parcel/transformer-image@<2.5.0",{peerDependencies:{["@parcel/core"]:"*"}}],["@parcel/transformer-js@<2.5.0",{peerDependencies:{["@parcel/core"]:"*"}}],["parcel@*",{peerDependenciesMeta:{["@parcel/core"]:kt}}],["react-scripts@*",{peerDependencies:{eslint:"*"}}],["focus-trap-react@^8.0.0",{dependencies:{tabbable:"^5.3.2"}}],["react-rnd@<10.3.7",{peerDependencies:{react:">=16.3.0","react-dom":">=16.3.0"}}],["connect-mongo@<5.0.0",{peerDependencies:{"express-session":"^1.17.1"}}],["vue-i18n@<9",{peerDependencies:{vue:"^2"}}],["vue-router@<4",{peerDependencies:{vue:"^2"}}],["unified@<10",{dependencies:{"@types/unist":"^2.0.0"}}],["react-github-btn@<=1.3.0",{peerDependencies:{react:">=16.3.0"}}],["react-dev-utils@*",{peerDependencies:{typescript:">=2.7",webpack:">=4"},peerDependenciesMeta:{typescript:kt}}],["@asyncapi/react-component@<=1.0.0-next.39",{peerDependencies:{react:">=16.8.0","react-dom":">=16.8.0"}}],["xo@*",{peerDependencies:{webpack:">=1.11.0"},peerDependenciesMeta:{webpack:kt}}],["babel-plugin-remove-graphql-queries@<=4.20.0-next.0",{dependencies:{"@babel/types":"^7.15.4"}}],["gatsby-plugin-page-creator@<=4.20.0-next.1",{dependencies:{"fs-extra":"^10.1.0"}}],["gatsby-plugin-utils@<=3.14.0-next.1",{dependencies:{fastq:"^1.13.0"},peerDependencies:{graphql:"^15.0.0"}}],["gatsby-plugin-mdx@<3.1.0-next.1",{dependencies:{mkdirp:"^1.0.4"}}],["gatsby-plugin-mdx@^2",{peerDependencies:{gatsby:"^3.0.0-next"}}],["fdir@<=5.2.0",{peerDependencies:{picomatch:"2.x"},peerDependenciesMeta:{picomatch:kt}}],["babel-plugin-transform-typescript-metadata@<=0.3.2",{peerDependencies:{"@babel/core":"^7","@babel/traverse":"^7"},peerDependenciesMeta:{"@babel/traverse":kt}}],["graphql-compose@>=9.0.10",{peerDependencies:{graphql:"^14.2.0 || ^15.0.0 || ^16.0.0"}}],["vite-plugin-vuetify@<=1.0.2",{peerDependencies:{vue:"^3.0.0"}}],["webpack-plugin-vuetify@<=2.0.1",{peerDependencies:{vue:"^3.2.6"}}],["eslint-import-resolver-vite@<2.0.1",{dependencies:{debug:"^4.3.4",resolve:"^1.22.8"}}]];var tH;function Fde(){return typeof tH>"u"&&(tH=ve("zlib").brotliDecompressSync(Buffer.from("G7weAByFTVk3Vs7UfHhq4yykgEM7pbW7TI43SG2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IhCBD0yUPKcxu81A+4YD78rA2vtwsUEday9WNyrShyrl60rWmA+SmbYZkQOwFJWArxRYYc5jGhA5ikxYw1rx3ei4NmeX/lKiwpZ9Ln1tV2Ae7sArvxuVLbJjqJRjW1vFXAyHpvLG+8MJ6T2Ubx5M2KDa2SN6vuIGxJ9WQM9Mk3Q7aCNiZONXllhqq24DmoLbQfW2rYWsOgHWjtOmIQMyMKdiHZDjoyIq5+U700nZ6odJAoYXPQBvFNiQ78d5jaXliBqLTJEqUCwi+LiH2mx92EmNKDsJL74Z613+3lf20pxkV1+erOrjj8pW00vsPaahKUM+05ssd5uwM7K482KWEf3TCwlg/o3e5ngto7qSMz7YteIgCsF1UOcsLk7F7MxWbvrPMY473ew0G+noVL8EPbkmEMftMSeL6HFub/zy+2JQ==","base64")).toString()),tH}var rH;function Rde(){return typeof rH>"u"&&(rH=ve("zlib").brotliDecompressSync(Buffer.from("G8MSIIzURnVBnObTcvb3XE6v2S9Qgc2K801Oa5otNKEtK8BINZNcaQHy+9/vf/WXBimwutXC33P2DPc64pps5rz7NGGWaOKNSPL4Y2KRE8twut2lFOIN+OXPtRmPMRhMTILib2bEQx43az2I5d3YS8Roa5UZpF/ujHb3Djd3GDvYUfvFYSUQ39vb2cmifp/rgB4J/65JK3wRBTvMBoNBmn3mbXC63/gbBkW/2IRPri0O8bcsRBsmarF328pAln04nyJFkwUAvNu934supAqLtyerZZpJ8I8suJHhf/ocMV+scKwa8NOiDKIPXw6Ex/EEZD6TEGaW8N5zvNHYF10l6Lfooj7D5W2k3dgvQSbp2Wv8TGOayS978gxlOLVjTGXs66ozewbrjwElLtyrYNnWTfzzdEutgROUFPVMhnMoy8EjJLLlWwIEoySxliim9kYW30JUHiPVyjt0iAw/ZpPmCbUCltYPnq6ZNblIKhTNhqS/oqC9iya5sGKZTOVsTEg34n92uZTf2iPpcZih8rPW8CzA+adIGmyCPcKdLMsBLShd+zuEbTrqpwuh+DLmracZcjPC5Sdf5odDAhKpFuOsQS67RT+1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gF5yFB22WYdJnaWN14r1YJj81hGi45+jrADS5nYRhCiSlCJJ1nL8pYX+HDSMhdTEWyRcgHVp/IsUIZYMfT+YYncUQPgcxNGCHfZ88vDdrcUuaGIl6zhAsiaq7R5dfqrqXH/JcBhfjT8D0azayIyEz75Nxp6YkcyDxlJq3EXnJUpqDohJJOysL1t1uNiHESlvsxPb5cpbW0+ICZqJmUZus1BMW0F5IVBODLIo2zHHjA0=","base64")).toString()),rH}var nH;function Tde(){return typeof nH>"u"&&(nH=ve("zlib").brotliDecompressSync(Buffer.from("m409OwVy8xl9Wz0aWLh5C+Rku0TnEAOUUhQ/9+e/2xNhHl63hoddw+s91FRj6zag6vW4MQY+qFXdgWBlxR3KtnlgCulKXrSTz7DFgsKPlnjjvrPfnVFSm37PhHADc/LAJ3x7Bi78Y7UW3fQUbD8b50X9jaQ80AMJo2VFl85CtqGmExRKMEx10T7JmdsVtqcUvAbQY3MJqoxwFiK2e+IU6pjhoLkU+Wj7zdVlQvLAI14qgoc8xZsrIC254zYHUS6Vi6BN130uOk/gy3YQKR2VDrN/Nu29+3IS2iaK/ZDwNvLlklqd6nXEE5IdxqYMkkMmLJep2t+f144+WjhLKC5NukZ3udKtBSoAKSQUxNld2cfMhNA8j9CDl9Or+OaiAS5VQ3H+ARxHMmU3N7OG/yU/gn4dchhvSR2kVhnRuOEtYV6Si6ravaugcJJ5SJ0ywQkPQ/9rocqeC4VyqlBdoU9GvQsD+ZDuwH5WbLasANlkldI0DcwHOLn3gUynsmgMYa0YTj3B2P3/elN7txBGBDjnfOl/29IkgA6Ek8Yb/sWOCpRTTOhbdetyGt2AhgCIMwBBTohKDppxiHVTVaO7AQ0gUiFZVnIKebPyZhvyznm3fq8BzqfSxJ+CQ4qLxcZ+77IS351V/1KrnXocex0y6wVs4QJkxOY9qS8kfkb7Fp6ZAc1aZmgGZwGmqaR2qJLIqBvNOv+fqVapHrUg571FF3VCFUar+r0GrTkXNV9+Xo88G62LXBIs7nU3AUjrjeacqDOizr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H4bhvtnqy0s+6CUKlP2dw0RY0j3SGo8/tUPZ6/rsFzaakg3ydCB5XLhXKX1qmdtBeI/whzTEOyd5+VIb+NGxCLaW2KdgdG6Ok6nJxTGRgFOM3qELTunQIN1wTrXxzJnAbZyC7ix9l3ZlRxaEAQCOLXmHr7GgrSp5pTLy6rnyRXmHtzCvuwE6M4vge15452bhRm8LwKKNAVYpYr8Oa2kThF2dLrQOa2+rGHYtDutI+cJezzEB6/QUO7ngFXZ7DCA2zRV2D01aNgfYpg2ipRrYHA2pvQqQYV/KaR40kf3qzt0oL8ftcfy9lHGt+FLu+KCRWUwAQEfvswaJnBSmhVzjfTA97L4/SKQJ6oLaLw62BLunrfHM5roBMpyqYgoLZDbfglMziFzp4+8Bf7dJN7jtZb3KQecXHoef+217+3Gz7cH27s7s1aERt5SZ4dwMYxrfFrIyLQ==","base64")).toString()),nH}var Lde=new Map([[W.makeIdent(null,"fsevents").identHash,Fde],[W.makeIdent(null,"resolve").identHash,Rde],[W.makeIdent(null,"typescript").identHash,Tde]]),bgt={hooks:{registerPackageExtensions:async(t,e)=>{for(let[r,o]of eH)e(W.parseDescriptor(r,!0),o)},getBuiltinPatch:async(t,e)=>{let r="compat/";if(!e.startsWith(r))return;let o=W.parseIdent(e.slice(r.length)),a=Lde.get(o.identHash)?.();return typeof a<"u"?a:null},reduceDependency:async(t,e,r,o)=>typeof Lde.get(t.identHash)>"u"?t:W.makeDescriptor(t,W.makeRange({protocol:"patch:",source:W.stringifyDescriptor(t),selector:`optional!builtin`,params:null}))}},xgt=bgt;var wH={};zt(wH,{ConstraintsCheckCommand:()=>g0,ConstraintsQueryCommand:()=>p0,ConstraintsSourceCommand:()=>h0,default:()=>rdt});Ye();Ye();v2();var IC=class{constructor(e){this.project=e}createEnvironment(){let e=new wC(["cwd","ident"]),r=new wC(["workspace","type","ident"]),o=new wC(["ident"]),a={manifestUpdates:new Map,reportedErrors:new Map},n=new Map,u=new Map;for(let A of this.project.storedPackages.values()){let p=Array.from(A.peerDependencies.values(),h=>[W.stringifyIdent(h),h.range]);n.set(A.locatorHash,{workspace:null,ident:W.stringifyIdent(A),version:A.version,dependencies:new Map,peerDependencies:new Map(p.filter(([h])=>A.peerDependenciesMeta.get(h)?.optional!==!0)),optionalPeerDependencies:new Map(p.filter(([h])=>A.peerDependenciesMeta.get(h)?.optional===!0))})}for(let A of this.project.storedPackages.values()){let p=n.get(A.locatorHash);p.dependencies=new Map(Array.from(A.dependencies.values(),h=>{let E=this.project.storedResolutions.get(h.descriptorHash);if(typeof E>"u")throw new Error("Assertion failed: The resolution should have been registered");let I=n.get(E);if(typeof I>"u")throw new Error("Assertion failed: The package should have been registered");return[W.stringifyIdent(h),I]})),p.dependencies.delete(p.ident)}for(let A of this.project.workspaces){let p=W.stringifyIdent(A.anchoredLocator),h=A.manifest.exportTo({}),E=n.get(A.anchoredLocator.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");let I=(R,N,{caller:U=Vi.getCaller()}={})=>{let V=B2(R),te=_e.getMapWithDefault(a.manifestUpdates,A.cwd),ae=_e.getMapWithDefault(te,V),fe=_e.getSetWithDefault(ae,N);U!==null&&fe.add(U)},v=R=>I(R,void 0,{caller:Vi.getCaller()}),x=R=>{_e.getArrayWithDefault(a.reportedErrors,A.cwd).push(R)},C=e.insert({cwd:A.relativeCwd,ident:p,manifest:h,pkg:E,set:I,unset:v,error:x});u.set(A,C);for(let R of Ot.allDependencies)for(let N of A.manifest[R].values()){let U=W.stringifyIdent(N),V=()=>{I([R,U],void 0,{caller:Vi.getCaller()})},te=fe=>{I([R,U],fe,{caller:Vi.getCaller()})},ae=null;if(R!=="peerDependencies"&&(R!=="dependencies"||!A.manifest.devDependencies.has(N.identHash))){let fe=A.anchoredPackage.dependencies.get(N.identHash);if(fe){if(typeof fe>"u")throw new Error("Assertion failed: The dependency should have been registered");let ue=this.project.storedResolutions.get(fe.descriptorHash);if(typeof ue>"u")throw new Error("Assertion failed: The resolution should have been registered");let me=n.get(ue);if(typeof me>"u")throw new Error("Assertion failed: The package should have been registered");ae=me}}r.insert({workspace:C,ident:U,range:N.range,type:R,resolution:ae,update:te,delete:V,error:x})}}for(let A of this.project.storedPackages.values()){let p=this.project.tryWorkspaceByLocator(A);if(!p)continue;let h=u.get(p);if(typeof h>"u")throw new Error("Assertion failed: The workspace should have been registered");let E=n.get(A.locatorHash);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");E.workspace=h}return{workspaces:e,dependencies:r,packages:o,result:a}}async process(){let e=this.createEnvironment(),r={Yarn:{workspace:a=>e.workspaces.find(a)[0]??null,workspaces:a=>e.workspaces.find(a),dependency:a=>e.dependencies.find(a)[0]??null,dependencies:a=>e.dependencies.find(a),package:a=>e.packages.find(a)[0]??null,packages:a=>e.packages.find(a)}},o=await this.project.loadUserConfig();return o?.constraints?(await o.constraints(r),e.result):null}};Ye();Ye();qt();var p0=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.query=ge.String()}async execute(){let{Constraints:r}=await Promise.resolve().then(()=>(x2(),b2)),o=await Ke.find(this.context.cwd,this.context.plugins),{project:a}=await St.find(o,this.context.cwd),n=await r.find(a),u=this.query;return u.endsWith(".")||(u=`${u}.`),(await Lt.start({configuration:o,json:this.json,stdout:this.context.stdout},async p=>{for await(let h of n.query(u)){let E=Array.from(Object.entries(h)),I=E.length,v=E.reduce((x,[C])=>Math.max(x,C.length),0);for(let x=0;x(x2(),b2)),o=await Ke.find(this.context.cwd,this.context.plugins),{project:a}=await St.find(o,this.context.cwd),n=await r.find(a);this.context.stdout.write(this.verbose?n.fullSource:n.source)}};h0.paths=[["constraints","source"]],h0.usage=nt.Usage({category:"Constraints-related commands",description:"print the source code for the constraints",details:"\n This command will print the Prolog source code used by the constraints engine. Adding the `-v,--verbose` flag will print the *full* source code, including the fact database automatically compiled from the workspace manifests.\n ",examples:[["Prints the source code","yarn constraints source"],["Print the source code and the fact database","yarn constraints source -v"]]});Ye();Ye();qt();v2();var g0=class extends ut{constructor(){super(...arguments);this.fix=ge.Boolean("--fix",!1,{description:"Attempt to automatically fix unambiguous issues, following a multi-pass process"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd);await o.restoreInstallState();let a=await o.loadUserConfig(),n;if(a?.constraints)n=new IC(o);else{let{Constraints:h}=await Promise.resolve().then(()=>(x2(),b2));n=await h.find(o)}let u,A=!1,p=!1;for(let h=this.fix?10:1;h>0;--h){let E=await n.process();if(!E)break;let{changedWorkspaces:I,remainingErrors:v}=gk(o,E,{fix:this.fix}),x=[];for(let[C,R]of I){let N=C.manifest.indent;C.manifest=new Ot,C.manifest.indent=N,C.manifest.load(R),x.push(C.persistManifest())}if(await Promise.all(x),!(I.size>0&&h>1)){u=qde(v,{configuration:r}),A=!1,p=!0;for(let[,C]of v)for(let R of C)R.fixable?A=!0:p=!1}}if(u.children.length===0)return 0;if(A){let h=p?`Those errors can all be fixed by running ${de.pretty(r,"yarn constraints --fix",de.Type.CODE)}`:`Errors prefixed by '\u2699' can be fixed by running ${de.pretty(r,"yarn constraints --fix",de.Type.CODE)}`;await Lt.start({configuration:r,stdout:this.context.stdout,includeNames:!1,includeFooter:!1},async E=>{E.reportInfo(0,h),E.reportSeparator()})}return u.children=_e.sortMap(u.children,h=>h.value[1]),$s.emitTree(u,{configuration:r,stdout:this.context.stdout,json:this.json,separators:1}),1}};g0.paths=[["constraints"]],g0.usage=nt.Usage({category:"Constraints-related commands",description:"check that the project constraints are met",details:` This command will run constraints on your project and emit errors for each one that is found but isn't met. If any error is emitted the process will exit with a non-zero exit code. If the \`--fix\` flag is used, Yarn will attempt to automatically fix the issues the best it can, following a multi-pass process (with a maximum of 10 iterations). Some ambiguous patterns cannot be autofixed, in which case you'll have to manually specify the right resolution. For more information as to how to write constraints, please consult our dedicated page on our website: https://yarnpkg.com/features/constraints. `,examples:[["Check that all constraints are satisfied","yarn constraints"],["Autofix all unmet constraints","yarn constraints --fix"]]});v2();var tdt={configuration:{enableConstraintsChecks:{description:"If true, constraints will run during installs",type:"BOOLEAN",default:!1},constraintsPath:{description:"The path of the constraints file.",type:"ABSOLUTE_PATH",default:"./constraints.pro"}},commands:[p0,h0,g0],hooks:{async validateProjectAfterInstall(t,{reportError:e}){if(!t.configuration.get("enableConstraintsChecks"))return;let r=await t.loadUserConfig(),o;if(r?.constraints)o=new IC(t);else{let{Constraints:u}=await Promise.resolve().then(()=>(x2(),b2));o=await u.find(t)}let a=await o.process();if(!a)return;let{remainingErrors:n}=gk(t,a);if(n.size!==0)if(t.configuration.isCI)for(let[u,A]of n)for(let p of A)e(84,`${de.pretty(t.configuration,u.anchoredLocator,de.Type.IDENT)}: ${p.text}`);else e(84,`Constraint check failed; run ${de.pretty(t.configuration,"yarn constraints",de.Type.CODE)} for more details`)}}},rdt=tdt;var IH={};zt(IH,{CreateCommand:()=>rm,DlxCommand:()=>d0,default:()=>idt});Ye();qt();var rm=class extends ut{constructor(){super(...arguments);this.pkg=ge.String("-p,--package",{description:"The package to run the provided command from"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}async execute(){let r=[];this.pkg&&r.push("--package",this.pkg),this.quiet&&r.push("--quiet");let o=this.command.replace(/^(@[^@/]+)(@|$)/,"$1/create$2"),a=W.parseDescriptor(o),n=a.name.match(/^create(-|$)/)?a:a.scope?W.makeIdent(a.scope,`create-${a.name}`):W.makeIdent(null,`create-${a.name}`),u=W.stringifyIdent(n);return a.range!=="unknown"&&(u+=`@${a.range}`),this.cli.run(["dlx",...r,u,...this.args])}};rm.paths=[["create"]];Ye();Ye();Pt();qt();var d0=class extends ut{constructor(){super(...arguments);this.packages=ge.Array("-p,--package",{description:"The package(s) to install before running the command"});this.quiet=ge.Boolean("-q,--quiet",!1,{description:"Only report critical errors instead of printing the full install logs"});this.command=ge.String();this.args=ge.Proxy()}async execute(){return Ke.telemetry=null,await oe.mktempPromise(async r=>{let o=z.join(r,`dlx-${process.pid}`);await oe.mkdirPromise(o),await oe.writeFilePromise(z.join(o,"package.json"),`{} `),await oe.writeFilePromise(z.join(o,"yarn.lock"),"");let a=z.join(o,".yarnrc.yml"),n=await Ke.findProjectCwd(this.context.cwd),A={enableGlobalCache:!(await Ke.find(this.context.cwd,null,{strict:!1})).get("enableGlobalCache"),enableTelemetry:!1,logFilters:[{code:Ku(68),level:de.LogLevel.Discard}]},p=n!==null?z.join(n,".yarnrc.yml"):null;p!==null&&oe.existsSync(p)?(await oe.copyFilePromise(p,a),await Ke.updateConfiguration(o,N=>{let U=_e.toMerged(N,A);return Array.isArray(N.plugins)&&(U.plugins=N.plugins.map(V=>{let te=typeof V=="string"?V:V.path,ae=le.isAbsolute(te)?te:le.resolve(le.fromPortablePath(n),te);return typeof V=="string"?ae:{path:ae,spec:V.spec}})),U})):await oe.writeJsonPromise(a,A);let h=this.packages??[this.command],E=W.parseDescriptor(this.command).name,I=await this.cli.run(["add","--fixed","--",...h],{cwd:o,quiet:this.quiet});if(I!==0)return I;this.quiet||this.context.stdout.write(` `);let v=await Ke.find(o,this.context.plugins),{project:x,workspace:C}=await St.find(v,o);if(C===null)throw new nr(x.cwd,o);await x.restoreInstallState();let R=await un.getWorkspaceAccessibleBinaries(C);return R.has(E)===!1&&R.size===1&&typeof this.packages>"u"&&(E=Array.from(R)[0][0]),await un.executeWorkspaceAccessibleBinary(C,E,this.args,{packageAccessibleBinaries:R,cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr})})}};d0.paths=[["dlx"]],d0.usage=nt.Usage({description:"run a package in a temporary environment",details:"\n This command will install a package within a temporary environment, and run its binary script if it contains any. The binary will run within the current cwd.\n\n By default Yarn will download the package named `command`, but this can be changed through the use of the `-p,--package` flag which will instruct Yarn to still run the same command but from a different package.\n\n Using `yarn dlx` as a replacement of `yarn add` isn't recommended, as it makes your project non-deterministic (Yarn doesn't keep track of the packages installed through `dlx` - neither their name, nor their version).\n ",examples:[["Use create-react-app to create a new React app","yarn dlx create-react-app ./my-app"],["Install multiple packages for a single command",`yarn dlx -p typescript -p ts-node ts-node --transpile-only -e "console.log('hello!')"`]]});var ndt={commands:[rm,d0]},idt=ndt;var DH={};zt(DH,{ExecFetcher:()=>Q2,ExecResolver:()=>F2,default:()=>adt,execUtils:()=>Ek});Ye();Ye();Pt();var pA="exec:";var Ek={};zt(Ek,{loadGeneratorFile:()=>k2,makeLocator:()=>vH,makeSpec:()=>hme,parseSpec:()=>BH});Ye();Pt();function BH(t){let{params:e,selector:r}=W.parseRange(t),o=le.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?W.parseLocator(e.locator):null,path:o}}function hme({parentLocator:t,path:e,generatorHash:r,protocol:o}){let a=t!==null?{locator:W.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return W.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function vH(t,{parentLocator:e,path:r,generatorHash:o,protocol:a}){return W.makeLocator(t,hme({parentLocator:e,path:r,generatorHash:o,protocol:a}))}async function k2(t,e,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(t,{protocol:e}),n=z.isAbsolute(a)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,n.localPath)}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=z.join(u.prefixPath,a);return await A.readFilePromise(p,"utf8")}var Q2=class{supports(e,r){return!!e.reference.startsWith(pA)}getLocalPath(e,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(e.reference,{protocol:pA});if(z.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:z.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:W.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){let o=await k2(e.reference,pA,r);return oe.mktempPromise(async a=>{let n=z.join(a,"generator.js");return await oe.writeFilePromise(n,o),oe.mktempPromise(async u=>{if(await this.generatePackage(u,e,n,r),!oe.existsSync(z.join(u,"build")))throw new Error("The script should have generated a build directory");return await Xi.makeArchiveFromDirectory(z.join(u,"build"),{prefixPath:W.getIdentVendorPath(e),compressionLevel:r.project.configuration.get("compressionLevel")})})})}async generatePackage(e,r,o,a){return await oe.mktempPromise(async n=>{let u=await un.makeScriptEnv({project:a.project,binFolder:n}),A=z.join(e,"runtime.js");return await oe.mktempPromise(async p=>{let h=z.join(p,"buildfile.log"),E=z.join(e,"generator"),I=z.join(e,"build");await oe.mkdirPromise(E),await oe.mkdirPromise(I);let v={tempDir:le.fromPortablePath(E),buildDir:le.fromPortablePath(I),locator:W.stringifyLocator(r)};await oe.writeFilePromise(A,` // Expose 'Module' as a global variable Object.defineProperty(global, 'Module', { get: () => require('module'), configurable: true, enumerable: false, }); // Expose non-hidden built-in modules as global variables for (const name of Module.builtinModules.filter((name) => name !== 'module' && !name.startsWith('_'))) { Object.defineProperty(global, name, { get: () => require(name), configurable: true, enumerable: false, }); } // Expose the 'execEnv' global variable Object.defineProperty(global, 'execEnv', { value: { ...${JSON.stringify(v)}, }, enumerable: true, }); `);let x=u.NODE_OPTIONS||"",C=/\s*--require\s+\S*\.pnp\.c?js\s*/g;x=x.replace(C," ").trim(),u.NODE_OPTIONS=x;let{stdout:R,stderr:N}=a.project.configuration.getSubprocessStreams(h,{header:`# This file contains the result of Yarn generating a package (${W.stringifyLocator(r)}) `,prefix:W.prettyLocator(a.project.configuration,r),report:a.report}),{code:U}=await Ur.pipevp(process.execPath,["--require",le.fromPortablePath(A),le.fromPortablePath(o),W.stringifyIdent(r)],{cwd:e,env:u,stdin:null,stdout:R,stderr:N});if(U!==0)throw oe.detachTemp(p),new Error(`Package generation failed (exit code ${U}, logs can be found here: ${de.pretty(a.project.configuration,h,de.Type.PATH)})`)})})}};Ye();Ye();var sdt=2,F2=class{supportsDescriptor(e,r){return!!e.range.startsWith(pA)}supportsLocator(e,r){return!!e.reference.startsWith(pA)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=BH(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await k2(W.makeRange({protocol:pA,source:a,selector:a,params:{locator:W.stringifyLocator(n)}}),pA,o.fetchOptions),A=wn.makeHash(`${sdt}`,u).slice(0,6);return[vH(e,{parentLocator:n,path:a,generatorHash:A,protocol:pA})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var odt={fetchers:[Q2],resolvers:[F2]},adt=odt;var SH={};zt(SH,{FileFetcher:()=>N2,FileResolver:()=>O2,TarballFileFetcher:()=>M2,TarballFileResolver:()=>U2,default:()=>udt,fileUtils:()=>nm});Ye();Pt();var PC=/^(?:[a-zA-Z]:[\\/]|\.{0,2}\/)/,R2=/^[^?]*\.(?:tar\.gz|tgz)(?:::.*)?$/,Ui="file:";var nm={};zt(nm,{fetchArchiveFromLocator:()=>L2,makeArchiveFromLocator:()=>Ck,makeBufferFromLocator:()=>PH,makeLocator:()=>SC,makeSpec:()=>gme,parseSpec:()=>T2});Ye();Pt();function T2(t){let{params:e,selector:r}=W.parseRange(t),o=le.toPortablePath(r);return{parentLocator:e&&typeof e.locator=="string"?W.parseLocator(e.locator):null,path:o}}function gme({parentLocator:t,path:e,hash:r,protocol:o}){let a=t!==null?{locator:W.stringifyLocator(t)}:{},n=typeof r<"u"?{hash:r}:{};return W.makeRange({protocol:o,source:e,selector:e,params:{...n,...a}})}function SC(t,{parentLocator:e,path:r,hash:o,protocol:a}){return W.makeLocator(t,gme({parentLocator:e,path:r,hash:o,protocol:a}))}async function L2(t,e){let{parentLocator:r,path:o}=W.parseFileStyleRange(t.reference,{protocol:Ui}),a=z.isAbsolute(o)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await e.fetcher.fetch(r,e),n=a.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,a.localPath)}:a;a!==n&&a.releaseFs&&a.releaseFs();let u=n.packageFs,A=z.join(n.prefixPath,o);return await _e.releaseAfterUseAsync(async()=>await u.readFilePromise(A),n.releaseFs)}async function Ck(t,{protocol:e,fetchOptions:r,inMemory:o=!1}){let{parentLocator:a,path:n}=W.parseFileStyleRange(t.reference,{protocol:e}),u=z.isAbsolute(n)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(a,r),A=u.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,u.localPath)}:u;u!==A&&u.releaseFs&&u.releaseFs();let p=A.packageFs,h=z.join(A.prefixPath,n);return await _e.releaseAfterUseAsync(async()=>await Xi.makeArchiveFromDirectory(h,{baseFs:p,prefixPath:W.getIdentVendorPath(t),compressionLevel:r.project.configuration.get("compressionLevel"),inMemory:o}),A.releaseFs)}async function PH(t,{protocol:e,fetchOptions:r}){return(await Ck(t,{protocol:e,fetchOptions:r,inMemory:!0})).getBufferAndClose()}var N2=class{supports(e,r){return!!e.reference.startsWith(Ui)}getLocalPath(e,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(e.reference,{protocol:Ui});if(z.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:z.resolve(n,a)}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:W.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async fetchFromDisk(e,r){return Ck(e,{protocol:Ui,fetchOptions:r})}};Ye();Ye();var ldt=2,O2=class{supportsDescriptor(e,r){return e.range.match(PC)?!0:!!e.range.startsWith(Ui)}supportsLocator(e,r){return!!e.reference.startsWith(Ui)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return PC.test(e.range)&&(e=W.makeDescriptor(e,`${Ui}${e.range}`)),W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=T2(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=await PH(W.makeLocator(e,W.makeRange({protocol:Ui,source:a,selector:a,params:{locator:W.stringifyLocator(n)}})),{protocol:Ui,fetchOptions:o.fetchOptions}),A=wn.makeHash(`${ldt}`,u).slice(0,6);return[SC(e,{parentLocator:n,path:a,hash:A,protocol:Ui})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};Ye();var M2=class{supports(e,r){return R2.test(e.reference)?!!e.reference.startsWith(Ui):!1}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.fetchFromDisk(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:W.getIdentVendorPath(e),checksum:u}}async fetchFromDisk(e,r){let o=await L2(e,r);return await Xi.convertToZip(o,{configuration:r.project.configuration,prefixPath:W.getIdentVendorPath(e),stripComponents:1})}};Ye();Ye();Ye();var U2=class{supportsDescriptor(e,r){return R2.test(e.range)?!!(e.range.startsWith(Ui)||PC.test(e.range)):!1}supportsLocator(e,r){return R2.test(e.reference)?!!e.reference.startsWith(Ui):!1}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return PC.test(e.range)&&(e=W.makeDescriptor(e,`${Ui}${e.range}`)),W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{path:a,parentLocator:n}=T2(e.range);if(n===null)throw new Error("Assertion failed: The descriptor should have been bound");let u=SC(e,{parentLocator:n,path:a,hash:"",protocol:Ui}),A=await L2(u,o.fetchOptions),p=wn.makeHash(A).slice(0,6);return[SC(e,{parentLocator:n,path:a,hash:p,protocol:Ui})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var cdt={fetchers:[M2,N2],resolvers:[U2,O2]},udt=cdt;var kH={};zt(kH,{GithubFetcher:()=>_2,default:()=>fdt,githubUtils:()=>wk});Ye();Pt();var wk={};zt(wk,{invalidGithubUrlMessage:()=>yme,isGithubUrl:()=>bH,parseGithubUrl:()=>xH});var dme=$e(ve("querystring")),mme=[/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+)\/tarball\/([^/#]+)(?:#(.*))?$/,/^https?:\/\/(?:([^/]+?)@)?github.com\/([^/#]+)\/([^/#]+?)(?:\.git)?(?:#(.*))?$/];function bH(t){return t?mme.some(e=>!!t.match(e)):!1}function xH(t){let e;for(let A of mme)if(e=t.match(A),e)break;if(!e)throw new Error(yme(t));let[,r,o,a,n="master"]=e,{commit:u}=dme.default.parse(n);return n=u||n.replace(/[^:]*:/,""),{auth:r,username:o,reponame:a,treeish:n}}function yme(t){return`Input cannot be parsed as a valid GitHub URL ('${t}').`}var _2=class{supports(e,r){return!!bH(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from GitHub`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:W.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o=await nn.get(this.getLocatorUrl(e,r),{configuration:r.project.configuration});return await oe.mktempPromise(async a=>{let n=new gn(a);await Xi.extractArchiveTo(o,n,{stripComponents:1});let u=ra.splitRepoUrl(e.reference),A=z.join(a,"package.tgz");await un.prepareExternalProject(a,A,{configuration:r.project.configuration,report:r.report,workspace:u.extra.workspace,locator:e});let p=await oe.readFilePromise(A);return await Xi.convertToZip(p,{configuration:r.project.configuration,prefixPath:W.getIdentVendorPath(e),stripComponents:1})})}getLocatorUrl(e,r){let{auth:o,username:a,reponame:n,treeish:u}=xH(e.reference);return`https://${o?`${o}@`:""}github.com/${a}/${n}/archive/${u}.tar.gz`}};var Adt={hooks:{async fetchHostedRepository(t,e,r){if(t!==null)return t;let o=new _2;if(!o.supports(e,r))return null;try{return await o.fetch(e,r)}catch{return null}}}},fdt=Adt;var QH={};zt(QH,{TarballHttpFetcher:()=>q2,TarballHttpResolver:()=>G2,default:()=>hdt});Ye();function H2(t){let e;try{e=new URL(t)}catch{return!1}return!(e.protocol!=="http:"&&e.protocol!=="https:"||!e.pathname.match(/(\.tar\.gz|\.tgz|\/[^.]+)$/))}var q2=class{supports(e,r){return H2(e.reference)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:W.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o=await nn.get(e.reference,{configuration:r.project.configuration});return await Xi.convertToZip(o,{configuration:r.project.configuration,prefixPath:W.getIdentVendorPath(e),stripComponents:1})}};Ye();Ye();var G2=class{supportsDescriptor(e,r){return H2(e.range)}supportsLocator(e,r){return H2(e.reference)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){return[W.convertDescriptorToLocator(e)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"HARD",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var pdt={fetchers:[q2],resolvers:[G2]},hdt=pdt;var FH={};zt(FH,{InitCommand:()=>m0,default:()=>ddt});Ye();Ye();Pt();qt();var m0=class extends ut{constructor(){super(...arguments);this.private=ge.Boolean("-p,--private",!1,{description:"Initialize a private package"});this.workspace=ge.Boolean("-w,--workspace",!1,{description:"Initialize a workspace root with a `packages/` directory"});this.install=ge.String("-i,--install",!1,{tolerateBoolean:!0,description:"Initialize a package with a specific bundle that will be locked in the project"});this.name=ge.String("-n,--name",{description:"Initialize a package with the given name"});this.usev2=ge.Boolean("-2",!1,{hidden:!0});this.yes=ge.Boolean("-y,--yes",{hidden:!0})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=typeof this.install=="string"?this.install:this.usev2||this.install===!0?"latest":null;return o!==null?await this.executeProxy(r,o):await this.executeRegular(r)}async executeProxy(r,o){if(r.projectCwd!==null&&r.projectCwd!==this.context.cwd)throw new it("Cannot use the --install flag from within a project subdirectory");oe.existsSync(this.context.cwd)||await oe.mkdirPromise(this.context.cwd,{recursive:!0});let a=z.join(this.context.cwd,dr.lockfile);oe.existsSync(a)||await oe.writeFilePromise(a,"");let n=await this.cli.run(["set","version",o],{quiet:!0});if(n!==0)return n;let u=[];return this.private&&u.push("-p"),this.workspace&&u.push("-w"),this.name&&u.push(`-n=${this.name}`),this.yes&&u.push("-y"),await oe.mktempPromise(async A=>{let{code:p}=await Ur.pipevp("yarn",["init",...u],{cwd:this.context.cwd,stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr,env:await un.makeScriptEnv({binFolder:A})});return p})}async executeRegular(r){let o=null;try{o=(await St.find(r,this.context.cwd)).project}catch{o=null}oe.existsSync(this.context.cwd)||await oe.mkdirPromise(this.context.cwd,{recursive:!0});let a=await Ot.tryFind(this.context.cwd),n=a??new Ot,u=Object.fromEntries(r.get("initFields").entries());n.load(u),n.name=n.name??W.makeIdent(r.get("initScope"),this.name??z.basename(this.context.cwd)),n.packageManager=rn&&_e.isTaggedYarnVersion(rn)?`yarn@${rn}`:null,(!a&&this.workspace||this.private)&&(n.private=!0),this.workspace&&n.workspaceDefinitions.length===0&&(await oe.mkdirPromise(z.join(this.context.cwd,"packages"),{recursive:!0}),n.workspaceDefinitions=[{pattern:"packages/*"}]);let A={};n.exportTo(A);let p=z.join(this.context.cwd,Ot.fileName);await oe.changeFilePromise(p,`${JSON.stringify(A,null,2)} `,{automaticNewlines:!0});let h=[p],E=z.join(this.context.cwd,"README.md");if(oe.existsSync(E)||(await oe.writeFilePromise(E,`# ${W.stringifyIdent(n.name)} `),h.push(E)),!o||o.cwd===this.context.cwd){let I=z.join(this.context.cwd,dr.lockfile);oe.existsSync(I)||(await oe.writeFilePromise(I,""),h.push(I));let x=[".yarn/*","!.yarn/patches","!.yarn/plugins","!.yarn/releases","!.yarn/sdks","!.yarn/versions","","# Swap the comments on the following lines if you wish to use zero-installs","# In that case, don't forget to run `yarn config set enableGlobalCache false`!","# Documentation here: https://yarnpkg.com/features/caching#zero-installs","","#!.yarn/cache",".pnp.*"].map(fe=>`${fe} `).join(""),C=z.join(this.context.cwd,".gitignore");oe.existsSync(C)||(await oe.writeFilePromise(C,x),h.push(C));let N=["/.yarn/** linguist-vendored","/.yarn/releases/* binary","/.yarn/plugins/**/* binary","/.pnp.* binary linguist-generated"].map(fe=>`${fe} `).join(""),U=z.join(this.context.cwd,".gitattributes");oe.existsSync(U)||(await oe.writeFilePromise(U,N),h.push(U));let V={["*"]:{endOfLine:"lf",insertFinalNewline:!0},["*.{js,json,yml}"]:{charset:"utf-8",indentStyle:"space",indentSize:2}};_e.mergeIntoTarget(V,r.get("initEditorConfig"));let te=`root = true `;for(let[fe,ue]of Object.entries(V)){te+=` [${fe}] `;for(let[me,he]of Object.entries(ue)){let Be=me.replace(/[A-Z]/g,we=>`_${we.toLowerCase()}`);te+=`${Be} = ${he} `}}let ae=z.join(this.context.cwd,".editorconfig");oe.existsSync(ae)||(await oe.writeFilePromise(ae,te),h.push(ae)),await this.cli.run(["install"],{quiet:!0}),oe.existsSync(z.join(this.context.cwd,".git"))||(await Ur.execvp("git",["init"],{cwd:this.context.cwd}),await Ur.execvp("git",["add","--",...h],{cwd:this.context.cwd}),await Ur.execvp("git",["commit","--allow-empty","-m","First commit"],{cwd:this.context.cwd}))}}};m0.paths=[["init"]],m0.usage=nt.Usage({description:"create a new package",details:"\n This command will setup a new package in your local directory.\n\n If the `-p,--private` or `-w,--workspace` options are set, the package will be private by default.\n\n If the `-w,--workspace` option is set, the package will be configured to accept a set of workspaces in the `packages/` directory.\n\n If the `-i,--install` option is given a value, Yarn will first download it using `yarn set version` and only then forward the init call to the newly downloaded bundle. Without arguments, the downloaded bundle will be `latest`.\n\n The initial settings of the manifest can be changed by using the `initScope` and `initFields` configuration values. Additionally, Yarn will generate an EditorConfig file whose rules can be altered via `initEditorConfig`, and will initialize a Git repository in the current directory.\n ",examples:[["Create a new package in the local directory","yarn init"],["Create a new private package in the local directory","yarn init -p"],["Create a new package and store the Yarn release inside","yarn init -i=latest"],["Create a new private package and defines it as a workspace root","yarn init -w"]]});var gdt={configuration:{initScope:{description:"Scope used when creating packages via the init command",type:"STRING",default:null},initFields:{description:"Additional fields to set when creating packages via the init command",type:"MAP",valueDefinition:{description:"",type:"ANY"}},initEditorConfig:{description:"Extra rules to define in the generator editorconfig",type:"MAP",valueDefinition:{description:"",type:"ANY"}}},commands:[m0]},ddt=gdt;var Tq={};zt(Tq,{SearchCommand:()=>I0,UpgradeInteractiveCommand:()=>v0,default:()=>iIt});Ye();var Cme=$e(ve("os"));function bC({stdout:t}){if(Cme.default.endianness()==="BE")throw new Error("Interactive commands cannot be used on big-endian systems because ink depends on yoga-layout-prebuilt which only supports little-endian architectures");if(!t.isTTY)throw new Error("Interactive commands can only be used inside a TTY environment")}qt();var Fye=$e(JH()),XH={appId:"OFCNCOG2CU",apiKey:"6fe4476ee5a1832882e326b506d14126",indexName:"npm-search"},pyt=(0,Fye.default)(XH.appId,XH.apiKey).initIndex(XH.indexName),ZH=async(t,e=0)=>await pyt.search(t,{analyticsTags:["yarn-plugin-interactive-tools"],attributesToRetrieve:["name","version","owner","repository","humanDownloadsLast30Days"],page:e,hitsPerPage:10});var qB=["regular","dev","peer"],I0=class extends ut{async execute(){bC(this.context);let{Gem:e}=await Promise.resolve().then(()=>(cQ(),Bq)),{ScrollableItems:r}=await Promise.resolve().then(()=>(pQ(),fQ)),{useKeypress:o}=await Promise.resolve().then(()=>(UB(),Kwe)),{useMinistore:a}=await Promise.resolve().then(()=>(xq(),bq)),{renderForm:n}=await Promise.resolve().then(()=>(mQ(),dQ)),{default:u}=await Promise.resolve().then(()=>$e(nIe())),{Box:A,Text:p}=await Promise.resolve().then(()=>$e(sc())),{default:h,useEffect:E,useState:I}=await Promise.resolve().then(()=>$e(on())),v=await Ke.find(this.context.cwd,this.context.plugins),x=()=>h.createElement(A,{flexDirection:"row"},h.createElement(A,{flexDirection:"column",width:48},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},""),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to move between packages.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to select a package.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," again to change the target."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to install the selected packages.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to abort.")))),C=()=>h.createElement(h.Fragment,null,h.createElement(A,{width:15},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Owner")),h.createElement(A,{width:11},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Version")),h.createElement(A,{width:10},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Downloads"))),R=()=>h.createElement(A,{width:17},h.createElement(p,{bold:!0,underline:!0,color:"gray"},"Target")),N=({hit:he,active:Be})=>{let[we,g]=a(he.name,null);o({active:Be},(ce,ne)=>{if(ne.name!=="space")return;if(!we){g(qB[0]);return}let ee=qB.indexOf(we)+1;ee===qB.length?g(null):g(qB[ee])},[we,g]);let Ee=W.parseIdent(he.name),Pe=W.prettyIdent(v,Ee);return h.createElement(A,null,h.createElement(A,{width:45},h.createElement(p,{bold:!0,wrap:"wrap"},Pe)),h.createElement(A,{width:14,marginLeft:1},h.createElement(p,{bold:!0,wrap:"truncate"},he.owner.name)),h.createElement(A,{width:10,marginLeft:1},h.createElement(p,{italic:!0,wrap:"truncate"},he.version)),h.createElement(A,{width:16,marginLeft:1},h.createElement(p,null,he.humanDownloadsLast30Days)))},U=({name:he,active:Be})=>{let[we]=a(he,null),g=W.parseIdent(he);return h.createElement(A,null,h.createElement(A,{width:47},h.createElement(p,{bold:!0}," - ",W.prettyIdent(v,g))),qB.map(Ee=>h.createElement(A,{key:Ee,width:14,marginLeft:1},h.createElement(p,null," ",h.createElement(e,{active:we===Ee})," ",h.createElement(p,{bold:!0},Ee)))))},V=()=>h.createElement(A,{marginTop:1},h.createElement(p,null,"Powered by Algolia.")),ae=await n(({useSubmit:he})=>{let Be=a();he(Be);let we=Array.from(Be.keys()).filter(H=>Be.get(H)!==null),[g,Ee]=I(""),[Pe,ce]=I(0),[ne,ee]=I([]),Ie=H=>{H.match(/\t| /)||Ee(H)},Fe=async()=>{ce(0);let H=await ZH(g);H.query===g&&ee(H.hits)},At=async()=>{let H=await ZH(g,Pe+1);H.query===g&&H.page-1===Pe&&(ce(H.page),ee([...ne,...H.hits]))};return E(()=>{g?Fe():ee([])},[g]),h.createElement(A,{flexDirection:"column"},h.createElement(x,null),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(p,{bold:!0},"Search: "),h.createElement(A,{width:41},h.createElement(u,{value:g,onChange:Ie,placeholder:"i.e. babel, webpack, react...",showCursor:!1})),h.createElement(C,null)),ne.length?h.createElement(r,{radius:2,loop:!1,children:ne.map(H=>h.createElement(N,{key:H.name,hit:H,active:!1})),willReachEnd:At}):h.createElement(p,{color:"gray"},"Start typing..."),h.createElement(A,{flexDirection:"row",marginTop:1},h.createElement(A,{width:49},h.createElement(p,{bold:!0},"Selected:")),h.createElement(R,null)),we.length?we.map(H=>h.createElement(U,{key:H,name:H,active:!1})):h.createElement(p,{color:"gray"},"No selected packages..."),h.createElement(V,null))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ae>"u")return 1;let fe=Array.from(ae.keys()).filter(he=>ae.get(he)==="regular"),ue=Array.from(ae.keys()).filter(he=>ae.get(he)==="dev"),me=Array.from(ae.keys()).filter(he=>ae.get(he)==="peer");return fe.length&&await this.cli.run(["add",...fe]),ue.length&&await this.cli.run(["add","--dev",...ue]),me&&await this.cli.run(["add","--peer",...me]),0}};I0.paths=[["search"]],I0.usage=nt.Usage({category:"Interactive commands",description:"open the search interface",details:` This command opens a fullscreen terminal interface where you can search for and install packages from the npm registry. `,examples:[["Open the search window","yarn search"]]});Ye();qt();E_();var uIe=$e(Jn()),cIe=/^((?:[\^~]|>=?)?)([0-9]+)(\.[0-9]+)(\.[0-9]+)((?:-\S+)?)$/,AIe=(t,e)=>t.length>0?[t.slice(0,e)].concat(AIe(t.slice(e),e)):[],v0=class extends ut{async execute(){bC(this.context);let{ItemOptions:e}=await Promise.resolve().then(()=>(lIe(),aIe)),{Pad:r}=await Promise.resolve().then(()=>(Rq(),oIe)),{ScrollableItems:o}=await Promise.resolve().then(()=>(pQ(),fQ)),{useMinistore:a}=await Promise.resolve().then(()=>(xq(),bq)),{renderForm:n}=await Promise.resolve().then(()=>(mQ(),dQ)),{Box:u,Text:A}=await Promise.resolve().then(()=>$e(sc())),{default:p,useEffect:h,useRef:E,useState:I}=await Promise.resolve().then(()=>$e(on())),v=await Ke.find(this.context.cwd,this.context.plugins),{project:x,workspace:C}=await St.find(v,this.context.cwd),R=await Nr.find(v);if(!C)throw new nr(x.cwd,this.context.cwd);await x.restoreInstallState({restoreResolutions:!1});let N=this.context.stdout.rows-7,U=(Ee,Pe)=>{let ce=Ape(Ee,Pe),ne="";for(let ee of ce)ee.added?ne+=de.pretty(v,ee.value,"green"):ee.removed||(ne+=ee.value);return ne},V=(Ee,Pe)=>{if(Ee===Pe)return Pe;let ce=W.parseRange(Ee),ne=W.parseRange(Pe),ee=ce.selector.match(cIe),Ie=ne.selector.match(cIe);if(!ee||!Ie)return U(Ee,Pe);let Fe=["gray","red","yellow","green","magenta"],At=null,H="";for(let at=1;at{let ne=await Xc.fetchDescriptorFrom(Ee,ce,{project:x,cache:R,preserveModifier:Pe,workspace:C});return ne!==null?ne.range:Ee.range},ae=async Ee=>{let Pe=uIe.default.valid(Ee.range)?`^${Ee.range}`:Ee.range,[ce,ne]=await Promise.all([te(Ee,Ee.range,Pe).catch(()=>null),te(Ee,Ee.range,"latest").catch(()=>null)]),ee=[{value:null,label:Ee.range}];return ce&&ce!==Ee.range?ee.push({value:ce,label:V(Ee.range,ce)}):ee.push({value:null,label:""}),ne&&ne!==ce&&ne!==Ee.range?ee.push({value:ne,label:V(Ee.range,ne)}):ee.push({value:null,label:""}),ee},fe=()=>p.createElement(u,{flexDirection:"row"},p.createElement(u,{flexDirection:"column",width:49},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},""),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"")," to select packages.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},""),"/",p.createElement(A,{bold:!0,color:"cyanBright"},"")," to select versions."))),p.createElement(u,{flexDirection:"column"},p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"")," to install.")),p.createElement(u,{marginLeft:1},p.createElement(A,null,"Press ",p.createElement(A,{bold:!0,color:"cyanBright"},"")," to abort.")))),ue=()=>p.createElement(u,{flexDirection:"row",paddingTop:1,paddingBottom:1},p.createElement(u,{width:50},p.createElement(A,{bold:!0},p.createElement(A,{color:"greenBright"},"?")," Pick the packages you want to upgrade.")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Current")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Range")),p.createElement(u,{width:17},p.createElement(A,{bold:!0,underline:!0,color:"gray"},"Latest"))),me=({active:Ee,descriptor:Pe,suggestions:ce})=>{let[ne,ee]=a(Pe.descriptorHash,null),Ie=W.stringifyIdent(Pe),Fe=Math.max(0,45-Ie.length);return p.createElement(p.Fragment,null,p.createElement(u,null,p.createElement(u,{width:45},p.createElement(A,{bold:!0},W.prettyIdent(v,Pe)),p.createElement(r,{active:Ee,length:Fe})),p.createElement(e,{active:Ee,options:ce,value:ne,skewer:!0,onChange:ee,sizes:[17,17,17]})))},he=({dependencies:Ee})=>{let[Pe,ce]=I(Ee.map(()=>null)),ne=E(!0),ee=async Ie=>{let Fe=await ae(Ie);return Fe.filter(At=>At.label!=="").length<=1?null:{descriptor:Ie,suggestions:Fe}};return h(()=>()=>{ne.current=!1},[]),h(()=>{let Ie=Math.trunc(N*1.75),Fe=Ee.slice(0,Ie),At=Ee.slice(Ie),H=AIe(At,N),at=Fe.map(ee).reduce(async(Re,ke)=>{await Re;let xe=await ke;xe!==null&&(!ne.current||ce(He=>{let Te=He.findIndex(qe=>qe===null),Ve=[...He];return Ve[Te]=xe,Ve}))},Promise.resolve());H.reduce((Re,ke)=>Promise.all(ke.map(xe=>Promise.resolve().then(()=>ee(xe)))).then(async xe=>{xe=xe.filter(He=>He!==null),await Re,ne.current&&ce(He=>{let Te=He.findIndex(Ve=>Ve===null);return He.slice(0,Te).concat(xe).concat(He.slice(Te+xe.length))})}),at).then(()=>{ne.current&&ce(Re=>Re.filter(ke=>ke!==null))})},[]),Pe.length?p.createElement(o,{radius:N>>1,children:Pe.map((Ie,Fe)=>Ie!==null?p.createElement(me,{key:Fe,active:!1,descriptor:Ie.descriptor,suggestions:Ie.suggestions}):p.createElement(A,{key:Fe},"Loading..."))}):p.createElement(A,null,"No upgrades found")},we=await n(({useSubmit:Ee})=>{Ee(a());let Pe=new Map;for(let ne of x.workspaces)for(let ee of["dependencies","devDependencies"])for(let Ie of ne.manifest[ee].values())x.tryWorkspaceByDescriptor(Ie)===null&&(Ie.range.startsWith("link:")||Pe.set(Ie.descriptorHash,Ie));let ce=_e.sortMap(Pe.values(),ne=>W.stringifyDescriptor(ne));return p.createElement(u,{flexDirection:"column"},p.createElement(fe,null),p.createElement(ue,null),p.createElement(he,{dependencies:ce}))},{},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof we>"u")return 1;let g=!1;for(let Ee of x.workspaces)for(let Pe of["dependencies","devDependencies"]){let ce=Ee.manifest[Pe];for(let ne of ce.values()){let ee=we.get(ne.descriptorHash);typeof ee<"u"&&ee!==null&&(ce.set(ne.identHash,W.makeDescriptor(ne,ee)),g=!0)}}return g?await x.installWithNewReport({quiet:this.context.quiet,stdout:this.context.stdout},{cache:R}):0}};v0.paths=[["upgrade-interactive"]],v0.usage=nt.Usage({category:"Interactive commands",description:"open the upgrade interface",details:` This command opens a fullscreen terminal interface where you can see any out of date packages used by your application, their status compared to the latest versions available on the remote registry, and select packages to upgrade. `,examples:[["Open the upgrade window","yarn upgrade-interactive"]]});var nIt={commands:[I0,v0]},iIt=nIt;var Lq={};zt(Lq,{LinkFetcher:()=>jB,LinkResolver:()=>YB,PortalFetcher:()=>WB,PortalResolver:()=>KB,default:()=>oIt});Ye();Pt();var tp="portal:",rp="link:";var jB=class{supports(e,r){return!!e.reference.startsWith(rp)}getLocalPath(e,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(e.reference,{protocol:rp});if(z.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:z.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(e.reference,{protocol:rp}),n=z.isAbsolute(a)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,n.localPath),localPath:Bt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=z.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new gn(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,discardFromLookup:!0,localPath:p}:{packageFs:new Hu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,discardFromLookup:!0}}};Ye();Pt();var YB=class{supportsDescriptor(e,r){return!!e.range.startsWith(rp)}supportsLocator(e,r){return!!e.reference.startsWith(rp)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(rp.length);return[W.makeLocator(e,`${rp}${le.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){return{...e,version:"0.0.0",languageName:r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:null,dependencies:new Map,peerDependencies:new Map,dependenciesMeta:new Map,peerDependenciesMeta:new Map,bin:new Map}}};Ye();Pt();var WB=class{supports(e,r){return!!e.reference.startsWith(tp)}getLocalPath(e,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(e.reference,{protocol:tp});if(z.isAbsolute(a))return a;let n=r.fetcher.getLocalPath(o,r);return n===null?null:z.resolve(n,a)}async fetch(e,r){let{parentLocator:o,path:a}=W.parseFileStyleRange(e.reference,{protocol:tp}),n=z.isAbsolute(a)?{packageFs:new gn(Bt.root),prefixPath:Bt.dot,localPath:Bt.root}:await r.fetcher.fetch(o,r),u=n.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,n.localPath),localPath:Bt.root}:n;n!==u&&n.releaseFs&&n.releaseFs();let A=u.packageFs,p=z.resolve(u.localPath??u.packageFs.getRealPath(),u.prefixPath,a);return n.localPath?{packageFs:new gn(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot,localPath:p}:{packageFs:new Hu(p,{baseFs:A}),releaseFs:u.releaseFs,prefixPath:Bt.dot}}};Ye();Ye();Pt();var KB=class{supportsDescriptor(e,r){return!!e.range.startsWith(tp)}supportsLocator(e,r){return!!e.reference.startsWith(tp)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){return W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(tp.length);return[W.makeLocator(e,`${tp}${le.toPortablePath(a)}`)]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){if(!r.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let o=await r.fetchOptions.fetcher.fetch(e,r.fetchOptions),a=await _e.releaseAfterUseAsync(async()=>await Ot.find(o.prefixPath,{baseFs:o.packageFs}),o.releaseFs);return{...e,version:a.version||"0.0.0",languageName:a.languageName||r.project.configuration.get("defaultLanguageName"),linkType:"SOFT",conditions:a.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(a.dependencies),peerDependencies:a.peerDependencies,dependenciesMeta:a.dependenciesMeta,peerDependenciesMeta:a.peerDependenciesMeta,bin:a.bin}}};var sIt={fetchers:[jB,WB],resolvers:[YB,KB]},oIt=sIt;var yG={};zt(yG,{NodeModulesLinker:()=>lv,NodeModulesMode:()=>hG,PnpLooseLinker:()=>cv,default:()=>I1t});Pt();Ye();Pt();Pt();var Oq=(t,e)=>`${t}@${e}`,fIe=(t,e)=>{let r=e.indexOf("#"),o=r>=0?e.substring(r+1):e;return Oq(t,o)};var gIe=(t,e={})=>{let r=e.debugLevel||Number(process.env.NM_DEBUG_LEVEL||-1),o=e.check||r>=9,a=e.hoistingLimits||new Map,n={check:o,debugLevel:r,hoistingLimits:a,fastLookupPossible:!0},u;n.debugLevel>=0&&(u=Date.now());let A=pIt(t,n),p=!1,h=0;do p=Mq(A,[A],new Set([A.locator]),new Map,n).anotherRoundNeeded,n.fastLookupPossible=!1,h++;while(p);if(n.debugLevel>=0&&console.log(`hoist time: ${Date.now()-u}ms, rounds: ${h}`),n.debugLevel>=1){let E=zB(A);if(Mq(A,[A],new Set([A.locator]),new Map,n).isGraphChanged)throw new Error(`The hoisting result is not terminal, prev tree: ${E}, next tree: ${zB(A)}`);let v=dIe(A);if(v)throw new Error(`${v}, after hoisting finished: ${zB(A)}`)}return n.debugLevel>=2&&console.log(zB(A)),hIt(A)},aIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=n=>{if(!o.has(n)){o.add(n);for(let u of n.hoistedDependencies.values())r.set(u.name,u);for(let u of n.dependencies.values())n.peerNames.has(u.name)||a(u)}};return a(e),r},lIt=t=>{let e=t[t.length-1],r=new Map,o=new Set,a=new Set,n=(u,A)=>{if(o.has(u))return;o.add(u);for(let h of u.hoistedDependencies.values())if(!A.has(h.name)){let E;for(let I of t)E=I.dependencies.get(h.name),E&&r.set(E.name,E)}let p=new Set;for(let h of u.dependencies.values())p.add(h.name);for(let h of u.dependencies.values())u.peerNames.has(h.name)||n(h,p)};return n(e,a),r},pIe=(t,e)=>{if(e.decoupled)return e;let{name:r,references:o,ident:a,locator:n,dependencies:u,originalDependencies:A,hoistedDependencies:p,peerNames:h,reasons:E,isHoistBorder:I,hoistPriority:v,dependencyKind:x,hoistedFrom:C,hoistedTo:R}=e,N={name:r,references:new Set(o),ident:a,locator:n,dependencies:new Map(u),originalDependencies:new Map(A),hoistedDependencies:new Map(p),peerNames:new Set(h),reasons:new Map(E),decoupled:!0,isHoistBorder:I,hoistPriority:v,dependencyKind:x,hoistedFrom:new Map(C),hoistedTo:new Map(R)},U=N.dependencies.get(r);return U&&U.ident==N.ident&&N.dependencies.set(r,N),t.dependencies.set(N.name,N),N},cIt=(t,e)=>{let r=new Map([[t.name,[t.ident]]]);for(let a of t.dependencies.values())t.peerNames.has(a.name)||r.set(a.name,[a.ident]);let o=Array.from(e.keys());o.sort((a,n)=>{let u=e.get(a),A=e.get(n);return A.hoistPriority!==u.hoistPriority?A.hoistPriority-u.hoistPriority:A.peerDependents.size!==u.peerDependents.size?A.peerDependents.size-u.peerDependents.size:A.dependents.size-u.dependents.size});for(let a of o){let n=a.substring(0,a.indexOf("@",1)),u=a.substring(n.length+1);if(!t.peerNames.has(n)){let A=r.get(n);A||(A=[],r.set(n,A)),A.indexOf(u)<0&&A.push(u)}}return r},Nq=t=>{let e=new Set,r=(o,a=new Set)=>{if(!a.has(o)){a.add(o);for(let n of o.peerNames)if(!t.peerNames.has(n)){let u=t.dependencies.get(n);u&&!e.has(u)&&r(u,a)}e.add(o)}};for(let o of t.dependencies.values())t.peerNames.has(o.name)||r(o);return e},Mq=(t,e,r,o,a,n=new Set)=>{let u=e[e.length-1];if(n.has(u))return{anotherRoundNeeded:!1,isGraphChanged:!1};n.add(u);let A=gIt(u),p=cIt(u,A),h=t==u?new Map:a.fastLookupPossible?aIt(e):lIt(e),E,I=!1,v=!1,x=new Map(Array.from(p.entries()).map(([R,N])=>[R,N[0]])),C=new Map;do{let R=fIt(t,e,r,h,x,p,o,C,a);R.isGraphChanged&&(v=!0),R.anotherRoundNeeded&&(I=!0),E=!1;for(let[N,U]of p)U.length>1&&!u.dependencies.has(N)&&(x.delete(N),U.shift(),x.set(N,U[0]),E=!0)}while(E);for(let R of u.dependencies.values())if(!u.peerNames.has(R.name)&&!r.has(R.locator)){r.add(R.locator);let N=Mq(t,[...e,R],r,C,a);N.isGraphChanged&&(v=!0),N.anotherRoundNeeded&&(I=!0),r.delete(R.locator)}return{anotherRoundNeeded:I,isGraphChanged:v}},uIt=t=>{for(let[e,r]of t.dependencies)if(!t.peerNames.has(e)&&r.ident!==t.ident)return!0;return!1},AIt=(t,e,r,o,a,n,u,A,{outputReason:p,fastLookupPossible:h})=>{let E,I=null,v=new Set;p&&(E=`${Array.from(e).map(N=>no(N)).join("\u2192")}`);let x=r[r.length-1],R=!(o.ident===x.ident);if(p&&!R&&(I="- self-reference"),R&&(R=o.dependencyKind!==1,p&&!R&&(I="- workspace")),R&&o.dependencyKind===2&&(R=!uIt(o),p&&!R&&(I="- external soft link with unhoisted dependencies")),R&&(R=x.dependencyKind!==1||x.hoistedFrom.has(o.name)||e.size===1,p&&!R&&(I=x.reasons.get(o.name))),R&&(R=!t.peerNames.has(o.name),p&&!R&&(I=`- cannot shadow peer: ${no(t.originalDependencies.get(o.name).locator)} at ${E}`)),R){let N=!1,U=a.get(o.name);if(N=!U||U.ident===o.ident,p&&!N&&(I=`- filled by: ${no(U.locator)} at ${E}`),N)for(let V=r.length-1;V>=1;V--){let ae=r[V].dependencies.get(o.name);if(ae&&ae.ident!==o.ident){N=!1;let fe=A.get(x);fe||(fe=new Set,A.set(x,fe)),fe.add(o.name),p&&(I=`- filled by ${no(ae.locator)} at ${r.slice(0,V).map(ue=>no(ue.locator)).join("\u2192")}`);break}}R=N}if(R&&(R=n.get(o.name)===o.ident,p&&!R&&(I=`- filled by: ${no(u.get(o.name)[0])} at ${E}`)),R){let N=!0,U=new Set(o.peerNames);for(let V=r.length-1;V>=1;V--){let te=r[V];for(let ae of U){if(te.peerNames.has(ae)&&te.originalDependencies.has(ae))continue;let fe=te.dependencies.get(ae);fe&&t.dependencies.get(ae)!==fe&&(V===r.length-1?v.add(fe):(v=null,N=!1,p&&(I=`- peer dependency ${no(fe.locator)} from parent ${no(te.locator)} was not hoisted to ${E}`))),U.delete(ae)}if(!N)break}R=N}if(R&&!h)for(let N of o.hoistedDependencies.values()){let U=a.get(N.name)||t.dependencies.get(N.name);if(!U||N.ident!==U.ident){R=!1,p&&(I=`- previously hoisted dependency mismatch, needed: ${no(N.locator)}, available: ${no(U?.locator)}`);break}}return v!==null&&v.size>0?{isHoistable:2,dependsOn:v,reason:I}:{isHoistable:R?0:1,reason:I}},yQ=t=>`${t.name}@${t.locator}`,fIt=(t,e,r,o,a,n,u,A,p)=>{let h=e[e.length-1],E=new Set,I=!1,v=!1,x=(U,V,te,ae,fe)=>{if(E.has(ae))return;let ue=[...V,yQ(ae)],me=[...te,yQ(ae)],he=new Map,Be=new Map;for(let ce of Nq(ae)){let ne=AIt(h,r,[h,...U,ae],ce,o,a,n,A,{outputReason:p.debugLevel>=2,fastLookupPossible:p.fastLookupPossible});if(Be.set(ce,ne),ne.isHoistable===2)for(let ee of ne.dependsOn){let Ie=he.get(ee.name)||new Set;Ie.add(ce.name),he.set(ee.name,Ie)}}let we=new Set,g=(ce,ne,ee)=>{if(!we.has(ce)){we.add(ce),Be.set(ce,{isHoistable:1,reason:ee});for(let Ie of he.get(ce.name)||[])g(ae.dependencies.get(Ie),ne,p.debugLevel>=2?`- peer dependency ${no(ce.locator)} from parent ${no(ae.locator)} was not hoisted`:"")}};for(let[ce,ne]of Be)ne.isHoistable===1&&g(ce,ne,ne.reason);let Ee=!1;for(let ce of Be.keys())if(!we.has(ce)){v=!0;let ne=u.get(ae);ne&&ne.has(ce.name)&&(I=!0),Ee=!0,ae.dependencies.delete(ce.name),ae.hoistedDependencies.set(ce.name,ce),ae.reasons.delete(ce.name);let ee=h.dependencies.get(ce.name);if(p.debugLevel>=2){let Ie=Array.from(V).concat([ae.locator]).map(At=>no(At)).join("\u2192"),Fe=h.hoistedFrom.get(ce.name);Fe||(Fe=[],h.hoistedFrom.set(ce.name,Fe)),Fe.push(Ie),ae.hoistedTo.set(ce.name,Array.from(e).map(At=>no(At.locator)).join("\u2192"))}if(!ee)h.ident!==ce.ident&&(h.dependencies.set(ce.name,ce),fe.add(ce));else for(let Ie of ce.references)ee.references.add(Ie)}if(ae.dependencyKind===2&&Ee&&(I=!0),p.check){let ce=dIe(t);if(ce)throw new Error(`${ce}, after hoisting dependencies of ${[h,...U,ae].map(ne=>no(ne.locator)).join("\u2192")}: ${zB(t)}`)}let Pe=Nq(ae);for(let ce of Pe)if(we.has(ce)){let ne=Be.get(ce);if((a.get(ce.name)===ce.ident||!ae.reasons.has(ce.name))&&ne.isHoistable!==0&&ae.reasons.set(ce.name,ne.reason),!ce.isHoistBorder&&me.indexOf(yQ(ce))<0){E.add(ae);let Ie=pIe(ae,ce);x([...U,ae],ue,me,Ie,R),E.delete(ae)}}},C,R=new Set(Nq(h)),N=Array.from(e).map(U=>yQ(U));do{C=R,R=new Set;for(let U of C){if(U.locator===h.locator||U.isHoistBorder)continue;let V=pIe(h,U);x([],Array.from(r),N,V,R)}}while(R.size>0);return{anotherRoundNeeded:I,isGraphChanged:v}},dIe=t=>{let e=[],r=new Set,o=new Set,a=(n,u,A)=>{if(r.has(n)||(r.add(n),o.has(n)))return;let p=new Map(u);for(let h of n.dependencies.values())n.peerNames.has(h.name)||p.set(h.name,h);for(let h of n.originalDependencies.values()){let E=p.get(h.name),I=()=>`${Array.from(o).concat([n]).map(v=>no(v.locator)).join("\u2192")}`;if(n.peerNames.has(h.name)){let v=u.get(h.name);(v!==E||!v||v.ident!==h.ident)&&e.push(`${I()} - broken peer promise: expected ${h.ident} but found ${v&&v.ident}`)}else{let v=A.hoistedFrom.get(n.name),x=n.hoistedTo.get(h.name),C=`${v?` hoisted from ${v.join(", ")}`:""}`,R=`${x?` hoisted to ${x}`:""}`,N=`${I()}${C}`;E?E.ident!==h.ident&&e.push(`${N} - broken require promise for ${h.name}${R}: expected ${h.ident}, but found: ${E.ident}`):e.push(`${N} - broken require promise: no required dependency ${h.name}${R} found`)}}o.add(n);for(let h of n.dependencies.values())n.peerNames.has(h.name)||a(h,p,n);o.delete(n)};return a(t,t.dependencies,t),e.join(` `)},pIt=(t,e)=>{let{identName:r,name:o,reference:a,peerNames:n}=t,u={name:o,references:new Set([a]),locator:Oq(r,a),ident:fIe(r,a),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(n),reasons:new Map,decoupled:!0,isHoistBorder:!0,hoistPriority:0,dependencyKind:1,hoistedFrom:new Map,hoistedTo:new Map},A=new Map([[t,u]]),p=(h,E)=>{let I=A.get(h),v=!!I;if(!I){let{name:x,identName:C,reference:R,peerNames:N,hoistPriority:U,dependencyKind:V}=h,te=e.hoistingLimits.get(E.locator);I={name:x,references:new Set([R]),locator:Oq(C,R),ident:fIe(C,R),dependencies:new Map,originalDependencies:new Map,hoistedDependencies:new Map,peerNames:new Set(N),reasons:new Map,decoupled:!0,isHoistBorder:te?te.has(x):!1,hoistPriority:U||0,dependencyKind:V||0,hoistedFrom:new Map,hoistedTo:new Map},A.set(h,I)}if(E.dependencies.set(h.name,I),E.originalDependencies.set(h.name,I),v){let x=new Set,C=R=>{if(!x.has(R)){x.add(R),R.decoupled=!1;for(let N of R.dependencies.values())R.peerNames.has(N.name)||C(N)}};C(I)}else for(let x of h.dependencies)p(x,I)};for(let h of t.dependencies)p(h,u);return u},Uq=t=>t.substring(0,t.indexOf("@",1)),hIt=t=>{let e={name:t.name,identName:Uq(t.locator),references:new Set(t.references),dependencies:new Set},r=new Set([t]),o=(a,n,u)=>{let A=r.has(a),p;if(n===a)p=u;else{let{name:h,references:E,locator:I}=a;p={name:h,identName:Uq(I),references:E,dependencies:new Set}}if(u.dependencies.add(p),!A){r.add(a);for(let h of a.dependencies.values())a.peerNames.has(h.name)||o(h,a,p);r.delete(a)}};for(let a of t.dependencies.values())o(a,t,e);return e},gIt=t=>{let e=new Map,r=new Set([t]),o=u=>`${u.name}@${u.ident}`,a=u=>{let A=o(u),p=e.get(A);return p||(p={dependents:new Set,peerDependents:new Set,hoistPriority:0},e.set(A,p)),p},n=(u,A)=>{let p=!!r.has(A);if(a(A).dependents.add(u.ident),!p){r.add(A);for(let E of A.dependencies.values()){let I=a(E);I.hoistPriority=Math.max(I.hoistPriority,E.hoistPriority),A.peerNames.has(E.name)?I.peerDependents.add(A.ident):n(A,E)}}};for(let u of t.dependencies.values())t.peerNames.has(u.name)||n(t,u);return e},no=t=>{if(!t)return"none";let e=t.indexOf("@",1),r=t.substring(0,e);r.endsWith("$wsroot$")&&(r=`wh:${r.replace("$wsroot$","")}`);let o=t.substring(e+1);if(o==="workspace:.")return".";if(o){let a=(o.indexOf("#")>0?o.split("#")[1]:o).replace("npm:","");return o.startsWith("virtual")&&(r=`v:${r}`),a.startsWith("workspace")&&(r=`w:${r}`,a=""),`${r}${a?`@${a}`:""}`}else return`${r}`},hIe=5e4,zB=t=>{let e=0,r=(a,n,u="")=>{if(e>hIe||n.has(a))return"";e++;let A=Array.from(a.dependencies.values()).sort((h,E)=>h.name===E.name?0:h.name>E.name?1:-1),p="";n.add(a);for(let h=0;h":"")+(v!==E.name?`a:${E.name}:`:"")+no(E.locator)+(I?` ${I}`:"")} `,p+=r(E,n,`${u}${hhIe?` Tree is too large, part of the tree has been dunped `:"")};var VB=(o=>(o.WORKSPACES="workspaces",o.DEPENDENCIES="dependencies",o.NONE="none",o))(VB||{}),mIe="node_modules",D0="$wsroot$";var JB=(t,e)=>{let{packageTree:r,hoistingLimits:o,errors:a,preserveSymlinksRequired:n}=mIt(t,e),u=null;if(a.length===0){let A=gIe(r,{hoistingLimits:o});u=EIt(t,A,e)}return{tree:u,errors:a,preserveSymlinksRequired:n}},dA=t=>`${t.name}@${t.reference}`,Hq=t=>{let e=new Map;for(let[r,o]of t.entries())if(!o.dirList){let a=e.get(o.locator);a||(a={target:o.target,linkType:o.linkType,locations:[],aliases:o.aliases},e.set(o.locator,a)),a.locations.push(r)}for(let r of e.values())r.locations=r.locations.sort((o,a)=>{let n=o.split(z.delimiter).length,u=a.split(z.delimiter).length;return a===o?0:n!==u?u-n:a>o?1:-1});return e},yIe=(t,e)=>{let r=W.isVirtualLocator(t)?W.devirtualizeLocator(t):t,o=W.isVirtualLocator(e)?W.devirtualizeLocator(e):e;return W.areLocatorsEqual(r,o)},_q=(t,e,r,o)=>{if(t.linkType!=="SOFT")return!1;let a=le.toPortablePath(r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation);return z.contains(o,a)===null},dIt=t=>{let e=t.getPackageInformation(t.topLevel);if(e===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");if(t.findPackageLocator(e.packageLocation)===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let o=le.toPortablePath(e.packageLocation.slice(0,-1)),a=new Map,n={children:new Map},u=t.getDependencyTreeRoots(),A=new Map,p=new Set,h=(v,x)=>{let C=dA(v);if(p.has(C))return;p.add(C);let R=t.getPackageInformation(v);if(R){let N=x?dA(x):"";if(dA(v)!==N&&R.linkType==="SOFT"&&!v.reference.startsWith("link:")&&!_q(R,v,t,o)){let U=EIe(R,v,t);(!A.get(U)||v.reference.startsWith("workspace:"))&&A.set(U,v)}for(let[U,V]of R.packageDependencies)V!==null&&(R.packagePeers.has(U)||h(t.getLocator(U,V),v))}};for(let v of u)h(v,null);let E=o.split(z.sep);for(let v of A.values()){let x=t.getPackageInformation(v),R=le.toPortablePath(x.packageLocation.slice(0,-1)).split(z.sep).slice(E.length),N=n;for(let U of R){let V=N.children.get(U);V||(V={children:new Map},N.children.set(U,V)),N=V}N.workspaceLocator=v}let I=(v,x)=>{if(v.workspaceLocator){let C=dA(x),R=a.get(C);R||(R=new Set,a.set(C,R)),R.add(v.workspaceLocator)}for(let C of v.children.values())I(C,v.workspaceLocator||x)};for(let v of n.children.values())I(v,n.workspaceLocator);return a},mIt=(t,e)=>{let r=[],o=!1,a=new Map,n=dIt(t),u=t.getPackageInformation(t.topLevel);if(u===null)throw new Error("Assertion failed: Expected the top-level package to have been registered");let A=t.findPackageLocator(u.packageLocation);if(A===null)throw new Error("Assertion failed: Expected the top-level package to have a physical locator");let p=le.toPortablePath(u.packageLocation.slice(0,-1)),h={name:A.name,identName:A.name,reference:A.reference,peerNames:u.packagePeers,dependencies:new Set,dependencyKind:1},E=new Map,I=(x,C)=>`${dA(C)}:${x}`,v=(x,C,R,N,U,V,te,ae)=>{let fe=I(x,R),ue=E.get(fe),me=!!ue;!me&&R.name===A.name&&R.reference===A.reference&&(ue=h,E.set(fe,h));let he=_q(C,R,t,p);if(!ue){let ce=0;he?ce=2:C.linkType==="SOFT"&&R.name.endsWith(D0)&&(ce=1),ue={name:x,identName:R.name,reference:R.reference,dependencies:new Set,peerNames:ce===1?new Set:C.packagePeers,dependencyKind:ce},E.set(fe,ue)}let Be;if(he?Be=2:U.linkType==="SOFT"?Be=1:Be=0,ue.hoistPriority=Math.max(ue.hoistPriority||0,Be),ae&&!he){let ce=dA({name:N.identName,reference:N.reference}),ne=a.get(ce)||new Set;a.set(ce,ne),ne.add(ue.name)}let we=new Map(C.packageDependencies);if(e.project){let ce=e.project.workspacesByCwd.get(le.toPortablePath(C.packageLocation.slice(0,-1)));if(ce){let ne=new Set([...Array.from(ce.manifest.peerDependencies.values(),ee=>W.stringifyIdent(ee)),...Array.from(ce.manifest.peerDependenciesMeta.keys())]);for(let ee of ne)we.has(ee)||(we.set(ee,V.get(ee)||null),ue.peerNames.add(ee))}}let g=dA({name:R.name.replace(D0,""),reference:R.reference}),Ee=n.get(g);if(Ee)for(let ce of Ee)we.set(`${ce.name}${D0}`,ce.reference);(C!==U||C.linkType!=="SOFT"||!he&&(!e.selfReferencesByCwd||e.selfReferencesByCwd.get(te)))&&N.dependencies.add(ue);let Pe=R!==A&&C.linkType==="SOFT"&&!R.name.endsWith(D0)&&!he;if(!me&&!Pe){let ce=new Map;for(let[ne,ee]of we)if(ee!==null){let Ie=t.getLocator(ne,ee),Fe=t.getLocator(ne.replace(D0,""),ee),At=t.getPackageInformation(Fe);if(At===null)throw new Error("Assertion failed: Expected the package to have been registered");let H=_q(At,Ie,t,p);if(e.validateExternalSoftLinks&&e.project&&H){At.packageDependencies.size>0&&(o=!0);for(let[He,Te]of At.packageDependencies)if(Te!==null){let Ve=W.parseLocator(Array.isArray(Te)?`${Te[0]}@${Te[1]}`:`${He}@${Te}`);if(dA(Ve)!==dA(Ie)){let qe=we.get(He);if(qe){let b=W.parseLocator(Array.isArray(qe)?`${qe[0]}@${qe[1]}`:`${He}@${qe}`);yIe(b,Ve)||r.push({messageName:71,text:`Cannot link ${W.prettyIdent(e.project.configuration,W.parseIdent(Ie.name))} into ${W.prettyLocator(e.project.configuration,W.parseLocator(`${R.name}@${R.reference}`))} dependency ${W.prettyLocator(e.project.configuration,Ve)} conflicts with parent dependency ${W.prettyLocator(e.project.configuration,b)}`})}else{let b=ce.get(He);if(b){let w=b.target,S=W.parseLocator(Array.isArray(w)?`${w[0]}@${w[1]}`:`${He}@${w}`);yIe(S,Ve)||r.push({messageName:71,text:`Cannot link ${W.prettyIdent(e.project.configuration,W.parseIdent(Ie.name))} into ${W.prettyLocator(e.project.configuration,W.parseLocator(`${R.name}@${R.reference}`))} dependency ${W.prettyLocator(e.project.configuration,Ve)} conflicts with dependency ${W.prettyLocator(e.project.configuration,S)} from sibling portal ${W.prettyIdent(e.project.configuration,W.parseIdent(b.portal.name))}`})}else ce.set(He,{target:Ve.reference,portal:Ie})}}}}let at=e.hoistingLimitsByCwd?.get(te),Re=H?te:z.relative(p,le.toPortablePath(At.packageLocation))||Bt.dot,ke=e.hoistingLimitsByCwd?.get(Re);v(ne,At,Ie,ue,C,we,Re,at==="dependencies"||ke==="dependencies"||ke==="workspaces")}}};return v(A.name,u,A,h,u,u.packageDependencies,Bt.dot,!1),{packageTree:h,hoistingLimits:a,errors:r,preserveSymlinksRequired:o}};function EIe(t,e,r){let o=r.resolveVirtual&&e.reference&&e.reference.startsWith("virtual:")?r.resolveVirtual(t.packageLocation):t.packageLocation;return le.toPortablePath(o||t.packageLocation)}function yIt(t,e,r){let o=e.getLocator(t.name.replace(D0,""),t.reference),a=e.getPackageInformation(o);if(a===null)throw new Error("Assertion failed: Expected the package to be registered");return r.pnpifyFs?{linkType:"SOFT",target:le.toPortablePath(a.packageLocation)}:{linkType:a.linkType,target:EIe(a,t,e)}}var EIt=(t,e,r)=>{let o=new Map,a=(E,I,v)=>{let{linkType:x,target:C}=yIt(E,t,r);return{locator:dA(E),nodePath:I,target:C,linkType:x,aliases:v}},n=E=>{let[I,v]=E.split("/");return v?{scope:I,name:v}:{scope:null,name:I}},u=new Set,A=(E,I,v)=>{if(u.has(E))return;u.add(E);let x=Array.from(E.references).sort().join("#");for(let C of E.dependencies){let R=Array.from(C.references).sort().join("#");if(C.identName===E.identName.replace(D0,"")&&R===x)continue;let N=Array.from(C.references).sort(),U={name:C.identName,reference:N[0]},{name:V,scope:te}=n(C.name),ae=te?[te,V]:[V],fe=z.join(I,mIe),ue=z.join(fe,...ae),me=`${v}/${U.name}`,he=a(U,v,N.slice(1)),Be=!1;if(he.linkType==="SOFT"&&r.project){let we=r.project.workspacesByCwd.get(he.target.slice(0,-1));Be=!!(we&&!we.manifest.name)}if(!C.name.endsWith(D0)&&!Be){let we=o.get(ue);if(we){if(we.dirList)throw new Error(`Assertion failed: ${ue} cannot merge dir node with leaf node`);{let Pe=W.parseLocator(we.locator),ce=W.parseLocator(he.locator);if(we.linkType!==he.linkType)throw new Error(`Assertion failed: ${ue} cannot merge nodes with different link types ${we.nodePath}/${W.stringifyLocator(Pe)} and ${v}/${W.stringifyLocator(ce)}`);if(Pe.identHash!==ce.identHash)throw new Error(`Assertion failed: ${ue} cannot merge nodes with different idents ${we.nodePath}/${W.stringifyLocator(Pe)} and ${v}/s${W.stringifyLocator(ce)}`);he.aliases=[...he.aliases,...we.aliases,W.parseLocator(we.locator).reference]}}o.set(ue,he);let g=ue.split("/"),Ee=g.indexOf(mIe);for(let Pe=g.length-1;Ee>=0&&Pe>Ee;Pe--){let ce=le.toPortablePath(g.slice(0,Pe).join(z.sep)),ne=g[Pe],ee=o.get(ce);if(!ee)o.set(ce,{dirList:new Set([ne])});else if(ee.dirList){if(ee.dirList.has(ne))break;ee.dirList.add(ne)}}}A(C,he.linkType==="SOFT"?he.target:ue,me)}},p=a({name:e.name,reference:Array.from(e.references)[0]},"",[]),h=p.target;return o.set(h,p),A(e,h,""),o};Ye();Ye();Pt();Pt();iA();Nl();var oG={};zt(oG,{PnpInstaller:()=>mm,PnpLinker:()=>b0,UnplugCommand:()=>k0,default:()=>VIt,getPnpPath:()=>x0,jsInstallUtils:()=>yA,pnpUtils:()=>av,quotePathIfNeeded:()=>n1e});Pt();var r1e=ve("url");Ye();Ye();Pt();Pt();var CIe={["DEFAULT"]:{collapsed:!1,next:{["*"]:"DEFAULT"}},["TOP_LEVEL"]:{collapsed:!1,next:{fallbackExclusionList:"FALLBACK_EXCLUSION_LIST",packageRegistryData:"PACKAGE_REGISTRY_DATA",["*"]:"DEFAULT"}},["FALLBACK_EXCLUSION_LIST"]:{collapsed:!1,next:{["*"]:"FALLBACK_EXCLUSION_ENTRIES"}},["FALLBACK_EXCLUSION_ENTRIES"]:{collapsed:!0,next:{["*"]:"FALLBACK_EXCLUSION_DATA"}},["FALLBACK_EXCLUSION_DATA"]:{collapsed:!0,next:{["*"]:"DEFAULT"}},["PACKAGE_REGISTRY_DATA"]:{collapsed:!1,next:{["*"]:"PACKAGE_REGISTRY_ENTRIES"}},["PACKAGE_REGISTRY_ENTRIES"]:{collapsed:!0,next:{["*"]:"PACKAGE_STORE_DATA"}},["PACKAGE_STORE_DATA"]:{collapsed:!1,next:{["*"]:"PACKAGE_STORE_ENTRIES"}},["PACKAGE_STORE_ENTRIES"]:{collapsed:!0,next:{["*"]:"PACKAGE_INFORMATION_DATA"}},["PACKAGE_INFORMATION_DATA"]:{collapsed:!1,next:{packageDependencies:"PACKAGE_DEPENDENCIES",["*"]:"DEFAULT"}},["PACKAGE_DEPENDENCIES"]:{collapsed:!1,next:{["*"]:"PACKAGE_DEPENDENCY"}},["PACKAGE_DEPENDENCY"]:{collapsed:!0,next:{["*"]:"DEFAULT"}}};function CIt(t,e,r){let o="";o+="[";for(let a=0,n=t.length;a"u"||(A!==0&&(a+=", "),a+=JSON.stringify(p),a+=": ",a+=EQ(p,h,e,r).replace(/^ +/g,""),A+=1)}return a+="}",a}function BIt(t,e,r){let o=Object.keys(t),a=`${r} `,n="";n+=r,n+=`{ `;let u=0;for(let A=0,p=o.length;A"u"||(u!==0&&(n+=",",n+=` `),n+=a,n+=JSON.stringify(h),n+=": ",n+=EQ(h,E,e,a).replace(/^ +/g,""),u+=1)}return u!==0&&(n+=` `),n+=r,n+="}",n}function EQ(t,e,r,o){let{next:a}=CIe[r],n=a[t]||a["*"];return wIe(e,n,o)}function wIe(t,e,r){let{collapsed:o}=CIe[e];return Array.isArray(t)?o?CIt(t,e,r):wIt(t,e,r):typeof t=="object"&&t!==null?o?IIt(t,e,r):BIt(t,e,r):JSON.stringify(t)}function IIe(t){return wIe(t,"TOP_LEVEL","")}function XB(t,e){let r=Array.from(t);Array.isArray(e)||(e=[e]);let o=[];for(let n of e)o.push(r.map(u=>n(u)));let a=r.map((n,u)=>u);return a.sort((n,u)=>{for(let A of o){let p=A[n]A[u]?1:0;if(p!==0)return p}return 0}),a.map(n=>r[n])}function vIt(t){let e=new Map,r=XB(t.fallbackExclusionList||[],[({name:o,reference:a})=>o,({name:o,reference:a})=>a]);for(let{name:o,reference:a}of r){let n=e.get(o);typeof n>"u"&&e.set(o,n=new Set),n.add(a)}return Array.from(e).map(([o,a])=>[o,Array.from(a)])}function DIt(t){return XB(t.fallbackPool||[],([e])=>e)}function PIt(t){let e=[];for(let[r,o]of XB(t.packageRegistry,([a])=>a===null?"0":`1${a}`)){let a=[];e.push([r,a]);for(let[n,{packageLocation:u,packageDependencies:A,packagePeers:p,linkType:h,discardFromLookup:E}]of XB(o,([I])=>I===null?"0":`1${I}`)){let I=[];r!==null&&n!==null&&!A.has(r)&&I.push([r,n]);for(let[C,R]of XB(A.entries(),([N])=>N))I.push([C,R]);let v=p&&p.size>0?Array.from(p):void 0,x=E||void 0;a.push([n,{packageLocation:u,packageDependencies:I,packagePeers:v,linkType:h,discardFromLookup:x}])}}return e}function ZB(t){return{__info:["This file is automatically generated. Do not touch it, or risk","your modifications being lost."],dependencyTreeRoots:t.dependencyTreeRoots,enableTopLevelFallback:t.enableTopLevelFallback||!1,ignorePatternData:t.ignorePattern||null,fallbackExclusionList:vIt(t),fallbackPool:DIt(t),packageRegistryData:PIt(t)}}var DIe=$e(vIe());function PIe(t,e){return[t?`${t} `:"",`/* eslint-disable */ `,`// @ts-nocheck `,`"use strict"; `,` `,e,` `,(0,DIe.default)()].join("")}function SIt(t){return JSON.stringify(t,null,2)}function bIt(t){return`'${t.replace(/\\/g,"\\\\").replace(/'/g,"\\'").replace(/\n/g,`\\ `)}'`}function xIt(t){return[`const RAW_RUNTIME_STATE = `,`${bIt(IIe(t))}; `,`function $$SETUP_STATE(hydrateRuntimeState, basePath) { `,` return hydrateRuntimeState(JSON.parse(RAW_RUNTIME_STATE), {basePath: basePath || __dirname}); `,`} `].join("")}function kIt(){return[`function $$SETUP_STATE(hydrateRuntimeState, basePath) { `,` const fs = require('fs'); `,` const path = require('path'); `,` const pnpDataFilepath = path.resolve(__dirname, ${JSON.stringify(dr.pnpData)}); `,` return hydrateRuntimeState(JSON.parse(fs.readFileSync(pnpDataFilepath, 'utf8')), {basePath: basePath || __dirname}); `,`} `].join("")}function SIe(t){let e=ZB(t),r=xIt(e);return PIe(t.shebang,r)}function bIe(t){let e=ZB(t),r=kIt(),o=PIe(t.shebang,r);return{dataFile:SIt(e),loaderFile:o}}Pt();function Gq(t,{basePath:e}){let r=le.toPortablePath(e),o=z.resolve(r),a=t.ignorePatternData!==null?new RegExp(t.ignorePatternData):null,n=new Map,u=new Map(t.packageRegistryData.map(([I,v])=>[I,new Map(v.map(([x,C])=>{if(I===null!=(x===null))throw new Error("Assertion failed: The name and reference should be null, or neither should");let R=C.discardFromLookup??!1,N={name:I,reference:x},U=n.get(C.packageLocation);U?(U.discardFromLookup=U.discardFromLookup&&R,R||(U.locator=N)):n.set(C.packageLocation,{locator:N,discardFromLookup:R});let V=null;return[x,{packageDependencies:new Map(C.packageDependencies),packagePeers:new Set(C.packagePeers),linkType:C.linkType,discardFromLookup:R,get packageLocation(){return V||(V=z.join(o,C.packageLocation))}}]}))])),A=new Map(t.fallbackExclusionList.map(([I,v])=>[I,new Set(v)])),p=new Map(t.fallbackPool),h=t.dependencyTreeRoots,E=t.enableTopLevelFallback;return{basePath:r,dependencyTreeRoots:h,enableTopLevelFallback:E,fallbackExclusionList:A,fallbackPool:p,ignorePattern:a,packageLocatorsByLocations:n,packageRegistry:u}}Pt();Pt();var ip=ve("module"),dm=ve("url"),$q=ve("util");var Mo=ve("url");var FIe=$e(ve("assert"));var jq=Array.isArray,$B=JSON.stringify,ev=Object.getOwnPropertyNames,gm=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),Yq=(t,e)=>RegExp.prototype.exec.call(t,e),Wq=(t,...e)=>RegExp.prototype[Symbol.replace].apply(t,e),P0=(t,...e)=>String.prototype.endsWith.apply(t,e),Kq=(t,...e)=>String.prototype.includes.apply(t,e),zq=(t,...e)=>String.prototype.lastIndexOf.apply(t,e),tv=(t,...e)=>String.prototype.indexOf.apply(t,e),xIe=(t,...e)=>String.prototype.replace.apply(t,e),S0=(t,...e)=>String.prototype.slice.apply(t,e),mA=(t,...e)=>String.prototype.startsWith.apply(t,e),kIe=Map,QIe=JSON.parse;function rv(t,e,r){return class extends r{constructor(...o){super(e(...o)),this.code=t,this.name=`${r.name} [${t}]`}}}var RIe=rv("ERR_PACKAGE_IMPORT_NOT_DEFINED",(t,e,r)=>`Package import specifier "${t}" is not defined${e?` in package ${e}package.json`:""} imported from ${r}`,TypeError),Vq=rv("ERR_INVALID_MODULE_SPECIFIER",(t,e,r=void 0)=>`Invalid module "${t}" ${e}${r?` imported from ${r}`:""}`,TypeError),TIe=rv("ERR_INVALID_PACKAGE_TARGET",(t,e,r,o=!1,a=void 0)=>{let n=typeof r=="string"&&!o&&r.length&&!mA(r,"./");return e==="."?((0,FIe.default)(o===!1),`Invalid "exports" main target ${$B(r)} defined in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`):`Invalid "${o?"imports":"exports"}" target ${$B(r)} defined for '${e}' in the package config ${t}package.json${a?` imported from ${a}`:""}${n?'; targets must start with "./"':""}`},Error),nv=rv("ERR_INVALID_PACKAGE_CONFIG",(t,e,r)=>`Invalid package config ${t}${e?` while importing ${e}`:""}${r?`. ${r}`:""}`,Error),LIe=rv("ERR_PACKAGE_PATH_NOT_EXPORTED",(t,e,r=void 0)=>e==="."?`No "exports" main defined in ${t}package.json${r?` imported from ${r}`:""}`:`Package subpath '${e}' is not defined by "exports" in ${t}package.json${r?` imported from ${r}`:""}`,Error);var wQ=ve("url");function NIe(t,e){let r=Object.create(null);for(let o=0;oe):t+e}iv(r,t,o,u,a)}Yq(MIe,S0(t,2))!==null&&iv(r,t,o,u,a);let p=new URL(t,o),h=p.pathname,E=new URL(".",o).pathname;if(mA(h,E)||iv(r,t,o,u,a),e==="")return p;if(Yq(MIe,e)!==null){let I=n?xIe(r,"*",()=>e):r+e;RIt(I,o,u,a)}return n?new URL(Wq(UIe,p.href,()=>e)):new URL(e,p)}function LIt(t){let e=+t;return`${e}`!==t?!1:e>=0&&e<4294967295}function jC(t,e,r,o,a,n,u,A){if(typeof e=="string")return TIt(e,r,o,t,a,n,u,A);if(jq(e)){if(e.length===0)return null;let p;for(let h=0;hn?-1:n>a||r===-1?1:o===-1||t.length>e.length?-1:e.length>t.length?1:0}function NIt(t,e,r){if(typeof t=="string"||jq(t))return!0;if(typeof t!="object"||t===null)return!1;let o=ev(t),a=!1,n=0;for(let u=0;u=h.length&&P0(e,I)&&HIe(n,h)===1&&zq(h,"*")===E&&(n=h,u=S0(e,E,e.length-I.length))}}if(n){let p=r[n],h=jC(t,p,u,n,o,!0,!1,a);return h==null&&Jq(e,t,o),h}Jq(e,t,o)}function GIe({name:t,base:e,conditions:r,readFileSyncFn:o}){if(t==="#"||mA(t,"#/")||P0(t,"/")){let u="is not a valid internal imports specifier name";throw new Vq(t,u,(0,Mo.fileURLToPath)(e))}let a,n=OIe(e,o);if(n.exists){a=(0,Mo.pathToFileURL)(n.pjsonPath);let u=n.imports;if(u)if(gm(u,t)&&!Kq(t,"*")){let A=jC(a,u[t],"",t,e,!1,!0,r);if(A!=null)return A}else{let A="",p,h=ev(u);for(let E=0;E=I.length&&P0(t,x)&&HIe(A,I)===1&&zq(I,"*")===v&&(A=I,p=S0(t,v,t.length-x.length))}}if(A){let E=u[A],I=jC(a,E,p,A,e,!0,!0,r);if(I!=null)return I}}}FIt(t,a,e)}Pt();var MIt=new Set(["BUILTIN_NODE_RESOLUTION_FAILED","MISSING_DEPENDENCY","MISSING_PEER_DEPENDENCY","QUALIFIED_PATH_RESOLUTION_FAILED","UNDECLARED_DEPENDENCY"]);function $i(t,e,r={},o){o??=MIt.has(t)?"MODULE_NOT_FOUND":t;let a={configurable:!0,writable:!0,enumerable:!1};return Object.defineProperties(new Error(e),{code:{...a,value:o},pnpCode:{...a,value:t},data:{...a,value:r}})}function lu(t){return le.normalize(le.fromPortablePath(t))}var KIe=$e(YIe());function zIe(t){return UIt(),Zq[t]}var Zq;function UIt(){Zq||(Zq={"--conditions":[],...WIe(_It()),...WIe(process.execArgv)})}function WIe(t){return(0,KIe.default)({"--conditions":[String],"-C":"--conditions"},{argv:t,permissive:!0})}function _It(){let t=[],e=HIt(process.env.NODE_OPTIONS||"",t);return t.length,e}function HIt(t,e){let r=[],o=!1,a=!0;for(let n=0;nparseInt(t,10)),VIe=Ma>19||Ma===19&&np>=2||Ma===18&&np>=13,vJt=Ma===20&&np<6||Ma===19&&np>=3,DJt=Ma>19||Ma===19&&np>=6,PJt=Ma>=21||Ma===20&&np>=10||Ma===18&&np>=19,SJt=Ma>=21||Ma===20&&np>=10||Ma===18&&np>=20,bJt=Ma>=22;function JIe(t){if(process.env.WATCH_REPORT_DEPENDENCIES&&process.send)if(t=t.map(e=>le.fromPortablePath(mi.resolveVirtual(le.toPortablePath(e)))),VIe)process.send({"watch:require":t});else for(let e of t)process.send({"watch:require":e})}function eG(t,e){let r=Number(process.env.PNP_ALWAYS_WARN_ON_FALLBACK)>0,o=Number(process.env.PNP_DEBUG_LEVEL),a=/^(?![a-zA-Z]:[\\/]|\\\\|\.{0,2}(?:\/|$))((?:node:)?(?:@[^/]+\/)?[^/]+)\/*(.*|)$/,n=/^(\/|\.{1,2}(\/|$))/,u=/\/$/,A=/^\.{0,2}\//,p={name:null,reference:null},h=[],E=new Set;if(t.enableTopLevelFallback===!0&&h.push(p),e.compatibilityMode!==!1)for(let Re of["react-scripts","gatsby"]){let ke=t.packageRegistry.get(Re);if(ke)for(let xe of ke.keys()){if(xe===null)throw new Error("Assertion failed: This reference shouldn't be null");h.push({name:Re,reference:xe})}}let{ignorePattern:I,packageRegistry:v,packageLocatorsByLocations:x}=t;function C(Re,ke){return{fn:Re,args:ke,error:null,result:null}}function R(Re){let ke=process.stderr?.hasColors?.()??process.stdout.isTTY,xe=(Ve,qe)=>`\x1B[${Ve}m${qe}\x1B[0m`,He=Re.error;console.error(He?xe("31;1",`\u2716 ${Re.error?.message.replace(/\n.*/s,"")}`):xe("33;1","\u203C Resolution")),Re.args.length>0&&console.error();for(let Ve of Re.args)console.error(` ${xe("37;1","In \u2190")} ${(0,$q.inspect)(Ve,{colors:ke,compact:!0})}`);Re.result&&(console.error(),console.error(` ${xe("37;1","Out \u2192")} ${(0,$q.inspect)(Re.result,{colors:ke,compact:!0})}`));let Te=new Error().stack.match(/(?<=^ +)at.*/gm)?.slice(2)??[];if(Te.length>0){console.error();for(let Ve of Te)console.error(` ${xe("38;5;244",Ve)}`)}console.error()}function N(Re,ke){if(e.allowDebug===!1)return ke;if(Number.isFinite(o)){if(o>=2)return(...xe)=>{let He=C(Re,xe);try{return He.result=ke(...xe)}catch(Te){throw He.error=Te}finally{R(He)}};if(o>=1)return(...xe)=>{try{return ke(...xe)}catch(He){let Te=C(Re,xe);throw Te.error=He,R(Te),He}}}return ke}function U(Re){let ke=g(Re);if(!ke)throw $i("INTERNAL","Couldn't find a matching entry in the dependency tree for the specified parent (this is probably an internal error)");return ke}function V(Re){if(Re.name===null)return!0;for(let ke of t.dependencyTreeRoots)if(ke.name===Re.name&&ke.reference===Re.reference)return!0;return!1}let te=new Set(["node","require",...zIe("--conditions")]);function ae(Re,ke=te,xe){let He=ce(z.join(Re,"internal.js"),{resolveIgnored:!0,includeDiscardFromLookup:!0});if(He===null)throw $i("INTERNAL",`The locator that owns the "${Re}" path can't be found inside the dependency tree (this is probably an internal error)`);let{packageLocation:Te}=U(He),Ve=z.join(Te,dr.manifest);if(!e.fakeFs.existsSync(Ve))return null;let qe=JSON.parse(e.fakeFs.readFileSync(Ve,"utf8"));if(qe.exports==null)return null;let b=z.contains(Te,Re);if(b===null)throw $i("INTERNAL","unqualifiedPath doesn't contain the packageLocation (this is probably an internal error)");b!=="."&&!A.test(b)&&(b=`./${b}`);try{let w=qIe({packageJSONUrl:(0,dm.pathToFileURL)(le.fromPortablePath(Ve)),packageSubpath:b,exports:qe.exports,base:xe?(0,dm.pathToFileURL)(le.fromPortablePath(xe)):null,conditions:ke});return le.toPortablePath((0,dm.fileURLToPath)(w))}catch(w){throw $i("EXPORTS_RESOLUTION_FAILED",w.message,{unqualifiedPath:lu(Re),locator:He,pkgJson:qe,subpath:lu(b),conditions:ke},w.code)}}function fe(Re,ke,{extensions:xe}){let He;try{ke.push(Re),He=e.fakeFs.statSync(Re)}catch{}if(He&&!He.isDirectory())return e.fakeFs.realpathSync(Re);if(He&&He.isDirectory()){let Te;try{Te=JSON.parse(e.fakeFs.readFileSync(z.join(Re,dr.manifest),"utf8"))}catch{}let Ve;if(Te&&Te.main&&(Ve=z.resolve(Re,Te.main)),Ve&&Ve!==Re){let qe=fe(Ve,ke,{extensions:xe});if(qe!==null)return qe}}for(let Te=0,Ve=xe.length;Te{let b=JSON.stringify(qe.name);if(He.has(b))return;He.add(b);let w=Ee(qe);for(let S of w)if(U(S).packagePeers.has(Re))Te(S);else{let F=xe.get(S.name);typeof F>"u"&&xe.set(S.name,F=new Set),F.add(S.reference)}};Te(ke);let Ve=[];for(let qe of[...xe.keys()].sort())for(let b of[...xe.get(qe)].sort())Ve.push({name:qe,reference:b});return Ve}function ce(Re,{resolveIgnored:ke=!1,includeDiscardFromLookup:xe=!1}={}){if(he(Re)&&!ke)return null;let He=z.relative(t.basePath,Re);He.match(n)||(He=`./${He}`),He.endsWith("/")||(He=`${He}/`);do{let Te=x.get(He);if(typeof Te>"u"||Te.discardFromLookup&&!xe){He=He.substring(0,He.lastIndexOf("/",He.length-2)+1);continue}return Te.locator}while(He!=="");return null}function ne(Re){try{return e.fakeFs.readFileSync(le.toPortablePath(Re),"utf8")}catch(ke){if(ke.code==="ENOENT")return;throw ke}}function ee(Re,ke,{considerBuiltins:xe=!0}={}){if(Re.startsWith("#"))throw new Error("resolveToUnqualified can not handle private import mappings");if(Re==="pnpapi")return le.toPortablePath(e.pnpapiResolution);if(xe&&(0,ip.isBuiltin)(Re))return null;let He=lu(Re),Te=ke&&lu(ke);if(ke&&he(ke)&&(!z.isAbsolute(Re)||ce(Re)===null)){let b=me(Re,ke);if(b===!1)throw $i("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer was explicitely ignored by the regexp) Require request: "${He}" Required by: ${Te} `,{request:He,issuer:Te});return le.toPortablePath(b)}let Ve,qe=Re.match(a);if(qe){if(!ke)throw $i("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:He,issuer:Te});let[,b,w]=qe,S=ce(ke);if(!S){let Le=me(Re,ke);if(Le===!1)throw $i("BUILTIN_NODE_RESOLUTION_FAILED",`The builtin node resolution algorithm was unable to resolve the requested module (it didn't go through the pnp resolver because the issuer doesn't seem to be part of the Yarn-managed dependency tree). Require path: "${He}" Required by: ${Te} `,{request:He,issuer:Te});return le.toPortablePath(Le)}let F=U(S).packageDependencies.get(b),J=null;if(F==null&&S.name!==null){let Le=t.fallbackExclusionList.get(S.name);if(!Le||!Le.has(S.reference)){for(let dt=0,Gt=h.length;dtV(ot))?X=$i("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${b} (a peer dependency) but it isn't provided by your application; this makes the require call ambiguous and unsound. Required package: ${b}${b!==He?` (via "${He}")`:""} Required by: ${S.name}@${S.reference} (via ${Te}) ${Le.map(ot=>`Ancestor breaking the chain: ${ot.name}@${ot.reference} `).join("")} `,{request:He,issuer:Te,issuerLocator:Object.assign({},S),dependencyName:b,brokenAncestors:Le}):X=$i("MISSING_PEER_DEPENDENCY",`${S.name} tried to access ${b} (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound. Required package: ${b}${b!==He?` (via "${He}")`:""} Required by: ${S.name}@${S.reference} (via ${Te}) ${Le.map(ot=>`Ancestor breaking the chain: ${ot.name}@${ot.reference} `).join("")} `,{request:He,issuer:Te,issuerLocator:Object.assign({},S),dependencyName:b,brokenAncestors:Le})}else F===void 0&&(!xe&&(0,ip.isBuiltin)(Re)?V(S)?X=$i("UNDECLARED_DEPENDENCY",`Your application tried to access ${b}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${b} isn't otherwise declared in your dependencies, this makes the require call ambiguous and unsound. Required package: ${b}${b!==He?` (via "${He}")`:""} Required by: ${Te} `,{request:He,issuer:Te,dependencyName:b}):X=$i("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${b}. While this module is usually interpreted as a Node builtin, your resolver is running inside a non-Node resolution context where such builtins are ignored. Since ${b} isn't otherwise declared in ${S.name}'s dependencies, this makes the require call ambiguous and unsound. Required package: ${b}${b!==He?` (via "${He}")`:""} Required by: ${Te} `,{request:He,issuer:Te,issuerLocator:Object.assign({},S),dependencyName:b}):V(S)?X=$i("UNDECLARED_DEPENDENCY",`Your application tried to access ${b}, but it isn't declared in your dependencies; this makes the require call ambiguous and unsound. Required package: ${b}${b!==He?` (via "${He}")`:""} Required by: ${Te} `,{request:He,issuer:Te,dependencyName:b}):X=$i("UNDECLARED_DEPENDENCY",`${S.name} tried to access ${b}, but it isn't declared in its dependencies; this makes the require call ambiguous and unsound. Required package: ${b}${b!==He?` (via "${He}")`:""} Required by: ${S.name}@${S.reference} (via ${Te}) `,{request:He,issuer:Te,issuerLocator:Object.assign({},S),dependencyName:b}));if(F==null){if(J===null||X===null)throw X||new Error("Assertion failed: Expected an error to have been set");F=J;let Le=X.message.replace(/\n.*/g,"");X.message=Le,!E.has(Le)&&o!==0&&(E.add(Le),process.emitWarning(X))}let Z=Array.isArray(F)?{name:F[0],reference:F[1]}:{name:b,reference:F},ie=U(Z);if(!ie.packageLocation)throw $i("MISSING_DEPENDENCY",`A dependency seems valid but didn't get installed for some reason. This might be caused by a partial install, such as dev vs prod. Required package: ${Z.name}@${Z.reference}${Z.name!==He?` (via "${He}")`:""} Required by: ${S.name}@${S.reference} (via ${Te}) `,{request:He,issuer:Te,dependencyLocator:Object.assign({},Z)});let be=ie.packageLocation;w?Ve=z.join(be,w):Ve=be}else if(z.isAbsolute(Re))Ve=z.normalize(Re);else{if(!ke)throw $i("API_ERROR","The resolveToUnqualified function must be called with a valid issuer when the path isn't a builtin nor absolute",{request:He,issuer:Te});let b=z.resolve(ke);ke.match(u)?Ve=z.normalize(z.join(b,Re)):Ve=z.normalize(z.join(z.dirname(b),Re))}return z.normalize(Ve)}function Ie(Re,ke,xe=te,He){if(n.test(Re))return ke;let Te=ae(ke,xe,He);return Te?z.normalize(Te):ke}function Fe(Re,{extensions:ke=Object.keys(ip.Module._extensions)}={}){let xe=[],He=fe(Re,xe,{extensions:ke});if(He)return z.normalize(He);{JIe(xe.map(qe=>le.fromPortablePath(qe)));let Te=lu(Re),Ve=ce(Re);if(Ve){let{packageLocation:qe}=U(Ve),b=!0;try{e.fakeFs.accessSync(qe)}catch(w){if(w?.code==="ENOENT")b=!1;else{let S=(w?.message??w??"empty exception thrown").replace(/^[A-Z]/,y=>y.toLowerCase());throw $i("QUALIFIED_PATH_RESOLUTION_FAILED",`Required package exists but could not be accessed (${S}). Missing package: ${Ve.name}@${Ve.reference} Expected package location: ${lu(qe)} `,{unqualifiedPath:Te,extensions:ke})}}if(!b){let w=qe.includes("/unplugged/")?"Required unplugged package missing from disk. This may happen when switching branches without running installs (unplugged packages must be fully materialized on disk to work).":"Required package missing from disk. If you keep your packages inside your repository then restarting the Node process may be enough. Otherwise, try to run an install first.";throw $i("QUALIFIED_PATH_RESOLUTION_FAILED",`${w} Missing package: ${Ve.name}@${Ve.reference} Expected package location: ${lu(qe)} `,{unqualifiedPath:Te,extensions:ke})}}throw $i("QUALIFIED_PATH_RESOLUTION_FAILED",`Qualified path resolution failed: we looked for the following paths, but none could be accessed. Source path: ${Te} ${xe.map(qe=>`Not found: ${lu(qe)} `).join("")}`,{unqualifiedPath:Te,extensions:ke})}}function At(Re,ke,xe){if(!ke)throw new Error("Assertion failed: An issuer is required to resolve private import mappings");let He=GIe({name:Re,base:(0,dm.pathToFileURL)(le.fromPortablePath(ke)),conditions:xe.conditions??te,readFileSyncFn:ne});if(He instanceof URL)return Fe(le.toPortablePath((0,dm.fileURLToPath)(He)),{extensions:xe.extensions});if(He.startsWith("#"))throw new Error("Mapping from one private import to another isn't allowed");return H(He,ke,xe)}function H(Re,ke,xe={}){try{if(Re.startsWith("#"))return At(Re,ke,xe);let{considerBuiltins:He,extensions:Te,conditions:Ve}=xe,qe=ee(Re,ke,{considerBuiltins:He});if(Re==="pnpapi")return qe;if(qe===null)return null;let b=()=>ke!==null?he(ke):!1,w=(!He||!(0,ip.isBuiltin)(Re))&&!b()?Ie(Re,qe,Ve,ke):qe;return Fe(w,{extensions:Te})}catch(He){throw Object.hasOwn(He,"pnpCode")&&Object.assign(He.data,{request:lu(Re),issuer:ke&&lu(ke)}),He}}function at(Re){let ke=z.normalize(Re),xe=mi.resolveVirtual(ke);return xe!==ke?xe:null}return{VERSIONS:Be,topLevel:we,getLocator:(Re,ke)=>Array.isArray(ke)?{name:ke[0],reference:ke[1]}:{name:Re,reference:ke},getDependencyTreeRoots:()=>[...t.dependencyTreeRoots],getAllLocators(){let Re=[];for(let[ke,xe]of v)for(let He of xe.keys())ke!==null&&He!==null&&Re.push({name:ke,reference:He});return Re},getPackageInformation:Re=>{let ke=g(Re);if(ke===null)return null;let xe=le.fromPortablePath(ke.packageLocation);return{...ke,packageLocation:xe}},findPackageLocator:Re=>ce(le.toPortablePath(Re)),resolveToUnqualified:N("resolveToUnqualified",(Re,ke,xe)=>{let He=ke!==null?le.toPortablePath(ke):null,Te=ee(le.toPortablePath(Re),He,xe);return Te===null?null:le.fromPortablePath(Te)}),resolveUnqualified:N("resolveUnqualified",(Re,ke)=>le.fromPortablePath(Fe(le.toPortablePath(Re),ke))),resolveRequest:N("resolveRequest",(Re,ke,xe)=>{let He=ke!==null?le.toPortablePath(ke):null,Te=H(le.toPortablePath(Re),He,xe);return Te===null?null:le.fromPortablePath(Te)}),resolveVirtual:N("resolveVirtual",Re=>{let ke=at(le.toPortablePath(Re));return ke!==null?le.fromPortablePath(ke):null})}}Pt();var XIe=(t,e,r)=>{let o=ZB(t),a=Gq(o,{basePath:e}),n=le.join(e,dr.pnpCjs);return eG(a,{fakeFs:r,pnpapiResolution:n})};var rG=$e($Ie());qt();var yA={};zt(yA,{checkManifestCompatibility:()=>e1e,extractBuildRequest:()=>IQ,getExtractHint:()=>nG,hasBindingGyp:()=>iG});Ye();Pt();function e1e(t){return W.isPackageCompatible(t,Vi.getArchitectureSet())}function IQ(t,e,r,{configuration:o}){let a=[];for(let n of["preinstall","install","postinstall"])e.manifest.scripts.has(n)&&a.push({type:0,script:n});return!e.manifest.scripts.has("install")&&e.misc.hasBindingGyp&&a.push({type:1,script:"node-gyp rebuild"}),a.length===0?null:t.linkType!=="HARD"?{skipped:!0,explain:n=>n.reportWarningOnce(6,`${W.prettyLocator(o,t)} lists build scripts, but is referenced through a soft link. Soft links don't support build scripts, so they'll be ignored.`)}:r&&r.built===!1?{skipped:!0,explain:n=>n.reportInfoOnce(5,`${W.prettyLocator(o,t)} lists build scripts, but its build has been explicitly disabled through configuration.`)}:!o.get("enableScripts")&&!r.built?{skipped:!0,explain:n=>n.reportWarningOnce(4,`${W.prettyLocator(o,t)} lists build scripts, but all build scripts have been disabled.`)}:e1e(t)?{skipped:!1,directives:a}:{skipped:!0,explain:n=>n.reportWarningOnce(76,`${W.prettyLocator(o,t)} The ${Vi.getArchitectureName()} architecture is incompatible with this package, build skipped.`)}}var GIt=new Set([".exe",".bin",".h",".hh",".hpp",".c",".cc",".cpp",".java",".jar",".node"]);function nG(t){return t.packageFs.getExtractHint({relevantExtensions:GIt})}function iG(t){let e=z.join(t.prefixPath,"binding.gyp");return t.packageFs.existsSync(e)}var av={};zt(av,{getUnpluggedPath:()=>ov});Ye();Pt();function ov(t,{configuration:e}){return z.resolve(e.get("pnpUnpluggedFolder"),W.slugifyLocator(t))}var jIt=new Set([W.makeIdent(null,"open").identHash,W.makeIdent(null,"opn").identHash]),b0=class{constructor(){this.mode="strict";this.pnpCache=new Map}getCustomDataKey(){return JSON.stringify({name:"PnpLinker",version:2})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the PnP linker to be enabled");let o=x0(r.project).cjs;if(!oe.existsSync(o))throw new it(`The project in ${de.pretty(r.project.configuration,`${r.project.cwd}/package.json`,de.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let a=_e.getFactoryWithDefault(this.pnpCache,o,()=>_e.dynamicRequire(o,{cachingStrategy:_e.CachingStrategy.FsTime})),n={name:W.stringifyIdent(e),reference:e.reference},u=a.getPackageInformation(n);if(!u)throw new it(`Couldn't find ${W.prettyLocator(r.project.configuration,e)} in the currently installed PnP map - running an install might help`);return le.toPortablePath(u.packageLocation)}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let o=x0(r.project).cjs;if(!oe.existsSync(o))return null;let n=_e.getFactoryWithDefault(this.pnpCache,o,()=>_e.dynamicRequire(o,{cachingStrategy:_e.CachingStrategy.FsTime})).findPackageLocator(le.fromPortablePath(e));return n?W.makeLocator(W.parseIdent(n.name),n.reference):null}makeInstaller(e){return new mm(e)}isEnabled(e){return!(e.project.configuration.get("nodeLinker")!=="pnp"||e.project.configuration.get("pnpMode")!==this.mode)}},mm=class{constructor(e){this.opts=e;this.mode="strict";this.asyncActions=new _e.AsyncActions(10);this.packageRegistry=new Map;this.virtualTemplates=new Map;this.isESMLoaderRequired=!1;this.customData={store:new Map};this.unpluggedPaths=new Set;this.opts=e}attachCustomData(e){this.customData=e}async installPackage(e,r,o){let a=W.stringifyIdent(e),n=e.reference,u=!!this.opts.project.tryWorkspaceByLocator(e),A=W.isVirtualLocator(e),p=e.peerDependencies.size>0&&!A,h=!p&&!u,E=!p&&e.linkType!=="SOFT",I,v;if(h||E){let te=A?W.devirtualizeLocator(e):e;I=this.customData.store.get(te.locatorHash),typeof I>"u"&&(I=await YIt(r),e.linkType==="HARD"&&this.customData.store.set(te.locatorHash,I)),I.manifest.type==="module"&&(this.isESMLoaderRequired=!0),v=this.opts.project.getDependencyMeta(te,e.version)}let x=h?IQ(e,I,v,{configuration:this.opts.project.configuration}):null,C=E?await this.unplugPackageIfNeeded(e,I,r,v,o):r.packageFs;if(z.isAbsolute(r.prefixPath))throw new Error(`Assertion failed: Expected the prefix path (${r.prefixPath}) to be relative to the parent`);let R=z.resolve(C.getRealPath(),r.prefixPath),N=sG(this.opts.project.cwd,R),U=new Map,V=new Set;if(A){for(let te of e.peerDependencies.values())U.set(W.stringifyIdent(te),null),V.add(W.stringifyIdent(te));if(!u){let te=W.devirtualizeLocator(e);this.virtualTemplates.set(te.locatorHash,{location:sG(this.opts.project.cwd,mi.resolveVirtual(R)),locator:te})}}return _e.getMapWithDefault(this.packageRegistry,a).set(n,{packageLocation:N,packageDependencies:U,packagePeers:V,linkType:e.linkType,discardFromLookup:r.discardFromLookup||!1}),{packageLocation:R,buildRequest:x}}async attachInternalDependencies(e,r){let o=this.getPackageInformation(e);for(let[a,n]of r){let u=W.areIdentsEqual(a,n)?n.reference:[W.stringifyIdent(n),n.reference];o.packageDependencies.set(W.stringifyIdent(a),u)}}async attachExternalDependents(e,r){for(let o of r)this.getDiskInformation(o).packageDependencies.set(W.stringifyIdent(e),e.reference)}async finalizeInstall(){if(this.opts.project.configuration.get("pnpMode")!==this.mode)return;let e=x0(this.opts.project);if(this.isEsmEnabled()||await oe.removePromise(e.esmLoader),this.opts.project.configuration.get("nodeLinker")!=="pnp"){await oe.removePromise(e.cjs),await oe.removePromise(e.data),await oe.removePromise(e.esmLoader),await oe.removePromise(this.opts.project.configuration.get("pnpUnpluggedFolder"));return}for(let{locator:E,location:I}of this.virtualTemplates.values())_e.getMapWithDefault(this.packageRegistry,W.stringifyIdent(E)).set(E.reference,{packageLocation:I,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1});this.packageRegistry.set(null,new Map([[null,this.getPackageInformation(this.opts.project.topLevelWorkspace.anchoredLocator)]]));let r=this.opts.project.configuration.get("pnpFallbackMode"),o=this.opts.project.workspaces.map(({anchoredLocator:E})=>({name:W.stringifyIdent(E),reference:E.reference})),a=r!=="none",n=[],u=new Map,A=_e.buildIgnorePattern([".yarn/sdks/**",...this.opts.project.configuration.get("pnpIgnorePatterns")]),p=this.packageRegistry,h=this.opts.project.configuration.get("pnpShebang");if(r==="dependencies-only")for(let E of this.opts.project.storedPackages.values())this.opts.project.tryWorkspaceByLocator(E)&&n.push({name:W.stringifyIdent(E),reference:E.reference});return await this.asyncActions.wait(),await this.finalizeInstallWithPnp({dependencyTreeRoots:o,enableTopLevelFallback:a,fallbackExclusionList:n,fallbackPool:u,ignorePattern:A,packageRegistry:p,shebang:h}),{customData:this.customData}}async transformPnpSettings(e){}isEsmEnabled(){if(this.opts.project.configuration.sources.has("pnpEnableEsmLoader"))return this.opts.project.configuration.get("pnpEnableEsmLoader");if(this.isESMLoaderRequired)return!0;for(let e of this.opts.project.workspaces)if(e.manifest.type==="module")return!0;return!1}async finalizeInstallWithPnp(e){let r=x0(this.opts.project),o=await this.locateNodeModules(e.ignorePattern);if(o.length>0){this.opts.report.reportWarning(31,"One or more node_modules have been detected and will be removed. This operation may take some time.");for(let n of o)await oe.removePromise(n)}if(await this.transformPnpSettings(e),this.opts.project.configuration.get("pnpEnableInlining")){let n=SIe(e);await oe.changeFilePromise(r.cjs,n,{automaticNewlines:!0,mode:493}),await oe.removePromise(r.data)}else{let{dataFile:n,loaderFile:u}=bIe(e);await oe.changeFilePromise(r.cjs,u,{automaticNewlines:!0,mode:493}),await oe.changeFilePromise(r.data,n,{automaticNewlines:!0,mode:420})}this.isEsmEnabled()&&(this.opts.report.reportWarning(0,"ESM support for PnP uses the experimental loader API and is therefore experimental"),await oe.changeFilePromise(r.esmLoader,(0,rG.default)(),{automaticNewlines:!0,mode:420}));let a=this.opts.project.configuration.get("pnpUnpluggedFolder");if(this.unpluggedPaths.size===0)await oe.removePromise(a);else for(let n of await oe.readdirPromise(a)){let u=z.resolve(a,n);this.unpluggedPaths.has(u)||await oe.removePromise(u)}}async locateNodeModules(e){let r=[],o=e?new RegExp(e):null;for(let a of this.opts.project.workspaces){let n=z.join(a.cwd,"node_modules");if(o&&o.test(z.relative(this.opts.project.cwd,a.cwd))||!oe.existsSync(n))continue;let u=await oe.readdirPromise(n,{withFileTypes:!0}),A=u.filter(p=>!p.isDirectory()||p.name===".bin"||!p.name.startsWith("."));if(A.length===u.length)r.push(n);else for(let p of A)r.push(z.join(n,p.name))}return r}async unplugPackageIfNeeded(e,r,o,a,n){return this.shouldBeUnplugged(e,r,a)?this.unplugPackage(e,o,n):o.packageFs}shouldBeUnplugged(e,r,o){return typeof o.unplugged<"u"?o.unplugged:jIt.has(e.identHash)||e.conditions!=null?!0:r.manifest.preferUnplugged!==null?r.manifest.preferUnplugged:!!(IQ(e,r,o,{configuration:this.opts.project.configuration})?.skipped===!1||r.misc.extractHint)}async unplugPackage(e,r,o){let a=ov(e,{configuration:this.opts.project.configuration});return this.opts.project.disabledLocators.has(e.locatorHash)?new _u(a,{baseFs:r.packageFs,pathUtils:z}):(this.unpluggedPaths.add(a),o.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{let n=z.join(a,r.prefixPath,".ready");await oe.existsPromise(n)||(this.opts.project.storedBuildState.delete(e.locatorHash),await oe.mkdirPromise(a,{recursive:!0}),await oe.copyPromise(a,Bt.dot,{baseFs:r.packageFs,overwrite:!1}),await oe.writeFilePromise(n,""))})),new gn(a))}getPackageInformation(e){let r=W.stringifyIdent(e),o=e.reference,a=this.packageRegistry.get(r);if(!a)throw new Error(`Assertion failed: The package information store should have been available (for ${W.prettyIdent(this.opts.project.configuration,e)})`);let n=a.get(o);if(!n)throw new Error(`Assertion failed: The package information should have been available (for ${W.prettyLocator(this.opts.project.configuration,e)})`);return n}getDiskInformation(e){let r=_e.getMapWithDefault(this.packageRegistry,"@@disk"),o=sG(this.opts.project.cwd,e);return _e.getFactoryWithDefault(r,o,()=>({packageLocation:o,packageDependencies:new Map,packagePeers:new Set,linkType:"SOFT",discardFromLookup:!1}))}};function sG(t,e){let r=z.relative(t,e);return r.match(/^\.{0,2}\//)||(r=`./${r}`),r.replace(/\/?$/,"/")}async function YIt(t){let e=await Ot.tryFind(t.prefixPath,{baseFs:t.packageFs})??new Ot,r=new Set(["preinstall","install","postinstall"]);for(let o of e.scripts.keys())r.has(o)||e.scripts.delete(o);return{manifest:{scripts:e.scripts,preferUnplugged:e.preferUnplugged,type:e.type},misc:{extractHint:nG(t),hasBindingGyp:iG(t)}}}Ye();Ye();qt();var t1e=$e(Zo());var k0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Unplug direct dependencies from the entire project"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Unplug both direct and transitive dependencies"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.patterns=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);if(r.get("nodeLinker")!=="pnp")throw new it("This command can only be used if the `nodeLinker` option is set to `pnp`");await o.restoreInstallState();let u=new Set(this.patterns),A=this.patterns.map(x=>{let C=W.parseDescriptor(x),R=C.range!=="unknown"?C:W.makeDescriptor(C,"*");if(!kr.validRange(R.range))throw new it(`The range of the descriptor patterns must be a valid semver range (${W.prettyDescriptor(r,R)})`);return N=>{let U=W.stringifyIdent(N);return!t1e.default.isMatch(U,W.stringifyIdent(R))||N.version&&!kr.satisfiesWithPrereleases(N.version,R.range)?!1:(u.delete(x),!0)}}),p=()=>{let x=[];for(let C of o.storedPackages.values())!o.tryWorkspaceByLocator(C)&&!W.isVirtualLocator(C)&&A.some(R=>R(C))&&x.push(C);return x},h=x=>{let C=new Set,R=[],N=(U,V)=>{if(C.has(U.locatorHash))return;let te=!!o.tryWorkspaceByLocator(U);if(!(V>0&&!this.recursive&&te)&&(C.add(U.locatorHash),!o.tryWorkspaceByLocator(U)&&A.some(ae=>ae(U))&&R.push(U),!(V>0&&!this.recursive)))for(let ae of U.dependencies.values()){let fe=o.storedResolutions.get(ae.descriptorHash);if(!fe)throw new Error("Assertion failed: The resolution should have been registered");let ue=o.storedPackages.get(fe);if(!ue)throw new Error("Assertion failed: The package should have been registered");N(ue,V+1)}};for(let U of x)N(U.anchoredPackage,0);return R},E,I;if(this.all&&this.recursive?(E=p(),I="the project"):this.all?(E=h(o.workspaces),I="any workspace"):(E=h([a]),I="this workspace"),u.size>1)throw new it(`Patterns ${de.prettyList(r,u,de.Type.CODE)} don't match any packages referenced by ${I}`);if(u.size>0)throw new it(`Pattern ${de.prettyList(r,u,de.Type.CODE)} doesn't match any packages referenced by ${I}`);E=_e.sortMap(E,x=>W.stringifyLocator(x));let v=await Lt.start({configuration:r,stdout:this.context.stdout,json:this.json},async x=>{for(let C of E){let R=C.version??"unknown",N=o.topLevelWorkspace.manifest.ensureDependencyMeta(W.makeDescriptor(C,R));N.unplugged=!0,x.reportInfo(0,`Will unpack ${W.prettyLocator(r,C)} to ${de.pretty(r,ov(C,{configuration:r}),de.Type.PATH)}`),x.reportJson({locator:W.stringifyLocator(C),version:R})}await o.topLevelWorkspace.persistManifest(),this.json||x.reportSeparator()});return v.hasErrors()?v.exitCode():await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};k0.paths=[["unplug"]],k0.usage=nt.Usage({description:"force the unpacking of a list of packages",details:"\n This command will add the selectors matching the specified patterns to the list of packages that must be unplugged when installed.\n\n A package being unplugged means that instead of being referenced directly through its archive, it will be unpacked at install time in the directory configured via `pnpUnpluggedFolder`. Note that unpacking packages this way is generally not recommended because it'll make it harder to store your packages within the repository. However, it's a good approach to quickly and safely debug some packages, and can even sometimes be required depending on the context (for example when the package contains shellscripts).\n\n Running the command will set a persistent flag inside your top-level `package.json`, in the `dependenciesMeta` field. As such, to undo its effects, you'll need to revert the changes made to the manifest and run `yarn install` to apply the modification.\n\n By default, only direct dependencies from the current workspace are affected. If `-A,--all` is set, direct dependencies from the entire project are affected. Using the `-R,--recursive` flag will affect transitive dependencies as well as direct ones.\n\n This command accepts glob patterns inside the scope and name components (not the range). Make sure to escape the patterns to prevent your own shell from trying to expand them.\n ",examples:[["Unplug the lodash dependency from the active workspace","yarn unplug lodash"],["Unplug all instances of lodash referenced by any workspace","yarn unplug lodash -A"],["Unplug all instances of lodash referenced by the active workspace and its dependencies","yarn unplug lodash -R"],["Unplug all instances of lodash, anywhere","yarn unplug lodash -AR"],["Unplug one specific version of lodash","yarn unplug lodash@1.2.3"],["Unplug all packages with the `@babel` scope","yarn unplug '@babel/*'"],["Unplug all packages (only for testing, not recommended)","yarn unplug -R '*'"]]});var x0=t=>({cjs:z.join(t.cwd,dr.pnpCjs),data:z.join(t.cwd,dr.pnpData),esmLoader:z.join(t.cwd,dr.pnpEsmLoader)}),n1e=t=>/\s/.test(t)?JSON.stringify(t):t;async function WIt(t,e,r){let o=/\s*--require\s+\S*\.pnp\.c?js\s*/g,a=/\s*--experimental-loader\s+\S*\.pnp\.loader\.mjs\s*/,n=(e.NODE_OPTIONS??"").replace(o," ").replace(a," ").trim();if(t.configuration.get("nodeLinker")!=="pnp"){e.NODE_OPTIONS=n||void 0;return}let u=x0(t),A=`--require ${n1e(le.fromPortablePath(u.cjs))}`;oe.existsSync(u.esmLoader)&&(A=`${A} --experimental-loader ${(0,r1e.pathToFileURL)(le.fromPortablePath(u.esmLoader)).href}`),oe.existsSync(u.cjs)&&(e.NODE_OPTIONS=n?`${A} ${n}`:A)}async function KIt(t,e){let r=x0(t);e(r.cjs),e(r.data),e(r.esmLoader),e(t.configuration.get("pnpUnpluggedFolder"))}var zIt={hooks:{populateYarnPaths:KIt,setupScriptEnvironment:WIt},configuration:{nodeLinker:{description:'The linker used for installing Node packages, one of: "pnp", "pnpm", or "node-modules"',type:"STRING",default:"pnp"},winLinkType:{description:"Whether Yarn should use Windows Junctions or symlinks when creating links on Windows.",type:"STRING",values:["junctions","symlinks"],default:"junctions"},pnpMode:{description:"If 'strict', generates standard PnP maps. If 'loose', merges them with the n_m resolution.",type:"STRING",default:"strict"},pnpShebang:{description:"String to prepend to the generated PnP script",type:"STRING",default:"#!/usr/bin/env node"},pnpIgnorePatterns:{description:"Array of glob patterns; files matching them will use the classic resolution",type:"STRING",default:[],isArray:!0},pnpEnableEsmLoader:{description:"If true, Yarn will generate an ESM loader (`.pnp.loader.mjs`). If this is not explicitly set Yarn tries to automatically detect whether ESM support is required.",type:"BOOLEAN",default:!1},pnpEnableInlining:{description:"If true, the PnP data will be inlined along with the generated loader",type:"BOOLEAN",default:!0},pnpFallbackMode:{description:"If true, the generated PnP loader will follow the top-level fallback rule",type:"STRING",default:"dependencies-only"},pnpUnpluggedFolder:{description:"Folder where the unplugged packages must be stored",type:"ABSOLUTE_PATH",default:"./.yarn/unplugged"}},linkers:[b0],commands:[k0]},VIt=zIt;var A1e=$e(l1e());qt();var pG=$e(ve("crypto")),f1e=$e(ve("fs")),p1e=1,Pi="node_modules",BQ=".bin",h1e=".yarn-state.yml",f1t=1e3,hG=(o=>(o.CLASSIC="classic",o.HARDLINKS_LOCAL="hardlinks-local",o.HARDLINKS_GLOBAL="hardlinks-global",o))(hG||{}),lv=class{constructor(){this.installStateCache=new Map}getCustomDataKey(){return JSON.stringify({name:"NodeModulesLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the node-modules linker to be enabled");let o=r.project.tryWorkspaceByLocator(e);if(o)return o.cwd;let a=await _e.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await fG(r.project,{unrollAliases:!0}));if(a===null)throw new it("Couldn't find the node_modules state file - running an install might help (findPackageLocation)");let n=a.locatorMap.get(W.stringifyLocator(e));if(!n){let p=new it(`Couldn't find ${W.prettyLocator(r.project.configuration,e)} in the currently installed node_modules map - running an install might help`);throw p.code="LOCATOR_NOT_INSTALLED",p}let u=n.locations.sort((p,h)=>p.split(z.sep).length-h.split(z.sep).length),A=z.join(r.project.configuration.startingCwd,Pi);return u.find(p=>z.contains(A,p))||n.locations[0]}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let o=await _e.getFactoryWithDefault(this.installStateCache,r.project.cwd,async()=>await fG(r.project,{unrollAliases:!0}));if(o===null)return null;let{locationRoot:a,segments:n}=vQ(z.resolve(e),{skipPrefix:r.project.cwd}),u=o.locationTree.get(a);if(!u)return null;let A=u.locator;for(let p of n){if(u=u.children.get(p),!u)break;A=u.locator||A}return W.parseLocator(A)}makeInstaller(e){return new AG(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="node-modules"}},AG=class{constructor(e){this.opts=e;this.localStore=new Map;this.realLocatorChecksums=new Map;this.customData={store:new Map}}attachCustomData(e){this.customData=e}async installPackage(e,r){let o=z.resolve(r.packageFs.getRealPath(),r.prefixPath),a=this.customData.store.get(e.locatorHash);if(typeof a>"u"&&(a=await p1t(e,r),e.linkType==="HARD"&&this.customData.store.set(e.locatorHash,a)),!W.isPackageCompatible(e,this.opts.project.configuration.getSupportedArchitectures()))return{packageLocation:null,buildRequest:null};let n=new Map,u=new Set;n.has(W.stringifyIdent(e))||n.set(W.stringifyIdent(e),e.reference);let A=e;if(W.isVirtualLocator(e)){A=W.devirtualizeLocator(e);for(let E of e.peerDependencies.values())n.set(W.stringifyIdent(E),null),u.add(W.stringifyIdent(E))}let p={packageLocation:`${le.fromPortablePath(o)}/`,packageDependencies:n,packagePeers:u,linkType:e.linkType,discardFromLookup:r.discardFromLookup??!1};this.localStore.set(e.locatorHash,{pkg:e,customPackageData:a,dependencyMeta:this.opts.project.getDependencyMeta(e,e.version),pnpNode:p});let h=r.checksum?r.checksum.substring(r.checksum.indexOf("/")+1):null;return this.realLocatorChecksums.set(A.locatorHash,h),{packageLocation:o,buildRequest:null}}async attachInternalDependencies(e,r){let o=this.localStore.get(e.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected information object to have been registered");for(let[a,n]of r){let u=W.areIdentsEqual(a,n)?n.reference:[W.stringifyIdent(n),n.reference];o.pnpNode.packageDependencies.set(W.stringifyIdent(a),u)}}async attachExternalDependents(e,r){throw new Error("External dependencies haven't been implemented for the node-modules linker")}async finalizeInstall(){if(this.opts.project.configuration.get("nodeLinker")!=="node-modules")return;let e=new mi({baseFs:new Jl({maxOpenFiles:80,readOnlyArchives:!0})}),r=await fG(this.opts.project),o=this.opts.project.configuration.get("nmMode");(r===null||o!==r.nmMode)&&(this.opts.project.storedBuildState.clear(),r={locatorMap:new Map,binSymlinks:new Map,locationTree:new Map,nmMode:o,mtimeMs:0});let a=new Map(this.opts.project.workspaces.map(v=>{let x=this.opts.project.configuration.get("nmHoistingLimits");try{x=_e.validateEnum(VB,v.manifest.installConfig?.hoistingLimits??x)}catch{let R=W.prettyWorkspace(this.opts.project.configuration,v);this.opts.report.reportWarning(57,`${R}: Invalid 'installConfig.hoistingLimits' value. Expected one of ${Object.values(VB).join(", ")}, using default: "${x}"`)}return[v.relativeCwd,x]})),n=new Map(this.opts.project.workspaces.map(v=>{let x=this.opts.project.configuration.get("nmSelfReferences");return x=v.manifest.installConfig?.selfReferences??x,[v.relativeCwd,x]})),u={VERSIONS:{std:1},topLevel:{name:null,reference:null},getLocator:(v,x)=>Array.isArray(x)?{name:x[0],reference:x[1]}:{name:v,reference:x},getDependencyTreeRoots:()=>this.opts.project.workspaces.map(v=>{let x=v.anchoredLocator;return{name:W.stringifyIdent(x),reference:x.reference}}),getPackageInformation:v=>{let x=v.reference===null?this.opts.project.topLevelWorkspace.anchoredLocator:W.makeLocator(W.parseIdent(v.name),v.reference),C=this.localStore.get(x.locatorHash);if(typeof C>"u")throw new Error("Assertion failed: Expected the package reference to have been registered");return C.pnpNode},findPackageLocator:v=>{let x=this.opts.project.tryWorkspaceByCwd(le.toPortablePath(v));if(x!==null){let C=x.anchoredLocator;return{name:W.stringifyIdent(C),reference:C.reference}}throw new Error("Assertion failed: Unimplemented")},resolveToUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveUnqualified:()=>{throw new Error("Assertion failed: Unimplemented")},resolveRequest:()=>{throw new Error("Assertion failed: Unimplemented")},resolveVirtual:v=>le.fromPortablePath(mi.resolveVirtual(le.toPortablePath(v)))},{tree:A,errors:p,preserveSymlinksRequired:h}=JB(u,{pnpifyFs:!1,validateExternalSoftLinks:!0,hoistingLimitsByCwd:a,project:this.opts.project,selfReferencesByCwd:n});if(!A){for(let{messageName:v,text:x}of p)this.opts.report.reportError(v,x);return}let E=Hq(A);await E1t(r,E,{baseFs:e,project:this.opts.project,report:this.opts.report,realLocatorChecksums:this.realLocatorChecksums,loadManifest:async v=>{let x=W.parseLocator(v),C=this.localStore.get(x.locatorHash);if(typeof C>"u")throw new Error("Assertion failed: Expected the slot to exist");return C.customPackageData.manifest}});let I=[];for(let[v,x]of E.entries()){if(y1e(v))continue;let C=W.parseLocator(v),R=this.localStore.get(C.locatorHash);if(typeof R>"u")throw new Error("Assertion failed: Expected the slot to exist");if(this.opts.project.tryWorkspaceByLocator(R.pkg))continue;let N=yA.extractBuildRequest(R.pkg,R.customPackageData,R.dependencyMeta,{configuration:this.opts.project.configuration});!N||I.push({buildLocations:x.locations,locator:C,buildRequest:N})}return h&&this.opts.report.reportWarning(72,`The application uses portals and that's why ${de.pretty(this.opts.project.configuration,"--preserve-symlinks",de.Type.CODE)} Node option is required for launching it`),{customData:this.customData,records:I}}};async function p1t(t,e){let r=await Ot.tryFind(e.prefixPath,{baseFs:e.packageFs})??new Ot,o=new Set(["preinstall","install","postinstall"]);for(let a of r.scripts.keys())o.has(a)||r.scripts.delete(a);return{manifest:{bin:r.bin,scripts:r.scripts},misc:{hasBindingGyp:yA.hasBindingGyp(e)}}}async function h1t(t,e,r,o,{installChangedByUser:a}){let n="";n+=`# Warning: This file is automatically generated. Removing it is fine, but will `,n+=`# cause your node_modules installation to become invalidated. `,n+=` `,n+=`__metadata: `,n+=` version: ${p1e} `,n+=` nmMode: ${o.value} `;let u=Array.from(e.keys()).sort(),A=W.stringifyLocator(t.topLevelWorkspace.anchoredLocator);for(let E of u){let I=e.get(E);n+=` `,n+=`${JSON.stringify(E)}: `,n+=` locations: `;for(let v of I.locations){let x=z.contains(t.cwd,v);if(x===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` - ${JSON.stringify(x)} `}if(I.aliases.length>0){n+=` aliases: `;for(let v of I.aliases)n+=` - ${JSON.stringify(v)} `}if(E===A&&r.size>0){n+=` bin: `;for(let[v,x]of r){let C=z.contains(t.cwd,v);if(C===null)throw new Error(`Assertion failed: Expected the path to be within the project (${v})`);n+=` ${JSON.stringify(C)}: `;for(let[R,N]of x){let U=z.relative(z.join(v,Pi),N);n+=` ${JSON.stringify(R)}: ${JSON.stringify(U)} `}}}}let p=t.cwd,h=z.join(p,Pi,h1e);a&&await oe.removePromise(h),await oe.changeFilePromise(h,n,{automaticNewlines:!0})}async function fG(t,{unrollAliases:e=!1}={}){let r=t.cwd,o=z.join(r,Pi,h1e),a;try{a=await oe.statPromise(o)}catch{}if(!a)return null;let n=Ki(await oe.readFilePromise(o,"utf8"));if(n.__metadata.version>p1e)return null;let u=n.__metadata.nmMode||"classic",A=new Map,p=new Map;delete n.__metadata;for(let[h,E]of Object.entries(n)){let I=E.locations.map(x=>z.join(r,x)),v=E.bin;if(v)for(let[x,C]of Object.entries(v)){let R=z.join(r,le.toPortablePath(x)),N=_e.getMapWithDefault(p,R);for(let[U,V]of Object.entries(C))N.set(U,le.toPortablePath([R,Pi,V].join(z.sep)))}if(A.set(h,{target:Bt.dot,linkType:"HARD",locations:I,aliases:E.aliases||[]}),e&&E.aliases)for(let x of E.aliases){let{scope:C,name:R}=W.parseLocator(h),N=W.makeLocator(W.makeIdent(C,R),x),U=W.stringifyLocator(N);A.set(U,{target:Bt.dot,linkType:"HARD",locations:I,aliases:[]})}}return{locatorMap:A,binSymlinks:p,locationTree:g1e(A,{skipPrefix:t.cwd}),nmMode:u,mtimeMs:a.mtimeMs}}var WC=async(t,e)=>{if(t.split(z.sep).indexOf(Pi)<0)throw new Error(`Assertion failed: trying to remove dir that doesn't contain node_modules: ${t}`);try{if(!e.innerLoop){let o=e.allowSymlink?await oe.statPromise(t):await oe.lstatPromise(t);if(e.allowSymlink&&!o.isDirectory()||!e.allowSymlink&&o.isSymbolicLink()){await oe.unlinkPromise(t);return}}let r=await oe.readdirPromise(t,{withFileTypes:!0});for(let o of r){let a=z.join(t,o.name);o.isDirectory()?(o.name!==Pi||e&&e.innerLoop)&&await WC(a,{innerLoop:!0,contentsOnly:!1}):await oe.unlinkPromise(a)}e.contentsOnly||await oe.rmdirPromise(t)}catch(r){if(r.code!=="ENOENT"&&r.code!=="ENOTEMPTY")throw r}},c1e=4,vQ=(t,{skipPrefix:e})=>{let r=z.contains(e,t);if(r===null)throw new Error(`Assertion failed: Writing attempt prevented to ${t} which is outside project root: ${e}`);let o=r.split(z.sep).filter(p=>p!==""),a=o.indexOf(Pi),n=o.slice(0,a).join(z.sep),u=z.join(e,n),A=o.slice(a);return{locationRoot:u,segments:A}},g1e=(t,{skipPrefix:e})=>{let r=new Map;if(t===null)return r;let o=()=>({children:new Map,linkType:"HARD"});for(let[a,n]of t.entries()){if(n.linkType==="SOFT"&&z.contains(e,n.target)!==null){let A=_e.getFactoryWithDefault(r,n.target,o);A.locator=a,A.linkType=n.linkType}for(let u of n.locations){let{locationRoot:A,segments:p}=vQ(u,{skipPrefix:e}),h=_e.getFactoryWithDefault(r,A,o);for(let E=0;E{if(process.platform==="win32"&&r==="junctions"){let o;try{o=await oe.lstatPromise(t)}catch{}if(!o||o.isDirectory()){await oe.symlinkPromise(t,e,"junction");return}}await oe.symlinkPromise(z.relative(z.dirname(e),t),e)};async function d1e(t,e,r){let o=z.join(t,`${pG.default.randomBytes(16).toString("hex")}.tmp`);try{await oe.writeFilePromise(o,r);try{await oe.linkPromise(o,e)}catch{}}finally{await oe.unlinkPromise(o)}}async function g1t({srcPath:t,dstPath:e,entry:r,globalHardlinksStore:o,baseFs:a,nmMode:n}){if(r.kind===m1e.FILE){if(n.value==="hardlinks-global"&&o&&r.digest){let A=z.join(o,r.digest.substring(0,2),`${r.digest.substring(2)}.dat`),p;try{let h=await oe.statPromise(A);if(h&&(!r.mtimeMs||h.mtimeMs>r.mtimeMs||h.mtimeMs(o.FILE="file",o.DIRECTORY="directory",o.SYMLINK="symlink",o))(m1e||{}),d1t=async(t,e,{baseFs:r,globalHardlinksStore:o,nmMode:a,windowsLinkType:n,packageChecksum:u})=>{await oe.mkdirPromise(t,{recursive:!0});let A=async(E=Bt.dot)=>{let I=z.join(e,E),v=await r.readdirPromise(I,{withFileTypes:!0}),x=new Map;for(let C of v){let R=z.join(E,C.name),N,U=z.join(I,C.name);if(C.isFile()){if(N={kind:"file",mode:(await r.lstatPromise(U)).mode},a.value==="hardlinks-global"){let V=await wn.checksumFile(U,{baseFs:r,algorithm:"sha1"});N.digest=V}}else if(C.isDirectory())N={kind:"directory"};else if(C.isSymbolicLink())N={kind:"symlink",symlinkTo:await r.readlinkPromise(U)};else throw new Error(`Unsupported file type (file: ${U}, mode: 0o${await r.statSync(U).mode.toString(8).padStart(6,"0")})`);if(x.set(R,N),C.isDirectory()&&R!==Pi){let V=await A(R);for(let[te,ae]of V)x.set(te,ae)}}return x},p;if(a.value==="hardlinks-global"&&o&&u){let E=z.join(o,u.substring(0,2),`${u.substring(2)}.json`);try{p=new Map(Object.entries(JSON.parse(await oe.readFilePromise(E,"utf8"))))}catch{p=await A()}}else p=await A();let h=!1;for(let[E,I]of p){let v=z.join(e,E),x=z.join(t,E);if(I.kind==="directory")await oe.mkdirPromise(x,{recursive:!0});else if(I.kind==="file"){let C=I.mtimeMs;await g1t({srcPath:v,dstPath:x,entry:I,nmMode:a,baseFs:r,globalHardlinksStore:o}),I.mtimeMs!==C&&(h=!0)}else I.kind==="symlink"&&await gG(z.resolve(z.dirname(x),I.symlinkTo),x,n)}if(a.value==="hardlinks-global"&&o&&h&&u){let E=z.join(o,u.substring(0,2),`${u.substring(2)}.json`);await oe.removePromise(E),await d1e(o,E,Buffer.from(JSON.stringify(Object.fromEntries(p))))}};function m1t(t,e,r,o){let a=new Map,n=new Map,u=new Map,A=!1,p=(h,E,I,v,x)=>{let C=!0,R=z.join(h,E),N=new Set;if(E===Pi||E.startsWith("@")){let V;try{V=oe.statSync(R)}catch{}C=!!V,V?V.mtimeMs>r?(A=!0,N=new Set(oe.readdirSync(R))):N=new Set(I.children.get(E).children.keys()):A=!0;let te=e.get(h);if(te){let ae=z.join(h,Pi,BQ),fe;try{fe=oe.statSync(ae)}catch{}if(!fe)A=!0;else if(fe.mtimeMs>r){A=!0;let ue=new Set(oe.readdirSync(ae)),me=new Map;n.set(h,me);for(let[he,Be]of te)ue.has(he)&&me.set(he,Be)}else n.set(h,te)}}else C=x.has(E);let U=I.children.get(E);if(C){let{linkType:V,locator:te}=U,ae={children:new Map,linkType:V,locator:te};if(v.children.set(E,ae),te){let fe=_e.getSetWithDefault(u,te);fe.add(R),u.set(te,fe)}for(let fe of U.children.keys())p(R,fe,U,ae,N)}else U.locator&&o.storedBuildState.delete(W.parseLocator(U.locator).locatorHash)};for(let[h,E]of t){let{linkType:I,locator:v}=E,x={children:new Map,linkType:I,locator:v};if(a.set(h,x),v){let C=_e.getSetWithDefault(u,E.locator);C.add(h),u.set(E.locator,C)}E.children.has(Pi)&&p(h,Pi,E,x,new Set)}return{locationTree:a,binSymlinks:n,locatorLocations:u,installChangedByUser:A}}function y1e(t){let e=W.parseDescriptor(t);return W.isVirtualDescriptor(e)&&(e=W.devirtualizeDescriptor(e)),e.range.startsWith("link:")}async function y1t(t,e,r,{loadManifest:o}){let a=new Map;for(let[A,{locations:p}]of t){let h=y1e(A)?null:await o(A,p[0]),E=new Map;if(h)for(let[I,v]of h.bin){let x=z.join(p[0],v);v!==""&&oe.existsSync(x)&&E.set(I,v)}a.set(A,E)}let n=new Map,u=(A,p,h)=>{let E=new Map,I=z.contains(r,A);if(h.locator&&I!==null){let v=a.get(h.locator);for(let[x,C]of v){let R=z.join(A,le.toPortablePath(C));E.set(x,R)}for(let[x,C]of h.children){let R=z.join(A,x),N=u(R,R,C);N.size>0&&n.set(A,new Map([...n.get(A)||new Map,...N]))}}else for(let[v,x]of h.children){let C=u(z.join(A,v),p,x);for(let[R,N]of C)E.set(R,N)}return E};for(let[A,p]of e){let h=u(A,A,p);h.size>0&&n.set(A,new Map([...n.get(A)||new Map,...h]))}return n}var u1e=(t,e)=>{if(!t||!e)return t===e;let r=W.parseLocator(t);W.isVirtualLocator(r)&&(r=W.devirtualizeLocator(r));let o=W.parseLocator(e);return W.isVirtualLocator(o)&&(o=W.devirtualizeLocator(o)),W.areLocatorsEqual(r,o)};function dG(t){return z.join(t.get("globalFolder"),"store")}async function E1t(t,e,{baseFs:r,project:o,report:a,loadManifest:n,realLocatorChecksums:u}){let A=z.join(o.cwd,Pi),{locationTree:p,binSymlinks:h,locatorLocations:E,installChangedByUser:I}=m1t(t.locationTree,t.binSymlinks,t.mtimeMs,o),v=g1e(e,{skipPrefix:o.cwd}),x=[],C=async({srcDir:Be,dstDir:we,linkType:g,globalHardlinksStore:Ee,nmMode:Pe,windowsLinkType:ce,packageChecksum:ne})=>{let ee=(async()=>{try{g==="SOFT"?(await oe.mkdirPromise(z.dirname(we),{recursive:!0}),await gG(z.resolve(Be),we,ce)):await d1t(we,Be,{baseFs:r,globalHardlinksStore:Ee,nmMode:Pe,windowsLinkType:ce,packageChecksum:ne})}catch(Ie){throw Ie.message=`While persisting ${Be} -> ${we} ${Ie.message}`,Ie}finally{ae.tick()}})().then(()=>x.splice(x.indexOf(ee),1));x.push(ee),x.length>c1e&&await Promise.race(x)},R=async(Be,we,g)=>{let Ee=(async()=>{let Pe=async(ce,ne,ee)=>{try{ee.innerLoop||await oe.mkdirPromise(ne,{recursive:!0});let Ie=await oe.readdirPromise(ce,{withFileTypes:!0});for(let Fe of Ie){if(!ee.innerLoop&&Fe.name===BQ)continue;let At=z.join(ce,Fe.name),H=z.join(ne,Fe.name);Fe.isDirectory()?(Fe.name!==Pi||ee&&ee.innerLoop)&&(await oe.mkdirPromise(H,{recursive:!0}),await Pe(At,H,{...ee,innerLoop:!0})):me.value==="hardlinks-local"||me.value==="hardlinks-global"?await oe.linkPromise(At,H):await oe.copyFilePromise(At,H,f1e.default.constants.COPYFILE_FICLONE)}}catch(Ie){throw ee.innerLoop||(Ie.message=`While cloning ${ce} -> ${ne} ${Ie.message}`),Ie}finally{ee.innerLoop||ae.tick()}};await Pe(Be,we,g)})().then(()=>x.splice(x.indexOf(Ee),1));x.push(Ee),x.length>c1e&&await Promise.race(x)},N=async(Be,we,g)=>{if(g)for(let[Ee,Pe]of we.children){let ce=g.children.get(Ee);await N(z.join(Be,Ee),Pe,ce)}else{we.children.has(Pi)&&await WC(z.join(Be,Pi),{contentsOnly:!1});let Ee=z.basename(Be)===Pi&&v.has(z.join(z.dirname(Be),z.sep));await WC(Be,{contentsOnly:Be===A,allowSymlink:Ee})}};for(let[Be,we]of p){let g=v.get(Be);for(let[Ee,Pe]of we.children){if(Ee===".")continue;let ce=g&&g.children.get(Ee),ne=z.join(Be,Ee);await N(ne,Pe,ce)}}let U=async(Be,we,g)=>{if(g){u1e(we.locator,g.locator)||await WC(Be,{contentsOnly:we.linkType==="HARD"});for(let[Ee,Pe]of we.children){let ce=g.children.get(Ee);await U(z.join(Be,Ee),Pe,ce)}}else{we.children.has(Pi)&&await WC(z.join(Be,Pi),{contentsOnly:!0});let Ee=z.basename(Be)===Pi&&v.has(z.join(z.dirname(Be),z.sep));await WC(Be,{contentsOnly:we.linkType==="HARD",allowSymlink:Ee})}};for(let[Be,we]of v){let g=p.get(Be);for(let[Ee,Pe]of we.children){if(Ee===".")continue;let ce=g&&g.children.get(Ee);await U(z.join(Be,Ee),Pe,ce)}}let V=new Map,te=[];for(let[Be,we]of E)for(let g of we){let{locationRoot:Ee,segments:Pe}=vQ(g,{skipPrefix:o.cwd}),ce=v.get(Ee),ne=Ee;if(ce){for(let ee of Pe)if(ne=z.join(ne,ee),ce=ce.children.get(ee),!ce)break;if(ce){let ee=u1e(ce.locator,Be),Ie=e.get(ce.locator),Fe=Ie.target,At=ne,H=Ie.linkType;if(ee)V.has(Fe)||V.set(Fe,At);else if(Fe!==At){let at=W.parseLocator(ce.locator);W.isVirtualLocator(at)&&(at=W.devirtualizeLocator(at)),te.push({srcDir:Fe,dstDir:At,linkType:H,realLocatorHash:at.locatorHash})}}}}for(let[Be,{locations:we}]of e.entries())for(let g of we){let{locationRoot:Ee,segments:Pe}=vQ(g,{skipPrefix:o.cwd}),ce=p.get(Ee),ne=v.get(Ee),ee=Ee,Ie=e.get(Be),Fe=W.parseLocator(Be);W.isVirtualLocator(Fe)&&(Fe=W.devirtualizeLocator(Fe));let At=Fe.locatorHash,H=Ie.target,at=g;if(H===at)continue;let Re=Ie.linkType;for(let ke of Pe)ne=ne.children.get(ke);if(!ce)te.push({srcDir:H,dstDir:at,linkType:Re,realLocatorHash:At});else for(let ke of Pe)if(ee=z.join(ee,ke),ce=ce.children.get(ke),!ce){te.push({srcDir:H,dstDir:at,linkType:Re,realLocatorHash:At});break}}let ae=Xs.progressViaCounter(te.length),fe=a.reportProgress(ae),ue=o.configuration.get("nmMode"),me={value:ue},he=o.configuration.get("winLinkType");try{let Be=me.value==="hardlinks-global"?`${dG(o.configuration)}/v1`:null;if(Be&&!await oe.existsPromise(Be)){await oe.mkdirpPromise(Be);for(let g=0;g<256;g++)await oe.mkdirPromise(z.join(Be,g.toString(16).padStart(2,"0")))}for(let g of te)(g.linkType==="SOFT"||!V.has(g.srcDir))&&(V.set(g.srcDir,g.dstDir),await C({...g,globalHardlinksStore:Be,nmMode:me,windowsLinkType:he,packageChecksum:u.get(g.realLocatorHash)||null}));await Promise.all(x),x.length=0;for(let g of te){let Ee=V.get(g.srcDir);g.linkType!=="SOFT"&&g.dstDir!==Ee&&await R(Ee,g.dstDir,{nmMode:me})}await Promise.all(x),await oe.mkdirPromise(A,{recursive:!0});let we=await y1t(e,v,o.cwd,{loadManifest:n});await C1t(h,we,o.cwd,he),await h1t(o,e,we,me,{installChangedByUser:I}),ue=="hardlinks-global"&&me.value=="hardlinks-local"&&a.reportWarningOnce(74,"'nmMode' has been downgraded to 'hardlinks-local' due to global cache and install folder being on different devices")}finally{fe.stop()}}async function C1t(t,e,r,o){for(let a of t.keys()){if(z.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);if(!e.has(a)){let n=z.join(a,Pi,BQ);await oe.removePromise(n)}}for(let[a,n]of e){if(z.contains(r,a)===null)throw new Error(`Assertion failed. Excepted bin symlink location to be inside project dir, instead it was at ${a}`);let u=z.join(a,Pi,BQ),A=t.get(a)||new Map;await oe.mkdirPromise(u,{recursive:!0});for(let p of A.keys())n.has(p)||(await oe.removePromise(z.join(u,p)),process.platform==="win32"&&await oe.removePromise(z.join(u,`${p}.cmd`)));for(let[p,h]of n){let E=A.get(p),I=z.join(u,p);E!==h&&(process.platform==="win32"?await(0,A1e.default)(le.fromPortablePath(h),le.fromPortablePath(I),{createPwshFile:!1}):(await oe.removePromise(I),await gG(h,I,o),z.contains(r,await oe.realpathPromise(h))!==null&&await oe.chmodPromise(h,493)))}}}Ye();Pt();iA();var cv=class extends b0{constructor(){super(...arguments);this.mode="loose"}makeInstaller(r){return new mG(r)}},mG=class extends mm{constructor(){super(...arguments);this.mode="loose"}async transformPnpSettings(r){let o=new mi({baseFs:new Jl({maxOpenFiles:80,readOnlyArchives:!0})}),a=XIe(r,this.opts.project.cwd,o),{tree:n,errors:u}=JB(a,{pnpifyFs:!1,project:this.opts.project});if(!n){for(let{messageName:I,text:v}of u)this.opts.report.reportError(I,v);return}let A=new Map;r.fallbackPool=A;let p=(I,v)=>{let x=W.parseLocator(v.locator),C=W.stringifyIdent(x);C===I?A.set(I,x.reference):A.set(I,[C,x.reference])},h=z.join(this.opts.project.cwd,dr.nodeModules),E=n.get(h);if(!(typeof E>"u")){if("target"in E)throw new Error("Assertion failed: Expected the root junction point to be a directory");for(let I of E.dirList){let v=z.join(h,I),x=n.get(v);if(typeof x>"u")throw new Error("Assertion failed: Expected the child to have been registered");if("target"in x)p(I,x);else for(let C of x.dirList){let R=z.join(v,C),N=n.get(R);if(typeof N>"u")throw new Error("Assertion failed: Expected the subchild to have been registered");if("target"in N)p(`${I}/${C}`,N);else throw new Error("Assertion failed: Expected the leaf junction to be a package")}}}}};var w1t={hooks:{cleanGlobalArtifacts:async t=>{let e=dG(t);await oe.removePromise(e)}},configuration:{nmHoistingLimits:{description:"Prevents packages to be hoisted past specific levels",type:"STRING",values:["workspaces","dependencies","none"],default:"none"},nmMode:{description:"Defines in which measure Yarn must use hardlinks and symlinks when generated `node_modules` directories.",type:"STRING",values:["classic","hardlinks-local","hardlinks-global"],default:"classic"},nmSelfReferences:{description:"Defines whether the linker should generate self-referencing symlinks for workspaces.",type:"BOOLEAN",default:!0}},linkers:[lv,cv]},I1t=w1t;var dj={};zt(dj,{NpmHttpFetcher:()=>fv,NpmRemapResolver:()=>pv,NpmSemverFetcher:()=>ml,NpmSemverResolver:()=>hv,NpmTagResolver:()=>gv,default:()=>Ovt,npmConfigUtils:()=>$n,npmHttpUtils:()=>Zr,npmPublishUtils:()=>ow});Ye();var P1e=$e(Jn());var Wn="npm:";var Zr={};zt(Zr,{AuthType:()=>B1e,customPackageError:()=>ym,del:()=>T1t,get:()=>Em,getIdentUrl:()=>DQ,getPackageMetadata:()=>VC,handleInvalidAuthenticationError:()=>Q0,post:()=>F1t,put:()=>R1t});Ye();Ye();Pt();var wG=$e(f2()),w1e=$e(D_()),I1e=$e(Jn());var $n={};zt($n,{RegistryType:()=>E1e,getAuditRegistry:()=>B1t,getAuthConfiguration:()=>CG,getDefaultRegistry:()=>uv,getPublishRegistry:()=>v1t,getRegistryConfiguration:()=>C1e,getScopeConfiguration:()=>EG,getScopeRegistry:()=>KC,normalizeRegistry:()=>ac});var E1e=(o=>(o.AUDIT_REGISTRY="npmAuditRegistry",o.FETCH_REGISTRY="npmRegistryServer",o.PUBLISH_REGISTRY="npmPublishRegistry",o))(E1e||{});function ac(t){return t.replace(/\/$/,"")}function B1t({configuration:t}){return uv({configuration:t,type:"npmAuditRegistry"})}function v1t(t,{configuration:e}){return t.publishConfig?.registry?ac(t.publishConfig.registry):t.name?KC(t.name.scope,{configuration:e,type:"npmPublishRegistry"}):uv({configuration:e,type:"npmPublishRegistry"})}function KC(t,{configuration:e,type:r="npmRegistryServer"}){let o=EG(t,{configuration:e});if(o===null)return uv({configuration:e,type:r});let a=o.get(r);return a===null?uv({configuration:e,type:r}):ac(a)}function uv({configuration:t,type:e="npmRegistryServer"}){let r=t.get(e);return ac(r!==null?r:t.get("npmRegistryServer"))}function C1e(t,{configuration:e}){let r=e.get("npmRegistries"),o=ac(t),a=r.get(o);if(typeof a<"u")return a;let n=r.get(o.replace(/^[a-z]+:/,""));return typeof n<"u"?n:null}function EG(t,{configuration:e}){if(t===null)return null;let o=e.get("npmScopes").get(t);return o||null}function CG(t,{configuration:e,ident:r}){let o=r&&EG(r.scope,{configuration:e});return o?.get("npmAuthIdent")||o?.get("npmAuthToken")?o:C1e(t,{configuration:e})||e}var B1e=(a=>(a[a.NO_AUTH=0]="NO_AUTH",a[a.BEST_EFFORT=1]="BEST_EFFORT",a[a.CONFIGURATION=2]="CONFIGURATION",a[a.ALWAYS_AUTH=3]="ALWAYS_AUTH",a))(B1e||{});async function Q0(t,{attemptedAs:e,registry:r,headers:o,configuration:a}){if(SQ(t))throw new Jt(41,"Invalid OTP token");if(t.originalError?.name==="HTTPError"&&t.originalError?.response.statusCode===401)throw new Jt(41,`Invalid authentication (${typeof e!="string"?`as ${await N1t(r,o,{configuration:a})}`:`attempted as ${e}`})`)}function ym(t,e){let r=t.response?.statusCode;return r?r===404?"Package not found":r>=500&&r<600?`The registry appears to be down (using a ${de.applyHyperlink(e,"local cache","https://yarnpkg.com/advanced/lexicon#local-cache")} might have protected you against such outages)`:null:null}function DQ(t){return t.scope?`/@${t.scope}%2f${t.name}`:`/${t.name}`}var v1e=new Map,D1t=new Map;async function P1t(t){return await _e.getFactoryWithDefault(v1e,t,async()=>{let e=null;try{e=await oe.readJsonPromise(t)}catch{}return e})}async function S1t(t,e,{configuration:r,cached:o,registry:a,headers:n,version:u,...A}){return await _e.getFactoryWithDefault(D1t,t,async()=>await Em(DQ(e),{...A,customErrorMessage:ym,configuration:r,registry:a,ident:e,headers:{...n,["If-None-Match"]:o?.etag,["If-Modified-Since"]:o?.lastModified},wrapNetworkRequest:async p=>async()=>{let h=await p();if(h.statusCode===304){if(o===null)throw new Error("Assertion failed: cachedMetadata should not be null");return{...h,body:o.metadata}}let E=b1t(JSON.parse(h.body.toString())),I={metadata:E,etag:h.headers.etag,lastModified:h.headers["last-modified"]};return v1e.set(t,Promise.resolve(I)),Promise.resolve().then(async()=>{let v=`${t}-${process.pid}.tmp`;await oe.mkdirPromise(z.dirname(v),{recursive:!0}),await oe.writeJsonPromise(v,I,{compact:!0}),await oe.renamePromise(v,t)}).catch(()=>{}),{...h,body:E}}}))}async function VC(t,{cache:e,project:r,registry:o,headers:a,version:n,...u}){let{configuration:A}=r;o=Av(A,{ident:t,registry:o});let p=k1t(A,o),h=z.join(p,`${W.slugifyIdent(t)}.json`),E=null;if(!r.lockfileNeedsRefresh&&(E=await P1t(h),E)){if(typeof n<"u"&&typeof E.metadata.versions[n]<"u")return E.metadata;if(A.get("enableOfflineMode")){let I=structuredClone(E.metadata),v=new Set;if(e){for(let C of Object.keys(I.versions)){let R=W.makeLocator(t,`npm:${C}`),N=e.getLocatorMirrorPath(R);(!N||!oe.existsSync(N))&&(delete I.versions[C],v.add(C))}let x=I["dist-tags"].latest;if(v.has(x)){let C=Object.keys(E.metadata.versions).sort(I1e.default.compare),R=C.indexOf(x);for(;v.has(C[R])&&R>=0;)R-=1;R>=0?I["dist-tags"].latest=C[R]:delete I["dist-tags"].latest}}return I}}return await S1t(h,t,{...u,configuration:A,cached:E,registry:o,headers:a,version:n})}var D1e=["name","dist.tarball","bin","scripts","os","cpu","libc","dependencies","dependenciesMeta","optionalDependencies","peerDependencies","peerDependenciesMeta","deprecated"];function b1t(t){return{"dist-tags":t["dist-tags"],versions:Object.fromEntries(Object.entries(t.versions).map(([e,r])=>[e,(0,w1e.default)(r,D1e)]))}}var x1t=wn.makeHash(...D1e).slice(0,6);function k1t(t,e){let r=Q1t(t),o=new URL(e);return z.join(r,x1t,o.hostname)}function Q1t(t){return z.join(t.get("globalFolder"),"metadata/npm")}async function Em(t,{configuration:e,headers:r,ident:o,authType:a,registry:n,...u}){n=Av(e,{ident:o,registry:n}),o&&o.scope&&typeof a>"u"&&(a=1);let A=await PQ(n,{authType:a,configuration:e,ident:o});A&&(r={...r,authorization:A});try{return await nn.get(t.charAt(0)==="/"?`${n}${t}`:t,{configuration:e,headers:r,...u})}catch(p){throw await Q0(p,{registry:n,configuration:e,headers:r}),p}}async function F1t(t,e,{attemptedAs:r,configuration:o,headers:a,ident:n,authType:u=3,registry:A,otp:p,...h}){A=Av(o,{ident:n,registry:A});let E=await PQ(A,{authType:u,configuration:o,ident:n});E&&(a={...a,authorization:E}),p&&(a={...a,...zC(p)});try{return await nn.post(A+t,e,{configuration:o,headers:a,...h})}catch(I){if(!SQ(I)||p)throw await Q0(I,{attemptedAs:r,registry:A,configuration:o,headers:a}),I;p=await IG(I,{configuration:o});let v={...a,...zC(p)};try{return await nn.post(`${A}${t}`,e,{configuration:o,headers:v,...h})}catch(x){throw await Q0(x,{attemptedAs:r,registry:A,configuration:o,headers:a}),x}}}async function R1t(t,e,{attemptedAs:r,configuration:o,headers:a,ident:n,authType:u=3,registry:A,otp:p,...h}){A=Av(o,{ident:n,registry:A});let E=await PQ(A,{authType:u,configuration:o,ident:n});E&&(a={...a,authorization:E}),p&&(a={...a,...zC(p)});try{return await nn.put(A+t,e,{configuration:o,headers:a,...h})}catch(I){if(!SQ(I))throw await Q0(I,{attemptedAs:r,registry:A,configuration:o,headers:a}),I;p=await IG(I,{configuration:o});let v={...a,...zC(p)};try{return await nn.put(`${A}${t}`,e,{configuration:o,headers:v,...h})}catch(x){throw await Q0(x,{attemptedAs:r,registry:A,configuration:o,headers:a}),x}}}async function T1t(t,{attemptedAs:e,configuration:r,headers:o,ident:a,authType:n=3,registry:u,otp:A,...p}){u=Av(r,{ident:a,registry:u});let h=await PQ(u,{authType:n,configuration:r,ident:a});h&&(o={...o,authorization:h}),A&&(o={...o,...zC(A)});try{return await nn.del(u+t,{configuration:r,headers:o,...p})}catch(E){if(!SQ(E)||A)throw await Q0(E,{attemptedAs:e,registry:u,configuration:r,headers:o}),E;A=await IG(E,{configuration:r});let I={...o,...zC(A)};try{return await nn.del(`${u}${t}`,{configuration:r,headers:I,...p})}catch(v){throw await Q0(v,{attemptedAs:e,registry:u,configuration:r,headers:o}),v}}}function Av(t,{ident:e,registry:r}){if(typeof r>"u"&&e)return KC(e.scope,{configuration:t});if(typeof r!="string")throw new Error("Assertion failed: The registry should be a string");return ac(r)}async function PQ(t,{authType:e=2,configuration:r,ident:o}){let a=CG(t,{configuration:r,ident:o}),n=L1t(a,e);if(!n)return null;let u=await r.reduceHook(A=>A.getNpmAuthenticationHeader,void 0,t,{configuration:r,ident:o});if(u)return u;if(a.get("npmAuthToken"))return`Bearer ${a.get("npmAuthToken")}`;if(a.get("npmAuthIdent")){let A=a.get("npmAuthIdent");return A.includes(":")?`Basic ${Buffer.from(A).toString("base64")}`:`Basic ${A}`}if(n&&e!==1)throw new Jt(33,"No authentication configured for request");return null}function L1t(t,e){switch(e){case 2:return t.get("npmAlwaysAuth");case 1:case 3:return!0;case 0:return!1;default:throw new Error("Unreachable")}}async function N1t(t,e,{configuration:r}){if(typeof e>"u"||typeof e.authorization>"u")return"an anonymous user";try{return(await nn.get(new URL(`${t}/-/whoami`).href,{configuration:r,headers:e,jsonResponse:!0})).username??"an unknown user"}catch{return"an unknown user"}}async function IG(t,{configuration:e}){let r=t.originalError?.response.headers["npm-notice"];if(r&&(await Lt.start({configuration:e,stdout:process.stdout,includeFooter:!1},async a=>{if(a.reportInfo(0,r.replace(/(https?:\/\/\S+)/g,de.pretty(e,"$1",de.Type.URL))),!process.env.YARN_IS_TEST_ENV){let n=r.match(/open (https?:\/\/\S+)/i);if(n&&Vi.openUrl){let{openNow:u}=await(0,wG.prompt)({type:"confirm",name:"openNow",message:"Do you want to try to open this url now?",required:!0,initial:!0,onCancel:()=>process.exit(130)});u&&(await Vi.openUrl(n[1])||(a.reportSeparator(),a.reportWarning(0,"We failed to automatically open the url; you'll have to open it yourself in your browser of choice.")))}}}),process.stdout.write(` `)),process.env.YARN_IS_TEST_ENV)return process.env.YARN_INJECT_NPM_2FA_TOKEN||"";let{otp:o}=await(0,wG.prompt)({type:"password",name:"otp",message:"One-time password:",required:!0,onCancel:()=>process.exit(130)});return process.stdout.write(` `),o}function SQ(t){if(t.originalError?.name!=="HTTPError")return!1;try{return(t.originalError?.response.headers["www-authenticate"].split(/,\s*/).map(r=>r.toLowerCase())).includes("otp")}catch{return!1}}function zC(t){return{["npm-otp"]:t}}var fv=class{supports(e,r){if(!e.reference.startsWith(Wn))return!1;let{selector:o,params:a}=W.parseRange(e.reference);return!(!P1e.default.valid(o)||a===null||typeof a.__archiveUrl!="string")}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote server`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:W.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let{params:o}=W.parseRange(e.reference);if(o===null||typeof o.__archiveUrl!="string")throw new Error("Assertion failed: The archiveUrl querystring parameter should have been available");let a=await Em(o.__archiveUrl,{customErrorMessage:ym,configuration:r.project.configuration,ident:e});return await Xi.convertToZip(a,{configuration:r.project.configuration,prefixPath:W.getIdentVendorPath(e),stripComponents:1})}};Ye();var pv=class{supportsDescriptor(e,r){return!(!e.range.startsWith(Wn)||!W.tryParseDescriptor(e.range.slice(Wn.length),!0))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){let o=r.project.configuration.normalizeDependency(W.parseDescriptor(e.range.slice(Wn.length),!0));return r.resolver.getResolutionDependencies(o,r)}async getCandidates(e,r,o){let a=o.project.configuration.normalizeDependency(W.parseDescriptor(e.range.slice(Wn.length),!0));return await o.resolver.getCandidates(a,r,o)}async getSatisfying(e,r,o,a){let n=a.project.configuration.normalizeDependency(W.parseDescriptor(e.range.slice(Wn.length),!0));return a.resolver.getSatisfying(n,r,o,a)}resolve(e,r){throw new Error("Unreachable")}};Ye();Ye();var S1e=$e(Jn());var ml=class{supports(e,r){if(!e.reference.startsWith(Wn))return!1;let o=new URL(e.reference);return!(!S1e.default.valid(o.pathname)||o.searchParams.has("__archiveUrl"))}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the remote registry`),loader:()=>this.fetchFromNetwork(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:W.getIdentVendorPath(e),checksum:u}}async fetchFromNetwork(e,r){let o;try{o=await Em(ml.getLocatorUrl(e),{customErrorMessage:ym,configuration:r.project.configuration,ident:e})}catch{o=await Em(ml.getLocatorUrl(e).replace(/%2f/g,"/"),{customErrorMessage:ym,configuration:r.project.configuration,ident:e})}return await Xi.convertToZip(o,{configuration:r.project.configuration,prefixPath:W.getIdentVendorPath(e),stripComponents:1})}static isConventionalTarballUrl(e,r,{configuration:o}){let a=KC(e.scope,{configuration:o}),n=ml.getLocatorUrl(e);return r=r.replace(/^https?:(\/\/(?:[^/]+\.)?npmjs.org(?:$|\/))/,"https:$1"),a=a.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r=r.replace(/^https:\/\/registry\.npmjs\.org($|\/)/,"https://registry.yarnpkg.com$1"),r===a+n||r===a+n.replace(/%2f/g,"/")}static getLocatorUrl(e){let r=kr.clean(e.reference.slice(Wn.length));if(r===null)throw new Jt(10,"The npm semver resolver got selected, but the version isn't semver");return`${DQ(e)}/-/${e.name}-${r}.tgz`}};Ye();Ye();Ye();var BG=$e(Jn());var bQ=W.makeIdent(null,"node-gyp"),O1t=/\b(node-gyp|prebuild-install)\b/,hv=class{supportsDescriptor(e,r){return e.range.startsWith(Wn)?!!kr.validRange(e.range.slice(Wn.length)):!1}supportsLocator(e,r){if(!e.reference.startsWith(Wn))return!1;let{selector:o}=W.parseRange(e.reference);return!!BG.default.valid(o)}shouldPersistResolution(e,r){return!0}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=kr.validRange(e.range.slice(Wn.length));if(a===null)throw new Error(`Expected a valid range, got ${e.range.slice(Wn.length)}`);let n=await VC(e,{cache:o.fetchOptions?.cache,project:o.project,version:BG.default.valid(a.raw)?a.raw:void 0}),u=_e.mapAndFilter(Object.keys(n.versions),h=>{try{let E=new kr.SemVer(h);if(a.test(E))return E}catch{}return _e.mapAndFilter.skip}),A=u.filter(h=>!n.versions[h.raw].deprecated),p=A.length>0?A:u;return p.sort((h,E)=>-h.compare(E)),p.map(h=>{let E=W.makeLocator(e,`${Wn}${h.raw}`),I=n.versions[h.raw].dist.tarball;return ml.isConventionalTarballUrl(E,I,{configuration:o.project.configuration})?E:W.bindLocator(E,{__archiveUrl:I})})}async getSatisfying(e,r,o,a){let n=kr.validRange(e.range.slice(Wn.length));if(n===null)throw new Error(`Expected a valid range, got ${e.range.slice(Wn.length)}`);return{locators:_e.mapAndFilter(o,p=>{if(p.identHash!==e.identHash)return _e.mapAndFilter.skip;let h=W.tryParseRange(p.reference,{requireProtocol:Wn});if(!h)return _e.mapAndFilter.skip;let E=new kr.SemVer(h.selector);return n.test(E)?{locator:p,version:E}:_e.mapAndFilter.skip}).sort((p,h)=>-p.version.compare(h.version)).map(({locator:p})=>p),sorted:!0}}async resolve(e,r){let{selector:o}=W.parseRange(e.reference),a=kr.clean(o);if(a===null)throw new Jt(10,"The npm semver resolver got selected, but the version isn't semver");let n=await VC(e,{cache:r.fetchOptions?.cache,project:r.project,version:a});if(!Object.hasOwn(n,"versions"))throw new Jt(15,'Registry returned invalid data for - missing "versions" field');if(!Object.hasOwn(n.versions,a))throw new Jt(16,`Registry failed to return reference "${a}"`);let u=new Ot;if(u.load(n.versions[a]),!u.dependencies.has(bQ.identHash)&&!u.peerDependencies.has(bQ.identHash)){for(let A of u.scripts.values())if(A.match(O1t)){u.dependencies.set(bQ.identHash,W.makeDescriptor(bQ,"latest"));break}}return{...e,version:a,languageName:"node",linkType:"HARD",conditions:u.getConditions(),dependencies:r.project.configuration.normalizeDependencyMap(u.dependencies),peerDependencies:u.peerDependencies,dependenciesMeta:u.dependenciesMeta,peerDependenciesMeta:u.peerDependenciesMeta,bin:u.bin}}};Ye();Ye();var b1e=$e(Jn());var gv=class{supportsDescriptor(e,r){return!(!e.range.startsWith(Wn)||!FE.test(e.range.slice(Wn.length)))}supportsLocator(e,r){return!1}shouldPersistResolution(e,r){throw new Error("Unreachable")}bindDescriptor(e,r,o){return e}getResolutionDependencies(e,r){return{}}async getCandidates(e,r,o){let a=e.range.slice(Wn.length),n=await VC(e,{cache:o.fetchOptions?.cache,project:o.project});if(!Object.hasOwn(n,"dist-tags"))throw new Jt(15,'Registry returned invalid data - missing "dist-tags" field');let u=n["dist-tags"];if(!Object.hasOwn(u,a))throw new Jt(16,`Registry failed to return tag "${a}"`);let A=u[a],p=W.makeLocator(e,`${Wn}${A}`),h=n.versions[A].dist.tarball;return ml.isConventionalTarballUrl(p,h,{configuration:o.project.configuration})?[p]:[W.bindLocator(p,{__archiveUrl:h})]}async getSatisfying(e,r,o,a){let n=[];for(let u of o){if(u.identHash!==e.identHash)continue;let A=W.tryParseRange(u.reference,{requireProtocol:Wn});if(!(!A||!b1e.default.valid(A.selector))){if(A.params?.__archiveUrl){let p=W.makeRange({protocol:Wn,selector:A.selector,source:null,params:null}),[h]=await a.resolver.getCandidates(W.makeDescriptor(e,p),r,a);if(u.reference!==h.reference)continue}n.push(u)}}return{locators:n,sorted:!1}}async resolve(e,r){throw new Error("Unreachable")}};var ow={};zt(ow,{getGitHead:()=>Lvt,getPublishAccess:()=>mBe,getReadmeContent:()=>yBe,makePublishBody:()=>Tvt});Ye();Ye();Pt();var Aj={};zt(Aj,{PackCommand:()=>_0,default:()=>dvt,packUtils:()=>wA});Ye();Ye();Ye();Pt();qt();var wA={};zt(wA,{genPackList:()=>XQ,genPackStream:()=>uj,genPackageManifest:()=>sBe,hasPackScripts:()=>lj,prepareForPack:()=>cj});Ye();Pt();var aj=$e(Zo()),nBe=$e($2e()),iBe=ve("zlib"),svt=["/package.json","/readme","/readme.*","/license","/license.*","/licence","/licence.*","/changelog","/changelog.*"],ovt=["/package.tgz",".github",".git",".hg","node_modules",".npmignore",".gitignore",".#*",".DS_Store"];async function lj(t){return!!(un.hasWorkspaceScript(t,"prepack")||un.hasWorkspaceScript(t,"postpack"))}async function cj(t,{report:e},r){await un.maybeExecuteWorkspaceLifecycleScript(t,"prepack",{report:e});try{let o=z.join(t.cwd,Ot.fileName);await oe.existsPromise(o)&&await t.manifest.loadFile(o,{baseFs:oe}),await r()}finally{await un.maybeExecuteWorkspaceLifecycleScript(t,"postpack",{report:e})}}async function uj(t,e){typeof e>"u"&&(e=await XQ(t));let r=new Set;for(let n of t.manifest.publishConfig?.executableFiles??new Set)r.add(z.normalize(n));for(let n of t.manifest.bin.values())r.add(z.normalize(n));let o=nBe.default.pack();process.nextTick(async()=>{for(let n of e){let u=z.normalize(n),A=z.resolve(t.cwd,u),p=z.join("package",u),h=await oe.lstatPromise(A),E={name:p,mtime:new Date(vi.SAFE_TIME*1e3)},I=r.has(u)?493:420,v,x,C=new Promise((N,U)=>{v=N,x=U}),R=N=>{N?x(N):v()};if(h.isFile()){let N;u==="package.json"?N=Buffer.from(JSON.stringify(await sBe(t),null,2)):N=await oe.readFilePromise(A),o.entry({...E,mode:I,type:"file"},N,R)}else h.isSymbolicLink()?o.entry({...E,mode:I,type:"symlink",linkname:await oe.readlinkPromise(A)},R):R(new Error(`Unsupported file type ${h.mode} for ${le.fromPortablePath(u)}`));await C}o.finalize()});let a=(0,iBe.createGzip)();return o.pipe(a),a}async function sBe(t){let e=JSON.parse(JSON.stringify(t.manifest.raw));return await t.project.configuration.triggerHook(r=>r.beforeWorkspacePacking,t,e),e}async function XQ(t){let e=t.project,r=e.configuration,o={accept:[],reject:[]};for(let I of ovt)o.reject.push(I);for(let I of svt)o.accept.push(I);o.reject.push(r.get("rcFilename"));let a=I=>{if(I===null||!I.startsWith(`${t.cwd}/`))return;let v=z.relative(t.cwd,I),x=z.resolve(Bt.root,v);o.reject.push(x)};a(z.resolve(e.cwd,dr.lockfile)),a(r.get("cacheFolder")),a(r.get("globalFolder")),a(r.get("installStatePath")),a(r.get("virtualFolder")),a(r.get("yarnPath")),await r.triggerHook(I=>I.populateYarnPaths,e,I=>{a(I)});for(let I of e.workspaces){let v=z.relative(t.cwd,I.cwd);v!==""&&!v.match(/^(\.\.)?\//)&&o.reject.push(`/${v}`)}let n={accept:[],reject:[]},u=t.manifest.publishConfig?.main??t.manifest.main,A=t.manifest.publishConfig?.module??t.manifest.module,p=t.manifest.publishConfig?.browser??t.manifest.browser,h=t.manifest.publishConfig?.bin??t.manifest.bin;u!=null&&n.accept.push(z.resolve(Bt.root,u)),A!=null&&n.accept.push(z.resolve(Bt.root,A)),typeof p=="string"&&n.accept.push(z.resolve(Bt.root,p));for(let I of h.values())n.accept.push(z.resolve(Bt.root,I));if(p instanceof Map)for(let[I,v]of p.entries())n.accept.push(z.resolve(Bt.root,I)),typeof v=="string"&&n.accept.push(z.resolve(Bt.root,v));let E=t.manifest.files!==null;if(E){n.reject.push("/*");for(let I of t.manifest.files)oBe(n.accept,I,{cwd:Bt.root})}return await avt(t.cwd,{hasExplicitFileList:E,globalList:o,ignoreList:n})}async function avt(t,{hasExplicitFileList:e,globalList:r,ignoreList:o}){let a=[],n=new Hu(t),u=[[Bt.root,[o]]];for(;u.length>0;){let[A,p]=u.pop(),h=await n.lstatPromise(A);if(!tBe(A,{globalList:r,ignoreLists:h.isDirectory()?null:p}))if(h.isDirectory()){let E=await n.readdirPromise(A),I=!1,v=!1;if(!e||A!==Bt.root)for(let R of E)I=I||R===".gitignore",v=v||R===".npmignore";let x=v?await eBe(n,A,".npmignore"):I?await eBe(n,A,".gitignore"):null,C=x!==null?[x].concat(p):p;tBe(A,{globalList:r,ignoreLists:p})&&(C=[...p,{accept:[],reject:["**/*"]}]);for(let R of E)u.push([z.resolve(A,R),C])}else(h.isFile()||h.isSymbolicLink())&&a.push(z.relative(Bt.root,A))}return a.sort()}async function eBe(t,e,r){let o={accept:[],reject:[]},a=await t.readFilePromise(z.join(e,r),"utf8");for(let n of a.split(/\n/g))oBe(o.reject,n,{cwd:e});return o}function lvt(t,{cwd:e}){let r=t[0]==="!";return r&&(t=t.slice(1)),t.match(/\.{0,1}\//)&&(t=z.resolve(e,t)),r&&(t=`!${t}`),t}function oBe(t,e,{cwd:r}){let o=e.trim();o===""||o[0]==="#"||t.push(lvt(o,{cwd:r}))}function tBe(t,{globalList:e,ignoreLists:r}){let o=JQ(t,e.accept);if(o!==0)return o===2;let a=JQ(t,e.reject);if(a!==0)return a===1;if(r!==null)for(let n of r){let u=JQ(t,n.accept);if(u!==0)return u===2;let A=JQ(t,n.reject);if(A!==0)return A===1}return!1}function JQ(t,e){let r=e,o=[];for(let a=0;a{await cj(a,{report:p},async()=>{p.reportJson({base:le.fromPortablePath(a.cwd)});let h=await XQ(a);for(let E of h)p.reportInfo(null,le.fromPortablePath(E)),p.reportJson({location:le.fromPortablePath(E)});if(!this.dryRun){let E=await uj(a,h),I=oe.createWriteStream(u);E.pipe(I),await new Promise(v=>{I.on("finish",v)})}}),this.dryRun||(p.reportInfo(0,`Package archive generated in ${de.pretty(r,u,de.Type.PATH)}`),p.reportJson({output:le.fromPortablePath(u)}))})).exitCode()}};_0.paths=[["pack"]],_0.usage=nt.Usage({description:"generate a tarball from the active workspace",details:"\n This command will turn the active workspace into a compressed archive suitable for publishing. The archive will by default be stored at the root of the workspace (`package.tgz`).\n\n If the `-o,---out` is set the archive will be created at the specified path. The `%s` and `%v` variables can be used within the path and will be respectively replaced by the package name and version.\n ",examples:[["Create an archive from the active workspace","yarn pack"],["List the files that would be made part of the workspace's archive","yarn pack --dry-run"],["Name and output the archive in a dedicated folder","yarn pack --out /artifacts/%s-%v.tgz"]]});function cvt(t,{workspace:e}){let r=t.replace("%s",uvt(e)).replace("%v",Avt(e));return le.toPortablePath(r)}function uvt(t){return t.manifest.name!==null?W.slugifyIdent(t.manifest.name):"package"}function Avt(t){return t.manifest.version!==null?t.manifest.version:"unknown"}var fvt=["dependencies","devDependencies","peerDependencies"],pvt="workspace:",hvt=(t,e)=>{e.publishConfig&&(e.publishConfig.type&&(e.type=e.publishConfig.type),e.publishConfig.main&&(e.main=e.publishConfig.main),e.publishConfig.browser&&(e.browser=e.publishConfig.browser),e.publishConfig.module&&(e.module=e.publishConfig.module),e.publishConfig.exports&&(e.exports=e.publishConfig.exports),e.publishConfig.imports&&(e.imports=e.publishConfig.imports),e.publishConfig.bin&&(e.bin=e.publishConfig.bin));let r=t.project;for(let o of fvt)for(let a of t.manifest.getForScope(o).values()){let n=r.tryWorkspaceByDescriptor(a),u=W.parseRange(a.range);if(u.protocol===pvt)if(n===null){if(r.tryWorkspaceByIdent(a)===null)throw new Jt(21,`${W.prettyDescriptor(r.configuration,a)}: No local workspace found for this range`)}else{let A;W.areDescriptorsEqual(a,n.anchoredDescriptor)||u.selector==="*"?A=n.manifest.version??"0.0.0":u.selector==="~"||u.selector==="^"?A=`${u.selector}${n.manifest.version??"0.0.0"}`:A=u.selector;let p=o==="dependencies"?W.makeDescriptor(a,"unknown"):null,h=p!==null&&t.manifest.ensureDependencyMeta(p).optional?"optionalDependencies":o;e[h][W.stringifyIdent(a)]=A}}},gvt={hooks:{beforeWorkspacePacking:hvt},commands:[_0]},dvt=gvt;var gBe=ve("crypto"),dBe=$e(hBe());async function Tvt(t,e,{access:r,tag:o,registry:a,gitHead:n}){let u=t.manifest.name,A=t.manifest.version,p=W.stringifyIdent(u),h=(0,gBe.createHash)("sha1").update(e).digest("hex"),E=dBe.default.fromData(e).toString(),I=r??mBe(t,u),v=await yBe(t),x=await wA.genPackageManifest(t),C=`${p}-${A}.tgz`,R=new URL(`${ac(a)}/${p}/-/${C}`);return{_id:p,_attachments:{[C]:{content_type:"application/octet-stream",data:e.toString("base64"),length:e.length}},name:p,access:I,["dist-tags"]:{[o]:A},versions:{[A]:{...x,_id:`${p}@${A}`,name:p,version:A,gitHead:n,dist:{shasum:h,integrity:E,tarball:R.toString()}}},readme:v}}async function Lvt(t){try{let{stdout:e}=await Ur.execvp("git",["rev-parse","--revs-only","HEAD"],{cwd:t});return e.trim()===""?void 0:e.trim()}catch{return}}function mBe(t,e){let r=t.project.configuration;return t.manifest.publishConfig&&typeof t.manifest.publishConfig.access=="string"?t.manifest.publishConfig.access:r.get("npmPublishAccess")!==null?r.get("npmPublishAccess"):e.scope?"restricted":"public"}async function yBe(t){let e=le.toPortablePath(`${t.cwd}/README.md`),r=t.manifest.name,a=`# ${W.stringifyIdent(r)} `;try{a=await oe.readFilePromise(e,"utf8")}catch(n){if(n.code==="ENOENT")return a;throw n}return a}var gj={npmAlwaysAuth:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"BOOLEAN",default:!1},npmAuthIdent:{description:"Authentication identity for the npm registry (_auth in npm and yarn v1)",type:"SECRET",default:null},npmAuthToken:{description:"Authentication token for the npm registry (_authToken in npm and yarn v1)",type:"SECRET",default:null}},EBe={npmAuditRegistry:{description:"Registry to query for audit reports",type:"STRING",default:null},npmPublishRegistry:{description:"Registry to push packages to",type:"STRING",default:null},npmRegistryServer:{description:"URL of the selected npm registry (note: npm enterprise isn't supported)",type:"STRING",default:"https://registry.yarnpkg.com"}},Nvt={configuration:{...gj,...EBe,npmScopes:{description:"Settings per package scope",type:"MAP",valueDefinition:{description:"",type:"SHAPE",properties:{...gj,...EBe}}},npmRegistries:{description:"Settings per registry",type:"MAP",normalizeKeys:ac,valueDefinition:{description:"",type:"SHAPE",properties:{...gj}}}},fetchers:[fv,ml],resolvers:[pv,hv,gv]},Ovt=Nvt;var Dj={};zt(Dj,{NpmAuditCommand:()=>q0,NpmInfoCommand:()=>G0,NpmLoginCommand:()=>j0,NpmLogoutCommand:()=>Y0,NpmPublishCommand:()=>W0,NpmTagAddCommand:()=>z0,NpmTagListCommand:()=>K0,NpmTagRemoveCommand:()=>V0,NpmWhoamiCommand:()=>J0,default:()=>jvt,npmAuditTypes:()=>Rv,npmAuditUtils:()=>ZQ});Ye();Ye();qt();var wj=$e(Zo());$a();var Rv={};zt(Rv,{Environment:()=>Qv,Severity:()=>Fv});var Qv=(o=>(o.All="all",o.Production="production",o.Development="development",o))(Qv||{}),Fv=(n=>(n.Info="info",n.Low="low",n.Moderate="moderate",n.High="high",n.Critical="critical",n))(Fv||{});var ZQ={};zt(ZQ,{allSeverities:()=>aw,getPackages:()=>Cj,getReportTree:()=>yj,getSeverityInclusions:()=>mj,getTopLevelDependencies:()=>Ej});Ye();var CBe=$e(Jn());var aw=["info","low","moderate","high","critical"];function mj(t){if(typeof t>"u")return new Set(aw);let e=aw.indexOf(t),r=aw.slice(e);return new Set(r)}function yj(t){let e={},r={children:e};for(let[o,a]of _e.sortMap(Object.entries(t),n=>n[0]))for(let n of _e.sortMap(a,u=>`${u.id}`))e[`${o}/${n.id}`]={value:de.tuple(de.Type.IDENT,W.parseIdent(o)),children:{ID:typeof n.id<"u"&&{label:"ID",value:de.tuple(de.Type.ID,n.id)},Issue:{label:"Issue",value:de.tuple(de.Type.NO_HINT,n.title)},URL:typeof n.url<"u"&&{label:"URL",value:de.tuple(de.Type.URL,n.url)},Severity:{label:"Severity",value:de.tuple(de.Type.NO_HINT,n.severity)},["Vulnerable Versions"]:{label:"Vulnerable Versions",value:de.tuple(de.Type.RANGE,n.vulnerable_versions)},["Tree Versions"]:{label:"Tree Versions",children:[...n.versions].sort(CBe.default.compare).map(u=>({value:de.tuple(de.Type.REFERENCE,u)}))},Dependents:{label:"Dependents",children:_e.sortMap(n.dependents,u=>W.stringifyLocator(u)).map(u=>({value:de.tuple(de.Type.LOCATOR,u)}))}}};return r}function Ej(t,e,{all:r,environment:o}){let a=[],n=r?t.workspaces:[e],u=["all","production"].includes(o),A=["all","development"].includes(o);for(let p of n)for(let h of p.anchoredPackage.dependencies.values())(p.manifest.devDependencies.has(h.identHash)?!A:!u)||a.push({workspace:p,dependency:h});return a}function Cj(t,e,{recursive:r}){let o=new Map,a=new Set,n=[],u=(A,p)=>{let h=t.storedResolutions.get(p.descriptorHash);if(typeof h>"u")throw new Error("Assertion failed: The resolution should have been registered");if(!a.has(h))a.add(h);else return;let E=t.storedPackages.get(h);if(typeof E>"u")throw new Error("Assertion failed: The package should have been registered");if(W.ensureDevirtualizedLocator(E).reference.startsWith("npm:")&&E.version!==null){let v=W.stringifyIdent(E),x=_e.getMapWithDefault(o,v);_e.getArrayWithDefault(x,E.version).push(A)}if(r)for(let v of E.dependencies.values())n.push([E,v])};for(let{workspace:A,dependency:p}of e)n.push([A.anchoredLocator,p]);for(;n.length>0;){let[A,p]=n.shift();u(A,p)}return o}var q0=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("-A,--all",!1,{description:"Audit dependencies from all workspaces"});this.recursive=ge.Boolean("-R,--recursive",!1,{description:"Audit transitive dependencies as well"});this.environment=ge.String("--environment","all",{description:"Which environments to cover",validator:Ks(Qv)});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.noDeprecations=ge.Boolean("--no-deprecations",!1,{description:"Don't warn about deprecated packages"});this.severity=ge.String("--severity","info",{description:"Minimal severity requested for packages to be displayed",validator:Ks(Fv)});this.excludes=ge.Array("--exclude",[],{description:"Array of glob patterns of packages to exclude from audit"});this.ignores=ge.Array("--ignore",[],{description:"Array of glob patterns of advisory ID's to ignore in the audit report"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=Ej(o,a,{all:this.all,environment:this.environment}),u=Cj(o,n,{recursive:this.recursive}),A=Array.from(new Set([...r.get("npmAuditExcludePackages"),...this.excludes])),p=Object.create(null);for(let[N,U]of u)A.some(V=>wj.default.isMatch(N,V))||(p[N]=[...U.keys()]);let h=$n.getAuditRegistry({configuration:r}),E,I=await fA.start({configuration:r,stdout:this.context.stdout},async()=>{let N=Zr.post("/-/npm/v1/security/advisories/bulk",p,{authType:Zr.AuthType.BEST_EFFORT,configuration:r,jsonResponse:!0,registry:h}),U=this.noDeprecations?[]:await Promise.all(Array.from(Object.entries(p),async([te,ae])=>{let fe=await Zr.getPackageMetadata(W.parseIdent(te),{project:o});return _e.mapAndFilter(ae,ue=>{let{deprecated:me}=fe.versions[ue];return me?[te,ue,me]:_e.mapAndFilter.skip})})),V=await N;for(let[te,ae,fe]of U.flat(1))Object.hasOwn(V,te)&&V[te].some(ue=>kr.satisfiesWithPrereleases(ae,ue.vulnerable_versions))||(V[te]??=[],V[te].push({id:`${te} (deprecation)`,title:fe.trim()||"This package has been deprecated.",severity:"moderate",vulnerable_versions:ae}));E=V});if(I.hasErrors())return I.exitCode();let v=mj(this.severity),x=Array.from(new Set([...r.get("npmAuditIgnoreAdvisories"),...this.ignores])),C=Object.create(null);for(let[N,U]of Object.entries(E)){let V=U.filter(te=>!wj.default.isMatch(`${te.id}`,x)&&v.has(te.severity));V.length>0&&(C[N]=V.map(te=>{let ae=u.get(N);if(typeof ae>"u")throw new Error("Assertion failed: Expected the registry to only return packages that were requested");let fe=[...ae.keys()].filter(me=>kr.satisfiesWithPrereleases(me,te.vulnerable_versions)),ue=new Map;for(let me of fe)for(let he of ae.get(me))ue.set(he.locatorHash,he);return{...te,versions:fe,dependents:[...ue.values()]}}))}let R=Object.keys(C).length>0;return R?($s.emitTree(yj(C),{configuration:r,json:this.json,stdout:this.context.stdout,separators:2}),1):(await Lt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async N=>{N.reportInfo(1,"No audit suggestions")}),R?1:0)}};q0.paths=[["npm","audit"]],q0.usage=nt.Usage({description:"perform a vulnerability audit against the installed packages",details:` This command checks for known security reports on the packages you use. The reports are by default extracted from the npm registry, and may or may not be relevant to your actual program (not all vulnerabilities affect all code paths). For consistency with our other commands the default is to only check the direct dependencies for the active workspace. To extend this search to all workspaces, use \`-A,--all\`. To extend this search to both direct and transitive dependencies, use \`-R,--recursive\`. Applying the \`--severity\` flag will limit the audit table to vulnerabilities of the corresponding severity and above. Valid values are ${aw.map(r=>`\`${r}\``).join(", ")}. If the \`--json\` flag is set, Yarn will print the output exactly as received from the registry. Regardless of this flag, the process will exit with a non-zero exit code if a report is found for the selected packages. If certain packages produce false positives for a particular environment, the \`--exclude\` flag can be used to exclude any number of packages from the audit. This can also be set in the configuration file with the \`npmAuditExcludePackages\` option. If particular advisories are needed to be ignored, the \`--ignore\` flag can be used with Advisory ID's to ignore any number of advisories in the audit report. This can also be set in the configuration file with the \`npmAuditIgnoreAdvisories\` option. To understand the dependency tree requiring vulnerable packages, check the raw report with the \`--json\` flag or use \`yarn why package\` to get more information as to who depends on them. `,examples:[["Checks for known security issues with the installed packages. The output is a list of known issues.","yarn npm audit"],["Audit dependencies in all workspaces","yarn npm audit --all"],["Limit auditing to `dependencies` (excludes `devDependencies`)","yarn npm audit --environment production"],["Show audit report as valid JSON","yarn npm audit --json"],["Audit all direct and transitive dependencies","yarn npm audit --recursive"],["Output moderate (or more severe) vulnerabilities","yarn npm audit --severity moderate"],["Exclude certain packages","yarn npm audit --exclude package1 --exclude package2"],["Ignore specific advisories","yarn npm audit --ignore 1234567 --ignore 7654321"]]});Ye();Ye();Pt();qt();var Ij=$e(Jn()),Bj=ve("util"),G0=class extends ut{constructor(){super(...arguments);this.fields=ge.String("-f,--fields",{description:"A comma-separated list of manifest fields that should be displayed"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.packages=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),a=typeof this.fields<"u"?new Set(["name",...this.fields.split(/\s*,\s*/)]):null,n=[],u=!1,A=await Lt.start({configuration:r,includeFooter:!1,json:this.json,stdout:this.context.stdout},async p=>{for(let h of this.packages){let E;if(h==="."){let ae=o.topLevelWorkspace;if(!ae.manifest.name)throw new it(`Missing ${de.pretty(r,"name",de.Type.CODE)} field in ${le.fromPortablePath(z.join(ae.cwd,dr.manifest))}`);E=W.makeDescriptor(ae.manifest.name,"unknown")}else E=W.parseDescriptor(h);let I=Zr.getIdentUrl(E),v=vj(await Zr.get(I,{configuration:r,ident:E,jsonResponse:!0,customErrorMessage:Zr.customPackageError})),x=Object.keys(v.versions).sort(Ij.default.compareLoose),R=v["dist-tags"].latest||x[x.length-1],N=kr.validRange(E.range);if(N){let ae=Ij.default.maxSatisfying(x,N);ae!==null?R=ae:(p.reportWarning(0,`Unmet range ${W.prettyRange(r,E.range)}; falling back to the latest version`),u=!0)}else Object.hasOwn(v["dist-tags"],E.range)?R=v["dist-tags"][E.range]:E.range!=="unknown"&&(p.reportWarning(0,`Unknown tag ${W.prettyRange(r,E.range)}; falling back to the latest version`),u=!0);let U=v.versions[R],V={...v,...U,version:R,versions:x},te;if(a!==null){te={};for(let ae of a){let fe=V[ae];if(typeof fe<"u")te[ae]=fe;else{p.reportWarning(1,`The ${de.pretty(r,ae,de.Type.CODE)} field doesn't exist inside ${W.prettyIdent(r,E)}'s information`),u=!0;continue}}}else this.json||(delete V.dist,delete V.readme,delete V.users),te=V;p.reportJson(te),this.json||n.push(te)}});Bj.inspect.styles.name="cyan";for(let p of n)(p!==n[0]||u)&&this.context.stdout.write(` `),this.context.stdout.write(`${(0,Bj.inspect)(p,{depth:1/0,colors:!0,compact:!1})} `);return A.exitCode()}};G0.paths=[["npm","info"]],G0.usage=nt.Usage({category:"Npm-related commands",description:"show information about a package",details:"\n This command fetches information about a package from the npm registry and prints it in a tree format.\n\n The package does not have to be installed locally, but needs to have been published (in particular, local changes will be ignored even for workspaces).\n\n Append `@` to the package argument to provide information specific to the latest version that satisfies the range or to the corresponding tagged version. If the range is invalid or if there is no version satisfying the range, the command will print a warning and fall back to the latest version.\n\n If the `-f,--fields` option is set, it's a comma-separated list of fields which will be used to only display part of the package information.\n\n By default, this command won't return the `dist`, `readme`, and `users` fields, since they are often very long. To explicitly request those fields, explicitly list them with the `--fields` flag or request the output in JSON mode.\n ",examples:[["Show all available information about react (except the `dist`, `readme`, and `users` fields)","yarn npm info react"],["Show all available information about react as valid JSON (including the `dist`, `readme`, and `users` fields)","yarn npm info react --json"],["Show all available information about react@16.12.0","yarn npm info react@16.12.0"],["Show all available information about react@next","yarn npm info react@next"],["Show the description of react","yarn npm info react --fields description"],["Show all available versions of react","yarn npm info react --fields versions"],["Show the readme of react","yarn npm info react --fields readme"],["Show a few fields of react","yarn npm info react --fields homepage,repository"]]});function vj(t){if(Array.isArray(t)){let e=[];for(let r of t)r=vj(r),r&&e.push(r);return e}else if(typeof t=="object"&&t!==null){let e={};for(let r of Object.keys(t)){if(r.startsWith("_"))continue;let o=vj(t[r]);o&&(e[r]=o)}return e}else return t||null}Ye();Ye();qt();var wBe=$e(f2()),j0=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Login to the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Login to the publish registry"});this.alwaysAuth=ge.Boolean("--always-auth",{description:"Set the npmAlwaysAuth configuration"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=await $Q({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope});return(await Lt.start({configuration:r,stdout:this.context.stdout,includeFooter:!1},async n=>{let u=await _vt({configuration:r,registry:o,report:n,stdin:this.context.stdin,stdout:this.context.stdout}),A=await Mvt(o,u,r);return await Uvt(o,A,{alwaysAuth:this.alwaysAuth,scope:this.scope}),n.reportInfo(0,"Successfully logged in")})).exitCode()}};j0.paths=[["npm","login"]],j0.usage=nt.Usage({category:"Npm-related commands",description:"store new login info to access the npm registry",details:"\n This command will ask you for your username, password, and 2FA One-Time-Password (when it applies). It will then modify your local configuration (in your home folder, never in the project itself) to reference the new tokens thus generated.\n\n Adding the `-s,--scope` flag will cause the authentication to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the authentication to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n ",examples:[["Login to the default registry","yarn npm login"],["Login to the registry linked to the @my-scope registry","yarn npm login --scope my-scope"],["Login to the publish registry for the current package","yarn npm login --publish"]]});async function $Q({scope:t,publish:e,configuration:r,cwd:o}){return t&&e?$n.getScopeRegistry(t,{configuration:r,type:$n.RegistryType.PUBLISH_REGISTRY}):t?$n.getScopeRegistry(t,{configuration:r}):e?$n.getPublishRegistry((await fC(r,o)).manifest,{configuration:r}):$n.getDefaultRegistry({configuration:r})}async function Mvt(t,e,r){let o=`/-/user/org.couchdb.user:${encodeURIComponent(e.name)}`,a={_id:`org.couchdb.user:${e.name}`,name:e.name,password:e.password,type:"user",roles:[],date:new Date().toISOString()},n={attemptedAs:e.name,configuration:r,registry:t,jsonResponse:!0,authType:Zr.AuthType.NO_AUTH};try{return(await Zr.put(o,a,n)).token}catch(E){if(!(E.originalError?.name==="HTTPError"&&E.originalError?.response.statusCode===409))throw E}let u={...n,authType:Zr.AuthType.NO_AUTH,headers:{authorization:`Basic ${Buffer.from(`${e.name}:${e.password}`).toString("base64")}`}},A=await Zr.get(o,u);for(let[E,I]of Object.entries(A))(!a[E]||E==="roles")&&(a[E]=I);let p=`${o}/-rev/${a._rev}`;return(await Zr.put(p,a,u)).token}async function Uvt(t,e,{alwaysAuth:r,scope:o}){let a=u=>A=>{let p=_e.isIndexableObject(A)?A:{},h=p[u],E=_e.isIndexableObject(h)?h:{};return{...p,[u]:{...E,...r!==void 0?{npmAlwaysAuth:r}:{},npmAuthToken:e}}},n=o?{npmScopes:a(o)}:{npmRegistries:a(t)};return await Ke.updateHomeConfiguration(n)}async function _vt({configuration:t,registry:e,report:r,stdin:o,stdout:a}){r.reportInfo(0,`Logging in to ${de.pretty(t,e,de.Type.URL)}`);let n=!1;if(e.match(/^https:\/\/npm\.pkg\.github\.com(\/|$)/)&&(r.reportInfo(0,"You seem to be using the GitHub Package Registry. Tokens must be generated with the 'repo', 'write:packages', and 'read:packages' permissions."),n=!0),r.reportSeparator(),t.env.YARN_IS_TEST_ENV)return{name:t.env.YARN_INJECT_NPM_USER||"",password:t.env.YARN_INJECT_NPM_PASSWORD||""};let u=await(0,wBe.prompt)([{type:"input",name:"name",message:"Username:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a},{type:"password",name:"password",message:n?"Token:":"Password:",required:!0,onCancel:()=>process.exit(130),stdin:o,stdout:a}]);return r.reportSeparator(),u}Ye();Ye();qt();var lw=new Set(["npmAuthIdent","npmAuthToken"]),Y0=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Logout of the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Logout of the publish registry"});this.all=ge.Boolean("-A,--all",!1,{description:"Logout of all registries"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o=async()=>{let n=await $Q({configuration:r,cwd:this.context.cwd,publish:this.publish,scope:this.scope}),u=await Ke.find(this.context.cwd,this.context.plugins),A=W.makeIdent(this.scope??null,"pkg");return!$n.getAuthConfiguration(n,{configuration:u,ident:A}).get("npmAuthToken")};return(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{if(this.all&&(await qvt(),n.reportInfo(0,"Successfully logged out from everything")),this.scope){await IBe("npmScopes",this.scope),await o()?n.reportInfo(0,`Successfully logged out from ${this.scope}`):n.reportWarning(0,"Scope authentication settings removed, but some other ones settings still apply to it");return}let u=await $Q({configuration:r,cwd:this.context.cwd,publish:this.publish});await IBe("npmRegistries",u),await o()?n.reportInfo(0,`Successfully logged out from ${u}`):n.reportWarning(0,"Registry authentication settings removed, but some other ones settings still apply to it")})).exitCode()}};Y0.paths=[["npm","logout"]],Y0.usage=nt.Usage({category:"Npm-related commands",description:"logout of the npm registry",details:"\n This command will log you out by modifying your local configuration (in your home folder, never in the project itself) to delete all credentials linked to a registry.\n\n Adding the `-s,--scope` flag will cause the deletion to be done against whatever registry is configured for the associated scope (see also `npmScopes`).\n\n Adding the `--publish` flag will cause the deletion to be done against the registry used when publishing the package (see also `publishConfig.registry` and `npmPublishRegistry`).\n\n Adding the `-A,--all` flag will cause the deletion to be done against all registries and scopes.\n ",examples:[["Logout of the default registry","yarn npm logout"],["Logout of the @my-scope scope","yarn npm logout --scope my-scope"],["Logout of the publish registry for the current package","yarn npm logout --publish"],["Logout of all registries","yarn npm logout --all"]]});function Hvt(t,e){let r=t[e];if(!_e.isIndexableObject(r))return!1;let o=new Set(Object.keys(r));if([...lw].every(n=>!o.has(n)))return!1;for(let n of lw)o.delete(n);if(o.size===0)return t[e]=void 0,!0;let a={...r};for(let n of lw)delete a[n];return t[e]=a,!0}async function qvt(){let t=e=>{let r=!1,o=_e.isIndexableObject(e)?{...e}:{};o.npmAuthToken&&(delete o.npmAuthToken,r=!0);for(let a of Object.keys(o))Hvt(o,a)&&(r=!0);if(Object.keys(o).length!==0)return r?o:e};return await Ke.updateHomeConfiguration({npmRegistries:t,npmScopes:t})}async function IBe(t,e){return await Ke.updateHomeConfiguration({[t]:r=>{let o=_e.isIndexableObject(r)?r:{};if(!Object.hasOwn(o,e))return r;let a=o[e],n=_e.isIndexableObject(a)?a:{},u=new Set(Object.keys(n));if([...lw].every(p=>!u.has(p)))return r;for(let p of lw)u.delete(p);if(u.size===0)return Object.keys(o).length===1?void 0:{...o,[e]:void 0};let A={};for(let p of lw)A[p]=void 0;return{...o,[e]:{...n,...A}}}})}Ye();qt();var W0=class extends ut{constructor(){super(...arguments);this.access=ge.String("--access",{description:"The access for the published package (public or restricted)"});this.tag=ge.String("--tag","latest",{description:"The tag on the registry that the package should be attached to"});this.tolerateRepublish=ge.Boolean("--tolerate-republish",!1,{description:"Warn and exit when republishing an already existing version of a package"});this.otp=ge.String("--otp",{description:"The OTP token to use with the command"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);if(a.manifest.private)throw new it("Private workspaces cannot be published");if(a.manifest.name===null||a.manifest.version===null)throw new it("Workspaces must have valid names and versions to be published on an external registry");await o.restoreInstallState();let n=a.manifest.name,u=a.manifest.version,A=$n.getPublishRegistry(a.manifest,{configuration:r});return(await Lt.start({configuration:r,stdout:this.context.stdout},async h=>{if(this.tolerateRepublish)try{let E=await Zr.get(Zr.getIdentUrl(n),{configuration:r,registry:A,ident:n,jsonResponse:!0});if(!Object.hasOwn(E,"versions"))throw new Jt(15,'Registry returned invalid data for - missing "versions" field');if(Object.hasOwn(E.versions,u)){h.reportWarning(0,`Registry already knows about version ${u}; skipping.`);return}}catch(E){if(E.originalError?.response?.statusCode!==404)throw E}await un.maybeExecuteWorkspaceLifecycleScript(a,"prepublish",{report:h}),await wA.prepareForPack(a,{report:h},async()=>{let E=await wA.genPackList(a);for(let R of E)h.reportInfo(null,R);let I=await wA.genPackStream(a,E),v=await _e.bufferStream(I),x=await ow.getGitHead(a.cwd),C=await ow.makePublishBody(a,v,{access:this.access,tag:this.tag,registry:A,gitHead:x});await Zr.put(Zr.getIdentUrl(n),C,{configuration:r,registry:A,ident:n,otp:this.otp,jsonResponse:!0})}),h.reportInfo(0,"Package archive published")})).exitCode()}};W0.paths=[["npm","publish"]],W0.usage=nt.Usage({category:"Npm-related commands",description:"publish the active workspace to the npm registry",details:'\n This command will pack the active workspace into a fresh archive and upload it to the npm registry.\n\n The package will by default be attached to the `latest` tag on the registry, but this behavior can be overridden by using the `--tag` option.\n\n Note that for legacy reasons scoped packages are by default published with an access set to `restricted` (aka "private packages"). This requires you to register for a paid npm plan. In case you simply wish to publish a public scoped package to the registry (for free), just add the `--access public` flag. This behavior can be enabled by default through the `npmPublishAccess` settings.\n ',examples:[["Publish the active workspace","yarn npm publish"]]});Ye();qt();var BBe=$e(Jn());Ye();Pt();qt();var K0=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=ge.String({required:!1})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n;if(typeof this.package<"u")n=W.parseIdent(this.package);else{if(!a)throw new nr(o.cwd,this.context.cwd);if(!a.manifest.name)throw new it(`Missing 'name' field in ${le.fromPortablePath(z.join(a.cwd,dr.manifest))}`);n=a.manifest.name}let u=await Tv(n,r),p={children:_e.sortMap(Object.entries(u),([h])=>h).map(([h,E])=>({value:de.tuple(de.Type.RESOLUTION,{descriptor:W.makeDescriptor(n,h),locator:W.makeLocator(n,E)})}))};return $s.emitTree(p,{configuration:r,json:this.json,stdout:this.context.stdout})}};K0.paths=[["npm","tag","list"]],K0.usage=nt.Usage({category:"Npm-related commands",description:"list all dist-tags of a package",details:` This command will list all tags of a package from the npm registry. If the package is not specified, Yarn will default to the current workspace. `,examples:[["List all tags of package `my-pkg`","yarn npm tag list my-pkg"]]});async function Tv(t,e){let r=`/-/package${Zr.getIdentUrl(t)}/dist-tags`;return Zr.get(r,{configuration:e,ident:t,jsonResponse:!0,customErrorMessage:Zr.customPackageError})}var z0=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);let n=W.parseDescriptor(this.package,!0),u=n.range;if(!BBe.default.valid(u))throw new it(`The range ${de.pretty(r,n.range,de.Type.RANGE)} must be a valid semver version`);let A=$n.getPublishRegistry(a.manifest,{configuration:r}),p=de.pretty(r,n,de.Type.IDENT),h=de.pretty(r,u,de.Type.RANGE),E=de.pretty(r,this.tag,de.Type.CODE);return(await Lt.start({configuration:r,stdout:this.context.stdout},async v=>{let x=await Tv(n,r);Object.hasOwn(x,this.tag)&&x[this.tag]===u&&v.reportWarning(0,`Tag ${E} is already set to version ${h}`);let C=`/-/package${Zr.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Zr.put(C,u,{configuration:r,registry:A,ident:n,jsonRequest:!0,jsonResponse:!0}),v.reportInfo(0,`Tag ${E} added to version ${h} of package ${p}`)})).exitCode()}};z0.paths=[["npm","tag","add"]],z0.usage=nt.Usage({category:"Npm-related commands",description:"add a tag for a specific version of a package",details:` This command will add a tag to the npm registry for a specific version of a package. If the tag already exists, it will be overwritten. `,examples:[["Add a `beta` tag for version `2.3.4-beta.4` of package `my-pkg`","yarn npm tag add my-pkg@2.3.4-beta.4 beta"]]});Ye();qt();var V0=class extends ut{constructor(){super(...arguments);this.package=ge.String();this.tag=ge.String()}async execute(){if(this.tag==="latest")throw new it("The 'latest' tag cannot be removed.");let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);let n=W.parseIdent(this.package),u=$n.getPublishRegistry(a.manifest,{configuration:r}),A=de.pretty(r,this.tag,de.Type.CODE),p=de.pretty(r,n,de.Type.IDENT),h=await Tv(n,r);if(!Object.hasOwn(h,this.tag))throw new it(`${A} is not a tag of package ${p}`);return(await Lt.start({configuration:r,stdout:this.context.stdout},async I=>{let v=`/-/package${Zr.getIdentUrl(n)}/dist-tags/${encodeURIComponent(this.tag)}`;await Zr.del(v,{configuration:r,registry:u,ident:n,jsonResponse:!0}),I.reportInfo(0,`Tag ${A} removed from package ${p}`)})).exitCode()}};V0.paths=[["npm","tag","remove"]],V0.usage=nt.Usage({category:"Npm-related commands",description:"remove a tag from a package",details:` This command will remove a tag from a package from the npm registry. `,examples:[["Remove the `beta` tag from package `my-pkg`","yarn npm tag remove my-pkg beta"]]});Ye();Ye();qt();var J0=class extends ut{constructor(){super(...arguments);this.scope=ge.String("-s,--scope",{description:"Print username for the registry configured for a given scope"});this.publish=ge.Boolean("--publish",!1,{description:"Print username for the publish registry"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),o;return this.scope&&this.publish?o=$n.getScopeRegistry(this.scope,{configuration:r,type:$n.RegistryType.PUBLISH_REGISTRY}):this.scope?o=$n.getScopeRegistry(this.scope,{configuration:r}):this.publish?o=$n.getPublishRegistry((await fC(r,this.context.cwd)).manifest,{configuration:r}):o=$n.getDefaultRegistry({configuration:r}),(await Lt.start({configuration:r,stdout:this.context.stdout},async n=>{let u;try{u=await Zr.get("/-/whoami",{configuration:r,registry:o,authType:Zr.AuthType.ALWAYS_AUTH,jsonResponse:!0,ident:this.scope?W.makeIdent(this.scope,""):void 0})}catch(A){if(A.response?.statusCode===401||A.response?.statusCode===403){n.reportError(41,"Authentication failed - your credentials may have expired");return}else throw A}n.reportInfo(0,u.username)})).exitCode()}};J0.paths=[["npm","whoami"]],J0.usage=nt.Usage({category:"Npm-related commands",description:"display the name of the authenticated user",details:"\n Print the username associated with the current authentication settings to the standard output.\n\n When using `-s,--scope`, the username printed will be the one that matches the authentication settings of the registry associated with the given scope (those settings can be overriden using the `npmRegistries` map, and the registry associated with the scope is configured via the `npmScopes` map).\n\n When using `--publish`, the registry we'll select will by default be the one used when publishing packages (`publishConfig.registry` or `npmPublishRegistry` if available, otherwise we'll fallback to the regular `npmRegistryServer`).\n ",examples:[["Print username for the default registry","yarn npm whoami"],["Print username for the registry on a given scope","yarn npm whoami --scope company"]]});var Gvt={configuration:{npmPublishAccess:{description:"Default access of the published packages",type:"STRING",default:null},npmAuditExcludePackages:{description:"Array of glob patterns of packages to exclude from npm audit",type:"STRING",default:[],isArray:!0},npmAuditIgnoreAdvisories:{description:"Array of glob patterns of advisory IDs to exclude from npm audit",type:"STRING",default:[],isArray:!0}},commands:[q0,G0,j0,Y0,W0,z0,K0,V0,J0]},jvt=Gvt;var Fj={};zt(Fj,{PatchCommand:()=>$0,PatchCommitCommand:()=>Z0,PatchFetcher:()=>Uv,PatchResolver:()=>_v,default:()=>lDt,patchUtils:()=>Pm});Ye();Ye();Pt();iA();var Pm={};zt(Pm,{applyPatchFile:()=>tF,diffFolders:()=>kj,ensureUnpatchedDescriptor:()=>Pj,ensureUnpatchedLocator:()=>nF,extractPackageToDisk:()=>xj,extractPatchFlags:()=>kBe,isParentRequired:()=>bj,isPatchDescriptor:()=>rF,isPatchLocator:()=>X0,loadPatchFiles:()=>Mv,makeDescriptor:()=>iF,makeLocator:()=>Sj,makePatchHash:()=>Qj,parseDescriptor:()=>Nv,parseLocator:()=>Ov,parsePatchFile:()=>Lv,unpatchDescriptor:()=>sDt,unpatchLocator:()=>oDt});Ye();Pt();Ye();Pt();var Yvt=/^@@ -(\d+)(,(\d+))? \+(\d+)(,(\d+))? @@.*/;function cw(t){return z.relative(Bt.root,z.resolve(Bt.root,le.toPortablePath(t)))}function Wvt(t){let e=t.trim().match(Yvt);if(!e)throw new Error(`Bad header line: '${t}'`);return{original:{start:Math.max(Number(e[1]),1),length:Number(e[3]||1)},patched:{start:Math.max(Number(e[4]),1),length:Number(e[6]||1)}}}var Kvt=420,zvt=493;var vBe=()=>({semverExclusivity:null,diffLineFromPath:null,diffLineToPath:null,oldMode:null,newMode:null,deletedFileMode:null,newFileMode:null,renameFrom:null,renameTo:null,beforeHash:null,afterHash:null,fromPath:null,toPath:null,hunks:null}),Vvt=t=>({header:Wvt(t),parts:[]}),Jvt={["@"]:"header",["-"]:"deletion",["+"]:"insertion",[" "]:"context",["\\"]:"pragma",undefined:"context"};function Xvt(t){let e=[],r=vBe(),o="parsing header",a=null,n=null;function u(){a&&(n&&(a.parts.push(n),n=null),r.hunks.push(a),a=null)}function A(){u(),e.push(r),r=vBe()}for(let p=0;p0?"patch":"mode change",V=null;switch(U){case"rename":{if(!E||!I)throw new Error("Bad parser state: rename from & to not given");e.push({type:"rename",semverExclusivity:o,fromPath:cw(E),toPath:cw(I)}),V=I}break;case"file deletion":{let te=a||C;if(!te)throw new Error("Bad parse state: no path given for file deletion");e.push({type:"file deletion",semverExclusivity:o,hunk:N&&N[0]||null,path:cw(te),mode:eF(p),hash:v})}break;case"file creation":{let te=n||R;if(!te)throw new Error("Bad parse state: no path given for file creation");e.push({type:"file creation",semverExclusivity:o,hunk:N&&N[0]||null,path:cw(te),mode:eF(h),hash:x})}break;case"patch":case"mode change":V=R||n;break;default:_e.assertNever(U);break}V&&u&&A&&u!==A&&e.push({type:"mode change",semverExclusivity:o,path:cw(V),oldMode:eF(u),newMode:eF(A)}),V&&N&&N.length&&e.push({type:"patch",semverExclusivity:o,path:cw(V),hunks:N,beforeHash:v,afterHash:x})}if(e.length===0)throw new Error("Unable to parse patch file: No changes found. Make sure the patch is a valid UTF8 encoded string");return e}function eF(t){let e=parseInt(t,8)&511;if(e!==Kvt&&e!==zvt)throw new Error(`Unexpected file mode string: ${t}`);return e}function Lv(t){let e=t.split(/\n/g);return e[e.length-1]===""&&e.pop(),Zvt(Xvt(e))}function $vt(t){let e=0,r=0;for(let{type:o,lines:a}of t.parts)switch(o){case"context":r+=a.length,e+=a.length;break;case"deletion":e+=a.length;break;case"insertion":r+=a.length;break;default:_e.assertNever(o);break}if(e!==t.header.original.length||r!==t.header.patched.length){let o=a=>a<0?a:`+${a}`;throw new Error(`hunk header integrity check failed (expected @@ ${o(t.header.original.length)} ${o(t.header.patched.length)} @@, got @@ ${o(e)} ${o(r)} @@)`)}}Ye();Pt();var uw=class extends Error{constructor(r,o){super(`Cannot apply hunk #${r+1}`);this.hunk=o}};async function Aw(t,e,r){let o=await t.lstatPromise(e),a=await r();typeof a<"u"&&(e=a),await t.lutimesPromise(e,o.atime,o.mtime)}async function tF(t,{baseFs:e=new Tn,dryRun:r=!1,version:o=null}={}){for(let a of t)if(!(a.semverExclusivity!==null&&o!==null&&!kr.satisfiesWithPrereleases(o,a.semverExclusivity)))switch(a.type){case"file deletion":if(r){if(!e.existsSync(a.path))throw new Error(`Trying to delete a file that doesn't exist: ${a.path}`)}else await Aw(e,z.dirname(a.path),async()=>{await e.unlinkPromise(a.path)});break;case"rename":if(r){if(!e.existsSync(a.fromPath))throw new Error(`Trying to move a file that doesn't exist: ${a.fromPath}`)}else await Aw(e,z.dirname(a.fromPath),async()=>{await Aw(e,z.dirname(a.toPath),async()=>{await Aw(e,a.fromPath,async()=>(await e.movePromise(a.fromPath,a.toPath),a.toPath))})});break;case"file creation":if(r){if(e.existsSync(a.path))throw new Error(`Trying to create a file that already exists: ${a.path}`)}else{let n=a.hunk?a.hunk.parts[0].lines.join(` `)+(a.hunk.parts[0].noNewlineAtEndOfFile?"":` `):"";await e.mkdirpPromise(z.dirname(a.path),{chmod:493,utimes:[vi.SAFE_TIME,vi.SAFE_TIME]}),await e.writeFilePromise(a.path,n,{mode:a.mode}),await e.utimesPromise(a.path,vi.SAFE_TIME,vi.SAFE_TIME)}break;case"patch":await Aw(e,a.path,async()=>{await rDt(a,{baseFs:e,dryRun:r})});break;case"mode change":{let u=(await e.statPromise(a.path)).mode;if(DBe(a.newMode)!==DBe(u))continue;await Aw(e,a.path,async()=>{await e.chmodPromise(a.path,a.newMode)})}break;default:_e.assertNever(a);break}}function DBe(t){return(t&64)>0}function PBe(t){return t.replace(/\s+$/,"")}function tDt(t,e){return PBe(t)===PBe(e)}async function rDt({hunks:t,path:e},{baseFs:r,dryRun:o=!1}){let a=await r.statSync(e).mode,u=(await r.readFileSync(e,"utf8")).split(/\n/),A=[],p=0,h=0;for(let I of t){let v=Math.max(h,I.header.patched.start+p),x=Math.max(0,v-h),C=Math.max(0,u.length-v-I.header.original.length),R=Math.max(x,C),N=0,U=0,V=null;for(;N<=R;){if(N<=x&&(U=v-N,V=SBe(I,u,U),V!==null)){N=-N;break}if(N<=C&&(U=v+N,V=SBe(I,u,U),V!==null))break;N+=1}if(V===null)throw new uw(t.indexOf(I),I);A.push(V),p+=N,h=U+I.header.original.length}if(o)return;let E=0;for(let I of A)for(let v of I)switch(v.type){case"splice":{let x=v.index+E;u.splice(x,v.numToDelete,...v.linesToInsert),E+=v.linesToInsert.length-v.numToDelete}break;case"pop":u.pop();break;case"push":u.push(v.line);break;default:_e.assertNever(v);break}await r.writeFilePromise(e,u.join(` `),{mode:a})}function SBe(t,e,r){let o=[];for(let a of t.parts)switch(a.type){case"context":case"deletion":{for(let n of a.lines){let u=e[r];if(u==null||!tDt(u,n))return null;r+=1}a.type==="deletion"&&(o.push({type:"splice",index:r-a.lines.length,numToDelete:a.lines.length,linesToInsert:[]}),a.noNewlineAtEndOfFile&&o.push({type:"push",line:""}))}break;case"insertion":o.push({type:"splice",index:r,numToDelete:0,linesToInsert:a.lines}),a.noNewlineAtEndOfFile&&o.push({type:"pop"});break;default:_e.assertNever(a.type);break}return o}var iDt=/^builtin<([^>]+)>$/;function fw(t,e){let{protocol:r,source:o,selector:a,params:n}=W.parseRange(t);if(r!=="patch:")throw new Error("Invalid patch range");if(o===null)throw new Error("Patch locators must explicitly define their source");let u=a?a.split(/&/).map(E=>le.toPortablePath(E)):[],A=n&&typeof n.locator=="string"?W.parseLocator(n.locator):null,p=n&&typeof n.version=="string"?n.version:null,h=e(o);return{parentLocator:A,sourceItem:h,patchPaths:u,sourceVersion:p}}function rF(t){return t.range.startsWith("patch:")}function X0(t){return t.reference.startsWith("patch:")}function Nv(t){let{sourceItem:e,...r}=fw(t.range,W.parseDescriptor);return{...r,sourceDescriptor:e}}function Ov(t){let{sourceItem:e,...r}=fw(t.reference,W.parseLocator);return{...r,sourceLocator:e}}function sDt(t){let{sourceItem:e}=fw(t.range,W.parseDescriptor);return e}function oDt(t){let{sourceItem:e}=fw(t.reference,W.parseLocator);return e}function Pj(t){if(!rF(t))return t;let{sourceItem:e}=fw(t.range,W.parseDescriptor);return e}function nF(t){if(!X0(t))return t;let{sourceItem:e}=fw(t.reference,W.parseLocator);return e}function bBe({parentLocator:t,sourceItem:e,patchPaths:r,sourceVersion:o,patchHash:a},n){let u=t!==null?{locator:W.stringifyLocator(t)}:{},A=typeof o<"u"?{version:o}:{},p=typeof a<"u"?{hash:a}:{};return W.makeRange({protocol:"patch:",source:n(e),selector:r.join("&"),params:{...A,...p,...u}})}function iF(t,{parentLocator:e,sourceDescriptor:r,patchPaths:o}){return W.makeDescriptor(t,bBe({parentLocator:e,sourceItem:r,patchPaths:o},W.stringifyDescriptor))}function Sj(t,{parentLocator:e,sourcePackage:r,patchPaths:o,patchHash:a}){return W.makeLocator(t,bBe({parentLocator:e,sourceItem:r,sourceVersion:r.version,patchPaths:o,patchHash:a},W.stringifyLocator))}function xBe({onAbsolute:t,onRelative:e,onProject:r,onBuiltin:o},a){let n=a.lastIndexOf("!");n!==-1&&(a=a.slice(n+1));let u=a.match(iDt);return u!==null?o(u[1]):a.startsWith("~/")?r(a.slice(2)):z.isAbsolute(a)?t(a):e(a)}function kBe(t){let e=t.lastIndexOf("!");return{optional:(e!==-1?new Set(t.slice(0,e).split(/!/)):new Set).has("optional")}}function bj(t){return xBe({onAbsolute:()=>!1,onRelative:()=>!0,onProject:()=>!1,onBuiltin:()=>!1},t)}async function Mv(t,e,r){let o=t!==null?await r.fetcher.fetch(t,r):null,a=o&&o.localPath?{packageFs:new gn(Bt.root),prefixPath:z.relative(Bt.root,o.localPath)}:o;o&&o!==a&&o.releaseFs&&o.releaseFs();let n=await _e.releaseAfterUseAsync(async()=>await Promise.all(e.map(async u=>{let A=kBe(u),p=await xBe({onAbsolute:async h=>await oe.readFilePromise(h,"utf8"),onRelative:async h=>{if(a===null)throw new Error("Assertion failed: The parent locator should have been fetched");return await a.packageFs.readFilePromise(z.join(a.prefixPath,h),"utf8")},onProject:async h=>await oe.readFilePromise(z.join(r.project.cwd,h),"utf8"),onBuiltin:async h=>await r.project.configuration.firstHook(E=>E.getBuiltinPatch,r.project,h)},u);return{...A,source:p}})));for(let u of n)typeof u.source=="string"&&(u.source=u.source.replace(/\r\n?/g,` `));return n}async function xj(t,{cache:e,project:r}){let o=r.storedPackages.get(t.locatorHash);if(typeof o>"u")throw new Error("Assertion failed: Expected the package to be registered");let a=nF(t),n=r.storedChecksums,u=new Qi,A=await oe.mktempPromise(),p=z.join(A,"source"),h=z.join(A,"user"),E=z.join(A,".yarn-patch.json"),I=r.configuration.makeFetcher(),v=[];try{let x,C;if(t.locatorHash===a.locatorHash){let R=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u});v.push(()=>R.releaseFs?.()),x=R,C=R}else x=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>x.releaseFs?.()),C=await I.fetch(t,{cache:e,project:r,fetcher:I,checksums:n,report:u}),v.push(()=>C.releaseFs?.());await Promise.all([oe.copyPromise(p,x.prefixPath,{baseFs:x.packageFs}),oe.copyPromise(h,C.prefixPath,{baseFs:C.packageFs}),oe.writeJsonPromise(E,{locator:W.stringifyLocator(t),version:o.version})])}finally{for(let x of v)x()}return oe.detachTemp(A),h}async function kj(t,e){let r=le.fromPortablePath(t).replace(/\\/g,"/"),o=le.fromPortablePath(e).replace(/\\/g,"/"),{stdout:a,stderr:n}=await Ur.execvp("git",["-c","core.safecrlf=false","diff","--src-prefix=a/","--dst-prefix=b/","--ignore-cr-at-eol","--full-index","--no-index","--no-renames","--text",r,o],{cwd:le.toPortablePath(process.cwd()),env:{...process.env,GIT_CONFIG_NOSYSTEM:"1",HOME:"",XDG_CONFIG_HOME:"",USERPROFILE:""}});if(n.length>0)throw new Error(`Unable to diff directories. Make sure you have a recent version of 'git' available in PATH. The following error was reported by 'git': ${n}`);let u=r.startsWith("/")?A=>A.slice(1):A=>A;return a.replace(new RegExp(`(a|b)(${_e.escapeRegExp(`/${u(r)}/`)})`,"g"),"$1/").replace(new RegExp(`(a|b)${_e.escapeRegExp(`/${u(o)}/`)}`,"g"),"$1/").replace(new RegExp(_e.escapeRegExp(`${r}/`),"g"),"").replace(new RegExp(_e.escapeRegExp(`${o}/`),"g"),"")}function Qj(t,e){let r=[];for(let{source:o}of t){if(o===null)continue;let a=Lv(o);for(let n of a){let{semverExclusivity:u,...A}=n;u!==null&&e!==null&&!kr.satisfiesWithPrereleases(e,u)||r.push(JSON.stringify(A))}}return wn.makeHash(`${3}`,...r).slice(0,6)}Ye();function QBe(t,{configuration:e,report:r}){for(let o of t.parts)for(let a of o.lines)switch(o.type){case"context":r.reportInfo(null,` ${de.pretty(e,a,"grey")}`);break;case"deletion":r.reportError(28,`- ${de.pretty(e,a,de.Type.REMOVED)}`);break;case"insertion":r.reportError(28,`+ ${de.pretty(e,a,de.Type.ADDED)}`);break;default:_e.assertNever(o.type)}}var Uv=class{supports(e,r){return!!X0(e)}getLocalPath(e,r){return null}async fetch(e,r){let o=r.checksums.get(e.locatorHash)||null,[a,n,u]=await r.cache.fetchPackageFromCache(e,o,{onHit:()=>r.report.reportCacheHit(e),onMiss:()=>r.report.reportCacheMiss(e,`${W.prettyLocator(r.project.configuration,e)} can't be found in the cache and will be fetched from the disk`),loader:()=>this.patchPackage(e,r),...r.cacheOptions});return{packageFs:a,releaseFs:n,prefixPath:W.getIdentVendorPath(e),localPath:this.getLocalPath(e,r),checksum:u}}async patchPackage(e,r){let{parentLocator:o,sourceLocator:a,sourceVersion:n,patchPaths:u}=Ov(e),A=await Mv(o,u,r),p=await oe.mktempPromise(),h=z.join(p,"current.zip"),E=await r.fetcher.fetch(a,r),I=W.getIdentVendorPath(e),v=new Ji(h,{create:!0,level:r.project.configuration.get("compressionLevel")});await _e.releaseAfterUseAsync(async()=>{await v.copyPromise(I,E.prefixPath,{baseFs:E.packageFs,stableSort:!0})},E.releaseFs),v.saveAndClose();for(let{source:x,optional:C}of A){if(x===null)continue;let R=new Ji(h,{level:r.project.configuration.get("compressionLevel")}),N=new gn(z.resolve(Bt.root,I),{baseFs:R});try{await tF(Lv(x),{baseFs:N,version:n})}catch(U){if(!(U instanceof uw))throw U;let V=r.project.configuration.get("enableInlineHunks"),te=!V&&!C?" (set enableInlineHunks for details)":"",ae=`${W.prettyLocator(r.project.configuration,e)}: ${U.message}${te}`,fe=ue=>{!V||QBe(U.hunk,{configuration:r.project.configuration,report:ue})};if(R.discardAndClose(),C){r.report.reportWarningOnce(66,ae,{reportExtra:fe});continue}else throw new Jt(66,ae,fe)}R.saveAndClose()}return new Ji(h,{level:r.project.configuration.get("compressionLevel")})}};Ye();var _v=class{supportsDescriptor(e,r){return!!rF(e)}supportsLocator(e,r){return!!X0(e)}shouldPersistResolution(e,r){return!1}bindDescriptor(e,r,o){let{patchPaths:a}=Nv(e);return a.every(n=>!bj(n))?e:W.bindDescriptor(e,{locator:W.stringifyLocator(r)})}getResolutionDependencies(e,r){let{sourceDescriptor:o}=Nv(e);return{sourceDescriptor:r.project.configuration.normalizeDependency(o)}}async getCandidates(e,r,o){if(!o.fetchOptions)throw new Error("Assertion failed: This resolver cannot be used unless a fetcher is configured");let{parentLocator:a,patchPaths:n}=Nv(e),u=await Mv(a,n,o.fetchOptions),A=r.sourceDescriptor;if(typeof A>"u")throw new Error("Assertion failed: The dependency should have been resolved");let p=Qj(u,A.version);return[Sj(e,{parentLocator:a,sourcePackage:A,patchPaths:n,patchHash:p})]}async getSatisfying(e,r,o,a){let[n]=await this.getCandidates(e,r,a);return{locators:o.filter(u=>u.locatorHash===n.locatorHash),sorted:!1}}async resolve(e,r){let{sourceLocator:o}=Ov(e);return{...await r.resolver.resolve(o,r),...e}}};Ye();Pt();qt();var Z0=class extends ut{constructor(){super(...arguments);this.save=ge.Boolean("-s,--save",!1,{description:"Add the patch to your resolution entries"});this.patchFolder=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=z.resolve(this.context.cwd,le.toPortablePath(this.patchFolder)),u=z.join(n,"../source"),A=z.join(n,"../.yarn-patch.json");if(!oe.existsSync(u))throw new it("The argument folder didn't get created by 'yarn patch'");let p=await kj(u,n),h=await oe.readJsonPromise(A),E=W.parseLocator(h.locator,!0);if(!o.storedPackages.has(E.locatorHash))throw new it("No package found in the project for the given locator");if(!this.save){this.context.stdout.write(p);return}let I=r.get("patchFolder"),v=z.join(I,`${W.slugifyLocator(E)}.patch`);await oe.mkdirPromise(I,{recursive:!0}),await oe.writeFilePromise(v,p);let x=[],C=new Map;for(let R of o.storedPackages.values()){if(W.isVirtualLocator(R))continue;let N=R.dependencies.get(E.identHash);if(!N)continue;let U=W.ensureDevirtualizedDescriptor(N),V=Pj(U),te=o.storedResolutions.get(V.descriptorHash);if(!te)throw new Error("Assertion failed: Expected the resolution to have been registered");if(!o.storedPackages.get(te))throw new Error("Assertion failed: Expected the package to have been registered");let fe=o.tryWorkspaceByLocator(R);if(fe)x.push(fe);else{let ue=o.originalPackages.get(R.locatorHash);if(!ue)throw new Error("Assertion failed: Expected the original package to have been registered");let me=ue.dependencies.get(N.identHash);if(!me)throw new Error("Assertion failed: Expected the original dependency to have been registered");C.set(me.descriptorHash,me)}}for(let R of x)for(let N of Ot.hardDependencies){let U=R.manifest[N].get(E.identHash);if(!U)continue;let V=iF(U,{parentLocator:null,sourceDescriptor:W.convertLocatorToDescriptor(E),patchPaths:[z.join(dr.home,z.relative(o.cwd,v))]});R.manifest[N].set(U.identHash,V)}for(let R of C.values()){let N=iF(R,{parentLocator:null,sourceDescriptor:W.convertLocatorToDescriptor(E),patchPaths:[z.join(dr.home,z.relative(o.cwd,v))]});o.topLevelWorkspace.manifest.resolutions.push({pattern:{descriptor:{fullName:W.stringifyIdent(N),description:R.range}},reference:N.range})}await o.persist()}};Z0.paths=[["patch-commit"]],Z0.usage=nt.Usage({description:"generate a patch out of a directory",details:"\n By default, this will print a patchfile on stdout based on the diff between the folder passed in and the original version of the package. Such file is suitable for consumption with the `patch:` protocol.\n\n With the `-s,--save` option set, the patchfile won't be printed on stdout anymore and will instead be stored within a local file (by default kept within `.yarn/patches`, but configurable via the `patchFolder` setting). A `resolutions` entry will also be added to your top-level manifest, referencing the patched package via the `patch:` protocol.\n\n Note that only folders generated by `yarn patch` are accepted as valid input for `yarn patch-commit`.\n "});Ye();Pt();qt();var $0=class extends ut{constructor(){super(...arguments);this.update=ge.Boolean("-u,--update",!1,{description:"Reapply local patches that already apply to this packages"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.package=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState();let u=W.parseLocator(this.package);if(u.reference==="unknown"){let A=_e.mapAndFilter([...o.storedPackages.values()],p=>p.identHash!==u.identHash?_e.mapAndFilter.skip:W.isVirtualLocator(p)?_e.mapAndFilter.skip:X0(p)!==this.update?_e.mapAndFilter.skip:p);if(A.length===0)throw new it("No package found in the project for the given locator");if(A.length>1)throw new it(`Multiple candidate packages found; explicitly choose one of them (use \`yarn why \` to get more information as to who depends on them): ${A.map(p=>` - ${W.prettyLocator(r,p)}`).join("")}`);u=A[0]}if(!o.storedPackages.has(u.locatorHash))throw new it("No package found in the project for the given locator");await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=nF(u),h=await xj(u,{cache:n,project:o});A.reportJson({locator:W.stringifyLocator(p),path:le.fromPortablePath(h)});let E=this.update?" along with its current modifications":"";A.reportInfo(0,`Package ${W.prettyLocator(r,p)} got extracted with success${E}!`),A.reportInfo(0,`You can now edit the following folder: ${de.pretty(r,le.fromPortablePath(h),"magenta")}`),A.reportInfo(0,`Once you are done run ${de.pretty(r,`yarn patch-commit -s ${process.platform==="win32"?'"':""}${le.fromPortablePath(h)}${process.platform==="win32"?'"':""}`,"cyan")} and Yarn will store a patchfile based on your changes.`)})}};$0.paths=[["patch"]],$0.usage=nt.Usage({description:"prepare a package for patching",details:"\n This command will cause a package to be extracted in a temporary directory intended to be editable at will.\n\n Once you're done with your changes, run `yarn patch-commit -s path` (with `path` being the temporary directory you received) to generate a patchfile and register it into your top-level manifest via the `patch:` protocol. Run `yarn patch-commit -h` for more details.\n\n Calling the command when you already have a patch won't import it by default (in other words, the default behavior is to reset existing patches). However, adding the `-u,--update` flag will import any current patch.\n "});var aDt={configuration:{enableInlineHunks:{description:"If true, the installs will print unmatched patch hunks",type:"BOOLEAN",default:!1},patchFolder:{description:"Folder where the patch files must be written",type:"ABSOLUTE_PATH",default:"./.yarn/patches"}},commands:[Z0,$0],fetchers:[Uv],resolvers:[_v]},lDt=aDt;var Lj={};zt(Lj,{PnpmLinker:()=>Hv,default:()=>pDt});Ye();Pt();qt();var Hv=class{getCustomDataKey(){return JSON.stringify({name:"PnpmLinker",version:3})}supportsPackage(e,r){return this.isEnabled(r)}async findPackageLocation(e,r){if(!this.isEnabled(r))throw new Error("Assertion failed: Expected the pnpm linker to be enabled");let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new it(`The project in ${de.pretty(r.project.configuration,`${r.project.cwd}/package.json`,de.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=a.pathsByLocator.get(e.locatorHash);if(typeof n>"u")throw new it(`Couldn't find ${W.prettyLocator(r.project.configuration,e)} in the currently installed pnpm map - running an install might help`);return n.packageLocation}async findPackageLocator(e,r){if(!this.isEnabled(r))return null;let o=this.getCustomDataKey(),a=r.project.linkersCustomData.get(o);if(!a)throw new it(`The project in ${de.pretty(r.project.configuration,`${r.project.cwd}/package.json`,de.Type.PATH)} doesn't seem to have been installed - running an install there might help`);let n=e.match(/(^.*\/node_modules\/(@[^/]*\/)?[^/]+)(\/.*$)/);if(n){let p=a.locatorByPath.get(n[1]);if(p)return p}let u=e,A=e;do{A=u,u=z.dirname(A);let p=a.locatorByPath.get(A);if(p)return p}while(u!==A);return null}makeInstaller(e){return new Rj(e)}isEnabled(e){return e.project.configuration.get("nodeLinker")==="pnpm"}},Rj=class{constructor(e){this.opts=e;this.asyncActions=new _e.AsyncActions(10);this.customData={pathsByLocator:new Map,locatorByPath:new Map};this.indexFolderPromise=PD(oe,{indexPath:z.join(e.project.configuration.get("globalFolder"),"index")})}attachCustomData(e){}async installPackage(e,r,o){switch(e.linkType){case"SOFT":return this.installPackageSoft(e,r,o);case"HARD":return this.installPackageHard(e,r,o)}throw new Error("Assertion failed: Unsupported package link type")}async installPackageSoft(e,r,o){let a=z.resolve(r.packageFs.getRealPath(),r.prefixPath),n=this.opts.project.tryWorkspaceByLocator(e)?z.join(a,dr.nodeModules):null;return this.customData.pathsByLocator.set(e.locatorHash,{packageLocation:a,dependenciesLocation:n}),{packageLocation:a,buildRequest:null}}async installPackageHard(e,r,o){let a=cDt(e,{project:this.opts.project}),n=a.packageLocation;this.customData.locatorByPath.set(n,W.stringifyLocator(e)),this.customData.pathsByLocator.set(e.locatorHash,a),o.holdFetchResult(this.asyncActions.set(e.locatorHash,async()=>{await oe.mkdirPromise(n,{recursive:!0}),await oe.copyPromise(n,r.prefixPath,{baseFs:r.packageFs,overwrite:!1,linkStrategy:{type:"HardlinkFromIndex",indexPath:await this.indexFolderPromise,autoRepair:!0}})}));let A=W.isVirtualLocator(e)?W.devirtualizeLocator(e):e,p={manifest:await Ot.tryFind(r.prefixPath,{baseFs:r.packageFs})??new Ot,misc:{hasBindingGyp:yA.hasBindingGyp(r)}},h=this.opts.project.getDependencyMeta(A,e.version),E=yA.extractBuildRequest(e,p,h,{configuration:this.opts.project.configuration});return{packageLocation:n,buildRequest:E}}async attachInternalDependencies(e,r){if(this.opts.project.configuration.get("nodeLinker")!=="pnpm"||!FBe(e,{project:this.opts.project}))return;let o=this.customData.pathsByLocator.get(e.locatorHash);if(typeof o>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${W.stringifyLocator(e)})`);let{dependenciesLocation:a}=o;!a||this.asyncActions.reduce(e.locatorHash,async n=>{await oe.mkdirPromise(a,{recursive:!0});let u=await uDt(a),A=new Map(u),p=[n],h=(I,v)=>{let x=v;FBe(v,{project:this.opts.project})||(this.opts.report.reportWarningOnce(0,"The pnpm linker doesn't support providing different versions to workspaces' peer dependencies"),x=W.devirtualizeLocator(v));let C=this.customData.pathsByLocator.get(x.locatorHash);if(typeof C>"u")throw new Error(`Assertion failed: Expected the package to have been registered (${W.stringifyLocator(v)})`);let R=W.stringifyIdent(I),N=z.join(a,R),U=z.relative(z.dirname(N),C.packageLocation),V=A.get(R);A.delete(R),p.push(Promise.resolve().then(async()=>{if(V){if(V.isSymbolicLink()&&await oe.readlinkPromise(N)===U)return;await oe.removePromise(N)}await oe.mkdirpPromise(z.dirname(N)),process.platform=="win32"&&this.opts.project.configuration.get("winLinkType")==="junctions"?await oe.symlinkPromise(C.packageLocation,N,"junction"):await oe.symlinkPromise(U,N)}))},E=!1;for(let[I,v]of r)I.identHash===e.identHash&&(E=!0),h(I,v);!E&&!this.opts.project.tryWorkspaceByLocator(e)&&h(W.convertLocatorToDescriptor(e),e),p.push(ADt(a,A)),await Promise.all(p)})}async attachExternalDependents(e,r){throw new Error("External dependencies haven't been implemented for the pnpm linker")}async finalizeInstall(){let e=TBe(this.opts.project);if(this.opts.project.configuration.get("nodeLinker")!=="pnpm")await oe.removePromise(e);else{let r;try{r=new Set(await oe.readdirPromise(e))}catch{r=new Set}for(let{dependenciesLocation:o}of this.customData.pathsByLocator.values()){if(!o)continue;let a=z.contains(e,o);if(a===null)continue;let[n]=a.split(z.sep);r.delete(n)}await Promise.all([...r].map(async o=>{await oe.removePromise(z.join(e,o))}))}return await this.asyncActions.wait(),await Tj(e),this.opts.project.configuration.get("nodeLinker")!=="node-modules"&&await Tj(RBe(this.opts.project)),{customData:this.customData}}};function RBe(t){return z.join(t.cwd,dr.nodeModules)}function TBe(t){return z.join(RBe(t),".store")}function cDt(t,{project:e}){let r=W.slugifyLocator(t),o=TBe(e),a=z.join(o,r,"package"),n=z.join(o,r,dr.nodeModules);return{packageLocation:a,dependenciesLocation:n}}function FBe(t,{project:e}){return!W.isVirtualLocator(t)||!e.tryWorkspaceByLocator(t)}async function uDt(t){let e=new Map,r=[];try{r=await oe.readdirPromise(t,{withFileTypes:!0})}catch(o){if(o.code!=="ENOENT")throw o}try{for(let o of r)if(!o.name.startsWith("."))if(o.name.startsWith("@")){let a=await oe.readdirPromise(z.join(t,o.name),{withFileTypes:!0});if(a.length===0)e.set(o.name,o);else for(let n of a)e.set(`${o.name}/${n.name}`,n)}else e.set(o.name,o)}catch(o){if(o.code!=="ENOENT")throw o}return e}async function ADt(t,e){let r=[],o=new Set;for(let a of e.keys()){r.push(oe.removePromise(z.join(t,a)));let n=W.tryParseIdent(a)?.scope;n&&o.add(`@${n}`)}return Promise.all(r).then(()=>Promise.all([...o].map(a=>Tj(z.join(t,a)))))}async function Tj(t){try{await oe.rmdirPromise(t)}catch(e){if(e.code!=="ENOENT"&&e.code!=="ENOTEMPTY")throw e}}var fDt={linkers:[Hv]},pDt=fDt;var qj={};zt(qj,{StageCommand:()=>eg,default:()=>vDt,stageUtils:()=>oF});Ye();Pt();qt();Ye();Pt();var oF={};zt(oF,{ActionType:()=>Nj,checkConsensus:()=>sF,expandDirectory:()=>Uj,findConsensus:()=>_j,findVcsRoot:()=>Oj,genCommitMessage:()=>Hj,getCommitPrefix:()=>LBe,isYarnFile:()=>Mj});Pt();var Nj=(n=>(n[n.CREATE=0]="CREATE",n[n.DELETE=1]="DELETE",n[n.ADD=2]="ADD",n[n.REMOVE=3]="REMOVE",n[n.MODIFY=4]="MODIFY",n))(Nj||{});async function Oj(t,{marker:e}){do if(!oe.existsSync(z.join(t,e)))t=z.dirname(t);else return t;while(t!=="/");return null}function Mj(t,{roots:e,names:r}){if(r.has(z.basename(t)))return!0;do if(!e.has(t))t=z.dirname(t);else return!0;while(t!=="/");return!1}function Uj(t){let e=[],r=[t];for(;r.length>0;){let o=r.pop(),a=oe.readdirSync(o);for(let n of a){let u=z.resolve(o,n);oe.lstatSync(u).isDirectory()?r.push(u):e.push(u)}}return e}function sF(t,e){let r=0,o=0;for(let a of t)a!=="wip"&&(e.test(a)?r+=1:o+=1);return r>=o}function _j(t){let e=sF(t,/^(\w\(\w+\):\s*)?\w+s/),r=sF(t,/^(\w\(\w+\):\s*)?[A-Z]/),o=sF(t,/^\w\(\w+\):/);return{useThirdPerson:e,useUpperCase:r,useComponent:o}}function LBe(t){return t.useComponent?"chore(yarn): ":""}var hDt=new Map([[0,"create"],[1,"delete"],[2,"add"],[3,"remove"],[4,"update"]]);function Hj(t,e){let r=LBe(t),o=[],a=e.slice().sort((n,u)=>n[0]-u[0]);for(;a.length>0;){let[n,u]=a.shift(),A=hDt.get(n);t.useUpperCase&&o.length===0&&(A=`${A[0].toUpperCase()}${A.slice(1)}`),t.useThirdPerson&&(A+="s");let p=[u];for(;a.length>0&&a[0][0]===n;){let[,E]=a.shift();p.push(E)}p.sort();let h=p.shift();p.length===1?h+=" (and one other)":p.length>1&&(h+=` (and ${p.length} others)`),o.push(`${A} ${h}`)}return`${r}${o.join(", ")}`}var gDt="Commit generated via `yarn stage`",dDt=11;async function NBe(t){let{code:e,stdout:r}=await Ur.execvp("git",["log","-1","--pretty=format:%H"],{cwd:t});return e===0?r.trim():null}async function mDt(t,e){let r=[],o=e.filter(h=>z.basename(h.path)==="package.json");for(let{action:h,path:E}of o){let I=z.relative(t,E);if(h===4){let v=await NBe(t),{stdout:x}=await Ur.execvp("git",["show",`${v}:${I}`],{cwd:t,strict:!0}),C=await Ot.fromText(x),R=await Ot.fromFile(E),N=new Map([...R.dependencies,...R.devDependencies]),U=new Map([...C.dependencies,...C.devDependencies]);for(let[V,te]of U){let ae=W.stringifyIdent(te),fe=N.get(V);fe?fe.range!==te.range&&r.push([4,`${ae} to ${fe.range}`]):r.push([3,ae])}for(let[V,te]of N)U.has(V)||r.push([2,W.stringifyIdent(te)])}else if(h===0){let v=await Ot.fromFile(E);v.name?r.push([0,W.stringifyIdent(v.name)]):r.push([0,"a package"])}else if(h===1){let v=await NBe(t),{stdout:x}=await Ur.execvp("git",["show",`${v}:${I}`],{cwd:t,strict:!0}),C=await Ot.fromText(x);C.name?r.push([1,W.stringifyIdent(C.name)]):r.push([1,"a package"])}else throw new Error("Assertion failed: Unsupported action type")}let{code:a,stdout:n}=await Ur.execvp("git",["log",`-${dDt}`,"--pretty=format:%s"],{cwd:t}),u=a===0?n.split(/\n/g).filter(h=>h!==""):[],A=_j(u);return Hj(A,r)}var yDt={[0]:[" A ","?? "],[4]:[" M "],[1]:[" D "]},EDt={[0]:["A "],[4]:["M "],[1]:["D "]},OBe={async findRoot(t){return await Oj(t,{marker:".git"})},async filterChanges(t,e,r,o){let{stdout:a}=await Ur.execvp("git",["status","-s"],{cwd:t,strict:!0}),n=a.toString().split(/\n/g),u=o?.staged?EDt:yDt;return[].concat(...n.map(p=>{if(p==="")return[];let h=p.slice(0,3),E=z.resolve(t,p.slice(3));if(!o?.staged&&h==="?? "&&p.endsWith("/"))return Uj(E).map(I=>({action:0,path:I}));{let v=[0,4,1].find(x=>u[x].includes(h));return v!==void 0?[{action:v,path:E}]:[]}})).filter(p=>Mj(p.path,{roots:e,names:r}))},async genCommitMessage(t,e){return await mDt(t,e)},async makeStage(t,e){let r=e.map(o=>le.fromPortablePath(o.path));await Ur.execvp("git",["add","--",...r],{cwd:t,strict:!0})},async makeCommit(t,e,r){let o=e.map(a=>le.fromPortablePath(a.path));await Ur.execvp("git",["add","-N","--",...o],{cwd:t,strict:!0}),await Ur.execvp("git",["commit","-m",`${r} ${gDt} `,"--",...o],{cwd:t,strict:!0})},async makeReset(t,e){let r=e.map(o=>le.fromPortablePath(o.path));await Ur.execvp("git",["reset","HEAD","--",...r],{cwd:t,strict:!0})}};var CDt=[OBe],eg=class extends ut{constructor(){super(...arguments);this.commit=ge.Boolean("-c,--commit",!1,{description:"Commit the staged files"});this.reset=ge.Boolean("-r,--reset",!1,{description:"Remove all files from the staging area"});this.dryRun=ge.Boolean("-n,--dry-run",!1,{description:"Print the commit message and the list of modified files without staging / committing"});this.update=ge.Boolean("-u,--update",!1,{hidden:!0})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o}=await St.find(r,this.context.cwd),{driver:a,root:n}=await wDt(o.cwd),u=[r.get("cacheFolder"),r.get("globalFolder"),r.get("virtualFolder"),r.get("yarnPath")];await r.triggerHook(I=>I.populateYarnPaths,o,I=>{u.push(I)});let A=new Set;for(let I of u)for(let v of IDt(n,I))A.add(v);let p=new Set([r.get("rcFilename"),dr.lockfile,dr.manifest]),h=await a.filterChanges(n,A,p),E=await a.genCommitMessage(n,h);if(this.dryRun)if(this.commit)this.context.stdout.write(`${E} `);else for(let I of h)this.context.stdout.write(`${le.fromPortablePath(I.path)} `);else if(this.reset){let I=await a.filterChanges(n,A,p,{staged:!0});I.length===0?this.context.stdout.write("No staged changes found!"):await a.makeReset(n,I)}else h.length===0?this.context.stdout.write("No changes found!"):this.commit?await a.makeCommit(n,h,E):(await a.makeStage(n,h),this.context.stdout.write(E))}};eg.paths=[["stage"]],eg.usage=nt.Usage({description:"add all yarn files to your vcs",details:"\n This command will add to your staging area the files belonging to Yarn (typically any modified `package.json` and `.yarnrc.yml` files, but also linker-generated files, cache data, etc). It will take your ignore list into account, so the cache files won't be added if the cache is ignored in a `.gitignore` file (assuming you use Git).\n\n Running `--reset` will instead remove them from the staging area (the changes will still be there, but won't be committed until you stage them back).\n\n Since the staging area is a non-existent concept in Mercurial, Yarn will always create a new commit when running this command on Mercurial repositories. You can get this behavior when using Git by using the `--commit` flag which will directly create a commit.\n ",examples:[["Adds all modified project files to the staging area","yarn stage"],["Creates a new commit containing all modified project files","yarn stage --commit"]]});async function wDt(t){let e=null,r=null;for(let o of CDt)if((r=await o.findRoot(t))!==null){e=o;break}if(e===null||r===null)throw new it("No stage driver has been found for your current project");return{driver:e,root:r}}function IDt(t,e){let r=[];if(e===null)return r;for(;;){(e===t||e.startsWith(`${t}/`))&&r.push(e);let o;try{o=oe.statSync(e)}catch{break}if(o.isSymbolicLink())e=z.resolve(z.dirname(e),oe.readlinkSync(e));else break}return r}var BDt={commands:[eg]},vDt=BDt;var Gj={};zt(Gj,{default:()=>FDt});Ye();Ye();Pt();var _Be=$e(Jn());Ye();var MBe=$e(JH()),DDt="e8e1bd300d860104bb8c58453ffa1eb4",PDt="OFCNCOG2CU",UBe=async(t,e)=>{let r=W.stringifyIdent(t),a=SDt(e).initIndex("npm-search");try{return(await a.getObject(r,{attributesToRetrieve:["types"]})).types?.ts==="definitely-typed"}catch{return!1}},SDt=t=>(0,MBe.default)(PDt,DDt,{requester:{async send(r){try{let o=await nn.request(r.url,r.data||null,{configuration:t,headers:r.headers});return{content:o.body,isTimedOut:!1,status:o.statusCode}}catch(o){return{content:o.response.body,isTimedOut:!1,status:o.response.statusCode}}}}});var HBe=t=>t.scope?`${t.scope}__${t.name}`:`${t.name}`,bDt=async(t,e,r,o)=>{if(r.scope==="types")return;let{project:a}=t,{configuration:n}=a;if(!(n.get("tsEnableAutoTypes")??(oe.existsSync(z.join(t.cwd,"tsconfig.json"))||oe.existsSync(z.join(a.cwd,"tsconfig.json")))))return;let A=n.makeResolver(),p={project:a,resolver:A,report:new Qi};if(!await UBe(r,n))return;let E=HBe(r),I=W.parseRange(r.range).selector;if(!kr.validRange(I)){let N=n.normalizeDependency(r),U=await A.getCandidates(N,{},p);I=W.parseRange(U[0].reference).selector}let v=_Be.default.coerce(I);if(v===null)return;let x=`${Xc.Modifier.CARET}${v.major}`,C=W.makeDescriptor(W.makeIdent("types",E),x),R=_e.mapAndFind(a.workspaces,N=>{let U=N.manifest.dependencies.get(r.identHash)?.descriptorHash,V=N.manifest.devDependencies.get(r.identHash)?.descriptorHash;if(U!==r.descriptorHash&&V!==r.descriptorHash)return _e.mapAndFind.skip;let te=[];for(let ae of Ot.allDependencies){let fe=N.manifest[ae].get(C.identHash);typeof fe>"u"||te.push([ae,fe])}return te.length===0?_e.mapAndFind.skip:te});if(typeof R<"u")for(let[N,U]of R)t.manifest[N].set(U.identHash,U);else{try{let N=n.normalizeDependency(C);if((await A.getCandidates(N,{},p)).length===0)return}catch{return}t.manifest[Xc.Target.DEVELOPMENT].set(C.identHash,C)}},xDt=async(t,e,r)=>{if(r.scope==="types")return;let{project:o}=t,{configuration:a}=o;if(!(a.get("tsEnableAutoTypes")??(oe.existsSync(z.join(t.cwd,"tsconfig.json"))||oe.existsSync(z.join(o.cwd,"tsconfig.json")))))return;let u=HBe(r),A=W.makeIdent("types",u);for(let p of Ot.allDependencies)typeof t.manifest[p].get(A.identHash)>"u"||t.manifest[p].delete(A.identHash)},kDt=(t,e)=>{e.publishConfig&&e.publishConfig.typings&&(e.typings=e.publishConfig.typings),e.publishConfig&&e.publishConfig.types&&(e.types=e.publishConfig.types)},QDt={configuration:{tsEnableAutoTypes:{description:"Whether Yarn should auto-install @types/ dependencies on 'yarn add'",type:"BOOLEAN",isNullable:!0,default:null}},hooks:{afterWorkspaceDependencyAddition:bDt,afterWorkspaceDependencyRemoval:xDt,beforeWorkspacePacking:kDt}},FDt=QDt;var zj={};zt(zj,{VersionApplyCommand:()=>tg,VersionCheckCommand:()=>rg,VersionCommand:()=>ng,default:()=>XDt,versionUtils:()=>dw});Ye();Ye();qt();var dw={};zt(dw,{Decision:()=>hw,applyPrerelease:()=>KBe,applyReleases:()=>Kj,applyStrategy:()=>lF,clearVersionFiles:()=>jj,getUndecidedDependentWorkspaces:()=>Gv,getUndecidedWorkspaces:()=>aF,openVersionFile:()=>gw,requireMoreDecisions:()=>zDt,resolveVersionFiles:()=>qv,suggestStrategy:()=>Wj,updateVersionFiles:()=>Yj,validateReleaseDecision:()=>pw});Ye();Pt();Nl();qt();var WBe=$e(YBe()),vA=$e(Jn()),KDt=/^(>=|[~^]|)(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$/,hw=(u=>(u.UNDECIDED="undecided",u.DECLINE="decline",u.MAJOR="major",u.MINOR="minor",u.PATCH="patch",u.PRERELEASE="prerelease",u))(hw||{});function pw(t){let e=vA.default.valid(t);return e||_e.validateEnum((0,WBe.default)(hw,"UNDECIDED"),t)}async function qv(t,{prerelease:e=null}={}){let r=new Map,o=t.configuration.get("deferredVersionFolder");if(!oe.existsSync(o))return r;let a=await oe.readdirPromise(o);for(let n of a){if(!n.endsWith(".yml"))continue;let u=z.join(o,n),A=await oe.readFilePromise(u,"utf8"),p=Ki(A);for(let[h,E]of Object.entries(p.releases||{})){if(E==="decline")continue;let I=W.parseIdent(h),v=t.tryWorkspaceByIdent(I);if(v===null)throw new Error(`Assertion failed: Expected a release definition file to only reference existing workspaces (${z.basename(u)} references ${h})`);if(v.manifest.version===null)throw new Error(`Assertion failed: Expected the workspace to have a version (${W.prettyLocator(t.configuration,v.anchoredLocator)})`);let x=v.manifest.raw.stableVersion??v.manifest.version,C=r.get(v),R=lF(x,pw(E));if(R===null)throw new Error(`Assertion failed: Expected ${x} to support being bumped via strategy ${E}`);let N=typeof C<"u"?vA.default.gt(R,C)?R:C:R;r.set(v,N)}}return e&&(r=new Map([...r].map(([n,u])=>[n,KBe(u,{current:n.manifest.version,prerelease:e})]))),r}async function jj(t){let e=t.configuration.get("deferredVersionFolder");!oe.existsSync(e)||await oe.removePromise(e)}async function Yj(t,e){let r=new Set(e),o=t.configuration.get("deferredVersionFolder");if(!oe.existsSync(o))return;let a=await oe.readdirPromise(o);for(let n of a){if(!n.endsWith(".yml"))continue;let u=z.join(o,n),A=await oe.readFilePromise(u,"utf8"),p=Ki(A),h=p?.releases;if(!!h){for(let E of Object.keys(h)){let I=W.parseIdent(E),v=t.tryWorkspaceByIdent(I);(v===null||r.has(v))&&delete p.releases[E]}Object.keys(p.releases).length>0?await oe.changeFilePromise(u,Ba(new Ba.PreserveOrdering(p))):await oe.unlinkPromise(u)}}}async function gw(t,{allowEmpty:e=!1}={}){let r=t.configuration;if(r.projectCwd===null)throw new it("This command can only be run from within a Yarn project");let o=await ra.fetchRoot(r.projectCwd),a=o!==null?await ra.fetchBase(o,{baseRefs:r.get("changesetBaseRefs")}):null,n=o!==null?await ra.fetchChangedFiles(o,{base:a.hash,project:t}):[],u=r.get("deferredVersionFolder"),A=n.filter(x=>z.contains(u,x)!==null);if(A.length>1)throw new it(`Your current branch contains multiple versioning files; this isn't supported: - ${A.map(x=>le.fromPortablePath(x)).join(` - `)}`);let p=new Set(_e.mapAndFilter(n,x=>{let C=t.tryWorkspaceByFilePath(x);return C===null?_e.mapAndFilter.skip:C}));if(A.length===0&&p.size===0&&!e)return null;let h=A.length===1?A[0]:z.join(u,`${wn.makeHash(Math.random().toString()).slice(0,8)}.yml`),E=oe.existsSync(h)?await oe.readFilePromise(h,"utf8"):"{}",I=Ki(E),v=new Map;for(let x of I.declined||[]){let C=W.parseIdent(x),R=t.getWorkspaceByIdent(C);v.set(R,"decline")}for(let[x,C]of Object.entries(I.releases||{})){let R=W.parseIdent(x),N=t.getWorkspaceByIdent(R);v.set(N,pw(C))}return{project:t,root:o,baseHash:a!==null?a.hash:null,baseTitle:a!==null?a.title:null,changedFiles:new Set(n),changedWorkspaces:p,releaseRoots:new Set([...p].filter(x=>x.manifest.version!==null)),releases:v,async saveAll(){let x={},C=[],R=[];for(let N of t.workspaces){if(N.manifest.version===null)continue;let U=W.stringifyIdent(N.anchoredLocator),V=v.get(N);V==="decline"?C.push(U):typeof V<"u"?x[U]=pw(V):p.has(N)&&R.push(U)}await oe.mkdirPromise(z.dirname(h),{recursive:!0}),await oe.changeFilePromise(h,Ba(new Ba.PreserveOrdering({releases:Object.keys(x).length>0?x:void 0,declined:C.length>0?C:void 0,undecided:R.length>0?R:void 0})))}}}function zDt(t){return aF(t).size>0||Gv(t).length>0}function aF(t){let e=new Set;for(let r of t.changedWorkspaces)r.manifest.version!==null&&(t.releases.has(r)||e.add(r));return e}function Gv(t,{include:e=new Set}={}){let r=[],o=new Map(_e.mapAndFilter([...t.releases],([n,u])=>u==="decline"?_e.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n])),a=new Map(_e.mapAndFilter([...t.releases],([n,u])=>u!=="decline"?_e.mapAndFilter.skip:[n.anchoredLocator.locatorHash,n]));for(let n of t.project.workspaces)if(!(!e.has(n)&&(a.has(n.anchoredLocator.locatorHash)||o.has(n.anchoredLocator.locatorHash)))&&n.manifest.version!==null)for(let u of Ot.hardDependencies)for(let A of n.manifest.getForScope(u).values()){let p=t.project.tryWorkspaceByDescriptor(A);p!==null&&o.has(p.anchoredLocator.locatorHash)&&r.push([n,p])}return r}function Wj(t,e){let r=vA.default.clean(e);for(let o of Object.values(hw))if(o!=="undecided"&&o!=="decline"&&vA.default.inc(t,o)===r)return o;return null}function lF(t,e){if(vA.default.valid(e))return e;if(t===null)throw new it(`Cannot apply the release strategy "${e}" unless the workspace already has a valid version`);if(!vA.default.valid(t))throw new it(`Cannot apply the release strategy "${e}" on a non-semver version (${t})`);let r=vA.default.inc(t,e);if(r===null)throw new it(`Cannot apply the release strategy "${e}" on the specified version (${t})`);return r}function Kj(t,e,{report:r}){let o=new Map;for(let a of t.workspaces)for(let n of Ot.allDependencies)for(let u of a.manifest[n].values()){let A=t.tryWorkspaceByDescriptor(u);if(A===null||!e.has(A))continue;_e.getArrayWithDefault(o,A).push([a,n,u.identHash])}for(let[a,n]of e){let u=a.manifest.version;a.manifest.version=n,vA.default.prerelease(n)===null?delete a.manifest.raw.stableVersion:a.manifest.raw.stableVersion||(a.manifest.raw.stableVersion=u);let A=a.manifest.name!==null?W.stringifyIdent(a.manifest.name):null;r.reportInfo(0,`${W.prettyLocator(t.configuration,a.anchoredLocator)}: Bumped to ${n}`),r.reportJson({cwd:le.fromPortablePath(a.cwd),ident:A,oldVersion:u,newVersion:n});let p=o.get(a);if(!(typeof p>"u"))for(let[h,E,I]of p){let v=h.manifest[E].get(I);if(typeof v>"u")throw new Error("Assertion failed: The dependency should have existed");let x=v.range,C=!1;if(x.startsWith(Xn.protocol)&&(x=x.slice(Xn.protocol.length),C=!0,x===a.relativeCwd))continue;let R=x.match(KDt);if(!R){r.reportWarning(0,`Couldn't auto-upgrade range ${x} (in ${W.prettyLocator(t.configuration,h.anchoredLocator)})`);continue}let N=`${R[1]}${n}`;C&&(N=`${Xn.protocol}${N}`);let U=W.makeDescriptor(v,N);h.manifest[E].set(I,U)}}}var VDt=new Map([["%n",{extract:t=>t.length>=1?[t[0],t.slice(1)]:null,generate:(t=0)=>`${t+1}`}]]);function KBe(t,{current:e,prerelease:r}){let o=new vA.default.SemVer(e),a=o.prerelease.slice(),n=[];o.prerelease=[],o.format()!==t&&(a.length=0);let u=!0,A=r.split(/\./g);for(let p of A){let h=VDt.get(p);if(typeof h>"u")n.push(p),a[0]===p?a.shift():u=!1;else{let E=u?h.extract(a):null;E!==null&&typeof E[0]=="number"?(n.push(h.generate(E[0])),a=E[1]):(n.push(h.generate()),u=!1)}}return o.prerelease&&(o.prerelease=[]),`${t}-${n.join(".")}`}var tg=class extends ut{constructor(){super(...arguments);this.all=ge.Boolean("--all",!1,{description:"Apply the deferred version changes on all workspaces"});this.dryRun=ge.Boolean("--dry-run",!1,{description:"Print the versions without actually generating the package archive"});this.prerelease=ge.String("--prerelease",{description:"Add a prerelease identifier to new versions",tolerateBoolean:!0});this.recursive=ge.Boolean("-R,--recursive",{description:"Release the transitive workspaces as well"});this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"})}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);if(!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState({restoreResolutions:!1});let u=await Lt.start({configuration:r,json:this.json,stdout:this.context.stdout},async A=>{let p=this.prerelease?typeof this.prerelease!="boolean"?this.prerelease:"rc.%n":null,h=await qv(o,{prerelease:p}),E=new Map;if(this.all)E=h;else{let I=this.recursive?a.getRecursiveWorkspaceDependencies():[a];for(let v of I){let x=h.get(v);typeof x<"u"&&E.set(v,x)}}if(E.size===0){let I=h.size>0?" Did you want to add --all?":"";A.reportWarning(0,`The current workspace doesn't seem to require a version bump.${I}`);return}Kj(o,E,{report:A}),this.dryRun||(p||(this.all?await jj(o):await Yj(o,[...E.keys()])),A.reportSeparator())});return this.dryRun||u.hasErrors()?u.exitCode():await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n})}};tg.paths=[["version","apply"]],tg.usage=nt.Usage({category:"Release-related commands",description:"apply all the deferred version bumps at once",details:` This command will apply the deferred version changes and remove their definitions from the repository. Note that if \`--prerelease\` is set, the given prerelease identifier (by default \`rc.%n\`) will be used on all new versions and the version definitions will be kept as-is. By default only the current workspace will be bumped, but you can configure this behavior by using one of: - \`--recursive\` to also apply the version bump on its dependencies - \`--all\` to apply the version bump on all packages in the repository Note that this command will also update the \`workspace:\` references across all your local workspaces, thus ensuring that they keep referring to the same workspaces even after the version bump. `,examples:[["Apply the version change to the local workspace","yarn version apply"],["Apply the version change to all the workspaces in the local workspace","yarn version apply --all"]]});Ye();Pt();qt();var cF=$e(Jn());var rg=class extends ut{constructor(){super(...arguments);this.interactive=ge.Boolean("-i,--interactive",{description:"Open an interactive interface used to set version bumps"})}async execute(){return this.interactive?await this.executeInteractive():await this.executeStandard()}async executeInteractive(){bC(this.context);let{Gem:r}=await Promise.resolve().then(()=>(cQ(),Bq)),{ScrollableItems:o}=await Promise.resolve().then(()=>(pQ(),fQ)),{FocusRequest:a}=await Promise.resolve().then(()=>(Dq(),Vwe)),{useListInput:n}=await Promise.resolve().then(()=>(AQ(),Jwe)),{renderForm:u}=await Promise.resolve().then(()=>(mQ(),dQ)),{Box:A,Text:p}=await Promise.resolve().then(()=>$e(sc())),{default:h,useCallback:E,useState:I}=await Promise.resolve().then(()=>$e(on())),v=await Ke.find(this.context.cwd,this.context.plugins),{project:x,workspace:C}=await St.find(v,this.context.cwd);if(!C)throw new nr(x.cwd,this.context.cwd);await x.restoreInstallState();let R=await gw(x);if(R===null||R.releaseRoots.size===0)return 0;if(R.root===null)throw new it("This command can only be run on Git repositories");let N=()=>h.createElement(A,{flexDirection:"row",paddingBottom:1},h.createElement(A,{flexDirection:"column",width:60},h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},""),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to select workspaces.")),h.createElement(A,null,h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},""),"/",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to select release strategies."))),h.createElement(A,{flexDirection:"column"},h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to save.")),h.createElement(A,{marginLeft:1},h.createElement(p,null,"Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to abort.")))),U=({workspace:me,active:he,decision:Be,setDecision:we})=>{let g=me.manifest.raw.stableVersion??me.manifest.version;if(g===null)throw new Error(`Assertion failed: The version should have been set (${W.prettyLocator(v,me.anchoredLocator)})`);if(cF.default.prerelease(g)!==null)throw new Error(`Assertion failed: Prerelease identifiers shouldn't be found (${g})`);let Ee=["undecided","decline","patch","minor","major"];n(Be,Ee,{active:he,minus:"left",plus:"right",set:we});let Pe=Be==="undecided"?h.createElement(p,{color:"yellow"},g):Be==="decline"?h.createElement(p,{color:"green"},g):h.createElement(p,null,h.createElement(p,{color:"magenta"},g)," \u2192 ",h.createElement(p,{color:"green"},cF.default.valid(Be)?Be:cF.default.inc(g,Be)));return h.createElement(A,{flexDirection:"column"},h.createElement(A,null,h.createElement(p,null,W.prettyLocator(v,me.anchoredLocator)," - ",Pe)),h.createElement(A,null,Ee.map(ce=>h.createElement(A,{key:ce,paddingLeft:2},h.createElement(p,null,h.createElement(r,{active:ce===Be})," ",ce)))))},V=me=>{let he=new Set(R.releaseRoots),Be=new Map([...me].filter(([we])=>he.has(we)));for(;;){let we=Gv({project:R.project,releases:Be}),g=!1;if(we.length>0){for(let[Ee]of we)if(!he.has(Ee)){he.add(Ee),g=!0;let Pe=me.get(Ee);typeof Pe<"u"&&Be.set(Ee,Pe)}}if(!g)break}return{relevantWorkspaces:he,relevantReleases:Be}},te=()=>{let[me,he]=I(()=>new Map(R.releases)),Be=E((we,g)=>{let Ee=new Map(me);g!=="undecided"?Ee.set(we,g):Ee.delete(we);let{relevantReleases:Pe}=V(Ee);he(Pe)},[me,he]);return[me,Be]},ae=({workspaces:me,releases:he})=>{let Be=[];Be.push(`${me.size} total`);let we=0,g=0;for(let Ee of me){let Pe=he.get(Ee);typeof Pe>"u"?g+=1:Pe!=="decline"&&(we+=1)}return Be.push(`${we} release${we===1?"":"s"}`),Be.push(`${g} remaining`),h.createElement(p,{color:"yellow"},Be.join(", "))},ue=await u(({useSubmit:me})=>{let[he,Be]=te();me(he);let{relevantWorkspaces:we}=V(he),g=new Set([...we].filter(ne=>!R.releaseRoots.has(ne))),[Ee,Pe]=I(0),ce=E(ne=>{switch(ne){case a.BEFORE:Pe(Ee-1);break;case a.AFTER:Pe(Ee+1);break}},[Ee,Pe]);return h.createElement(A,{flexDirection:"column"},h.createElement(N,null),h.createElement(A,null,h.createElement(p,{wrap:"wrap"},"The following files have been modified in your local checkout.")),h.createElement(A,{flexDirection:"column",marginTop:1,paddingLeft:2},[...R.changedFiles].map(ne=>h.createElement(A,{key:ne},h.createElement(p,null,h.createElement(p,{color:"grey"},le.fromPortablePath(R.root)),le.sep,le.relative(le.fromPortablePath(R.root),le.fromPortablePath(ne)))))),R.releaseRoots.size>0&&h.createElement(h.Fragment,null,h.createElement(A,{marginTop:1},h.createElement(p,{wrap:"wrap"},"Because of those files having been modified, the following workspaces may need to be released again (note that private workspaces are also shown here, because even though they won't be published, releasing them will allow us to flag their dependents for potential re-release):")),g.size>3?h.createElement(A,{marginTop:1},h.createElement(ae,{workspaces:R.releaseRoots,releases:he})):null,h.createElement(A,{marginTop:1,flexDirection:"column"},h.createElement(o,{active:Ee%2===0,radius:1,size:2,onFocusRequest:ce},[...R.releaseRoots].map(ne=>h.createElement(U,{key:ne.cwd,workspace:ne,decision:he.get(ne)||"undecided",setDecision:ee=>Be(ne,ee)}))))),g.size>0?h.createElement(h.Fragment,null,h.createElement(A,{marginTop:1},h.createElement(p,{wrap:"wrap"},"The following workspaces depend on other workspaces that have been marked for release, and thus may need to be released as well:")),h.createElement(A,null,h.createElement(p,null,"(Press ",h.createElement(p,{bold:!0,color:"cyanBright"},"")," to move the focus between the workspace groups.)")),g.size>5?h.createElement(A,{marginTop:1},h.createElement(ae,{workspaces:g,releases:he})):null,h.createElement(A,{marginTop:1,flexDirection:"column"},h.createElement(o,{active:Ee%2===1,radius:2,size:2,onFocusRequest:ce},[...g].map(ne=>h.createElement(U,{key:ne.cwd,workspace:ne,decision:he.get(ne)||"undecided",setDecision:ee=>Be(ne,ee)}))))):null)},{versionFile:R},{stdin:this.context.stdin,stdout:this.context.stdout,stderr:this.context.stderr});if(typeof ue>"u")return 1;R.releases.clear();for(let[me,he]of ue)R.releases.set(me,he);await R.saveAll()}async executeStandard(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);return await o.restoreInstallState(),(await Lt.start({configuration:r,stdout:this.context.stdout},async u=>{let A=await gw(o);if(A===null||A.releaseRoots.size===0)return;if(A.root===null)throw new it("This command can only be run on Git repositories");if(u.reportInfo(0,`Your PR was started right after ${de.pretty(r,A.baseHash.slice(0,7),"yellow")} ${de.pretty(r,A.baseTitle,"magenta")}`),A.changedFiles.size>0){u.reportInfo(0,"You have changed the following files since then:"),u.reportSeparator();for(let v of A.changedFiles)u.reportInfo(null,`${de.pretty(r,le.fromPortablePath(A.root),"gray")}${le.sep}${le.relative(le.fromPortablePath(A.root),le.fromPortablePath(v))}`)}let p=!1,h=!1,E=aF(A);if(E.size>0){p||u.reportSeparator();for(let v of E)u.reportError(0,`${W.prettyLocator(r,v.anchoredLocator)} has been modified but doesn't have a release strategy attached`);p=!0}let I=Gv(A);for(let[v,x]of I)h||u.reportSeparator(),u.reportError(0,`${W.prettyLocator(r,v.anchoredLocator)} doesn't have a release strategy attached, but depends on ${W.prettyWorkspace(r,x)} which is planned for release.`),h=!0;(p||h)&&(u.reportSeparator(),u.reportInfo(0,"This command detected that at least some workspaces have received modifications without explicit instructions as to how they had to be released (if needed)."),u.reportInfo(0,"To correct these errors, run `yarn version check --interactive` then follow the instructions."))})).exitCode()}};rg.paths=[["version","check"]],rg.usage=nt.Usage({category:"Release-related commands",description:"check that all the relevant packages have been bumped",details:"\n **Warning:** This command currently requires Git.\n\n This command will check that all the packages covered by the files listed in argument have been properly bumped or declined to bump.\n\n In the case of a bump, the check will also cover transitive packages - meaning that should `Foo` be bumped, a package `Bar` depending on `Foo` will require a decision as to whether `Bar` will need to be bumped. This check doesn't cross packages that have declined to bump.\n\n In case no arguments are passed to the function, the list of modified files will be generated by comparing the HEAD against `master`.\n ",examples:[["Check whether the modified packages need a bump","yarn version check"]]});Ye();qt();var uF=$e(Jn());var ng=class extends ut{constructor(){super(...arguments);this.deferred=ge.Boolean("-d,--deferred",{description:"Prepare the version to be bumped during the next release cycle"});this.immediate=ge.Boolean("-i,--immediate",{description:"Bump the version immediately"});this.strategy=ge.String()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!a)throw new nr(o.cwd,this.context.cwd);let n=r.get("preferDeferredVersions");this.deferred&&(n=!0),this.immediate&&(n=!1);let u=uF.default.valid(this.strategy),A=this.strategy==="decline",p;if(u)if(a.manifest.version!==null){let E=Wj(a.manifest.version,this.strategy);E!==null?p=E:p=this.strategy}else p=this.strategy;else{let E=a.manifest.version;if(!A){if(E===null)throw new it("Can't bump the version if there wasn't a version to begin with - use 0.0.0 as initial version then run the command again.");if(typeof E!="string"||!uF.default.valid(E))throw new it(`Can't bump the version (${E}) if it's not valid semver`)}p=pw(this.strategy)}if(!n){let I=(await qv(o)).get(a);if(typeof I<"u"&&p!=="decline"){let v=lF(a.manifest.version,p);if(uF.default.lt(v,I))throw new it(`Can't bump the version to one that would be lower than the current deferred one (${I})`)}}let h=await gw(o,{allowEmpty:!0});return h.releases.set(a,p),await h.saveAll(),n?0:await this.cli.run(["version","apply"])}};ng.paths=[["version"]],ng.usage=nt.Usage({category:"Release-related commands",description:"apply a new version to the current package",details:"\n This command will bump the version number for the given package, following the specified strategy:\n\n - If `major`, the first number from the semver range will be increased (`X.0.0`).\n - If `minor`, the second number from the semver range will be increased (`0.X.0`).\n - If `patch`, the third number from the semver range will be increased (`0.0.X`).\n - If prefixed by `pre` (`premajor`, ...), a `-0` suffix will be set (`0.0.0-0`).\n - If `prerelease`, the suffix will be increased (`0.0.0-X`); the third number from the semver range will also be increased if there was no suffix in the previous version.\n - If `decline`, the nonce will be increased for `yarn version check` to pass without version bump.\n - If a valid semver range, it will be used as new version.\n - If unspecified, Yarn will ask you for guidance.\n\n For more information about the `--deferred` flag, consult our documentation (https://yarnpkg.com/features/release-workflow#deferred-versioning).\n ",examples:[["Immediately bump the version to the next major","yarn version major"],["Prepare the version to be bumped to the next major","yarn version major --deferred"]]});var JDt={configuration:{deferredVersionFolder:{description:"Folder where are stored the versioning files",type:"ABSOLUTE_PATH",default:"./.yarn/versions"},preferDeferredVersions:{description:"If true, running `yarn version` will assume the `--deferred` flag unless `--immediate` is set",type:"BOOLEAN",default:!1}},commands:[tg,rg,ng]},XDt=JDt;var Vj={};zt(Vj,{WorkspacesFocusCommand:()=>ig,WorkspacesForeachCommand:()=>lp,default:()=>ePt});Ye();Ye();qt();var ig=class extends ut{constructor(){super(...arguments);this.json=ge.Boolean("--json",!1,{description:"Format the output as an NDJSON stream"});this.production=ge.Boolean("--production",!1,{description:"Only install regular dependencies by omitting dev dependencies"});this.all=ge.Boolean("-A,--all",!1,{description:"Install the entire project"});this.workspaces=ge.Rest()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd),n=await Nr.find(r);await o.restoreInstallState({restoreResolutions:!1});let u;if(this.all)u=new Set(o.workspaces);else if(this.workspaces.length===0){if(!a)throw new nr(o.cwd,this.context.cwd);u=new Set([a])}else u=new Set(this.workspaces.map(A=>o.getWorkspaceByIdent(W.parseIdent(A))));for(let A of u)for(let p of this.production?["dependencies"]:Ot.hardDependencies)for(let h of A.manifest.getForScope(p).values()){let E=o.tryWorkspaceByDescriptor(h);E!==null&&u.add(E)}for(let A of o.workspaces)u.has(A)?this.production&&A.manifest.devDependencies.clear():(A.manifest.installConfig=A.manifest.installConfig||{},A.manifest.installConfig.selfReferences=!1,A.manifest.dependencies.clear(),A.manifest.devDependencies.clear(),A.manifest.peerDependencies.clear(),A.manifest.scripts.clear());return await o.installWithNewReport({json:this.json,stdout:this.context.stdout},{cache:n,persistProject:!1})}};ig.paths=[["workspaces","focus"]],ig.usage=nt.Usage({category:"Workspace-related commands",description:"install a single workspace and its dependencies",details:"\n This command will run an install as if the specified workspaces (and all other workspaces they depend on) were the only ones in the project. If no workspaces are explicitly listed, the active one will be assumed.\n\n Note that this command is only very moderately useful when using zero-installs, since the cache will contain all the packages anyway - meaning that the only difference between a full install and a focused install would just be a few extra lines in the `.pnp.cjs` file, at the cost of introducing an extra complexity.\n\n If the `-A,--all` flag is set, the entire project will be installed. Combine with `--production` to replicate the old `yarn install --production`.\n "});Ye();Ye();Ye();qt();var mw=$e(Zo()),VBe=$e(sd());$a();var lp=class extends ut{constructor(){super(...arguments);this.from=ge.Array("--from",{description:"An array of glob pattern idents or paths from which to base any recursion"});this.all=ge.Boolean("-A,--all",{description:"Run the command on all workspaces of a project"});this.recursive=ge.Boolean("-R,--recursive",{description:"Run the command on the current workspace and all of its recursive dependencies"});this.worktree=ge.Boolean("-W,--worktree",{description:"Run the command on all workspaces of the current worktree"});this.verbose=ge.Counter("-v,--verbose",{description:"Increase level of logging verbosity up to 2 times"});this.parallel=ge.Boolean("-p,--parallel",!1,{description:"Run the commands in parallel"});this.interlaced=ge.Boolean("-i,--interlaced",!1,{description:"Print the output of commands in real-time instead of buffering it"});this.jobs=ge.String("-j,--jobs",{description:"The maximum number of parallel tasks that the execution will be limited to; or `unlimited`",validator:TT([Ks(["unlimited"]),aI(RT(),[NT(),LT(1)])])});this.topological=ge.Boolean("-t,--topological",!1,{description:"Run the command after all workspaces it depends on (regular) have finished"});this.topologicalDev=ge.Boolean("--topological-dev",!1,{description:"Run the command after all workspaces it depends on (regular + dev) have finished"});this.include=ge.Array("--include",[],{description:"An array of glob pattern idents or paths; only matching workspaces will be traversed"});this.exclude=ge.Array("--exclude",[],{description:"An array of glob pattern idents or paths; matching workspaces won't be traversed"});this.publicOnly=ge.Boolean("--no-private",{description:"Avoid running the command on private workspaces"});this.since=ge.String("--since",{description:"Only include workspaces that have been changed since the specified ref.",tolerateBoolean:!0});this.dryRun=ge.Boolean("-n,--dry-run",{description:"Print the commands that would be run, without actually running them"});this.commandName=ge.String();this.args=ge.Proxy()}async execute(){let r=await Ke.find(this.context.cwd,this.context.plugins),{project:o,workspace:a}=await St.find(r,this.context.cwd);if(!this.all&&!a)throw new nr(o.cwd,this.context.cwd);await o.restoreInstallState();let n=this.cli.process([this.commandName,...this.args]),u=n.path.length===1&&n.path[0]==="run"&&typeof n.scriptName<"u"?n.scriptName:null;if(n.path.length===0)throw new it("Invalid subcommand name for iteration - use the 'run' keyword if you wish to execute a script");let A=we=>{!this.dryRun||this.context.stdout.write(`${we} `)},p=()=>{let we=this.from.map(g=>mw.default.matcher(g));return o.workspaces.filter(g=>{let Ee=W.stringifyIdent(g.anchoredLocator),Pe=g.relativeCwd;return we.some(ce=>ce(Ee)||ce(Pe))})},h=[];if(this.since?(A("Option --since is set; selecting the changed workspaces as root for workspace selection"),h=Array.from(await ra.fetchChangedWorkspaces({ref:this.since,project:o}))):this.from?(A("Option --from is set; selecting the specified workspaces"),h=[...p()]):this.worktree?(A("Option --worktree is set; selecting the current workspace"),h=[a]):this.recursive?(A("Option --recursive is set; selecting the current workspace"),h=[a]):this.all&&(A("Option --all is set; selecting all workspaces"),h=[...o.workspaces]),this.dryRun&&!this.all){for(let we of h)A(` - ${we.relativeCwd} ${W.prettyLocator(r,we.anchoredLocator)}`);h.length>0&&A("")}let E;if(this.recursive?this.since?(A("Option --recursive --since is set; recursively selecting all dependent workspaces"),E=new Set(h.map(we=>[...we.getRecursiveWorkspaceDependents()]).flat())):(A("Option --recursive is set; recursively selecting all transitive dependencies"),E=new Set(h.map(we=>[...we.getRecursiveWorkspaceDependencies()]).flat())):this.worktree?(A("Option --worktree is set; recursively selecting all nested workspaces"),E=new Set(h.map(we=>[...we.getRecursiveWorkspaceChildren()]).flat())):E=null,E!==null&&(h=[...new Set([...h,...E])],this.dryRun))for(let we of E)A(` - ${we.relativeCwd} ${W.prettyLocator(r,we.anchoredLocator)}`);let I=[],v=!1;if(u?.includes(":")){for(let we of o.workspaces)if(we.manifest.scripts.has(u)&&(v=!v,v===!1))break}for(let we of h){if(u&&!we.manifest.scripts.has(u)&&!v&&!(await un.getWorkspaceAccessibleBinaries(we)).has(u)){A(`Excluding ${we.relativeCwd} because it doesn't have a "${u}" script`);continue}if(!(u===r.env.npm_lifecycle_event&&we.cwd===a.cwd)){if(this.include.length>0&&!mw.default.isMatch(W.stringifyIdent(we.anchoredLocator),this.include)&&!mw.default.isMatch(we.relativeCwd,this.include)){A(`Excluding ${we.relativeCwd} because it doesn't match the --include filter`);continue}if(this.exclude.length>0&&(mw.default.isMatch(W.stringifyIdent(we.anchoredLocator),this.exclude)||mw.default.isMatch(we.relativeCwd,this.exclude))){A(`Excluding ${we.relativeCwd} because it matches the --include filter`);continue}if(this.publicOnly&&we.manifest.private===!0){A(`Excluding ${we.relativeCwd} because it's a private workspace and --no-private was set`);continue}I.push(we)}}if(this.dryRun)return 0;let x=this.verbose??(this.context.stdout.isTTY?1/0:0),C=x>0,R=x>1,N=this.parallel?this.jobs==="unlimited"?1/0:Number(this.jobs)||Math.ceil(Vi.availableParallelism()/2):1,U=N===1?!1:this.parallel,V=U?this.interlaced:!0,te=(0,VBe.default)(N),ae=new Map,fe=new Set,ue=0,me=null,he=!1,Be=await Lt.start({configuration:r,stdout:this.context.stdout,includePrefix:!1},async we=>{let g=async(Ee,{commandIndex:Pe})=>{if(he)return-1;!U&&R&&Pe>1&&we.reportSeparator();let ce=ZDt(Ee,{configuration:r,label:C,commandIndex:Pe}),[ne,ee]=zBe(we,{prefix:ce,interlaced:V}),[Ie,Fe]=zBe(we,{prefix:ce,interlaced:V});try{R&&we.reportInfo(null,`${ce?`${ce} `:""}Process started`);let At=Date.now(),H=await this.cli.run([this.commandName,...this.args],{cwd:Ee.cwd,stdout:ne,stderr:Ie})||0;ne.end(),Ie.end(),await ee,await Fe;let at=Date.now();if(R){let Re=r.get("enableTimers")?`, completed in ${de.pretty(r,at-At,de.Type.DURATION)}`:"";we.reportInfo(null,`${ce?`${ce} `:""}Process exited (exit code ${H})${Re}`)}return H===130&&(he=!0,me=H),H}catch(At){throw ne.end(),Ie.end(),await ee,await Fe,At}};for(let Ee of I)ae.set(Ee.anchoredLocator.locatorHash,Ee);for(;ae.size>0&&!we.hasErrors();){let Ee=[];for(let[ne,ee]of ae){if(fe.has(ee.anchoredDescriptor.descriptorHash))continue;let Ie=!0;if(this.topological||this.topologicalDev){let Fe=this.topologicalDev?new Map([...ee.manifest.dependencies,...ee.manifest.devDependencies]):ee.manifest.dependencies;for(let At of Fe.values()){let H=o.tryWorkspaceByDescriptor(At);if(Ie=H===null||!ae.has(H.anchoredLocator.locatorHash),!Ie)break}}if(!!Ie&&(fe.add(ee.anchoredDescriptor.descriptorHash),Ee.push(te(async()=>{let Fe=await g(ee,{commandIndex:++ue});return ae.delete(ne),fe.delete(ee.anchoredDescriptor.descriptorHash),Fe})),!U))break}if(Ee.length===0){let ne=Array.from(ae.values()).map(ee=>W.prettyLocator(r,ee.anchoredLocator)).join(", ");we.reportError(3,`Dependency cycle detected (${ne})`);return}let ce=(await Promise.all(Ee)).find(ne=>ne!==0);me===null&&(me=typeof ce<"u"?1:me),(this.topological||this.topologicalDev)&&typeof ce<"u"&&we.reportError(0,"The command failed for workspaces that are depended upon by other workspaces; can't satisfy the dependency graph")}});return me!==null?me:Be.exitCode()}};lp.paths=[["workspaces","foreach"]],lp.usage=nt.Usage({category:"Workspace-related commands",description:"run a command on all workspaces",details:"\n This command will run a given sub-command on current and all its descendant workspaces. Various flags can alter the exact behavior of the command:\n\n - If `-p,--parallel` is set, the commands will be ran in parallel; they'll by default be limited to a number of parallel tasks roughly equal to half your core number, but that can be overridden via `-j,--jobs`, or disabled by setting `-j unlimited`.\n\n - If `-p,--parallel` and `-i,--interlaced` are both set, Yarn will print the lines from the output as it receives them. If `-i,--interlaced` wasn't set, it would instead buffer the output from each process and print the resulting buffers only after their source processes have exited.\n\n - If `-t,--topological` is set, Yarn will only run the command after all workspaces that it depends on through the `dependencies` field have successfully finished executing. If `--topological-dev` is set, both the `dependencies` and `devDependencies` fields will be considered when figuring out the wait points.\n\n - If `-A,--all` is set, Yarn will run the command on all the workspaces of a project.\n\n - If `-R,--recursive` is set, Yarn will find workspaces to run the command on by recursively evaluating `dependencies` and `devDependencies` fields, instead of looking at the `workspaces` fields.\n\n - If `-W,--worktree` is set, Yarn will find workspaces to run the command on by looking at the current worktree.\n\n - If `--from` is set, Yarn will use the packages matching the 'from' glob as the starting point for any recursive search.\n\n - If `--since` is set, Yarn will only run the command on workspaces that have been modified since the specified ref. By default Yarn will use the refs specified by the `changesetBaseRefs` configuration option.\n\n - If `--dry-run` is set, Yarn will explain what it would do without actually doing anything.\n\n - The command may apply to only some workspaces through the use of `--include` which acts as a whitelist. The `--exclude` flag will do the opposite and will be a list of packages that mustn't execute the script. Both flags accept glob patterns (if valid Idents and supported by [micromatch](https://github.com/micromatch/micromatch)). Make sure to escape the patterns, to prevent your own shell from trying to expand them.\n\n The `-v,--verbose` flag can be passed up to twice: once to prefix output lines with the originating workspace's name, and again to include start/finish/timing log lines. Maximum verbosity is enabled by default in terminal environments.\n\n If the command is `run` and the script being run does not exist the child workspace will be skipped without error.\n ",examples:[["Publish all packages","yarn workspaces foreach -A npm publish --tolerate-republish"],["Run the build script on all descendant packages","yarn workspaces foreach -A run build"],["Run the build script on current and all descendant packages in parallel, building package dependencies first","yarn workspaces foreach -Apt run build"],["Run the build script on several packages and all their dependencies, building dependencies first","yarn workspaces foreach -Rpt --from '{workspace-a,workspace-b}' run build"]]}),lp.schema=[cI("all",Yu.Forbids,["from","recursive","since","worktree"],{missingIf:"undefined"}),OT(["all","recursive","since","worktree"],{missingIf:"undefined"})];function zBe(t,{prefix:e,interlaced:r}){let o=t.createStreamReporter(e),a=new _e.DefaultStream;a.pipe(o,{end:!1}),a.on("finish",()=>{o.end()});let n=new Promise(A=>{o.on("finish",()=>{A(a.active)})});if(r)return[a,n];let u=new _e.BufferStream;return u.pipe(a,{end:!1}),u.on("finish",()=>{a.end()}),[u,n]}function ZDt(t,{configuration:e,commandIndex:r,label:o}){if(!o)return null;let n=`[${W.stringifyIdent(t.anchoredLocator)}]:`,u=["#2E86AB","#A23B72","#F18F01","#C73E1D","#CCE2A3"],A=u[r%u.length];return de.pretty(e,n,A)}var $Dt={commands:[ig,lp]},ePt=$Dt;var pC=()=>({modules:new Map([["@yarnpkg/cli",a2],["@yarnpkg/core",o2],["@yarnpkg/fslib",zw],["@yarnpkg/libzip",x1],["@yarnpkg/parsers",rI],["@yarnpkg/shell",T1],["clipanion",hI],["semver",tPt],["typanion",zo],["@yarnpkg/plugin-essentials",$8],["@yarnpkg/plugin-compat",iH],["@yarnpkg/plugin-constraints",wH],["@yarnpkg/plugin-dlx",IH],["@yarnpkg/plugin-exec",DH],["@yarnpkg/plugin-file",SH],["@yarnpkg/plugin-git",Z8],["@yarnpkg/plugin-github",kH],["@yarnpkg/plugin-http",QH],["@yarnpkg/plugin-init",FH],["@yarnpkg/plugin-interactive-tools",Tq],["@yarnpkg/plugin-link",Lq],["@yarnpkg/plugin-nm",yG],["@yarnpkg/plugin-npm",dj],["@yarnpkg/plugin-npm-cli",Dj],["@yarnpkg/plugin-pack",Aj],["@yarnpkg/plugin-patch",Fj],["@yarnpkg/plugin-pnp",oG],["@yarnpkg/plugin-pnpm",Lj],["@yarnpkg/plugin-stage",qj],["@yarnpkg/plugin-typescript",Gj],["@yarnpkg/plugin-version",zj],["@yarnpkg/plugin-workspace-tools",Vj]]),plugins:new Set(["@yarnpkg/plugin-essentials","@yarnpkg/plugin-compat","@yarnpkg/plugin-constraints","@yarnpkg/plugin-dlx","@yarnpkg/plugin-exec","@yarnpkg/plugin-file","@yarnpkg/plugin-git","@yarnpkg/plugin-github","@yarnpkg/plugin-http","@yarnpkg/plugin-init","@yarnpkg/plugin-interactive-tools","@yarnpkg/plugin-link","@yarnpkg/plugin-nm","@yarnpkg/plugin-npm","@yarnpkg/plugin-npm-cli","@yarnpkg/plugin-pack","@yarnpkg/plugin-patch","@yarnpkg/plugin-pnp","@yarnpkg/plugin-pnpm","@yarnpkg/plugin-stage","@yarnpkg/plugin-typescript","@yarnpkg/plugin-version","@yarnpkg/plugin-workspace-tools"])});function ZBe({cwd:t,pluginConfiguration:e}){let r=new as({binaryLabel:"Yarn Package Manager",binaryName:"yarn",binaryVersion:rn??""});return Object.assign(r,{defaultContext:{...as.defaultContext,cwd:t,plugins:e,quiet:!1,stdin:process.stdin,stdout:process.stdout,stderr:process.stderr}})}function rPt(t){if(_e.parseOptionalBoolean(process.env.YARN_IGNORE_NODE))return!0;let r=process.versions.node,o=">=18.12.0";if(kr.satisfiesWithPrereleases(r,o))return!0;let a=new it(`This tool requires a Node version compatible with ${o} (got ${r}). Upgrade Node, or set \`YARN_IGNORE_NODE=1\` in your environment.`);return as.defaultContext.stdout.write(t.error(a)),!1}async function $Be({selfPath:t,pluginConfiguration:e}){return await Ke.find(le.toPortablePath(process.cwd()),e,{strict:!1,usePathCheck:t})}function nPt(t,e,{yarnPath:r}){if(!oe.existsSync(r))return t.error(new Error(`The "yarn-path" option has been set, but the specified location doesn't exist (${r}).`)),1;process.on("SIGINT",()=>{});let o={stdio:"inherit",env:{...process.env,YARN_IGNORE_PATH:"1"}};try{(0,JBe.execFileSync)(process.execPath,[le.fromPortablePath(r),...e],o)}catch(a){return a.status??1}return 0}function iPt(t,e){let r=null,o=e;return e.length>=2&&e[0]==="--cwd"?(r=le.toPortablePath(e[1]),o=e.slice(2)):e.length>=1&&e[0].startsWith("--cwd=")?(r=le.toPortablePath(e[0].slice(6)),o=e.slice(1)):e[0]==="add"&&e[e.length-2]==="--cwd"&&(r=le.toPortablePath(e[e.length-1]),o=e.slice(0,e.length-2)),t.defaultContext.cwd=r!==null?z.resolve(r):z.cwd(),o}function sPt(t,{configuration:e}){if(!e.get("enableTelemetry")||XBe.isCI||!process.stdout.isTTY)return;Ke.telemetry=new uC(e,"puba9cdc10ec5790a2cf4969dd413a47270");let o=/^@yarnpkg\/plugin-(.*)$/;for(let a of e.plugins.keys())AC.has(a.match(o)?.[1]??"")&&Ke.telemetry?.reportPluginName(a);t.binaryVersion&&Ke.telemetry.reportVersion(t.binaryVersion)}function eve(t,{configuration:e}){for(let r of e.plugins.values())for(let o of r.commands||[])t.register(o)}async function oPt(t,e,{selfPath:r,pluginConfiguration:o}){if(!rPt(t))return 1;let a=await $Be({selfPath:r,pluginConfiguration:o}),n=a.get("yarnPath"),u=a.get("ignorePath");if(n&&!u)return nPt(t,e,{yarnPath:n});delete process.env.YARN_IGNORE_PATH;let A=iPt(t,e);sPt(t,{configuration:a}),eve(t,{configuration:a});let p=t.process(A,t.defaultContext);return p.help||Ke.telemetry?.reportCommandName(p.path.join(" ")),await t.run(p,t.defaultContext)}async function ehe({cwd:t=z.cwd(),pluginConfiguration:e=pC()}={}){let r=ZBe({cwd:t,pluginConfiguration:e}),o=await $Be({pluginConfiguration:e,selfPath:null});return eve(r,{configuration:o}),r}async function nk(t,{cwd:e=z.cwd(),selfPath:r,pluginConfiguration:o}){let a=ZBe({cwd:e,pluginConfiguration:o});try{process.exitCode=await oPt(a,t,{selfPath:r,pluginConfiguration:o})}catch(n){as.defaultContext.stdout.write(a.error(n)),process.exitCode=1}finally{await oe.rmtempPromise()}}nk(process.argv.slice(2),{cwd:z.cwd(),selfPath:le.toPortablePath(le.resolve(process.argv[1])),pluginConfiguration:pC()});})(); /* object-assign (c) Sindre Sorhus @license MIT */ /*! * buildToken * Builds OAuth token prefix (helper function) * * @name buildToken * @function * @param {GitUrl} obj The parsed Git url object. * @return {String} token prefix */ /*! * fill-range * * Copyright (c) 2014-present, Jon Schlinkert. * Licensed under the MIT License. */ /*! * is-extglob * * Copyright (c) 2014-2016, Jon Schlinkert. * Licensed under the MIT License. */ /*! * is-glob * * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ /*! * is-number * * Copyright (c) 2014-present, Jon Schlinkert. * Released under the MIT License. */ /*! * is-windows * * Copyright © 2015-2018, Jon Schlinkert. * Released under the MIT License. */ /*! * to-regex-range * * Copyright (c) 2015-present, Jon Schlinkert. * Released under the MIT License. */ /** @license Copyright (c) 2015, Rebecca Turner Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ /** @license Copyright Joyent, Inc. and other Node contributors. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** @license Copyright Node.js contributors. All rights reserved. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** @license The MIT License (MIT) Copyright (c) 2014 Blake Embrey (hello@blakeembrey.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** @license React v0.18.0 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** @license React v0.24.0 * react-reconciler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ /** @license React v16.13.1 * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ ================================================ FILE: examples/react-native/app/App.tsx ================================================ /** * Sample React Native App * https://github.com/facebook/react-native * * @format */ import React from 'react'; import { Button, SafeAreaView, ScrollView, StatusBar, StyleSheet, Text, useColorScheme, View, } from 'react-native'; import Toast from 'react-native-toast-message'; import { Identify, identify, init, track, } from '@amplitude/analytics-react-native'; import {Colors, Header} from 'react-native/Libraries/NewAppScreen'; // Module-scope init mirrors the reproduce pattern from issue #181 — the SDK's // full module graph loads before any component renders, so any top-level // crash in the SDK (e.g. CJS circular-dep regression) surfaces on app launch. init('YOUR_API_KEY'); function App(): React.JSX.Element { const isDarkMode = useColorScheme() === 'dark'; const backgroundStyle = { backgroundColor: isDarkMode ? Colors.darker : Colors.lighter, }; const showToast = (message: string) => { Toast.show({ type: 'success', text1: 'Amplitude Response', text2: message, }); }; const trackEventAndShowToast = (eventName: string) => { track(eventName).promise.then(e => { showToast(e.message); }); }; const trackIdentifyAndShowToast = () => { identify(new Identify().set('react-native-test', 'yes')).promise.then(e => { showToast(e.message); }); }; return (
Test Amplitude App
); } export default App; ================================================ FILE: examples/unified/react-app/src/index.css ================================================ body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } ================================================ FILE: examples/unified/react-app/src/index.tsx ================================================ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; import reportWebVitals from './reportWebVitals'; import * as amplitude from '@amplitude/unified'; amplitude.initAll('API_KEY'); const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); root.render( ); // If you want to start measuring performance in your app, pass a function // to log results (for example: reportWebVitals(console.log)) // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals reportWebVitals(); ================================================ FILE: examples/unified/react-app/src/reportWebVitals.ts ================================================ import { ReportHandler } from 'web-vitals'; const reportWebVitals = (onPerfEntry?: ReportHandler) => { if (onPerfEntry && onPerfEntry instanceof Function) { import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { getCLS(onPerfEntry); getFID(onPerfEntry); getFCP(onPerfEntry); getLCP(onPerfEntry); getTTFB(onPerfEntry); }); } }; export default reportWebVitals; ================================================ FILE: examples/unified/react-app/src/setupTests.ts ================================================ // jest-dom adds custom jest matchers for asserting on DOM nodes. // allows you to do things like: // expect(element).toHaveTextContent(/react/i) // learn more: https://github.com/testing-library/jest-dom import '@testing-library/jest-dom'; ================================================ FILE: examples/unified/react-app/tsconfig.json ================================================ { "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx" }, "include": [ "src" ] } ================================================ FILE: jest.config.js ================================================ module.exports = { preset: 'ts-jest', transform: { '^.+\\.ts$': 'ts-jest', }, moduleFileExtensions: ['ts', 'js', 'json'], collectCoverage: true, collectCoverageFrom: ['**/src/**/*.ts'], coverageReporters: ['lcov', 'text-summary'], restoreMocks: true, coverageThreshold: { global: { branches: 100, functions: 100, lines: 100, statements: 100, } }, verbose: true, modulePathIgnorePatterns: ['/lib'], testPathIgnorePatterns: ['/e2e/', '/examples/react-native/'] }; ================================================ FILE: lerna.json ================================================ { "packages": ["packages/*"], "version": "independent", "npmClient": "pnpm", "command": { "version": { "allowBranch": ["main", "hotfix/*"], "conventionalCommits": true, "message": "chore(release): publish", "preid": "beta", "exact": true, } }, "$schema": "node_modules/lerna/schemas/lerna-schema.json" } ================================================ FILE: nx.json ================================================ { "extends": "nx/presets/npm.json", "$schema": "./node_modules/nx/schemas/nx-schema.json", "targetDefaults": { "build": { "dependsOn": ["^build"], "inputs": ["production", "^production"], "cache": true }, "test": { "dependsOn": ["build"], "cache": true }, "test:playwright": { "cache": true }, "lint": { "inputs": ["default", "{workspaceRoot}/.eslintrc.js"], "cache": true }, "typecheck": { "inputs": ["default", "^production"], "cache": true } }, "namedInputs": { "default": ["{projectRoot}/**/*", "sharedGlobals"], "production": [ "default", "!{projectRoot}/**/?(*.)+(spec|test).[jt]s?(x)?(.snap)", "!{projectRoot}/tsconfig.spec.json", "!{projectRoot}/jest.config.[jt]s", "!{projectRoot}/**/*.test.[jt]s?(x)", "!{projectRoot}/test/**/*", "!{projectRoot}/lib/**/*", "!{projectRoot}/coverage/**/*" ], "sharedGlobals": ["{workspaceRoot}/nx.json"] }, "defaultBase": "main" } ================================================ FILE: package.json ================================================ { "private": true, "workspaces": [ "packages/*" ], "scripts": { "build": "lerna run build --stream --include-dependencies --skip-nx-cache", "build:vite": "rm -rf ./test-server/dist/ && vite build", "build:nx-affected": "nx affected --target=build", "watch": "nx run-many --target=watch --all --parallel 9999 --output-style=stream --maxParallel=0", "clean": "lerna run clean --stream && rimraf node_modules docs", "deploy:version": "lerna version", "deploy:version:dry-run": "DRY_RUN=true lerna version --no-push --no-git-tag-version --allow-branch \"$(git rev-parse --abbrev-ref HEAD)\" --conventional-prerelease --no-changelog --no-push --no-git-tag-version", "deploy:publish": "pnpm -r --filter \"./packages/**\" publish --no-git-checks", "deploy:publish:dry-run": "DRY_RUN=true pnpm -r --filter \"./packages/**\" publish --dry-run --no-git-checks", "deploy:pack": "DRY_RUN=true pnpm -r --filter \"./packages/**\" pack", "dev": "concurrently \"pnpm run watch\" \"vite dev --open\"", "dev:ssh": "pnpm run setup-dev-ssh && export SSH=true && pnpm run dev", "docs": "typedoc", "docs:check": "typedoc --emit none", "fix": "lerna run fix --stream", "generate-signed-cert": "sh ./scripts/dev/generate-signed-cert.sh", "setup-local-domain": "sh ./scripts/dev/setup-local-domain.sh", "setup-dev-ssh": "sh ./scripts/dev/setup-dev-ssh.sh", "lint": "lerna run lint --stream", "lint:nx-cache": "nx run-many --target=lint --all", "lint:nx-affected": "nx affected --target=lint", "lint:staged": "lint-staged", "postinstall": "husky install", "proxy": "node example-proxy/amplitude-proxy-server.js", "proxy:dev": "nodemon example-proxy/amplitude-proxy-server.js", "start": "vite preview --clearScreen=false", "test": "lerna run test --stream", "test:nx-cache": "nx run-many --target=test --all", "test:nx-affected": "nx affected --target=test", "test:examples": "jest --env=jsdom --coverage=false examples --setupFiles ./jest.setup.examples.js", "test:unit": "lerna run test --stream --ignore @amplitude/analytics-*-test", "test:e2e": "lerna run test --stream --scope @amplitude/analytics-*-test", "test:e2e:remote-config": "pnpm build:vite && concurrently --kill-others --success first \"sh packages/e2e-remote-config/remote-config-test.sh\" \"pnpm start -- --port 5173 --clearScreen=false\"", "test:e2e:remote-config:staging": "pnpm build:vite && concurrently --kill-others --success first \"sh packages/e2e-remote-config/remote-config-test-staging.sh\" \"pnpm start -- --port 5173 --clearScreen=false\"", "test:playwright": "lerna run test:playwright --stream", "test:playwright:ui": "playwright test --ui", "test:playwright:debug": "playwright test --debug", "test:playwright:ci": "playwright test", "graph": "nx graph", "version": "git add -A" }, "devDependencies": { "@amplitude/analytics-browser": "workspace:*", "@aws-sdk/client-s3": "^3.0.0", "@commitlint/cli": "^17.3.0", "@commitlint/config-conventional": "^17.3.0", "@nx/workspace": "^21.2.1", "@playwright/test": "1.55.0", "@types/jest": "^29.2.4", "@types/node": "^18.11.14", "@typescript-eslint/eslint-plugin": "^5.46.1", "@typescript-eslint/parser": "^5.46.1", "axios": "^1.6.0", "babel-core": "^6.26.3", "babel-preset-env": "^1.7.0", "concurrently": "^9.1.2", "cors": "^2.8.5", "eslint": "^8.29.0", "eslint-config-prettier": "^8.5.0", "eslint-import-resolver-typescript": "^4.4.4", "eslint-plugin-import": "^2.32.0", "eslint-plugin-jest": "^27.1.6", "eslint-plugin-playwright": "^2.2.0", "express": "^4.18.2", "fake-indexeddb": "4.0.2", "glob": "^10.3.10", "husky": "^8.0.2", "jest": "^29.3.1", "jest-environment-jsdom": "^29.3.1", "lerna": "^9.0.0", "lint-staged": "^15.2.0", "morgan": "^1.10.0", "nodemon": "^3.0.1", "nx": "^21.2.1", "prettier": "^2.8.1", "rimraf": "^3.0.2", "source-map": "^0.7.4", "ts-jest": "^29.0.3", "tslib": "^2.4.1", "typedoc": "^0.23.22", "typescript": "^4.9.4", "vite": "^6.3.4", "yargs": "^17.7.1" }, "lint-staged": { "*.ts": [ "eslint --fix", "prettier --write" ] }, "dependencies": { "tslib": "^2.4.1" }, "packageManager": "pnpm@10.26.1+sha512.664074abc367d2c9324fdc18037097ce0a8f126034160f709928e9e9f95d98714347044e5c3164d65bd5da6c59c6be362b107546292a8eecb7999196e5ce58fa", "pnpm": { "overrides": { "typescript": "^4.9.4" } } } ================================================ FILE: packages/analytics-browser/.eslintignore ================================================ playground/ ================================================ FILE: packages/analytics-browser/CHANGELOG.md ================================================ # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.42.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.42.2...@amplitude/analytics-browser@2.42.3) (2026-05-13) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.42.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.42.1...@amplitude/analytics-browser@2.42.2) (2026-05-11) ### Bug Fixes * **analytics-browser:** remove plugin-session-replay-browser template ([#1746](https://github.com/amplitude/Amplitude-TypeScript/issues/1746)) ([809abdc](https://github.com/amplitude/Amplitude-TypeScript/commit/809abdca353926f9518547bcb967b6bd14b23e57)) ## [2.42.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.42.0...@amplitude/analytics-browser@2.42.1) (2026-05-05) ### Bug Fixes * **analytics-browser:** make autocapture opt-in within Chrome Extension ([#1710](https://github.com/amplitude/Amplitude-TypeScript/issues/1710)) ([de5ff6e](https://github.com/amplitude/Amplitude-TypeScript/commit/de5ff6e4fc9bfcf5d880fb291c796614ef86cc59)) # [2.42.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.41.1...@amplitude/analytics-browser@2.42.0) (2026-04-28) ### Features * remove experimental request body compression backdoor ([#1699](https://github.com/amplitude/Amplitude-TypeScript/issues/1699)) ([98ecb9d](https://github.com/amplitude/Amplitude-TypeScript/commit/98ecb9dc1f3658cf6d0dfae1e9784335c9d33b5e)) ## [2.41.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.41.0...@amplitude/analytics-browser@2.41.1) (2026-04-22) **Note:** Version bump only for package @amplitude/analytics-browser # [2.41.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.40.0...@amplitude/analytics-browser@2.41.0) (2026-04-21) ### Features * add long task tracking ([#1622](https://github.com/amplitude/Amplitude-TypeScript/issues/1622)) ([d995e1f](https://github.com/amplitude/Amplitude-TypeScript/commit/d995e1f2c098441808d65f6c171e171587e37ac2)) # [2.40.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.39.0...@amplitude/analytics-browser@2.40.0) (2026-04-14) ### Features * **analytics-browser:** event property attribution ([#1628](https://github.com/amplitude/Amplitude-TypeScript/issues/1628)) ([6d37e79](https://github.com/amplitude/Amplitude-TypeScript/commit/6d37e797976e0e77dc11046b9259eb4b80259996)) # [2.39.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.38.1...@amplitude/analytics-browser@2.39.0) (2026-04-09) ### Bug Fixes * **plugin-custom-enrichment:** allow disable custom enrichment plugin over remote config settings ([#1638](https://github.com/amplitude/Amplitude-TypeScript/issues/1638)) ([385c4de](https://github.com/amplitude/Amplitude-TypeScript/commit/385c4ded2b2622fde1ac0930495805e11353d55f)) ### Features * **analytics-browser:** [experimental] add video tracking function ([#1652](https://github.com/amplitude/Amplitude-TypeScript/issues/1652)) ([3af90e2](https://github.com/amplitude/Amplitude-TypeScript/commit/3af90e2f662d9ed82c56a506c8d2ef6d5da85bd8)) ## [2.38.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.38.0...@amplitude/analytics-browser@2.38.1) (2026-04-01) **Note:** Version bump only for package @amplitude/analytics-browser # [2.38.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.37.2...@amplitude/analytics-browser@2.38.0) (2026-03-26) ### Features * **autocapture:** add viewportContentUpdated support to remote config ([#1621](https://github.com/amplitude/Amplitude-TypeScript/issues/1621)) ([f40b150](https://github.com/amplitude/Amplitude-TypeScript/commit/f40b150ddb44da9c69bc97da69f9ba003d1eb7d6)) ## [2.37.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.37.1...@amplitude/analytics-browser@2.37.2) (2026-03-24) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.37.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.37.0...@amplitude/analytics-browser@2.37.1) (2026-03-23) **Note:** Version bump only for package @amplitude/analytics-browser # [2.37.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.36.8...@amplitude/analytics-browser@2.37.0) (2026-03-20) ### Features * **plugin-custom-enrichment:** add plugin based on remote config settings ([#1586](https://github.com/amplitude/Amplitude-TypeScript/issues/1586)) ([617ebfe](https://github.com/amplitude/Amplitude-TypeScript/commit/617ebfe7aaee04b0aef3db09b48ed11bad9a6ca3)) ## [2.36.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.36.7...@amplitude/analytics-browser@2.36.8) (2026-03-19) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.36.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.36.6...@amplitude/analytics-browser@2.36.7) (2026-03-17) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.36.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.36.5...@amplitude/analytics-browser@2.36.6) (2026-03-16) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.36.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.36.4...@amplitude/analytics-browser@2.36.5) (2026-03-13) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.36.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.36.3...@amplitude/analytics-browser@2.36.4) (2026-03-12) ### Bug Fixes * **analytics-browser:** skip localhost + single word domain on TLD check ([#1584](https://github.com/amplitude/Amplitude-TypeScript/issues/1584)) ([a07861e](https://github.com/amplitude/Amplitude-TypeScript/commit/a07861e24bebeab641b4fb4cd474532a16e4e0e5)) * **analytics-core:** remote config should not retry client side error except 429 ([#1590](https://github.com/amplitude/Amplitude-TypeScript/issues/1590)) ([b1445cb](https://github.com/amplitude/Amplitude-TypeScript/commit/b1445cb43272281ceb60da5055283fb42c494068)) ## [2.36.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.36.2...@amplitude/analytics-browser@2.36.3) (2026-03-09) ### Bug Fixes * **analytics-browser:** Safari cookie writing race condition + extra exception catching ([#1578](https://github.com/amplitude/Amplitude-TypeScript/issues/1578)) ([bbcc6d7](https://github.com/amplitude/Amplitude-TypeScript/commit/bbcc6d77342a78388fce3fdf8b01d208e6403acf)) * **analytics-browser:** skip known 2lds in TLD check ([#1575](https://github.com/amplitude/Amplitude-TypeScript/issues/1575)) ([1aaab18](https://github.com/amplitude/Amplitude-TypeScript/commit/1aaab1855d6739d4ac7c952e71427bff34844a74)) ## [2.36.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.36.1...@amplitude/analytics-browser@2.36.2) (2026-03-05) ### Bug Fixes * make getTopLevelDomain and isEnabled synchronous to avoid re-entrancy ([#1564](https://github.com/amplitude/Amplitude-TypeScript/issues/1564)) ([ab9b09f](https://github.com/amplitude/Amplitude-TypeScript/commit/ab9b09f9ec9b9583f92c7cdffb7194cc30e0ea9f)) ## [2.36.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.36.0...@amplitude/analytics-browser@2.36.1) (2026-03-03) **Note:** Version bump only for package @amplitude/analytics-browser # [2.36.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.35.4...@amplitude/analytics-browser@2.36.0) (2026-03-03) ### Bug Fixes * make default excluded referrers work better ([#1559](https://github.com/amplitude/Amplitude-TypeScript/issues/1559)) ([4bcca98](https://github.com/amplitude/Amplitude-TypeScript/commit/4bcca98e414833d7b7b3e4938ce46f55e6dad472)) ### Features * **analytics-browser:** add config attribution.excludeInternalReferrers ([#1548](https://github.com/amplitude/Amplitude-TypeScript/issues/1548)) ([df16648](https://github.com/amplitude/Amplitude-TypeScript/commit/df1664856bea96afde1dbac8dc523b4d69925c2a)) * **analytics-browser:** support gzip request body compression ([#1542](https://github.com/amplitude/Amplitude-TypeScript/issues/1542)) ([0d2a7d2](https://github.com/amplitude/Amplitude-TypeScript/commit/0d2a7d2d873c86d8854dad16109af461ad392166)) * manual opt in gzip ([#1568](https://github.com/amplitude/Amplitude-TypeScript/issues/1568)) ([303c130](https://github.com/amplitude/Amplitude-TypeScript/commit/303c130429c51b0913f3903db4ace5263e1c78e7)) ## [2.35.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.35.3...@amplitude/analytics-browser@2.35.4) (2026-02-26) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.35.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.35.2...@amplitude/analytics-browser@2.35.3) (2026-02-24) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.35.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.35.1...@amplitude/analytics-browser@2.35.2) (2026-02-20) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.35.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.35.0...@amplitude/analytics-browser@2.35.1) (2026-02-19) ### Bug Fixes * **analytics-browser:** prevent circular reference in logBrowserOptions ([#1537](https://github.com/amplitude/Amplitude-TypeScript/issues/1537)) ([23b4fdb](https://github.com/amplitude/Amplitude-TypeScript/commit/23b4fdb106a242e4f64b81842f4227bcf771432b)) # [2.35.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.34.1...@amplitude/analytics-browser@2.35.0) (2026-02-17) ### Features * **analytics-browser:** add setIdentity() ([#1517](https://github.com/amplitude/Amplitude-TypeScript/issues/1517)) ([314b3c1](https://github.com/amplitude/Amplitude-TypeScript/commit/314b3c1b7ee5b0ef135848a66156eb2874daec5f)) ## [2.34.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.34.0...@amplitude/analytics-browser@2.34.1) (2026-02-10) ### Bug Fixes * **analytics-browser:** defer session_start and attribution when optOut is "true" ([#1509](https://github.com/amplitude/Amplitude-TypeScript/issues/1509)) ([3a3818d](https://github.com/amplitude/Amplitude-TypeScript/commit/3a3818d19bd84e4aa8405e10f8538886dd647f38)) * **analytics-browser:** prevent Form from being bound to 2x ([#1527](https://github.com/amplitude/Amplitude-TypeScript/issues/1527)) ([9ec707f](https://github.com/amplitude/Amplitude-TypeScript/commit/9ec707fc785bdd552bb6db89c9213c6293f71a3e)) * **analytics-core:** add ValidPropertyType type ([#1525](https://github.com/amplitude/Amplitude-TypeScript/issues/1525)) ([f63c657](https://github.com/amplitude/Amplitude-TypeScript/commit/f63c6570f95acab087ad47d9ce9442fe42765a2c)) # [2.34.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.33.5...@amplitude/analytics-browser@2.34.0) (2026-01-26) ### Features * **analytics-browser:** add shouldTrackSubmit for custom form validation ([#1500](https://github.com/amplitude/Amplitude-TypeScript/issues/1500)) ([1d76745](https://github.com/amplitude/Amplitude-TypeScript/commit/1d76745dc202e27d188bfe47ae76d69806bbb566)) ## [2.33.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.33.4...@amplitude/analytics-browser@2.33.5) (2026-01-21) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.33.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.33.3...@amplitude/analytics-browser@2.33.4) (2026-01-15) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.33.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.33.2...@amplitude/analytics-browser@2.33.3) (2026-01-14) ### Bug Fixes * **analytics-browser:** re-entrant error in cookies.isEnabled ([#1493](https://github.com/amplitude/Amplitude-TypeScript/issues/1493)) ([ed4f62c](https://github.com/amplitude/Amplitude-TypeScript/commit/ed4f62cb57a389deb1b67f3fdb310e30caf7e3e2)) ## [2.33.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.33.1...@amplitude/analytics-browser@2.33.2) (2026-01-14) ### Bug Fixes * **analytics-browser:** two cookie problem resolution ([#1490](https://github.com/amplitude/Amplitude-TypeScript/issues/1490)) ([506638a](https://github.com/amplitude/Amplitude-TypeScript/commit/506638a2a412dc3843b0da9450325f70ff465422)) * **deps:** bump node-forge from 1.3.1 to 1.3.3 in /packages/analytics-browser/playground/react-spa ([#1438](https://github.com/amplitude/Amplitude-TypeScript/issues/1438)) ([ffacc88](https://github.com/amplitude/Amplitude-TypeScript/commit/ffacc8888217249e6c8084ef7327872e1fa375ca)) ## [2.33.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.33.0...@amplitude/analytics-browser@2.33.1) (2025-12-30) **Note:** Version bump only for package @amplitude/analytics-browser # [2.33.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.32.2...@amplitude/analytics-browser@2.33.0) (2025-12-24) ### Features * **analytics-browser:** add support to set headers for transport pro… ([#1444](https://github.com/amplitude/Amplitude-TypeScript/issues/1444)) ([c277239](https://github.com/amplitude/Amplitude-TypeScript/commit/c277239d317106496f7a08fc2933e72e391be9de)) ## [2.32.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.32.1...@amplitude/analytics-browser@2.32.2) (2025-12-16) ### Bug Fixes * **analytics-browser:** remoteConfig.fetchRemoteConfig was broken ([#1434](https://github.com/amplitude/Amplitude-TypeScript/issues/1434)) ([43540d0](https://github.com/amplitude/Amplitude-TypeScript/commit/43540d0cc26baf491feebda3973343153626dcb9)) ## [2.32.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.32.0...@amplitude/analytics-browser@2.32.1) (2025-12-12) ### Bug Fixes * **analytics-browser:** diagnostics track user agent ([#1428](https://github.com/amplitude/Amplitude-TypeScript/issues/1428)) ([11c14ed](https://github.com/amplitude/Amplitude-TypeScript/commit/11c14ede71725140fcdd86d3ab1dc277cc586729)) # [2.32.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.31.4...@amplitude/analytics-browser@2.32.0) (2025-12-09) ### Features * diagnostics uncaught sdk errors installed by script ([#1419](https://github.com/amplitude/Amplitude-TypeScript/issues/1419)) ([dc0b3cc](https://github.com/amplitude/Amplitude-TypeScript/commit/dc0b3cc9df5915d1bfb773b64099c70fc9408fda)) ## [2.31.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.31.3...@amplitude/analytics-browser@2.31.4) (2025-12-08) ### Bug Fixes * identify call race condition ([#1424](https://github.com/amplitude/Amplitude-TypeScript/issues/1424)) ([1aaaff5](https://github.com/amplitude/Amplitude-TypeScript/commit/1aaaff581a21ed4cedb50430550a66310e20ce8b)) ## [2.31.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.31.2...@amplitude/analytics-browser@2.31.3) (2025-11-21) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.31.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.31.1...@amplitude/analytics-browser@2.31.2) (2025-11-20) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.31.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.31.0...@amplitude/analytics-browser@2.31.1) (2025-11-17) ### Bug Fixes * **analytics-core:** record unsuccessful response ([#1405](https://github.com/amplitude/Amplitude-TypeScript/issues/1405)) ([7e842fe](https://github.com/amplitude/Amplitude-TypeScript/commit/7e842feb0aa36ec4274b97a205b19613f3b5c642)) # [2.31.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.30.1...@amplitude/analytics-browser@2.31.0) (2025-11-17) ### Features * **analytics-browser:** add reset listener API ([#1393](https://github.com/amplitude/Amplitude-TypeScript/issues/1393)) ([7bd85e5](https://github.com/amplitude/Amplitude-TypeScript/commit/7bd85e51b01cefdb43b8474d930e8c219b739323)) * **analytics-browser:** diagnostics remote config ([#1397](https://github.com/amplitude/Amplitude-TypeScript/issues/1397)) ([50dc4dd](https://github.com/amplitude/Amplitude-TypeScript/commit/50dc4dd3dee17facdb483c3411fd6d00a1f2c127)) ## [2.30.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.30.0...@amplitude/analytics-browser@2.30.1) (2025-11-05) **Note:** Version bump only for package @amplitude/analytics-browser # [2.30.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.29.0...@amplitude/analytics-browser@2.30.0) (2025-10-29) ### Features * more diagnostics metrics ([#1371](https://github.com/amplitude/Amplitude-TypeScript/issues/1371)) ([40e255c](https://github.com/amplitude/Amplitude-TypeScript/commit/40e255c89c98f4ffffd883296d3d8a9947326aaa)) # [2.29.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.28.0...@amplitude/analytics-browser@2.29.0) (2025-10-23) ### Features * **autocapture:** set page url enrichment plugin to default on and add/fix tests ([#1287](https://github.com/amplitude/Amplitude-TypeScript/issues/1287)) ([d96d7dd](https://github.com/amplitude/Amplitude-TypeScript/commit/d96d7dd7db156eae51a342b4956db2530ca64d29)) # [2.28.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.27.1...@amplitude/analytics-browser@2.28.0) (2025-10-23) ### Features * **analytics-browser:** add remote config server url to proxy remote config requests ([#1348](https://github.com/amplitude/Amplitude-TypeScript/issues/1348)) ([461b598](https://github.com/amplitude/Amplitude-TypeScript/commit/461b59876a75af0d97fd639c35ce08f6b0f4c24b)) ## [2.27.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.27.0...@amplitude/analytics-browser@2.27.1) (2025-10-21) **Note:** Version bump only for package @amplitude/analytics-browser # [2.27.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.26.2...@amplitude/analytics-browser@2.27.0) (2025-10-17) ### Features * make web-vitals autocapture GA ([#1347](https://github.com/amplitude/Amplitude-TypeScript/issues/1347)) ([178862f](https://github.com/amplitude/Amplitude-TypeScript/commit/178862f87e6ea8a882c1d612f48692ab1ab65e14)) ## [2.26.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.26.1...@amplitude/analytics-browser@2.26.2) (2025-10-15) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.26.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.26.0...@amplitude/analytics-browser@2.26.1) (2025-10-14) **Note:** Version bump only for package @amplitude/analytics-browser # [2.26.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.25.4...@amplitude/analytics-browser@2.26.0) (2025-10-14) ### Bug Fixes * **analytics-browser:** remove analytics-remote-config dependency ([#1336](https://github.com/amplitude/Amplitude-TypeScript/issues/1336)) ([36ccea0](https://github.com/amplitude/Amplitude-TypeScript/commit/36ccea0156c500304983d2e7d53b40432ecb19e4)) ### Features * **plugin-network-capture-browser:** enable networkTracking by default when autocapture=true ([#1333](https://github.com/amplitude/Amplitude-TypeScript/issues/1333)) ([27e365b](https://github.com/amplitude/Amplitude-TypeScript/commit/27e365b76fe757a7161b85e5dc5795549c4ab1eb)) ## [2.25.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.25.3...@amplitude/analytics-browser@2.25.4) (2025-10-07) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.25.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.25.2...@amplitude/analytics-browser@2.25.3) (2025-10-06) ### Bug Fixes * Allow timestamp override for experiment events ([#1317](https://github.com/amplitude/Amplitude-TypeScript/issues/1317)) ([055b998](https://github.com/amplitude/Amplitude-TypeScript/commit/055b99898bcff8f59755f92937b628e3852a5c35)) * resolve pluralization issue frustrationInteractions ([#1320](https://github.com/amplitude/Amplitude-TypeScript/issues/1320)) ([3bd89d0](https://github.com/amplitude/Amplitude-TypeScript/commit/3bd89d073bb949b525fa6f65f66ad6511df4da34)) ## [2.25.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.25.1...@amplitude/analytics-browser@2.25.2) (2025-10-03) ### Bug Fixes * add diagnostics to client and track autocapture getHierachy block time ([#1312](https://github.com/amplitude/Amplitude-TypeScript/issues/1312)) ([a919e22](https://github.com/amplitude/Amplitude-TypeScript/commit/a919e223428083a87954cffa50bc765baa5360b0)) * **analytics-browser:** suppress unnecessary url warnings ([#1315](https://github.com/amplitude/Amplitude-TypeScript/issues/1315)) ([c65c726](https://github.com/amplitude/Amplitude-TypeScript/commit/c65c72604113cac24e877eb0ec9e160fd7d84a1a)) * support timestamp override for Experiment events ([dc9640d](https://github.com/amplitude/Amplitude-TypeScript/commit/dc9640d1d8915a544fcf7dcad12704cb317d35cd)) * undo debug statement issue from last PR ([#1319](https://github.com/amplitude/Amplitude-TypeScript/issues/1319)) ([6a98015](https://github.com/amplitude/Amplitude-TypeScript/commit/6a9801501c3f75ea9d580e20d15890e391b37cb6)) ### Reverts * **analytics-browser:** revert "fix: support timestamp override for Experiment events" ([#1316](https://github.com/amplitude/Amplitude-TypeScript/issues/1316)) ([bf4584b](https://github.com/amplitude/Amplitude-TypeScript/commit/bf4584b4426a7f6a1b4ec779a26fda50cfcd8389)) ## [2.25.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.25.0...@amplitude/analytics-browser@2.25.1) (2025-10-01) **Note:** Version bump only for package @amplitude/analytics-browser # [2.25.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.24.2...@amplitude/analytics-browser@2.25.0) (2025-09-25) ### Features * **analytics-browser:** add "identify" to config ([#1303](https://github.com/amplitude/Amplitude-TypeScript/issues/1303)) ([693720c](https://github.com/amplitude/Amplitude-TypeScript/commit/693720c348eaac0ffef8b88454deae06ceca0bb4)) ## [2.24.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.24.1...@amplitude/analytics-browser@2.24.2) (2025-09-23) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.24.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.24.0...@amplitude/analytics-browser@2.24.1) (2025-09-18) ### Bug Fixes * networkTracking support remote config headers ([#1288](https://github.com/amplitude/Amplitude-TypeScript/issues/1288)) ([1d0b476](https://github.com/amplitude/Amplitude-TypeScript/commit/1d0b476b5e5afc56e542961a63857696b9f47a04)) # [2.24.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.23.7...@amplitude/analytics-browser@2.24.0) (2025-09-12) ### Features * **analytics-browser:** add urlsRegex to remote capture rule for network tracking ([#1284](https://github.com/amplitude/Amplitude-TypeScript/issues/1284)) ([04392c9](https://github.com/amplitude/Amplitude-TypeScript/commit/04392c96844f5328e8d04d7c3840ad273ce38a43)) * **analytics-browser:** make frustrationInteractions GA ([#1286](https://github.com/amplitude/Amplitude-TypeScript/issues/1286)) ([40d62be](https://github.com/amplitude/Amplitude-TypeScript/commit/40d62be5e1713a3756464f83bd15d25fe1294956)) ## [2.23.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.23.6...@amplitude/analytics-browser@2.23.7) (2025-09-09) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.23.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.23.5...@amplitude/analytics-browser@2.23.6) (2025-09-05) ### Bug Fixes * Use original marketing cookies set by web experiment pre-redirect ([#1280](https://github.com/amplitude/Amplitude-TypeScript/issues/1280)) ([cb32969](https://github.com/amplitude/Amplitude-TypeScript/commit/cb329695d9654790f79aa23eaa8ba67b73e67974)) ## [2.23.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.23.4...@amplitude/analytics-browser@2.23.5) (2025-08-28) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.23.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.23.3...@amplitude/analytics-browser@2.23.4) (2025-08-26) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.23.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.23.2...@amplitude/analytics-browser@2.23.3) (2025-08-25) ### Bug Fixes * add missing BrowserClient attributes ([#1272](https://github.com/amplitude/Amplitude-TypeScript/issues/1272)) ([678be79](https://github.com/amplitude/Amplitude-TypeScript/commit/678be79a3b4864300471d433a63c000c4b098c77)) ## [2.23.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.23.1...@amplitude/analytics-browser@2.23.2) (2025-08-25) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.23.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.23.0...@amplitude/analytics-browser@2.23.1) (2025-08-22) ### Bug Fixes * **analytics-core:** fix typo in Reddit click-id ([#1267](https://github.com/amplitude/Amplitude-TypeScript/issues/1267)) ([43e581d](https://github.com/amplitude/Amplitude-TypeScript/commit/43e581d6465546a38373f758f179eee103172755)) # [2.23.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.22.2...@amplitude/analytics-browser@2.23.0) (2025-08-21) ### Features * **analytics-browser:** add urls matching attribute to network capture rules (experimental) ([#1252](https://github.com/amplitude/Amplitude-TypeScript/issues/1252)) ([c28a98c](https://github.com/amplitude/Amplitude-TypeScript/commit/c28a98c13536d3eb2472edcce6ec225539db00aa)) ## [2.22.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.22.1...@amplitude/analytics-browser@2.22.2) (2025-08-13) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.22.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.22.0...@amplitude/analytics-browser@2.22.1) (2025-08-08) ### Bug Fixes * add function to translate remoteConfig to localConfig ([#1232](https://github.com/amplitude/Amplitude-TypeScript/issues/1232)) ([ae53401](https://github.com/amplitude/Amplitude-TypeScript/commit/ae5340141d8c55544ae3ac0fefa80e54f478ba04)) # [2.22.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.21.1...@amplitude/analytics-browser@2.22.0) (2025-08-05) ### Bug Fixes * **analtyics-browser): Revert "feat(analytics-browser:** add page-url-previous-page plugin" ([#1237](https://github.com/amplitude/Amplitude-TypeScript/issues/1237)) ([dfd7340](https://github.com/amplitude/Amplitude-TypeScript/commit/dfd7340f6519e647a814b3c66913b0c96b0567cf)) * **analytics-browser:** use the new remote config client ([#1191](https://github.com/amplitude/Amplitude-TypeScript/issues/1191)) ([9af61ea](https://github.com/amplitude/Amplitude-TypeScript/commit/9af61ea1f29fa97644910f37440562e5a6d5eeba)) ### Features * **analytics-browser:** add page-url-previous-page plugin ([#1110](https://github.com/amplitude/Amplitude-TypeScript/issues/1110)) ([dc053ed](https://github.com/amplitude/Amplitude-TypeScript/commit/dc053ed9f0b6378fce6a49f6a6e4196f3622bd25)) * **plugin-page-url-enrichment-browser:** AMP-130401 create Page URL Enrichment plugin for additional Page URL related properties ([#1238](https://github.com/amplitude/Amplitude-TypeScript/issues/1238)) ([4673be8](https://github.com/amplitude/Amplitude-TypeScript/commit/4673be86ab5535fdca66d1743ef4ee071d5fdef7)) ## [2.21.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.21.0...@amplitude/analytics-browser@2.21.1) (2025-07-30) ### Bug Fixes * **analytics-browser:** support evaluation window for cross domain t… ([#1227](https://github.com/amplitude/Amplitude-TypeScript/issues/1227)) ([498224e](https://github.com/amplitude/Amplitude-TypeScript/commit/498224eb91296390193f9541debc14a75b677925)) # [2.21.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.20.1...@amplitude/analytics-browser@2.21.0) (2025-07-29) ### Bug Fixes * **analytics-react-native:** migrate to analytics-core v2 ([#1216](https://github.com/amplitude/Amplitude-TypeScript/issues/1216)) ([76e85a1](https://github.com/amplitude/Amplitude-TypeScript/commit/76e85a1daa704a1c4c44d0176a56c8dd8d4ad3f1)) ### Features * **analytics-core:** expose unified AmplitudeContext and AnalyticsClient ([#1222](https://github.com/amplitude/Amplitude-TypeScript/issues/1222)) ([7e32712](https://github.com/amplitude/Amplitude-TypeScript/commit/7e327128b4032592897dc6bb50dedda053ad8eda)) ## [2.20.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.20.0...@amplitude/analytics-browser@2.20.1) (2025-07-18) ### Bug Fixes * **analytics-browser:** disable frustrationInteractions and webVitals when autocapture=true ([#1214](https://github.com/amplitude/Amplitude-TypeScript/issues/1214)) ([b16efb9](https://github.com/amplitude/Amplitude-TypeScript/commit/b16efb98d4e8a1b94114f8e0dbf0501c4984123a)) # [2.20.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.19.0...@amplitude/analytics-browser@2.20.0) (2025-07-17) ### Features * **analytics-browser:** support autocapture.webVitals ([#1195](https://github.com/amplitude/Amplitude-TypeScript/issues/1195)) ([a186f52](https://github.com/amplitude/Amplitude-TypeScript/commit/a186f523a28d8a322842566b892f50bcf2643142)) # [2.19.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.18.2...@amplitude/analytics-browser@2.19.0) (2025-07-15) ### Features * **analytics-browser:** add experimental frustrationInteractions ([#1209](https://github.com/amplitude/Amplitude-TypeScript/issues/1209)) ([e321744](https://github.com/amplitude/Amplitude-TypeScript/commit/e3217444c58be15e779ff1fd54a55027c93f5db0)) ## [2.18.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.18.1...@amplitude/analytics-browser@2.18.2) (2025-07-11) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.18.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.18.0...@amplitude/analytics-browser@2.18.1) (2025-07-08) **Note:** Version bump only for package @amplitude/analytics-browser # [2.18.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.12...@amplitude/analytics-browser@2.18.0) (2025-06-30) ### Features * add getOptOut() and getIdentity() ([#1174](https://github.com/amplitude/Amplitude-TypeScript/issues/1174)) ([72017c8](https://github.com/amplitude/Amplitude-TypeScript/commit/72017c8a1a54d929542e883e61d61168f214a780)) ## [2.17.12](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.11...@amplitude/analytics-browser@2.17.12) (2025-06-26) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.17.11](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.10...@amplitude/analytics-browser@2.17.11) (2025-06-25) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.17.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.9...@amplitude/analytics-browser@2.17.10) (2025-06-16) ### Bug Fixes * guard globalScope missing "addEventListener" ([#1154](https://github.com/amplitude/Amplitude-TypeScript/issues/1154)) ([7cf775f](https://github.com/amplitude/Amplitude-TypeScript/commit/7cf775f320375b86fa15710444e101f3905b4836)) ## [2.17.9](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.8...@amplitude/analytics-browser@2.17.9) (2025-06-11) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.17.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.7...@amplitude/analytics-browser@2.17.8) (2025-06-03) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.17.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.7-main.0...@amplitude/analytics-browser@2.17.7) (2025-05-27) ### Bug Fixes * **analytics-browser:** support autocapture.networkTracking as object ([#1095](https://github.com/amplitude/Amplitude-TypeScript/issues/1095)) ([121abc7](https://github.com/amplitude/Amplitude-TypeScript/commit/121abc7e69a354cc704de7cbe493b8c79fa6eacd)) ### Reverts * "chore(release): publish" ([#1094](https://github.com/amplitude/Amplitude-TypeScript/issues/1094)) ([f6db1ee](https://github.com/amplitude/Amplitude-TypeScript/commit/f6db1eed32ed77c7ce626624dc55972971f3b27d)) ## [2.17.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.5...@amplitude/analytics-browser@2.17.6) (2025-05-14) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.17.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.4...@amplitude/analytics-browser@2.17.5) (2025-05-13) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.17.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.3...@amplitude/analytics-browser@2.17.4) (2025-05-07) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.17.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.2...@amplitude/analytics-browser@2.17.3) (2025-05-05) ### Bug Fixes * **analytics-browser:** use performance.now in network capture ([#1060](https://github.com/amplitude/Amplitude-TypeScript/issues/1060)) ([70917e2](https://github.com/amplitude/Amplitude-TypeScript/commit/70917e26369d27adf62e6b9a44a39599a312b3ef)) ## [2.17.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.1...@amplitude/analytics-browser@2.17.2) (2025-05-02) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.17.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.17.0...@amplitude/analytics-browser@2.17.1) (2025-05-02) **Note:** Version bump only for package @amplitude/analytics-browser # [2.17.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.16.1...@amplitude/analytics-browser@2.17.0) (2025-05-02) ### Features * **analytics-browser:** autocapture network errors ([#1050](https://github.com/amplitude/Amplitude-TypeScript/issues/1050)) ([104350f](https://github.com/amplitude/Amplitude-TypeScript/commit/104350ffe8b1bd1a7090482ac3bf24d85672bd43)) ## [2.16.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.16.0...@amplitude/analytics-browser@2.16.1) (2025-04-30) ### Bug Fixes * **analytics-browser:** fix TS2742 by re-exporting types ([#1049](https://github.com/amplitude/Amplitude-TypeScript/issues/1049)) ([c2bffac](https://github.com/amplitude/Amplitude-TypeScript/commit/c2bffac7fc06e19b6c227c89635836c635d0385b)) * **analytics-browser:** reapply fix for default config values not being used for fetchRemoteConfig ([#1048](https://github.com/amplitude/Amplitude-TypeScript/issues/1048)) ([95bf251](https://github.com/amplitude/Amplitude-TypeScript/commit/95bf2519d8dd6c24a6d79b369cffc0fdf41f2f2d)) # [2.16.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.15.0...@amplitude/analytics-browser@2.16.0) (2025-04-22) ### Bug Fixes * **analytics-browser:** default values for config were not being used for fetchRemoteConfig ([#1037](https://github.com/amplitude/Amplitude-TypeScript/issues/1037)) ([9310364](https://github.com/amplitude/Amplitude-TypeScript/commit/9310364a3b022fdc891b44d84c5161c92bd4fc6d)) ### Features * **analytics-browser:** allow initialization of remote config property pageUrlAllowlistRegex ([#1021](https://github.com/amplitude/Amplitude-TypeScript/issues/1021)) ([7bdb80b](https://github.com/amplitude/Amplitude-TypeScript/commit/7bdb80b5397288cfda0f657a337cde0aa901db2b)) # [2.15.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.14.0...@amplitude/analytics-browser@2.15.0) (2025-04-17) ### Bug Fixes * **analytics-core:** add support for experiment plugin ([#1033](https://github.com/amplitude/Amplitude-TypeScript/issues/1033)) ([69a20c7](https://github.com/amplitude/Amplitude-TypeScript/commit/69a20c7a895eb4bb4668583ea3371d0ca2df18d2)) ### Features * **analytics-core:** new plugin interfaces onXXXchanged() ([#1025](https://github.com/amplitude/Amplitude-TypeScript/issues/1025)) ([e6fd23b](https://github.com/amplitude/Amplitude-TypeScript/commit/e6fd23b17809d0c7d94e7627636b200166d41a0f)) # [2.14.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.13.3...@amplitude/analytics-browser@2.14.0) (2025-04-15) ### Features * **analytics-browser:** plugin host ([#1013](https://github.com/amplitude/Amplitude-TypeScript/issues/1013)) ([a4af4c7](https://github.com/amplitude/Amplitude-TypeScript/commit/a4af4c7490384e749132f84d0385db5583c2b742)) ## [2.13.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.13.2...@amplitude/analytics-browser@2.13.3) (2025-04-10) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.13.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.13.1...@amplitude/analytics-browser@2.13.2) (2025-04-07) ### Bug Fixes * remove log statements ([#1019](https://github.com/amplitude/Amplitude-TypeScript/issues/1019)) ([c6dd24e](https://github.com/amplitude/Amplitude-TypeScript/commit/c6dd24e18751cc3f02b94fcfc7677c2cc9025293)) ## [2.13.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.13.0...@amplitude/analytics-browser@2.13.1) (2025-04-07) ### Bug Fixes * **analytics-browser:** add try/catch when accessing localStorage ([#1017](https://github.com/amplitude/Amplitude-TypeScript/issues/1017)) ([7c8a9dd](https://github.com/amplitude/Amplitude-TypeScript/commit/7c8a9ddd329a8a780328396966544080313574cb)) # [2.13.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.12.2...@amplitude/analytics-browser@2.13.0) (2025-04-02) ### Bug Fixes * **analytics-browser:** export more types ([#1011](https://github.com/amplitude/Amplitude-TypeScript/issues/1011)) ([561afc2](https://github.com/amplitude/Amplitude-TypeScript/commit/561afc2538da25867db02646829b2eb81693abcd)) ### Features * **analytics-browser:** set default for fetchRemoteConfig option to true ([#1008](https://github.com/amplitude/Amplitude-TypeScript/issues/1008)) ([5138cd1](https://github.com/amplitude/Amplitude-TypeScript/commit/5138cd16be1ff3bb57c38ec0eae5098a1b7933fc)) ## [2.12.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.12.1...@amplitude/analytics-browser@2.12.2) (2025-03-24) ### Bug Fixes * **analytics-browser:** re-export enums from analytics-types ([#1005](https://github.com/amplitude/Amplitude-TypeScript/issues/1005)) ([01a497e](https://github.com/amplitude/Amplitude-TypeScript/commit/01a497ea79513c9995db5852e38f8661f28edb77)) * **analytics-browser:** should track file download and form interaction when plugins are installed after page loads ([#1003](https://github.com/amplitude/Amplitude-TypeScript/issues/1003)) ([6066677](https://github.com/amplitude/Amplitude-TypeScript/commit/6066677f65aefbe67d4b3efbfb96ba5a95264230)) ## [2.12.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.12.0...@amplitude/analytics-browser@2.12.1) (2025-03-21) ### Bug Fixes * **analytics-browser:** replace analytics-types with analytics-core ([#993](https://github.com/amplitude/Amplitude-TypeScript/issues/993)) ([f180f05](https://github.com/amplitude/Amplitude-TypeScript/commit/f180f05854393bf18d94f1753d284778ba3b5377)) # [2.12.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.13...@amplitude/analytics-browser@2.12.0) (2025-03-14) ### Features * **analytics-core:** merge analytics-client-common ([#977](https://github.com/amplitude/Amplitude-TypeScript/issues/977)) ([1746ae5](https://github.com/amplitude/Amplitude-TypeScript/commit/1746ae5efb1ecd0e7586bc22ff8a704a6928c26a)) * **analytics-core:** merge analytics-types ([#989](https://github.com/amplitude/Amplitude-TypeScript/issues/989)) ([9f7ed68](https://github.com/amplitude/Amplitude-TypeScript/commit/9f7ed68e8ec468f5c597ce427c70ffd855dde629)) ## [2.11.13](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.12...@amplitude/analytics-browser@2.11.13) (2025-02-28) ### Bug Fixes * **analytics-core:** should not flush until previous request resolves ([#964](https://github.com/amplitude/Amplitude-TypeScript/issues/964)) ([771ce55](https://github.com/amplitude/Amplitude-TypeScript/commit/771ce556cb131b71ddb28461268a6feb5f3a1b1d)) ### Reverts * Revert "chore(release): publish" ([d392f62](https://github.com/amplitude/Amplitude-TypeScript/commit/d392f6290b8bb4dd955d6e6f20b00191679489c4)) ## [2.11.12](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.11...@amplitude/analytics-browser@2.11.12) (2025-02-14) ### Bug Fixes * **analytics-browser:** form tracking accesses element attributes through getAttribute ([#959](https://github.com/amplitude/Amplitude-TypeScript/issues/959)) ([28305b1](https://github.com/amplitude/Amplitude-TypeScript/commit/28305b16a6361494ed4de5a4805dba520273e1c1)) ## [2.11.11](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.10...@amplitude/analytics-browser@2.11.11) (2024-12-31) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.11.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.9...@amplitude/analytics-browser@2.11.10) (2024-12-17) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.11.9](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.8...@amplitude/analytics-browser@2.11.9) (2024-11-05) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.11.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.7...@amplitude/analytics-browser@2.11.8) (2024-10-21) ### Bug Fixes * **analytics-browser:** should track file download when with url params ([#898](https://github.com/amplitude/Amplitude-TypeScript/issues/898)) ([03c9604](https://github.com/amplitude/Amplitude-TypeScript/commit/03c960456445eb1e76ae983e01ac2676c579f65a)) ## [2.11.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.6...@amplitude/analytics-browser@2.11.7) (2024-09-26) ### Bug Fixes * disable network checker if navigator is unavailable ([1e0456e](https://github.com/amplitude/Amplitude-TypeScript/commit/1e0456eb4eb780d8ad100487cc06a7a768c75bfe)) ## [2.11.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.5...@amplitude/analytics-browser@2.11.6) (2024-09-18) ### Bug Fixes * **analytics-browser:** bump autocapture plugin version ([#880](https://github.com/amplitude/Amplitude-TypeScript/issues/880)) ([30eb04a](https://github.com/amplitude/Amplitude-TypeScript/commit/30eb04aa670d4637496c10ede373314893a374c1)) ## [2.11.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.4...@amplitude/analytics-browser@2.11.5) (2024-09-17) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.11.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.3...@amplitude/analytics-browser@2.11.4) (2024-09-16) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.11.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.2...@amplitude/analytics-browser@2.11.3) (2024-09-10) **Note:** Version bump only for package @amplitude/analytics-browser ## [2.11.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.1...@amplitude/analytics-browser@2.11.2) (2024-09-05) ### Bug Fixes * **browser:** bump plugin-autocapture-browser package ([#864](https://github.com/amplitude/Amplitude-TypeScript/issues/864)) ([6e14acf](https://github.com/amplitude/Amplitude-TypeScript/commit/6e14acf4e15f09ada5f4a6641997619efd93bc77)) ## [2.11.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.11.0...@amplitude/analytics-browser@2.11.1) (2024-08-23) ### Bug Fixes * **browser:** remove fetchIDB from remote config ([91c89d1](https://github.com/amplitude/Amplitude-TypeScript/commit/91c89d16fbdaa8bc6091c7fd193d63314a0da101)) # [2.11.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.10.0...@amplitude/analytics-browser@2.11.0) (2024-08-13) ### Features * support remote config for each autocapture field ([#848](https://github.com/amplitude/Amplitude-TypeScript/issues/848)) ([939d49f](https://github.com/amplitude/Amplitude-TypeScript/commit/939d49f488bda8bbe4fa57cd2a2ab23f75540fc5)) # [2.10.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.9.3...@amplitude/analytics-browser@2.10.0) (2024-08-02) ### Features * remote config ([#832](https://github.com/amplitude/Amplitude-TypeScript/issues/832)) ([c415f79](https://github.com/amplitude/Amplitude-TypeScript/commit/c415f792a98253ac60885eb1dc7e53b78ca47dcb)), closes [#769](https://github.com/amplitude/Amplitude-TypeScript/issues/769) [#772](https://github.com/amplitude/Amplitude-TypeScript/issues/772) [#780](https://github.com/amplitude/Amplitude-TypeScript/issues/780) [#782](https://github.com/amplitude/Amplitude-TypeScript/issues/782) [#811](https://github.com/amplitude/Amplitude-TypeScript/issues/811) [#828](https://github.com/amplitude/Amplitude-TypeScript/issues/828) ## [2.9.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.9.2...@amplitude/analytics-browser@2.9.3) (2024-06-26) ### Bug Fixes * **analytics-browser:** fall back to MemoryStorage when localStorage is disabled ([#793](https://github.com/amplitude/Amplitude-TypeScript/issues/793)) ([bb7664e](https://github.com/amplitude/Amplitude-TypeScript/commit/bb7664ea082eba9fe9f584302bb9a0402365aa2a)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.9.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.9.1...@amplitude/analytics-browser@2.9.2) (2024-06-24) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.9.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.9.0...@amplitude/analytics-browser@2.9.1) (2024-06-24) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.9.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.8.1...@amplitude/analytics-browser@2.9.0) (2024-06-17) ### Bug Fixes - adding ability to enable debug logs using cookies ([bc36f08](https://github.com/amplitude/Amplitude-TypeScript/commit/bc36f0893b27d96a676120dadd50dd756921de46)) - don't use global window directly ([7a88927](https://github.com/amplitude/Amplitude-TypeScript/commit/7a88927efe30b15b91d33b2fd05ce76d985c7a9a)) - response with non-json format ([#758](https://github.com/amplitude/Amplitude-TypeScript/issues/758)) ([3d234ca](https://github.com/amplitude/Amplitude-TypeScript/commit/3d234ca5a71bacf9ab7f82a115cb2010e94a3a33)) ### Features - **analytics-browser:** consume remote config ([#769](https://github.com/amplitude/Amplitude-TypeScript/issues/769)) ([9c4e03c](https://github.com/amplitude/Amplitude-TypeScript/commit/9c4e03c3b3989213ac04410c8b9bf5e78ed393cf)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.8.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.8.0...@amplitude/analytics-browser@2.8.1) (2024-05-24) ### Bug Fixes - success response with no body ([#755](https://github.com/amplitude/Amplitude-TypeScript/issues/755)) ([5d1eb72](https://github.com/amplitude/Amplitude-TypeScript/commit/5d1eb72bf9114acd884e709660eeedb0511ef4af)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.8.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.7.4...@amplitude/analytics-browser@2.8.0) (2024-05-21) ### Features - support sessionId from url for cross domain tracking ([#753](https://github.com/amplitude/Amplitude-TypeScript/issues/753)) ([691d725](https://github.com/amplitude/Amplitude-TypeScript/commit/691d725131b5dfba497084fcf101a4e6e22bbd59)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.7.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.7.3...@amplitude/analytics-browser@2.7.4) (2024-05-17) ### Bug Fixes - fix the session event fire too often issue ([#751](https://github.com/amplitude/Amplitude-TypeScript/issues/751)) ([69bc69b](https://github.com/amplitude/Amplitude-TypeScript/commit/69bc69bd8e05b36ca76079dc9a01552315aaef5a)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.7.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.7.2...@amplitude/analytics-browser@2.7.3) (2024-05-15) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.7.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.7.1...@amplitude/analytics-browser@2.7.2) (2024-05-07) ### Bug Fixes - location is polyfilled to an empty object ([#738](https://github.com/amplitude/Amplitude-TypeScript/issues/738)) ([130add9](https://github.com/amplitude/Amplitude-TypeScript/commit/130add99485c0d33e6a8ce32168212a2453025e4)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.7.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.7.0...@amplitude/analytics-browser@2.7.1) (2024-05-03) ### Reverts - Revert "fix: have session and device IDs ready before plugin setup (#691)" ([7411a6d](https://github.com/amplitude/Amplitude-TypeScript/commit/7411a6ddf22119aa7c1b0928035a1b31624e47f3)), closes [#691](https://github.com/amplitude/Amplitude-TypeScript/issues/691) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.7.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.6.3-beta.0...@amplitude/analytics-browser@2.7.0) (2024-04-29) ### Bug Fixes - [AMP-95816] fix pageCounter bug ([#720](https://github.com/amplitude/Amplitude-TypeScript/issues/720)) ([8899853](https://github.com/amplitude/Amplitude-TypeScript/commit/88998534b3bd3c88e66fb88bafd41768e41d377c)) ### Features - update bookmarklet to use autocapture plugin ([#728](https://github.com/amplitude/Amplitude-TypeScript/issues/728)) ([6bbb69d](https://github.com/amplitude/Amplitude-TypeScript/commit/6bbb69d971dfabab533c60930551bb5e3578bed0)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.6.3-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.6.2...@amplitude/analytics-browser@2.6.3-beta.0) (2024-04-19) ### Bug Fixes - fetch the campaign in SPA at session start ([#723](https://github.com/amplitude/Amplitude-TypeScript/issues/723)) ([6961717](https://github.com/amplitude/Amplitude-TypeScript/commit/696171780d6e3e02d3531f230bdceb3c36d8af38)) - fix web attribution identify and session start order ([#696](https://github.com/amplitude/Amplitude-TypeScript/issues/696)) ([2f077da](https://github.com/amplitude/Amplitude-TypeScript/commit/2f077da7b528ed6f23f7459b7c961c099dbcb1bb)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.6.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.6.2-beta.0...@amplitude/analytics-browser@2.6.2) (2024-04-09) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.6.2-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.6.1...@amplitude/analytics-browser@2.6.2-beta.0) (2024-03-28) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.6.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.6.0...@amplitude/analytics-browser@2.6.1) (2024-03-27) ### Bug Fixes - adding more tests ([68ca5ab](https://github.com/amplitude/Amplitude-TypeScript/commit/68ca5ab74ddeda559a7a476f6780cbbb84a16c07)) - fix failing tests ([77e3a60](https://github.com/amplitude/Amplitude-TypeScript/commit/77e3a603ce69c5f9fe63742b07e9f734f0e62fa5)) - have session and device IDs ready before plugin setup ([#691](https://github.com/amplitude/Amplitude-TypeScript/issues/691)) ([83e3eca](https://github.com/amplitude/Amplitude-TypeScript/commit/83e3eca5a529838a19f6c2afb59e1d8a5f2ac650)) - register download and form listeners after window is loaded ([ccd3766](https://github.com/amplitude/Amplitude-TypeScript/commit/ccd3766d2b2433147a8051e7fdce17b477bd2a2d)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.6.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.5.3...@amplitude/analytics-browser@2.6.0) (2024-03-23) ### Features - update bookmarklet snippet ([#679](https://github.com/amplitude/Amplitude-TypeScript/issues/679)) ([790311c](https://github.com/amplitude/Amplitude-TypeScript/commit/790311c1286237c9e081789789b2693a5d67160e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.5.2...@amplitude/analytics-browser@2.5.3) (2024-03-12) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.5.1...@amplitude/analytics-browser@2.5.2) (2024-02-27) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.5.0...@amplitude/analytics-browser@2.5.1) (2024-02-23) ### Bug Fixes - fix typo for pageCounter ([#668](https://github.com/amplitude/Amplitude-TypeScript/issues/668)) ([ffc1f25](https://github.com/amplitude/Amplitude-TypeScript/commit/ffc1f25137db536885eff13d3920edd02cc4aa46)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.5.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.4.1...@amplitude/analytics-browser@2.5.0) (2024-02-23) ### Features - landing page improvement ([#667](https://github.com/amplitude/Amplitude-TypeScript/issues/667)) ([5f365f0](https://github.com/amplitude/Amplitude-TypeScript/commit/5f365f0b933ee890aee1d9ac083576f09b0defc3)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.4.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.4.0...@amplitude/analytics-browser@2.4.1) (2024-02-13) ### Bug Fixes - should not install page view tracking plugin based on config ([#662](https://github.com/amplitude/Amplitude-TypeScript/issues/662)) ([178a7f0](https://github.com/amplitude/Amplitude-TypeScript/commit/178a7f0c7943a1b0fed4855c13cea3ee2376f04d)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.4.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.8...@amplitude/analytics-browser@2.4.0) (2024-01-24) ### Features - add offline mode ([#644](https://github.com/amplitude/Amplitude-TypeScript/issues/644)) ([f2cd717](https://github.com/amplitude/Amplitude-TypeScript/commit/f2cd717316eef66b101153cb8eedf37fadc6de0c)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.7...@amplitude/analytics-browser@2.3.8) (2023-12-20) ### Reverts - update attribution plugin to apply utm params to the `session_start` event ([#638](https://github.com/amplitude/Amplitude-TypeScript/issues/638)) ([c820279](https://github.com/amplitude/Amplitude-TypeScript/commit/c820279cbef2123d890beb7861d7edbbc3926f6e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.6...@amplitude/analytics-browser@2.3.7) (2023-12-12) ### Bug Fixes - ignore non-string form.id ([#629](https://github.com/amplitude/Amplitude-TypeScript/issues/629)) ([690af77](https://github.com/amplitude/Amplitude-TypeScript/commit/690af774d9bc36c6c4a76311a9bbe189c1a698d1)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.6-beta.0...@amplitude/analytics-browser@2.3.6) (2023-12-01) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.6-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.5...@amplitude/analytics-browser@2.3.6-beta.0) (2023-11-22) ### Bug Fixes - update attribution plugin to apply utm params to the `session_start` event ([#619](https://github.com/amplitude/Amplitude-TypeScript/issues/619)) ([bf45ca6](https://github.com/amplitude/Amplitude-TypeScript/commit/bf45ca6c17ac8d656cb6c5bb4f4fa19ff344ac85)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.4...@amplitude/analytics-browser@2.3.5) (2023-11-16) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.3...@amplitude/analytics-browser@2.3.4) (2023-11-16) ### Bug Fixes - npm latest tag ([#623](https://github.com/amplitude/Amplitude-TypeScript/issues/623)) ([7b2b6d1](https://github.com/amplitude/Amplitude-TypeScript/commit/7b2b6d111592a277039101913072c19a724fa199)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.2...@amplitude/analytics-browser@2.3.3) (2023-10-18) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.1...@amplitude/analytics-browser@2.3.2) (2023-09-26) ### Bug Fixes - update README for lerna to pickup package changes ([#593](https://github.com/amplitude/Amplitude-TypeScript/issues/593)) ([a170820](https://github.com/amplitude/Amplitude-TypeScript/commit/a1708203483d2abf9c2feb78545ecc3c1afebfe5)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.3.0...@amplitude/analytics-browser@2.3.1) (2023-09-18) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.3.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.2.3...@amplitude/analytics-browser@2.3.0) (2023-09-15) ### Features - add bookmarklet ([#529](https://github.com/amplitude/Amplitude-TypeScript/issues/529)) ([4a93304](https://github.com/amplitude/Amplitude-TypeScript/commit/4a933046a9caa707b4a7767265f5e3dba9bb32f3)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.2.2...@amplitude/analytics-browser@2.2.3) (2023-08-31) ### Bug Fixes - ignore non-string form.name values for form interaction tracking ([#572](https://github.com/amplitude/Amplitude-TypeScript/issues/572)) ([80816c9](https://github.com/amplitude/Amplitude-TypeScript/commit/80816c92b64d3e839688c7654c08c1503501e2ed)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.2.1...@amplitude/analytics-browser@2.2.2) (2023-08-29) ### Bug Fixes - allow DET warning to be suppressed ([#569](https://github.com/amplitude/Amplitude-TypeScript/issues/569)) ([b9d232c](https://github.com/amplitude/Amplitude-TypeScript/commit/b9d232c4c5c37d0e53b9097ed4415c0e917c518e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.2.0...@amplitude/analytics-browser@2.2.1) (2023-08-24) ### Bug Fixes - **browser:** allow cookie options to be customized [#548](https://github.com/amplitude/Amplitude-TypeScript/issues/548) ([#552](https://github.com/amplitude/Amplitude-TypeScript/issues/552)) ([5c483f4](https://github.com/amplitude/Amplitude-TypeScript/commit/5c483f4aeefe19b4d6e09c03a39b54113205fa96)) - fix web attribution behavior for no referrer in the same session ([#554](https://github.com/amplitude/Amplitude-TypeScript/issues/554)) ([ed54eb2](https://github.com/amplitude/Amplitude-TypeScript/commit/ed54eb28810a3edb3326f82bdd7aed901ec9452f)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.1.3...@amplitude/analytics-browser@2.2.0) (2023-08-15) ### Features - limit LocalStorage ([#528](https://github.com/amplitude/Amplitude-TypeScript/issues/528)) ([232a607](https://github.com/amplitude/Amplitude-TypeScript/commit/232a607108baba4427723352212c650e09ee01a6)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.1.2...@amplitude/analytics-browser@2.1.3) (2023-07-27) ### Bug Fixes - get trackingOptions from config ([#505](https://github.com/amplitude/Amplitude-TypeScript/issues/505)) ([602d8ed](https://github.com/amplitude/Amplitude-TypeScript/commit/602d8edbe8c6f76d9f2b3480bf9081e5ea9fb9a5)) - should use trackingOptions ([#508](https://github.com/amplitude/Amplitude-TypeScript/issues/508)) ([596e3b6](https://github.com/amplitude/Amplitude-TypeScript/commit/596e3b6328af4673d45c895b14f6472a3e4e42ed)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.1.1...@amplitude/analytics-browser@2.1.2) (2023-07-03) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.1.0...@amplitude/analytics-browser@2.1.1) (2023-06-30) ### Bug Fixes - allow plugins to teardown to remove listeners ([#460](https://github.com/amplitude/Amplitude-TypeScript/issues/460)) ([c337363](https://github.com/amplitude/Amplitude-TypeScript/commit/c337363c25b0a1285e8df455511516fc0a9bec7e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.1.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.1...@amplitude/analytics-browser@2.1.0) (2023-06-22) ### Features - **storage:** add support for sessionStorage as identityStorage ([#435](https://github.com/amplitude/Amplitude-TypeScript/issues/435)) ([8596f6a](https://github.com/amplitude/Amplitude-TypeScript/commit/8596f6a340a32b08a3f55a337723c39c6c57cbf1)), closes [#434](https://github.com/amplitude/Amplitude-TypeScript/issues/434) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0...@amplitude/analytics-browser@2.0.1) (2023-06-21) ### Bug Fixes - adds logs when default tracking is enabled ([#436](https://github.com/amplitude/Amplitude-TypeScript/issues/436)) ([ff32f91](https://github.com/amplitude/Amplitude-TypeScript/commit/ff32f9112bab9380c24abdf897e04aa3e540f341)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.10...@amplitude/analytics-browser@2.0.0) (2023-06-14) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.9...@amplitude/analytics-browser@2.0.0-beta.10) (2023-06-14) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.9](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.8...@amplitude/analytics-browser@2.0.0-beta.9) (2023-06-14) ### Bug Fixes - extend session on new events ([#432](https://github.com/amplitude/Amplitude-TypeScript/issues/432)) ([8bb049d](https://github.com/amplitude/Amplitude-TypeScript/commit/8bb049df4c6b99ff44303cf2aaeb7357ae90b362)) ### Features - added extendSession() method to Browser Client ([#425](https://github.com/amplitude/Amplitude-TypeScript/issues/425)) ([#433](https://github.com/amplitude/Amplitude-TypeScript/issues/433)) ([0f5fccc](https://github.com/amplitude/Amplitude-TypeScript/commit/0f5fccc83d3f7f0a80adc4a0807fbd7e71c72e4a)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.7...@amplitude/analytics-browser@2.0.0-beta.8) (2023-06-13) ### Features - add option for instance name ([#428](https://github.com/amplitude/Amplitude-TypeScript/issues/428)) ([1a8ff7d](https://github.com/amplitude/Amplitude-TypeScript/commit/1a8ff7d665d2a936db7cb42f4cde5350379b7cae)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.6...@amplitude/analytics-browser@2.0.0-beta.7) (2023-06-13) ### Bug Fixes - don't automatically start new session on setUserId ([#427](https://github.com/amplitude/Amplitude-TypeScript/issues/427)) ([d40b5c3](https://github.com/amplitude/Amplitude-TypeScript/commit/d40b5c305e1d67d988e70608ba01789b8f0abb2b)) - sest sion end events being assigned to a different session id ([#426](https://github.com/amplitude/Amplitude-TypeScript/issues/426)) ([7d52037](https://github.com/amplitude/Amplitude-TypeScript/commit/7d52037280159ddb176e5e1ef64577bd97edfc36)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.5...@amplitude/analytics-browser@2.0.0-beta.6) (2023-06-09) ### Bug Fixes - set cookie expiration from options ([#423](https://github.com/amplitude/Amplitude-TypeScript/issues/423)) ([69e8e70](https://github.com/amplitude/Amplitude-TypeScript/commit/69e8e700b929b02eb1792f1a4f6b8e6eb306cd7f)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.4...@amplitude/analytics-browser@2.0.0-beta.5) (2023-06-08) ### Features - simplify init interface ([#416](https://github.com/amplitude/Amplitude-TypeScript/issues/416)) ([93752da](https://github.com/amplitude/Amplitude-TypeScript/commit/93752da1e6ed521263c6d5295a37fc5dc7f3de86)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.3...@amplitude/analytics-browser@2.0.0-beta.4) (2023-06-07) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.2...@amplitude/analytics-browser@2.0.0-beta.3) (2023-06-07) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@2.0.0-beta.1...@amplitude/analytics-browser@2.0.0-beta.2) (2023-06-06) ### Bug Fixes - simplify plugins and eliminate enums ([#407](https://github.com/amplitude/Amplitude-TypeScript/issues/407)) ([890ec66](https://github.com/amplitude/Amplitude-TypeScript/commit/890ec6695a8b25cd6988e9f7ae584d4ba2835f67)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.10.5...@amplitude/analytics-browser@2.0.0-beta.1) (2023-06-06) ### Features - allow cross subdomain excluded referrer ([#391](https://github.com/amplitude/Amplitude-TypeScript/issues/391)) ([f34f64b](https://github.com/amplitude/Amplitude-TypeScript/commit/f34f64b68bbd328da354afae61ca416d7055a734)) - make default event tracking enabled by default ([#386](https://github.com/amplitude/Amplitude-TypeScript/issues/386)) ([242f42d](https://github.com/amplitude/Amplitude-TypeScript/commit/242f42dd2e46eaec95c827795e04f74fba39c35f)) - simplify browser SDK options and plugin options interface ([#384](https://github.com/amplitude/Amplitude-TypeScript/issues/384)) ([b464cfb](https://github.com/amplitude/Amplitude-TypeScript/commit/b464cfb8e09d722bf06ed3c11955f77465a23daf)) - simplify user identity storage options/configuration ([#390](https://github.com/amplitude/Amplitude-TypeScript/issues/390)) ([f8cf0cc](https://github.com/amplitude/Amplitude-TypeScript/commit/f8cf0cca8c2a17738f13878642fa5b37c0070f77)) - use server side user agent parser ([#382](https://github.com/amplitude/Amplitude-TypeScript/issues/382)) ([69bd255](https://github.com/amplitude/Amplitude-TypeScript/commit/69bd2558cb37d027064b6459cc2887c219196973)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.10.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.10.4...@amplitude/analytics-browser@1.10.5) (2023-06-05) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.10.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.10.3...@amplitude/analytics-browser@1.10.4) (2023-06-02) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.10.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.10.2...@amplitude/analytics-browser@1.10.3) (2023-05-04) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.10.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.10.1...@amplitude/analytics-browser@1.10.2) (2023-04-27) ### Bug Fixes - add connector event listener after plugins and queued functions ([#378](https://github.com/amplitude/Amplitude-TypeScript/issues/378)) ([a2fc8b6](https://github.com/amplitude/Amplitude-TypeScript/commit/a2fc8b6a7ec87dd8eab6538c1e9929c57804b899)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.10.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.10.0...@amplitude/analytics-browser@1.10.1) (2023-04-27) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.10.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.4...@amplitude/analytics-browser@1.10.0) (2023-04-25) ### Features - persist last event id - to be used on next initialization ([#374](https://github.com/amplitude/Amplitude-TypeScript/issues/374)) ([4fd7691](https://github.com/amplitude/Amplitude-TypeScript/commit/4fd76911142969bbc76d6d6e2cb986331201af37)) - send user_agent with events ([#375](https://github.com/amplitude/Amplitude-TypeScript/issues/375)) ([26086b5](https://github.com/amplitude/Amplitude-TypeScript/commit/26086b543d7f0ee2d35e09b43199b5c26ed24e36)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.9.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.3...@amplitude/analytics-browser@1.9.4) (2023-04-06) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.9.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.2...@amplitude/analytics-browser@1.9.3) (2023-03-31) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.9.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.2-beta.0...@amplitude/analytics-browser@1.9.2) (2023-03-31) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.9.2-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.1...@amplitude/analytics-browser@1.9.2-beta.0) (2023-03-31) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.9.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.1-beta.1...@amplitude/analytics-browser@1.9.1) (2023-03-03) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.9.1-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.1-beta.0...@amplitude/analytics-browser@1.9.1-beta.1) (2023-03-03) ### Bug Fixes - event types and properties for default events ([#341](https://github.com/amplitude/Amplitude-TypeScript/issues/341)) ([707522d](https://github.com/amplitude/Amplitude-TypeScript/commit/707522d440d5aa3be48809afcb44a4147f103903)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.9.1-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.0...@amplitude/analytics-browser@1.9.1-beta.0) (2023-03-03) ### Bug Fixes - push user id and device id changes to analytics connector ([#342](https://github.com/amplitude/Amplitude-TypeScript/issues/342)) ([3214b08](https://github.com/amplitude/Amplitude-TypeScript/commit/3214b0836eb03e39b5753b1e6be30e1c2f5770ca)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.9.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.0-beta.4...@amplitude/analytics-browser@1.9.0) (2023-02-27) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.9.0-beta.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.0-beta.3...@amplitude/analytics-browser@1.9.0-beta.4) (2023-02-27) ### Bug Fixes - attach listener to nested nodes ([#339](https://github.com/amplitude/Amplitude-TypeScript/issues/339)) ([f6d19c4](https://github.com/amplitude/Amplitude-TypeScript/commit/f6d19c4ef72d44fac6072e677d4de87fd198e5dd)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.9.0-beta.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.0-beta.2...@amplitude/analytics-browser@1.9.0-beta.3) (2023-02-26) ### Bug Fixes - improve error handling for file download tracking ([#338](https://github.com/amplitude/Amplitude-TypeScript/issues/338)) ([46cf131](https://github.com/amplitude/Amplitude-TypeScript/commit/46cf131945539ec634a74b257088bf7fe67e2181)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.9.0-beta.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.0-beta.1...@amplitude/analytics-browser@1.9.0-beta.2) (2023-02-25) ### Bug Fixes - inconsistent user and device id on session events ([#337](https://github.com/amplitude/Amplitude-TypeScript/issues/337)) ([0dfbc6c](https://github.com/amplitude/Amplitude-TypeScript/commit/0dfbc6c78335a7578fc0207d91c1ef9845950f16)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.9.0-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.9.0-beta.0...@amplitude/analytics-browser@1.9.0-beta.1) (2023-02-24) ### Bug Fixes - improper cookie usage ([#330](https://github.com/amplitude/Amplitude-TypeScript/issues/330)) ([e670091](https://github.com/amplitude/Amplitude-TypeScript/commit/e670091e59014bb35bd9b3ec2a7192f259393575)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.9.0-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.8.0...@amplitude/analytics-browser@1.9.0-beta.0) (2023-02-24) ### Bug Fixes - consolidate web attribution and page view tracking plugins for marketing analytics use case ([c268997](https://github.com/amplitude/Amplitude-TypeScript/commit/c26899787611daeda7fca288e260bbc42a831130)) - update event types of default events ([5bd7887](https://github.com/amplitude/Amplitude-TypeScript/commit/5bd7887abce9cc893a624747108d5df35aa23da4)) ### Features - add form interaction and file download plugins ([22b10f1](https://github.com/amplitude/Amplitude-TypeScript/commit/22b10f1dada8ab264f9bd74a4065c06e9aec4334)) - add session start/end event tracker ([#332](https://github.com/amplitude/Amplitude-TypeScript/issues/332)) ([e26cf15](https://github.com/amplitude/Amplitude-TypeScript/commit/e26cf15503c59d3b25bd54391bb330a8c634eca3)) - allow custom page view event type ([#335](https://github.com/amplitude/Amplitude-TypeScript/issues/335)) ([0a4f8ed](https://github.com/amplitude/Amplitude-TypeScript/commit/0a4f8ede6e30ec3450ac0a468cf22b9266b0b23c)) - pass amplitude instance to plugin.setup for enhanced plugin capabilities ([#328](https://github.com/amplitude/Amplitude-TypeScript/issues/328)) ([91eeaa0](https://github.com/amplitude/Amplitude-TypeScript/commit/91eeaa0d6bff6bde39538bb54548a938df784462)) - retrofit web attribution and page view plugins to browser SDK ([#331](https://github.com/amplitude/Amplitude-TypeScript/issues/331)) ([ba845d3](https://github.com/amplitude/Amplitude-TypeScript/commit/ba845d3329bd6bebe3b89f24f4f316088c2d62b9)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.8.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.7.1...@amplitude/analytics-browser@1.8.0) (2023-02-09) ### Features - add file download tracker plugin ([#322](https://github.com/amplitude/Amplitude-TypeScript/issues/322)) ([1604409](https://github.com/amplitude/Amplitude-TypeScript/commit/16044091135b0983f2edb3931ddf5d2c213be3fc)) - add form interaction event tracker plugin ([#323](https://github.com/amplitude/Amplitude-TypeScript/issues/323)) ([f6ee918](https://github.com/amplitude/Amplitude-TypeScript/commit/f6ee918a22138f6be260580a5b48ecff60ff950f)) - add named instances for google tag manager use case ([#326](https://github.com/amplitude/Amplitude-TypeScript/issues/326)) ([327ef9a](https://github.com/amplitude/Amplitude-TypeScript/commit/327ef9a3d097f892e41814cb02b90453e2d39ed5)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.7.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.7.0...@amplitude/analytics-browser@1.7.1) (2023-02-02) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.7.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.7.0-beta.0...@amplitude/analytics-browser@1.7.0) (2023-01-31) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [1.7.0-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.6.8...@amplitude/analytics-browser@1.7.0-beta.0) (2023-01-26) ### Features - allow opt out of deleting legacy sdk cookies ([c6a82fb](https://github.com/amplitude/Amplitude-TypeScript/commit/c6a82fb52e1301e427116891d1f31208bcfc6548)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.6.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.6.7...@amplitude/analytics-browser@1.6.8) (2023-01-11) **Note:** Version bump only for package @amplitude/analytics-browser # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.6.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.6.6...@amplitude/analytics-browser@1.6.7) (2022-12-21) ### Bug Fixes - upgrade dependencies to resolve dependabot vulnerability alerts ([#299](https://github.com/amplitude/Amplitude-TypeScript/issues/299)) ([7dd1cd1](https://github.com/amplitude/Amplitude-TypeScript/commit/7dd1cd1b23a71981a4ad90b4b30cc9b7d28c4412)) ### Reverts - Revert "Updated dependencies" ([7ca9964](https://github.com/amplitude/Amplitude-TypeScript/commit/7ca9964781e4b900c6c027bdddf2ae1e7428ba18)) ## [1.6.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.6.5...@amplitude/analytics-browser@1.6.6) (2022-12-06) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.6.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.6.4...@amplitude/analytics-browser@1.6.5) (2022-12-05) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.6.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.6.3...@amplitude/analytics-browser@1.6.4) (2022-11-28) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.6.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.6.2...@amplitude/analytics-browser@1.6.3) (2022-11-22) ### Bug Fixes - removed es6 syntax to support GTM usage ([#282](https://github.com/amplitude/Amplitude-TypeScript/issues/282)) ([29f885a](https://github.com/amplitude/Amplitude-TypeScript/commit/29f885ae2258949124c1a450354525c2cc5316cf)) ## [1.6.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.6.1...@amplitude/analytics-browser@1.6.2) (2022-11-15) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.6.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.6.0...@amplitude/analytics-browser@1.6.1) (2022-11-01) **Note:** Version bump only for package @amplitude/analytics-browser # [1.6.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.8...@amplitude/analytics-browser@1.6.0) (2022-11-01) ### Features - enhance logger with debug information ([#254](https://github.com/amplitude/Amplitude-TypeScript/issues/254)) ([5c6175e](https://github.com/amplitude/Amplitude-TypeScript/commit/5c6175e9372cbeea264ddb34c6cc68148063d4f7)) ## [1.5.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.7...@amplitude/analytics-browser@1.5.8) (2022-10-26) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.5.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.7-beta.1...@amplitude/analytics-browser@1.5.7) (2022-10-25) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.5.7-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.7-beta.0...@amplitude/analytics-browser@1.5.7-beta.1) (2022-10-25) ### Reverts - add logging around cookie storage ([#256](https://github.com/amplitude/Amplitude-TypeScript/issues/256)) ([12016e7](https://github.com/amplitude/Amplitude-TypeScript/commit/12016e7eddb7bec885883c0ebf1619fc447beb87)) ## [1.5.7-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.6...@amplitude/analytics-browser@1.5.7-beta.0) (2022-10-25) ### Bug Fixes - add logging around cookie storage ([#255](https://github.com/amplitude/Amplitude-TypeScript/issues/255)) ([dee9d32](https://github.com/amplitude/Amplitude-TypeScript/commit/dee9d3299b90b71576a8c435c26a03c1dcabdae4)) ## [1.5.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.5...@amplitude/analytics-browser@1.5.6) (2022-10-25) ### Bug Fixes - add safe check for global scope before loading SDK ([#252](https://github.com/amplitude/Amplitude-TypeScript/issues/252)) ([a3f4f6f](https://github.com/amplitude/Amplitude-TypeScript/commit/a3f4f6f7b11abd9cdbdf064e31e32d5fc3e92031)) - invoke pre-init track fns after attribution ([#253](https://github.com/amplitude/Amplitude-TypeScript/issues/253)) ([b8996d7](https://github.com/amplitude/Amplitude-TypeScript/commit/b8996d793f74d388c1a96e0cde5c0ac060c1e565)) ## [1.5.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.4...@amplitude/analytics-browser@1.5.5) (2022-10-14) ### Bug Fixes - globalThis polyfill ([#250](https://github.com/amplitude/Amplitude-TypeScript/issues/250)) ([c52f263](https://github.com/amplitude/Amplitude-TypeScript/commit/c52f2631f7a1884a7bac89538407681f6224a27e)) - run queued functions after attribution in browser-client.ts ([#249](https://github.com/amplitude/Amplitude-TypeScript/issues/249)) ([751b7ca](https://github.com/amplitude/Amplitude-TypeScript/commit/751b7ca6b0f05131dc932b89dd89e8979e334b4b)) - update userId/deviceId in identify call if eventOptions contains userId/deviceId ([#244](https://github.com/amplitude/Amplitude-TypeScript/issues/244)) ([578cbe2](https://github.com/amplitude/Amplitude-TypeScript/commit/578cbe218de84d7fdd4930f75820beda6f85ce6d)) ## [1.5.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.3...@amplitude/analytics-browser@1.5.4) (2022-10-04) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.5.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.2...@amplitude/analytics-browser@1.5.3) (2022-09-30) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.5.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.1...@amplitude/analytics-browser@1.5.2) (2022-09-30) ### Bug Fixes - cover the case when apiKey is missing in the runtime ([#240](https://github.com/amplitude/Amplitude-TypeScript/issues/240)) ([308bbe8](https://github.com/amplitude/Amplitude-TypeScript/commit/308bbe8337cbab366a0ca255f2d665101f4781a0)) ## [1.5.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.1-beta.1...@amplitude/analytics-browser@1.5.1) (2022-09-28) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.5.1-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.1-beta.0...@amplitude/analytics-browser@1.5.1-beta.1) (2022-09-27) ### Bug Fixes - define correct dependencies for @amplitude/analytics-connector ([#234](https://github.com/amplitude/Amplitude-TypeScript/issues/234)) ([41c1351](https://github.com/amplitude/Amplitude-TypeScript/commit/41c1351e441b890b016ba123c4ed5747a4c33adb)) ## [1.5.1-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.5.0...@amplitude/analytics-browser@1.5.1-beta.0) (2022-09-26) **Note:** Version bump only for package @amplitude/analytics-browser # [1.5.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.4.1...@amplitude/analytics-browser@1.5.0) (2022-09-26) ### Features - add analytics-marketing-analytics-browser package ([#215](https://github.com/amplitude/Amplitude-TypeScript/issues/215)) ([8ce4f52](https://github.com/amplitude/Amplitude-TypeScript/commit/8ce4f5288868c7f63fd08be82510b4ed9029381a)) ## [1.4.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.4.0...@amplitude/analytics-browser@1.4.1) (2022-09-22) **Note:** Version bump only for package @amplitude/analytics-browser # [1.4.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.3.0...@amplitude/analytics-browser@1.4.0) (2022-09-16) ### Features - new marketing analytics plugin ([#213](https://github.com/amplitude/Amplitude-TypeScript/issues/213)) ([02ff174](https://github.com/amplitude/Amplitude-TypeScript/commit/02ff174e3361173dbf15ed3acf72e950810e174f)) # [1.3.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.2.3...@amplitude/analytics-browser@1.3.0) (2022-09-08) ### Features - add ingestion_metadata field ([#212](https://github.com/amplitude/Amplitude-TypeScript/issues/212)) ([ebe8448](https://github.com/amplitude/Amplitude-TypeScript/commit/ebe8448b23609134f846e18da2e769158ca30bf1)) ## [1.2.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.2.2...@amplitude/analytics-browser@1.2.3) (2022-08-31) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.2.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.2.1...@amplitude/analytics-browser@1.2.2) (2022-08-29) ### Bug Fixes - add conditional check for window.location.search ([#198](https://github.com/amplitude/Amplitude-TypeScript/issues/198)) ([e61b4db](https://github.com/amplitude/Amplitude-TypeScript/commit/e61b4db25e2e7677a3dcb2c8e71f26bcac9a9fd5)) ## [1.2.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.2.0...@amplitude/analytics-browser@1.2.1) (2022-08-23) ### Bug Fixes - pass options to testStorage ([#201](https://github.com/amplitude/Amplitude-TypeScript/issues/201)) ([6e22eb0](https://github.com/amplitude/Amplitude-TypeScript/commit/6e22eb0c101c743b15bb49d9491082fd1fe1d90e)) # [1.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.1.5...@amplitude/analytics-browser@1.2.0) (2022-08-18) ### Bug Fixes - handle parsing malformed urls for web attribution ([#192](https://github.com/amplitude/Amplitude-TypeScript/issues/192)) ([cd254d6](https://github.com/amplitude/Amplitude-TypeScript/commit/cd254d6319d8bc7d92affc263ec12c9c39f82fb2)) - prevent concurrent init calls ([#191](https://github.com/amplitude/Amplitude-TypeScript/issues/191)) ([efda076](https://github.com/amplitude/Amplitude-TypeScript/commit/efda0760f4f1e92e47a3150985e18efcc3b108d9)) - removes unused tracking options ([#193](https://github.com/amplitude/Amplitude-TypeScript/issues/193)) ([2b57a8e](https://github.com/amplitude/Amplitude-TypeScript/commit/2b57a8e07971312b40c8287e2daddcfb2b55a832)) ### Features - adds create instance api ([#188](https://github.com/amplitude/Amplitude-TypeScript/issues/188)) ([050c1d9](https://github.com/amplitude/Amplitude-TypeScript/commit/050c1d96cedbc9e68aedf6fd55e85d2d3dc2fee4)) ## [1.1.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.1.4...@amplitude/analytics-browser@1.1.5) (2022-08-16) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.1.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.1.3...@amplitude/analytics-browser@1.1.4) (2022-08-13) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.1.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.1.2...@amplitude/analytics-browser@1.1.3) (2022-08-12) ### Bug Fixes - add callable queue when init is pending ([#181](https://github.com/amplitude/Amplitude-TypeScript/issues/181)) ([d8fc361](https://github.com/amplitude/Amplitude-TypeScript/commit/d8fc36195b96e2c10ccc5106027beaa7e970e0c0)) ## [1.1.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.1.1...@amplitude/analytics-browser@1.1.2) (2022-08-02) ### Bug Fixes - implement integration with experiment sdk for browser ([#156](https://github.com/amplitude/Amplitude-TypeScript/issues/156)) ([075ba84](https://github.com/amplitude/Amplitude-TypeScript/commit/075ba84bb4d05fb6a256272d19c03cb692cb0c28)) ## [1.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.1.0...@amplitude/analytics-browser@1.1.1) (2022-07-30) ### Bug Fixes - fixes auto gen of snippet instructions ([#160](https://github.com/amplitude/Amplitude-TypeScript/issues/160)) ([bbdf284](https://github.com/amplitude/Amplitude-TypeScript/commit/bbdf2840665f58507391ccdd9ca1398676bab194)) # [1.1.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.0.3...@amplitude/analytics-browser@1.1.0) (2022-07-29) ### Features - add reset method for resetting userId and deviceId ([#157](https://github.com/amplitude/Amplitude-TypeScript/issues/157)) ([8bfc864](https://github.com/amplitude/Amplitude-TypeScript/commit/8bfc864b15dd7e427556a50bc3de6b43b2485189)) ## [1.0.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.0.2...@amplitude/analytics-browser@1.0.3) (2022-07-22) ### Bug Fixes - missing tracked events before init issue ([#144](https://github.com/amplitude/Amplitude-TypeScript/issues/144)) ([60d0f68](https://github.com/amplitude/Amplitude-TypeScript/commit/60d0f6848087f7b8fc3c870d55489a238e841b26)) - removes saveEvents config ([#147](https://github.com/amplitude/Amplitude-TypeScript/issues/147)) ([6fde736](https://github.com/amplitude/Amplitude-TypeScript/commit/6fde736ca8a865462522082a8085673756dbcc7d)) - update default flush config for node ([#152](https://github.com/amplitude/Amplitude-TypeScript/issues/152)) ([2445dff](https://github.com/amplitude/Amplitude-TypeScript/commit/2445dff0842e7e0a2b7ee767ab926b5a93348214)) ## [1.0.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.0.1...@amplitude/analytics-browser@1.0.2) (2022-07-15) **Note:** Version bump only for package @amplitude/analytics-browser ## [1.0.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@1.0.0...@amplitude/analytics-browser@1.0.1) (2022-07-13) ### Bug Fixes - added flush to snippet template ([#131](https://github.com/amplitude/Amplitude-TypeScript/issues/131)) ([97cf2b9](https://github.com/amplitude/Amplitude-TypeScript/commit/97cf2b90e852f4e2e72df8e2ba6b05f5583ac35a)) # [1.0.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.7.1...@amplitude/analytics-browser@1.0.0) (2022-06-29) **Note:** Version bump only for package @amplitude/analytics-browser ## [0.7.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.7.0...@amplitude/analytics-browser@0.7.1) (2022-06-29) ### Bug Fixes - encode cookies and set top level domain ([#130](https://github.com/amplitude/Amplitude-TypeScript/issues/130)) ([0276dc4](https://github.com/amplitude/Amplitude-TypeScript/commit/0276dc4b3a24f96612cac94d742e7382ceed32bf)) - remove Awaited type to support older versions of typescript ([#121](https://github.com/amplitude/Amplitude-TypeScript/issues/121)) ([23d36f8](https://github.com/amplitude/Amplitude-TypeScript/commit/23d36f8aade258b995132dafd725ada00e400916)) # [0.7.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.6.1...@amplitude/analytics-browser@0.7.0) (2022-06-29) ### Features - add flush() api to send all events immediately ([#125](https://github.com/amplitude/Amplitude-TypeScript/issues/125)) ([b5dbcbb](https://github.com/amplitude/Amplitude-TypeScript/commit/b5dbcbb803c76ee5ade7ea85f76fbea50d8bab49)) - make storage interface async to enable react-native ([#122](https://github.com/amplitude/Amplitude-TypeScript/issues/122)) ([42bb39c](https://github.com/amplitude/Amplitude-TypeScript/commit/42bb39c967db015d5899487618d066f3540c9f18)) ## [0.6.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.6.0...@amplitude/analytics-browser@0.6.1) (2022-06-24) ### Bug Fixes - opt in auto page tracking ([#123](https://github.com/amplitude/Amplitude-TypeScript/issues/123)) ([6db195b](https://github.com/amplitude/Amplitude-TypeScript/commit/6db195b7e46b1db48ff6c237a57a4503ae4c056e)) # [0.6.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.5.1...@amplitude/analytics-browser@0.6.0) (2022-06-24) ### Features - add marketing campaign tracking ([#112](https://github.com/amplitude/Amplitude-TypeScript/issues/112)) ([bca73ed](https://github.com/amplitude/Amplitude-TypeScript/commit/bca73ede308ecb1663986a99600657732969d60c)) ## [0.5.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.5.0...@amplitude/analytics-browser@0.5.1) (2022-06-21) ### Bug Fixes - remove userId and deviceId from createIdentifyEvent and createGroupIdentifyEvent ([#119](https://github.com/amplitude/Amplitude-TypeScript/issues/119)) ([e7726bb](https://github.com/amplitude/Amplitude-TypeScript/commit/e7726bb9ba16c390638b51042169ede9e083e331)) # [0.5.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.4.1...@amplitude/analytics-browser@0.5.0) (2022-06-17) ### Bug Fixes - allow setting undefined user id via setUserId() ([#116](https://github.com/amplitude/Amplitude-TypeScript/issues/116)) ([46f63b5](https://github.com/amplitude/Amplitude-TypeScript/commit/46f63b549fda76fb84cddb8fb26c5671bba7df82)) - upgrade to @amplitude/ua-parser-js@0.7.31 ([#108](https://github.com/amplitude/Amplitude-TypeScript/issues/108)) ([91ab888](https://github.com/amplitude/Amplitude-TypeScript/commit/91ab888dcf55eb8b8e4cc65ff28493ad84fad350)) ### Features - add Plan option to config ([#117](https://github.com/amplitude/Amplitude-TypeScript/issues/117)) ([194d7e6](https://github.com/amplitude/Amplitude-TypeScript/commit/194d7e66af0209cb8155cf6aa0b05a5dcb170f9d)) - add regenerateDeviceId method ([#111](https://github.com/amplitude/Amplitude-TypeScript/issues/111)) ([8980233](https://github.com/amplitude/Amplitude-TypeScript/commit/89802339bedaf682845271c1c1edca68e37eb5ec)) - introduce NodeJS package ([#92](https://github.com/amplitude/Amplitude-TypeScript/issues/92)) ([476fb44](https://github.com/amplitude/Amplitude-TypeScript/commit/476fb44efcf2dfcd84af6f0ef45e141ad87dac43)) ## [0.4.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.4.0...@amplitude/analytics-browser@0.4.1) (2022-05-17) **Note:** Version bump only for package @amplitude/analytics-browser # [0.4.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.3.1...@amplitude/analytics-browser@0.4.0) (2022-05-12) ### Bug Fixes - cookie expires prematurely due to incorrectly used option ([#91](https://github.com/amplitude/Amplitude-TypeScript/issues/91)) ([d6cbf49](https://github.com/amplitude/Amplitude-TypeScript/commit/d6cbf49ac044f32c8bd784079179bd76fa36b403)) ### Features - parse old cookies and convert to new format ([#85](https://github.com/amplitude/Amplitude-TypeScript/issues/85)) ([bda78be](https://github.com/amplitude/Amplitude-TypeScript/commit/bda78be5d2de335e7b1ff6da413b20d3dc751aca)) ## [0.3.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.3.0...@amplitude/analytics-browser@0.3.1) (2022-04-09) **Note:** Version bump only for package @amplitude/analytics-browser # [0.3.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.2.4...@amplitude/analytics-browser@0.3.0) (2022-04-09) ### Bug Fixes - fix error handling in fetch client ([#79](https://github.com/amplitude/Amplitude-TypeScript/issues/79)) ([749925f](https://github.com/amplitude/Amplitude-TypeScript/commit/749925f907ba72f0e67f3828da99151d00278e6b)) ### Features - minify snippet file and add script to update readme for minified snippet ([#77](https://github.com/amplitude/Amplitude-TypeScript/issues/77)) ([9917e44](https://github.com/amplitude/Amplitude-TypeScript/commit/9917e44738a62251abea328c83d98922450387ca)) ## [0.2.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.2.3...@amplitude/analytics-browser@0.2.4) (2022-04-06) **Note:** Version bump only for package @amplitude/analytics-browser ## [0.2.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.2.2...@amplitude/analytics-browser@0.2.3) (2022-04-02) ### Bug Fixes - move types to analytics-types ([#70](https://github.com/amplitude/Amplitude-TypeScript/issues/70)) ([0cb4155](https://github.com/amplitude/Amplitude-TypeScript/commit/0cb41556f2f6be41a7b4838d33ce517289d4d880)) ## [0.2.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.2.1...@amplitude/analytics-browser@0.2.2) (2022-04-01) **Note:** Version bump only for package @amplitude/analytics-browser ## [0.2.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.2.0...@amplitude/analytics-browser@0.2.1) (2022-04-01) **Note:** Version bump only for package @amplitude/analytics-browser # [0.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.1.1...@amplitude/analytics-browser@0.2.0) (2022-04-01) ### Bug Fixes - context plugin library version ([8d29c6f](https://github.com/amplitude/Amplitude-TypeScript/commit/8d29c6f4a612510188d920ac243c0bdb116fe02c)) ### Features - add snippet promise support ([#64](https://github.com/amplitude/Amplitude-TypeScript/issues/64)) ([4d23c98](https://github.com/amplitude/Amplitude-TypeScript/commit/4d23c98c25c7caa4cd5e63b2a37398f711991288)) ## [0.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser@0.1.0...@amplitude/analytics-browser@0.1.1) (2022-03-31) ### Bug Fixes - add missing dependency ([6283f64](https://github.com/amplitude/Amplitude-TypeScript/commit/6283f64dc40b070d68a0243a93ab58d95d436664)) - move src/version update to npm prepare ([2101ab9](https://github.com/amplitude/Amplitude-TypeScript/commit/2101ab92ee874dd1536071c65318dd9c6fac123f)) # 0.1.0 (2022-03-31) ### Bug Fixes - address issues with usage in service worker and server-side rendering ([#46](https://github.com/amplitude/Amplitude-TypeScript/issues/46)) ([28131b8](https://github.com/amplitude/Amplitude-TypeScript/commit/28131b85a0d86bfb8276993d8152f815d2a3d74d)) - couple plugins with config instance ([#43](https://github.com/amplitude/Amplitude-TypeScript/issues/43)) ([abf687a](https://github.com/amplitude/Amplitude-TypeScript/commit/abf687a5d7a395638d8154f65ececc9b5464c366)) - deserialize json stored in cookies and local storage ([#11](https://github.com/amplitude/Amplitude-TypeScript/issues/11)) ([e4346f7](https://github.com/amplitude/Amplitude-TypeScript/commit/e4346f73e020f59ea8fce1af968b7aedd4a73ba0)) - snippet install script and public interface ([#57](https://github.com/amplitude/Amplitude-TypeScript/issues/57)) ([93f5b89](https://github.com/amplitude/Amplitude-TypeScript/commit/93f5b89c40d49e81f61daf66cea5627b768f58b5)) - update cookies last event time ([#54](https://github.com/amplitude/Amplitude-TypeScript/issues/54)) ([73a26ca](https://github.com/amplitude/Amplitude-TypeScript/commit/73a26ca87c0b8ae3be0b58d1789bf874cb0cf814)) - update event results callback parameter ([#29](https://github.com/amplitude/Amplitude-TypeScript/issues/29)) ([1acd3c0](https://github.com/amplitude/Amplitude-TypeScript/commit/1acd3c02310e5e9a2b7ab19140f7d6249e9a8452)) - update logger config to logger provider ([#19](https://github.com/amplitude/Amplitude-TypeScript/issues/19)) ([ef89d9f](https://github.com/amplitude/Amplitude-TypeScript/commit/ef89d9f5ffdc9dd88c3652ac36705c79741f53d1)) - update tracking options for browser client ([#23](https://github.com/amplitude/Amplitude-TypeScript/issues/23)) ([acb9960](https://github.com/amplitude/Amplitude-TypeScript/commit/acb99608012d6c885d94971fdd855526356edc6c)) - updates library event field in context plugin ([#28](https://github.com/amplitude/Amplitude-TypeScript/issues/28)) ([4821675](https://github.com/amplitude/Amplitude-TypeScript/commit/48216752f2105b6f2f71114913c5d9e19d192c7c)) - use config reference as plugin instance property ([#21](https://github.com/amplitude/Amplitude-TypeScript/issues/21)) ([38c2e33](https://github.com/amplitude/Amplitude-TypeScript/commit/38c2e3334b27063e23275c020207f647acbbaf6f)) - use uuid for default device id ([#20](https://github.com/amplitude/Amplitude-TypeScript/issues/20)) ([7f058e8](https://github.com/amplitude/Amplitude-TypeScript/commit/7f058e8723b9611ffb8fccb9ba80ba9bb296be4e)) - window reference and intellisense type def for IDE ([#55](https://github.com/amplitude/Amplitude-TypeScript/issues/55)) ([14eef98](https://github.com/amplitude/Amplitude-TypeScript/commit/14eef98fe7e7275ba8222586922101b326d28c43)) ### Features - add amplitude built-in plugins ([#22](https://github.com/amplitude/Amplitude-TypeScript/issues/22)) ([443a424](https://github.com/amplitude/Amplitude-TypeScript/commit/443a424d6dfd3a2c867f528f953429151de96ed0)) - add context plugin ([#13](https://github.com/amplitude/Amplitude-TypeScript/issues/13)) ([3d63991](https://github.com/amplitude/Amplitude-TypeScript/commit/3d639917905b25cab0bb012286b8ba487d0f63fb)) - add EU and batch endpoint support ([#50](https://github.com/amplitude/Amplitude-TypeScript/issues/50)) ([af6be60](https://github.com/amplitude/Amplitude-TypeScript/commit/af6be606a0e049657129ddbcbbf83c3dff844443)) - add getter and setter for config and group ([#45](https://github.com/amplitude/Amplitude-TypeScript/issues/45)) ([60e0073](https://github.com/amplitude/Amplitude-TypeScript/commit/60e00734a73002dffc98ddf6171ee74c5ac53aa4)) - add partner_id in event options ([#38](https://github.com/amplitude/Amplitude-TypeScript/issues/38)) ([880fe57](https://github.com/amplitude/Amplitude-TypeScript/commit/880fe57e5813d8bbe05c2a2a9428bd8a0a1e7d08)) - add serverZone check while calling getApiHost ([#51](https://github.com/amplitude/Amplitude-TypeScript/issues/51)) ([fa3014d](https://github.com/amplitude/Amplitude-TypeScript/commit/fa3014dd730e624b6320769edbdf35350d0edc3d)) - add snippet installation ([#36](https://github.com/amplitude/Amplitude-TypeScript/issues/36)) ([85348d5](https://github.com/amplitude/Amplitude-TypeScript/commit/85348d5ff719bf30ed3a93ed11dd97ed98ff862a)) - adds session management ([#15](https://github.com/amplitude/Amplitude-TypeScript/issues/15)) ([e23a563](https://github.com/amplitude/Amplitude-TypeScript/commit/e23a563c27befa5a3dc31ee55c559359e0159de3)) - attribution tracking ([#24](https://github.com/amplitude/Amplitude-TypeScript/issues/24)) ([c12678e](https://github.com/amplitude/Amplitude-TypeScript/commit/c12678e2aad98d333982ddb1ea4afb67a050bb1d)) - browser init config ([#6](https://github.com/amplitude/Amplitude-TypeScript/issues/6)) ([c5a0992](https://github.com/amplitude/Amplitude-TypeScript/commit/c5a09925e64f8a613eeab612ee6efb43419f39b4)) - create browser folder structure ([#5](https://github.com/amplitude/Amplitude-TypeScript/issues/5)) ([b1b279d](https://github.com/amplitude/Amplitude-TypeScript/commit/b1b279da067af7a5ca0c797b4f45fc154e3c2ae4)) - create cookie/events storage providers ([#7](https://github.com/amplitude/Amplitude-TypeScript/issues/7)) ([b3d6fab](https://github.com/amplitude/Amplitude-TypeScript/commit/b3d6fab5239d0d14854af9aa8a0c31826447ac48)) - create transport providers (fetch/xhr/sendBeacon) ([#8](https://github.com/amplitude/Amplitude-TypeScript/issues/8)) ([5ad3477](https://github.com/amplitude/Amplitude-TypeScript/commit/5ad3477974c779d696088922f56cae38a89f911c)) - expose core apis ([#37](https://github.com/amplitude/Amplitude-TypeScript/issues/37)) ([ea034de](https://github.com/amplitude/Amplitude-TypeScript/commit/ea034de03737570ae42e9b844835744362cc73df)) - implement save events to storage on destination plugin ([#26](https://github.com/amplitude/Amplitude-TypeScript/issues/26)) ([5f47677](https://github.com/amplitude/Amplitude-TypeScript/commit/5f476773f0a546db15de45fc40725a138a037c97)) - implements optOut config ([#30](https://github.com/amplitude/Amplitude-TypeScript/issues/30)) ([bdf1eb0](https://github.com/amplitude/Amplitude-TypeScript/commit/bdf1eb0c46f535947f66162639dd0b23f154ce28)) - improve browser config logic ([#56](https://github.com/amplitude/Amplitude-TypeScript/issues/56)) ([3054c68](https://github.com/amplitude/Amplitude-TypeScript/commit/3054c6856dd8f8ed49c9326f25c14b672890915b)) - introduce amplitude sdk promises ([#52](https://github.com/amplitude/Amplitude-TypeScript/issues/52)) ([75f79c0](https://github.com/amplitude/Amplitude-TypeScript/commit/75f79c023b136b9148b79514f65515342e9b3d37)) - set transport api ([#58](https://github.com/amplitude/Amplitude-TypeScript/issues/58)) ([addd2dd](https://github.com/amplitude/Amplitude-TypeScript/commit/addd2dd70d25b6977ad7faa044da518bf7b9295b)) - update track event ([#25](https://github.com/amplitude/Amplitude-TypeScript/issues/25)) ([bcccd65](https://github.com/amplitude/Amplitude-TypeScript/commit/bcccd659f83bd235ce7cb59848e259e14e1df392)) ================================================ FILE: packages/analytics-browser/README.md ================================================


# @amplitude/analytics-browser Official Amplitude SDK for Web # Doc See our [Analytics SDK for Browser](https://amplitude.github.io/Amplitude-TypeScript/modules/_amplitude_analytics_browser.html) Reference for a list and description of all available SDK methods. # Installation and Quick Start Please visit our :100:[Developer Center](https://www.docs.developers.amplitude.com/data/sdks/browser-2/) for instructions on installing and using our the SDK. ## Installation To get started with using Amplitude Browser SDK, install the package to your project via npm, yarn or script loader. ### Installing via package manager This SDK is available as a package on npm registry named `@amplitude/analytics-browser`. You can install the package using npm or yarn CLI. #### Using npm CLI ```sh npm install @amplitude/analytics-browser ``` #### Using yarn CLI ```sh # yarn yarn add @amplitude/analytics-browser ``` Import the package into your project and initialize it with your API key. ```ts import * as amplitude from '@amplitude/analytics-browser'; amplitude.init(''); ``` ### Installing via script loader This SDK is also available through CDN. Copy the script loader below and paste before the `` tag of every page you want to track and initialize it with your API key. ```html ``` ## Tracking events Once the SDK is initialize, you can start tracking events. ```ts amplitude.track('Page Viewed'); ``` For in-depth documentation, please visit to our [Developer Center](https://www.docs.developers.amplitude.com/data/sdks/sdk-quickstart/#browser). ================================================ FILE: packages/analytics-browser/e2e/cookie-consent.spec.ts ================================================ import { test, expect } from '@playwright/test'; import { parseRequestBody } from './helpers'; test.describe('Cookie Consent Page', () => { let requests: any[] = []; test.beforeEach(async ({ page }) => { requests = []; await page.route('https://api2.amplitude.com/2/httpapi', async (route) => { const request = route.request(); const data = parseRequestBody(request); if (data) { requests.push(data); } await route.continue(); }); }); test('should track events only after cookie consent is given', async ({ page }) => { // Navigate to the cookie consent page await page.goto('/browser-sdk/cookie-consent.html'); // Wait for the page to load and cookie banner to appear await expect(page.locator('#cookie-banner')).toBeVisible(); await expect(page.locator('#consent-status')).toContainText('Cookie consent not given yet'); await expect(page.locator('#sdk-status')).toContainText('Amplitude SDK not initialized'); // Click the button to track event before cookie consent await page.click('#track-before-consent-btn'); // Wait a moment to ensure any potential requests would have been made await page.waitForTimeout(1000); // Assert: no network request made by Amplitude (since SDK is not initialized) expect(requests.length).toBe(0); // Click on accept button of the cookie consent banner await page.click('#accept-cookies-btn'); // Wait for cookie banner to disappear and SDK to initialize await expect(page.locator('#cookie-banner')).not.toBeVisible(); await expect(page.locator('#consent-status')).toContainText('Cookie consent given'); await expect(page.locator('#sdk-status')).toContainText('Amplitude SDK initialized'); // Wait for all network requests to complete await page.waitForLoadState('networkidle'); // Check every 500ms for up to 10 seconds for (let i = 0; i < 20; i++) { if (requests.length === 1) break; await page.waitForTimeout(500); } // Assert: two events should be sent expect(requests.length).toBe(1); const events = requests[0].events; expect(events.length).toBe(2); // Verify the first event is "before cookie consent" expect(events[0].event_type).toBe('before cookie consent'); expect(events[0].event_properties.page).toBe('cookie-consent-demo'); expect(events[0].event_properties.consent_status).toBe('not_given'); expect(events[0].user_id).toBe('test-user-cookie-consent'); // Verify the second event is "SDK Initialized After Consent" expect(events[1].event_type).toBe('SDK Initialized After Consent'); expect(events[1].event_properties.consent_method).toBe('cookie_banner'); expect(events[1].user_id).toBe('test-user-cookie-consent'); }); test('should not initialize SDK when cookie consent is declined', async ({ page }) => { // Capture console logs const consoleLogs: string[] = []; page.on('console', msg => { consoleLogs.push(msg.text()); }); // Navigate to the cookie consent page await page.goto('/browser-sdk/cookie-consent.html'); // Wait for the page to load and cookie banner to appear await expect(page.locator('#cookie-banner')).toBeVisible(); // Click the button to track event before cookie consent await page.click('#track-before-consent-btn'); // Wait a moment to ensure any potential requests would have been made await page.waitForTimeout(1000); // Assert: no network request made by Amplitude expect(requests.length).toBe(0); // Click on decline button of the cookie consent banner await page.click('#decline-cookies-btn'); // Wait for cookie banner to disappear await expect(page.locator('#cookie-banner')).not.toBeVisible(); // Verify SDK status remains uninitialized await expect(page.locator('#consent-status')).toContainText('Cookie consent not given yet'); await expect(page.locator('#sdk-status')).toContainText('Amplitude SDK not initialized'); // Wait for potential network requests await page.waitForTimeout(3000); // Assert: still no network requests should be made expect(requests.length).toBe(0); // Assert: no console log contains "Amplitude SDK initialized successfully" const hasInitializationLog = consoleLogs.some(log => log.includes('Amplitude SDK initialized successfully')); expect(hasInitializationLog).toBe(false); }); }); ================================================ FILE: packages/analytics-browser/e2e/cookies-is-enabled.spec.ts ================================================ import { test, expect } from '@playwright/test'; const RUNS = 10; test.describe('CookieStorage', () => { // Regression Test to cover re-entrancy issues fixed by https://github.com/amplitude/Amplitude-TypeScript/pull/1539 test('.isEnabled works when called multiple times concurrently', async ({ page }) => { const consoleErrors: string[] = []; await page.addInitScript(() => { // runs before any page script (window as any).IS_PLAYWRIGHT = true; }); page.on('console', (msg) => { if (msg.type() === 'error') { consoleErrors.push(msg.text()); } }); const pageErrors: string[] = []; page.on('pageerror', (err) => { pageErrors.push(err.message); }); for (let i = 0; i < RUNS; i++) { await page.goto('/cookies/is-enabled.html'); expect(pageErrors, `Expected no page errors, but got: ${pageErrors.join('; ')}`).toHaveLength(0); expect(consoleErrors, `Expected no console.error calls, but got: ${consoleErrors.join('; ')}`).toHaveLength(0); } }); }); ================================================ FILE: packages/analytics-browser/e2e/events.spec.ts ================================================ import { test, expect, Page } from '@playwright/test'; import { parseRequestBody } from './helpers'; interface StorageState { origins: Array<{ origin: string; localStorage: Array<{ name: string; value: string; }>; }>; } async function getUnsentEvents(page: Page): Promise { const storage = await page.context().storageState() as StorageState; const unsentItems = storage.origins[0].localStorage .filter(item => item.name.startsWith('AMP_unsent_')); if (unsentItems.length === 0) { return []; } return JSON.parse(unsentItems[0].value); } test.describe('Events Page', () => { let requests: any[] = []; test.beforeEach(async ({ page }) => { requests = []; await page.route('https://api2.amplitude.com/2/httpapi', async (route) => { const request = route.request(); const data = parseRequestBody(request); if (data) { requests.push(data); } await route.continue(); }); }); test('should track events in sequence', async ({ page }) => { // Navigate to the events page await page.goto('/browser-sdk/events-precision.html'); // Wait for all status elements to be present const statusElements = [ 'event1-status', 'event2-status', 'event3-status', 'event4-status' ]; // Wait for all events to complete (status changes to 'complete') for (const id of statusElements) { await expect(page.locator(`#${id}`)).toHaveClass(/complete/); } // Verify the final state of all status elements for (const id of statusElements) { const element = page.locator(`#${id}`); await expect(element).toHaveClass(/complete/); await expect(element).toHaveText(/Tracked Event/); } // Wait for all network requests to complete await page.waitForLoadState('networkidle'); await page.waitForTimeout(1000); const events = requests[0].events; // Verify the network requests expect(events.length).toBe(4); events.forEach((event: any, index: number) => { expect(event.event_type).toBe(`Event ${index + 1}`); expect(event.user_id).toBe('test-user'); }); }); test('should track events even if offline', async ({ page }) => { // Navigate to the events page await page.goto('/browser-sdk/events-precision.html'); // Set browser to offline mode await page.context().setOffline(true); // Wait for all status elements to be present const statusElements = [ 'event1-status', 'event2-status', 'event3-status', 'event4-status' ]; // Wait for all events to complete (status changes to 'complete') for (const id of statusElements) { await expect(page.locator(`#${id}`)).toHaveClass(/complete/); } // Verify the final state of all status elements for (const id of statusElements) { const element = page.locator(`#${id}`); await expect(element).toHaveClass(/complete/); await expect(element).toHaveText(/Tracked Event/); } // Verify no requests were sent while offline expect(requests.length).toBe(0); // Wait for localStorage to be populated await page.waitForFunction(() => { return Object.keys((globalThis as any).localStorage) .some(key => key.startsWith('AMP_unsent_')); }); // Check localStorage for queued events const unsentValues = await getUnsentEvents(page); expect(unsentValues.length).toBe(4); // Parse the stored events const storedEvents: any[][] = []; const storage = await page.context().storageState() as StorageState; const unsentItems = storage.origins[0].localStorage .filter(item => item.name.startsWith('AMP_unsent_')); for (const item of unsentItems) { storedEvents.push(JSON.parse(item.value)); } // Verify events are in localStorage expect(storedEvents.length).toBeGreaterThan(0); const queuedEvents = storedEvents.flat(); expect(queuedEvents.length).toBe(4); queuedEvents.forEach((event: any, index: number) => { expect(event.event_type).toBe(`Event ${index + 1}`); expect(event.user_id).toBe('test-user'); }); // Set browser back to online mode await page.context().setOffline(false); // Wait for all network requests to complete await page.waitForLoadState('networkidle'); await page.waitForTimeout(1000); const events = requests[0].events; // Verify the network requests expect(events.length).toBe(4); events.forEach((event: any, index: number) => { expect(event.event_type).toBe(`Event ${index + 1}`); expect(event.user_id).toBe('test-user'); }); // Verify localStorage is cleared after sending await page.waitForTimeout(1000); const finalUnsentValues = await getUnsentEvents(page); expect(finalUnsentValues.length).toBe(0); }); }); ================================================ FILE: packages/analytics-browser/e2e/helpers.ts ================================================ import { gunzipSync } from 'zlib'; import type { Request } from '@playwright/test'; /** * Parse request body as JSON. Decompresses gzip when Content-Encoding: gzip is set. * Uses postDataBuffer() for gzip so we get raw bytes; uses postData() for plain JSON. */ export function parseRequestBody(request: Request): Record | undefined { const contentEncoding = request.headers()['content-encoding']; if (contentEncoding === 'gzip') { const buffer = request.postDataBuffer(); if (!buffer || buffer.length === 0) return undefined; const bodyStr = gunzipSync(buffer).toString('utf8'); return JSON.parse(bodyStr) as Record; } const postData = request.postData(); if (!postData) return undefined; return JSON.parse(postData) as Record; } ================================================ FILE: packages/analytics-browser/e2e/iframe-sandbox.spec.ts ================================================ import { test, expect } from '@playwright/test'; test('iframe-sandbox parent page has no uncaught exceptions', async ({ page }) => { const errors: Error[] = []; page.on('pageerror', (err) => errors.push(err)); await page.goto('/iframe-sandbox/parent.html', { waitUntil: 'networkidle' }); // Allow iframe content (child.html with Amplitude) to load and run const iframe = page.frameLocator('iframe[src*="child.html"]'); await iframe.locator('body').waitFor({ state: 'visible', timeout: 10000 }); // just test that the errors are the expected errors // until we make the SDK handle the iframe sandbox environment more gracefully const expectedErrors = [ `Failed to read the 'cookie' property from 'Document'`, `SecurityError: The operation is insecure`, ]; const unexpectedErrors = [ `Access to the Locks API is denied in this context`, ]; for (const error of errors) { expect(expectedErrors.find((err) => error.message.includes(err))).toBeDefined(); expect(unexpectedErrors.find((err) => error.message.includes(err))).toBeUndefined(); } expect(errors.length <= 3).toBe(true); }); ================================================ FILE: packages/analytics-browser/e2e/proxy-server.spec.ts ================================================ import { test, expect } from '@playwright/test'; import { parseRequestBody } from './helpers'; // Extend the Window interface to include amplitude declare global { interface Window { amplitude: any; } } test.describe('Proxy Server Integration', () => { let proxyRequests: any[] = []; test.beforeEach(async ({ page }) => { proxyRequests = []; // Intercept calls to the proxy server await page.route('http://localhost:3001/2/httpapi', async (route) => { const request = route.request(); const data = parseRequestBody(request); if (data) { proxyRequests.push({ url: request.url(), method: request.method(), headers: request.headers(), data: data }); } // Continue the request to the actual proxy server await route.continue(); }); }); test('should track multiple events through proxy server', async ({ page }) => { // Navigate to the proxy test page await page.goto('/proxy-test.html'); // Wait for the page to load await page.waitForLoadState('networkidle'); await page.waitForTimeout(1000); // Send multiple events const events = [ { name: 'FAKE-EVENT-1', properties: { index: 1 } }, { name: 'FAKE-EVENT-2', properties: { index: 2 } }, { name: 'FAKE-EVENT-3', properties: { index: 3 } } ]; for (const event of events) { await page.evaluate((eventData) => { // @ts-ignore - window is available in browser context return window.amplitude.track(eventData.name, { source: 'playwright-test', timestamp: Date.now(), ...eventData.properties }); }, event); // Small delay between events await page.waitForTimeout(500); } // Wait for all network requests to complete await page.waitForTimeout(2000); // Verify that requests were made to the proxy server expect(proxyRequests.length).toBeGreaterThan(0); // Collect all events from all requests const allEvents: any[] = []; proxyRequests.forEach(request => { if (request.data && request.data.events) { allEvents.push(...request.data.events); } }); // Verify we have at least 3 events expect(allEvents.length).toBeGreaterThanOrEqual(3); // Verify each event was tracked events.forEach(event => { const trackedEvent = allEvents.find((e: any) => e.event_type === event.name); expect(trackedEvent).toBeDefined(); expect(trackedEvent.event_type).toBe(event.name); expect(trackedEvent.event_properties.source).toBe('playwright-test'); expect(trackedEvent.event_properties.index).toBe(event.properties.index); }); }); }); ================================================ FILE: packages/analytics-browser/e2e/title.spec.ts ================================================ import { test, expect } from '@playwright/test'; test('should have correct title', async ({ page }) => { const errors: Error[] = []; page.on('pageerror', (err) => errors.push(err)); // Add error handling for navigation try { // Navigate to the specified URL with retry logic const response = await page.goto('http://localhost:5173/browser-sdk/index.html', { waitUntil: 'networkidle', timeout: 30000, }); // Check if the response was successful expect(response?.status()).toBe(200); // Get the page title const title = await page.title(); // Assert that the title is what we expect expect(title).toBeTruthy(); // Ensure no uncaught errors were thrown on the page expect(errors).toEqual([]); } catch (error) { console.error('Navigation failed:', error); throw error; } }); ================================================ FILE: packages/analytics-browser/generated/amplitude-bookmarklet-snippet.js ================================================ "use strict"; /** * Create a bookmark with this code snippet in the browser, update the apiKey, userId, and serverZone, and click the bookmark on any website to run. * Script will fail to load if the website has a Content Security Policy (CSP) that blocks third-party inline scripts. */ !function (window, document) { var amplitude = window.amplitude || { _q: [], _iq: {} }; if (amplitude.invoked) window.console && console.error && console.error('Amplitude snippet has been loaded.');else { var proxy = function proxy(obj, fn) { obj.prototype[fn] = function () { this._q.push({ name: fn, args: Array.prototype.slice.call(arguments, 0) }); return this; }; }; var getPromiseResult = function getPromiseResult(instance, fn, args) { return function (resolve) { instance._q.push({ name: fn, args: Array.prototype.slice.call(args, 0), resolve: resolve }); }; }; var proxyMain = function proxyMain(instance, fn, isPromise) { instance[fn] = function () { if (isPromise) return { promise: new Promise(getPromiseResult(instance, fn, Array.prototype.slice.call(arguments))) }; }; }; var setUpProxy = function setUpProxy(instance) { for (var k = 0; k < funcs.length; k++) { proxyMain(instance, funcs[k], false); } for (var l = 0; l < funcsWithPromise.length; l++) { proxyMain(instance, funcsWithPromise[l], true); } }; amplitude.invoked = true; var s = document.getElementsByTagName('script')[0]; var autoTrackingPluginScript = document.createElement('script'); autoTrackingPluginScript.src = 'https://cdn.amplitude.com/libs/plugin-autocapture-browser-0.9.0-min.js.gz'; autoTrackingPluginScript.async = false; s.parentNode.insertBefore(autoTrackingPluginScript, s); var as = document.createElement('script'); as.type = 'text/javascript'; as.integrity = 'sha384-hmnfWlRQ5S6H/wCNnDtjTifF4/Jpkj4yezjl1CxwuhX54oCx83KDHuOdZKVIkdrR'; as.crossOrigin = 'anonymous'; as.async = false; as.src = 'https://cdn.amplitude.com/libs/analytics-browser-2.42.3-min.js.gz'; as.onload = function () { if (!window.amplitude.runQueuedFunctions) { console.log('[Amplitude] Error: could not load SDK'); } window.amplitude.init('YOUR_API_KEY', 'YOUR_USER_ID', { instanceName: 'amplitude-bookmarklet', serverZone: 'YOUR_SERVER_ZONE', ingestionMetadata: { sourceName: 'browser-typescript-bookmarklet', sourceVersion: '1.0.0' }, optOut: false }); if (amplitudeAutocapturePlugin && amplitudeAutocapturePlugin.autocapturePlugin && typeof amplitudeAutocapturePlugin.autocapturePlugin === 'function') { window.amplitude.add(amplitudeAutocapturePlugin.autocapturePlugin()); } alert('Amplitude is now tracking events!'); }; s.parentNode.insertBefore(as, s); var Identify = function Identify() { this._q = []; return this; }; var identifyFuncs = ['add', 'append', 'clearAll', 'prepend', 'set', 'setOnce', 'unset', 'preInsert', 'postInsert', 'remove', 'getUserProperties']; for (var i = 0; i < identifyFuncs.length; i++) { proxy(Identify, identifyFuncs[i]); } amplitude.Identify = Identify; var Revenue = function Revenue() { this._q = []; return this; }; var revenueFuncs = ['getEventProperties', 'setProductId', 'setQuantity', 'setPrice', 'setRevenue', 'setRevenueType', 'setReceipt', 'setReceiptSig', 'setCurrency', 'setEventProperties']; for (var j = 0; j < revenueFuncs.length; j++) { proxy(Revenue, revenueFuncs[j]); } amplitude.Revenue = Revenue; var funcs = ['getDeviceId', 'setDeviceId', 'getSessionId', 'setSessionId', 'getUserId', 'setUserId', 'setOptOut', 'setTransport', 'reset', 'extendSession']; var funcsWithPromise = ['init', 'add', 'remove', 'track', 'logEvent', 'identify', 'groupIdentify', 'setGroup', 'revenue', 'flush']; setUpProxy(amplitude); amplitude.createInstance = function (instanceName) { amplitude._iq[instanceName] = { _q: [] }; setUpProxy(amplitude._iq[instanceName]); return amplitude._iq[instanceName]; }; window.amplitude = amplitude; } }(window, document); ================================================ FILE: packages/analytics-browser/generated/amplitude-gtm-snippet.js ================================================ "use strict"; /** * Imported in client browser via

Amplitude SDK Playground

This playground has Amplitude SDK script loaded, initialized, and available as amplitude.

  • Check if you have a valid API KEY
  • Open Developer Tools
  • Go to Console tab
  • Play with the SDK
================================================ FILE: packages/analytics-browser/playground/react-spa/.gitignore ================================================ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. # dependencies /node_modules /.pnp .pnp.js # testing /coverage # production /build # misc .DS_Store .env.local .env.development.local .env.test.local .env.production.local npm-debug.log* yarn-debug.log* yarn-error.log* ================================================ FILE: packages/analytics-browser/playground/react-spa/README.md ================================================ # Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). ## Available Scripts In the project directory, you can run: ### `npm start` Runs the app in the development mode.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. ### `npm run start:dev` Runs the app in the development mode with the local build of analytics-browser script.\ Open [http://localhost:3000](http://localhost:3000) to view it in the browser. The page will reload if you make edits.\ You will also see any lint errors in the console. ### `npm test` Launches the test runner in the interactive watch mode.\ See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. ### `npm run build` Builds the app for production to the `build` folder.\ It correctly bundles React in production mode and optimizes the build for the best performance. The build is minified and the filenames include the hashes.\ Your app is ready to be deployed! See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. ### `npm run eject` **Note: this is a one-way operation. Once you `eject`, you can’t go back!** If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. ## Learn More You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). ================================================ FILE: packages/analytics-browser/playground/react-spa/package.json ================================================ { "name": "react-app", "version": "0.1.0", "private": true, "dependencies": { "@testing-library/jest-dom": "^5.16.5", "@testing-library/react": "^13.4.0", "@testing-library/user-event": "^14.4.3", "@types/jest": "^29.2.4", "@types/node": "^18.11.14", "@types/react": "^18.0.26", "@types/react-dom": "^18.0.9", "react": "^18.2.0", "react-dom": "^18.2.0", "react-helmet": "^6.1.0", "react-router-dom": "^6.22.1", "react-scripts": "5.0.1", "typescript": "^4.6.3", "web-vitals": "^3.1.0" }, "scripts": { "buildSDK": "cd ../../../analytics-browser && yarn build", "installSDK": "cp ../../../analytics-browser/lib/scripts/amplitude-min.js ./public/amplitude.js", "start:dev": "yarn buildSDK && yarn installSDK && yarn start", "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" }, "eslintConfig": { "extends": [ "react-app", "react-app/jest" ] }, "browserslist": { "production": [ ">0.2%", "not dead", "not op_mini all" ], "development": [ "last 1 chrome version", "last 1 firefox version", "last 1 safari version" ] } } ================================================ FILE: packages/analytics-browser/playground/react-spa/public/index.html ================================================ React App
================================================ FILE: packages/analytics-browser/playground/react-spa/public/manifest.json ================================================ { "short_name": "React App", "name": "Create React App Sample", "icons": [ { "src": "favicon.ico", "sizes": "64x64 32x32 24x24 16x16", "type": "image/x-icon" }, { "src": "logo192.png", "type": "image/png", "sizes": "192x192" }, { "src": "logo512.png", "type": "image/png", "sizes": "512x512" } ], "start_url": ".", "display": "standalone", "theme_color": "#000000", "background_color": "#ffffff" } ================================================ FILE: packages/analytics-browser/playground/react-spa/public/robots.txt ================================================ # https://www.robotstxt.org/robotstxt.html User-agent: * Disallow: ================================================ FILE: packages/analytics-browser/playground/react-spa/src/App.css ================================================ .App { text-align: center; } .App-logo { height: 40vmin; pointer-events: none; } @media (prefers-reduced-motion: no-preference) { .App-logo { animation: App-logo-spin infinite 20s linear; } } .App-header { background-color: #282c34; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(10px + 2vmin); color: white; } .App-link { color: #61dafb; } ul.header { background-color: #111; padding: 0; } ul.header li { display: inline; list-style-type: none; margin: 0; } ul.header li a { color: #fff; font-weight: 700; text-decoration: none; padding: 20px; display: inline-block; } button { margin: 30px; } @keyframes App-logo-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } } ================================================ FILE: packages/analytics-browser/playground/react-spa/src/App.test.tsx ================================================ import { render, screen } from '@testing-library/react'; import App from './App'; test('renders learn react link', () => { render(); const linkElement = screen.getByText(/learn react/i); expect(linkElement).toBeInTheDocument(); }); ================================================ FILE: packages/analytics-browser/playground/react-spa/src/App.tsx ================================================ import logo from './logo.svg'; import './App.css'; import {   Route, Routes,   NavLink,   HashRouter } from "react-router-dom"; import Home from "./Home"; import Other from "./Other"; import Contact from "./Contact"; function App() { return (
logo

Amplitude Analytics Browser Example with React

  • Home
  • Other
  • Contact
}/>    }/>    }/>
); } export default App; ================================================ FILE: packages/analytics-browser/playground/react-spa/src/Contact.tsx ================================================ function Contact() { return (
Please file a bug in the github repo if there has any issue.
); } export default Contact; ================================================ FILE: packages/analytics-browser/playground/react-spa/src/Home.tsx ================================================ function Home() { return (

Please test the track function

); } export default Home; ================================================ FILE: packages/analytics-browser/playground/react-spa/src/Other.tsx ================================================ function Other() { return (

Test other functions here

); } export default Other; ================================================ FILE: packages/analytics-browser/playground/react-spa/src/index.css ================================================ body { margin: 0; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } code { font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', monospace; } ================================================ FILE: packages/analytics-browser/playground/react-spa/src/index.tsx ================================================ import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App'; const root = ReactDOM.createRoot( document.getElementById('root') as HTMLElement ); root.render( ); ================================================ FILE: packages/analytics-browser/playground/react-spa/tsconfig.json ================================================ { "compilerOptions": { "target": "es5", "lib": [ "dom", "dom.iterable", "esnext" ], "allowJs": true, "skipLibCheck": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, "strict": true, "forceConsistentCasingInFileNames": true, "noFallthroughCasesInSwitch": true, "module": "esnext", "moduleResolution": "node", "resolveJsonModule": true, "isolatedModules": true, "noEmit": true, "jsx": "react-jsx" }, "include": [ "src" ] } ================================================ FILE: packages/analytics-browser/playwright.config.ts ================================================ import { defineConfig } from '@playwright/test'; import baseConfig from '../../playwright.config'; export default defineConfig({ ...baseConfig, }); ================================================ FILE: packages/analytics-browser/rollup.config.js ================================================ import { umd, iife, snippet, iifeGTM, snippetGTM, bookmarklet } from '../../scripts/build/rollup.config'; export default [umd, iife, snippet, iifeGTM, snippetGTM, bookmarklet]; ================================================ FILE: packages/analytics-browser/src/__mocks__/det-notification.ts ================================================ export const detNotify = () => undefined; export const resetNotify = () => undefined; ================================================ FILE: packages/analytics-browser/src/attribution/helpers.ts ================================================ import { createIdentifyEvent, Identify, ILogger, Campaign, BASE_CAMPAIGN, getGlobalScope, TrackingMethod, } from '@amplitude/analytics-core'; import { ExcludeInternalReferrersOptions, EXCLUDE_INTERNAL_REFERRERS_CONDITIONS } from '../types'; export interface Options { excludeReferrers?: (string | RegExp)[]; excludeInternalReferrers?: true | false | ExcludeInternalReferrersOptions; initialEmptyValue?: string; resetSessionOnNewCampaign?: boolean; trackingMethod?: TrackingMethod | TrackingMethod[]; fallbackAttributionEvent?: boolean; optOut?: boolean; } const domainWithoutSubdomain = (domain: string) => { const parts = domain.split('.'); if (parts.length <= 2) { return domain; } return parts.slice(parts.length - 2, parts.length).join('.'); }; //Direct traffic mean no external referral, no UTMs, no click-ids, and no other customer identified marketing campaign url params. const isDirectTraffic = (current: Campaign) => { return Object.values(current).every((value) => !value); }; const isEmptyCampaign = (campaign: Campaign) => { const campaignWithoutReferrer = { ...campaign, referring_domain: undefined, referrer: undefined }; return Object.values(campaignWithoutReferrer).every((value) => !value); }; export const isNewCampaign = ( current: Campaign, previous: Campaign | undefined, options: Options, logger: ILogger, isNewSession = true, topLevelDomain?: string, ) => { const { referrer, referring_domain, ...currentCampaign } = current; const { referrer: _previous_referrer, referring_domain: prevReferringDomain, ...previousCampaign } = previous || {}; const { excludeInternalReferrers } = options; if (excludeInternalReferrers) { const condition = getExcludeInternalReferrersCondition(excludeInternalReferrers, logger); if ( !(condition instanceof TypeError) && current.referring_domain && isInternalReferrer(current.referring_domain, topLevelDomain) ) { if (condition === 'always') { debugLogInternalReferrerExclude(condition, current.referring_domain, logger); return false; } else if (condition === 'ifEmptyCampaign' && isEmptyCampaign(current)) { debugLogInternalReferrerExclude(condition, current.referring_domain, logger); return false; } } } if (isExcludedReferrer(options.excludeReferrers, current.referring_domain)) { // eslint-disable-next-line @typescript-eslint/restrict-template-expressions logger.debug(`This is not a new campaign because ${current.referring_domain} is in the exclude referrer list.`); return false; } //In the same session, direct traffic should not override or unset any persisting query params if (!isNewSession && isDirectTraffic(current) && previous) { logger.debug('This is not a new campaign because this is a direct traffic in the same session.'); return false; } const hasNewCampaign = JSON.stringify(currentCampaign) !== JSON.stringify(previousCampaign); const hasNewDomain = domainWithoutSubdomain(referring_domain || '') !== domainWithoutSubdomain(prevReferringDomain || ''); const result = !previous || hasNewCampaign || hasNewDomain; if (!result) { logger.debug("This is not a new campaign because it's the same as the previous one."); } else { logger.debug(`This is a new campaign. An $identify event will be sent.`); } return result; }; export const isExcludedReferrer = (excludeReferrers: (string | RegExp)[] = [], referringDomain = '') => { return excludeReferrers.some((value) => value instanceof RegExp ? value.test(referringDomain) : value === referringDomain, ); }; export const isSubdomainOf = (subDomain: string, domain: string) => { const cookieDomainWithLeadingDot = domain.startsWith('.') ? domain : `.${domain}`; const subDomainWithLeadingDot = subDomain.startsWith('.') ? subDomain : `.${subDomain}`; if (subDomainWithLeadingDot.endsWith(cookieDomainWithLeadingDot)) return true; return false; }; export const createCampaignEvent = (campaign: Campaign, options: Options) => { const campaignParameters: Campaign = { // This object definition allows undefined keys to be iterated on // in .reduce() to build indentify object ...BASE_CAMPAIGN, ...campaign, }; const identifyEvent = Object.entries(campaignParameters).reduce((identify, [key, value]) => { identify.setOnce(`initial_${key}`, value ?? options.initialEmptyValue ?? 'EMPTY'); if (value) { return identify.set(key, value); } return identify.unset(key); }, new Identify()); return createIdentifyEvent(identifyEvent); }; export const getDefaultExcludedReferrers = (cookieDomain: string | undefined) => { let domain = cookieDomain; if (domain) { if (domain.startsWith('.')) { domain = domain.substring(1); } return [new RegExp(`${domain.replace('.', '\\.')}$`)]; } return []; }; /** * Parses the excludeInternalReferrers configuration to determine the condition on which to * exclude internal referrers for campaign attribution. * * If the config is invalid type, log and return a TypeError. * * (this does explicit type checking so don't have to rely on TS compiler to catch invalid types) * * @param excludeInternalReferrers - attribution.excludeInternalReferrers configuration * @param logger - logger instance to log error when TypeError * @returns The condition if the config is valid, TypeError if the config is invalid. */ const getExcludeInternalReferrersCondition = ( excludeInternalReferrers: ExcludeInternalReferrersOptions | boolean, logger: ILogger, ): ExcludeInternalReferrersOptions['condition'] | TypeError => { if (excludeInternalReferrers === true) { return EXCLUDE_INTERNAL_REFERRERS_CONDITIONS.always; } if (typeof excludeInternalReferrers === 'object') { const { condition } = excludeInternalReferrers; if (typeof condition === 'string' && Object.keys(EXCLUDE_INTERNAL_REFERRERS_CONDITIONS).includes(condition)) { return condition; } else if (typeof condition === 'undefined') { return EXCLUDE_INTERNAL_REFERRERS_CONDITIONS.always; } } const errorMessage = `Invalid configuration provided for attribution.excludeInternalReferrers: ${JSON.stringify( excludeInternalReferrers, )}`; logger.error(errorMessage); return new TypeError(errorMessage); }; // helper function to log debug message when internal referrer is excluded // (added this to prevent code duplication and improve readability) function debugLogInternalReferrerExclude( condition: ExcludeInternalReferrersOptions['condition'], referringDomain: string, logger: ILogger, ) { const baseMessage = `This is not a new campaign because referring_domain=${referringDomain} is on the same domain as the current page and it is configured to exclude internal referrers`; if (condition === 'always') { logger.debug(baseMessage); } else if (condition === 'ifEmptyCampaign') { logger.debug(`${baseMessage} with empty campaign parameters`); } } // list of domains that are known ccTLDs that are commonly used // and are in the Public Suffix List (https://publicsuffix.org/) export const KNOWN_2LDS = [ 'ac.in', 'ac.jp', 'ac.kr', 'ac.th', 'ac.uk', 'ac.za', 'appspot.com', 'asn.au', 'azurewebsites.net', 'cloudfront.net', 'myshopify.com', 'blogspot.com', 'co.ca', 'co.in', 'co.jp', 'co.kr', 'co.nz', 'co.th', 'co.uk', 'co.za', 'com.ar', 'com.au', 'com.br', 'com.cn', 'com.hk', 'com.in', 'com.jp', 'com.kr', 'com.mx', 'com.pl', 'com.sg', 'com.tr', 'com.tw', 'ed.jp', 'edu.au', 'edu.br', 'edu.cn', 'edu.hk', 'edu.sg', 'edu.th', 'edu.tr', 'edu.tw', 'firebaseapp.com', 'fly.dev', 'gc.ca', 'geek.nz', 'github.io', 'gitlab.io', 'go.jp', 'go.kr', 'go.th', 'gob.ar', 'gob.mx', 'gov.au', 'gov.br', 'gov.cn', 'gov.hk', 'gov.in', 'gov.pl', 'gov.sg', 'gov.tr', 'gov.tw', 'gov.uk', 'gov.za', 'govt.nz', 'gr.jp', 'herokuapp.com', 'id.au', 'idv.hk', 'iwi.nz', 'lg.jp', 'ltd.uk', 'maori.nz', 'me.uk', 'mil.kr', 'ne.jp', 'ne.kr', 'net.au', 'net.br', 'net.cn', 'net.hk', 'net.in', 'net.nz', 'net.pl', 'net.sg', 'net.tr', 'net.tw', 'net.za', 'onrender.com', 'or.jp', 'or.kr', 'or.th', 'org.ar', 'org.au', 'org.br', 'org.cn', 'org.hk', 'org.in', 'org.mx', 'org.nz', 'org.pl', 'org.sg', 'org.tw', 'org.uk', 'org.za', 'pages.dev', 'pe.kr', 'plc.uk', 're.kr', 'res.in', 'sch.uk', 'vercel.app', 'netlify.app', 'workers.dev', ]; export const getDomain = (hostnameParam?: string) => { /* istanbul ignore next */ const hostname = hostnameParam || getGlobalScope()?.location?.hostname; if (!hostname) { return ''; } const parts = hostname.split('.'); let tld = parts[parts.length - 1]; let name = parts[parts.length - 2]; if (KNOWN_2LDS.find((tld) => hostname.endsWith(`.${tld}`))) { tld = parts[parts.length - 2] + '.' + parts[parts.length - 1]; name = parts[parts.length - 3]; } if (!name) return tld; return `${name}.${tld}`; }; const isInternalReferrer = (referringDomain: string, topLevelDomain?: string) => { const globalScope = getGlobalScope(); /* istanbul ignore if */ if (!globalScope) return false; // if referring domain is subdomain of config.cookieDomain, return true const internalDomain = (topLevelDomain || '').trim() || getDomain(globalScope.location.hostname); return isSubdomainOf(referringDomain, internalDomain); }; ================================================ FILE: packages/analytics-browser/src/attribution/tracking-methods.ts ================================================ import { AttributionOptions, TrackingMethod } from '@amplitude/analytics-core'; export const USER_PROPERTY_TRACKING_METHOD: TrackingMethod = 'userProperty'; export const EVENT_PROPERTY_TRACKING_METHOD: TrackingMethod = 'eventProperty'; const isTrackingMethod = (value: unknown): value is TrackingMethod => value === USER_PROPERTY_TRACKING_METHOD || value === EVENT_PROPERTY_TRACKING_METHOD; /** * Normalizes attribution tracking methods from runtime config, drops unsupported values, * and falls back to the legacy default when nothing valid is provided. */ export const normalizeTrackingMethod = (trackingMethod?: unknown): TrackingMethod[] => { const normalized = [ ...new Set((Array.isArray(trackingMethod) ? trackingMethod : [trackingMethod]).filter(isTrackingMethod)), ]; return normalized.length > 0 ? normalized : [USER_PROPERTY_TRACKING_METHOD]; }; export const hasTrackingMethod = (options: AttributionOptions, trackingMethod: TrackingMethod) => normalizeTrackingMethod(options.trackingMethod).includes(trackingMethod); export const isUserPropertyAttributionEnabled = (options: AttributionOptions) => hasTrackingMethod(options, USER_PROPERTY_TRACKING_METHOD); export const isEventPropertyAttributionEnabled = (options: AttributionOptions) => hasTrackingMethod(options, EVENT_PROPERTY_TRACKING_METHOD); ================================================ FILE: packages/analytics-browser/src/attribution/web-attribution.ts ================================================ import { BrowserConfig, ILogger, Storage, getStorageKey, isNewSession, Campaign, BASE_CAMPAIGN, CampaignParser, } from '@amplitude/analytics-core'; import { Options, getDefaultExcludedReferrers, createCampaignEvent, isNewCampaign } from './helpers'; export class WebAttribution { options: Options; storage: Storage; storageKey: string; webExpStorageKey: string; previousCampaign?: Campaign; currentCampaign: Campaign; shouldTrackNewCampaign = false; sessionTimeout: number; lastEventTime?: number; logger: ILogger; topLevelDomain?: string; constructor(options: Options, config: BrowserConfig) { this.options = { initialEmptyValue: 'EMPTY', resetSessionOnNewCampaign: false, excludeReferrers: getDefaultExcludedReferrers(config.cookieOptions?.domain || config.topLevelDomain), optOut: config.optOut, ...options, }; this.storage = config.cookieStorage as unknown as Storage; this.storageKey = getStorageKey(config.apiKey, 'MKTG'); this.webExpStorageKey = getStorageKey(config.apiKey, 'MKTG_ORIGINAL'); this.currentCampaign = BASE_CAMPAIGN; this.sessionTimeout = config.sessionTimeout; this.lastEventTime = config.lastEventTime; this.logger = config.loggerProvider; this.topLevelDomain = config.topLevelDomain; config.loggerProvider.log('Installing web attribution tracking.'); } async init() { // skip attribution if optOut is true if (this.options.optOut) { return; } [this.currentCampaign, this.previousCampaign] = await this.fetchCampaign(); const isEventInNewSession = !this.lastEventTime ? true : isNewSession(this.sessionTimeout, this.lastEventTime); if ( isNewCampaign( this.currentCampaign, this.previousCampaign, this.options, this.logger, isEventInNewSession, this.topLevelDomain, ) ) { this.shouldTrackNewCampaign = true; await this.storage.set(this.storageKey, this.currentCampaign); } } async fetchCampaign() { const originalCampaign = await this.storage.get(this.webExpStorageKey); if (originalCampaign) { await this.storage.remove(this.webExpStorageKey); } return await Promise.all([originalCampaign || new CampaignParser().parse(), this.storage.get(this.storageKey)]); } /** * This can be called when enable web attribution and either * 1. set a new session * 2. has new campaign and enable resetSessionOnNewCampaign */ generateCampaignEvent(event_id?: number) { // Mark this campaign has been tracked this.shouldTrackNewCampaign = false; const campaignEvent = createCampaignEvent(this.currentCampaign, this.options); if (event_id) { campaignEvent.event_id = event_id; } return campaignEvent; } shouldSetSessionIdOnNewCampaign() { return this.shouldTrackNewCampaign && !!this.options.resetSessionOnNewCampaign; } } ================================================ FILE: packages/analytics-browser/src/browser-client-factory.ts ================================================ import { debugWrapper, getClientLogConfig, getClientStates, BrowserClient } from '@amplitude/analytics-core'; import { AmplitudeBrowser } from './browser-client'; export const createInstance = (): BrowserClient => { const client = new AmplitudeBrowser(); return { init: debugWrapper( client.init.bind(client), 'init', getClientLogConfig(client), getClientStates(client, ['config']), ), add: debugWrapper( client.add.bind(client), 'add', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins']), ), remove: debugWrapper( client.remove.bind(client), 'remove', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins']), ), track: debugWrapper( client.track.bind(client), 'track', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), logEvent: debugWrapper( client.logEvent.bind(client), 'logEvent', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), identify: debugWrapper( client.identify.bind(client), 'identify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), groupIdentify: debugWrapper( client.groupIdentify.bind(client), 'groupIdentify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), setGroup: debugWrapper( client.setGroup.bind(client), 'setGroup', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), revenue: debugWrapper( client.revenue.bind(client), 'revenue', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), flush: debugWrapper( client.flush.bind(client), 'flush', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), getUserId: debugWrapper( client.getUserId.bind(client), 'getUserId', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId']), ), setUserId: debugWrapper( client.setUserId.bind(client), 'setUserId', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId']), ), getDeviceId: debugWrapper( client.getDeviceId.bind(client), 'getDeviceId', getClientLogConfig(client), getClientStates(client, ['config', 'config.deviceId']), ), setDeviceId: debugWrapper( client.setDeviceId.bind(client), 'setDeviceId', getClientLogConfig(client), getClientStates(client, ['config', 'config.deviceId']), ), reset: debugWrapper( client.reset.bind(client), 'reset', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId', 'config.deviceId']), ), getSessionId: debugWrapper( client.getSessionId.bind(client), 'getSessionId', getClientLogConfig(client), getClientStates(client, ['config']), ), setSessionId: debugWrapper( client.setSessionId.bind(client), 'setSessionId', getClientLogConfig(client), getClientStates(client, ['config']), ), extendSession: debugWrapper( client.extendSession.bind(client), 'extendSession', getClientLogConfig(client), getClientStates(client, ['config']), ), setOptOut: debugWrapper( client.setOptOut.bind(client), 'setOptOut', getClientLogConfig(client), getClientStates(client, ['config']), ), setTransport: debugWrapper( client.setTransport.bind(client), 'setTransport', getClientLogConfig(client), getClientStates(client, ['config']), ), getIdentity: debugWrapper( client.getIdentity.bind(client), 'getIdentity', getClientLogConfig(client), getClientStates(client, ['config']), ), setIdentity: debugWrapper( client.setIdentity.bind(client), 'setIdentity', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId', 'config.deviceId']), ), getOptOut: debugWrapper( client.getOptOut.bind(client), 'getOptOut', getClientLogConfig(client), getClientStates(client, ['config']), ), _setDiagnosticsSampleRate: debugWrapper( client._setDiagnosticsSampleRate.bind(client), '_setDiagnosticsSampleRate', getClientLogConfig(client), getClientStates(client, ['config']), ), }; }; export default createInstance(); ================================================ FILE: packages/analytics-browser/src/browser-client.ts ================================================ import { AmplitudeCore, Destination, Identify, returnWrapper, Revenue, UUID, getAnalyticsConnector, setConnectorDeviceId, setConnectorUserId, isNewSession, IdentityEventSender, getQueryParams, Event, EventOptions, IIdentify, IRevenue, TransportTypeOrOptions, OfflineDisabled, Result, BrowserOptions, BrowserConfig, BrowserClient, AnalyticsClient, AnalyticsIdentity, IRemoteConfigClient, RemoteConfigClient, RemoteConfig, Source, DiagnosticsClient, createIdentifyEvent, Logger, safeJsonStringify, LogLevel, } from '@amplitude/analytics-core'; import { getAttributionTrackingConfig, getPageViewTrackingConfig, getElementInteractionsConfig, getNetworkTrackingConfig, isAttributionTrackingEnabled, isSessionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isElementInteractionsEnabled, isPageViewTrackingEnabled, isNetworkTrackingEnabled, isWebVitalsEnabled, isFrustrationInteractionsEnabled, getFrustrationInteractionsConfig, isPerformanceTrackingEnabled, getPerformanceTrackingConfig, isPageUrlEnrichmentEnabled, isCustomEnrichmentEnabled, } from './default-tracking'; import { convertProxyObjectToRealObject, isInstanceProxy } from './utils/snippet-helper'; import { Context } from './plugins/context'; import { useBrowserConfig, createTransport, shouldFetchRemoteConfig } from './config'; import { pageViewTrackingPlugin } from '@amplitude/plugin-page-view-tracking-browser'; import { formInteractionTracking } from './plugins/form-interaction-tracking'; import { fileDownloadTracking } from './plugins/file-download-tracking'; import { DEFAULT_SESSION_END_EVENT, DEFAULT_SESSION_START_EVENT, DEFAULT_SERVER_ZONE } from './constants'; import { detNotify } from './det-notification'; import { networkConnectivityCheckerPlugin } from './plugins/network-connectivity-checker'; import { updateBrowserConfigWithRemoteConfig } from './config/joined-config'; import { autocapturePlugin, frustrationPlugin, performancePlugin } from '@amplitude/plugin-autocapture-browser'; import { plugin as networkCapturePlugin } from '@amplitude/plugin-network-capture-browser'; import { webVitalsPlugin } from '@amplitude/plugin-web-vitals-browser'; import { WebAttribution } from './attribution/web-attribution'; import { eventPropertyTrackingPlugin } from '@amplitude/plugin-event-property-attribution-browser'; import { LIBPREFIX } from './lib-prefix'; import { VERSION } from './version'; import { pageUrlEnrichmentPlugin } from '@amplitude/plugin-page-url-enrichment-browser'; import { customEnrichmentPlugin } from '@amplitude/plugin-custom-enrichment-browser'; import { isEventPropertyAttributionEnabled, isUserPropertyAttributionEnabled } from './attribution/tracking-methods'; const UNSPECIFIED_SESSION_ID = -1; /** * Exported for `@amplitude/unified` or integration with blade plugins. * If you only use `@amplitude/analytics-browser`, use `amplitude.init()` or `amplitude.createInstance()` instead. */ export class AmplitudeBrowser extends AmplitudeCore implements BrowserClient, AnalyticsClient { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore config: BrowserConfig; previousSessionDeviceId: string | undefined; previousSessionUserId: string | undefined; webAttribution: WebAttribution | undefined; // Backdoor to set diagnostics sample rate // by calling amplitude._setDiagnosticsSampleRate(1); before amplitude.init() _diagnosticsSampleRate = 0; init(apiKey = '', userIdOrOptions?: string | BrowserOptions, maybeOptions?: BrowserOptions) { let userId: string | undefined; let options: BrowserOptions | undefined; if (arguments.length > 2) { userId = userIdOrOptions as string | undefined; options = maybeOptions; } else { if (typeof userIdOrOptions === 'string') { userId = userIdOrOptions; options = undefined; } else { userId = userIdOrOptions?.userId; options = userIdOrOptions; } } return returnWrapper(this._init({ ...options, userId, apiKey })); } protected async _init(options: BrowserOptions & { apiKey: string }) { // Step 1: Block concurrent initialization if (this.initializing) { return; } this.initializing = true; // Step 2: Create browser config // Step 2.1: Determine if we should fetch remote config BEFORE creating browser config // This allows us to get diagnostics settings before creating the DiagnosticsClient const fetchRemoteConfig = shouldFetchRemoteConfig(options); // Set up early dependencies needed for remote config client // These use options directly or fall back to defaults const loggerProvider = options.loggerProvider ?? new Logger(); if (!options.loggerProvider) { loggerProvider.enable(options.logLevel ?? LogLevel.Warn); } const serverZone = options.serverZone ?? DEFAULT_SERVER_ZONE; let remoteConfigClient: IRemoteConfigClient | undefined; let diagnosticsSampleRate = this._diagnosticsSampleRate; let enableDiagnostics = options.enableDiagnostics ?? true; // Step 2.2: Fetch diagnostics config FIRST to get sample rate for DiagnosticsClient // We want to create DiagnosticsClient as early as possible so it can track more data /* istanbul ignore next */ if (fetchRemoteConfig) { remoteConfigClient = new RemoteConfigClient( options.apiKey, loggerProvider, serverZone, /* istanbul ignore next */ options.remoteConfig?.serverUrl, ); // Fetch diagnostics config first to get sample rate await new Promise((resolve) => { // Disable coverage for this line because remote config client will always be defined in this case. // istanbul ignore next remoteConfigClient?.subscribe( 'configs.diagnostics.browserSDK', 'all', (remoteConfig: RemoteConfig | null, source: Source, lastFetch: Date) => { loggerProvider.debug( 'Diagnostics remote configuration received:', JSON.stringify( { remoteConfig, source, lastFetch, }, null, 2, ), ); if (remoteConfig) { // Validate and set sampleRate (must be a valid number) const sampleRate = remoteConfig.sampleRate as number; if (typeof sampleRate === 'number' && !isNaN(sampleRate)) { diagnosticsSampleRate = sampleRate; } // Validate and set enabled (must be a boolean) const enabled = remoteConfig.enabled as boolean; if (typeof enabled === 'boolean') { enableDiagnostics = enabled; } } resolve(); }, ); }); } // Step 2.3: Initialize diagnostics client as early as possible // Now we have the sample rate from remote config (if fetched) const diagnosticsClient = new DiagnosticsClient(options.apiKey, loggerProvider, serverZone, { enabled: enableDiagnostics, sampleRate: diagnosticsSampleRate, }); diagnosticsClient.setTag('library', `${LIBPREFIX}/${VERSION}`); if (typeof navigator !== 'undefined') { diagnosticsClient.setTag('user_agent', navigator.userAgent); } // Step 2.4: Create browser config with diagnosticsClient and earlyConfig // earlyConfig ensures consistent logger/serverZone/diagnostics settings across all components const browserOptions = await useBrowserConfig(options.apiKey, options, this, diagnosticsClient, { loggerProvider, serverZone, enableDiagnostics, diagnosticsSampleRate, }); // Step 2.5: Fetch analytics SDK remote config // This is fetched after DiagnosticsClient is created so diagnostics can track any issues /* istanbul ignore next */ if (fetchRemoteConfig && remoteConfigClient) { await new Promise((resolve) => { // Disable coverage for this line because remote config client will always be defined in this case. // istanbul ignore next remoteConfigClient?.subscribe( 'configs.analyticsSDK.browserSDK', 'all', (remoteConfig: RemoteConfig | null, source: Source, lastFetch: Date) => { browserOptions.loggerProvider.debug( 'Remote configuration received:', JSON.stringify( { remoteConfig, source, lastFetch, }, null, 2, ), ); if (remoteConfig) { updateBrowserConfigWithRemoteConfig(remoteConfig, browserOptions); } // Resolve the promise on first callback (initial config) resolve(); }, ); }); } await super._init(browserOptions); this.logBrowserOptions(browserOptions); this.config.remoteConfigClient = remoteConfigClient; const attributionTrackingOptions = getAttributionTrackingConfig(this.config); // Add web attribution plugin if ( isAttributionTrackingEnabled(this.config.defaultTracking) && isUserPropertyAttributionEnabled(attributionTrackingOptions) ) { if (this.config.optOut) { this.timeline.addOptOutListener(async (optOut) => { if (!optOut) { this.webAttribution = new WebAttribution(attributionTrackingOptions, this.config); await this.webAttribution.init(); } }); } this.webAttribution = new WebAttribution(attributionTrackingOptions, this.config); // Fetch the current campaign, check if need to track web attribution later await this.webAttribution.init(); } // Step 3: Set session ID // Priority 1: `options.sessionId` // Priority 2: sessionId from url if it's Number and ampTimestamp is valid // Priority 3: last known sessionId from user identity storage // Default: `Date.now()` // Session ID is handled differently than device ID and user ID due to session events const queryParams = getQueryParams(); // Check if ampTimestamp is present and valid const ampTimestamp = queryParams.ampTimestamp ? Number(queryParams.ampTimestamp) : undefined; const isWithinTimeLimit = ampTimestamp ? Date.now() < ampTimestamp : true; // check if we need to set the sessionId const querySessionId = isWithinTimeLimit && !Number.isNaN(Number(queryParams.ampSessionId)) ? Number(queryParams.ampSessionId) : undefined; let deferredSessionId = this.config.deferredSessionId; if (deferredSessionId === UNSPECIFIED_SESSION_ID && !this.config.optOut) { deferredSessionId = Date.now(); } this.setSessionId(options.sessionId ?? querySessionId ?? deferredSessionId ?? this.config.sessionId); if (this.config.optOut) { this.timeline.addOptOutListener(async (optOut) => { if (!optOut && this.config.deferredSessionId) { if (this.config.deferredSessionId === UNSPECIFIED_SESSION_ID) { this.setSessionId(undefined); } else { this.setSessionId(this.config.deferredSessionId); } } }); } // Set up the analytics connector to integrate with the experiment SDK. // Send events from the experiment SDK and forward identifies to the // identity store. const connector = getAnalyticsConnector(options.instanceName); connector.identityStore.setIdentity({ userId: this.config.userId, deviceId: this.config.deviceId, }); // Step 4: Install plugins // Do not track any events before this if (this.config.offline !== OfflineDisabled) { await this.add(networkConnectivityCheckerPlugin()).promise; } await this.add(new Destination({ diagnosticsClient })).promise; await this.add(new Context()).promise; await this.add(new IdentityEventSender()).promise; // Notify if DET is enabled detNotify(this.config); if (isFileDownloadTrackingEnabled(this.config.defaultTracking)) { this.config.loggerProvider.debug('Adding file download tracking plugin'); await this.add(fileDownloadTracking()).promise; } if (isFormInteractionTrackingEnabled(this.config.defaultTracking)) { this.config.loggerProvider.debug('Adding form interaction plugin'); await this.add(formInteractionTracking()).promise; } // Add page view plugin if (isPageViewTrackingEnabled(this.config.defaultTracking)) { if (!this.config.optOut) { this.config.loggerProvider.debug('Adding page view tracking plugin'); await this.add(pageViewTrackingPlugin(getPageViewTrackingConfig(this.config))).promise; } else { this.timeline.addOptOutListener(async (optOut) => { /* istanbul ignore if */ if (optOut) { return; } this.config.loggerProvider.debug('Adding page view tracking plugin'); await this.add(pageViewTrackingPlugin(getPageViewTrackingConfig(this.config))).promise; }); } } if ( isAttributionTrackingEnabled(this.config.defaultTracking) && isEventPropertyAttributionEnabled(attributionTrackingOptions) ) { this.config.loggerProvider.debug('Adding event property attribution plugin'); await this.add(eventPropertyTrackingPlugin(attributionTrackingOptions)).promise; } if (isElementInteractionsEnabled(this.config.autocapture)) { this.config.loggerProvider.debug('Adding user interactions plugin (autocapture plugin)'); await this.add(autocapturePlugin(getElementInteractionsConfig(this.config), { diagnosticsClient })).promise; } if (isFrustrationInteractionsEnabled(this.config.autocapture)) { this.config.loggerProvider.debug('Adding frustration interactions plugin'); await this.add(frustrationPlugin(getFrustrationInteractionsConfig(this.config))).promise; } if (isNetworkTrackingEnabled(this.config.autocapture)) { this.config.loggerProvider.debug('Adding network tracking plugin'); await this.add(networkCapturePlugin(getNetworkTrackingConfig(this.config))).promise; } if (isWebVitalsEnabled(this.config.autocapture)) { this.config.loggerProvider.debug('Adding web vitals plugin'); await this.add(webVitalsPlugin()).promise; } if (isPerformanceTrackingEnabled(this.config.autocapture)) { this.config.loggerProvider.debug('Adding performance tracking plugin'); await this.add(performancePlugin(getPerformanceTrackingConfig(this.config))).promise; } if (isPageUrlEnrichmentEnabled(this.config.autocapture)) { this.config.loggerProvider.debug('Adding referrer page url plugin'); await this.add(pageUrlEnrichmentPlugin()).promise; } if (isCustomEnrichmentEnabled(this.config.customEnrichment)) { this.config.loggerProvider.debug('Adding custom enrichment plugin'); await this.add(customEnrichmentPlugin()).promise; } this.initializing = false; // Step 6: Run queued dispatch functions await this.runQueuedFunctions('dispatchQ'); // Step 7: Add the event receiver after running remaining queued functions. connector.eventBridge.setEventReceiver((event) => { const { time, ...cleanEventProperties } = event.eventProperties || {}; const eventOptions = typeof time === 'number' ? { time } : undefined; void this.track(event.eventType, cleanEventProperties, eventOptions); }); } getUserId() { return this.config?.userId; } setUserId(userId: string | undefined) { if (!this.config) { this.q.push(this.setUserId.bind(this, userId)); return; } this.config.loggerProvider.debug('function setUserId: ', userId); if (userId !== this.config.userId || userId === undefined) { this.config.userId = userId; // eslint-disable-next-line @typescript-eslint/no-unsafe-call this.timeline.onIdentityChanged({ userId: userId }); setConnectorUserId(userId, this.config.instanceName); } } getDeviceId() { return this.config?.deviceId; } setDeviceId(deviceId: string) { if (!this.config) { this.q.push(this.setDeviceId.bind(this, deviceId)); return; } this.config.loggerProvider.debug('function setDeviceId: ', deviceId); if (deviceId !== this.config.deviceId) { this.config.deviceId = deviceId; // eslint-disable-next-line @typescript-eslint/no-unsafe-call this.timeline.onIdentityChanged({ deviceId: deviceId }); setConnectorDeviceId(deviceId, this.config.instanceName); } } reset() { this.setDeviceId(UUID()); this.setUserId(undefined); this.timeline.onReset(); } getIdentity() { return { deviceId: this.config?.deviceId, userId: this.config?.userId, userProperties: this.userProperties, }; } setIdentity(identity: Partial) { // Handle userId change if ('userId' in identity) { this.setUserId(identity.userId); } // Handle deviceId change if ('deviceId' in identity && identity.deviceId) { this.setDeviceId(identity.deviceId); } // Handle userProperties change - auto-send identify if ('userProperties' in identity) { this.userProperties = identity.userProperties; // Auto-send identify event with $set operations const identifyObj = new Identify(); // istanbul ignore next const userProperties = identity.userProperties ?? {}; for (const [key, value] of Object.entries(userProperties)) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment // eslint-disable-next-line @typescript-eslint/no-unsafe-argument identifyObj.set(key, value); } // The identify event processing in core-client already calls onIdentityChanged, // so we don't need to call it explicitly here to avoid duplicate notifications. this.identify(identifyObj); } } getOptOut(): boolean | undefined { return this.config?.optOut; } getSessionId() { return this.config?.sessionId; } setSessionId(sessionId: number | undefined) { const promises: Promise[] = []; if (!this.config) { this.q.push(this.setSessionId.bind(this, sessionId)); return returnWrapper(Promise.resolve()); } // do not start a new session if optOut is true if (this.config.optOut) { // save the sessionId to storage to be used when optOut is false this.config.deferredSessionId = sessionId ?? UNSPECIFIED_SESSION_ID; return returnWrapper(Promise.resolve()); } // default sessionId to current time if (sessionId === undefined) { sessionId = Date.now(); } // Prevents starting a new session with the same session ID if (sessionId === this.config.sessionId) { return returnWrapper(Promise.resolve()); } this.config.loggerProvider.debug('function setSessionId: ', sessionId); const previousSessionId = this.getSessionId(); if (previousSessionId !== sessionId) { // eslint-disable-next-line @typescript-eslint/no-unsafe-call this.timeline.onSessionIdChanged(sessionId); } const lastEventTime = this.config.lastEventTime; let lastEventId = this.config.lastEventId ?? -1; this.config.sessionId = sessionId; this.config.lastEventTime = undefined; this.config.pageCounter = 0; if (isSessionTrackingEnabled(this.config.defaultTracking)) { if (previousSessionId && lastEventTime) { promises.push( this.track(DEFAULT_SESSION_END_EVENT, undefined, { device_id: this.previousSessionDeviceId, event_id: ++lastEventId, session_id: previousSessionId, time: lastEventTime + 1, user_id: this.previousSessionUserId, }).promise, ); } this.config.lastEventTime = this.config.sessionId; } // Fire web attribution event when enable webAttribution tracking // 1. has new campaign (call setSessionId from init function) // 2. or shouldTrackNewCampaign (call setSessionId from async process(event) when there has new campaign and resetSessionOnNewCampaign = true ) const isCampaignEventTracked = this.trackCampaignEventIfNeeded(++lastEventId, promises); // track the identify event if an Identify object is provided in the config if (this.config.identify) { promises.push(this.track(createIdentifyEvent(this.config.identify)).promise); } if (isSessionTrackingEnabled(this.config.defaultTracking)) { promises.push( this.track(DEFAULT_SESSION_START_EVENT, undefined, { event_id: isCampaignEventTracked ? ++lastEventId : lastEventId, session_id: this.config.sessionId, time: this.config.lastEventTime, }).promise, ); } this.previousSessionDeviceId = this.config.deviceId; this.previousSessionUserId = this.config.userId; return returnWrapper(Promise.all(promises)); } extendSession() { if (!this.config) { this.q.push(this.extendSession.bind(this)); return; } this.config.lastEventTime = Date.now(); } setTransport(transport: TransportTypeOrOptions) { if (!this.config) { this.q.push(this.setTransport.bind(this, transport)); return; } this.config.transportProvider = createTransport(transport); } identify(identify: IIdentify, eventOptions?: EventOptions) { if (isInstanceProxy(identify)) { const queue = identify._q; identify._q = []; identify = convertProxyObjectToRealObject(new Identify(), queue); } if (eventOptions?.user_id) { this.setUserId(eventOptions.user_id); } if (eventOptions?.device_id) { this.setDeviceId(eventOptions.device_id); } return super.identify(identify, eventOptions); } groupIdentify(groupType: string, groupName: string | string[], identify: IIdentify, eventOptions?: EventOptions) { if (isInstanceProxy(identify)) { const queue = identify._q; identify._q = []; identify = convertProxyObjectToRealObject(new Identify(), queue); } return super.groupIdentify(groupType, groupName, identify, eventOptions); } revenue(revenue: IRevenue, eventOptions?: EventOptions) { if (isInstanceProxy(revenue)) { const queue = revenue._q; revenue._q = []; revenue = convertProxyObjectToRealObject(new Revenue(), queue); } return super.revenue(revenue, eventOptions); } private trackCampaignEventIfNeeded(lastEventId?: number, promises?: Promise[]) { if ( !this.webAttribution || !this.webAttribution.shouldTrackNewCampaign || !isUserPropertyAttributionEnabled(this.webAttribution.options) ) { return false; } const campaignEvent = this.webAttribution.generateCampaignEvent(lastEventId); if (promises) { promises.push(this.track(campaignEvent).promise); } else { this.track(campaignEvent); } this.config.loggerProvider.log('Tracking attribution.'); return true; } async process(event: Event) { const currentTime = Date.now(); const isEventInNewSession = isNewSession(this.config.sessionTimeout, this.config.lastEventTime); const shouldSetSessionIdOnNewCampaign = this.webAttribution && this.webAttribution.shouldSetSessionIdOnNewCampaign(); if ( event.event_type !== DEFAULT_SESSION_START_EVENT && event.event_type !== DEFAULT_SESSION_END_EVENT && (!event.session_id || event.session_id === this.getSessionId()) ) { if (isEventInNewSession || shouldSetSessionIdOnNewCampaign) { this.setSessionId(currentTime); if (shouldSetSessionIdOnNewCampaign) { this.config.loggerProvider.log('Created a new session for new campaign.'); } } else if (!isEventInNewSession) { // Web attribution should be tracked during the middle of a session // if there has been a chance in the campaign information. this.trackCampaignEventIfNeeded(); } } return super.process(event); } private logBrowserOptions(browserConfig: BrowserOptions & { apiKey: string }) { try { const browserConfigCopy = { ...browserConfig, apiKey: browserConfig.apiKey.substring(0, 10) + '********', }; this.config.loggerProvider.debug( 'Initialized Amplitude with BrowserConfig:', safeJsonStringify(browserConfigCopy), ); } catch (e) { /* istanbul ignore next */ this.config.loggerProvider.error('Error logging browser config', e); } } /** * @experimental * WARNING: This method is for internal testing only and is not part of the public API. * It may be changed or removed at any time without notice. * * Sets the diagnostics sample rate before amplitude.init() * @param sampleRate - The sample rate to set */ _setDiagnosticsSampleRate(sampleRate: number): void { if (sampleRate > 1 || sampleRate < 0) { return; } // Set diagnostics sample rate before initializing the config if (!this.config) { this._diagnosticsSampleRate = sampleRate; return; } } } ================================================ FILE: packages/analytics-browser/src/config/joined-config.ts ================================================ import { AutocaptureOptions, type ElementInteractionsOptions, BrowserConfig, CustomEnrichmentOptions, RemoteConfig, NetworkTrackingOptions, NetworkCaptureRule, SAFE_HEADERS, } from '@amplitude/analytics-core'; export interface AutocaptureOptionsRemoteConfig extends AutocaptureOptions { elementInteractions?: boolean | ElementInteractionsOptionsRemoteConfig; networkTracking?: boolean | NetworkTrackingOptionsRemoteConfig; } export interface ElementInteractionsOptionsRemoteConfig extends ElementInteractionsOptions { /** * Related to pageUrlAllowlist but holds regex strings which will be initialized and appended to pageUrlAllowlist */ pageUrlAllowlistRegex?: string[]; } export interface NetworkCaptureRuleRemoteConfig extends NetworkCaptureRule { /** * Related to urls but holds regex strings which will be initialized and appended to urls */ urlsRegex?: string[]; } export interface NetworkTrackingOptionsRemoteConfig extends NetworkTrackingOptions { /** * Related to pageUrlAllowlist but holds regex strings which will be initialized and appended to pageUrlAllowlist */ captureRules?: NetworkCaptureRuleRemoteConfig[]; } // Type alias for the remote config structure we expect (this is what comes from the filtered browserSDK config) type RemoteConfigBrowserSDK = { autocapture?: AutocaptureOptionsRemoteConfig | boolean; customEnrichment?: CustomEnrichmentOptions | boolean; }; /** * Performs a deep transformation of a remote config object so that * it matches the expected schema of the local config. * * Specifically, it normalizes nested `enabled` flags into concise union types. * * ### Transformation Rules: * - If an object has `enabled: true`, it is replaced by the same object without the `enabled` field. * - If it has only `enabled: true`, it is replaced with `true`. * - If it has `enabled: false`, it is replaced with `false` regardless of other fields. * * ### Examples: * Input: { prop: { enabled: true, hello: 'world' }} * Output: { prop: { hello: 'world' } } * * Input: { prop: { enabled: true }} * Output: { prop: true } * * Input: { prop: { enabled: false, hello: 'world' }} * Output: { prop: false } * * Input: { prop: { hello: 'world' }} * Output: { prop: { hello: 'world' } } // No change * * @param config Remote config object to be transformed * @returns Transformed config object compatible with local schema */ export function translateRemoteConfigToLocal(config?: Record) { // Disabling type checking rules because remote config comes from a remote source // and this function needs to handle any unexpected values /* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-argument */ if (typeof config !== 'object' || config === null) { return; } // translations are not applied on array properties if (Array.isArray(config)) { return; } const propertyNames = Object.keys(config); for (const propertyName of propertyNames) { try { const value = config[propertyName]; // transform objects with { enabled } property to boolean | object if (typeof value?.enabled === 'boolean') { if (value.enabled) { // if enabled is true, set the value to the rest of the object // or true if the object has no other properties delete value.enabled; if (Object.keys(value).length === 0) { (config as any)[propertyName] = true; } } else { // If enabled is false, set the value to false (config as any)[propertyName] = false; } } // recursively translate properties of the value translateRemoteConfigToLocal(value as Record); } catch (e) { // a failure here means that an accessor threw an error // so don't translate it // TODO(diagnostics): add a diagnostic event for this } } // translate remote responseHeaders and requestHeaders to local responseHeaders and requestHeaders try { if (config.autocapture?.networkTracking?.captureRules?.length) { for (const rule of config.autocapture.networkTracking.captureRules) { for (const header of ['responseHeaders', 'requestHeaders']) { const { captureSafeHeaders, allowlist } = rule[header] ?? {}; if (!captureSafeHeaders && !allowlist) { continue; } // if allowlist is not an array, remote config contract is violated, remove it if (allowlist !== undefined && !Array.isArray(allowlist)) { delete rule[header]; continue; } rule[header] = [...(captureSafeHeaders ? SAFE_HEADERS : []), ...(allowlist ?? [])]; } } } } catch (e) { /* istanbul ignore next */ // surprise exception, so don't translate it } // translate frustrationInteractions pluralization const frustrationInteractions = config.autocapture?.frustrationInteractions; if (frustrationInteractions) { if (frustrationInteractions.rageClick) { frustrationInteractions.rageClicks = frustrationInteractions.rageClick; delete frustrationInteractions.rageClick; } if (frustrationInteractions.deadClick) { frustrationInteractions.deadClicks = frustrationInteractions.deadClick; delete frustrationInteractions.deadClick; } } // normalize viewportContentUpdated inside elementInteractions try { const elementInteractions = config.autocapture?.elementInteractions; if (elementInteractions && typeof elementInteractions === 'object') { // { enabled: true } (no other fields) collapses to `true`; convert back to {} for the SDK. if (elementInteractions.viewportContentUpdated === true) { elementInteractions.viewportContentUpdated = {}; } // { enabled: false, ... } collapses to `false`; convert back to { enabled: false } for the SDK. if (elementInteractions.viewportContentUpdated === false) { elementInteractions.viewportContentUpdated = { enabled: false }; } // Migrate deprecated top-level exposureDuration to viewportContentUpdated.exposureDuration if (elementInteractions.exposureDuration !== undefined) { const viewportContentUpdated = elementInteractions.viewportContentUpdated; if (viewportContentUpdated === undefined) { elementInteractions.viewportContentUpdated = { exposureDuration: elementInteractions.exposureDuration }; } else if ( typeof viewportContentUpdated === 'object' && viewportContentUpdated.exposureDuration === undefined && viewportContentUpdated.enabled !== false ) { viewportContentUpdated.exposureDuration = elementInteractions.exposureDuration; } delete elementInteractions.exposureDuration; } } } catch (e) { /* istanbul ignore next */ // surprise exception, so don't translate it } } function mergeUrls(urlsExact: (string | RegExp)[], urlsRegex: string[] | undefined, browserConfig: BrowserConfig) { // Convert string patterns to RegExp objects, warn on invalid patterns and skip them const regexList = []; for (const pattern of urlsRegex ?? []) { try { regexList.push(new RegExp(pattern)); } catch (regexError) { browserConfig.loggerProvider.warn(`Invalid regex pattern: ${pattern}`, regexError); } } return urlsExact.concat(regexList); } /** * Updates the browser config in place by applying remote configuration settings. * Primarily merges autocapture settings from the remote config into the browser config. * * @param remoteConfig - The remote configuration to apply, or null if none available * @param browserConfig - The browser config object to update (modified in place) */ export function updateBrowserConfigWithRemoteConfig( remoteConfig: RemoteConfig | null, browserConfig: BrowserConfig, ): void { if (!remoteConfig) { return; } // translate remote config to local compatible format translateRemoteConfigToLocal(remoteConfig); try { browserConfig.loggerProvider.debug( 'Update browser config with remote configuration:', JSON.stringify(remoteConfig), ); // type cast error will be thrown if remoteConfig is not a valid RemoteConfigBrowserSDK // and it will be caught by the try-catch block const typedRemoteConfig = remoteConfig as RemoteConfigBrowserSDK; // merge remoteConfig.autocapture and browserConfig.autocapture // if a field is in remoteConfig.autocapture, use that value // if a field is not in remoteConfig.autocapture, use the value from browserConfig.autocapture if (typedRemoteConfig && 'autocapture' in typedRemoteConfig) { if (typeof typedRemoteConfig.autocapture === 'boolean') { browserConfig.autocapture = typedRemoteConfig.autocapture; } if (typeof typedRemoteConfig.autocapture === 'object' && typedRemoteConfig.autocapture !== null) { const transformedAutocaptureRemoteConfig = { ...typedRemoteConfig.autocapture }; if (browserConfig.autocapture === undefined) { browserConfig.autocapture = typedRemoteConfig.autocapture; } // Handle Element Interactions config initialization if ( typeof typedRemoteConfig.autocapture.elementInteractions === 'object' && typedRemoteConfig.autocapture.elementInteractions !== null && typedRemoteConfig.autocapture.elementInteractions.pageUrlAllowlistRegex?.length ) { transformedAutocaptureRemoteConfig.elementInteractions = { ...typedRemoteConfig.autocapture.elementInteractions, }; const transformedRcElementInteractions = transformedAutocaptureRemoteConfig.elementInteractions; // combine exact allow list and regex allow list into just 'pageUrlAllowlist' const exactAllowList = transformedRcElementInteractions.pageUrlAllowlist ?? []; const urlsRegex = typedRemoteConfig.autocapture.elementInteractions.pageUrlAllowlistRegex; transformedRcElementInteractions.pageUrlAllowlist = mergeUrls(exactAllowList, urlsRegex, browserConfig); // clean up the regex allow list delete transformedRcElementInteractions.pageUrlAllowlistRegex; } // Handle Network Tracking config initialization if ( typeof typedRemoteConfig.autocapture.networkTracking === 'object' && typedRemoteConfig.autocapture.networkTracking !== null && typedRemoteConfig.autocapture.networkTracking.captureRules?.length ) { transformedAutocaptureRemoteConfig.networkTracking = { ...typedRemoteConfig.autocapture.networkTracking, }; const transformedRcNetworkTracking = transformedAutocaptureRemoteConfig.networkTracking; /* istanbul ignore next */ const captureRules = transformedRcNetworkTracking.captureRules ?? []; for (const rule of captureRules) { rule.urls = mergeUrls(rule.urls ?? [], rule.urlsRegex, browserConfig); delete rule.urlsRegex; } } if (typeof browserConfig.autocapture === 'boolean') { browserConfig.autocapture = { attribution: browserConfig.autocapture, fileDownloads: browserConfig.autocapture, formInteractions: browserConfig.autocapture, pageViews: browserConfig.autocapture, sessions: browserConfig.autocapture, elementInteractions: browserConfig.autocapture, webVitals: browserConfig.autocapture, frustrationInteractions: browserConfig.autocapture, ...transformedAutocaptureRemoteConfig, }; } if (typeof browserConfig.autocapture === 'object') { browserConfig.autocapture = { ...browserConfig.autocapture, ...transformedAutocaptureRemoteConfig, }; } } // Override default tracking options if autocapture is updated by remote config browserConfig.defaultTracking = browserConfig.autocapture; } if ('customEnrichment' in typedRemoteConfig && typedRemoteConfig.customEnrichment !== null) { // Respect a locally-explicit false: if the user disabled custom enrichment at init time, // remote config must not re-enable it. if (browserConfig.customEnrichment !== false) { browserConfig.customEnrichment = typedRemoteConfig.customEnrichment; } } browserConfig.loggerProvider.debug('Browser config after remote config update:', JSON.stringify(browserConfig)); } catch (e) { browserConfig.loggerProvider.error('Failed to apply remote configuration because of error: ', e); } } ================================================ FILE: packages/analytics-browser/src/config.ts ================================================ import { Config, Logger, ILogger, LogLevel, Event, Storage, IngestionMetadata, ServerZoneType, OfflineDisabled, Plan, IdentityStorageType, TransportTypeOrOptions, MemoryStorage, UUID, CookieStorage, getCookieName, getQueryParams, UserSession, BrowserOptions, BrowserConfig as IBrowserConfig, DefaultTrackingOptions, TrackingOptions, AutocaptureOptions, CookieOptions, RemoteConfigOptions, NetworkTrackingOptions, CustomEnrichmentOptions, IIdentify, IDiagnosticsClient, isDomainEqual, CookieStorageConfig, decodeCookieValue, } from '@amplitude/analytics-core'; import { LocalStorage } from './storage/local-storage'; import { SessionStorage } from './storage/session-storage'; import { XHRTransport } from './transports/xhr'; import { FetchTransport } from './transports/fetch'; import { SendBeaconTransport } from './transports/send-beacon'; import { parseLegacyCookies } from './cookie-migration'; import { DEFAULT_IDENTITY_STORAGE, DEFAULT_SERVER_ZONE } from './constants'; import { AmplitudeBrowser } from './browser-client'; import { VERSION } from './version'; import { getDomain, KNOWN_2LDS } from './attribution/helpers'; // Exported for testing purposes only. Do not expose to public interface. export class BrowserConfig extends Config implements IBrowserConfig { public readonly version = VERSION; protected _cookieStorage: Storage; protected _deviceId?: string; protected _lastEventId?: number; protected _lastEventTime?: number; protected _optOut = false; protected _sessionId?: number; protected _deferredSessionId?: number; protected _userId?: string; protected _pageCounter?: number; protected _debugLogsEnabled?: boolean; constructor( public apiKey: string, public appVersion?: string, cookieStorage: Storage = new MemoryStorage(), public cookieOptions: CookieOptions = { domain: '', expiration: 365, sameSite: 'Lax' as const, secure: false, upgrade: true, }, public defaultTracking?: boolean | DefaultTrackingOptions, public autocapture?: boolean | AutocaptureOptions, deviceId?: string, public flushIntervalMillis: number = 1000, public flushMaxRetries: number = 5, public flushQueueSize: number = 30, public identityStorage: IdentityStorageType = DEFAULT_IDENTITY_STORAGE, public ingestionMetadata?: IngestionMetadata, public instanceName?: string, lastEventId?: number, lastEventTime?: number, public loggerProvider: ILogger = new Logger(), public logLevel: LogLevel = LogLevel.Warn, public minIdLength?: number, public offline: boolean | typeof OfflineDisabled = false, optOut = false, public partnerId?: string, public plan?: Plan, public serverUrl: string = '', public serverZone: ServerZoneType = DEFAULT_SERVER_ZONE, sessionId?: number, deferredSessionId?: number, public sessionTimeout: number = 30 * 60 * 1000, public storageProvider: Storage = new LocalStorage({ loggerProvider }), public trackingOptions: Required = { ipAddress: true, language: true, platform: true, }, public transport: TransportTypeOrOptions = 'fetch', public useBatch: boolean = false, public fetchRemoteConfig: boolean = true, userId?: string, pageCounter?: number, debugLogsEnabled?: boolean, public networkTrackingOptions?: NetworkTrackingOptions, public identify?: IIdentify, public enableDiagnostics: boolean = true, public diagnosticsSampleRate: number = 0, public diagnosticsClient?: IDiagnosticsClient, public remoteConfig?: RemoteConfigOptions, public topLevelDomain?: string, public enableRequestBodyCompression: boolean = false, public customEnrichment?: boolean | CustomEnrichmentOptions, ) { super({ apiKey, storageProvider, transportProvider: createTransport(transport) }); this._cookieStorage = cookieStorage; this.deviceId = deviceId; this.lastEventId = lastEventId; this.lastEventTime = lastEventTime; this.optOut = optOut; this.deferredSessionId = deferredSessionId; this.sessionId = sessionId; this.pageCounter = pageCounter; this.userId = userId; this.debugLogsEnabled = debugLogsEnabled; this.loggerProvider.enable(debugLogsEnabled ? LogLevel.Debug : this.logLevel); this.networkTrackingOptions = networkTrackingOptions; this.identify = identify; this.enableDiagnostics = enableDiagnostics; this.diagnosticsSampleRate = diagnosticsSampleRate; this.diagnosticsClient = diagnosticsClient; // Note: The canonical logic for determining fetchRemoteConfig is in shouldFetchRemoteConfig(). // This logic is duplicated here to maintain the BrowserConfig constructor contract and ensure // the config object has the correct fetchRemoteConfig value set on its properties. // The value passed to this constructor should already be computed via shouldFetchRemoteConfig(). const _fetchRemoteConfig = remoteConfig?.fetchRemoteConfig ?? fetchRemoteConfig; this.remoteConfig = this.remoteConfig || {}; this.remoteConfig.fetchRemoteConfig = _fetchRemoteConfig; this.fetchRemoteConfig = _fetchRemoteConfig; this.topLevelDomain = topLevelDomain || getDomain(); } get cookieStorage() { return this._cookieStorage; } set cookieStorage(cookieStorage: Storage) { if (this._cookieStorage !== cookieStorage) { this._cookieStorage = cookieStorage; this.updateStorage(); } } get deviceId() { return this._deviceId; } set deviceId(deviceId: string | undefined) { if (this._deviceId !== deviceId) { this._deviceId = deviceId; this.updateStorage(); } } get userId() { return this._userId; } set userId(userId: string | undefined) { if (this._userId !== userId) { this._userId = userId; this.updateStorage(); } } get sessionId() { return this._sessionId; } set sessionId(sessionId: number | undefined) { if (this._sessionId !== sessionId) { this._sessionId = sessionId; // Clear deferredSessionId when sessionId is set to prevent stale values // from overriding legitimate sessionIds on subsequent page loads if (sessionId !== undefined && this._deferredSessionId !== undefined) { this._deferredSessionId = undefined; } this.updateStorage(); } } get deferredSessionId() { return this._deferredSessionId; } set deferredSessionId(deferredSessionId: number | undefined) { if (this._deferredSessionId !== deferredSessionId && deferredSessionId !== this.sessionId) { this._deferredSessionId = deferredSessionId; this.updateStorage(); } } get optOut() { return this._optOut; } set optOut(optOut: boolean) { if (this._optOut !== optOut) { this._optOut = optOut; this.updateStorage(); } } get lastEventTime() { return this._lastEventTime; } set lastEventTime(lastEventTime: number | undefined) { if (this._lastEventTime !== lastEventTime) { this._lastEventTime = lastEventTime; this.updateStorage(); } } get lastEventId() { return this._lastEventId; } set lastEventId(lastEventId: number | undefined) { if (this._lastEventId !== lastEventId) { this._lastEventId = lastEventId; this.updateStorage(); } } get pageCounter() { return this._pageCounter; } set pageCounter(pageCounter: number | undefined) { if (this._pageCounter !== pageCounter) { this._pageCounter = pageCounter; this.updateStorage(); } } set debugLogsEnabled(debugLogsEnabled: boolean | undefined) { if (this._debugLogsEnabled !== debugLogsEnabled) { this._debugLogsEnabled = debugLogsEnabled; this.updateStorage(); } } private updateStorage() { const cache = { deviceId: this._deviceId, userId: this._userId, sessionId: this._sessionId, deferredSessionId: this._deferredSessionId, optOut: this._optOut, lastEventTime: this._lastEventTime, lastEventId: this._lastEventId, pageCounter: this._pageCounter, debugLogsEnabled: this._debugLogsEnabled, cookieDomain: undefined as string | undefined, }; if (this.cookieStorage instanceof CookieStorage) { cache.cookieDomain = this.cookieStorage.options.domain; } void this.cookieStorage.set(getCookieName(this.apiKey), cache); } } /** * Early-initialized configuration values that are determined before useBrowserConfig is called. * These are created early to support DiagnosticsClient and RemoteConfigClient initialization. */ export interface EarlyConfig { /** Logger instance - shared across DiagnosticsClient, RemoteConfigClient, and BrowserConfig */ loggerProvider: ILogger; /** Server zone for API endpoints */ serverZone: ServerZoneType; /** Whether diagnostics is enabled (may come from remote config) */ enableDiagnostics: boolean; /** Diagnostics sample rate (may come from remote config) */ diagnosticsSampleRate: number; } export const useBrowserConfig = async ( apiKey: string, options: BrowserOptions = {}, amplitudeInstance: AmplitudeBrowser, diagnosticsClient?: IDiagnosticsClient, earlyConfig?: EarlyConfig, ): Promise => { // Step 1: Create identity storage instance const identityStorage = options.identityStorage || DEFAULT_IDENTITY_STORAGE; let defaultCookieDomain = ''; // use the getTopLevelDomain function to find the TLD only if identity storage // is cookie (because getTopLevelDomain() uses cookies) AND cookie option domain is not set if ( identityStorage === DEFAULT_IDENTITY_STORAGE && !options.cookieOptions?.domain && options.cookieOptions?.domain !== '' ) { defaultCookieDomain = await getTopLevelDomain(undefined, diagnosticsClient); } const cookieOptions = { domain: options.cookieOptions?.domain ?? defaultCookieDomain, expiration: 365, sameSite: 'Lax' as const, secure: false, upgrade: true, ...options.cookieOptions, }; const cookieConfig: CookieStorageConfig = { // if more than one cookie with the same key exists, // look for the cookie that has the domain attribute set to cookieOptions.domain duplicateResolverFn: (value: string): boolean => { const decodedValue = decodeCookieValue(value); if (!decodedValue) { return false; } const parsed = JSON.parse(decodedValue) as UserSession; return isDomainEqual(parsed.cookieDomain, cookieOptions.domain); }, diagnosticsClient: diagnosticsClient, }; const cookieStorage = createCookieStorage(options.identityStorage, cookieOptions, cookieConfig); // Step 1: Parse cookies using identity storage instance const legacyCookies = await parseLegacyCookies(apiKey, cookieStorage, options.cookieOptions?.upgrade ?? true); const previousCookies = await cookieStorage.get(getCookieName(apiKey)); const queryParams = getQueryParams(); // Check if ampTimestamp is present and valid const ampTimestamp = queryParams.ampTimestamp ? Number(queryParams.ampTimestamp) : undefined; const isWithinTimeLimit = ampTimestamp ? Date.now() < ampTimestamp : true; // Step 3: Reconcile user identity const deviceId = options.deviceId ?? (isWithinTimeLimit ? queryParams.ampDeviceId ?? queryParams.deviceId : undefined) ?? previousCookies?.deviceId ?? legacyCookies.deviceId ?? UUID(); const lastEventId = previousCookies?.lastEventId ?? legacyCookies.lastEventId; const lastEventTime = previousCookies?.lastEventTime ?? legacyCookies.lastEventTime; const optOut = options.optOut ?? previousCookies?.optOut ?? legacyCookies.optOut; const sessionId = previousCookies?.sessionId ?? legacyCookies.sessionId; const deferredSessionId = previousCookies?.deferredSessionId; const userId = options.userId ?? previousCookies?.userId ?? legacyCookies.userId; amplitudeInstance.previousSessionDeviceId = previousCookies?.deviceId ?? legacyCookies.deviceId; amplitudeInstance.previousSessionUserId = previousCookies?.userId ?? legacyCookies.userId; const trackingOptions = { ipAddress: options.trackingOptions?.ipAddress ?? true, language: options.trackingOptions?.language ?? true, platform: options.trackingOptions?.platform ?? true, }; const pageCounter = previousCookies?.pageCounter; const debugLogsEnabled = previousCookies?.debugLogsEnabled; // Override default tracking options if autocapture is set if (options.autocapture !== undefined) { options.defaultTracking = options.autocapture; } const browserConfig = new BrowserConfig( apiKey, options.appVersion, cookieStorage, cookieOptions, options.defaultTracking, options.autocapture, deviceId, options.flushIntervalMillis, options.flushMaxRetries, options.flushQueueSize, identityStorage, options.ingestionMetadata, options.instanceName, lastEventId, lastEventTime, // Use earlyConfig.loggerProvider to ensure consistent logger across DiagnosticsClient/RemoteConfigClient/BrowserConfig earlyConfig?.loggerProvider ?? options.loggerProvider, options.logLevel, options.minIdLength, options.offline, optOut, options.partnerId, options.plan, options.serverUrl, // Use earlyConfig.serverZone to ensure consistent serverZone earlyConfig?.serverZone ?? options.serverZone, sessionId, deferredSessionId, options.sessionTimeout, options.storageProvider, trackingOptions, options.transport, options.useBatch, options.fetchRemoteConfig, userId, pageCounter, debugLogsEnabled, options.networkTrackingOptions, options.identify, // Use earlyConfig values (already has remote config applied), otherwise fall back to options earlyConfig?.enableDiagnostics ?? options.enableDiagnostics, earlyConfig?.diagnosticsSampleRate ?? amplitudeInstance._diagnosticsSampleRate, diagnosticsClient, options.remoteConfig, defaultCookieDomain, options.enableRequestBodyCompression, options.customEnrichment, ); if (!(await browserConfig.storageProvider.isEnabled())) { browserConfig.loggerProvider.warn( `Storage provider ${browserConfig.storageProvider.constructor.name} is not enabled. Falling back to MemoryStorage.`, ); browserConfig.storageProvider = new MemoryStorage(); } return browserConfig; }; export const createCookieStorage = ( identityStorage: IdentityStorageType = DEFAULT_IDENTITY_STORAGE, cookieOptions: CookieOptions = {}, cookieConfig?: CookieStorageConfig, ) => { switch (identityStorage) { case 'localStorage': return new LocalStorage(); case 'sessionStorage': return new SessionStorage(); case 'none': return new MemoryStorage(); case 'cookie': default: return new CookieStorage( { ...cookieOptions, expirationDays: cookieOptions.expiration, }, cookieConfig, ); } }; /** * Determines whether to fetch remote config based on options. * Extracted to allow early determination before useBrowserConfig is called. */ export const shouldFetchRemoteConfig = (options: BrowserOptions = {}): boolean => { if (options.remoteConfig?.fetchRemoteConfig === true) { // set to true if remoteConfig explicitly set to true return true; } else if (options.remoteConfig?.fetchRemoteConfig === false || options.fetchRemoteConfig === false) { // set to false if either are set to false explicitly return false; } else { // default to true if both undefined return true; } }; export const createTransport = (transport?: TransportTypeOrOptions) => { const type = typeof transport === 'object' ? transport.type : transport; const headers = typeof transport === 'object' ? transport.headers : undefined; if (type === 'xhr') { return new XHRTransport(headers); } if (type === 'beacon') { // SendBeacon does not support custom headers return new SendBeaconTransport(); } // Keep a browser-local fetch transport for gzip support. // TODO: Merge back to core FetchTransport after React Native supports gzip. return new FetchTransport(headers); }; export const getTopLevelDomain = async (url?: string, diagnosticsClient?: IDiagnosticsClient) => { if ( !(await new CookieStorage(undefined, { diagnosticsClient }).isEnabled()) || (!url && (typeof location === 'undefined' || !location.hostname)) ) { return ''; } const host = url ?? location.hostname; const parts = host.split('.'); // if hostname has less than 2 parts, it's not a registrable domain // and the browser won't allow setting domain-scoped cookies for it so return empty string if (parts.length === 1) { return ''; } const levels = []; let skipLevel = 1; // if the hostname ends with a TLD we know is in the Public Suffix List // then the last two parts are definitely not writable as a domain if (KNOWN_2LDS.find((tld) => host.endsWith(`.${tld}`))) { skipLevel = 2; } for (let i = parts.length - skipLevel - 1; i >= 0; --i) { levels.push(parts.slice(i).join('.')); } for (let i = 0; i < levels.length; i++) { const domain = levels[i]; try { const result = await CookieStorage.isDomainWritable(domain); // if the transaction succeeded, the domain is valid if (result) { return '.' + domain; } } catch (e) { /* istanbul ignore if */ if (diagnosticsClient) { diagnosticsClient.recordEvent('cookies.tld.failure', { reason: `Unexpected exception checking domain is writable: ${domain}`, error: e instanceof Error ? e.message : String(e), }); } } } // if the transaction failed, the domain is invalid // record a diagnostic event if (diagnosticsClient) { diagnosticsClient.recordEvent('cookies.tld.failure', { reason: `Could not determine TLD for host ${host}`, }); } // return an empty string to indicate that we couldn't determine the TLD // so fallback to host-only cookies (scoped to the current host) return ''; }; ================================================ FILE: packages/analytics-browser/src/constants.ts ================================================ import { IdentityStorageType, ServerZoneType } from '@amplitude/analytics-core'; export const DEFAULT_EVENT_PREFIX = '[Amplitude]'; export const DEFAULT_PAGE_VIEW_EVENT = `${DEFAULT_EVENT_PREFIX} Page Viewed`; export const DEFAULT_FORM_START_EVENT = `${DEFAULT_EVENT_PREFIX} Form Started`; export const DEFAULT_FORM_SUBMIT_EVENT = `${DEFAULT_EVENT_PREFIX} Form Submitted`; export const DEFAULT_FILE_DOWNLOAD_EVENT = `${DEFAULT_EVENT_PREFIX} File Downloaded`; export const DEFAULT_SESSION_START_EVENT = 'session_start'; export const DEFAULT_SESSION_END_EVENT = 'session_end'; export const FILE_EXTENSION = `${DEFAULT_EVENT_PREFIX} File Extension`; export const FILE_NAME = `${DEFAULT_EVENT_PREFIX} File Name`; export const LINK_ID = `${DEFAULT_EVENT_PREFIX} Link ID`; export const LINK_TEXT = `${DEFAULT_EVENT_PREFIX} Link Text`; export const LINK_URL = `${DEFAULT_EVENT_PREFIX} Link URL`; export const FORM_ID = `${DEFAULT_EVENT_PREFIX} Form ID`; export const FORM_NAME = `${DEFAULT_EVENT_PREFIX} Form Name`; export const FORM_DESTINATION = `${DEFAULT_EVENT_PREFIX} Form Destination`; export const DEFAULT_IDENTITY_STORAGE: IdentityStorageType = 'cookie'; export const DEFAULT_SERVER_ZONE: ServerZoneType = 'US'; ================================================ FILE: packages/analytics-browser/src/cookie-migration/index.ts ================================================ import { getOldCookieName, Storage, UserSession } from '@amplitude/analytics-core'; export const parseLegacyCookies = async ( apiKey: string, cookieStorage: Storage, deleteLegacyCookies = true, ): Promise => { const cookieName = getOldCookieName(apiKey); const cookies = await cookieStorage.getRaw(cookieName); if (!cookies) { return { optOut: false, }; } if (deleteLegacyCookies) { await cookieStorage.remove(cookieName); } const [deviceId, userId, optOut, sessionId, lastEventTime, lastEventId] = cookies.split('.'); return { deviceId, userId: decode(userId), sessionId: parseTime(sessionId), lastEventId: parseTime(lastEventId), lastEventTime: parseTime(lastEventTime), optOut: Boolean(optOut), }; }; export const parseTime = (num: string) => { const integer = parseInt(num, 32); if (isNaN(integer)) { return undefined; } return integer; }; export const decode = (value?: string): string | undefined => { if (!atob || !escape || !value) { return undefined; } try { return decodeURIComponent(escape(atob(value))); } catch { return undefined; } }; ================================================ FILE: packages/analytics-browser/src/default-tracking.ts ================================================ import { PageTrackingHistoryChanges, PageTrackingOptions, PageTrackingTrackOn, ElementInteractionsOptions, FormInteractionsOptions, BrowserOptions, AutocaptureOptions, AttributionOptions, NetworkTrackingOptions, FrustrationInteractionsOptions, CustomEnrichmentOptions, PerformanceTrackingOptions, isChromeExtension, } from '@amplitude/analytics-core'; /** * A subset of AutocaptureOptions that includes the autocapture features that * are made available to users by default (even if "config.autocapture === undefined") */ type AutocaptureOptionsDefaultAvailable = Pick< AutocaptureOptions, 'pageViews' | 'sessions' | 'fileDownloads' | 'formInteractions' | 'attribution' | 'pageUrlEnrichment' >; /** * Returns false if autocapture === false or if autocapture[event], * otherwise returns true (even if "config.autocapture === undefined") */ const isTrackingEnabled = ( autocapture: AutocaptureOptionsDefaultAvailable | boolean | undefined, event: keyof AutocaptureOptionsDefaultAvailable, ) => { if (typeof autocapture === 'boolean') { return autocapture; } if (autocapture?.[event] === false) { return false; } if (isChromeExtension()) { return !!autocapture?.[event]; } return true; }; export const isAttributionTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'attribution'); export const isFileDownloadTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'fileDownloads'); export const isFormInteractionTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'formInteractions'); export const isPageViewTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'pageViews'); export const isSessionTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'sessions'); export const isPageUrlEnrichmentEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'pageUrlEnrichment'); /** * Returns true if * 1. if autocapture.networkTracking === true * 2. if autocapture.networkTracking === object * otherwise returns false */ export const isNetworkTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => { if (typeof autocapture === 'boolean') { return autocapture; } if ( typeof autocapture === 'object' && (autocapture.networkTracking === true || typeof autocapture.networkTracking === 'object') ) { return true; } return false; }; /** * Returns true if * 1. autocapture === true * 2. if autocapture.elementInteractions === true * 3. if autocapture.elementInteractions === object * otherwise returns false */ export const isElementInteractionsEnabled = (autocapture: AutocaptureOptions | boolean | undefined): boolean => { if (typeof autocapture === 'boolean') { return autocapture; } if ( typeof autocapture === 'object' && (autocapture.elementInteractions === true || typeof autocapture.elementInteractions === 'object') ) { return true; } return false; }; /** * Returns true if * 1. autocapture === true * 2. if autocapture.webVitals === true * otherwise returns false */ export const isWebVitalsEnabled = (autocapture: AutocaptureOptions | boolean | undefined): boolean => { if (typeof autocapture === 'boolean') { return autocapture; } if (typeof autocapture === 'object' && autocapture.webVitals === true) { return true; } return false; }; export const isFrustrationInteractionsEnabled = (autocapture: AutocaptureOptions | boolean | undefined): boolean => { if (typeof autocapture === 'boolean') { return autocapture; } if ( typeof autocapture === 'object' && (autocapture.frustrationInteractions === true || typeof autocapture.frustrationInteractions === 'object') ) { return true; } return false; }; export const isPerformanceTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined): boolean => { if ( typeof autocapture === 'object' && (autocapture.performanceTracking === true || typeof autocapture.performanceTracking === 'object') ) { return true; } return false; }; export const getPerformanceTrackingConfig = (config: BrowserOptions): PerformanceTrackingOptions | undefined => { if (typeof config.autocapture !== 'object') { return undefined; } const performanceTracking = config.autocapture.performanceTracking; if (performanceTracking === true) { return { mainThreadBlock: true }; } if (typeof performanceTracking === 'object' && performanceTracking !== null) { return performanceTracking; } return undefined; }; export const isCustomEnrichmentEnabled = (customEnrichment: boolean | CustomEnrichmentOptions | undefined) => { if (typeof customEnrichment === 'boolean') { return customEnrichment; } if (typeof customEnrichment === 'object' && customEnrichment !== null && customEnrichment.enabled !== false) { return true; } return false; }; export const getElementInteractionsConfig = (config: BrowserOptions): ElementInteractionsOptions | undefined => { if ( isElementInteractionsEnabled(config.autocapture) && typeof config.autocapture === 'object' && typeof config.autocapture.elementInteractions === 'object' ) { return config.autocapture.elementInteractions; } return undefined; }; export const getFrustrationInteractionsConfig = ( config: BrowserOptions, ): FrustrationInteractionsOptions | undefined => { if ( isFrustrationInteractionsEnabled(config.autocapture) && typeof config.autocapture === 'object' && typeof config.autocapture.frustrationInteractions === 'object' ) { return config.autocapture.frustrationInteractions; } return undefined; }; export const getNetworkTrackingConfig = (config: BrowserOptions): NetworkTrackingOptions | undefined => { if (isNetworkTrackingEnabled(config.autocapture)) { let networkTrackingConfig; if (typeof config.autocapture === 'object' && typeof config.autocapture.networkTracking === 'object') { networkTrackingConfig = config.autocapture.networkTracking; } else if (config.networkTrackingOptions) { networkTrackingConfig = config.networkTrackingOptions; } return { ...networkTrackingConfig, captureRules: networkTrackingConfig?.captureRules?.map((rule) => { // if URLs and hosts are both set, URLs take precedence over hosts if (rule.urls?.length && rule.hosts?.length) { const hostsString = JSON.stringify(rule.hosts); const urlsString = JSON.stringify(rule.urls); /* istanbul ignore next */ config.loggerProvider?.warn( `Found network capture rule with both urls='${urlsString}' and hosts='${hostsString}' set. ` + `Definition of urls takes precedence over hosts, so ignoring hosts.`, ); return { ...rule, hosts: undefined }; } return rule; }), }; } return; }; export const getPageViewTrackingConfig = (config: BrowserOptions): PageTrackingOptions => { let trackOn: PageTrackingTrackOn | undefined = () => false; let trackHistoryChanges: PageTrackingHistoryChanges | undefined = undefined; let eventType: string | undefined; const pageCounter = config.pageCounter; const isDefaultPageViewTrackingEnabled = isPageViewTrackingEnabled(config.defaultTracking); if (isDefaultPageViewTrackingEnabled) { trackOn = undefined; eventType = undefined; if ( config.defaultTracking && typeof config.defaultTracking === 'object' && config.defaultTracking.pageViews && typeof config.defaultTracking.pageViews === 'object' ) { if ('trackOn' in config.defaultTracking.pageViews) { trackOn = config.defaultTracking.pageViews.trackOn; } if ('trackHistoryChanges' in config.defaultTracking.pageViews) { trackHistoryChanges = config.defaultTracking.pageViews.trackHistoryChanges; } if ('eventType' in config.defaultTracking.pageViews && config.defaultTracking.pageViews.eventType) { eventType = config.defaultTracking.pageViews.eventType; } } } return { trackOn, trackHistoryChanges, eventType, pageCounter, }; }; export const getAttributionTrackingConfig = (config: BrowserOptions): AttributionOptions => { if ( isAttributionTrackingEnabled(config.defaultTracking) && config.defaultTracking && typeof config.defaultTracking === 'object' && config.defaultTracking.attribution && typeof config.defaultTracking.attribution === 'object' ) { return { ...config.defaultTracking.attribution, }; } return {}; }; export const getFormInteractionsConfig = (config: BrowserOptions): FormInteractionsOptions | undefined => { if ( isFormInteractionTrackingEnabled(config.defaultTracking) && config.defaultTracking && typeof config.defaultTracking === 'object' && typeof config.defaultTracking.formInteractions === 'object' ) { return config.defaultTracking.formInteractions; } return undefined; }; ================================================ FILE: packages/analytics-browser/src/det-notification.ts ================================================ import { BrowserConfig } from '@amplitude/analytics-core'; let notified = false; export const detNotify = (config: BrowserConfig): void => { if (notified || config.defaultTracking !== undefined) { return; } const message = `\`options.defaultTracking\` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to \`options.defaultTracking\`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example: amplitude.init(, { defaultTracking: true, }); Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`; config.loggerProvider.warn(message); notified = true; }; /** * @private * This function is meant for testing purposes only */ export const resetNotify = () => { notified = false; }; ================================================ FILE: packages/analytics-browser/src/gtm-snippet-index.ts ================================================ import { getGlobalScope } from '@amplitude/analytics-core'; import * as amplitudeGTM from './index'; import { createInstance } from './browser-client-factory'; import { runQueuedFunctions } from './utils/snippet-helper'; // https://developer.mozilla.org/en-US/docs/Glossary/IIFE (function () { const GlobalScope = getGlobalScope(); if (!GlobalScope) { console.error('[Amplitude] Error: GlobalScope is not defined'); return; } const createNamedInstance = (instanceName?: string) => { const instance = createInstance(); const GlobalScope = getGlobalScope(); if (GlobalScope && GlobalScope.amplitudeGTM && GlobalScope.amplitudeGTM._iq && instanceName) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore GlobalScope.amplitudeGTM._iq[instanceName] = instance; } return instance; }; GlobalScope.amplitudeGTM = Object.assign(GlobalScope.amplitudeGTM || {}, amplitudeGTM, { createInstance: createNamedInstance, }); if (GlobalScope.amplitudeGTM.invoked) { const queue = GlobalScope.amplitudeGTM._q; GlobalScope.amplitudeGTM._q = []; runQueuedFunctions(amplitudeGTM, queue); const instanceNames = Object.keys(GlobalScope.amplitudeGTM._iq) || []; for (let i = 0; i < instanceNames.length; i++) { const instanceName = instanceNames[i]; const instance = Object.assign(GlobalScope.amplitudeGTM._iq[instanceName], createNamedInstance(instanceName)); const queue = instance._q; instance._q = []; runQueuedFunctions(instance, queue); } } })(); ================================================ FILE: packages/analytics-browser/src/index.ts ================================================ /* eslint-disable @typescript-eslint/unbound-method */ import client from './browser-client-factory'; export { createInstance } from './browser-client-factory'; export const { add, extendSession, flush, getDeviceId, getIdentity, getOptOut, getSessionId, getUserId, groupIdentify, identify, init, logEvent, remove, reset, revenue, setDeviceId, setGroup, setIdentity, setOptOut, setSessionId, setTransport, setUserId, track, _setDiagnosticsSampleRate, } = client; export { AmplitudeBrowser } from './browser-client'; export { runQueuedFunctions } from './utils/snippet-helper'; export { Revenue, Identify } from '@amplitude/analytics-core'; export { trackVideo, type VideoCaptureOptions } from './video-capture/video-capture'; // Export types to maintain backward compatibility with `analytics-types`. // In the next major version, only export customer-facing types to reduce the public API surface. export * as Types from './types'; ================================================ FILE: packages/analytics-browser/src/lib-prefix.ts ================================================ export const LIBPREFIX = 'amplitude-ts'; ================================================ FILE: packages/analytics-browser/src/plugins/context.ts ================================================ import { UUID, getLanguage, Event, BeforePlugin, BrowserConfig } from '@amplitude/analytics-core'; import { VERSION } from '../version'; import { LIBPREFIX } from '../lib-prefix'; const BROWSER_PLATFORM = 'Web'; const IP_ADDRESS = '$remote'; export class Context implements BeforePlugin { name = '@amplitude/plugin-context-browser'; type = 'before' as const; // this.config is defined in setup() which will always be called first // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore config: BrowserConfig; userAgent: string | undefined; library = `${LIBPREFIX}/${VERSION}`; constructor() { /* istanbul ignore else */ if (typeof navigator !== 'undefined') { this.userAgent = navigator.userAgent; } } setup(config: BrowserConfig): Promise { this.config = config; return Promise.resolve(undefined); } async execute(context: Event): Promise { const time = new Date().getTime(); const lastEventId = this.config.lastEventId ?? -1; const nextEventId = context.event_id ?? lastEventId + 1; this.config.lastEventId = nextEventId; if (!context.time) { this.config.lastEventTime = time; } const event: Event = { user_id: this.config.userId, device_id: this.config.deviceId, session_id: this.config.sessionId, time, ...(this.config.appVersion && { app_version: this.config.appVersion }), ...(this.config.trackingOptions.platform && { platform: BROWSER_PLATFORM }), ...(this.config.trackingOptions.language && { language: getLanguage() }), ...(this.config.trackingOptions.ipAddress && { ip: IP_ADDRESS }), insert_id: UUID(), partner_id: this.config.partnerId, plan: this.config.plan, ...(this.config.ingestionMetadata && { ingestion_metadata: { source_name: this.config.ingestionMetadata.sourceName, source_version: this.config.ingestionMetadata.sourceVersion, }, }), ...context, event_id: nextEventId, library: this.library, user_agent: this.userAgent, }; return event; } } ================================================ FILE: packages/analytics-browser/src/plugins/file-download-tracking.ts ================================================ import { DEFAULT_FILE_DOWNLOAD_EVENT, FILE_EXTENSION, FILE_NAME, LINK_ID, LINK_TEXT, LINK_URL } from '../constants'; import { BrowserConfig } from '../config'; import { getGlobalScope, Event, EnrichmentPlugin, BrowserClient } from '@amplitude/analytics-core'; interface EventListener { element: Element; type: 'click'; handler: () => void; } export const fileDownloadTracking = (): EnrichmentPlugin => { let observer: MutationObserver | undefined; let eventListeners: EventListener[] = []; const addEventListener = (element: Element, type: 'click', handler: () => void) => { element.addEventListener(type, handler); eventListeners.push({ element, type, handler, }); }; const removeClickListeners = () => { eventListeners.forEach(({ element, type, handler }) => { /* istanbul ignore next */ element?.removeEventListener(type, handler); }); eventListeners = []; }; const name = '@amplitude/plugin-file-download-tracking-browser'; const type = 'enrichment'; const setup = async (config: BrowserConfig, amplitude: BrowserClient) => { const initializeFileDownloadTracking = () => { /* istanbul ignore if */ if (!amplitude) { // TODO: Add required minimum version of @amplitude/analytics-browser config.loggerProvider.warn( 'File download tracking requires a later version of @amplitude/analytics-browser. File download events are not tracked.', ); return; } /* istanbul ignore if */ if (typeof document === 'undefined') { return; } const addFileDownloadListener = (a: HTMLAnchorElement) => { let url: URL; try { // eslint-disable-next-line no-restricted-globals url = new URL(a.href, window.location.href); } catch { /* istanbul ignore next */ return; } const result = ext.exec(url.href); const fileExtension = result?.[1]; if (fileExtension) { addEventListener(a, 'click', () => { if (fileExtension) { amplitude.track(DEFAULT_FILE_DOWNLOAD_EVENT, { [FILE_EXTENSION]: fileExtension, [FILE_NAME]: url.pathname, [LINK_ID]: a.id, [LINK_TEXT]: a.text, [LINK_URL]: a.href, }); } }); } }; const ext = /\.(pdf|xlsx?|docx?|txt|rtf|csv|exe|key|pp(s|t|tx)|7z|pkg|rar|gz|zip|avi|mov|mp4|mpe?g|wmv|midi?|mp3|wav|wma)(\?.+)?$/; // Adds listener to existing anchor tags const links = Array.from(document.getElementsByTagName('a')); links.forEach(addFileDownloadListener); // Adds listener to anchor tags added after initial load /* istanbul ignore else */ if (typeof MutationObserver !== 'undefined') { observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { mutation.addedNodes.forEach((node) => { if (node.nodeName === 'A') { addFileDownloadListener(node as HTMLAnchorElement); } if ('querySelectorAll' in node && typeof node.querySelectorAll === 'function') { Array.from(node.querySelectorAll('a') as HTMLAnchorElement[]).map(addFileDownloadListener); } }); }); }); observer.observe(document.body, { subtree: true, childList: true, }); } }; // If the document is already loaded, initialize immediately. /* istanbul ignore else*/ if (document.readyState === 'complete') { initializeFileDownloadTracking(); } else { // Otherwise, wait for the load event. const window = getGlobalScope(); /* istanbul ignore else*/ if (window) { window.addEventListener('load', initializeFileDownloadTracking); } else { config.loggerProvider.debug('File download tracking is not installed because global is undefined.'); } } }; const execute = async (event: Event) => event; const teardown = async () => { observer?.disconnect(); removeClickListeners(); }; return { name, type, setup, execute, teardown, }; }; ================================================ FILE: packages/analytics-browser/src/plugins/form-interaction-tracking.ts ================================================ import { DEFAULT_FORM_START_EVENT, DEFAULT_FORM_SUBMIT_EVENT, FORM_ID, FORM_NAME, FORM_DESTINATION, } from '../constants'; import { BrowserConfig } from '../config'; import { getGlobalScope, Event as AmplitudeEvent, EnrichmentPlugin, BrowserClient, FormInteractionsOptions, } from '@amplitude/analytics-core'; import { getFormInteractionsConfig } from '../default-tracking'; interface EventListener { element: Element; type: 'change' | 'submit'; handler: (event: Event) => void; } export const formInteractionTracking = (): EnrichmentPlugin => { let observer: MutationObserver | undefined; let eventListeners: EventListener[] = []; const addEventListener = (element: Element, type: 'change' | 'submit', handler: (event: Event) => void) => { element.addEventListener(type, handler); eventListeners.push({ element, type, handler, }); }; const removeClickListeners = () => { eventListeners.forEach(({ element, type, handler }) => { /* istanbul ignore next */ element?.removeEventListener(type, handler); }); eventListeners = []; }; let formInteractionsConfig: FormInteractionsOptions | undefined; const name = '@amplitude/plugin-form-interaction-tracking-browser'; const type = 'enrichment'; const setup = async (config: BrowserConfig, amplitude: BrowserClient) => { formInteractionsConfig = getFormInteractionsConfig(config); const initializeFormTracking = () => { /* istanbul ignore if */ if (!amplitude) { // TODO: Add required minimum version of @amplitude/analytics-browser config.loggerProvider.warn( 'Form interaction tracking requires a later version of @amplitude/analytics-browser. Form interaction events are not tracked.', ); return; } /* istanbul ignore if */ if (typeof document === 'undefined') { return; } const addedFormNodes = new WeakSet(); const addFormInteractionListener = (form: HTMLFormElement) => { if (addedFormNodes.has(form)) { return; } addedFormNodes.add(form); let hasFormChanged = false; addEventListener(form, 'change', () => { const formDestination = extractFormAction(form); if (!hasFormChanged) { amplitude.track(DEFAULT_FORM_START_EVENT, { [FORM_ID]: stringOrUndefined(form.id), [FORM_NAME]: stringOrUndefined(form.name), [FORM_DESTINATION]: formDestination, }); } hasFormChanged = true; }); addEventListener(form, 'submit', (event: Event) => { const formDestination = extractFormAction(form); if (!hasFormChanged) { amplitude.track(DEFAULT_FORM_START_EVENT, { [FORM_ID]: stringOrUndefined(form.id), [FORM_NAME]: stringOrUndefined(form.name), [FORM_DESTINATION]: formDestination, }); } hasFormChanged = true; // Check if shouldTrackSubmit callback is provided and use it to determine whether to track form_submit if (formInteractionsConfig?.shouldTrackSubmit !== undefined) { if ( typeof formInteractionsConfig.shouldTrackSubmit === 'function' && typeof SubmitEvent !== 'undefined' && event instanceof SubmitEvent ) { try { const shouldTrack = formInteractionsConfig.shouldTrackSubmit(event); if (!shouldTrack) { return; } } catch (e) { config.loggerProvider.warn('shouldTrackSubmit callback threw an error, proceeding with tracking.'); } } else { config.loggerProvider.warn( 'shouldTrackSubmit is ignored because it is not a function or event is not a SubmitEvent.', ); } } amplitude.track(DEFAULT_FORM_SUBMIT_EVENT, { [FORM_ID]: stringOrUndefined(form.id), [FORM_NAME]: stringOrUndefined(form.name), [FORM_DESTINATION]: formDestination, }); hasFormChanged = false; }); }; // Adds listener to existing anchor tags const forms = Array.from(document.getElementsByTagName('form')); forms.forEach(addFormInteractionListener); // Adds listener to anchor tags added after initial load /* istanbul ignore else */ if (typeof MutationObserver !== 'undefined') { observer = new MutationObserver((mutations) => { mutations.forEach((mutation) => { mutation.addedNodes.forEach((node) => { if (node.nodeName === 'FORM') { addFormInteractionListener(node as HTMLFormElement); } if ('querySelectorAll' in node && typeof node.querySelectorAll === 'function') { Array.from(node.querySelectorAll('form') as HTMLFormElement[]).map(addFormInteractionListener); } }); }); }); observer.observe(document.body, { subtree: true, childList: true, }); } }; // If the document is already loaded, initialize immediately. if (document.readyState === 'complete') { initializeFormTracking(); } else { // Otherwise, wait for the load event. // The form interaction plugin observes changes in the dom. For this to work correctly, the observer can only be setup // after the body is built. When Amplitude gets initialized in a script tag, the body tag is still unavailable. So register this // only after the window is loaded const window = getGlobalScope(); /* istanbul ignore else*/ if (window) { window.addEventListener('load', initializeFormTracking); } else { config.loggerProvider.debug('Form interaction tracking is not installed because global is undefined.'); } } }; const execute = async (event: AmplitudeEvent) => event; const teardown = async () => { observer?.disconnect(); removeClickListeners(); }; return { name, type, setup, execute, teardown, }; }; export const stringOrUndefined = (name: T): T extends string ? string : undefined => { /* istanbul ignore if */ if (typeof name !== 'string') { // We found instances where the value of `name` is an Element and not a string. // Elements may have circular references and would throw an error when passed to `JSON.stringify(...)`. // If a non-string value is seen, assume there is no value. return undefined as T extends string ? string : undefined; } return name as T extends string ? string : undefined; }; // Extracts the form action attribute, and normalizes it to a valid URL to preserve the previous behavior of accessing the action property directly. export const extractFormAction = (form: HTMLFormElement): string | null => { let formDestination = form.getAttribute('action'); try { // eslint-disable-next-line no-restricted-globals formDestination = new URL(encodeURI(formDestination ?? ''), window.location.href).href; } catch { // } return formDestination; }; ================================================ FILE: packages/analytics-browser/src/plugins/network-connectivity-checker.ts ================================================ import { getGlobalScope, BeforePlugin, BrowserClient, BrowserConfig } from '@amplitude/analytics-core'; interface EventListener { type: 'online' | 'offline'; handler: () => void; } export const networkConnectivityCheckerPlugin = (): BeforePlugin => { const name = '@amplitude/plugin-network-checker-browser'; const type = 'before' as const; const globalScope = getGlobalScope(); let eventListeners: EventListener[] = []; const addNetworkListener = (type: 'online' | 'offline', handler: () => void) => { /* istanbul ignore next */ if (globalScope?.addEventListener) { globalScope?.addEventListener(type, handler); eventListeners.push({ type, handler, }); } }; const removeNetworkListeners = () => { eventListeners.forEach(({ type, handler }) => { /* istanbul ignore next */ globalScope?.removeEventListener(type, handler); }); eventListeners = []; }; const setup = async (config: BrowserConfig, amplitude: BrowserClient) => { if (typeof navigator === 'undefined') { config.loggerProvider.debug( 'Network connectivity checker plugin is disabled because navigator is not available.', ); config.offline = false; return; } config.offline = !navigator.onLine; addNetworkListener('online', () => { config.loggerProvider.debug('Network connectivity changed to online.'); config.offline = false; // Flush immediately will cause ERR_NETWORK_CHANGED setTimeout(() => { amplitude.flush(); }, config.flushIntervalMillis); }); addNetworkListener('offline', () => { config.loggerProvider.debug('Network connectivity changed to offline.'); config.offline = true; }); }; const teardown = async () => { removeNetworkListeners(); }; return { name, type, setup, teardown, }; }; ================================================ FILE: packages/analytics-browser/src/snippet-index.ts ================================================ import { getGlobalScope, registerSdkLoaderMetadata } from '@amplitude/analytics-core'; import * as amplitude from './index'; import { createInstance } from './browser-client-factory'; import { runQueuedFunctions } from './utils/snippet-helper'; registerSdkLoaderMetadata({ scriptUrl: resolveCurrentScriptUrl(), }); function resolveCurrentScriptUrl(): string | undefined { if (typeof document === 'undefined') { return undefined; } const currentScript = document.currentScript as HTMLScriptElement | null; if (currentScript?.src) { return currentScript.src; } return undefined; } // https://developer.mozilla.org/en-US/docs/Glossary/IIFE (function () { const GlobalScope = getGlobalScope(); if (!GlobalScope) { console.error('[Amplitude] Error: GlobalScope is not defined'); return; } const createNamedInstance = (instanceName?: string) => { const instance = createInstance(); const GlobalScope = getGlobalScope(); if (GlobalScope && GlobalScope.amplitude && GlobalScope.amplitude._iq && instanceName) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore GlobalScope.amplitude._iq[instanceName] = instance; } return instance; }; GlobalScope.amplitude = Object.assign(GlobalScope.amplitude || {}, amplitude, { createInstance: createNamedInstance, }); if (GlobalScope.amplitude.invoked) { const queue = GlobalScope.amplitude._q; GlobalScope.amplitude._q = []; runQueuedFunctions(amplitude, queue); const instanceNames = Object.keys(GlobalScope.amplitude._iq) || []; for (let i = 0; i < instanceNames.length; i++) { const instanceName = instanceNames[i]; const instance = Object.assign(GlobalScope.amplitude._iq[instanceName], createNamedInstance(instanceName)); const queue = instance._q; instance._q = []; runQueuedFunctions(instance, queue); } } })(); ================================================ FILE: packages/analytics-browser/src/storage/local-storage.ts ================================================ import { getGlobalScope, ILogger, BrowserStorage } from '@amplitude/analytics-core'; const MAX_ARRAY_LENGTH = 1000; interface LocalStorageOptions { loggerProvider?: ILogger; } export class LocalStorage extends BrowserStorage { loggerProvider?: ILogger; constructor(config?: LocalStorageOptions) { let localStorage; try { localStorage = getGlobalScope()?.localStorage; } catch (e) { config?.loggerProvider?.debug(`Failed to access localStorage. error=${JSON.stringify(e)}`); localStorage = undefined; } super(localStorage); this.loggerProvider = config?.loggerProvider; } async set(key: string, value: T): Promise { if (Array.isArray(value) && value.length > MAX_ARRAY_LENGTH) { const droppedEventsCount = value.length - MAX_ARRAY_LENGTH; await super.set(key, value.slice(0, MAX_ARRAY_LENGTH) as T); this.loggerProvider?.error( `Failed to save ${droppedEventsCount} events because the queue length exceeded ${MAX_ARRAY_LENGTH}.`, ); } else { await super.set(key, value); } } } ================================================ FILE: packages/analytics-browser/src/storage/session-storage.ts ================================================ import { getGlobalScope, BrowserStorage } from '@amplitude/analytics-core'; export class SessionStorage extends BrowserStorage { constructor() { super(getGlobalScope()?.sessionStorage); } } ================================================ FILE: packages/analytics-browser/src/transports/fetch.ts ================================================ import { BaseTransport, compressToGzipArrayBuffer, isCompressionStreamAvailable, MIN_GZIP_UPLOAD_BODY_SIZE_BYTES, Payload, Response, Transport, } from '@amplitude/analytics-core'; // Temporary browser-specific fetch transport with gzip support. // TODO: Merge this implementation back into @amplitude/analytics-core FetchTransport // once React Native SDK supports request body gzip. export class FetchTransport extends BaseTransport implements Transport { private customHeaders: Record; constructor(customHeaders: Record = {}) { super(); this.customHeaders = customHeaders; } async send(serverUrl: string, payload: Payload, shouldCompressUploadBody = false): Promise { /* istanbul ignore if */ if (typeof fetch === 'undefined') { throw new Error('FetchTransport is not supported'); } const bodyString = JSON.stringify(payload); const shouldCompressBody = shouldCompressUploadBody && bodyString.length >= MIN_GZIP_UPLOAD_BODY_SIZE_BYTES && isCompressionStreamAvailable(); let body: string | ArrayBuffer = bodyString; let headers: Record = { 'Content-Type': 'application/json', Accept: '*/*', }; if (shouldCompressBody) { const compressed = await compressToGzipArrayBuffer(bodyString); if (compressed) { headers['Content-Encoding'] = 'gzip'; body = compressed; } } headers = { ...this.customHeaders, ...headers, }; const options: RequestInit = { headers, body, method: 'POST', }; const response = await fetch(serverUrl, options); const responseText = await response.text(); try { // eslint-disable-next-line @typescript-eslint/no-unsafe-argument return this.buildResponse(JSON.parse(responseText)); } catch { return this.buildResponse({ code: response.status }); } } } ================================================ FILE: packages/analytics-browser/src/transports/send-beacon.ts ================================================ import { BaseTransport, getGlobalScope, Payload, Response, Transport } from '@amplitude/analytics-core'; /** * SendBeacon does not support custom headers (e.g. Content-Encoding: gzip), * so request body compression is not applied even when enableRequestBodyCompression is true. */ export class SendBeaconTransport extends BaseTransport implements Transport { constructor() { super(); } async send(serverUrl: string, payload: Payload, _enableRequestBodyCompression = false): Promise { return new Promise((resolve, reject) => { const globalScope = getGlobalScope(); /* istanbul ignore if */ if (!globalScope?.navigator.sendBeacon) { throw new Error('SendBeaconTransport is not supported'); } try { const data = JSON.stringify(payload); // SendBeacon cannot set Content-Encoding, so we always send uncompressed const success = globalScope.navigator.sendBeacon(serverUrl, data); if (success) { return resolve( this.buildResponse({ code: 200, events_ingested: payload.events.length, payload_size_bytes: data.length, server_upload_time: Date.now(), }), ); } return resolve(this.buildResponse({ code: 500 })); } catch (e) { reject(e); } }); } } ================================================ FILE: packages/analytics-browser/src/transports/xhr.ts ================================================ import { BaseTransport, compressToGzipArrayBuffer, isCompressionStreamAvailable, MIN_GZIP_UPLOAD_BODY_SIZE_BYTES, Payload, Response, Transport, } from '@amplitude/analytics-core'; export class XHRTransport extends BaseTransport implements Transport { private state = { done: 4, }; private customHeaders: Record; constructor(customHeaders: Record = {}) { super(); this.customHeaders = customHeaders; } async send(serverUrl: string, payload: Payload, shouldCompressUploadBody = false): Promise { return new Promise((resolve, reject) => { /* istanbul ignore if */ if (typeof XMLHttpRequest === 'undefined') { reject(new Error('XHRTransport is not supported.')); } const xhr = new XMLHttpRequest(); xhr.open('POST', serverUrl, true); xhr.onreadystatechange = () => { if (xhr.readyState === this.state.done) { const responseText = xhr.responseText; try { // eslint-disable-next-line @typescript-eslint/no-unsafe-argument resolve(this.buildResponse(JSON.parse(responseText))); } catch { resolve(this.buildResponse({ code: xhr.status })); } } }; let headers: Record = { 'Content-Type': 'application/json', Accept: '*/*', }; const bodyString = JSON.stringify(payload); const shouldCompressBody = shouldCompressUploadBody && bodyString.length >= MIN_GZIP_UPLOAD_BODY_SIZE_BYTES && isCompressionStreamAvailable(); const sendBody = (body: string | ArrayBuffer) => { headers = { ...this.customHeaders, ...headers, }; for (const [key, value] of Object.entries(headers)) { xhr.setRequestHeader(key, value); } xhr.send(body); }; const doSend = async () => { if (shouldCompressBody) { const compressed = await compressToGzipArrayBuffer(bodyString); if (compressed) { headers['Content-Encoding'] = 'gzip'; sendBody(compressed); } else { sendBody(bodyString); } } else { sendBody(bodyString); } }; doSend().catch(reject); }); } } ================================================ FILE: packages/analytics-browser/src/types.ts ================================================ /* eslint-disable @typescript-eslint/unbound-method */ export { AmplitudeReturn, BaseEvent, EventOptions, BrowserClient, AttributionOptions, AutocaptureOptions, BrowserOptions, BrowserConfig, IConfig, Event, IdentifyEvent, GroupIdentifyEvent, IdentifyOperation, SpecialEventType, IIdentify, IRevenue, RevenueProperty, ILogger, LogLevel, Plugin, BeforePlugin, EnrichmentPlugin, DestinationPlugin, Result, ServerZoneType, ServerZone, IdentityStorageType, Storage, TransportType, OfflineDisabled, Messenger, ElementInteractionsOptions, ActionType, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, DEFAULT_ACTION_CLICK_ALLOWLIST, Campaign, ClickIdParameters, ReferrerParameters, UTMParameters, ValidPropertyType, ExcludeInternalReferrersOptions, EXCLUDE_INTERNAL_REFERRERS_CONDITIONS, } from '@amplitude/analytics-core'; ================================================ FILE: packages/analytics-browser/src/utils/snippet-helper.ts ================================================ import { Result, AmplitudeReturn } from '@amplitude/analytics-core'; interface ProxyItem { name: string; args: any[]; resolve?: (promise: Promise) => void; } type QueueProxy = Array; interface InstanceProxy { _q: QueueProxy; _iq: Record; } /** * Applies the proxied functions on the proxied amplitude snippet to an instance of the real object. * @ignore */ export const runQueuedFunctions = (instance: object, queue: QueueProxy) => { convertProxyObjectToRealObject(instance, queue); }; /** * Applies the proxied functions on the proxied object to an instance of the real object. * Used to convert proxied Identify and Revenue objects. */ export const convertProxyObjectToRealObject = (instance: T, queue: QueueProxy): T => { for (let i = 0; i < queue.length; i++) { const { name, args, resolve } = queue[i]; const fn = instance && instance[name as keyof T]; if (typeof fn === 'function') { const result = fn.apply(instance, args) as AmplitudeReturn; if (typeof resolve === 'function') { resolve(result?.promise); } } } return instance; }; /** * Check if the param is snippet proxy */ export const isInstanceProxy = (instance: unknown): instance is InstanceProxy => { const instanceProxy = instance as InstanceProxy; return instanceProxy && instanceProxy._q !== undefined; }; ================================================ FILE: packages/analytics-browser/src/version.ts ================================================ export const VERSION = '2.42.3'; ================================================ FILE: packages/analytics-browser/src/video-capture/video-capture.ts ================================================ import { VideoState, VideoObserver, BrowserClient, EmbeddedVideoPlayer, VideoVendor } from '@amplitude/analytics-core'; export class VideoCapture { private videoEl: HTMLVideoElement | null = null; private embeddedVideoPlayer: EmbeddedVideoPlayer | null = null; private vendor?: VideoVendor; private extraEventProperties: Record = {}; private listeners: ((previousState: VideoState, nextState: VideoState) => void)[] = []; private onRemoveListeners: (() => void)[] = []; constructor(private readonly amplitude: BrowserClient) {} /** * Specify a video element to capture events from * * @param videoEl - The HTML video element to capture events from. * @returns The VideoCapture instance. */ withVideoElement(videoEl: HTMLVideoElement): VideoCapture { this.videoEl = videoEl; return this; } /** * Specify an embedded video player.js instance to capture events from * @param player - The embedded video player.js instance to capture events from. * @returns The VideoCapture instance. */ withEmbeddedPlayer(player: EmbeddedVideoPlayer): VideoCapture { this.embeddedVideoPlayer = player; return this; } /** * Specify a vendor to capture extra vendor-specific event properties * * @param vendor - The vendor of the video player. Currently only "mux" is supported. * @returns The VideoCapture instance. */ withVendor(vendor: VideoVendor): VideoCapture { this.vendor = vendor; return this; } /** * Specify extra event properties to include in all captured events * * @param properties - The extra event properties to include in the Amplitude event. * @returns The VideoCapture instance. */ withExtraEventProperties(properties: Record): VideoCapture { this.extraEventProperties = properties; return this; } /** * Track a "Video Content Started" event every time the video starts playing * @returns The VideoCapture instance. */ captureVideoStarted(): VideoCapture { this.listeners.push((previousState, nextState) => { if (previousState.playbackState !== 'playing' && nextState.playbackState === 'playing') { // placeholder for Heartbeat Start Event this.amplitude.track('Video Content Started', { ...nextState.lastEvent, ...this.extraEventProperties, }); } }); return this; } /** * Track a "Video Content Stopped" event every time the video stops playing * @returns The VideoCapture instance. */ captureVideoStopped(): VideoCapture { this.listeners.push((previousState, nextState) => { if (previousState.playbackState === 'playing' && nextState.playbackState !== 'playing') { // placeholder for Heartbeat Stop Event this.amplitude.track('Video Content Stopped', { ...nextState.lastEvent, watch_duration: nextState.watchTime, ...this.extraEventProperties, }); } }); return this; } // Placeholder: may need a generic state change listener to capture unusual events or to have // more control over the event tracking. // withStateChangeListener(listener: (previousState: VideoState, nextState: VideoState) => void): VideoCapture { /** * Start capturing analytics events for the video element * @returns The VideoCapture instance. * @throws An error if the video element is not specified. */ start(): VideoCapture { const videoEl = this.videoEl ?? this.embeddedVideoPlayer; if (!videoEl) { throw new Error( 'Video element not specified. Use withVideoElement() or withEmbeddedPlayer() to specify the video element.', ); } if (this.videoEl && this.embeddedVideoPlayer) { throw new Error( 'Both video element and embedded video player specified. Use only one of withVideoElement() or withEmbeddedPlayer() to specify the video element.', ); } const videoObserver = new VideoObserver({ videoEl, onStateChange: (previousState, nextState) => { this.listeners.forEach((listener) => listener(previousState, nextState)); }, vendor: this.vendor, isEmbedded: !!this.embeddedVideoPlayer, }); this.onRemoveListeners.push(() => { videoObserver.destroy(); }); return this; } stop() { this.onRemoveListeners.forEach((listener) => listener()); this.onRemoveListeners = []; } } export type VideoCaptureOptions = { vendor?: VideoVendor; extraEventProperties?: Record; }; /** * Track video analytics events for an HTML video element or embedded video player.js instance. * * Captures Video Started and Video Stopped events. * * @experimental This function is experimental and may not be stable. * @param amplitude - The Amplitude client instance. * @param videoEl - The HTML video element or embedded video player.js instance to capture events from. * @param options - The options for the video capture. * @returns A function to stop the video capture. */ export function trackVideo( amplitude: BrowserClient, videoEl: HTMLVideoElement | EmbeddedVideoPlayer, options: VideoCaptureOptions = {}, ): () => void { const videoCapture = new VideoCapture(amplitude); if (videoEl instanceof HTMLVideoElement) { videoCapture.withVideoElement(videoEl); } else { videoCapture.withEmbeddedPlayer(videoEl); } if (options.vendor) { videoCapture.withVendor(options.vendor); } videoCapture .withExtraEventProperties(options.extraEventProperties ?? {}) .captureVideoStarted() .captureVideoStopped() .start(); return () => videoCapture.stop(); } ================================================ FILE: packages/analytics-browser/test/attribution/helpers.test.ts ================================================ import { ExcludeInternalReferrersOptions, getStorageKey, BASE_CAMPAIGN } from '@amplitude/analytics-core'; import { isNewCampaign, createCampaignEvent, getDefaultExcludedReferrers, isExcludedReferrer, isSubdomainOf, getDomain, } from '../../src/attribution/helpers'; const loggerProvider = { log: jest.fn(), debug: jest.fn(), warn: jest.fn(), error: jest.fn(), enable: jest.fn(), disable: jest.fn(), }; describe('getStorageKey', () => { test('should return storage key without explicit suffix and limit', () => { expect(getStorageKey('API_KEY')).toBe('AMP_API_KEY'); }); test('should return storage key', () => { expect(getStorageKey('API_KEY', 'MKTG', 3)).toBe('AMP_MKTG_API'); }); }); describe('isNewCampaign', () => { test('should return true for new campaign', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }; expect(isNewCampaign(currentCampaign, previousCampaign, {}, loggerProvider)).toBe(true); }); test('should return true for new referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'a.b.c.d', }; const currentCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'b.c.d.e', }; expect(isNewCampaign(currentCampaign, previousCampaign, {}, loggerProvider)).toBe(true); }); test('should return false for string excluded referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'amplitude.com', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: ['amplitude.com'], }, loggerProvider, ), ).toBe(false); }); test('should return false for regexp excluded referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'amplitude.com', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: getDefaultExcludedReferrers('.amplitude.com'), }, loggerProvider, ), ).toBe(false); }); test('should return false for cross subdomain regexp excluded referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'analytics.amplitude.com', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: getDefaultExcludedReferrers('.amplitude.com'), }, loggerProvider, ), ).toBe(false); }); test('should return true for undefined previous campaign', () => { const previousCampaign = undefined; const currentCampaign = { ...BASE_CAMPAIGN, }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: ['a'], }, loggerProvider, ), ).toBe(true); }); test('should return false for undefined previous campaign and excluded referrer', () => { const previousCampaign = undefined; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'a', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: ['a'], }, loggerProvider, ), ).toBe(false); }); test('should return false for no extra referrer with direct traffic in the same session', () => { const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'a.b.c.d', }; const currentCampaign = { ...BASE_CAMPAIGN, }; expect(isNewCampaign(currentCampaign, previousCampaign, {}, loggerProvider, false)).toBe(false); }); test('should return true for no referrer with any new campaign in the same session', () => { const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'a.b.c.d', }; const currentCampaign = { ...BASE_CAMPAIGN, utm_source: 'utm_source', }; expect(isNewCampaign(currentCampaign, previousCampaign, {}, loggerProvider, false)).toBe(true); }); describe('when excludeInternalReferrers', () => { let location: Location; beforeAll(() => { location = window.location; Object.defineProperty(window, 'location', { value: { hostname: 'a.b.co.uk', }, writable: true, }); }); afterAll(() => { Object.defineProperty(window, 'location', { value: location, writable: true, }); }); describe('is true (or "always")', () => { test('should return false if internal referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, referring_domain: 'a.b.co.uk', }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'b.co.uk', }; expect( isNewCampaign(currentCampaign, previousCampaign, { excludeInternalReferrers: true }, loggerProvider), ).toBe(false); expect(isNewCampaign(currentCampaign, previousCampaign, { excludeInternalReferrers: {} }, loggerProvider)).toBe( false, ); }); describe('when cookieDomain is specified', () => { test('should return false if internal referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, referring_domain: 'a.b.co.uk', }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'b.co.uk', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeInternalReferrers: true }, loggerProvider, false, '.b.co.uk', ), ).toBe(false); }); test('should return true if not internal referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, referring_domain: 'www.google.com', }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'www.google.co.jp', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeInternalReferrers: true }, loggerProvider, false, '.b.co.uk', ), ).toBe(true); }); }); test('should return true if not internal referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, referring_domain: 'facebook.com', }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'google.com', }; expect( isNewCampaign(currentCampaign, previousCampaign, { excludeInternalReferrers: true }, loggerProvider), ).toBe(true); }); test('should return false if no referring_domain', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, }; expect( isNewCampaign(currentCampaign, previousCampaign, { excludeInternalReferrers: true }, loggerProvider), ).toBe(false); }); test('should return false if no referring domain', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeInternalReferrers: { condition: 'always' } }, loggerProvider, ), ).toBe(false); }); }); describe('is "ifEmptyCampaign"', () => { test('should return false if internal referrer and campaign is empty', () => { const previousCampaign = { ...BASE_CAMPAIGN, referring_domain: 'a.b.co.uk', }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'a.b.co.uk', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeInternalReferrers: { condition: 'ifEmptyCampaign' } }, loggerProvider, ), ).toBe(false); }); test('should return true if not internal referrer and campaign is not empty', () => { const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'previous_campaign', referring_domain: 'facebook.com', }; const currentCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'new_campaign', referring_domain: 'google.com', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeInternalReferrers: { condition: 'ifEmptyCampaign' } }, loggerProvider, ), ).toBe(true); }); test('should return true if internal referrer and campaign is not empty', () => { const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'previous_campaign', referring_domain: 'a.b.co.uk', }; const currentCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'new_campaign', referring_domain: 'a.b.co.uk', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeInternalReferrers: { condition: 'ifEmptyCampaign' } }, loggerProvider, ), ).toBe(true); }); }); describe('is invalid', () => { test('should silently ignore invalid condition', () => { const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'previous_campaign', referring_domain: 'a.b.co.uk', }; const currentCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'new_campaign', referring_domain: 'a.b.co.uk', }; const excludeInternalReferrers = { condition: 'invalid' } as unknown as ExcludeInternalReferrersOptions; expect(isNewCampaign(currentCampaign, previousCampaign, { excludeInternalReferrers }, loggerProvider)).toBe( true, ); }); }); }); }); describe('isExcludedReferrer', () => { test('should return true with string excluded referrer', () => { expect(isExcludedReferrer(['data.amplitude.com'], 'data.amplitude.com')).toEqual(true); }); test('should return true with regexp excluded referrer', () => { expect(isExcludedReferrer(getDefaultExcludedReferrers('.amplitude.com'), 'data.amplitude.com')).toEqual(true); }); }); describe('createCampaignEvent', () => { test('should return event', () => { const campaignEvent = createCampaignEvent( { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }, {}, ); expect(campaignEvent).toEqual({ event_type: '$identify', user_id: undefined, user_properties: { $set: { utm_campaign: 'utm_campaign', }, $setOnce: { initial_dclid: 'EMPTY', initial_fbclid: 'EMPTY', initial_gbraid: 'EMPTY', initial_gclid: 'EMPTY', initial_ko_click_id: 'EMPTY', initial_li_fat_id: 'EMPTY', initial_msclkid: 'EMPTY', initial_wbraid: 'EMPTY', initial_referrer: 'EMPTY', initial_referring_domain: 'EMPTY', initial_rdt_cid: 'EMPTY', initial_ttclid: 'EMPTY', initial_twclid: 'EMPTY', initial_utm_campaign: 'utm_campaign', initial_utm_content: 'EMPTY', initial_utm_id: 'EMPTY', initial_utm_medium: 'EMPTY', initial_utm_source: 'EMPTY', initial_utm_term: 'EMPTY', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', wbraid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', }, }, }); }); test('should return event with custom empty value', () => { const campaignEvent = createCampaignEvent( { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }, { initialEmptyValue: '(none)', }, ); expect(campaignEvent).toEqual({ event_type: '$identify', user_id: undefined, user_properties: { $set: { utm_campaign: 'utm_campaign', }, $setOnce: { initial_dclid: '(none)', initial_fbclid: '(none)', initial_gbraid: '(none)', initial_gclid: '(none)', initial_ko_click_id: '(none)', initial_li_fat_id: '(none)', initial_msclkid: '(none)', initial_wbraid: '(none)', initial_referrer: '(none)', initial_referring_domain: '(none)', initial_rdt_cid: '(none)', initial_ttclid: '(none)', initial_twclid: '(none)', initial_utm_campaign: 'utm_campaign', initial_utm_content: '(none)', initial_utm_id: '(none)', initial_utm_medium: '(none)', initial_utm_source: '(none)', initial_utm_term: '(none)', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', wbraid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', }, }, }); }); }); describe('getDefaultExcludedReferrers', () => { test('should return empty array', () => { const excludedReferrers = getDefaultExcludedReferrers(undefined); expect(excludedReferrers).toEqual([]); }); test('should return array with regex 1', () => { const excludedReferrers = getDefaultExcludedReferrers('amplitude.com'); expect(excludedReferrers).toEqual([new RegExp('amplitude\\.com$')]); }); test('should return array with regex 2', () => { const excludedReferrers = getDefaultExcludedReferrers('.amplitude.com'); expect(excludedReferrers).toEqual([new RegExp('amplitude\\.com$')]); }); }); describe('isSubdomainOf', () => { test('should return true if subdomain of domain', () => { expect(isSubdomainOf('b.co.uk', 'b.co.uk')).toBe(true); // exact match expect(isSubdomainOf('b.co.uk', '.b.co.uk')).toBe(true); // exact match leading dot expect(isSubdomainOf('a.b.co.uk', '.b.co.uk')).toBe(true); expect(isSubdomainOf('www.b.co.uk', '.b.co.uk')).toBe(true); expect(isSubdomainOf('www.b.co.uk', '.co.uk')).toBe(true); expect(isSubdomainOf('www.b.co.uk', 'co.uk')).toBe(true); expect(isSubdomainOf('.www.b.co.uk', 'b.co.uk')).toBe(true); }); test('should return false if not subdomain of domain', () => { expect(isSubdomainOf('b.co.uk', 'a.b.co.uk')).toBe(false); expect(isSubdomainOf('b.co.uk', '.a.b.co.uk')).toBe(false); expect(isSubdomainOf('www.b.co.uk', 'google.com')).toBe(false); }); }); describe('getDomain', () => { let location: Location; beforeAll(() => { location = window.location; Object.defineProperty(window, 'location', { value: { hostname: 'sub.domain.hello.world.co.uk', }, configurable: true, }); }); afterAll(() => { Object.defineProperty(window, 'location', { value: location, configurable: true, }); }); test('should return true if both localhost', () => { expect(getDomain('localhost')).toBe('localhost'); }); test('should return domain of location.hostname if no arg provided', () => { expect(getDomain()).toBe('world.co.uk'); }); test('should return empty if location.hostname is undefined', () => { Object.defineProperty(window, 'location', { value: { hostname: undefined, }, configurable: true, }); expect(getDomain()).toBe(''); }); }); ================================================ FILE: packages/analytics-browser/test/attribution/tracking-methods.test.ts ================================================ import { EVENT_PROPERTY_TRACKING_METHOD, USER_PROPERTY_TRACKING_METHOD, hasTrackingMethod, isEventPropertyAttributionEnabled, isUserPropertyAttributionEnabled, normalizeTrackingMethod, } from '../../src/attribution/tracking-methods'; describe('tracking-methods', () => { test('should default to user property tracking', () => { expect(normalizeTrackingMethod()).toEqual([USER_PROPERTY_TRACKING_METHOD]); }); test('should normalize and dedupe tracking methods', () => { expect( normalizeTrackingMethod([ USER_PROPERTY_TRACKING_METHOD, EVENT_PROPERTY_TRACKING_METHOD, USER_PROPERTY_TRACKING_METHOD, ]), ).toEqual([USER_PROPERTY_TRACKING_METHOD, EVENT_PROPERTY_TRACKING_METHOD]); }); test('should filter invalid tracking methods and keep supported ones', () => { expect( normalizeTrackingMethod([USER_PROPERTY_TRACKING_METHOD, 'event_property', 123, EVENT_PROPERTY_TRACKING_METHOD]), ).toEqual([USER_PROPERTY_TRACKING_METHOD, EVENT_PROPERTY_TRACKING_METHOD]); }); test('should fall back to user property tracking when runtime input is invalid', () => { expect(normalizeTrackingMethod('event_property')).toEqual([USER_PROPERTY_TRACKING_METHOD]); expect(normalizeTrackingMethod([123, false, null])).toEqual([USER_PROPERTY_TRACKING_METHOD]); }); test('should detect enabled tracking methods', () => { const options = { trackingMethod: [USER_PROPERTY_TRACKING_METHOD, EVENT_PROPERTY_TRACKING_METHOD], fallbackAttributionEvent: true, }; expect(hasTrackingMethod(options, USER_PROPERTY_TRACKING_METHOD)).toBe(true); expect(isUserPropertyAttributionEnabled(options)).toBe(true); expect(isEventPropertyAttributionEnabled(options)).toBe(true); expect(options.fallbackAttributionEvent).toBe(true); }); test('should enable user property tracking by default', () => { const options = {}; expect(hasTrackingMethod(options, USER_PROPERTY_TRACKING_METHOD)).toBe(true); expect(isUserPropertyAttributionEnabled(options)).toBe(true); expect(isEventPropertyAttributionEnabled(options)).toBe(false); }); }); ================================================ FILE: packages/analytics-browser/test/attribution/web-attribution.test.ts ================================================ import { FetchTransport, CookieStorage, Logger, UUID, AttributionOptions, BrowserConfig, LogLevel, BASE_CAMPAIGN, CampaignParser, } from '@amplitude/analytics-core'; import { WebAttribution } from '../../src/attribution/web-attribution'; describe('shouldTrackNewCampaign', () => { const mockConfig: BrowserConfig = { apiKey: UUID(), flushIntervalMillis: 0, flushMaxRetries: 0, flushQueueSize: 0, logLevel: LogLevel.None, loggerProvider: new Logger(), offline: false, optOut: false, serverUrl: undefined, transportProvider: new FetchTransport(), useBatch: false, cookieOptions: { domain: '.amplitude.com', expiration: 365, sameSite: 'Lax', secure: false, upgrade: true, }, cookieStorage: new CookieStorage(), sessionTimeout: 30 * 60 * 1000, trackingOptions: { ipAddress: true, language: true, platform: true, }, }; const option: AttributionOptions = {}; test('should track campaign with new campaign', async () => { const overrideMockConfig = { ...mockConfig, cookieOptions: undefined, }; const webAttribution = new WebAttribution(option, overrideMockConfig); jest.spyOn(CampaignParser.prototype, 'parse').mockResolvedValueOnce({ ...BASE_CAMPAIGN, utm_source: 'amp-test', }); jest.spyOn(webAttribution.storage, 'get').mockResolvedValueOnce({ ...BASE_CAMPAIGN, }); await webAttribution.init(); expect(webAttribution.shouldTrackNewCampaign).toBe(true); }); test('should not track campaign without new campaign', async () => { const overrideMockConfig = { ...mockConfig, cookieOptions: undefined, }; const emptyCampaign = { ...BASE_CAMPAIGN }; const webAttribution = new WebAttribution(option, overrideMockConfig); jest.spyOn(CampaignParser.prototype, 'parse').mockResolvedValue(emptyCampaign); jest.spyOn(webAttribution.storage, 'get').mockResolvedValue(emptyCampaign); await webAttribution.init(); expect(webAttribution.shouldTrackNewCampaign).toBe(false); }); test('should generate campaign event with given eventId', async () => { const webAttribution = new WebAttribution(option, mockConfig); const event_id = 1; const campaignEvent = webAttribution.generateCampaignEvent(event_id); expect(campaignEvent.event_id).toBe(event_id); }); test('should set session id on a new Campaign', async () => { const option = { resetSessionOnNewCampaign: true, }; const webAttribution = new WebAttribution(option, mockConfig); jest.spyOn(webAttribution.storage, 'get').mockResolvedValue(undefined); await webAttribution.init(); expect(webAttribution.shouldSetSessionIdOnNewCampaign()).toBe(true); }); test('should not set session id on a new Campaign', async () => { const option = { resetSessionOnNewCampaign: true, }; const webAttribution = new WebAttribution(option, mockConfig); await webAttribution.init(); webAttribution.generateCampaignEvent(); expect(webAttribution.shouldSetSessionIdOnNewCampaign()).toBe(false); }); test('should ignore the campaign for direct traffic in session', async () => { const lastEventTime = Date.now(); const overrideMockConfig = { ...mockConfig, // In session event lastEventTime, }; const webAttribution = new WebAttribution({}, overrideMockConfig); const previousCampaign = { ...BASE_CAMPAIGN, referrer: 'https://www.google.com', referring_domain: 'www.google.com', }; jest.spyOn(CampaignParser.prototype, 'parse').mockResolvedValue(BASE_CAMPAIGN); // Direct Traffic jest.spyOn(webAttribution.storage, 'get').mockResolvedValue(previousCampaign); await webAttribution.init(); expect(webAttribution.shouldTrackNewCampaign).toBe(false); }); test('should not ignore the campaign for direct traffic in new session', async () => { const lastEventTime = Date.now() - 2 * 30 * 60 * 1000; const overrideMockConfig = { ...mockConfig, // Out of session event lastEventTime, }; const webAttribution = new WebAttribution({}, overrideMockConfig); const previousCampaign = { ...BASE_CAMPAIGN, referrer: 'https://www.google.com', referring_domain: 'www.google.com', }; jest.spyOn(CampaignParser.prototype, 'parse').mockResolvedValue(BASE_CAMPAIGN); // Direct Traffic jest.spyOn(webAttribution.storage, 'get').mockImplementation((key: string) => { if (key === webAttribution.webExpStorageKey) { return Promise.resolve(undefined); } if (key === webAttribution.storageKey) { return Promise.resolve(previousCampaign); } return Promise.resolve(undefined); }); await webAttribution.init(); expect(webAttribution.shouldTrackNewCampaign).toBe(true); }); test('should use original campaign from MKTG_ORIGINAL when available', async () => { const webAttribution = new WebAttribution({}, mockConfig); const originalCampaign = { ...BASE_CAMPAIGN, utm_source: 'original-source', utm_campaign: 'original-campaign', }; const previousCampaign = { ...BASE_CAMPAIGN, utm_source: 'previous-source', }; jest.spyOn(CampaignParser.prototype, 'parse').mockResolvedValue({ ...BASE_CAMPAIGN, utm_source: 'parsed-source', }); jest.spyOn(webAttribution.storage, 'get').mockImplementation((key: string) => { if (key === webAttribution.webExpStorageKey) { return Promise.resolve(originalCampaign); // Original campaign exists } if (key === webAttribution.storageKey) { return Promise.resolve(previousCampaign); } return Promise.resolve(undefined); }); const removeSpy = jest.spyOn(webAttribution.storage, 'remove').mockResolvedValue(); await webAttribution.init(); expect(webAttribution.currentCampaign).toEqual(originalCampaign); expect(webAttribution.previousCampaign).toEqual(previousCampaign); expect(removeSpy).toHaveBeenCalledWith(webAttribution.webExpStorageKey); }); }); ================================================ FILE: packages/analytics-browser/test/browser-client.test.ts ================================================ import { CookieStorage, FetchTransport, getAnalyticsConnector, getCookieName, LogLevel, OfflineDisabled, Status, UserSession, AutocaptureOptions, Identify, RemoteConfigClient, DiagnosticsClient, } from '@amplitude/analytics-core'; import { WebAttribution } from '../src/attribution/web-attribution'; import * as core from '@amplitude/analytics-core'; import * as pageViewTracking from '@amplitude/plugin-page-view-tracking-browser'; import * as eventPropertyTracking from '@amplitude/plugin-event-property-attribution-browser'; import * as autocapture from '@amplitude/plugin-autocapture-browser'; import * as networkCapturePlugin from '@amplitude/plugin-network-capture-browser'; import * as webVitals from '@amplitude/plugin-web-vitals-browser'; import { AmplitudeBrowser } from '../src/browser-client'; import * as Config from '../src/config'; import * as CookieMigration from '../src/cookie-migration'; import * as fileDownloadTracking from '../src/plugins/file-download-tracking'; import * as formInteractionTracking from '../src/plugins/form-interaction-tracking'; import * as networkConnectivityChecker from '../src/plugins/network-connectivity-checker'; import * as SnippetHelper from '../src/utils/snippet-helper'; import * as joinedConfig from '../src/config/joined-config'; import * as pageUrlEnrichment from '@amplitude/plugin-page-url-enrichment-browser'; import * as customEnrichment from '@amplitude/plugin-custom-enrichment-browser'; // Mock RemoteConfigClient constructor const mockRemoteConfigClient = { subscribe: jest .fn() .mockImplementation( (_configKey: string, _eventType: string, callback: (remoteConfig: any, source: any, lastFetch: Date) => void) => { // Call the callback immediately with remoteConfig as null callback(null, 'cache', new Date()); }, ), unsubscribe: jest.fn(), updateConfigs: jest.fn(), }; let MockedRemoteConfigClient: jest.SpyInstance; let originalRemoteConfigClient: typeof RemoteConfigClient; jest.mock('web-vitals', () => ({ onLCP: jest.fn(), onFCP: jest.fn(), onINP: jest.fn(), onCLS: jest.fn(), onTTFB: jest.fn(), })); describe('browser-client', () => { let apiKey = ''; let userId = ''; let deviceId = ''; let client = new AmplitudeBrowser(); const testDeviceId = 'test-device-id'; const testSessionId = 12345; const url = new URL(`https://www.example.com?ampDeviceId=${testDeviceId}&SessionId=${testSessionId}`); const defaultTracking = { attribution: false, fileDownloadTracking: false, formInteractionTracking: false, pageViews: false, sessions: false, }; beforeEach(() => { client = new AmplitudeBrowser(); apiKey = core.UUID(); userId = core.UUID(); deviceId = core.UUID(); // Set up RemoteConfigClient mock originalRemoteConfigClient = core.RemoteConfigClient; MockedRemoteConfigClient = jest.fn().mockImplementation(() => mockRemoteConfigClient); Object.defineProperty(core, 'RemoteConfigClient', { value: MockedRemoteConfigClient, writable: true, configurable: true, }); }); afterEach(() => { jest.clearAllMocks(); // clean up cookies document.cookie = `AMP_${apiKey}=null; expires=-1`; // clean up RemoteConfigClient mock if (MockedRemoteConfigClient) { Object.defineProperty(core, 'RemoteConfigClient', { value: originalRemoteConfigClient, writable: true, configurable: true, }); } }); describe('plugin', () => { test('should return plugin by name', async () => { const fileDownloadTrackingPlugin = jest.spyOn(fileDownloadTracking, 'fileDownloadTracking'); await client.init(apiKey, userId, { optOut: false, defaultTracking: { ...defaultTracking, fileDownloads: true, }, }).promise; const result = client.plugin('@amplitude/plugin-file-download-tracking-browser'); // result should be fileDownloadTrackingPlugin // comparing with the first call to the spy expect(result).toBe(fileDownloadTrackingPlugin.mock.results[0].value); }); test('should return undefined when name doesn not exist', async () => { const loggerProvider = { log: jest.fn(), debug: jest.fn(), warn: jest.fn(), error: jest.fn(), enable: jest.fn(), disable: jest.fn(), }; await client.init(apiKey, userId, { optOut: false, defaultTracking: { ...defaultTracking, fileDownloads: true, }, loggerProvider: loggerProvider, }).promise; const result = client.plugin('plugin-file-download-tracking-browser'); // result should be fileDownloadTrackingPlugin // comparing with the first call to the spy expect(result).toBe(undefined); expect(loggerProvider.debug).toHaveBeenCalledWith( 'Cannot find plugin with name plugin-file-download-tracking-browser', ); }); }); describe('init', () => { test('should call identify when identify is provided', async () => { const trackSpy = jest.spyOn(client, 'track'); const identify = new Identify(); identify.set('test', '123'); await client.init(apiKey, { identify, }).promise; expect(trackSpy).toHaveBeenNthCalledWith(2, { event_type: '$identify', user_properties: { $set: { test: '123' } }, }); }); test('should use remote config by default', async () => { await client.init(apiKey).promise; expect(MockedRemoteConfigClient).toHaveBeenCalled(); }); test('should use remote config when fetchRemoteConfig is true', async () => { await client.init(apiKey, { fetchRemoteConfig: true, }).promise; expect(MockedRemoteConfigClient).toHaveBeenCalled(); }); test('should NOT use remote config when fetchRemoteConfig is false', async () => { await client.init(apiKey, { fetchRemoteConfig: false, }).promise; expect(MockedRemoteConfigClient).not.toHaveBeenCalled(); }); test('should pass remoteConfig.serverUrl to RemoteConfigClient when provided', async () => { const customServerUrl = 'https://my-proxy.com/remote-config'; await client.init(apiKey, { remoteConfig: { serverUrl: customServerUrl, }, }).promise; expect(MockedRemoteConfigClient).toHaveBeenCalledWith( apiKey, expect.anything(), // loggerProvider 'US', // default serverZone customServerUrl, // our custom URL ); }); test('should call updateBrowserConfigWithRemoteConfig when remoteConfig is not null', async () => { const mockRemoteConfig = { autocapture: { elementInteractions: true, pageViews: true, }, }; // Mock the remote config client to return a non-null remoteConfig const mockRemoteConfigClientWithData = { subscribe: jest .fn() .mockImplementation( ( _configKey: string, _eventType: string, callback: (remoteConfig: any, source: any, lastFetch: Date) => void, ) => { // Call the callback immediately with a non-null remoteConfig callback(mockRemoteConfig, 'cache', new Date()); }, ), unsubscribe: jest.fn(), updateConfigs: jest.fn(), }; // Replace the default mock with our data mock MockedRemoteConfigClient = jest.fn().mockImplementation(() => mockRemoteConfigClientWithData); Object.defineProperty(core, 'RemoteConfigClient', { value: MockedRemoteConfigClient, writable: true, configurable: true, }); // Spy on the updateBrowserConfigWithRemoteConfig function const updateBrowserConfigSpy = jest.spyOn(joinedConfig, 'updateBrowserConfigWithRemoteConfig'); await client.init(apiKey, { fetchRemoteConfig: true, }).promise; // Verify that updateBrowserConfigWithRemoteConfig was called expect(updateBrowserConfigSpy).toHaveBeenCalledTimes(1); expect(updateBrowserConfigSpy).toHaveBeenCalledWith( mockRemoteConfig, expect.any(Object), // browserOptions ); updateBrowserConfigSpy.mockRestore(); }); test('should update diagnostics config from remote config', async () => { const mockMainRemoteConfig = { autocapture: { elementInteractions: true, }, }; const mockDiagnosticsRemoteConfig = { enabled: true, sampleRate: 0.25, }; // Mock the remote config client to return different configs based on the subscription key const mockRemoteConfigClientWithDiagnostics = { subscribe: jest .fn() .mockImplementation( ( configKey: string, _eventType: string, callback: (remoteConfig: any, source: any, lastFetch: Date) => void, ) => { // Return different configs based on the subscription key if (configKey === 'configs.analyticsSDK.browserSDK') { callback(mockMainRemoteConfig, 'cache', new Date()); } else if (configKey === 'configs.diagnostics.browserSDK') { callback(mockDiagnosticsRemoteConfig, 'cache', new Date()); } else { callback(null, 'cache', new Date()); } }, ), unsubscribe: jest.fn(), updateConfigs: jest.fn(), }; // Replace the default mock with our data mock MockedRemoteConfigClient = jest.fn().mockImplementation(() => mockRemoteConfigClientWithDiagnostics); Object.defineProperty(core, 'RemoteConfigClient', { value: MockedRemoteConfigClient, writable: true, configurable: true, }); // Initialize the client await client.init(apiKey, { fetchRemoteConfig: true, }).promise; // Verify that subscribe was called with the correct keys expect(mockRemoteConfigClientWithDiagnostics.subscribe).toHaveBeenCalledWith( 'configs.analyticsSDK.browserSDK', 'all', expect.any(Function), ); expect(mockRemoteConfigClientWithDiagnostics.subscribe).toHaveBeenCalledWith( 'configs.diagnostics.browserSDK', 'all', expect.any(Function), ); // Verify that the diagnostics config was applied expect(client.config.enableDiagnostics).toBe(true); expect(client.config.diagnosticsSampleRate).toBe(0.25); }); test.each([ { testName: 'should use remote config sample rate of 0 even when _diagnosticsSampleRate is non-zero', setDiagnosticsSampleRate: 0.5, remoteConfigSampleRate: { enabled: true, sampleRate: 0 }, expectedSampleRate: 0, expectedEnabled: true, serverZone: undefined, enableDiagnostics: undefined, description: '0 from remote config (not 0.5 from _diagnosticsSampleRate)', }, { testName: 'should use _diagnosticsSampleRate when remote config for diagnostics is null', setDiagnosticsSampleRate: 0.75, remoteConfigSampleRate: null, expectedSampleRate: 0.75, expectedEnabled: true, serverZone: undefined, enableDiagnostics: undefined, description: '0.75 from _diagnosticsSampleRate (remote config is null)', }, { testName: 'should use provided serverZone and enableDiagnostics options', setDiagnosticsSampleRate: 0, remoteConfigSampleRate: null, expectedSampleRate: 0, expectedEnabled: false, serverZone: 'EU' as const, enableDiagnostics: false, description: 'EU serverZone and enableDiagnostics=false from options', }, ])( '$testName', async ({ setDiagnosticsSampleRate, remoteConfigSampleRate, expectedSampleRate, expectedEnabled, serverZone, enableDiagnostics, }) => { // Set _diagnosticsSampleRate client._setDiagnosticsSampleRate(setDiagnosticsSampleRate); const mockMainRemoteConfig = { autocapture: { elementInteractions: true, }, }; // Mock the remote config client to return different configs based on the subscription key const mockRemoteConfigClientWithDiagnostics = { subscribe: jest .fn() .mockImplementation( ( configKey: string, _eventType: string, callback: (remoteConfig: any, source: any, lastFetch: Date) => void, ) => { // Return different configs based on the subscription key if (configKey === 'configs.analyticsSDK.browserSDK') { callback(mockMainRemoteConfig, 'cache', new Date()); } else if (configKey === 'configs.diagnostics.browserSDK') { callback(remoteConfigSampleRate, 'cache', new Date()); } else { callback(null, 'cache', new Date()); } }, ), unsubscribe: jest.fn(), updateConfigs: jest.fn(), }; // Replace the default mock with our data mock MockedRemoteConfigClient = jest.fn().mockImplementation(() => mockRemoteConfigClientWithDiagnostics); Object.defineProperty(core, 'RemoteConfigClient', { value: MockedRemoteConfigClient, writable: true, configurable: true, }); // Mock DiagnosticsClient to spy on its initialization const mockDiagnosticsClient = { setTag: jest.fn(), enable: jest.fn(), disable: jest.fn(), track: jest.fn(), recordEvent: jest.fn(), increment: jest.fn(), }; const diagnosticsClientSpy = jest .spyOn(core, 'DiagnosticsClient') .mockImplementation(() => mockDiagnosticsClient as unknown as DiagnosticsClient); // Initialize the client with optional serverZone and enableDiagnostics await client.init(apiKey, { fetchRemoteConfig: true, ...(serverZone !== undefined && { serverZone }), ...(enableDiagnostics !== undefined && { enableDiagnostics }), }).promise; // Verify that DiagnosticsClient was called with the expected values expect(diagnosticsClientSpy).toHaveBeenCalledWith( apiKey, expect.any(Object), // loggerProvider serverZone ?? 'US', // serverZone from options or default { enabled: expectedEnabled, sampleRate: expectedSampleRate, }, ); // Verify that the diagnostics config was applied expect(client.config.enableDiagnostics).toBe(expectedEnabled); expect(client.config.diagnosticsSampleRate).toBe(expectedSampleRate); // Clean up diagnosticsClientSpy.mockRestore(); }, ); test('should initialize client', async () => { const parseLegacyCookies = jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, }); await client.init(apiKey, userId, { defaultTracking, identityStorage: 'localStorage', }).promise; expect(parseLegacyCookies).toHaveBeenCalledTimes(1); }); test('should initialize w/o user id and config', async () => { client.setOptOut(true); await client.init(apiKey).promise; expect(client.getUserId()).toBe(undefined); }); test('should set initialize with undefined user id', async () => { client.setOptOut(true); await client.init(apiKey, undefined).promise; expect(client.getUserId()).toBe(undefined); }); test('should initialize w/o config', async () => { client.setOptOut(true); await client.init(apiKey, userId).promise; expect(client.getUserId()).toBe(userId); }); test('should set user id with top level parameter', async () => { client.setOptOut(true); await client.init(apiKey, undefined, { userId, }).promise; expect(client.getUserId()).toBe(undefined); }); test('should set user to options.userId', async () => { client.setOptOut(true); await client.init(apiKey, { userId, }).promise; expect(client.getUserId()).toBe(userId); }); test('should set user id using top level parameter as priority', async () => { client.setOptOut(true); await client.init(apiKey, userId, { userId: 'user@amplitude.com', }).promise; expect(client.getUserId()).toBe(userId); }); test('should initialize with existing session', async () => { const parseLegacyCookies = jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, lastEventTime: Date.now(), }); await client.init(apiKey, userId, { sessionId: Date.now(), defaultTracking, }).promise; expect(parseLegacyCookies).toHaveBeenCalledTimes(1); }); test('should initialize without error when apiKey is undefined', async () => { const parseLegacyCookies = jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, }); // eslint-disable-next-line @typescript-eslint/no-unsafe-argument await client.init(undefined as any, userId, { defaultTracking, }).promise; expect(parseLegacyCookies).toHaveBeenCalledTimes(1); }); test('should init from legacy cookies config', async () => { const parseLegacyCookies = jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, deviceId, sessionId: 1, lastEventTime: Date.now() - 1000, }); await client.init(apiKey, userId, { optOut: false, defaultTracking, identityStorage: 'none', }).promise; expect(client.getDeviceId()).toBe(deviceId); expect(client.getSessionId()).toBe(1); expect(parseLegacyCookies).toHaveBeenCalledTimes(1); }); test('should init from new cookies config', async () => { const parseLegacyCookies = jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, }); const cookieStorage = new CookieStorage(); await cookieStorage.set(getCookieName(apiKey), { deviceId, lastEventTime: Date.now(), optOut: false, sessionId: 1, userId, }); await client.init(apiKey, { defaultTracking, }).promise; expect(client.getUserId()).toBe(userId); expect(client.getDeviceId()).toBe(deviceId); expect(client.getSessionId()).toBe(1); expect(parseLegacyCookies).toHaveBeenCalledTimes(1); }); test('should call prevent concurrent init executions', async () => { const parseLegacyCookies = jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, }); const useBrowserConfig = jest.spyOn(Config, 'useBrowserConfig'); await Promise.all([ client.init(apiKey, userId, { defaultTracking }).promise, client.init(apiKey, userId, { defaultTracking }).promise, client.init(apiKey, userId, { defaultTracking }).promise, ]); // NOTE: `parseLegacyCookies` and `useBrowserConfig` are only called once despite multiple init calls expect(parseLegacyCookies).toHaveBeenCalledTimes(1); expect(useBrowserConfig).toHaveBeenCalledTimes(1); }); test('should set user id and device id in analytics connector', async () => { await client.init(apiKey, userId, { optOut: true, defaultTracking, deviceId, identityStorage: 'none', }).promise; expect(client.getDeviceId()).toBe(deviceId); expect(client.getUserId()).toBe(userId); const identity = getAnalyticsConnector().identityStore.getIdentity(); expect(identity.deviceId).toBe(deviceId); expect(identity.userId).toBe(userId); }); test('should set up event bridge and track events', async () => { await client.init(apiKey, userId, { optOut: false, defaultTracking, }).promise; const track = jest.spyOn(client, 'track').mockReturnValueOnce({ promise: Promise.resolve({ code: 200, message: '', event: { event_type: 'event_type', }, }), }); getAnalyticsConnector().eventBridge.logEvent({ eventType: 'event_type', eventProperties: { k: 'v', }, }); expect(track).toHaveBeenCalledTimes(1); }); test('should handle event bridge events with time property in eventProperties', async () => { await client.init(apiKey, userId, { optOut: false, defaultTracking, }).promise; const track = jest.spyOn(client, 'track').mockReturnValueOnce({ promise: Promise.resolve({ code: 200, message: '', event: { event_type: 'custom_event', }, }), }); const customTime = 12345; getAnalyticsConnector().eventBridge.logEvent({ eventType: 'custom_event', eventProperties: { property1: 'value1', property2: 123, time: customTime, property3: true, }, }); expect(track).toHaveBeenCalledTimes(1); expect(track).toHaveBeenCalledWith( 'custom_event', { property1: 'value1', property2: 123, property3: true, }, { time: customTime }, ); }); test('should handle event bridge events with null time property', async () => { await client.init(apiKey, userId, { optOut: false, defaultTracking, }).promise; const track = jest.spyOn(client, 'track').mockReturnValueOnce({ promise: Promise.resolve({ code: 200, message: '', event: { event_type: 'null_time_event', }, }), }); getAnalyticsConnector().eventBridge.logEvent({ eventType: 'null_time_event', eventProperties: { property1: 'value1', time: null, property2: 'value2', }, }); expect(track).toHaveBeenCalledTimes(1); expect(track).toHaveBeenCalledWith( 'null_time_event', { property1: 'value1', property2: 'value2', }, undefined, ); }); test('should handle event bridge events with no eventProperties', async () => { await client.init(apiKey, userId, { optOut: false, defaultTracking, }).promise; const track = jest.spyOn(client, 'track').mockReturnValueOnce({ promise: Promise.resolve({ code: 200, message: '', event: { event_type: 'no_props_event', }, }), }); getAnalyticsConnector().eventBridge.logEvent({ eventType: 'no_props_event', }); expect(track).toHaveBeenCalledTimes(1); expect(track).toHaveBeenCalledWith('no_props_event', {}, undefined); }); test('should add file download and form interaction tracking plugins', async () => { const fileDownloadTrackingPlugin = jest.spyOn(fileDownloadTracking, 'fileDownloadTracking'); const formInteractionTrackingPlugin = jest.spyOn(formInteractionTracking, 'formInteractionTracking'); await client.init(apiKey, userId, { optOut: false, defaultTracking: { ...defaultTracking, fileDownloads: true, formInteractions: true, }, }).promise; expect(fileDownloadTrackingPlugin).toHaveBeenCalledTimes(1); expect(formInteractionTrackingPlugin).toHaveBeenCalledTimes(1); }); test('should NOT add file download and form interaction tracking plugins', async () => { const fileDownloadTrackingPlugin = jest.spyOn(fileDownloadTracking, 'fileDownloadTracking'); const formInteractionTrackingPlugin = jest.spyOn(formInteractionTracking, 'formInteractionTracking'); await client.init(apiKey, userId, { optOut: false, defaultTracking: { ...defaultTracking, fileDownloads: false, formInteractions: false, }, }).promise; expect(fileDownloadTrackingPlugin).toHaveBeenCalledTimes(0); expect(formInteractionTrackingPlugin).toHaveBeenCalledTimes(0); }); test('should add network connectivity checker plugin by default', async () => { const networkConnectivityCheckerPlugin = jest.spyOn( networkConnectivityChecker, 'networkConnectivityCheckerPlugin', ); await client.init(apiKey, userId).promise; expect(networkConnectivityCheckerPlugin).toHaveBeenCalledTimes(1); }); test('should not add network connectivity checker plugin if offline is disabled', async () => { const networkConnectivityCheckerPlugin = jest.spyOn( networkConnectivityChecker, 'networkConnectivityCheckerPlugin', ); await client.init(apiKey, userId, { offline: OfflineDisabled, }).promise; expect(networkConnectivityCheckerPlugin).toHaveBeenCalledTimes(0); }); test('should add frustration interactions plugin when autocapture is set', async () => { const frustrationInteractionsPlugin = jest.spyOn(autocapture, 'frustrationPlugin'); await client.init(apiKey, userId, { autocapture: { frustrationInteractions: true, }, }).promise; expect(frustrationInteractionsPlugin).toHaveBeenCalledTimes(1); }); test('should add performance tracking plugin when autocapture.performanceTracking is set', async () => { const performanceTrackingPlugin = jest.spyOn(autocapture, 'performancePlugin'); await client.init(apiKey, userId, { autocapture: { performanceTracking: true, }, }).promise; expect(performanceTrackingPlugin).toHaveBeenCalledTimes(1); expect(performanceTrackingPlugin).toHaveBeenCalledWith({ mainThreadBlock: true }); }); test('should NOT add performance tracking plugin by default', async () => { const performanceTrackingPlugin = jest.spyOn(autocapture, 'performancePlugin'); await client.init(apiKey, userId).promise; expect(performanceTrackingPlugin).toHaveBeenCalledTimes(0); }); test('should NOT add performance tracking plugin when autocapture=true', async () => { const performanceTrackingPlugin = jest.spyOn(autocapture, 'performancePlugin'); await client.init(apiKey, userId, { autocapture: true, }).promise; expect(performanceTrackingPlugin).toHaveBeenCalledTimes(0); }); test('should register autocapture and performance plugins when both element interactions and performance tracking are enabled', async () => { await client.init(apiKey, userId, { autocapture: { elementInteractions: true, performanceTracking: true, }, }).promise; const names = client.timeline.plugins.map((p) => p.name); expect(names).toContain('@amplitude/plugin-autocapture-browser'); expect(names).toContain('@amplitude/plugin-performance-browser'); }); test('should add page view tracking plugin by default', async () => { const pageViewTrackingPlugin = jest.spyOn(pageViewTracking, 'pageViewTrackingPlugin'); await client.init(apiKey, userId).promise; expect(pageViewTrackingPlugin).toHaveBeenCalledTimes(1); }); test('should NOT add page view tracking plugin when DET is disabled', async () => { const pageViewTrackingPlugin = jest.spyOn(pageViewTracking, 'pageViewTrackingPlugin'); await client.init(apiKey, userId, { defaultTracking: false, }).promise; expect(pageViewTrackingPlugin).toHaveBeenCalledTimes(0); }); test('should NOT add page view tracking plugin when page view is disabled', async () => { const pageViewTrackingPlugin = jest.spyOn(pageViewTracking, 'pageViewTrackingPlugin'); await client.init(apiKey, userId, { defaultTracking: { pageViews: false, }, }).promise; expect(pageViewTrackingPlugin).toHaveBeenCalledTimes(0); }); test('should NOT add default tracking plugins when autocapture is disabled', async () => { const pageViewTrackingPlugin = jest.spyOn(pageViewTracking, 'pageViewTrackingPlugin'); const fileDownloadTrackingPlugin = jest.spyOn(fileDownloadTracking, 'fileDownloadTracking'); const formInteractionTrackingPlugin = jest.spyOn(formInteractionTracking, 'formInteractionTracking'); await client.init(apiKey, userId, { autocapture: { pageViews: false, fileDownloads: false, formInteractions: false, }, }).promise; expect(pageViewTrackingPlugin).toHaveBeenCalledTimes(0); expect(fileDownloadTrackingPlugin).toHaveBeenCalledTimes(0); expect(formInteractionTrackingPlugin).toHaveBeenCalledTimes(0); }); test.each([true, { elementInteractions: true }])( 'should add autocapture plugin', async (option: boolean | AutocaptureOptions) => { const autocapturePlugin = jest.spyOn(autocapture, 'autocapturePlugin'); await client.init(apiKey, userId, { autocapture: option, }).promise; expect(autocapturePlugin).toHaveBeenCalledTimes(1); }, ); test.each([ undefined, // default false, // disabled { elementInteractions: false }, // disabled ])('should NOT add autocapture plugin', async (option: undefined | boolean | AutocaptureOptions) => { const autocapturePlugin = jest.spyOn(autocapture, 'autocapturePlugin'); await client.init(apiKey, userId, { autocapture: option, }).promise; expect(autocapturePlugin).toHaveBeenCalledTimes(0); }); test('should use network tracking plugin when autocapture.networkTracking is on', async () => { const networkTrackingPlugin = jest.spyOn(networkCapturePlugin, 'plugin'); await client.init(apiKey, userId, { autocapture: { networkTracking: true, }, }).promise; expect(networkTrackingPlugin).toHaveBeenCalledTimes(1); }); test('should use web vitals plugin when autocapture.webVitals is on', async () => { const webVitalsPlugin = jest.spyOn(webVitals, 'webVitalsPlugin'); await client.init(apiKey, userId, { autocapture: { webVitals: true, }, }).promise; expect(webVitalsPlugin).toHaveBeenCalledTimes(1); }); test('should listen for network change to online', async () => { jest.useFakeTimers(); const addEventListenerMock = jest.spyOn(window, 'addEventListener'); const flush = jest.spyOn(client, 'flush').mockReturnValue({ promise: Promise.resolve() }); const loggerProvider = { log: jest.fn(), debug: jest.fn(), warn: jest.fn(), error: jest.fn(), enable: jest.fn(), disable: jest.fn(), }; await client.init(apiKey, { defaultTracking: false, loggerProvider: loggerProvider, }).promise; window.dispatchEvent(new Event('online')); expect(addEventListenerMock).toHaveBeenCalledWith('online', expect.any(Function)); expect(client.config.offline).toBe(false); expect(loggerProvider.debug).toHaveBeenCalledWith('Network connectivity changed to online.'); jest.advanceTimersByTime(client.config.flushIntervalMillis); expect(flush).toHaveBeenCalledTimes(1); jest.useRealTimers(); addEventListenerMock.mockRestore(); flush.mockRestore(); }); test('should listen for network change to offline', async () => { jest.useFakeTimers(); const addEventListenerMock = jest.spyOn(window, 'addEventListener'); const loggerProvider = { log: jest.fn(), debug: jest.fn(), warn: jest.fn(), error: jest.fn(), enable: jest.fn(), disable: jest.fn(), }; await client.init(apiKey, { defaultTracking: false, loggerProvider: loggerProvider, }).promise; expect(client.config.offline).toBe(false); window.dispatchEvent(new Event('offline')); expect(addEventListenerMock).toHaveBeenCalledWith('offline', expect.any(Function)); expect(client.config.offline).toBe(true); expect(loggerProvider.debug).toHaveBeenCalledWith('Network connectivity changed to offline.'); jest.useRealTimers(); addEventListenerMock.mockRestore(); }); test('should not support offline mode if global scope returns undefined', async () => { const getGlobalScopeMock = jest.spyOn(core, 'getGlobalScope').mockReturnValueOnce(undefined); const addEventListenerMock = jest.spyOn(window, 'addEventListener'); await client.init(apiKey, { defaultTracking: false, }).promise; window.dispatchEvent(new Event('online')); expect(client.config.offline).toBe(false); client.config.offline = true; window.dispatchEvent(new Event('offline')); expect(client.config.offline).toBe(true); getGlobalScopeMock.mockRestore(); addEventListenerMock.mockRestore(); }); test('should add page url previous page plugin if pageUrlEnrichment is true', async () => { const pageUrlEnrichmentPlugin = jest.spyOn(pageUrlEnrichment, 'pageUrlEnrichmentPlugin'); await client.init(apiKey, userId, { autocapture: { pageUrlEnrichment: true, }, }).promise; expect(pageUrlEnrichmentPlugin).toHaveBeenCalledTimes(1); }); test('should NOT add page url previous page plugin if pageUrlEnrichment is false', async () => { const pageUrlEnrichmentPlugin = jest.spyOn(pageUrlEnrichment, 'pageUrlEnrichmentPlugin'); await client.init(apiKey, userId, { autocapture: { pageUrlEnrichment: false, }, }).promise; expect(pageUrlEnrichmentPlugin).toHaveBeenCalledTimes(0); }); test('should add page url previous page plugin if pageUrlEnrichment is undefined', async () => { const pageUrlEnrichmentPlugin = jest.spyOn(pageUrlEnrichment, 'pageUrlEnrichmentPlugin'); await client.init(apiKey, userId, { autocapture: {}, }).promise; expect(pageUrlEnrichmentPlugin).toHaveBeenCalledTimes(1); }); test('should add event property attribution plugin for event property tracking', async () => { jest.spyOn(core.CampaignParser.prototype, 'parse').mockResolvedValue({ ...core.BASE_CAMPAIGN, utm_source: 'amp-test', }); const eventPropertyTrackingPlugin = jest.spyOn(eventPropertyTracking, 'eventPropertyTrackingPlugin'); const webAttributionInit = jest.spyOn(WebAttribution.prototype, 'init'); await client.init(apiKey, userId, { fetchRemoteConfig: false, defaultTracking: { attribution: { trackingMethod: 'eventProperty', }, pageViews: false, sessions: false, }, }).promise; expect(eventPropertyTrackingPlugin).toHaveBeenCalledTimes(1); expect(eventPropertyTrackingPlugin).toHaveBeenCalledWith( expect.objectContaining({ trackingMethod: 'eventProperty', }), ); expect(webAttributionInit).not.toHaveBeenCalled(); }); test('should add web attribution plugin for user property tracking only', async () => { jest.spyOn(core.CampaignParser.prototype, 'parse').mockResolvedValue({ ...core.BASE_CAMPAIGN, utm_source: 'amp-test', }); const eventPropertyTrackingPlugin = jest.spyOn(eventPropertyTracking, 'eventPropertyTrackingPlugin'); const webAttributionInit = jest.spyOn(WebAttribution.prototype, 'init'); await client.init(apiKey, userId, { fetchRemoteConfig: false, defaultTracking: { attribution: { trackingMethod: 'userProperty', }, pageViews: false, sessions: false, }, }).promise; expect(webAttributionInit).toHaveBeenCalledTimes(1); expect(eventPropertyTrackingPlugin).not.toHaveBeenCalled(); }); test('should add both attribution plugins when both tracking methods are enabled', async () => { jest.spyOn(core.CampaignParser.prototype, 'parse').mockResolvedValue({ ...core.BASE_CAMPAIGN, utm_source: 'amp-test', }); const eventPropertyTrackingPlugin = jest.spyOn(eventPropertyTracking, 'eventPropertyTrackingPlugin'); const webAttributionInit = jest.spyOn(WebAttribution.prototype, 'init'); await client.init(apiKey, userId, { fetchRemoteConfig: false, defaultTracking: { attribution: { trackingMethod: ['userProperty', 'eventProperty'], }, pageViews: false, sessions: false, }, }).promise; expect(webAttributionInit).toHaveBeenCalledTimes(1); expect(eventPropertyTrackingPlugin).toHaveBeenCalledTimes(1); expect(eventPropertyTrackingPlugin).toHaveBeenCalledWith( expect.objectContaining({ trackingMethod: ['userProperty', 'eventProperty'], }), ); }); test('should enrich same-tick track calls with the latest campaign after pushState', async () => { jest .spyOn(core.CampaignParser.prototype, 'parse') .mockResolvedValueOnce({ ...core.BASE_CAMPAIGN, utm_source: 'campaign-a', }) .mockResolvedValueOnce({ ...core.BASE_CAMPAIGN, utm_source: 'campaign-b', }); let capturedEvent: core.Event | undefined; await client.init(apiKey, userId, { fetchRemoteConfig: false, defaultTracking: { attribution: { trackingMethod: 'eventProperty', }, pageViews: false, sessions: false, }, }).promise; await client.add({ name: 'capture-event-property-attribution', type: 'enrichment', setup: async () => { return; }, execute: async (event) => { capturedEvent = event; return event; }, }).promise; window.history.pushState(undefined, '', '/next?utm_source=campaign-b'); void client .track('test-event', { existing: 'value', }) .promise.catch(() => undefined); await new Promise((resolve) => setTimeout(resolve, 10)); expect(capturedEvent).toBeDefined(); expect(capturedEvent).toEqual( expect.objectContaining({ event_type: 'test-event', event_properties: expect.objectContaining({ existing: 'value', utm_source: 'campaign-b', }), }), ); }); test('should add custom enrichment plugin when customEnrichment is an object with enabled=true', async () => { const customEnrichmentPlugin = jest.spyOn(customEnrichment, 'customEnrichmentPlugin'); await client.init(apiKey, userId, { customEnrichment: { enabled: true, body: 'test' }, }).promise; expect(customEnrichmentPlugin).toHaveBeenCalledTimes(1); }); test('should NOT add custom enrichment plugin when customEnrichment is undefined', async () => { const customEnrichmentPlugin = jest.spyOn(customEnrichment, 'customEnrichmentPlugin'); await client.init(apiKey, userId).promise; expect(customEnrichmentPlugin).toHaveBeenCalledTimes(0); }); test('should NOT add custom enrichment plugin when customEnrichment is an object with enabled=false', async () => { const customEnrichmentPlugin = jest.spyOn(customEnrichment, 'customEnrichmentPlugin'); await client.init(apiKey, userId, { customEnrichment: { enabled: false, body: 'test' }, }).promise; expect(customEnrichmentPlugin).toHaveBeenCalledTimes(0); }); test('should NOT add custom enrichment plugin when customEnrichment is false', async () => { const customEnrichmentPluginSpy = jest.spyOn(customEnrichment, 'customEnrichmentPlugin'); await client.init(apiKey, userId, { customEnrichment: false, }).promise; expect(customEnrichmentPluginSpy).toHaveBeenCalledTimes(0); }); test('should NOT add custom enrichment plugin when customEnrichment is false even if remote config enables it', async () => { const mockRemoteConfigWithCustomEnrichment = { subscribe: jest .fn() .mockImplementation( ( configKey: string, _eventType: string, callback: (remoteConfig: any, source: any, lastFetch: Date) => void, ) => { if (configKey === 'configs.analyticsSDK.browserSDK') { callback({ customEnrichment: { enabled: true, body: 'return event;' } }, 'cache', new Date()); } else { callback(null, 'cache', new Date()); } }, ), unsubscribe: jest.fn(), updateConfigs: jest.fn(), }; MockedRemoteConfigClient = jest.fn().mockImplementation(() => mockRemoteConfigWithCustomEnrichment); Object.defineProperty(core, 'RemoteConfigClient', { value: MockedRemoteConfigClient, writable: true, configurable: true, }); const customEnrichmentPluginSpy = jest.spyOn(customEnrichment, 'customEnrichmentPlugin'); await client.init(apiKey, userId, { fetchRemoteConfig: true, customEnrichment: false, }).promise; expect(customEnrichmentPluginSpy).toHaveBeenCalledTimes(0); }); test.each([[url], [new URL(`https://www.example.com?deviceId=${testDeviceId}`)]])( 'should set device id from url', async (mockedUrl) => { const originalLocation = window.location; Object.defineProperty(window, 'location', { value: { ...originalLocation, search: mockedUrl.search, } as Location, writable: true, }); await client.init(apiKey, userId, { defaultTracking: false, }).promise; expect(client.config.deviceId).toEqual(testDeviceId); Object.defineProperty(window, 'location', { value: originalLocation, writable: true, }); }, ); test('should set session id from url', async () => { const originalLocation = window.location; Object.defineProperty(window, 'location', { value: { search: url.search, } as Location, writable: true, }); const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, userId, { defaultTracking: { attribution: false, fileDownloads: false, formInteractions: false, pageViews: false, sessions: true, }, }).promise; expect(client.config.sessionId).toEqual(testSessionId); expect(setSessionId).toHaveBeenCalledTimes(1); expect(setSessionId).toHaveBeenLastCalledWith(testSessionId); Object.defineProperty(window, 'location', { value: originalLocation, writable: true, }); }); test.each([[new URL(`https://www.example.com?ampSessionId=test}`)], [new URL(`https://www.example.com`)]])( 'should fall back to other options when session id from url is not Number', async (mockedUrl) => { // Mock window.location const originalLocation = window.location; Object.defineProperty(window, 'location', { value: { search: mockedUrl.search, } as Location, writable: true, }); // Mock Date.now() const originalDate = Date.now; const currentTimestamp = Date.now(); Date.now = jest.fn(() => currentTimestamp); const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, userId, { defaultTracking: { attribution: false, fileDownloads: false, formInteractions: false, pageViews: false, sessions: true, }, }).promise; // should call "setSessionId" with undefined because "test" from ampSessionId is NaN expect(client.config.sessionId).toEqual(currentTimestamp); expect(setSessionId).toHaveBeenCalledTimes(1); expect(setSessionId).toHaveBeenLastCalledWith(undefined); // Restore mocks Object.defineProperty(window, 'location', { value: originalLocation, writable: true, }); Date.now = originalDate; }, ); describe('config.optOut', () => { describe('when optOut is true', () => { beforeEach(async () => { const identity = new Identify(); identity.set('test-property', 'test-value'); await client.init(apiKey, userId, { optOut: true, identify: identity, }).promise; }); test('should defer session + attribution until after optOut changes', async () => { expect(client.config.sessionId).toBeUndefined(); client.setOptOut(false); // give the timeline 10 ms to finish calling the onOptOutChanged listeners await new Promise((resolve) => setTimeout(resolve, 10)); expect(client.config.sessionId).toBeGreaterThan(0); }); test('should defer session but use user specified sessionId if provided', async () => { expect(client.config.sessionId).toBeUndefined(); const id = Date.now() + 10_000; // future timestamp client.setSessionId(id); client.setOptOut(false); await new Promise((resolve) => setTimeout(resolve, 10)); expect(client.config.sessionId).toBe(id); }); test('should defer session + attribution until another init call with optOut false', async () => { expect(client.config.sessionId).toBeUndefined(); await client.init(apiKey, userId, { optOut: false, }).promise; // give the timeline 10 ms to finish calling the onOptOutChanged listeners await new Promise((resolve) => setTimeout(resolve, 10)); expect(client.config.sessionId).toBeGreaterThan(0); }); test('should defer session but use user specified sessionId if set with setSessionId', async () => { expect(client.config.sessionId).toBeUndefined(); const id = Date.now() + 10_000; // future timestamp client.setSessionId(id); await client.init(apiKey, userId, { optOut: false, }).promise; await new Promise((resolve) => setTimeout(resolve, 20)); expect(client.config.sessionId).toBe(id); }); test('should defer session but use user specified sessionId if set in init', async () => { expect(client.config.sessionId).toBeUndefined(); const id = Date.now() + 10_000; // future timestamp await client.init(apiKey, userId, { optOut: false, sessionId: id, }).promise; expect(client.config.sessionId).toBe(id); }); test('should not initialize webAttribution when optOut listener receives true', async () => { // Initialize with optOut: true and attribution enabled to set up the listener await client.init(apiKey, userId, { optOut: true, defaultTracking: { attribution: true, }, }).promise; // Track calls to WebAttribution constructor let webAttributionInitCallCount = 0; /* eslint-disable-next-line @typescript-eslint/unbound-method */ const originalInit = WebAttribution.prototype.init; jest.spyOn(WebAttribution.prototype, 'init').mockImplementation(function (this: WebAttribution) { webAttributionInitCallCount++; return originalInit.call(this); }); // set optOut to false and then true client.setOptOut(false); await new Promise((resolve) => setTimeout(resolve, 10)); client.setOptOut(true); await new Promise((resolve) => setTimeout(resolve, 10)); // should only call init once expect(webAttributionInitCallCount).toBe(1); }); test('should add event property attribution plugin even when optOut is true', async () => { jest.spyOn(core.CampaignParser.prototype, 'parse').mockResolvedValue({ ...core.BASE_CAMPAIGN, utm_source: 'amp-test', }); const eventPropertyTrackingPlugin = jest.spyOn(eventPropertyTracking, 'eventPropertyTrackingPlugin'); await client.init(apiKey, userId, { optOut: true, fetchRemoteConfig: false, defaultTracking: { attribution: { trackingMethod: 'eventProperty', }, pageViews: false, sessions: false, }, }).promise; expect(eventPropertyTrackingPlugin).toHaveBeenCalledTimes(1); expect(eventPropertyTrackingPlugin).toHaveBeenCalledWith( expect.objectContaining({ trackingMethod: 'eventProperty', }), ); }); }); describe('when optOut is false', () => { let sessionId: number | undefined; beforeEach(async () => { await client.init(apiKey, userId, { optOut: false, }).promise; sessionId = client.config.sessionId; }); test('should not change sessionId when optOut changes to true', async () => { expect(sessionId).toBeGreaterThan(0); client.setOptOut(true); expect(client.config.sessionId).toBe(sessionId); }); test('should not change sessionId when another init called again with optOut false', async () => { expect(sessionId).toBeGreaterThan(0); await client.init(apiKey, userId, { optOut: false, }).promise; expect(client.config.sessionId).toBe(sessionId); }); }); }); describe('ampTimestamp validation', () => { const originalLocation = window.location; const originalDateNow = Date.now; const currentTime = 1640995200000; // 2022-01-01 00:00:00 UTC const futureTimestamp = currentTime + 300000; // 5 minutes in the future const pastTimestamp = currentTime - 300000; // 5 minutes in the past const mockedUUID = '1234567890'; beforeEach(() => { Date.now = jest.fn(() => currentTime); // Mock UUID() to return a fixed value jest.spyOn(core, 'UUID').mockReturnValue(mockedUUID); }); afterEach(() => { Object.defineProperty(window, 'location', { value: originalLocation, writable: true, }); Date.now = originalDateNow; }); test('should use ampSessionId when ampTimestamp is valid (future)', async () => { const urlWithValidTimestamp = new URL( `https://www.example.com?ampSessionId=${testSessionId}&Timestamp=${futureTimestamp}`, ); Object.defineProperty(window, 'location', { value: { ...originalLocation, search: urlWithValidTimestamp.search, } as Location, writable: true, }); const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, userId, { defaultTracking: { attribution: false, fileDownloads: false, formInteractions: false, pageViews: false, sessions: true, }, }).promise; expect(client.config.sessionId).toEqual(testSessionId); expect(setSessionId).toHaveBeenCalledWith(testSessionId); }); test('should ignore ampSessionId when ampTimestamp is expired (past)', async () => { const urlWithExpiredTimestamp = new URL( `https://www.example.com?ampSessionId=${testSessionId}&Timestamp=${pastTimestamp}`, ); Object.defineProperty(window, 'location', { value: { ...originalLocation, search: urlWithExpiredTimestamp.search, } as Location, writable: true, }); const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, userId, { defaultTracking: { attribution: false, fileDownloads: false, formInteractions: false, pageViews: false, sessions: true, }, }).promise; // Should fall back to Date.now() instead of using expired ampSessionId expect(client.config.sessionId).toEqual(currentTime); expect(setSessionId).toHaveBeenCalledWith(undefined); }); test('should use ampDeviceId when ampTimestamp is valid (future)', async () => { const urlWithValidTimestamp = new URL( `https://www.example.com?ampDeviceId=${testDeviceId}&Timestamp=${futureTimestamp}`, ); Object.defineProperty(window, 'location', { value: { ...originalLocation, search: urlWithValidTimestamp.search, } as Location, writable: true, }); await client.init(apiKey, userId, { defaultTracking: false, }).promise; expect(client.config.deviceId).toEqual(testDeviceId); }); test('should ignore ampDeviceId when ampTimestamp is expired (past)', async () => { const urlWithExpiredTimestamp = new URL( `https://www.example.com?ampDeviceId=${testDeviceId}&Timestamp=${pastTimestamp}`, ); Object.defineProperty(window, 'location', { value: { ...originalLocation, search: urlWithExpiredTimestamp.search, } as Location, writable: true, }); await client.init(apiKey, userId, { defaultTracking: false, }).promise; // Should generate new device ID instead of using expired ampDeviceId expect(client.config.deviceId).toEqual(mockedUUID); }); test('should work as before when ampTimestamp is missing (backward compatibility)', async () => { const urlWithoutTimestamp = new URL( `https://www.example.com?ampSessionId=${testSessionId}&DeviceId=${testDeviceId}`, ); Object.defineProperty(window, 'location', { value: { ...originalLocation, search: urlWithoutTimestamp.search, } as Location, writable: true, }); const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, userId, { defaultTracking: { attribution: false, fileDownloads: false, formInteractions: false, pageViews: false, sessions: true, }, }).promise; // Should use both parameters when timestamp is missing (backward compatibility) expect(client.config.sessionId).toEqual(testSessionId); expect(client.config.deviceId).toEqual(testDeviceId); expect(setSessionId).toHaveBeenCalledWith(testSessionId); }); test('should handle malformed ampTimestamp gracefully', async () => { const urlWithMalformedTimestamp = new URL( `https://www.example.com?ampSessionId=${testSessionId}&DeviceId=${testDeviceId}&Timestamp=invalid`, ); Object.defineProperty(window, 'location', { value: { ...originalLocation, search: urlWithMalformedTimestamp.search, } as Location, writable: true, }); const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, userId, { defaultTracking: { attribution: false, fileDownloads: false, formInteractions: false, pageViews: false, sessions: true, }, }).promise; // Should treat malformed timestamp as missing and use parameters (backward compatibility) expect(client.config.sessionId).toEqual(testSessionId); expect(client.config.deviceId).toEqual(testDeviceId); expect(setSessionId).toHaveBeenCalledWith(testSessionId); }); test('should use deviceId parameter when ampTimestamp is valid', async () => { const urlWithValidTimestampDeviceId = new URL( `https://www.example.com?deviceId=${testDeviceId}&Timestamp=${futureTimestamp}`, ); Object.defineProperty(window, 'location', { value: { ...originalLocation, search: urlWithValidTimestampDeviceId.search, } as Location, writable: true, }); await client.init(apiKey, userId, { defaultTracking: false, }).promise; expect(client.config.deviceId).toEqual(testDeviceId); }); test('should ignore deviceId parameter when ampTimestamp is expired', async () => { const urlWithExpiredTimestampDeviceId = new URL( `https://www.example.com?deviceId=${testDeviceId}&Timestamp=${pastTimestamp}`, ); Object.defineProperty(window, 'location', { value: { ...originalLocation, search: urlWithExpiredTimestampDeviceId.search, } as Location, writable: true, }); await client.init(apiKey, userId, { defaultTracking: false, }).promise; // Should generate new device ID instead of using expired deviceId parameter expect(client.config.deviceId).not.toEqual(testDeviceId); expect(client.config.deviceId).toBeDefined(); expect(typeof client.config.deviceId).toBe('string'); const { deviceId } = client.config; if (typeof deviceId !== 'string') { throw new Error('Expected deviceId to be a string'); } expect(deviceId.length).toBeGreaterThan(0); }); }); }); describe('getUserId', () => { test('should get user id', async () => { await client.init(apiKey, userId, { defaultTracking }).promise; expect(client.getUserId()).toBe(userId); }); test('should handle undefined config', async () => { expect(client.getUserId()).toBe(undefined); }); }); describe('setUserId', () => { test('should set user id', async () => { await client.init(apiKey, { defaultTracking }).promise; expect(client.getUserId()).toBe(undefined); client.setUserId(userId); expect(client.getUserId()).toBe(userId); }); test('should not set user id', async () => { const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, userId, { defaultTracking }).promise; // Reset mock to isolate mock for `setUserId(...)` call // `setUserId(...)` may have been called on `init(...)` // We do not want to depend on init behavior setSessionId.mockReset(); expect(client.getUserId()).toBe(userId); client.setUserId(userId); expect(setSessionId).toHaveBeenCalledTimes(0); expect(client.getUserId()).toBe(userId); }); test('should not send session events on set user', async () => { jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, sessionId: 1, lastEventTime: Date.now() - 1000, }); const result = { promise: Promise.resolve({ code: 200, event: { event_type: 'a', }, message: 'success', }), }; const track = jest.spyOn(client, 'track').mockReturnValue(result); await client.init(apiKey, userId, { sessionTimeout: 5000, defaultTracking: { ...defaultTracking, sessions: true, }, }).promise; // Reset mock to isolate mock for `track(...)` call // `track(...)` may have been called on `init(...)` // We do not want to depend on init behavior track.mockReset(); client.setUserId(undefined); expect(client.getUserId()).toBe(undefined); expect(track).toHaveBeenCalledTimes(0); }); test('should defer set user id', () => { return new Promise((resolve) => { void client.init(apiKey, { defaultTracking }).promise.then(() => { expect(client.getUserId()).toBe('user@amplitude.com'); resolve(); }); client.setUserId('user@amplitude.com'); }); }); test('should be able to unset user id to undefined', async () => { await client.init(apiKey, userId, { defaultTracking, deviceId, }).promise; expect(client.getUserId()).toBe(userId); expect(client.getDeviceId()).toBe(deviceId); client.setUserId(undefined); expect(client.getUserId()).toBe(undefined); expect(client.getDeviceId()).toBe(deviceId); }); test('should be able to unset user id to undefined after setUserId()', async () => { await client.init(apiKey, { defaultTracking, deviceId, }).promise; expect(client.getUserId()).toBe(undefined); expect(client.getDeviceId()).toBe(deviceId); client.setUserId(userId); expect(client.getUserId()).toBe(userId); expect(client.getDeviceId()).toBe(deviceId); client.setUserId(undefined); expect(client.getUserId()).toBe(undefined); expect(client.getDeviceId()).toBe(deviceId); }); }); describe('getDeviceId', () => { test('should get device id', async () => { await client.init(apiKey, { defaultTracking, deviceId, }).promise; expect(client.getDeviceId()).toBe(deviceId); }); test('should handle undefined config', async () => { expect(client.getDeviceId()).toBe(undefined); }); }); describe('setDeviceId', () => { test('should set device id config', async () => { await client.init(apiKey, { defaultTracking }).promise; client.setDeviceId(deviceId); expect(client.getDeviceId()).toBe(deviceId); }); test('should defer set device id', () => { return new Promise((resolve) => { void client.init(apiKey, { defaultTracking }).promise.then(() => { expect(client.getDeviceId()).toBe('asdfg'); resolve(); }); client.setDeviceId('asdfg'); }); }); }); describe('reset', () => { test('should reset user id and generate new device id config', async () => { await client.init(apiKey, { defaultTracking }).promise; client.setUserId(userId); client.setDeviceId(deviceId); expect(client.getUserId()).toBe(userId); expect(client.getDeviceId()).toBe(deviceId); client.reset(); expect(client.getUserId()).toBe(undefined); expect(client.getDeviceId()).not.toBe(deviceId); }); test('should invoke plugin onReset hooks', async () => { await client.init(apiKey, { defaultTracking }).promise; const onResetMock = jest.fn(); const testPlugin = { name: 'test-reset-plugin', type: 'enrichment' as const, setup: jest.fn().mockResolvedValue(undefined), execute: jest.fn().mockImplementation((event) => Promise.resolve(event)), onReset: onResetMock, }; await client.add(testPlugin).promise; client.reset(); expect(onResetMock).toHaveBeenCalledTimes(1); }); }); describe('getIdentity', () => { test('should get identity', async () => { const userId = 'test-user-id'; const deviceId = 'test-device-id'; await client.init(apiKey, 'test-user-id', { defaultTracking, deviceId, }).promise; const identify = new Identify(); identify.set('test-property', 'test-value'); client.identify(identify); const identity = client.getIdentity(); expect(identity).toEqual({ deviceId: deviceId, userId: userId, userProperties: { 'test-property': 'test-value', }, }); }); test('should handle undefined', () => { const identity = client.getIdentity(); expect(identity).toEqual({ deviceId: undefined, userId: undefined, userProperties: undefined, }); }); test('should update identity after setting userId and deviceId', async () => { await client.init(apiKey, { defaultTracking }).promise; const initialIdentity = client.getIdentity(); expect(initialIdentity.userId).toBe(undefined); client.setUserId(userId); client.setDeviceId(deviceId); const updatedIdentity = client.getIdentity(); expect(updatedIdentity).toEqual({ deviceId: deviceId, userId: userId, userProperties: client.userProperties, }); }); }); describe('setIdentity', () => { test('should set userId via setIdentity', async () => { await client.init(apiKey, { defaultTracking }).promise; expect(client.getUserId()).toBe(undefined); client.setIdentity({ userId: 'new-user-id' }); expect(client.getUserId()).toBe('new-user-id'); }); test('should set deviceId via setIdentity', async () => { await client.init(apiKey, { defaultTracking }).promise; const initialDeviceId = client.getDeviceId(); client.setIdentity({ deviceId: 'new-device-id' }); expect(client.getDeviceId()).toBe('new-device-id'); expect(client.getDeviceId()).not.toBe(initialDeviceId); }); test('should set userProperties and auto-send identify event', async () => { await client.init(apiKey, { defaultTracking }).promise; const identifySpy = jest.spyOn(client, 'identify'); client.setIdentity({ userProperties: { plan: 'premium', theme: 'dark' } }); expect(client.userProperties).toEqual({ plan: 'premium', theme: 'dark' }); expect(identifySpy).toHaveBeenCalledTimes(1); const identity = client.getIdentity(); expect(identity.userProperties).toEqual({ plan: 'premium', theme: 'dark' }); }); test('should set userId and userProperties together', async () => { await client.init(apiKey, { defaultTracking }).promise; const identifySpy = jest.spyOn(client, 'identify'); client.setIdentity({ userId: 'new-user-id', userProperties: { name: 'John' }, }); expect(client.getUserId()).toBe('new-user-id'); expect(client.userProperties).toEqual({ name: 'John' }); expect(identifySpy).toHaveBeenCalledTimes(1); }); test('should defer setIdentity before init', () => { return new Promise((resolve) => { void client.init(apiKey, { defaultTracking }).promise.then(() => { expect(client.getUserId()).toBe('deferred-user'); expect(client.userProperties).toEqual({ deferred: true }); resolve(); }); client.setIdentity({ userId: 'deferred-user', userProperties: { deferred: true } }); }); }); test('should notify plugins of identity change', async () => { await client.init(apiKey, { defaultTracking }).promise; const onIdentityChangedMock = jest.fn(); await client.add({ name: 'test-plugin', type: 'enrichment', setup: async () => { return; }, execute: async (event) => event, onIdentityChanged: onIdentityChangedMock, }).promise; client.setIdentity({ userProperties: { plan: 'premium' } }); expect(onIdentityChangedMock).toHaveBeenCalledWith({ userProperties: { plan: 'premium' } }); }); }); describe('getOptOut', () => { test.each([true, false])('should return opt out value', async (optOut) => { await client.init(apiKey, { defaultTracking, sessionId: 1, optOut, }).promise; expect(client.getOptOut()).toBe(optOut); }); test('should return undefined if opt out is not set', async () => { expect(client.getOptOut()).toBe(undefined); }); }); describe('getSessionId', () => { test('should get session id', async () => { await client.init(apiKey, { defaultTracking, sessionId: 1, }).promise; expect(client.getSessionId()).toBe(1); }); test('should handle undefined config', async () => { expect(client.getSessionId()).toBe(undefined); }); }); describe('setSessionId', () => { test('should set session id', async () => { await client.init(apiKey, { defaultTracking }).promise; client.setSessionId(1); expect(client.getSessionId()).toBe(1); }); test('should set session id with start session event', async () => { const result = { promise: Promise.resolve({ code: 200, event: { event_type: 'a', }, message: 'success', }), }; const track = jest.spyOn(client, 'track').mockReturnValue(result); await client.init(apiKey, { sessionId: 1, defaultTracking: { ...defaultTracking, attribution: false, pageViews: false, sessions: true, }, }).promise; client.setSessionId(2); expect(client.getSessionId()).toBe(2); expect(track).toHaveBeenCalledTimes(3); }); test('should set session id with start and end session event', async () => { jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, sessionId: 1, lastEventId: 100, lastEventTime: Date.now() - 1000, }); const result = { promise: Promise.resolve({ code: 200, event: { event_type: 'a', }, message: 'success', }), }; const track = jest.spyOn(client, 'track').mockReturnValue(result); await client.init(apiKey, { sessionTimeout: 5000, defaultTracking: { ...defaultTracking, attribution: false, pageViews: false, sessions: true, }, }).promise; client.setSessionId(2); expect(client.getSessionId()).toBe(2); expect(track).toHaveBeenCalledTimes(2); }); test('should set session id with start and end session event and web attribution event', async () => { jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, sessionId: 1, lastEventId: 100, lastEventTime: Date.now() - 1000, }); const result = { promise: Promise.resolve({ code: 200, event: { event_type: 'a', }, message: 'success', }), }; const track = jest.spyOn(client, 'track').mockReturnValue(result); await client.init(apiKey, { sessionTimeout: 5000, defaultTracking: { ...defaultTracking, attribution: true, pageViews: false, sessions: true, }, }).promise; client.setSessionId(2); expect(client.getSessionId()).toBe(2); return new Promise((resolve) => { setTimeout(() => { expect(track).toHaveBeenCalledTimes(3); resolve(); }, 4000); }); }); test('should defer set session id', () => { return new Promise((resolve) => { void client.init(apiKey, { defaultTracking }).promise.then(() => { expect(client.getSessionId()).toBe(1); resolve(); }); client.setSessionId(1); }); }); }); describe('extendSession', () => { test('should extend the current session without sending events', async () => { const firstSessionId = 1; const client = new AmplitudeBrowser(); await client.init(apiKey, { sessionTimeout: 20, sessionId: firstSessionId, flushQueueSize: 1, flushIntervalMillis: 1, defaultTracking, }).promise; // assert sessionId is set expect(client.config.sessionId).toBe(firstSessionId); expect(client.config.lastEventTime).toBeUndefined(); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore jest.spyOn(client.config.transportProvider, 'send').mockReturnValue( Promise.resolve({ status: Status.Success, statusCode: 200, body: { eventsIngested: 1, payloadSizeBytes: 1, serverUploadTime: 1, }, }), ); // send an event await client.track('test 1').promise; const eventTime1 = client.config.lastEventTime ?? -1; expect(eventTime1 > 0).toBeTruthy(); // wait for session to almost expire, then extend it await new Promise((resolve) => setTimeout(() => { client.extendSession(); resolve(); }, 15), ); // assert session id is unchanged expect(client.config.sessionId).toBe(firstSessionId); // assert last event time was updated const extendedLastEventTime = client.config.lastEventTime ?? -1; expect(extendedLastEventTime > 0).toBeTruthy(); expect(extendedLastEventTime > eventTime1).toBeTruthy(); // send another event just before session expires (again) // Mock Date.now() because isNewSession() depends on it const dateNowMocked = jest.spyOn(Date, 'now').mockImplementation(() => extendedLastEventTime + 15); await new Promise((resolve) => // eslint-disable-next-line @typescript-eslint/no-misused-promises setTimeout(async () => { await client.track('test 2').promise; resolve(); }, 10), ); dateNowMocked.mockRestore(); // assert session id is unchanged expect(client.config.sessionId).toBe(firstSessionId); // assert last event time was updated const eventTime2 = client.config.lastEventTime ?? -1; expect(eventTime2 > 0).toBeTruthy(); expect(eventTime2 > extendedLastEventTime).toBeTruthy(); // Wait for session to timeout, without extendSession() await new Promise((resolve) => // eslint-disable-next-line @typescript-eslint/no-misused-promises setTimeout(async () => { await client.track('test 3').promise; resolve(); }, 21), ); // assert session id is changed expect(client.config.sessionId).not.toBe(firstSessionId); expect(client.config.sessionId ?? -1 > firstSessionId).toBeTruthy(); }); test('should extend session using proxy', async () => { const lastEventTime = Date.now() - 1000; jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, sessionId: 1, lastEventTime: lastEventTime, }); const client = new AmplitudeBrowser(); // call extendSession() before init() client.extendSession(); // init await client.init(apiKey, { sessionTimeout: 20, flushQueueSize: 1, flushIntervalMillis: 1, defaultTracking, }).promise; // assert sessionId is unchanged expect(client.config.sessionId).toBe(1); // assert last event time was updated expect(client.config.lastEventTime).not.toBe(lastEventTime); }); /** * Tests the reverse case of calling expire sessions */ test('should expire session w/o calling extend session using proxy', async () => { const lastEventTime = Date.now() - 1000; jest.spyOn(CookieMigration, 'parseLegacyCookies').mockResolvedValueOnce({ optOut: false, sessionId: 1, lastEventTime: lastEventTime, }); const client = new AmplitudeBrowser(); // init await client.init(apiKey, { sessionTimeout: 20, flushQueueSize: 1, flushIntervalMillis: 1, defaultTracking, }).promise; // assert sessionId is unchanged expect(client.config.sessionId).toBe(1); // assert last event time was updated expect(client.config.lastEventTime).toBe(lastEventTime); }); }); describe('pageCount', () => { test('init pageCounter should be 0', async () => { await client.init(apiKey, { defaultTracking }).promise; expect(client.config.pageCounter).toBe(0); }); test('should set pageCounter to 0 in new session', async () => { await client.init(apiKey, { defaultTracking }).promise; client.config.pageCounter = 2; expect(client.config.pageCounter).toBe(2); client.setSessionId(Date.now() + 5 * 60 * 60); expect(client.config.pageCounter).toBe(0); }); }); describe('setTransport', () => { test('should set transport', async () => { const fetch = new FetchTransport(); const createTransport = jest.spyOn(Config, 'createTransport').mockReturnValueOnce(fetch); await client.init(apiKey, { defaultTracking }).promise; client.setTransport('fetch'); expect(createTransport).toHaveBeenCalledTimes(2); }); test('should keep compression enabled for default endpoints when switching transport', async () => { const createTransport = jest.spyOn(Config, 'createTransport'); await client.init(apiKey, { defaultTracking }).promise; createTransport.mockClear(); client.setTransport('xhr'); expect(createTransport).toHaveBeenCalledWith('xhr'); }); test('should keep custom endpoint compression setting when switching transport', async () => { const createTransport = jest.spyOn(Config, 'createTransport'); await client.init(apiKey, { defaultTracking, serverUrl: 'https://custom.example.com/2/httpapi', enableRequestBodyCompression: false, }).promise; createTransport.mockClear(); client.setTransport('xhr'); expect(createTransport).toHaveBeenCalledWith('xhr'); }); test('should defer set transport', () => { return new Promise((resolve) => { const fetch = new FetchTransport(); const createTransport = jest.spyOn(Config, 'createTransport').mockReturnValueOnce(fetch); void client.init(apiKey, { defaultTracking }).promise.then(() => { expect(createTransport).toHaveBeenCalledTimes(2); resolve(); }); client.setTransport('fetch'); }); }); }); describe('identify', () => { test('should track identify', async () => { const track = jest.spyOn(client, 'dispatch').mockReturnValueOnce( Promise.resolve({ code: 200, message: '', event: { event_type: 'event_type', }, }), ); await client.init(apiKey, { defaultTracking, }).promise; const identifyObject = new core.Identify(); const result = await client.identify(identifyObject, { user_id: '123', device_id: '123' }).promise; expect(result.code).toEqual(200); expect(track).toHaveBeenCalledTimes(1); }); test('should track identify using proxy', async () => { const track = jest.spyOn(client, 'dispatch').mockReturnValueOnce( Promise.resolve({ code: 200, message: '', event: { event_type: 'event_type', }, }), ); const convertProxyObjectToRealObject = jest .spyOn(SnippetHelper, 'convertProxyObjectToRealObject') .mockReturnValueOnce(new core.Identify()); await client.init(apiKey, { defaultTracking, }).promise; const identifyObject = { _q: [], }; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore to verify behavior in snippet installation const result = await client.identify(identifyObject).promise; expect(result.code).toEqual(200); expect(track).toHaveBeenCalledTimes(1); expect(convertProxyObjectToRealObject).toHaveBeenCalledTimes(1); }); }); describe('groupIdentify', () => { test('should track group identify', async () => { const track = jest.spyOn(client, 'dispatch').mockReturnValueOnce( Promise.resolve({ code: 200, message: '', event: { event_type: 'event_type', }, }), ); await client.init(apiKey, { defaultTracking, }).promise; const identifyObject = new core.Identify(); const result = await client.groupIdentify('g', '1', identifyObject).promise; expect(result.code).toEqual(200); expect(track).toHaveBeenCalledTimes(1); }); test('should track group identify using proxy', async () => { const track = jest.spyOn(client, 'dispatch').mockReturnValueOnce( Promise.resolve({ code: 200, message: '', event: { event_type: 'event_type', }, }), ); const convertProxyObjectToRealObject = jest .spyOn(SnippetHelper, 'convertProxyObjectToRealObject') .mockReturnValueOnce(new core.Identify()); await client.init(apiKey, { defaultTracking, }).promise; const identifyObject = { _q: [], }; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore to verify behavior in snippet installation const result = await client.groupIdentify('g', '1', identifyObject).promise; expect(result.code).toEqual(200); expect(track).toHaveBeenCalledTimes(1); expect(convertProxyObjectToRealObject).toHaveBeenCalledTimes(1); }); }); describe('revenue', () => { test('should track revenue', async () => { const track = jest.spyOn(client, 'dispatch').mockReturnValueOnce( Promise.resolve({ code: 200, message: '', event: { event_type: 'event_type', }, }), ); await client.init(apiKey, { defaultTracking, }).promise; const revenueObject = new core.Revenue(); const result = await client.revenue(revenueObject).promise; expect(result.code).toEqual(200); expect(track).toHaveBeenCalledTimes(1); }); test('should track revenue using proxy', async () => { const track = jest.spyOn(client, 'dispatch').mockReturnValueOnce( Promise.resolve({ code: 200, message: '', event: { event_type: 'event_type', }, }), ); const convertProxyObjectToRealObject = jest .spyOn(SnippetHelper, 'convertProxyObjectToRealObject') .mockReturnValueOnce(new core.Revenue()); await client.init(apiKey, { defaultTracking, }).promise; const revenueObject = { _q: [], }; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore to verify behavior in snippet installation const result = await client.revenue(revenueObject).promise; expect(result.code).toEqual(200); expect(track).toHaveBeenCalledTimes(1); expect(convertProxyObjectToRealObject).toHaveBeenCalledTimes(1); }); }); describe('process', () => { test('should process create new session for new campain', async () => { await client.init(apiKey, { optOut: true, logLevel: LogLevel.Warn, defaultTracking: { attribution: { resetSessionOnNewCampaign: true, }, }, }).promise; expect(client.webAttribution).toBeDefined(); // Making sure client.webAttribution is not undefined if (!client.webAttribution) { client.webAttribution = new WebAttribution({}, client.config); } jest.spyOn(client.webAttribution, 'shouldSetSessionIdOnNewCampaign').mockReturnValueOnce(true); const logSpy = jest.spyOn(client.config.loggerProvider, 'log'); await client.process({ event_type: 'event', }); expect(logSpy).toHaveBeenCalledWith('Created a new session for new campaign.'); }); test('should track web attribution if change in campaign information', async () => { const track = jest.spyOn(client, 'dispatch').mockReturnValue( Promise.resolve({ code: 200, message: '', event: { event_type: 'event_type', }, }), ); await client.init(apiKey, { optOut: true, logLevel: LogLevel.Warn, defaultTracking: { attribution: { resetSessionOnNewCampaign: true, }, }, }).promise; client.webAttribution = new WebAttribution({}, { ...client.config, lastEventTime: undefined }); client.webAttribution.shouldTrackNewCampaign = true; jest.spyOn(core, 'isNewSession').mockReturnValueOnce(false); await client.process({ event_type: 'event', }); expect(track).toHaveBeenCalled(); }); test('should proceed with unexpired session', async () => { const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, { optOut: true, defaultTracking: false, }).promise; const result = await client.process({ event_type: 'event', }); // once on init expect(setSessionId).toHaveBeenCalledTimes(1); expect(result.code).toBe(0); }); test('should proceed with overriden session ID', async () => { const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, { optOut: true, defaultTracking: false, }).promise; const result = await client.process({ event_type: 'event', session_id: -1, }); // once on init expect(setSessionId).toHaveBeenCalledTimes(1); expect(result.code).toBe(0); }); test('should reset session due to expired session', async () => { const setSessionId = jest.spyOn(client, 'setSessionId'); await client.init(apiKey, { optOut: true, defaultTracking: false, // force session to always be expired sessionTimeout: -1, }).promise; const result = await client.process({ event_type: 'event', }); // once on init // and once on process expect(setSessionId).toHaveBeenCalledTimes(2); expect(result.code).toBe(0); }); }); describe('debug logs through cookie', () => { test('debug logs should be persisted across page loads', async () => { const cookieStorage = new CookieStorage(); const cookie: UserSession = { deviceId: '123', userId: '123', sessionId: 123, lastEventTime: Date.now(), optOut: false, debugLogsEnabled: true, }; await cookieStorage.set(getCookieName(apiKey), cookie); const loggerProvider = { log: jest.fn(), debug: jest.fn(), warn: jest.fn(), error: jest.fn(), enable: jest.fn(), disable: jest.fn(), }; await client.init(apiKey, { defaultTracking, logLevel: LogLevel.Error, loggerProvider: loggerProvider, }).promise; expect(loggerProvider.enable).toHaveBeenCalledWith(LogLevel.Debug); console.log(loggerProvider.enable.mock.calls); expect(loggerProvider.enable).toHaveBeenCalledTimes(1); }); test('debug logs should not be enabled by default', async () => { const cookieStorage = new CookieStorage(); const cookie: UserSession = { deviceId: '123', userId: '123', sessionId: 123, lastEventTime: Date.now(), optOut: false, }; await cookieStorage.set(getCookieName(apiKey), cookie); const loggerProvider = { log: jest.fn(), debug: jest.fn(), warn: jest.fn(), error: jest.fn(), enable: jest.fn(), disable: jest.fn(), }; await client.init(apiKey, { defaultTracking, logLevel: LogLevel.Error, loggerProvider: loggerProvider, }).promise; expect(loggerProvider.enable).toHaveBeenCalledWith(LogLevel.Error); }); }); describe('_setDiagnosticsSampleRate', () => { test('should set diagnostics sample rate when config is not initialized', () => { expect(client._diagnosticsSampleRate).toBe(0); const sampleRate = 0.1; client._setDiagnosticsSampleRate(sampleRate); expect(client._diagnosticsSampleRate).toBe(sampleRate); }); test('should not set diagnostics sample rate when config is already initialized', async () => { expect(client._diagnosticsSampleRate).toBe(0); await client.init(apiKey).promise; const initialSampleRate = client._diagnosticsSampleRate; const newSampleRate = 0.5; client._setDiagnosticsSampleRate(newSampleRate); // Should not change the sample rate when config is already initialized expect(client._diagnosticsSampleRate).toBe(initialSampleRate); }); test('should early return when diagnostics sample rate is not between 0 and 1', () => { expect(client._diagnosticsSampleRate).toBe(0); const sampleRate = 1.1; client._setDiagnosticsSampleRate(sampleRate); expect(client._diagnosticsSampleRate).toBe(0); }); }); describe('logBrowserOptions', () => { test('should not throw error on circular reference', async () => { // regression test for https://github.com/amplitude/Amplitude-TypeScript/issues/1521 const logBrowserOptions = AmplitudeBrowser.prototype['logBrowserOptions']; const circularReference: any = { a: undefined }; circularReference.a = circularReference; const ctx = { config: { loggerProvider: { debug: jest.fn(), error: jest.fn(), }, }, }; const apiKey = '1234567890'; logBrowserOptions.call(ctx, { apiKey, ...circularReference }); expect(ctx.config.loggerProvider.debug.mock.calls[0][1]).toContain(apiKey.substring(0, 5)); expect(ctx.config.loggerProvider.error).not.toHaveBeenCalled(); }); }); }); ================================================ FILE: packages/analytics-browser/test/config/joined-config.test.ts ================================================ import { translateRemoteConfigToLocal, updateBrowserConfigWithRemoteConfig } from '../../src/config/joined-config'; import { createConfigurationMock } from '../helpers/mock'; import { AutocaptureOptions, NetworkTrackingOptions, SAFE_HEADERS, type BrowserConfig, type ElementInteractionsOptions, } from '@amplitude/analytics-core'; function expectIsAutocaptureObjectWithElementInteractions(config: BrowserConfig): asserts config is BrowserConfig & { autocapture: BrowserConfig['autocapture'] & { elementInteractions: ElementInteractionsOptions }; } { expect(config).toHaveProperty('autocapture'); expect(config.autocapture).toHaveProperty('elementInteractions'); } describe('joined-config', () => { let localConfig: BrowserConfig; beforeEach(() => { localConfig = { ...createConfigurationMock(), defaultTracking: false, autocapture: false }; }); describe('updateBrowserConfigWithRemoteConfig', () => { test('should not modify local config if remote config is null', () => { const originalConfig = { ...localConfig }; updateBrowserConfigWithRemoteConfig(null, localConfig); expect(localConfig).toEqual(originalConfig); }); test('should disable elementInteractions if remote config sets it to false', () => { localConfig = createConfigurationMock( createConfigurationMock({ autocapture: true, }), ); const remoteConfig = { autocapture: { elementInteractions: false, }, }; const expectedAutocapture = { sessions: true, fileDownloads: true, formInteractions: true, pageViews: true, attribution: true, elementInteractions: false, frustrationInteractions: true, webVitals: true, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.autocapture).toStrictEqual(expectedAutocapture); expect(localConfig.defaultTracking).toStrictEqual(expectedAutocapture); }); test('should disable defaultTracking if remote config sets it to false', () => { localConfig = createConfigurationMock( createConfigurationMock({ autocapture: true, defaultTracking: true, }), ); const remoteConfig = { autocapture: { fileDownloads: false, formInteractions: false, pageViews: false, attribution: false, sessions: false, }, }; const expectedAutocapture = { fileDownloads: false, formInteractions: false, pageViews: false, attribution: false, sessions: false, elementInteractions: true, frustrationInteractions: true, webVitals: true, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.defaultTracking).toStrictEqual(expectedAutocapture); expect(localConfig.autocapture).toStrictEqual(expectedAutocapture); }); test.each([ { sessions: false, fileDownloads: false, formInteractions: false, attribution: false, pageViews: false, frustrationInteractions: false, webVitals: false, }, false, ])('should only enable elementInteractions if remote config only sets it to true', (localAutocapture) => { localConfig = createConfigurationMock( createConfigurationMock({ autocapture: localAutocapture, }), ); const remoteConfig = { autocapture: { elementInteractions: true, }, }; const expectedJoinedConfig = { sessions: false, fileDownloads: false, formInteractions: false, attribution: false, pageViews: false, elementInteractions: true, frustrationInteractions: false, webVitals: false, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.autocapture).toStrictEqual(expectedJoinedConfig); expect(localConfig.defaultTracking).toStrictEqual(expectedJoinedConfig); }); test('should use remote autocapture if local autocapture is undefined', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { elementInteractions: false, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.autocapture).toStrictEqual(remoteConfig.autocapture); expect(localConfig.defaultTracking).toStrictEqual(remoteConfig.autocapture); }); test.each([true, false])( 'should overwrite local autocapture if remote autocapture is boolean', (remoteAutocapture) => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: remoteAutocapture, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.autocapture).toStrictEqual(remoteAutocapture); expect(localConfig.defaultTracking).toStrictEqual(remoteAutocapture); }, ); test('should handle errors gracefully', () => { const logError = jest.spyOn(localConfig.loggerProvider, 'error'); // Create a problematic remote config that will cause an error when accessed. // This test is necessary because RemoteConfig uses `any` type for value, allowing external // sources to provide malformed data with getters, functions, or other constructs // that could throw errors. const remoteConfig = { autocapture: { get elementInteractions() { throw new Error('Test error'); }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(logError).toHaveBeenCalledWith( 'Failed to apply remote configuration because of error: ', expect.any(Error), ); }); test('should merge local and remote config', () => { const remoteConfig = { autocapture: true, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.autocapture).toBe(true); expect(localConfig.defaultTracking).toBe(true); }); test('should convert pageUrlAllowlistRegex strings to RegExp objects and combine with pageUrlAllowlist', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { elementInteractions: { pageUrlAllowlist: ['exact-match.com', 'another-exact-match.com'], pageUrlAllowlistRegex: ['^https://.*\\.example\\.com$', '.*\\.amplitude\\.com$'], }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); // Verify the combined pageUrlAllowlist contains both exact matches and RegExp objects expectIsAutocaptureObjectWithElementInteractions(localConfig); const elementInteractions = localConfig.autocapture?.elementInteractions; const pageUrlAllowlist = elementInteractions.pageUrlAllowlist; expect(Array.isArray(pageUrlAllowlist)).toBe(true); expect(pageUrlAllowlist?.length).toBe(4); // First two items should be strings expect(pageUrlAllowlist?.[0]).toBe('exact-match.com'); expect(pageUrlAllowlist?.[1]).toBe('another-exact-match.com'); // Last two items should be RegExp objects expect(pageUrlAllowlist?.[2]).toBeInstanceOf(RegExp); expect(pageUrlAllowlist?.[3]).toBeInstanceOf(RegExp); expect(pageUrlAllowlist?.[2].toString()).toBe(new RegExp('^https://.*\\.example\\.com$').toString()); expect(pageUrlAllowlist?.[3].toString()).toBe(new RegExp('.*\\.amplitude\\.com$').toString()); // pageUrlAllowlistRegex should have been removed expect(elementInteractions).not.toHaveProperty('pageUrlAllowlistRegex'); }); test('should handle empty pageUrlAllowlist when pageUrlAllowlistRegex is provided', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { elementInteractions: { pageUrlAllowlistRegex: ['^https://.*\\.example\\.com$', '.*\\.amplitude\\.com$'], }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); // Verify the pageUrlAllowlist contains only RegExp objects expectIsAutocaptureObjectWithElementInteractions(localConfig); const elementInteractions = localConfig.autocapture?.elementInteractions; const pageUrlAllowlist = elementInteractions.pageUrlAllowlist; expect(Array.isArray(pageUrlAllowlist)).toBe(true); expect(pageUrlAllowlist?.length).toBe(2); // Both items should be RegExp objects expect(pageUrlAllowlist?.[0]).toBeInstanceOf(RegExp); expect(pageUrlAllowlist?.[1]).toBeInstanceOf(RegExp); expect(pageUrlAllowlist?.[0].toString()).toBe(new RegExp('^https://.*\\.example\\.com$').toString()); expect(pageUrlAllowlist?.[1].toString()).toBe(new RegExp('.*\\.amplitude\\.com$').toString()); // pageUrlAllowlistRegex should have been removed expect(elementInteractions).not.toHaveProperty('pageUrlAllowlistRegex'); }); test('should skip and warn on invalid regex patterns', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { elementInteractions: { pageUrlAllowlistRegex: ['^https://.*\\.example\\.com$', '***', '.*\\.amplitude\\.com$'], }, }, }; const logWarn = jest.spyOn(localConfig.loggerProvider, 'warn'); updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); // Verify the pageUrlAllowlist contains only RegExp objects expectIsAutocaptureObjectWithElementInteractions(localConfig); const elementInteractions = localConfig.autocapture?.elementInteractions; const pageUrlAllowlist = elementInteractions.pageUrlAllowlist; expect(Array.isArray(pageUrlAllowlist)).toBe(true); expect(pageUrlAllowlist?.length).toBe(2); // Both items should be RegExp objects expect(pageUrlAllowlist?.[0]).toBeInstanceOf(RegExp); expect(pageUrlAllowlist?.[1]).toBeInstanceOf(RegExp); expect(pageUrlAllowlist?.[0].toString()).toBe(new RegExp('^https://.*\\.example\\.com$').toString()); expect(pageUrlAllowlist?.[1].toString()).toBe(new RegExp('.*\\.amplitude\\.com$').toString()); // pageUrlAllowlistRegex should have been removed expect(elementInteractions).not.toHaveProperty('pageUrlAllowlistRegex'); expect(logWarn).toHaveBeenCalledWith('Invalid regex pattern: ***', expect.any(Error)); }); test('should not fail or override pageUrlAllowlist when pageUrlAllowlistRegex is undefined', () => { localConfig = createConfigurationMock({}); // Define the remote configuration with an existing exact match allowlist and pageUrlAllowlistRegex as undefined const remoteConfig = { autocapture: { elementInteractions: { pageUrlAllowlist: ['existing-domain.com', 'another-domain.net'], }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); // Assert: Verify that the original pageUrlAllowlist remains unchanged // Ensure the autocapture and elementInteractions objects exist in the joined config expectIsAutocaptureObjectWithElementInteractions(localConfig); const elementInteractions = localConfig.autocapture?.elementInteractions; expect(elementInteractions).toBeDefined(); const pageUrlAllowlist = elementInteractions.pageUrlAllowlist; expect(Array.isArray(pageUrlAllowlist)).toBe(true); // Expect the list to have the original exact match strings expect(pageUrlAllowlist?.length).toBe(2); // Verify that the elements in the allowlist are the original strings expect(pageUrlAllowlist?.[0]).toBe('existing-domain.com'); expect(pageUrlAllowlist?.[1]).toBe('another-domain.net'); // Assert: Verify that the pageUrlAllowlistRegex property has been removed (even if it was undefined) expect(elementInteractions).not.toHaveProperty('pageUrlAllowlistRegex'); }); describe('networkTracking', () => { describe('headers', () => { test('should translate responseHeaders and requestHeaders to local responseHeaders and requestHeaders', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { networkTracking: { captureRules: [ { responseHeaders: { captureSafeHeaders: true, allowlist: ['content-type', 'x-fake-response-header'], }, requestHeaders: { captureSafeHeaders: true, allowlist: ['content-type', 'x-fake-request-header'], }, }, ], }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); const autocapture = localConfig.autocapture as AutocaptureOptions; const networkTracking = autocapture.networkTracking as NetworkTrackingOptions; expect(networkTracking?.captureRules?.[0].responseHeaders).toEqual([ ...SAFE_HEADERS, 'content-type', 'x-fake-response-header', ]); expect(networkTracking?.captureRules?.[0].requestHeaders).toEqual([ ...SAFE_HEADERS, 'content-type', 'x-fake-request-header', ]); }); test('should translate captureSafeHeaders to local captureSafeHeaders', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { networkTracking: { captureRules: [ { responseHeaders: { captureSafeHeaders: true }, requestHeaders: { captureSafeHeaders: true } }, ], }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); const autocapture = localConfig.autocapture as AutocaptureOptions; const networkTracking = autocapture.networkTracking as NetworkTrackingOptions; expect(networkTracking?.captureRules?.[0].responseHeaders).toEqual([...SAFE_HEADERS]); expect(networkTracking?.captureRules?.[0].requestHeaders).toEqual([...SAFE_HEADERS]); }); test('should translate allowlist to local allowlist', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { networkTracking: { captureRules: [ { responseHeaders: { allowlist: ['content-type', 'x-fake-response-header'] }, requestHeaders: { allowlist: ['content-type', 'x-fake-request-header'] }, }, ], }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); const autocapture = localConfig.autocapture as AutocaptureOptions; const networkTracking = autocapture.networkTracking as NetworkTrackingOptions; expect(networkTracking?.captureRules?.[0].responseHeaders).toEqual([ 'content-type', 'x-fake-response-header', ]); expect(networkTracking?.captureRules?.[0].requestHeaders).toEqual(['content-type', 'x-fake-request-header']); }); test('if undefined, should not translate', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { networkTracking: { captureRules: [{ responseHeaders: undefined, requestHeaders: undefined }] }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); const autocapture = localConfig.autocapture as AutocaptureOptions; const networkTracking = autocapture.networkTracking as NetworkTrackingOptions; expect(networkTracking?.captureRules?.[0].responseHeaders).toBeUndefined(); expect(networkTracking?.captureRules?.[0].requestHeaders).toBeUndefined(); }); test('should not fail if headers are malformed', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { networkTracking: { captureRules: [{ responseHeaders: { allowlist: { wrong: 'type' } } }] } }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); const autocapture = localConfig.autocapture as AutocaptureOptions; const networkTracking = autocapture.networkTracking as NetworkTrackingOptions; expect(networkTracking?.captureRules?.[0].responseHeaders).toBeUndefined(); expect(networkTracking?.captureRules?.[0].requestHeaders).toBeUndefined(); }); }); test('should merge urls and urlsRegex', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { networkTracking: { captureRules: [ { urls: ['https://example.com/path', /path\/to/], urlsRegex: ['^https://.*\\.example\\.com$', '.*\\.amplitude\\.com$'], }, ], }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); const autocapture = localConfig.autocapture as AutocaptureOptions; const networkTracking = autocapture.networkTracking as NetworkTrackingOptions; expect(networkTracking?.captureRules?.[0].urls).toEqual([ 'https://example.com/path', /path\/to/, /^https:\/\/.*\.example\.com$/, /.*\.amplitude\.com$/, ]); }); test('should merge urls if urlsRegex is undefined', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { networkTracking: { captureRules: [{ urls: ['https://example.com/path', /path\/to/] }], }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); const autocapture = localConfig.autocapture as AutocaptureOptions; const networkTracking = autocapture.networkTracking as NetworkTrackingOptions; expect(networkTracking?.captureRules?.[0].urls).toEqual(['https://example.com/path', /path\/to/]); }); test('should merge urls if urls is undefined and urlsRegex is provided', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { networkTracking: { captureRules: [{ urlsRegex: ['^https://.*\\.example\\.com$', '.*\\.amplitude\\.com$'] }], }, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); const autocapture = localConfig.autocapture as AutocaptureOptions; const networkTracking = autocapture.networkTracking as NetworkTrackingOptions; expect(networkTracking?.captureRules?.[0].urls).toEqual([ /^https:\/\/.*\.example\.com$/, /.*\.amplitude\.com$/, ]); }); test('should not have urls if captureRules is undefined', () => { localConfig = createConfigurationMock(createConfigurationMock({})); const remoteConfig = { autocapture: { networkTracking: {}, }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); const autocapture = localConfig.autocapture as AutocaptureOptions; const networkTracking = autocapture.networkTracking as NetworkTrackingOptions; expect(networkTracking?.captureRules).toBeUndefined(); }); }); describe('customEnrichment', () => { test('should merge customEnrichment from remote config when enabled', () => { const remoteConfig = { customEnrichment: { enabled: true, body: 'return event;' }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.customEnrichment).toStrictEqual({ body: 'return event;' }); }); test('should set customEnrichment to false when remote config disables it', () => { localConfig.customEnrichment = { enabled: true, body: 'return event;' }; const remoteConfig = { customEnrichment: { enabled: false, body: 'return event;' }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.customEnrichment).toBe(false); }); test('should not modify customEnrichment if remote config does not include it', () => { localConfig.customEnrichment = { enabled: true, body: 'return event;' }; const remoteConfig = { autocapture: true, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.customEnrichment).toStrictEqual({ enabled: true, body: 'return event;' }); }); test('should set customEnrichment to true when remote config has enabled-only', () => { const remoteConfig = { customEnrichment: { enabled: true }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.customEnrichment).toBe(true); }); test('should not override customEnrichment when locally set to false', () => { localConfig.customEnrichment = false; const remoteConfig = { customEnrichment: { enabled: true, body: 'return event;' }, }; updateBrowserConfigWithRemoteConfig(remoteConfig, localConfig); expect(localConfig.customEnrichment).toBe(false); }); test('should not modify customEnrichment when remote config delivers null', () => { localConfig.customEnrichment = { enabled: true, body: 'return event;' }; const remoteConfig = { customEnrichment: null, }; updateBrowserConfigWithRemoteConfig(remoteConfig as any, localConfig); expect(localConfig.customEnrichment).toStrictEqual({ enabled: true, body: 'return event;' }); }); }); }); describe('translateRemoteConfigToLocal', () => { describe('should translate property to true when', () => { test('enabled is true and object has no other properties', () => { const remoteConfig = { browserSDK: { autocapture: { frustrationInteractions: { enabled: true, }, }, }, }; translateRemoteConfigToLocal(remoteConfig); expect(remoteConfig.browserSDK.autocapture.frustrationInteractions).toBe(true); }); }); describe('should translate property to false when', () => { test('enabled is false and object has no other properties', () => { const remoteConfig = { browserSDK: { autocapture: { frustrationInteractions: { enabled: false, }, }, }, }; translateRemoteConfigToLocal(remoteConfig); expect(remoteConfig.browserSDK.autocapture.frustrationInteractions).toBe(false); }); test('enabled is false and object has other properties', () => { const remoteConfig = { browserSDK: { autocapture: { frustrationInteractions: { enabled: false, deadClicks: true, rageClicks: true, }, }, }, }; translateRemoteConfigToLocal(remoteConfig); expect(remoteConfig.browserSDK.autocapture.frustrationInteractions).toBe(false); }); }); describe('should translate property to object when', () => { test('enabled is true and object has other properties', () => { const remoteConfig = { browserSDK: { autocapture: { frustrationInteractions: { enabled: true, deadClicks: true, rageClicks: true, }, }, }, }; translateRemoteConfigToLocal(remoteConfig); expect(remoteConfig.browserSDK.autocapture.frustrationInteractions).toEqual({ deadClicks: true, rageClicks: true, }); }); }); describe('should not translate property when', () => { test('property is an array', () => { const config = ['a', 'b', 'c']; translateRemoteConfigToLocal(config); expect(config).toEqual(['a', 'b', 'c']); }); test('config is null', () => { const config = null; /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument */ translateRemoteConfigToLocal(config as any); expect(config).toBeNull(); }); test('enabled is not present', () => { const config = { prop: { subprop: { hello: true, foobar: null } } }; translateRemoteConfigToLocal(config); expect(config).toEqual({ prop: { subprop: { hello: true, foobar: null } } }); }); test('property is null', () => { const config = { hello: null }; translateRemoteConfigToLocal(config); expect(config).toEqual({ hello: null }); }); test('property is a boolean', () => { const config = { hello: true }; translateRemoteConfigToLocal(config); expect(config).toEqual({ hello: true }); }); }); describe('frustrationInteractions', () => { test('should translate rageClick to rageClicks', () => { const remoteConfig = { browserSDK: { autocapture: { frustrationInteractions: { rageClick: true }, }, }, }; translateRemoteConfigToLocal(remoteConfig); expect(remoteConfig.browserSDK.autocapture.frustrationInteractions).toEqual({ rageClicks: true }); }); test('should translate deadClick to deadClicks', () => { const remoteConfig = { browserSDK: { autocapture: { frustrationInteractions: { deadClick: true }, }, }, }; translateRemoteConfigToLocal(remoteConfig); expect(remoteConfig.browserSDK.autocapture.frustrationInteractions).toEqual({ deadClicks: true }); }); }); describe('viewportContentUpdated', () => { describe('enabled normalization', () => { test('should convert viewportContentUpdated: true to an empty object', () => { // { enabled: true } with no other props collapses to the boolean `true` by the generic // pass; this block converts it back to {} so the SDK gets a VCU options object. const config = { autocapture: { elementInteractions: { viewportContentUpdated: true, }, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions.viewportContentUpdated).toEqual({}); }); test('should preserve viewportContentUpdated when it is already an object with properties', () => { const config = { autocapture: { elementInteractions: { viewportContentUpdated: { exposureDuration: 200 }, }, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions.viewportContentUpdated).toEqual({ exposureDuration: 200 }); }); test('should convert viewportContentUpdated to { enabled: false } when enabled is false', () => { const config = { autocapture: { elementInteractions: { viewportContentUpdated: { enabled: false, exposureDuration: 200 }, }, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions.viewportContentUpdated).toEqual({ enabled: false }); }); test('should not modify elementInteractions when viewportContentUpdated is absent', () => { const config = { autocapture: { elementInteractions: { cssSelectorAllowlist: ['a'] }, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions).toEqual({ cssSelectorAllowlist: ['a'] }); }); test('should not throw when elementInteractions is false', () => { const config = { autocapture: { elementInteractions: false, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions).toBe(false); }); test('should not throw when autocapture has no elementInteractions', () => { const config = { autocapture: {} }; translateRemoteConfigToLocal(config); expect(config.autocapture).toEqual({}); }); test('should handle errors from elementInteractions accessor gracefully', () => { const config = { autocapture: { get elementInteractions() { throw new Error('accessor error'); }, }, }; expect(() => translateRemoteConfigToLocal(config)).not.toThrow(); }); }); describe('exposureDuration migration', () => { test('should migrate deprecated top-level exposureDuration to viewportContentUpdated when vcu is absent', () => { const config = { autocapture: { elementInteractions: { exposureDuration: 300, } as any, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions.viewportContentUpdated).toEqual({ exposureDuration: 300 }); expect(config.autocapture.elementInteractions).not.toHaveProperty('exposureDuration'); }); test('should migrate deprecated top-level exposureDuration to viewportContentUpdated when vcu is true', () => { // After the enabled-normalization pass, viewportContentUpdated may still be `true` // (e.g. { enabled: true } → true) before this migration runs. const config = { autocapture: { elementInteractions: { viewportContentUpdated: true, exposureDuration: 300, } as any, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions.viewportContentUpdated).toEqual({ exposureDuration: 300 }); expect(config.autocapture.elementInteractions).not.toHaveProperty('exposureDuration'); }); test('should migrate deprecated exposureDuration when viewportContentUpdated object has no exposureDuration', () => { const config = { autocapture: { elementInteractions: { viewportContentUpdated: { exposureDuration: undefined }, exposureDuration: 300, } as any, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions.viewportContentUpdated).toEqual({ exposureDuration: 300 }); expect(config.autocapture.elementInteractions).not.toHaveProperty('exposureDuration'); }); test('should not overwrite existing viewportContentUpdated.exposureDuration with deprecated value', () => { const config = { autocapture: { elementInteractions: { viewportContentUpdated: { exposureDuration: 500 }, exposureDuration: 300, } as any, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions.viewportContentUpdated).toEqual({ exposureDuration: 500 }); expect(config.autocapture.elementInteractions).not.toHaveProperty('exposureDuration'); }); test('should remove deprecated exposureDuration and convert false viewportContentUpdated to { enabled: false }', () => { const config = { autocapture: { elementInteractions: { viewportContentUpdated: false, exposureDuration: 300, } as any, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions.viewportContentUpdated).toEqual({ enabled: false }); expect(config.autocapture.elementInteractions).not.toHaveProperty('exposureDuration'); }); test('should not touch elementInteractions when exposureDuration is absent', () => { const config = { autocapture: { elementInteractions: { viewportContentUpdated: { exposureDuration: 200 }, }, }, }; translateRemoteConfigToLocal(config); expect(config.autocapture.elementInteractions.viewportContentUpdated).toEqual({ exposureDuration: 200 }); expect(config.autocapture.elementInteractions).not.toHaveProperty('exposureDuration'); }); }); }); }); }); ================================================ FILE: packages/analytics-browser/test/config.test.ts ================================================ import * as Config from '../src/config'; import * as LocalStorageModule from '../src/storage/local-storage'; import * as SessionStorageModule from '../src/storage/session-storage'; import * as core from '@amplitude/analytics-core'; import { LogLevel, Storage, UserSession, MemoryStorage, getCookieName, FetchTransport as CoreFetchTransport, Logger, BrowserConfig, } from '@amplitude/analytics-core'; import * as BrowserUtils from '@amplitude/analytics-core'; import { XHRTransport } from '../src/transports/xhr'; import { createTransport, useBrowserConfig, shouldFetchRemoteConfig } from '../src/config'; import { FetchTransport } from '../src/transports/fetch'; import { SendBeaconTransport } from '../src/transports/send-beacon'; import { uuidPattern } from './helpers/constants'; import { DEFAULT_IDENTITY_STORAGE, DEFAULT_SERVER_ZONE } from '../src/constants'; import { AmplitudeBrowser } from '../src/browser-client'; import { VERSION } from '../src/version'; describe('config', () => { const someUUID: string = expect.stringMatching(uuidPattern) as string; const someCookieStorage: BrowserUtils.CookieStorage = expect.any( BrowserUtils.CookieStorage, ) as BrowserUtils.CookieStorage; const someLocalStorage: LocalStorageModule.LocalStorage = expect.any( LocalStorageModule.LocalStorage, ) as LocalStorageModule.LocalStorage; let apiKey = ''; beforeEach(() => { apiKey = core.UUID(); }); describe('BrowserConfig', () => { test('should create empty config', async () => { const config = new Config.BrowserConfig(apiKey); expect(config).toMatchObject({ _cookieStorage: expect.any(MemoryStorage), _optOut: false, apiKey, appVersion: undefined, cookieOptions: { domain: '', expiration: 365, sameSite: 'Lax', secure: false, upgrade: true, }, defaultTracking: undefined, identityStorage: DEFAULT_IDENTITY_STORAGE, flushIntervalMillis: 1000, flushMaxRetries: 5, flushQueueSize: 30, loggerProvider: expect.any(Logger), logLevel: LogLevel.Warn, minIdLength: undefined, offline: false, partnerId: undefined, plan: undefined, ingestionMetadata: undefined, serverUrl: '', serverZone: DEFAULT_SERVER_ZONE, sessionTimeout: 1800000, storageProvider: expect.any(LocalStorageModule.LocalStorage), trackingOptions: { ipAddress: true, language: true, platform: true, }, transport: 'fetch', transportProvider: expect.any(FetchTransport), useBatch: false, fetchRemoteConfig: true, version: VERSION, enableDiagnostics: true, diagnosticsSampleRate: 0, diagnosticsClient: undefined, remoteConfig: { fetchRemoteConfig: true, }, }); }); test('shoud return _optOut', () => { const config = new Config.BrowserConfig(apiKey); expect(config.optOut).toBe(false); }); test('should default fetchRemoteConfig to true when both remoteConfig.fetchRemoteConfig and fetchRemoteConfig are undefined', () => { // Pass undefined for fetchRemoteConfig to test the ?? true fallback on line 129 const config = new Config.BrowserConfig(apiKey); expect(config.fetchRemoteConfig).toBe(true); expect(config.remoteConfig?.fetchRemoteConfig).toBe(true); }); }); describe('useBrowserConfig', () => { test('should create default config', async () => { const getTopLevelDomain = jest.spyOn(Config, 'getTopLevelDomain').mockResolvedValueOnce('.amplitude.com'); const logger = new core.Logger(); logger.enable(LogLevel.Warn); const config = await Config.useBrowserConfig(apiKey, undefined, new AmplitudeBrowser()); expect(config).toEqual({ _cookieStorage: someCookieStorage, _deviceId: someUUID, _lastEventId: undefined, _lastEventTime: undefined, _optOut: false, _sessionId: undefined, _userId: undefined, apiKey, appVersion: undefined, cookieOptions: { domain: '.amplitude.com', expiration: 365, sameSite: 'Lax', secure: false, upgrade: true, }, defaultTracking: undefined, identityStorage: DEFAULT_IDENTITY_STORAGE, flushIntervalMillis: 1000, flushMaxRetries: 5, flushQueueSize: 30, loggerProvider: logger, logLevel: LogLevel.Warn, minIdLength: undefined, offline: false, partnerId: undefined, plan: undefined, ingestionMetadata: undefined, serverUrl: '', serverZone: DEFAULT_SERVER_ZONE, sessionTimeout: 1800000, storageProvider: someLocalStorage, trackingOptions: { ipAddress: true, language: true, platform: true, }, transport: 'fetch', transportProvider: expect.any(FetchTransport), useBatch: false, fetchRemoteConfig: true, version: VERSION, enableDiagnostics: true, diagnosticsSampleRate: 0, diagnosticsClient: undefined, remoteConfig: { fetchRemoteConfig: true, }, topLevelDomain: '.amplitude.com', enableRequestBodyCompression: false, }); expect(getTopLevelDomain).toHaveBeenCalledTimes(1); }); test('should fall back to memoryStorage when storageProvider is not enabled', async () => { const localStorageIsEnabledSpy = jest .spyOn(LocalStorageModule.LocalStorage.prototype, 'isEnabled') .mockResolvedValueOnce(false); const loggerProviderSpy = jest.spyOn(core.Logger.prototype, 'warn'); const config = await Config.useBrowserConfig(apiKey, undefined, new AmplitudeBrowser()); expect(localStorageIsEnabledSpy).toHaveBeenCalledTimes(1); expect(loggerProviderSpy).toHaveBeenCalledWith( 'Storage provider LocalStorage is not enabled. Falling back to MemoryStorage.', ); expect(config.storageProvider).toEqual(expect.any(MemoryStorage)); }); describe('with location override', () => { const originalLocation = window.location; beforeAll(() => { Object.defineProperty(window, 'location', { value: { hostname: 'amplitude.com' }, configurable: true, }); }); afterAll(() => { Object.defineProperty(window, 'location', { value: originalLocation, configurable: true }); }); test('should create using cookies/overwrite', async () => { Object.defineProperty(window, 'location', { value: { hostname: 'amplitude.com', }, configurable: true, }); const cookieStorage = new core.MemoryStorage(); await cookieStorage.set(getCookieName(apiKey), { deviceId: 'device-device-device', sessionId: -1, userId: 'user-user-user', lastEventId: 100, lastEventTime: 1, optOut: false, }); const logger = new core.Logger(); logger.enable(LogLevel.Warn); jest.spyOn(Config, 'createCookieStorage').mockReturnValueOnce(cookieStorage); const config = await Config.useBrowserConfig( apiKey, { deviceId: 'device-device-device', sessionId: -1, userId: 'user-user-user', partnerId: 'partnerId', plan: { version: '0', }, ingestionMetadata: { sourceName: 'ampli', sourceVersion: '2.0.0', }, sessionTimeout: 1, cookieOptions: { domain: '.amplitude.com', upgrade: false, }, defaultTracking: true, offline: true, }, new AmplitudeBrowser(), ); expect(config).toEqual({ _cookieStorage: expect.any(MemoryStorage), _deviceId: 'device-device-device', _lastEventId: 100, _lastEventTime: 1, _optOut: false, _sessionId: -1, _userId: 'user-user-user', apiKey, appVersion: undefined, cookieOptions: { domain: '.amplitude.com', expiration: 365, sameSite: 'Lax', secure: false, upgrade: false, }, defaultTracking: true, flushIntervalMillis: 1000, flushMaxRetries: 5, flushQueueSize: 30, identityStorage: DEFAULT_IDENTITY_STORAGE, ingestionMetadata: { sourceName: 'ampli', sourceVersion: '2.0.0', }, logLevel: 2, loggerProvider: logger, minIdLength: undefined, offline: true, partnerId: 'partnerId', plan: { version: '0', }, serverUrl: '', serverZone: DEFAULT_SERVER_ZONE, sessionTimeout: 1, storageProvider: someLocalStorage, trackingOptions: { ipAddress: true, language: true, platform: true, }, transport: 'fetch', transportProvider: expect.any(FetchTransport), useBatch: false, fetchRemoteConfig: true, version: VERSION, enableDiagnostics: true, diagnosticsSampleRate: 0, diagnosticsClient: undefined, remoteConfig: { fetchRemoteConfig: true, }, topLevelDomain: 'amplitude.com', enableRequestBodyCompression: false, }); }); }); test('should change storage', async () => { const config = await Config.useBrowserConfig( apiKey, { userId: 'user@amplitude.com', }, new AmplitudeBrowser(), ); expect(config.cookieStorage).toEqual(someCookieStorage); const cookie1 = await config.cookieStorage.get(getCookieName(apiKey)); expect(cookie1?.userId).toEqual('user@amplitude.com'); config.cookieStorage = new LocalStorageModule.LocalStorage(); expect(config.cookieStorage).toEqual(someLocalStorage); const cookie2 = await config.cookieStorage.get(getCookieName(apiKey)); expect(cookie2?.userId).toEqual('user@amplitude.com'); }); test('should use custom domain', async () => { const config = await Config.useBrowserConfig( apiKey, { cookieOptions: { domain: 'amplitude.com', }, }, new AmplitudeBrowser(), ); expect(config.cookieOptions?.domain).toEqual('amplitude.com'); }); test('should not call getTopLevelDomain when options.cookieOptions.domain is set', async () => { const getTopLevelDomainSpy = jest.spyOn(Config, 'getTopLevelDomain').mockResolvedValue('.amplitude.com'); const config = await Config.useBrowserConfig( apiKey, { cookieOptions: { domain: '.example.com', }, }, new AmplitudeBrowser(), ); expect(getTopLevelDomainSpy).not.toHaveBeenCalled(); expect(config.cookieOptions?.domain).toEqual('.example.com'); }); test('should not call getTopLevelDomain when options.cookieOptions.domain is empty string', async () => { const getTopLevelDomainSpy = jest.spyOn(Config, 'getTopLevelDomain').mockResolvedValue('.amplitude.com'); const config = await Config.useBrowserConfig( apiKey, { cookieOptions: { domain: '', }, }, new AmplitudeBrowser(), ); expect(getTopLevelDomainSpy).not.toHaveBeenCalled(); expect(config.cookieOptions?.domain).toEqual(''); }); test.each([ [true, true], [undefined, true], [false, false], ])('should use trackingOptions', async (input, expected) => { const config = await Config.useBrowserConfig( apiKey, { trackingOptions: { ipAddress: input, language: input, platform: input, }, }, new AmplitudeBrowser(), ); expect(config.trackingOptions.ipAddress).toEqual(expected); expect(config.trackingOptions.language).toEqual(expected); expect(config.trackingOptions.platform).toEqual(expected); }); }); describe('createCookieStorage', () => { test('should return cookies', async () => { const storage = Config.createCookieStorage(DEFAULT_IDENTITY_STORAGE); expect(storage).toBeInstanceOf(BrowserUtils.CookieStorage); }); test('should use return storage', async () => { const storage = Config.createCookieStorage('localStorage'); expect(storage).toBeInstanceOf(LocalStorageModule.LocalStorage); }); test('should use return session storage', async () => { const storage = Config.createCookieStorage('sessionStorage'); expect(storage).toBeInstanceOf(SessionStorageModule.SessionStorage); }); test('should use memory', async () => { const storage = Config.createCookieStorage('none'); expect(storage).toBeInstanceOf(core.MemoryStorage); }); }); describe('createTransport', () => { test('should return xhr', () => { expect(createTransport('xhr')).toBeInstanceOf(XHRTransport); }); test('should return beacon', () => { expect(createTransport('beacon')).toBeInstanceOf(SendBeaconTransport); }); test('should return fetch', () => { expect(createTransport('fetch')).toBeInstanceOf(FetchTransport); }); test('should return fetch when undefined', () => { expect(createTransport()).toBeInstanceOf(FetchTransport); }); test('should return xhr with object format', () => { expect(createTransport({ type: 'xhr' })).toBeInstanceOf(XHRTransport); }); test('should return beacon with object format', () => { expect(createTransport({ type: 'beacon' })).toBeInstanceOf(SendBeaconTransport); }); test('should return fetch with object format', () => { expect(createTransport({ type: 'fetch' })).toBeInstanceOf(FetchTransport); }); test('should return fetch when object format has only headers', () => { expect(createTransport({ headers: { Authorization: 'Bearer token' } })).toBeInstanceOf(FetchTransport); }); test('should return browser fetch transport (temporary copy, not core fetch transport)', () => { const transport = createTransport('fetch'); expect(transport).toBeInstanceOf(FetchTransport); expect(transport).not.toBeInstanceOf(CoreFetchTransport); }); }); describe('getTopLevelDomain', () => { test('should return empty string for localhost', async () => { const isDomainWritableSpy = jest.spyOn(BrowserUtils.CookieStorage, 'isDomainWritable'); const domain = await Config.getTopLevelDomain(undefined); expect(isDomainWritableSpy).not.toHaveBeenCalled(); expect(domain).toBe(''); isDomainWritableSpy.mockRestore(); }); test('should return empty string for single part hostname', async () => { const isDomainWritableSpy = jest.spyOn(BrowserUtils.CookieStorage, 'isDomainWritable'); const domain = await Config.getTopLevelDomain('mylocaldomain'); expect(isDomainWritableSpy).not.toHaveBeenCalled(); expect(domain).toBe(''); }); test('should return empty string if no access to cookies', async () => { const testCookieStorage: Storage = { isEnabled: () => Promise.resolve(false), get: jest.fn().mockResolvedValueOnce(Promise.resolve(1)), getRaw: jest.fn().mockResolvedValueOnce(Promise.resolve(1)), set: jest.fn().mockResolvedValueOnce(Promise.resolve(undefined)), remove: jest.fn().mockResolvedValueOnce(Promise.resolve(undefined)), reset: jest.fn().mockResolvedValueOnce(Promise.resolve(undefined)), }; jest.spyOn(BrowserUtils, 'CookieStorage').mockReturnValueOnce({ ...testCookieStorage, options: {}, config: {}, } as unknown as BrowserUtils.CookieStorage); const domain = await Config.getTopLevelDomain(); expect(domain).toBe(''); }); test('should return top level domain', async () => { const testCookieStorage: Storage = { isEnabled: () => Promise.resolve(true), get: jest.fn().mockResolvedValueOnce(Promise.resolve(1)), getRaw: jest.fn().mockResolvedValueOnce(Promise.resolve(1)), set: jest.fn().mockResolvedValueOnce(Promise.resolve(undefined)), remove: jest.fn().mockResolvedValueOnce(Promise.resolve(undefined)), reset: jest.fn().mockResolvedValueOnce(Promise.resolve(undefined)), }; const actualCookieStorage = { isEnabled: () => Promise.resolve(true), get: jest.fn().mockResolvedValueOnce(Promise.resolve(undefined)).mockResolvedValueOnce(Promise.resolve(1)), getRaw: jest.fn().mockResolvedValueOnce(Promise.resolve(undefined)).mockResolvedValueOnce(Promise.resolve(1)), set: jest.fn().mockResolvedValue(Promise.resolve(undefined)), remove: jest.fn().mockResolvedValue(Promise.resolve(undefined)), reset: jest.fn().mockResolvedValue(Promise.resolve(undefined)), // CookieStorage.transaction is used by getTopLevelDomain; first domain fails, second succeeds transaction: jest.fn().mockResolvedValueOnce(false).mockResolvedValueOnce(true), } as unknown as BrowserUtils.CookieStorage; jest .spyOn(BrowserUtils, 'CookieStorage') .mockReturnValueOnce({ ...testCookieStorage, options: {}, config: {}, } as unknown as BrowserUtils.CookieStorage) .mockReturnValue({ ...actualCookieStorage, options: {}, config: {}, } as unknown as BrowserUtils.CookieStorage); // eslint-disable-next-line @typescript-eslint/unbound-method const isDomainWritableBefore = BrowserUtils.CookieStorage.isDomainWritable; try { BrowserUtils.CookieStorage.isDomainWritable = jest.fn().mockImplementation((domain: string) => { if (domain === 'gov.uk') return Promise.resolve(false); if (domain === 'ac.be') return Promise.resolve(false); if (domain === 'legislation.gov.uk') return Promise.resolve(true); if (domain === 'website.com') return Promise.resolve(true); if (domain === 'hello.ac.be') return Promise.resolve(true); return Promise.resolve(false); }); expect(await Config.getTopLevelDomain('www.legislation.gov.uk')).toBe('.legislation.gov.uk'); expect(await Config.getTopLevelDomain('www.website.com')).toBe('.website.com'); expect(await Config.getTopLevelDomain('www.hello.ac.be')).toBe('.hello.ac.be'); } finally { BrowserUtils.CookieStorage.isDomainWritable = isDomainWritableBefore; } }); test('should not throw an error when location is an empty object', async () => { const originalLocation = window.location; Object.defineProperty(window, 'location', { value: {} as Location, configurable: true, }); expect(await Config.getTopLevelDomain()).toBe(''); Object.defineProperty(window, 'location', { value: originalLocation, configurable: true, }); }); test('should return empty string when location is undefined', async () => { const originalLocation = window.location; Object.defineProperty(window, 'location', { value: undefined, configurable: true, }); expect(await Config.getTopLevelDomain()).toBe(''); Object.defineProperty(window, 'location', { value: originalLocation, configurable: true, }); }); test('should record a diagnostics event when no access to cookies', async () => { const mockDiagnosticsClient = { recordEvent: jest.fn(), setTag: jest.fn(), increment: jest.fn(), recordHistogram: jest.fn(), _flush: jest.fn(), _setSampleRate: jest.fn(), }; await Config.getTopLevelDomain('www.amplitude.com', mockDiagnosticsClient); expect(mockDiagnosticsClient.recordEvent).toHaveBeenCalledWith('cookies.tld.failure', { reason: 'Could not determine TLD for host www.amplitude.com', }); }); test('should record cookies.tld.failure when isDomainWritable throws', async () => { const tldError = new Error('cookie access denied'); const mockDiagnosticsClient = { recordEvent: jest.fn(), setTag: jest.fn(), increment: jest.fn(), recordHistogram: jest.fn(), _flush: jest.fn(), _setSampleRate: jest.fn(), }; // eslint-disable-next-line @typescript-eslint/unbound-method const isDomainWritableBefore = BrowserUtils.CookieStorage.isDomainWritable; try { BrowserUtils.CookieStorage.isDomainWritable = jest.fn().mockRejectedValue(tldError); expect(await Config.getTopLevelDomain('www.example.com', mockDiagnosticsClient)).toBe(''); expect(mockDiagnosticsClient.recordEvent).toHaveBeenCalledWith('cookies.tld.failure', { reason: 'Unexpected exception checking domain is writable: example.com', error: 'cookie access denied', }); } finally { BrowserUtils.CookieStorage.isDomainWritable = isDomainWritableBefore; } }); }); describe('fetchRemoteConfig', () => { test('should set remoteConfig.fetchRemoteConfig to true when remoteConfig.fetchRemoteConfig true', async () => { const instance = new AmplitudeBrowser(); const config = await useBrowserConfig( apiKey, { fetchRemoteConfig: false, remoteConfig: { fetchRemoteConfig: true, }, }, instance, ); expect(config.remoteConfig?.fetchRemoteConfig).toBe(true); }); test('should set remoteConfig.fetchRemoteConfig to true when remoteConfig.fetchRemoteConfig is false', async () => { const instance = new AmplitudeBrowser(); const config = await useBrowserConfig( apiKey, { remoteConfig: { fetchRemoteConfig: false, }, }, instance, ); expect(config.remoteConfig?.fetchRemoteConfig).toBe(false); }); }); describe('duplicateResolverFn', () => { const encodeJson = (session: UserSession) => btoa(encodeURIComponent(JSON.stringify(session))); let config: BrowserConfig; let cookieStorage: BrowserUtils.CookieStorage; let duplicateResolverFn: ((value: string) => boolean) | undefined; beforeEach(async () => { config = await Config.useBrowserConfig( apiKey, { cookieOptions: { domain: '.amplitude.com' } }, new AmplitudeBrowser(), ); cookieStorage = config.cookieStorage as BrowserUtils.CookieStorage; duplicateResolverFn = cookieStorage.config.duplicateResolverFn; }); test('should return true when cookieDomain matches config domain', async () => { expect(duplicateResolverFn?.(encodeJson({ optOut: false, cookieDomain: '.amplitude.com' }))).toBe(true); }); test('should return false when cookieDomain does not match config domain', async () => { expect(duplicateResolverFn?.(encodeJson({ optOut: false, cookieDomain: '.other.com' }))).toBe(false); }); test('should return false when cookieDomain is not set', async () => { expect(duplicateResolverFn?.(encodeJson({ optOut: false }))).toBe(false); }); test('should return false when cookie value cannot be decoded', async () => { expect(duplicateResolverFn?.('not-valid-base64!')).toBe(false); }); }); describe('shouldFetchRemoteConfig', () => { test('should return true when remoteConfig.fetchRemoteConfig is explicitly true', () => { expect(shouldFetchRemoteConfig({ remoteConfig: { fetchRemoteConfig: true } })).toBe(true); }); test('should return false when remoteConfig.fetchRemoteConfig is explicitly false', () => { expect(shouldFetchRemoteConfig({ remoteConfig: { fetchRemoteConfig: false } })).toBe(false); }); test('should return false when fetchRemoteConfig is explicitly false', () => { expect(shouldFetchRemoteConfig({ fetchRemoteConfig: false })).toBe(false); }); test('should return true when both are undefined (default behavior)', () => { expect(shouldFetchRemoteConfig({})).toBe(true); }); test('should return true when options is undefined', () => { expect(shouldFetchRemoteConfig()).toBe(true); }); }); describe('useBrowserConfig with earlyConfig', () => { test('should use earlyConfig values when provided', async () => { const customLogger = new core.Logger(); customLogger.enable(LogLevel.Debug); const earlyConfig: Config.EarlyConfig = { loggerProvider: customLogger, serverZone: 'EU', enableDiagnostics: false, diagnosticsSampleRate: 0.5, }; const config = await Config.useBrowserConfig( apiKey, {}, // Empty options to ensure earlyConfig values are used new AmplitudeBrowser(), undefined, // diagnosticsClient earlyConfig, ); // Verify earlyConfig values are used instead of defaults expect(config.loggerProvider).toBe(customLogger); expect(config.serverZone).toBe('EU'); expect(config.enableDiagnostics).toBe(false); expect(config.diagnosticsSampleRate).toBe(0.5); }); }); }); ================================================ FILE: packages/analytics-browser/test/cookie-migration/index.test.ts ================================================ import { Storage, UserSession, MemoryStorage, CookieStorage, getOldCookieName } from '@amplitude/analytics-core'; import { decode, parseLegacyCookies, parseTime } from '../../src/cookie-migration'; import * as LocalStorageModule from '../../src/storage/local-storage'; describe('cookie-migration', () => { const API_KEY = 'asdfasdf'; afterEach(() => { // clean up cookies document.cookie = `${getOldCookieName(API_KEY)}=null; expires=-1`; }); describe('parseLegacyCookies', () => { test('should return default values', async () => { const cookies = await parseLegacyCookies(API_KEY, new MemoryStorage()); expect(cookies).toEqual({ optOut: false, }); }); test('should handle non-persistent storage', async () => { jest.spyOn(LocalStorageModule, 'LocalStorage').mockReturnValueOnce({ isEnabled: async () => false, get: async () => ({}), getRaw: async () => '', set: async () => undefined, remove: async () => undefined, reset: async () => undefined, }); const cookies = await parseLegacyCookies(API_KEY, new MemoryStorage()); expect(cookies).toEqual({ optOut: false, }); }); test('should remove old cookies by default', async () => { const timestamp = 1650949309508; const time = timestamp.toString(32); const userId = 'userId'; const encodedUserId = btoa(unescape(encodeURIComponent(userId))); const oldCookieName = getOldCookieName(API_KEY); const lastEventId = (0).toString(32); document.cookie = `${oldCookieName}=deviceId.${encodedUserId}..${time}.${time}.${lastEventId}`; const cookieStorage: Storage = new CookieStorage(); const cookies = await parseLegacyCookies(API_KEY, cookieStorage); expect(cookies).toEqual({ deviceId: 'deviceId', userId: 'userId', sessionId: timestamp, lastEventId: 0, lastEventTime: timestamp, optOut: false, }); const cookies2 = await cookieStorage.getRaw(oldCookieName); expect(cookies2).toBeUndefined(); }); test('should remove old cookies', async () => { const timestamp = 1650949309508; const time = timestamp.toString(32); const userId = 'userId'; const encodedUserId = btoa(unescape(encodeURIComponent(userId))); const oldCookieName = getOldCookieName(API_KEY); const lastEventId = (0).toString(32); document.cookie = `${oldCookieName}=deviceId.${encodedUserId}..${time}.${time}.${lastEventId}`; const cookieStorage: Storage = new CookieStorage(); const cookies = await parseLegacyCookies(API_KEY, cookieStorage, true); expect(cookies).toEqual({ deviceId: 'deviceId', userId: 'userId', sessionId: timestamp, lastEventTime: timestamp, lastEventId: 0, optOut: false, }); const storage: Storage = new CookieStorage(); const cookies2 = await storage.getRaw(oldCookieName); expect(cookies2).toBeUndefined(); }); test('should keep old cookies', async () => { const timestamp = 1650949309508; const time = timestamp.toString(32); const userId = 'userId'; const encodedUserId = btoa(unescape(encodeURIComponent(userId))); const oldCookieName = getOldCookieName(API_KEY); const lastEventId = (0).toString(32); document.cookie = `${oldCookieName}=deviceId.${encodedUserId}..${time}.${time}.${lastEventId}`; const cookieStorage: Storage = new CookieStorage(); const cookies = await parseLegacyCookies(API_KEY, cookieStorage, false); expect(cookies).toEqual({ deviceId: 'deviceId', userId: 'userId', sessionId: timestamp, lastEventTime: timestamp, lastEventId: 0, optOut: false, }); const storage: Storage = new CookieStorage(); const cookies2 = await storage.getRaw(oldCookieName); expect(cookies2).toBe(`deviceId.${encodedUserId}..${time}.${time}.${lastEventId}`); }); }); describe('parseTime', () => { test('should parse time', () => { const timestamp = Date.now(); const base32 = timestamp.toString(32); expect(parseTime(base32)).toBe(timestamp); }); test('should handle invalid values', () => { expect(parseTime('')).toBe(undefined); }); }); describe('decode', () => { test('should decode value', () => { expect(decode('YXNkZg==')).toBe('asdf'); }); test('should handle incorrecty encoded value', () => { expect(decode('asdf')).toBe(undefined); }); test('should handle undefined input', () => { expect(decode(undefined)).toBe(undefined); }); }); }); ================================================ FILE: packages/analytics-browser/test/default-tracking.test.ts ================================================ import * as analyticsCoreModule from '@amplitude/analytics-core'; import { getAttributionTrackingConfig, getElementInteractionsConfig, getFormInteractionsConfig, getFrustrationInteractionsConfig, getNetworkTrackingConfig, getPageViewTrackingConfig, getPerformanceTrackingConfig, isAttributionTrackingEnabled, isCustomEnrichmentEnabled, isElementInteractionsEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isFrustrationInteractionsEnabled, isNetworkTrackingEnabled, isPageUrlEnrichmentEnabled, isPageViewTrackingEnabled, isPerformanceTrackingEnabled, isSessionTrackingEnabled, isWebVitalsEnabled, } from '../src/default-tracking'; describe('isCustomEnrichmentEnabled', () => { test('should return false when customEnrichment is undefined', () => { expect(isCustomEnrichmentEnabled(undefined)).toBe(false); }); test('should return true when customEnrichment is an object with enabled=true', () => { expect(isCustomEnrichmentEnabled({ enabled: true, body: 'test' })).toBe(true); }); test('should return false when customEnrichment is an object with enabled=false', () => { expect(isCustomEnrichmentEnabled({ enabled: false, body: 'test' })).toBe(false); }); test('should return true when customEnrichment is true (from translated remote config)', () => { expect(isCustomEnrichmentEnabled(true)).toBe(true); }); test('should return false when customEnrichment is false (from translated remote config)', () => { expect(isCustomEnrichmentEnabled(false)).toBe(false); }); test('should return true when customEnrichment is an object without enabled (from translated remote config)', () => { expect(isCustomEnrichmentEnabled({ body: 'test' })).toBe(true); }); test('should return false when customEnrichment is null', () => { expect(isCustomEnrichmentEnabled(null as unknown as undefined)).toBe(false); }); }); describe('isWebVitalsEnabled', () => { describe('is true when', () => { test('autocapture=true', () => { expect(isWebVitalsEnabled(true)).toBe(true); }); test('autocapture.webVitals=true', () => { expect(isWebVitalsEnabled({ webVitals: true })).toBe(true); }); }); describe('is false when', () => { test('autocapture=false', () => { expect(isWebVitalsEnabled(false)).toBe(false); }); test('autocapture.webVitals=false', () => { expect(isWebVitalsEnabled({ webVitals: false })).toBe(false); }); test('autocapture.webVitals is undefined', () => { expect(isWebVitalsEnabled({ networkTracking: true })).toBe(false); }); }); }); describe('isFrustrationInteractionsEnabled', () => { test('should return true when autocapture=true', () => { expect(isFrustrationInteractionsEnabled(true)).toBe(true); }); test('should return false with undefined parameter', () => { expect(isFrustrationInteractionsEnabled(undefined)).toBe(false); }); test('should return false with false parameter', () => { expect(isFrustrationInteractionsEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect(isFrustrationInteractionsEnabled({ frustrationInteractions: true })).toBe(true); }); test('should return false with object parameter', () => { expect(isFrustrationInteractionsEnabled({ frustrationInteractions: false })).toBe(false); }); test('should get frustration interactions config', () => { const config = getFrustrationInteractionsConfig({ autocapture: { frustrationInteractions: { deadClicks: { cssSelectorAllowlist: ['button'], }, rageClicks: { cssSelectorAllowlist: ['button'], }, }, }, }); expect(config).toEqual({ deadClicks: { cssSelectorAllowlist: ['button'], }, rageClicks: { cssSelectorAllowlist: ['button'], }, }); }); test('should get undefined frustration interactions config when autocapture is true', () => { const config = getFrustrationInteractionsConfig({ autocapture: true, }); expect(config).toBeUndefined(); }); }); describe('isPerformanceTrackingEnabled', () => { test('should return false with undefined parameter', () => { expect(isPerformanceTrackingEnabled(undefined)).toBe(false); }); test('should return false when autocapture=true', () => { expect(isPerformanceTrackingEnabled(true)).toBe(false); }); test('should return false when autocapture=false', () => { expect(isPerformanceTrackingEnabled(false)).toBe(false); }); test('should return true with performanceTracking=true', () => { expect(isPerformanceTrackingEnabled({ performanceTracking: true })).toBe(true); }); test('should return true with performanceTracking as object', () => { expect(isPerformanceTrackingEnabled({ performanceTracking: { mainThreadBlock: true } })).toBe(true); }); test('should return false with performanceTracking=false', () => { expect(isPerformanceTrackingEnabled({ performanceTracking: false })).toBe(false); }); test('should return false when performanceTracking is undefined', () => { expect(isPerformanceTrackingEnabled({ webVitals: true })).toBe(false); }); }); describe('getPerformanceTrackingConfig', () => { test('should return config when performanceTracking is an object', () => { const config = getPerformanceTrackingConfig({ autocapture: { performanceTracking: { mainThreadBlock: { durationThreshold: 200 }, }, }, }); expect(config).toEqual({ mainThreadBlock: { durationThreshold: 200 } }); }); test('should return undefined when autocapture is true', () => { expect(getPerformanceTrackingConfig({ autocapture: true })).toBeUndefined(); }); test('should return mainThreadBlock true when performanceTracking=true (explicit autocapture opt-in)', () => { expect(getPerformanceTrackingConfig({ autocapture: { performanceTracking: true } })).toEqual({ mainThreadBlock: true, }); }); test('should return undefined when performanceTracking is disabled', () => { expect(getPerformanceTrackingConfig({ autocapture: { performanceTracking: false } })).toBeUndefined(); }); }); describe('isFileDownloadTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isFileDownloadTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isFileDownloadTrackingEnabled(undefined)).toBe(true); }); test('should return false with false parameter', () => { expect(isFileDownloadTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isFileDownloadTrackingEnabled({ fileDownloads: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isFileDownloadTrackingEnabled({ fileDownloads: false, }), ).toBe(false); }); }); describe('isFormInteractionTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isFormInteractionTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isFormInteractionTrackingEnabled(undefined)).toBe(true); }); test('should return false with false parameter', () => { expect(isFormInteractionTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isFormInteractionTrackingEnabled({ formInteractions: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isFormInteractionTrackingEnabled({ formInteractions: false, }), ).toBe(false); }); }); describe('getFormInteractionsConfig', () => { test('should return undefined when defaultTracking is undefined', () => { const config = getFormInteractionsConfig({}); expect(config).toBeUndefined(); }); test('should return undefined when defaultTracking is true', () => { const config = getFormInteractionsConfig({ defaultTracking: true, }); expect(config).toBeUndefined(); }); test('should return undefined when defaultTracking is false', () => { const config = getFormInteractionsConfig({ defaultTracking: false, }); expect(config).toBeUndefined(); }); test('should return undefined when formInteractions is true', () => { const config = getFormInteractionsConfig({ defaultTracking: { formInteractions: true, }, }); expect(config).toBeUndefined(); }); test('should return undefined when formInteractions is false', () => { const config = getFormInteractionsConfig({ defaultTracking: { formInteractions: false, }, }); expect(config).toBeUndefined(); }); test('should return config with shouldTrackSubmit callback', () => { const shouldTrackSubmit = jest.fn(() => true); const config = getFormInteractionsConfig({ defaultTracking: { formInteractions: { shouldTrackSubmit, }, }, }); expect(config).toBeDefined(); expect(config?.shouldTrackSubmit).toBe(shouldTrackSubmit); }); test('should return empty config object when formInteractions is empty object', () => { const config = getFormInteractionsConfig({ defaultTracking: { formInteractions: {}, }, }); expect(config).toEqual({}); }); }); describe('isPageViewTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isPageViewTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isPageViewTrackingEnabled(undefined)).toBe(true); }); test('should return true with false parameter', () => { expect(isPageViewTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isPageViewTrackingEnabled({ pageViews: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isPageViewTrackingEnabled({ pageViews: false, }), ).toBe(false); }); test('should return true with nested object parameter', () => { expect( isPageViewTrackingEnabled({ pageViews: {}, }), ).toBe(true); }); }); describe('isSessionTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isSessionTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isSessionTrackingEnabled(undefined)).toBe(true); }); test('should return false with false parameter', () => { expect(isSessionTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isSessionTrackingEnabled({ sessions: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isSessionTrackingEnabled({ sessions: false, }), ).toBe(false); }); describe('when environment is a Chrome extension', () => { beforeEach(() => { jest.spyOn(analyticsCoreModule, 'isChromeExtension').mockReturnValue(true); }); test('should return false if not set', () => { expect(isSessionTrackingEnabled(undefined)).toBe(false); }); test('should return true if set to true', () => { expect(isSessionTrackingEnabled({ sessions: true })).toBe(true); }); }); }); describe('isAttributionTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isAttributionTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isAttributionTrackingEnabled(undefined)).toBe(true); }); test('should return false with false parameter', () => { expect(isAttributionTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isAttributionTrackingEnabled({ attribution: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isAttributionTrackingEnabled({ attribution: false, }), ).toBe(false); }); }); describe('isNetworkTrackingEnabled', () => { test('should return false when autocapture is false', () => { expect(isNetworkTrackingEnabled(false)).toBe(false); }); test('should return false when autocapture is undefined', () => { expect(isNetworkTrackingEnabled(undefined)).toBe(false); }); test('should return true when autocapture is true', () => { expect(isNetworkTrackingEnabled(true)).toBe(true); }); test('should return true when autocapture.networkTracking is true', () => { expect( isNetworkTrackingEnabled({ networkTracking: true, }), ).toBe(true); }); test('should return true when autocapture.networkTracking is an object', () => { expect( isNetworkTrackingEnabled({ networkTracking: {}, }), ).toBe(true); }); test('should return false when autocapture.networkTracking is false', () => { expect( isNetworkTrackingEnabled({ networkTracking: false, }), ).toBe(false); }); test('should return false when autocapture.networkTracking is undefined', () => { expect( isNetworkTrackingEnabled({ sessions: true, pageViews: true, networkTracking: undefined, }), ).toBe(false); }); }); describe('isElementInteractionsEnabled', () => { test('should return true with true parameter', () => { expect(isElementInteractionsEnabled(true)).toBe(true); }); test('should return false with undefined parameter', () => { expect(isElementInteractionsEnabled(undefined)).toBe(false); }); test('should return false with false parameter', () => { expect(isElementInteractionsEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isElementInteractionsEnabled({ elementInteractions: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isElementInteractionsEnabled({ elementInteractions: false, }), ).toBe(false); }); test('should return false with object parameter undefined', () => { expect( isElementInteractionsEnabled({ elementInteractions: undefined, }), ).toBe(false); }); }); describe('getPageViewTrackingConfig', () => { test('should return undefined trackOn config', () => { const config = getPageViewTrackingConfig({ defaultTracking: { pageViews: true, }, }); expect(config.trackOn).toBe(undefined); }); test('should return trackOn config returning false', () => { const config = getPageViewTrackingConfig({ defaultTracking: { pageViews: false, }, }); expect(typeof config.trackOn).toBe('function'); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore asserts that track on is a function that returns a boolean expect(config.trackOn()).toBe(false); }); test('should return advanced options', () => { const config = getPageViewTrackingConfig({ defaultTracking: { pageViews: { trackOn: 'attribution', trackHistoryChanges: 'all', eventType: 'Page View', }, }, }); expect(typeof config.trackOn).toBe('string'); expect(config.trackOn).toBe('attribution'); expect(config.trackHistoryChanges).toBe('all'); expect(config.eventType).toBe('Page View'); }); }); describe('getAttributionTrackingConfig', () => { test('should return disabled config', () => { const config = getAttributionTrackingConfig({ defaultTracking: { attribution: false, }, }); expect(config).toEqual({ excludeReferrers: undefined, initialEmptyValue: undefined, resetSessionOnNewCampaign: undefined, }); }); test('should return default config', () => { const config = getAttributionTrackingConfig({ defaultTracking: { attribution: {}, }, }); expect(config).toEqual({ excludeReferrers: undefined, initialEmptyValue: undefined, resetSessionOnNewCampaign: undefined, }); }); test('should return custom config', () => { const config = getAttributionTrackingConfig({ defaultTracking: { attribution: { excludeReferrers: [], initialEmptyValue: 'EMPTY', resetSessionOnNewCampaign: true, }, }, }); expect(config).toEqual({ excludeReferrers: [], initialEmptyValue: 'EMPTY', resetSessionOnNewCampaign: true, }); }); }); describe('getNetworkTrackingConfig', () => { test('should return autocapture.networkTracking if it is an object', () => { const autocapture = { networkTracking: { ignoreAmplitudeRequests: true, ignoreHosts: ['example.com'], captureRules: [ { hosts: ['example.com'], statusCodeRange: '500-599', }, ], }, }; const config = getNetworkTrackingConfig({ autocapture, }); expect(typeof config).toBe('object'); expect(config).toEqual(autocapture.networkTracking); }); test('should return "networkTrackingOptions" if is defined and autocapture.networkTracking=true (deprecated)', () => { const autocapture = { networkTracking: true, }; const networkTrackingOptions = { ignoreAmplitudeRequests: true, ignoreHosts: ['example.com'], captureRules: [ { hosts: ['example.com'], statusCodeRange: '500-599', }, ], }; const config = getNetworkTrackingConfig({ autocapture, networkTrackingOptions, }); expect(typeof config).toBe('object'); expect(config).toEqual(networkTrackingOptions); }); test('should return undefined when autocapture is not defined', () => { const autocapture = undefined; const networkTrackingOptions = {}; const config = getNetworkTrackingConfig({ autocapture, networkTrackingOptions, }); expect(config).toBeUndefined(); }); test('should return undefined when autocapture.networkTracking is undefined', () => { const config = getNetworkTrackingConfig({ autocapture: { elementInteractions: true, sessions: true, }, networkTrackingOptions: { ignoreAmplitudeRequests: true, ignoreHosts: ['example.com'], captureRules: [ { hosts: ['example.com'], statusCodeRange: '500-599', }, ], }, }); expect(config).toBeUndefined(); }); describe('captureRules.urls and .hosts combinations', () => { const networkTracking = { captureRules: [ { urls: ['https://example.com/path', /path\/to/], hosts: ['example.com'] }, { hosts: ['example.com', 'helloworld.com'] }, { urls: ['https://example.com'] }, ], }; test('should ignore hosts if urls are set', () => { const captureRules = getNetworkTrackingConfig({ autocapture: { networkTracking }, })?.captureRules || []; const ruleWithBothSet = captureRules[0]; expect(ruleWithBothSet.hosts).toBeUndefined(); expect(ruleWithBothSet.urls).toEqual(['https://example.com/path', /path\/to/]); }); test('should keep hosts if urls are not set', () => { const captureRules = getNetworkTrackingConfig({ autocapture: { networkTracking }, })?.captureRules || []; const ruleWithOnlyHosts = captureRules[1]; expect(ruleWithOnlyHosts.hosts).toEqual(['example.com', 'helloworld.com']); expect(ruleWithOnlyHosts.urls).toBeUndefined(); }); test('should ignore hosts if urls are set and hosts is undefined', () => { const captureRules = getNetworkTrackingConfig({ autocapture: { networkTracking }, })?.captureRules || []; const ruleWithBothSet = captureRules[2]; expect(ruleWithBothSet.hosts).toBeUndefined(); expect(ruleWithBothSet.urls).toEqual(['https://example.com']); }); test('should not do anything if captureRules is not set', () => { const config = getNetworkTrackingConfig({ autocapture: { networkTracking: {} }, }); expect(config?.captureRules).toBeUndefined(); }); test('should apply captureRules to networkTrackingOptions', () => { const networkTrackingOptions = { captureRules: [{ urls: ['https://example.com/path', /path\/to/], hosts: ['example.com'] }], }; const config = getNetworkTrackingConfig({ autocapture: { networkTracking: true }, networkTrackingOptions, }); const ruleWithBothSet = config?.captureRules?.[0]; expect(ruleWithBothSet?.urls).toEqual(['https://example.com/path', /path\/to/]); expect(ruleWithBothSet?.hosts).toBeUndefined(); }); }); }); describe('getElementInteractionsConfig', () => { test('should return an empty object when autocapture is true', () => { const config = getElementInteractionsConfig({ autocapture: true, }); expect(config).toBeUndefined(); }); test('should return an empty object when userInteraction is true', () => { const config = getElementInteractionsConfig({ autocapture: { elementInteractions: true, }, }); expect(config).toBeUndefined(); }); test('should return advanced options', () => { const testCssSelectorAllowlist = ['button']; const testPageUrlAllowlist = ['example.com']; const mockedShouldTrackEventResolver = jest.fn(() => true); const testDataAttributePrefix = 'data-amp-track'; const config = getElementInteractionsConfig({ autocapture: { elementInteractions: { cssSelectorAllowlist: testCssSelectorAllowlist, pageUrlAllowlist: testPageUrlAllowlist, shouldTrackEventResolver: mockedShouldTrackEventResolver, dataAttributePrefix: testDataAttributePrefix, }, }, }); expect(config?.cssSelectorAllowlist).toBe(testCssSelectorAllowlist); expect(config?.pageUrlAllowlist).toBe(testPageUrlAllowlist); expect(config?.shouldTrackEventResolver).toBe(mockedShouldTrackEventResolver); expect(config?.dataAttributePrefix).toBe(testDataAttributePrefix); }); }); describe('isPageUrlEnrichmentEnabled', () => { test('should return true with true parameter', () => { expect(isPageUrlEnrichmentEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isPageUrlEnrichmentEnabled(undefined)).toBe(true); }); test('should return false with false parameter', () => { expect(isPageUrlEnrichmentEnabled(false)).toBe(false); }); test('should return true with object parameter set to true', () => { expect( isPageUrlEnrichmentEnabled({ pageUrlEnrichment: true, }), ).toBe(true); }); test('should return false with object parameter set to false', () => { expect( isPageUrlEnrichmentEnabled({ pageUrlEnrichment: false, }), ).toBe(false); }); test('should return true with object parameter undefined', () => { expect( isPageUrlEnrichmentEnabled({ pageUrlEnrichment: undefined, }), ).toBe(true); }); }); ================================================ FILE: packages/analytics-browser/test/det-notification.test.ts ================================================ jest.unmock('../src/det-notification'); import { detNotify, resetNotify } from '../src/det-notification'; import { BrowserConfig } from '../src/config'; import { UUID } from '@amplitude/analytics-core'; describe('detNotify', () => { let apiKey = ''; afterAll(() => { jest.mock('../src/det-notification'); }); beforeEach(() => { apiKey = UUID(); resetNotify(); }); test('should handle undefined config', () => { const config = new BrowserConfig(apiKey); const warn = jest.spyOn(config.loggerProvider, 'warn').mockImplementationOnce(() => undefined); detNotify(config); expect(warn).toHaveBeenCalledTimes(1); expect(warn).toHaveBeenCalledWith( `\`options.defaultTracking\` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to \`options.defaultTracking\`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example: amplitude.init(, { defaultTracking: true, }); Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`, ); }); test('should handle duplicate calls', () => { const config = new BrowserConfig(apiKey); const warn = jest.spyOn(config.loggerProvider, 'warn').mockImplementationOnce(() => undefined); detNotify(config); expect(warn).toHaveBeenCalledTimes(1); expect(warn).toHaveBeenCalledWith( `\`options.defaultTracking\` is set to undefined. This implicitly configures your Amplitude instance to track Page Views, Sessions, File Downloads, and Form Interactions. You can suppress this warning by explicitly setting a value to \`options.defaultTracking\`. The value must either be a boolean, to enable and disable all default events, or an object, for advanced configuration. For example: amplitude.init(, { defaultTracking: true, }); Visit https://www.docs.developers.amplitude.com/data/sdks/browser-2/#tracking-default-events for more details.`, ); detNotify(config); // call count still at 1 expect(warn).toHaveBeenCalledTimes(1); }); test('should handle defined config', () => { const config = new BrowserConfig(apiKey, undefined, undefined, undefined, true); const warn = jest.spyOn(config.loggerProvider, 'warn').mockImplementationOnce(() => undefined); detNotify(config); expect(warn).toHaveBeenCalledTimes(0); }); }); ================================================ FILE: packages/analytics-browser/test/helpers/constants.ts ================================================ export const uuidPattern = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/; ================================================ FILE: packages/analytics-browser/test/helpers/mock.ts ================================================ import { Logger, MemoryStorage, UUID, LogLevel, UserSession, BrowserClient, BrowserConfig, } from '@amplitude/analytics-core'; export const createAmplitudeMock = (): jest.MockedObject => ({ init: jest.fn(), add: jest.fn(), remove: jest.fn(), track: jest.fn(), logEvent: jest.fn(), identify: jest.fn(), groupIdentify: jest.fn(), setGroup: jest.fn(), revenue: jest.fn(), setOptOut: jest.fn(), getOptOut: jest.fn(), getIdentity: jest.fn(), setIdentity: jest.fn(), flush: jest.fn(), getUserId: jest.fn(), setUserId: jest.fn(), getDeviceId: jest.fn(), setDeviceId: jest.fn(), getSessionId: jest.fn(), setSessionId: jest.fn(), extendSession: jest.fn(), reset: jest.fn(), setTransport: jest.fn(), _setDiagnosticsSampleRate: jest.fn(), }); export const createConfigurationMock = (options?: Partial) => { const apiKey = options?.apiKey ?? UUID(); const cookieStorage = new MemoryStorage(); return { // core config apiKey: apiKey, flushIntervalMillis: 1000, flushMaxRetries: 5, flushQueueSize: 10, logLevel: LogLevel.Warn, loggerProvider: new Logger(), minIdLength: undefined, offline: false, optOut: false, plan: undefined, ingestionMetadata: undefined, serverUrl: undefined, serverZone: undefined, storageProvider: { isEnabled: async () => true, get: jest.fn(), set: jest.fn(), remove: jest.fn(), reset: jest.fn(), getRaw: jest.fn(), }, transportProvider: { send: jest.fn(), }, useBatch: false, // browser config appVersion: undefined, attribution: undefined, deviceId: undefined, cookieExpiration: 365, cookieSameSite: 'Lax', cookieSecure: false, cookieStorage: cookieStorage, cookieUpgrade: undefined, disableCookies: false, domain: '', lastEventTime: undefined, partnerId: undefined, sessionId: undefined, sessionManager: sessionStorage, sessionTimeout: 30 * 60 * 1000, trackingOptions: { ipAddress: true, language: true, platform: true, }, trackingSessionEvents: false, userId: undefined, ...options, }; }; ================================================ FILE: packages/analytics-browser/test/index.test.ts ================================================ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import * as amplitude from '../src/index'; import { FakeBrowserClient } from './utils/fake-browser-client'; const { add, createInstance, extendSession, flush, getDeviceId, getSessionId, getUserId, groupIdentify, Identify, identify, init, logEvent, remove, reset, Revenue, revenue, runQueuedFunctions, setDeviceId, setGroup, setOptOut, setSessionId, setTransport, setUserId, track, AmplitudeBrowser, trackVideo, } = amplitude; describe('index', () => { test(`structural typing test, 'default export' should be BrowserClient`, () => { for (const key of Object.keys(FakeBrowserClient.prototype)) { // add message for if it fails if (!(amplitude as any)[key]) { throw new Error( `'${key}' is a required method in BrowserClient but is not defined in analytics-browser export`, ); } } // sanity test a few known methods expect(typeof amplitude.add).toBe('function'); expect(typeof amplitude.getIdentity).toBe('function'); expect(typeof amplitude.track).toBe('function'); expect(typeof (amplitude as any).foo).toBe('undefined'); }); test('should expose apis', () => { expect(typeof add).toBe('function'); expect(typeof createInstance).toBe('function'); expect(typeof extendSession).toBe('function'); expect(typeof flush).toBe('function'); expect(typeof groupIdentify).toBe('function'); expect(typeof getDeviceId).toBe('function'); expect(typeof getSessionId).toBe('function'); expect(typeof getUserId).toBe('function'); expect(typeof Identify).toBe('function'); expect(typeof identify).toBe('function'); expect(typeof init).toBe('function'); expect(typeof logEvent).toBe('function'); expect(typeof remove).toBe('function'); expect(typeof Revenue).toBe('function'); expect(typeof revenue).toBe('function'); expect(typeof reset).toBe('function'); expect(typeof runQueuedFunctions).toBe('function'); expect(typeof setDeviceId).toBe('function'); expect(typeof setGroup).toBe('function'); expect(typeof setOptOut).toBe('function'); expect(typeof setSessionId).toBe('function'); expect(typeof setTransport).toBe('function'); expect(typeof setUserId).toBe('function'); expect(typeof track).toBe('function'); expect(typeof AmplitudeBrowser).toBe('function'); expect(typeof trackVideo).toBe('function'); }); }); ================================================ FILE: packages/analytics-browser/test/plugins/context.test.ts ================================================ import { BrowserConfig } from '../../src/config'; import { Context } from '../../src/plugins/context'; import { UUID } from '@amplitude/analytics-core'; describe('context', () => { let apiKey = ''; beforeEach(() => { apiKey = UUID(); }); describe('setup', () => { test('should setup plugin', async () => { const context = new Context(); const config = new BrowserConfig(apiKey); config.appVersion = '1.0.0'; config.lastEventId = 1; await context.setup(config); expect(context.config.appVersion).toEqual('1.0.0'); }); test('should setup plugin without app version', async () => { const context = new Context(); const config = new BrowserConfig(apiKey); await context.setup(config); expect(context.config.appVersion).toBeUndefined(); }); }); describe('execute', () => { test('should execute plugin', async () => { const context = new Context(); const config = new BrowserConfig(apiKey); config.appVersion = '1.0.0'; config.deviceId = 'deviceId'; config.sessionId = 1; config.userId = 'user@amplitude.com'; await context.setup(config); const event = { event_type: 'event_type', }; const firstContextEvent = await context.execute(event); expect(firstContextEvent.app_version).toEqual('1.0.0'); expect(firstContextEvent.event_id).toEqual(0); expect(firstContextEvent.event_type).toEqual('event_type'); expect(firstContextEvent.insert_id).toBeDefined(); expect(firstContextEvent.platform).toEqual('Web'); expect(firstContextEvent.language).toBeDefined(); expect(firstContextEvent.ip).toEqual('$remote'); expect(firstContextEvent.device_id).toEqual('deviceId'); expect(firstContextEvent.session_id).toEqual(1); expect(firstContextEvent.user_id).toEqual('user@amplitude.com'); const secondContextEvent = await context.execute(event); expect(secondContextEvent.event_id).toEqual(1); }); test('should not return the properties when the tracking options are false', async () => { const context = new Context(); const config = new BrowserConfig(apiKey); config.appVersion = '1.0.0'; config.deviceId = 'deviceId'; config.sessionId = 1; config.trackingOptions = { ipAddress: false, language: false, platform: false, }; config.userId = 'user@amplitude.com'; await context.setup(config); const event = { event_type: 'event_type', }; const firstContextEvent = await context.execute(event); expect(firstContextEvent.app_version).toEqual('1.0.0'); expect(firstContextEvent.event_id).toEqual(0); expect(firstContextEvent.event_type).toEqual('event_type'); expect(firstContextEvent.insert_id).toBeDefined(); // tracking options should not be included expect(firstContextEvent.platform).toBeUndefined(); expect(firstContextEvent.language).toBeUndefined(); expect(firstContextEvent.ip).toBeUndefined(); expect(firstContextEvent.device_id).toEqual('deviceId'); expect(firstContextEvent.session_id).toEqual(1); expect(firstContextEvent.user_id).toEqual('user@amplitude.com'); const secondContextEvent = await context.execute(event); expect(secondContextEvent.event_id).toEqual(1); }); test('should be overwritten by the context', async () => { const context = new Context(); const config = new BrowserConfig(apiKey); config.appVersion = '1.0.0'; config.deviceId = 'deviceId'; config.sessionId = 1; config.userId = 'user@amplitude.com'; await context.setup(config); const event = { event_type: 'event_type', device_id: 'new deviceId', }; const firstContextEvent = await context.execute({ ...event, event_id: 100, }); expect(firstContextEvent.app_version).toEqual('1.0.0'); expect(firstContextEvent.event_id).toEqual(100); expect(firstContextEvent.event_type).toEqual('event_type'); expect(firstContextEvent.insert_id).toBeDefined(); expect(firstContextEvent.device_id).toEqual('new deviceId'); const secondContextEvent = await context.execute(event); expect(secondContextEvent.event_id).toEqual(101); }); describe('ingestionMetadata config', () => { test('should include ingestion metadata', async () => { const sourceName = 'ampli'; const sourceVersion = '2.0.0'; const context = new Context(); const config = new BrowserConfig(apiKey); config.ingestionMetadata = { sourceName, sourceVersion, }; config.userId = 'user@amplitude.com'; await context.setup(config); const event = { event_type: 'event_type', }; const firstContextEvent = await context.execute(event); expect(firstContextEvent.event_id).toEqual(0); expect(firstContextEvent.event_type).toEqual('event_type'); expect(firstContextEvent.ingestion_metadata?.source_name).toEqual(sourceName); expect(firstContextEvent.ingestion_metadata?.source_version).toEqual(sourceVersion); }); test('sourceName should be optional', async () => { const sourceVersion = '2.0.0'; const context = new Context(); const config = new BrowserConfig(apiKey); config.ingestionMetadata = { sourceVersion, }; config.userId = 'user@amplitude.com'; await context.setup(config); const event = { event_type: 'event_type', }; const firstContextEvent = await context.execute(event); expect(firstContextEvent.event_id).toEqual(0); expect(firstContextEvent.ingestion_metadata?.source_name).toBeUndefined(); expect(firstContextEvent.ingestion_metadata?.source_version).toEqual(sourceVersion); }); test('sourceVersion should be optional', async () => { const sourceName = 'ampli'; const context = new Context(); const config = new BrowserConfig(apiKey); config.ingestionMetadata = { sourceName, }; config.userId = 'user@amplitude.com'; await context.setup(config); const event = { event_type: 'event_type', }; const firstContextEvent = await context.execute(event); expect(firstContextEvent.event_id).toEqual(0); expect(firstContextEvent.ingestion_metadata?.source_name).toEqual(sourceName); expect(firstContextEvent.ingestion_metadata?.source_version).toBeUndefined(); }); }); }); }); ================================================ FILE: packages/analytics-browser/test/plugins/file-download-tracking.test.ts ================================================ /* eslint-disable @typescript-eslint/unbound-method */ import { createAmplitudeMock, createConfigurationMock } from '../helpers/mock'; import { fileDownloadTracking } from '../../src/plugins/file-download-tracking'; import { FILE_EXTENSION, FILE_NAME, LINK_ID, LINK_TEXT, LINK_URL } from '../../src/constants'; describe('fileDownloadTracking', () => { let amplitude = createAmplitudeMock(); beforeEach(() => { amplitude = createAmplitudeMock(); const link = document.createElement('a'); link.setAttribute('id', 'my-link-id'); link.setAttribute('class', 'my-link-class'); link.text = 'my-link-text'; document.body.appendChild(link); }); afterEach(() => { document.querySelector('a#my-link-id')?.remove(); }); test.each([ 'https://analytics.amplitude.com/files/my-file.pdf', 'https://analytics.amplitude.com/files/my-file.pdf?foo=bar', ])('should track file_download event', async (value) => { // setup document.getElementById('my-link-id')?.setAttribute('href', value); const config = createConfigurationMock(); const plugin = fileDownloadTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // trigger click event document.getElementById('my-link-id')?.dispatchEvent(new Event('click')); // assert file download event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] File Downloaded', { [FILE_EXTENSION]: 'pdf', [FILE_NAME]: '/files/my-file.pdf', [LINK_ID]: 'my-link-id', [LINK_TEXT]: 'my-link-text', [LINK_URL]: value, }); // stop observer and listeners await plugin.teardown?.(); // trigger click event document.getElementById('my-link-id')?.dispatchEvent(new Event('click')); // assert no additional event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); }); test('should track file_download event for a dynamically added achor tag', async () => { // setup const config = createConfigurationMock(); const plugin = fileDownloadTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // add anchor element dynamically const link = document.createElement('a'); link.setAttribute('id', 'my-link-2-id'); link.setAttribute('class', 'my-link-2-class'); link.setAttribute('href', 'https://analytics.amplitude.com/files/my-file-2.pdf'); link.text = 'my-link-2-text'; document.body.appendChild(link); // allow mutation observer to execute and event listener to be attached await new Promise((r) => r(undefined)); // basically, await next clock tick // trigger change event link.dispatchEvent(new Event('click')); // assert file download event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] File Downloaded', { [FILE_EXTENSION]: 'pdf', [FILE_NAME]: '/files/my-file-2.pdf', [LINK_ID]: 'my-link-2-id', [LINK_TEXT]: 'my-link-2-text', [LINK_URL]: 'https://analytics.amplitude.com/files/my-file-2.pdf', }); // stop observer and listeners await plugin.teardown?.(); // add anchor element dynamically const link3 = document.createElement('a'); link3.setAttribute('id', 'my-link-3-id'); link3.setAttribute('class', 'my-link-3-class'); link3.setAttribute('href', 'https://analytics.amplitude.com/files/my-file-3.pdf'); link3.text = 'my-link-3-text'; document.body.appendChild(link3); // allow mutation observer to execute and event listener to be attached await new Promise((r) => r(undefined)); // basically, await next clock tick // trigger change event link.dispatchEvent(new Event('click')); // assert no additional file download event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); }); test('should track file_download event for a dynamically added nested achor tag', async () => { // setup const config = createConfigurationMock(); const plugin = fileDownloadTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // add anchor element dynamically const link = document.createElement('a'); link.setAttribute('id', 'my-link-2-id'); link.setAttribute('class', 'my-link-2-class'); link.setAttribute('href', 'https://analytics.amplitude.com/files/my-file-2.pdf'); link.text = 'my-link-2-text'; // add parent element const div = document.createElement('div'); div.appendChild(link); document.body.appendChild(div); // allow mutation observer to execute and event listener to be attached await new Promise((r) => r(undefined)); // basically, await next clock tick // trigger change event link.dispatchEvent(new Event('click')); // assert file download event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] File Downloaded', { [FILE_EXTENSION]: 'pdf', [FILE_NAME]: '/files/my-file-2.pdf', [LINK_ID]: 'my-link-2-id', [LINK_TEXT]: 'my-link-2-text', [LINK_URL]: 'https://analytics.amplitude.com/files/my-file-2.pdf', }); }); test('should track file download event when the plugin is added after window load', async () => { // setup document.getElementById('my-link-id')?.setAttribute('href', 'https://analytics.amplitude.com/files/my-file.pdf'); const config = createConfigurationMock(); const plugin = fileDownloadTracking(); await plugin.setup?.(config, amplitude); // trigger change event document.getElementById('my-link-id')?.dispatchEvent(new Event('click')); // assert first event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); }); test('should track form_start event when the plugin is added before window load', async () => { const originalReadyState = document.readyState; Object.defineProperty(document, 'readyState', { value: 'loading', writable: true, configurable: true, }); // setup document.getElementById('my-link-id')?.setAttribute('href', 'https://analytics.amplitude.com/files/my-file.pdf'); const config = createConfigurationMock(); const plugin = fileDownloadTracking(); await plugin.setup?.(config, amplitude); // trigger change event window.dispatchEvent(new Event('load')); document.getElementById('my-link-id')?.dispatchEvent(new Event('click')); // assert first event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); // Restore the original value after each test Object.defineProperty(document, 'readyState', { value: originalReadyState, writable: true, }); }); test('should not enrich events', async () => { const input = { event_type: 'page_view', }; const plugin = fileDownloadTracking(); const result = await plugin.execute?.(input); expect(result).toEqual(input); }); // eslint-disable-next-line jest/expect-expect test('should teardown plugin', async () => { const plugin = fileDownloadTracking(); await plugin.teardown?.(); // no explicit assertion // test asserts that no error is thrown }); }); ================================================ FILE: packages/analytics-browser/test/plugins/form-interaction-tracking.test.ts ================================================ /* eslint-disable @typescript-eslint/unbound-method */ import { createAmplitudeMock, createConfigurationMock } from '../helpers/mock'; import { formInteractionTracking } from '../../src/plugins/form-interaction-tracking'; import { FORM_DESTINATION, FORM_ID, FORM_NAME } from '../../src/constants'; // SubmitEvent is not available in JSDOM, so we need to polyfill it if (typeof SubmitEvent === 'undefined') { // eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).SubmitEvent = function SubmitEvent( this: Event & { submitter: HTMLElement | null }, type: string, eventInitDict?: SubmitEventInit, ) { const event = new Event(type, eventInitDict); Object.setPrototypeOf(event, SubmitEvent.prototype); // eslint-disable-next-line @typescript-eslint/no-explicit-any (event as any).submitter = eventInitDict?.submitter ?? null; return event; }; // eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).SubmitEvent.prototype = Object.create(Event.prototype); // eslint-disable-next-line @typescript-eslint/no-explicit-any (global as any).SubmitEvent.prototype.constructor = (global as any).SubmitEvent; } describe('formInteractionTracking', () => { let amplitude = createAmplitudeMock(); beforeEach(() => { amplitude = createAmplitudeMock(); const form = document.createElement('form'); form.setAttribute('id', 'my-form-id'); form.setAttribute('name', 'my-form-name'); form.setAttribute('action', '/submit'); const text = document.createElement('input'); text.setAttribute('type', 'text'); text.setAttribute('id', 'my-text-id'); const submit = document.createElement('input'); submit.setAttribute('type', 'submit'); submit.setAttribute('id', 'my-submit-id'); form.appendChild(text); form.appendChild(submit); document.body.appendChild(form); }); afterEach(() => { document.querySelector('form#my-form-id')?.remove(); }); test('should track form_start event when the plugin is added after window load', async () => { // setup const config = createConfigurationMock(); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); // trigger change event document.getElementById('my-form-id')?.dispatchEvent(new Event('change')); // assert first event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); }); test('should track form_start event when the plugin is added before window load', async () => { const originalReadyState = document.readyState; Object.defineProperty(document, 'readyState', { value: 'loading', writable: true, configurable: true, }); // setup const config = createConfigurationMock(); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); // trigger change event window.dispatchEvent(new Event('load')); document.getElementById('my-form-id')?.dispatchEvent(new Event('change')); // assert first event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); // Restore the original value after each test Object.defineProperty(document, 'readyState', { value: originalReadyState, writable: true, }); }); test('should track form_start event', async () => { // setup const config = createConfigurationMock(); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // trigger change event document.getElementById('my-form-id')?.dispatchEvent(new Event('change')); // assert first event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] Form Started', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); // trigger change event again document.getElementById('my-form-id')?.dispatchEvent(new Event('change')); // assert second event was not tracked expect(amplitude.track).toHaveBeenCalledTimes(1); }); test('should return current location if form action attribute is missing', async () => { // setup const config = createConfigurationMock(); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // Remove form action document.getElementById('my-form-id')?.removeAttribute('action'); // trigger change event document.getElementById('my-form-id')?.dispatchEvent(new Event('change')); // assert first event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] Form Started', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/', }); // trigger change event again document.getElementById('my-form-id')?.dispatchEvent(new Event('change')); // assert second event was not tracked expect(amplitude.track).toHaveBeenCalledTimes(1); }); test('should track form_start event for a dynamically added form tag', async () => { // setup const config = createConfigurationMock(); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // add form element dynamically const form = document.createElement('form'); form.setAttribute('id', 'my-form-2-id'); form.setAttribute('name', 'my-form-2-name'); form.setAttribute('action', '/submit'); const text = document.createElement('input'); text.setAttribute('type', 'text'); text.setAttribute('id', 'my-text-2-id'); const submit = document.createElement('input'); submit.setAttribute('type', 'submit'); submit.setAttribute('id', 'my-submit-2-id'); form.appendChild(text); form.appendChild(submit); document.body.appendChild(form); // allow mutation observer to execute and event listener to be attached await new Promise((r) => r(undefined)); // basically, await next clock tick // trigger change event form.dispatchEvent(new Event('change')); // assert first event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] Form Started', { [FORM_ID]: 'my-form-2-id', [FORM_NAME]: 'my-form-2-name', [FORM_DESTINATION]: 'http://localhost/submit', }); // trigger change event again form.dispatchEvent(new Event('change')); // assert second event was not tracked expect(amplitude.track).toHaveBeenCalledTimes(1); // stop observer and listeners await plugin.teardown?.(); // add form element dynamically const form3 = document.createElement('form'); form3.setAttribute('id', 'my-form-3-id'); form3.setAttribute('name', 'my-form-3-name'); form3.setAttribute('action', '/submit'); const text3 = document.createElement('input'); text3.setAttribute('type', 'text'); text3.setAttribute('id', 'my-text-3-id'); const submit3 = document.createElement('input'); submit3.setAttribute('type', 'submit'); submit3.setAttribute('id', 'my-submit-3-id'); form3.appendChild(text3); form3.appendChild(submit3); document.body.appendChild(form3); // allow mutation observer to execute and event listener to be attached await new Promise((r) => r(undefined)); // basically, await next clock tick // trigger change event form3.dispatchEvent(new Event('change')); // assert no additional event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); }); test('should track form_start event for a dynamically added nested form tag', async () => { // setup const config = createConfigurationMock(); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // add form element dynamically const form = document.createElement('form'); form.setAttribute('id', 'my-form-2-id'); form.setAttribute('name', 'my-form-2-name'); form.setAttribute('action', '/submit'); const text = document.createElement('input'); text.setAttribute('type', 'text'); text.setAttribute('id', 'my-text-2-id'); const submit = document.createElement('input'); submit.setAttribute('type', 'submit'); submit.setAttribute('id', 'my-submit-2-id'); form.appendChild(text); form.appendChild(submit); const div = document.createElement('div'); div.appendChild(form); document.body.appendChild(div); // allow mutation observer to execute and event listener to be attached await new Promise((r) => r(undefined)); // basically, await next clock tick // trigger change event form.dispatchEvent(new Event('change')); // assert first event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] Form Started', { [FORM_ID]: 'my-form-2-id', [FORM_NAME]: 'my-form-2-name', [FORM_DESTINATION]: 'http://localhost/submit', }); // trigger change event again form.dispatchEvent(new Event('change')); // assert second event was not tracked expect(amplitude.track).toHaveBeenCalledTimes(1); }); test('should track form_start and form_submit events on change and submit', async () => { // setup const config = createConfigurationMock(); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // trigger change event again document.getElementById('my-form-id')?.dispatchEvent(new Event('change')); // assert first event was tracked expect(amplitude.track).toHaveBeenCalledTimes(1); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] Form Started', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); // trigger submit event document.getElementById('my-form-id')?.dispatchEvent(new Event('submit')); // assert second event was tracked expect(amplitude.track).toHaveBeenCalledTimes(2); expect(amplitude.track).toHaveBeenNthCalledWith(2, '[Amplitude] Form Submitted', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); }); test('should track form_start and form_submit events on submit only', async () => { // setup const config = createConfigurationMock(); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // trigger change event document.getElementById('my-form-id')?.dispatchEvent(new Event('submit')); // assert both events were tracked expect(amplitude.track).toHaveBeenCalledTimes(2); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] Form Started', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); expect(amplitude.track).toHaveBeenNthCalledWith(2, '[Amplitude] Form Submitted', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); // stop observer and listeners await plugin.teardown?.(); // trigger change event document.getElementById('my-form-id')?.dispatchEvent(new Event('submit')); // assert no additional event was tracked expect(amplitude.track).toHaveBeenCalledTimes(2); }); test('should not enrich events', async () => { const input = { event_type: 'page_view', }; const plugin = formInteractionTracking(); const result = await plugin.execute?.(input); expect(result).toEqual(input); }); // eslint-disable-next-line jest/expect-expect test('should teardown plugin', async () => { const plugin = formInteractionTracking(); await plugin.teardown?.(); // no explicit assertion // test asserts that no error is thrown }); describe('shouldTrackSubmit', () => { test('should not track form_submit when shouldTrackSubmit returns false', async () => { const shouldTrackSubmit = jest.fn(() => false); const config = createConfigurationMock({ defaultTracking: { formInteractions: { shouldTrackSubmit, }, }, }); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // trigger submit event with SubmitEvent document.getElementById('my-form-id')?.dispatchEvent(new SubmitEvent('submit')); // assert shouldTrackSubmit was called expect(shouldTrackSubmit).toHaveBeenCalledTimes(1); // assert form_start was tracked but form_submit was NOT expect(amplitude.track).toHaveBeenCalledTimes(1); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] Form Started', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); }); test('should not re-track form_start on subsequent submit when shouldTrackSubmit returns false', async () => { const shouldTrackSubmit = jest.fn(() => false); const config = createConfigurationMock({ defaultTracking: { formInteractions: { shouldTrackSubmit, }, }, }); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // trigger first submit event (tracks form_start) document.getElementById('my-form-id')?.dispatchEvent(new SubmitEvent('submit')); expect(amplitude.track).toHaveBeenCalledTimes(1); // trigger second submit event (should NOT track form_start again) document.getElementById('my-form-id')?.dispatchEvent(new SubmitEvent('submit')); // assert shouldTrackSubmit was called twice expect(shouldTrackSubmit).toHaveBeenCalledTimes(2); // assert form_start was only tracked once (no duplicate) expect(amplitude.track).toHaveBeenCalledTimes(1); }); test('should track form_submit when shouldTrackSubmit returns true', async () => { const shouldTrackSubmit = jest.fn(() => true); const config = createConfigurationMock({ defaultTracking: { formInteractions: { shouldTrackSubmit, }, }, }); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // trigger submit event with SubmitEvent document.getElementById('my-form-id')?.dispatchEvent(new SubmitEvent('submit')); // assert shouldTrackSubmit was called expect(shouldTrackSubmit).toHaveBeenCalledTimes(1); // assert both form_start and form_submit were tracked expect(amplitude.track).toHaveBeenCalledTimes(2); expect(amplitude.track).toHaveBeenNthCalledWith(2, '[Amplitude] Form Submitted', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); }); test('should track form_submit normally when shouldTrackSubmit is not provided', async () => { const config = createConfigurationMock({ defaultTracking: { formInteractions: {}, }, }); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // trigger submit event document.getElementById('my-form-id')?.dispatchEvent(new Event('submit')); // assert both form_start and form_submit were tracked expect(amplitude.track).toHaveBeenCalledTimes(2); expect(amplitude.track).toHaveBeenNthCalledWith(2, '[Amplitude] Form Submitted', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); }); test('should log warning and proceed with tracking when shouldTrackSubmit throws an error', async () => { const shouldTrackSubmit = jest.fn(() => { throw new Error('Test error'); }); const config = createConfigurationMock({ defaultTracking: { formInteractions: { shouldTrackSubmit, }, }, }); const warnSpy = jest.spyOn(config.loggerProvider, 'warn'); const plugin = formInteractionTracking(); await plugin.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // trigger submit event with SubmitEvent document.getElementById('my-form-id')?.dispatchEvent(new SubmitEvent('submit')); // assert shouldTrackSubmit was called expect(shouldTrackSubmit).toHaveBeenCalledTimes(1); // assert warning was logged expect(warnSpy).toHaveBeenCalledWith('shouldTrackSubmit callback threw an error, proceeding with tracking.'); // assert both form_start and form_submit were still tracked despite the error expect(amplitude.track).toHaveBeenCalledTimes(2); expect(amplitude.track).toHaveBeenNthCalledWith(2, '[Amplitude] Form Submitted', { [FORM_ID]: 'my-form-id', [FORM_NAME]: 'my-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); }); describe('duplicate form tracking', () => { let plugin: ReturnType; beforeEach(async () => { const config = createConfigurationMock({ defaultTracking: { formInteractions: { shouldTrackSubmit: () => true, }, }, }); plugin = formInteractionTracking(); await plugin?.setup?.(config, amplitude); window.dispatchEvent(new Event('load')); // create a new form element and add it to the body const form = document.createElement('form'); form.setAttribute('id', 'duplicate-form-id'); form.setAttribute('name', 'duplicate-form-name'); form.setAttribute('action', '/submit'); document.body.appendChild(form); // move form element to div container // this will cause Form element to show up twice in mutation observer const div = document.createElement('div'); div.setAttribute('id', 'duplicate-div-id'); div.appendChild(form); document.body.appendChild(div); // allow mutation observer to execute and event listener to be attached await new Promise((r) => r(undefined)); }); afterEach(async () => { await plugin?.teardown?.(); document.getElementById('duplicate-div-id')?.remove(); document.getElementById('duplicate-form-id')?.remove(); }); test('should not track form events more than once', async () => { // trigger submit event with SubmitEvent document.getElementById('duplicate-form-id')?.dispatchEvent(new SubmitEvent('submit')); // assert both form_start and form_submit were tracked only once each expect(amplitude.track).toHaveBeenCalledTimes(2); expect(amplitude.track).toHaveBeenNthCalledWith(1, '[Amplitude] Form Started', { [FORM_ID]: 'duplicate-form-id', [FORM_NAME]: 'duplicate-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); expect(amplitude.track).toHaveBeenNthCalledWith(2, '[Amplitude] Form Submitted', { [FORM_ID]: 'duplicate-form-id', [FORM_NAME]: 'duplicate-form-name', [FORM_DESTINATION]: 'http://localhost/submit', }); }); }); }); }); ================================================ FILE: packages/analytics-browser/test/plugins/network-connectivity-checker.test.ts ================================================ /* eslint-disable @typescript-eslint/unbound-method */ import { createAmplitudeMock, createConfigurationMock } from '../helpers/mock'; import { networkConnectivityCheckerPlugin } from '../../src/plugins/network-connectivity-checker'; import * as AnalyticsCore from '@amplitude/analytics-core'; describe('networkConnectivityCheckerPlugin', () => { const amplitude = createAmplitudeMock(); const config = createConfigurationMock(); test('should set up correctly when online', async () => { const plugin = networkConnectivityCheckerPlugin(); jest.spyOn(navigator, 'onLine', 'get').mockReturnValue(true); const addEventListenerSpy = jest.spyOn(window, 'addEventListener'); await plugin.setup?.(config, amplitude); expect(config.offline).toEqual(false); expect(addEventListenerSpy).toHaveBeenCalledWith('online', expect.any(Function)); expect(addEventListenerSpy).toHaveBeenCalledWith('offline', expect.any(Function)); addEventListenerSpy.mockRestore(); }); test('should set up correctly when offline', async () => { const plugin = networkConnectivityCheckerPlugin(); jest.spyOn(navigator, 'onLine', 'get').mockReturnValue(false); const addEventListenerSpy = jest.spyOn(window, 'addEventListener'); await plugin.setup?.(config, amplitude); expect(config.offline).toEqual(true); expect(addEventListenerSpy).toHaveBeenCalledWith('online', expect.any(Function)); expect(addEventListenerSpy).toHaveBeenCalledWith('offline', expect.any(Function)); addEventListenerSpy.mockRestore(); }); test('should teardown plugin', async () => { const plugin = networkConnectivityCheckerPlugin(); const removeEventListenerSpy = jest.spyOn(window, 'removeEventListener'); await plugin.setup?.(createConfigurationMock(), amplitude); await plugin.teardown?.(); expect(removeEventListenerSpy).toHaveBeenCalledWith('online', expect.any(Function)); expect(removeEventListenerSpy).toHaveBeenCalledWith('offline', expect.any(Function)); }); test('should do nothing when not on a browser', async () => { const plugin = networkConnectivityCheckerPlugin(); // @ts-expect-error we are mocking a node.js environment jest.spyOn(window, 'navigator', 'get').mockReturnValue(undefined); const addEventListenerSpy = jest.spyOn(window, 'addEventListener'); await plugin.setup?.(config, amplitude); expect(config.offline).toEqual(false); expect(addEventListenerSpy).not.toHaveBeenCalled(); addEventListenerSpy.mockRestore(); }); test('should not throw if addEventListener is not a function', async () => { const getGlobalScopeMock = jest .spyOn(AnalyticsCore, 'getGlobalScope') .mockReturnValue({} as unknown as typeof globalThis); const plugin = networkConnectivityCheckerPlugin(); await expect(plugin.setup?.(config, amplitude)).resolves.not.toThrow(); await expect(plugin.teardown?.()).resolves.not.toThrow(); getGlobalScopeMock.mockRestore(); }); test('should not throw if globalScope.addEventListener is not available', async () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({} as unknown as typeof globalThis); const plugin = networkConnectivityCheckerPlugin(); await expect(plugin.setup?.(config, amplitude)).resolves.not.toThrow(); }); }); ================================================ FILE: packages/analytics-browser/test/plugins/page-view-tracking-enrichment.test.ts ================================================ import { pageViewTrackingEnrichment } from './page-view-tracking-enrichment'; describe('page-view-tracking-enrichment', () => { describe('execute', () => { test('should enrich page view event', async () => { const mockEvent = { event_type: '[Amplitude] Page Viewed', }; const plugin = pageViewTrackingEnrichment(); const result = await plugin.execute?.(mockEvent); expect(result).toEqual({ event_type: '[Amplitude] Page Viewed', event_properties: { new_property: 'new_value', }, }); }); test('should not enrich other events', async () => { const mockEvent = { event_type: 'Not Page View', }; const plugin = pageViewTrackingEnrichment(); const result = await plugin.execute?.(mockEvent); expect(result).toEqual({ event_type: 'Not Page View', }); }); }); }); ================================================ FILE: packages/analytics-browser/test/plugins/page-view-tracking-enrichment.ts ================================================ import { EnrichmentPlugin, Event } from '@amplitude/analytics-core'; /** * This plugin enriches events with event_type "Page View" by adding * more event_properties on top of what @amplitude/analytics-browser provides out of the box * * @returns EnrichmentPlugin */ export const pageViewTrackingEnrichment = (): EnrichmentPlugin => { return { name: 'page-view-tracking-enrichment', type: 'enrichment', setup: async () => undefined, execute: async (event: Event) => { if (event.event_type !== '[Amplitude] Page Viewed') { // event name format if using Autocapture Pageviews return event; } event.event_properties = { ...event.event_properties, // TODO: Add new event properties here new_property: 'new_value', }; return event; }, }; }; ================================================ FILE: packages/analytics-browser/test/plugins/remove-event-key-enrichment.test.ts ================================================ import { removeEventKeyEnrichment } from './remove-event-key-enrichment'; describe('remove-event-key-enrichment', () => { describe('execute', () => { test('should remove keys from event payload', async () => { const plugin = removeEventKeyEnrichment(['time']); const mockEvent = { event_type: 'Custom Event', time: Date.now(), }; const result = await plugin.execute?.(mockEvent); expect(result?.time).toBeUndefined(); }); test('should not remove keys from event payload', async () => { const plugin = removeEventKeyEnrichment(); const mockEvent = { event_type: 'Custom Event', time: Date.now(), }; const result = await plugin.execute?.(mockEvent); expect(result?.time).toBeDefined(); }); }); }); ================================================ FILE: packages/analytics-browser/test/plugins/remove-event-key-enrichment.ts ================================================ import { BaseEvent, Event, EnrichmentPlugin } from '@amplitude/analytics-core'; type KeyOfEvent = keyof BaseEvent; /** * This plugin enriches all events by removing a list of keys from the * event payload. This plugin is helpful in cases where users prefer not to use default * values set by the @amplitude/analytics-browser library, for example: * - `event.time` * - `event.idfa` * - `event.idva` * - `event.ip` * * @param keysToRemove * @returns EnrichmentPlugin */ export const removeEventKeyEnrichment = (keysToRemove: KeyOfEvent[] = []): EnrichmentPlugin => { return { name: 'remove-event-key-enrichment', type: 'enrichment', setup: async () => undefined, execute: async (event: Event) => { for (const key of keysToRemove) { delete event[key]; } return event; }, }; }; /** * This plugin enriches all events by removing `event.time` from all events. * `event.time` uses `Date.now()` which is controlled by the device where the browser runs on. * The device clock can be easily manipulated yielding events having unreasonable time values. * With `event.time` being `undefined`, the time of the event is determined when the event was sent * successfully by the browser ("Client Upload Time"), determined by the server clock, rather than * when the event actually occurred. On majority of the cases, "Client Upload Time" can be * off by up to the configured `config.flushIntervalMillis`. By default `config.flushIntervalMillis` * is set to 1000 milliseconds. In rare cases where initial request to Amplitude fails due to * bad payload, throttled request, server error, etc, the time difference can be extended. */ export const removeTimeEnrichment = removeEventKeyEnrichment(['time']); ================================================ FILE: packages/analytics-browser/test/setup.js ================================================ jest.mock('../src/det-notification'); ================================================ FILE: packages/analytics-browser/test/storage/local-storage.test.ts ================================================ import { Logger } from '@amplitude/analytics-core'; import { LocalStorage } from '../../src/storage/local-storage'; import * as AnalyticsCore from '@amplitude/analytics-core'; describe('local-storage', () => { test('should return true if storage is available', async () => { const localStorage = new LocalStorage(); expect(await localStorage.isEnabled()).toBe(true); }); test('should return false if storage is unavailable', async () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue(undefined); const localStorage = new LocalStorage(); expect(await localStorage.isEnabled()).toBe(false); }); test('should drop events when set more than 1000 events without logging', async () => { const localStorage = new LocalStorage(); await localStorage.set('storage-key', new Array(1001).fill(1)); const value = await localStorage.get('storage-key'); expect(value?.length).toBe(1000); }); test('should drop events when set more than 1000 events and use custom logger', async () => { const loggerProvider = new Logger(); const localStorage = new LocalStorage({ loggerProvider }); const errorMock = jest.spyOn(loggerProvider, 'error'); await localStorage.set('storage-key', new Array(1001).fill(1)); const value = await localStorage.get('storage-key'); expect(value?.length).toBe(1000); expect(errorMock).toHaveBeenCalledTimes(1); expect(errorMock).toHaveBeenCalledWith('Failed to save 1 events because the queue length exceeded 1000.'); }); test('should not be enabled if "window.localStorage" getter throws an error', async () => { let backupLocalStorage: Storage | null = null; try { backupLocalStorage = window.localStorage; Object.defineProperty(window, 'localStorage', { get: () => { // simulates security error: https://www.chromium.org/for-testers/bug-reporting-guidelines/uncaught-securityerror-failed-to-read-the-localstorage-property-from-window-access-is-denied-for-this-document/ const err = `SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document`; throw new Error(err); }, configurable: true, }); const configs = [undefined, { loggerProvider: undefined }, { loggerProvider: new Logger() }]; await Promise.all( configs.map(async (config) => { const localStorage = new LocalStorage(config); expect(await localStorage.isEnabled()).toBe(false); }), ); } finally { Object.defineProperty(window, 'localStorage', { get: () => backupLocalStorage, configurable: true, }); } }); }); ================================================ FILE: packages/analytics-browser/test/storage/session-storage.test.ts ================================================ import { SessionStorage } from '../../src/storage/session-storage'; import * as AnalyticsCore from '@amplitude/analytics-core'; describe('session-storage', () => { test('should return true if storage is available', async () => { const sessionStorage = new SessionStorage(); expect(await sessionStorage.isEnabled()).toBe(true); }); test('should return false if storage is unavailable', async () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue(undefined); const sessionStorage = new SessionStorage(); expect(await sessionStorage.isEnabled()).toBe(false); }); }); ================================================ FILE: packages/analytics-browser/test/transport/fetch.test.ts ================================================ import { ReadableStream, WritableStream } from 'stream/web'; import { TextEncoder } from 'util'; import { MIN_GZIP_UPLOAD_BODY_SIZE_BYTES, Status } from '@amplitude/analytics-core'; import { FetchTransport } from '../../src/transports/fetch'; import 'isomorphic-fetch'; if (typeof global.TextEncoder === 'undefined') { (global as typeof globalThis & { TextEncoder?: typeof TextEncoder }).TextEncoder = TextEncoder; } describe('fetch transport', () => { describe('send', () => { test.each([['{}'], [''], ['<']])('should resolve with response', async (body) => { const transport = new FetchTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [] }; const result = { statusCode: 200, status: Status.Success as const, body: { eventsIngested: 0, payloadSizeBytes: 0, serverUploadTime: 0, }, }; jest.spyOn(window, 'fetch').mockReturnValueOnce(Promise.resolve(new Response(body))); jest.spyOn(transport, 'buildResponse').mockReturnValueOnce(result); const response = await transport.send(url, payload); expect(response).toEqual(result); }); test('should include custom headers', async () => { const transport = new FetchTransport({ Authorization: 'Bearer token123' }); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [] }; const fetchSpy = jest.spyOn(window, 'fetch').mockReturnValueOnce(Promise.resolve(new Response('{}'))); await transport.send(url, payload, false); expect(fetchSpy).toHaveBeenCalledWith(url, { headers: { 'Content-Type': 'application/json', Accept: '*/*', Authorization: 'Bearer token123', }, body: JSON.stringify(payload), method: 'POST', }); }); test('should keep body uncompressed when compression flag is false', async () => { const transport = new FetchTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [{ event_type: 'test', device_id: 'test_device_id' }] }; const mockCompressionStream = jest.fn(); (global as typeof globalThis & { CompressionStream?: unknown }).CompressionStream = mockCompressionStream; const fetchSpy = jest.spyOn(window, 'fetch').mockReturnValueOnce(Promise.resolve(new Response('{}'))); await transport.send(url, payload, false); expect(fetchSpy).toHaveBeenCalledWith(url, { headers: { 'Content-Type': 'application/json', Accept: '*/*', }, body: JSON.stringify(payload), method: 'POST', }); expect(mockCompressionStream).not.toHaveBeenCalled(); delete (global as { CompressionStream?: unknown }).CompressionStream; }); test('should send gzip-compressed body when compression flag is true', async () => { const mockCompressedBytes = new Uint8Array([0x1f, 0x8b]); const mockArrayBuffer = new ArrayBuffer(2); new Uint8Array(mockArrayBuffer).set(mockCompressedBytes); const OriginalResponse = (global as { Response?: typeof Response }).Response; (global as { Response?: unknown }).Response = jest.fn().mockImplementation(() => ({ arrayBuffer: () => Promise.resolve(mockArrayBuffer), })); const mockReadable = new ReadableStream({ start(controller) { controller.enqueue(mockCompressedBytes); controller.close(); }, }); (global as { CompressionStream?: unknown }).CompressionStream = jest.fn().mockImplementation(() => ({ readable: mockReadable, writable: new WritableStream(), })); const blobStreamSource = new ReadableStream(); Object.defineProperty(Blob.prototype, 'stream', { value: () => blobStreamSource, configurable: true, writable: true, }); const transport = new FetchTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [ { event_type: 'large-payload', event_properties: { value: 'a'.repeat(MIN_GZIP_UPLOAD_BODY_SIZE_BYTES) }, }, ], }; const fetchSpy = jest .spyOn(window, 'fetch') .mockReturnValueOnce(Promise.resolve({ text: () => Promise.resolve('{}') } as Response)); await transport.send(url, payload, true); const [, options] = fetchSpy.mock.calls[0]; expect(options?.headers).toMatchObject({ 'Content-Type': 'application/json', Accept: '*/*', 'Content-Encoding': 'gzip', }); expect(options?.body).toBeInstanceOf(ArrayBuffer); expect(new Uint8Array(options?.body as ArrayBuffer)).toEqual(mockCompressedBytes); (global as { Response?: unknown }).Response = OriginalResponse; delete (Blob.prototype as unknown as { stream?: () => ReadableStream }).stream; delete (global as { CompressionStream?: unknown }).CompressionStream; }); test('should respect Content-Encoding header when compression is enabled', async () => { const mockCompressedBytes = new Uint8Array([0x1f, 0x8b]); const mockArrayBuffer = new ArrayBuffer(2); new Uint8Array(mockArrayBuffer).set(mockCompressedBytes); const OriginalResponse = (global as { Response?: typeof Response }).Response; (global as { Response?: unknown }).Response = jest.fn().mockImplementation(() => ({ arrayBuffer: () => Promise.resolve(mockArrayBuffer), })); const mockReadable = new ReadableStream({ start(controller) { controller.enqueue(mockCompressedBytes); controller.close(); }, }); (global as { CompressionStream?: unknown }).CompressionStream = jest.fn().mockImplementation(() => ({ readable: mockReadable, writable: new WritableStream(), })); const blobStreamSource = new ReadableStream(); Object.defineProperty(Blob.prototype, 'stream', { value: () => blobStreamSource, configurable: true, writable: true, }); const transport = new FetchTransport({ 'Content-Encoding': 'br' }); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [ { event_type: 'large-payload', event_properties: { value: 'a'.repeat(MIN_GZIP_UPLOAD_BODY_SIZE_BYTES) }, }, ], }; const fetchSpy = jest .spyOn(window, 'fetch') .mockReturnValueOnce(Promise.resolve({ text: () => Promise.resolve('{}') } as Response)); await transport.send(url, payload, true); const [, options] = fetchSpy.mock.calls[0]; expect(options?.headers).toMatchObject({ 'Content-Type': 'application/json', Accept: '*/*', 'Content-Encoding': 'gzip', }); (global as { Response?: unknown }).Response = OriginalResponse; delete (Blob.prototype as unknown as { stream?: () => ReadableStream }).stream; delete (global as { CompressionStream?: unknown }).CompressionStream; }); }); }); ================================================ FILE: packages/analytics-browser/test/transport/send-beacon.test.ts ================================================ import { SendBeaconTransport } from '../../src/transports/send-beacon'; import { Status } from '@amplitude/analytics-core'; import * as AnalyticsCore from '@amplitude/analytics-core'; describe('beacon', () => { // eslint-disable-next-line @typescript-eslint/unbound-method const beacon = window.navigator.sendBeacon; beforeEach(() => { window.navigator.sendBeacon = jest.fn(); }); afterEach(() => { window.navigator.sendBeacon = beacon; }); describe('send', () => { test('should resolve with response', async () => { const transport = new SendBeaconTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [], }; jest.spyOn(window.navigator, 'sendBeacon').mockReturnValueOnce(true); const response = await transport.send(url, payload); expect(response).toEqual({ statusCode: 200, status: Status.Success, body: { eventsIngested: 0, payloadSizeBytes: 26, // serverUploadTime is equal to Date.now() which is different each test execution // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment serverUploadTime: expect.any(Number), }, }); }); test('should handle failed send beacon attempt', async () => { const transport = new SendBeaconTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [], }; jest.spyOn(window.navigator, 'sendBeacon').mockReturnValueOnce(false); const response = await transport.send(url, payload); expect(response).toEqual({ statusCode: 500, status: Status.Failed, }); }); test('should handle unexpected error', async () => { const transport = new SendBeaconTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [], }; jest.spyOn(window.navigator, 'sendBeacon').mockImplementationOnce(() => { throw new Error('sendBeacon error'); }); await expect(transport.send(url, payload)).rejects.toThrow('sendBeacon error'); }); test('should handle GlobalScope is not defined', async () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValueOnce(undefined); const transport = new SendBeaconTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [], }; await expect(transport.send(url, payload)).rejects.toThrow('SendBeaconTransport is not supported'); }); }); }); ================================================ FILE: packages/analytics-browser/test/transport/xhr.test.ts ================================================ import { ReadableStream, WritableStream } from 'stream/web'; import { TextEncoder } from 'util'; import { compressToGzipArrayBuffer, MIN_GZIP_UPLOAD_BODY_SIZE_BYTES, Status } from '@amplitude/analytics-core'; import { XHRTransport } from '../../src/transports/xhr'; if (typeof global.TextEncoder === 'undefined') { (global as typeof globalThis & { TextEncoder?: typeof TextEncoder }).TextEncoder = TextEncoder; } describe('xhr', () => { describe('send', () => { test.each([ ['{}'], // ideally response body should be json format to an application/json request [''], // test the edge case where response body is non-json format ['<'], ])('should resolve with response', async (body) => { const transport = new XHRTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [], }; const result = { statusCode: 200, status: Status.Success as const, body: { eventsIngested: 0, payloadSizeBytes: 0, serverUploadTime: 0, }, }; const xhr = new XMLHttpRequest(); const open = jest.fn(); const setRequestHeader = jest.fn(); const send = jest.fn(); const mock = { ...xhr, open, setRequestHeader, send, readyState: 4, responseText: body, }; jest.spyOn(window, 'XMLHttpRequest').mockReturnValueOnce(mock); jest.spyOn(transport, 'buildResponse').mockReturnValueOnce(result); const unresolvedResponse = transport.send(url, payload); expect(mock.onreadystatechange).toBeDefined(); mock.onreadystatechange && mock.onreadystatechange(new Event('')); const response = await unresolvedResponse; expect(response).toBe(result); expect(open).toHaveBeenCalledWith('POST', url, true); expect(setRequestHeader).toHaveBeenCalledTimes(2); expect(send).toHaveBeenCalledTimes(1); expect(send).toHaveBeenCalledWith(JSON.stringify(payload)); }); test('should include custom headers in request', async () => { const customHeaders = { Authorization: 'Bearer token123', 'X-Custom-Header': 'custom-value', }; const transport = new XHRTransport(customHeaders); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [], }; const result = { statusCode: 200, status: Status.Success as const, body: { eventsIngested: 0, payloadSizeBytes: 0, serverUploadTime: 0, }, }; const xhr = new XMLHttpRequest(); const open = jest.fn(); const setRequestHeader = jest.fn(); const send = jest.fn(); const mock = { ...xhr, open, setRequestHeader, send, readyState: 4, responseText: '{}', }; jest.spyOn(window, 'XMLHttpRequest').mockReturnValueOnce(mock); jest.spyOn(transport, 'buildResponse').mockReturnValueOnce(result); const unresolvedResponse = transport.send(url, payload); mock.onreadystatechange && mock.onreadystatechange(new Event('')); await unresolvedResponse; expect(setRequestHeader).toHaveBeenCalledTimes(4); // Content-Type, Accept, + 2 custom headers expect(setRequestHeader).toHaveBeenCalledWith('Content-Type', 'application/json'); expect(setRequestHeader).toHaveBeenCalledWith('Accept', '*/*'); expect(setRequestHeader).toHaveBeenCalledWith('Authorization', 'Bearer token123'); expect(setRequestHeader).toHaveBeenCalledWith('X-Custom-Header', 'custom-value'); }); test('should not allow custom headers to override defaults', async () => { const customHeaders = { 'Content-Type': 'text/plain', Accept: 'application/json', }; const transport = new XHRTransport(customHeaders); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [], }; const result = { statusCode: 200, status: Status.Success as const, body: { eventsIngested: 0, payloadSizeBytes: 0, serverUploadTime: 0, }, }; const xhr = new XMLHttpRequest(); const open = jest.fn(); const setRequestHeader = jest.fn(); const send = jest.fn(); const mock = { ...xhr, open, setRequestHeader, send, readyState: 4, responseText: '{}', }; jest.spyOn(window, 'XMLHttpRequest').mockReturnValueOnce(mock); jest.spyOn(transport, 'buildResponse').mockReturnValueOnce(result); const unresolvedResponse = transport.send(url, payload); mock.onreadystatechange && mock.onreadystatechange(new Event('')); await unresolvedResponse; // Custom headers should override defaults, so only 2 calls total expect(setRequestHeader).toHaveBeenCalledTimes(2); expect(setRequestHeader).toHaveBeenCalledWith('Content-Type', 'application/json'); expect(setRequestHeader).toHaveBeenCalledWith('Accept', '*/*'); }); test('should work without custom headers (backward compatibility)', async () => { const transport = new XHRTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [], }; const result = { statusCode: 200, status: Status.Success as const, body: { eventsIngested: 0, payloadSizeBytes: 0, serverUploadTime: 0, }, }; const xhr = new XMLHttpRequest(); const open = jest.fn(); const setRequestHeader = jest.fn(); const send = jest.fn(); const mock = { ...xhr, open, setRequestHeader, send, readyState: 4, responseText: '{}', }; jest.spyOn(window, 'XMLHttpRequest').mockReturnValueOnce(mock); jest.spyOn(transport, 'buildResponse').mockReturnValueOnce(result); const unresolvedResponse = transport.send(url, payload); mock.onreadystatechange && mock.onreadystatechange(new Event('')); await unresolvedResponse; expect(setRequestHeader).toHaveBeenCalledTimes(2); // Only Content-Type and Accept expect(setRequestHeader).toHaveBeenCalledWith('Content-Type', 'application/json'); expect(setRequestHeader).toHaveBeenCalledWith('Accept', '*/*'); }); test('compressToGzipArrayBuffer returns undefined when CompressionStream is not available', async () => { const g = global as { CompressionStream?: unknown }; const originalCompressionStream = g.CompressionStream; // Set to undefined (don't delete) so the code hits our return instead of ReferenceError g.CompressionStream = undefined; const result = await compressToGzipArrayBuffer('data'); expect(result).toBeUndefined(); g.CompressionStream = originalCompressionStream; }); test('when shouldCompressUploadBody is true but CompressionStream is not available, should send uncompressed body', async () => { const g = global as { CompressionStream?: unknown }; const originalCompressionStream = g.CompressionStream; delete g.CompressionStream; const transport = new XHRTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [] }; const setRequestHeader = jest.fn(); const send = jest.fn(); const mockXhr = { open: jest.fn(), setRequestHeader, send, readyState: 4, responseText: '{}', onreadystatechange: null as (() => void) | null, }; jest.spyOn(global, 'XMLHttpRequest').mockImplementation(() => mockXhr as unknown as XMLHttpRequest); const sendPromise = transport.send(url, payload, true); mockXhr.onreadystatechange?.(); await sendPromise; expect(setRequestHeader).not.toHaveBeenCalledWith('Content-Encoding', 'gzip'); expect(send).toHaveBeenCalledWith(JSON.stringify(payload)); g.CompressionStream = originalCompressionStream; }); test('when shouldCompressUploadBody is true but compression returns undefined, should send uncompressed body', async () => { const g = global as { CompressionStream?: unknown; Response?: unknown }; const originalCompressionStream = g.CompressionStream; const originalResponse = g.Response; const mockCompressedStream = {}; const pipeThrough = jest.fn().mockReturnValue(mockCompressedStream); Object.defineProperty(Blob.prototype, 'stream', { value: () => ({ pipeThrough }), configurable: true, writable: true, }); g.CompressionStream = jest.fn(); g.Response = jest.fn().mockImplementation(() => ({ arrayBuffer: () => Promise.reject(new Error('compression failed')), })); const transport = new XHRTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [ { event_type: 'large-payload', event_properties: { value: 'a'.repeat(MIN_GZIP_UPLOAD_BODY_SIZE_BYTES) }, }, ], }; const setRequestHeader = jest.fn(); const send = jest.fn(); const mockXhr = { open: jest.fn(), setRequestHeader, send, readyState: 4, responseText: '{}', onreadystatechange: null as (() => void) | null, }; jest.spyOn(global, 'XMLHttpRequest').mockImplementation(() => mockXhr as unknown as XMLHttpRequest); const sendPromise = transport.send(url, payload, true); await new Promise((r) => setTimeout(r, 0)); mockXhr.onreadystatechange?.(); await sendPromise; expect(setRequestHeader).not.toHaveBeenCalledWith('Content-Encoding', 'gzip'); expect(send).toHaveBeenCalledWith(JSON.stringify(payload)); g.CompressionStream = originalCompressionStream; g.Response = originalResponse; delete (Blob.prototype as unknown as { stream?: () => unknown }).stream; }); test('when payload is below compression threshold, should send uncompressed body', async () => { const g = global as { CompressionStream?: unknown }; const originalCompressionStream = g.CompressionStream; const MockCompressionStream = jest.fn(); g.CompressionStream = MockCompressionStream; const transport = new XHRTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [] }; const setRequestHeader = jest.fn(); const send = jest.fn(); const mockXhr = { open: jest.fn(), setRequestHeader, send, readyState: 4, responseText: '{}', onreadystatechange: null as (() => void) | null, }; jest.spyOn(global, 'XMLHttpRequest').mockImplementation(() => mockXhr as unknown as XMLHttpRequest); const sendPromise = transport.send(url, payload, true); mockXhr.onreadystatechange?.(); await sendPromise; expect(setRequestHeader).not.toHaveBeenCalledWith('Content-Encoding', 'gzip'); expect(send).toHaveBeenCalledWith(JSON.stringify(payload)); expect(MockCompressionStream).not.toHaveBeenCalled(); g.CompressionStream = originalCompressionStream; }); test('should send gzip-compressed body with Content-Encoding when shouldCompressUploadBody is true', async () => { const mockCompressedBytes = new Uint8Array([0x1f, 0x8b]); // gzip magic number const mockArrayBuffer = new ArrayBuffer(2); new Uint8Array(mockArrayBuffer).set(mockCompressedBytes); const OriginalResponse = (global as { Response?: typeof Response }).Response; (global as { Response?: unknown }).Response = jest.fn().mockImplementation(() => ({ arrayBuffer: () => Promise.resolve(mockArrayBuffer), })); const mockReadable = new ReadableStream({ start(controller) { controller.enqueue(mockCompressedBytes); controller.close(); }, }); const MockCompressionStream = jest.fn().mockImplementation(() => ({ readable: mockReadable, writable: new WritableStream(), })); (global as { CompressionStream?: unknown }).CompressionStream = MockCompressionStream; // jsdom Blob doesn't implement .stream(); provide one (same as fetch.test.ts) const blobStreamSource = new ReadableStream(); Object.defineProperty(Blob.prototype, 'stream', { value: () => blobStreamSource, configurable: true, writable: true, }); const transport = new XHRTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [ { event_type: 'large-payload', event_properties: { value: 'a'.repeat(MIN_GZIP_UPLOAD_BODY_SIZE_BYTES) }, }, ], }; const open = jest.fn(); const setRequestHeader = jest.fn(); const send = jest.fn(); const mockXhr = { open, setRequestHeader, send, readyState: 4, responseText: '{}', onreadystatechange: null as (() => void) | null, }; jest.spyOn(global, 'XMLHttpRequest').mockImplementation(() => mockXhr as unknown as XMLHttpRequest); const sendPromise = transport.send(url, payload, true); // Allow compressToGzipArrayBuffer (Response(stream).arrayBuffer()) to resolve before resolving send promise await new Promise((r) => setTimeout(r, 0)); mockXhr.onreadystatechange?.(); await sendPromise; expect(setRequestHeader).toHaveBeenCalledWith('Content-Encoding', 'gzip'); expect(send).toHaveBeenCalledTimes(1); const sentBody = send.mock.calls[0][0]; expect(sentBody).toBeInstanceOf(ArrayBuffer); expect(new Uint8Array(sentBody as ArrayBuffer)).toEqual(mockCompressedBytes); (global as { Response?: unknown }).Response = OriginalResponse; delete (Blob.prototype as unknown as { stream?: () => ReadableStream }).stream; const g = global as { CompressionStream?: unknown }; delete g.CompressionStream; }); test('should keep body uncompressed when compression flag is false', async () => { const transport = new XHRTransport(); const url = 'https://api2.amplitude.com/2/httpapi'; const payload = { api_key: '', events: [{ event_type: 'test', device_id: 'test_device_id' }] }; const MockCompressionStream = jest.fn(); (global as { CompressionStream?: unknown }).CompressionStream = MockCompressionStream; const setRequestHeader = jest.fn(); const send = jest.fn(); const mockXhr = { open: jest.fn(), setRequestHeader, send, readyState: 4, responseText: '{}', onreadystatechange: null as (() => void) | null, }; jest.spyOn(global, 'XMLHttpRequest').mockImplementation(() => mockXhr as unknown as XMLHttpRequest); const sendPromise = transport.send(url, payload, false); mockXhr.onreadystatechange?.(); await sendPromise; expect(setRequestHeader).not.toHaveBeenCalledWith('Content-Encoding', 'gzip'); expect(send).toHaveBeenCalledWith(JSON.stringify(payload)); expect(MockCompressionStream).not.toHaveBeenCalled(); delete (global as { CompressionStream?: unknown }).CompressionStream; }); test('should reject when sendBody throws (e.g. xhr.send throws)', async () => { const sendError = new Error('xhr.send failed'); const transport = new XHRTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [] }; const setRequestHeader = jest.fn(); const send = jest.fn().mockImplementation(() => { throw sendError; }); const mockXhr = { open: jest.fn(), setRequestHeader, send, readyState: 4, responseText: '{}', onreadystatechange: null as (() => void) | null, }; jest.spyOn(global, 'XMLHttpRequest').mockImplementation(() => mockXhr as unknown as XMLHttpRequest); await expect(transport.send(url, payload, false)).rejects.toThrow(sendError); }); test('should reject when setRequestHeader throws', async () => { const headerError = new Error('setRequestHeader failed'); const transport = new XHRTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [] }; const setRequestHeader = jest.fn().mockImplementation(() => { throw headerError; }); const send = jest.fn(); const mockXhr = { open: jest.fn(), setRequestHeader, send, readyState: 4, responseText: '{}', onreadystatechange: null as (() => void) | null, }; jest.spyOn(global, 'XMLHttpRequest').mockImplementation(() => mockXhr as unknown as XMLHttpRequest); await expect(transport.send(url, payload, false)).rejects.toThrow(headerError); }); test('should respect custom Content-Encoding header when compressing', async () => { const mockCompressedBytes = new Uint8Array([0x1f, 0x8b]); const mockArrayBuffer = new ArrayBuffer(2); new Uint8Array(mockArrayBuffer).set(mockCompressedBytes); const OriginalResponse = (global as { Response?: typeof Response }).Response; (global as { Response?: unknown }).Response = jest.fn().mockImplementation(() => ({ arrayBuffer: () => Promise.resolve(mockArrayBuffer), })); const mockReadable = new ReadableStream({ start(controller) { controller.enqueue(mockCompressedBytes); controller.close(); }, }); const MockCompressionStream = jest.fn().mockImplementation(() => ({ readable: mockReadable, writable: new WritableStream(), })); (global as { CompressionStream?: unknown }).CompressionStream = MockCompressionStream; const blobStreamSource = new ReadableStream(); Object.defineProperty(Blob.prototype, 'stream', { value: () => blobStreamSource, configurable: true, writable: true, }); const transport = new XHRTransport({ 'Content-Encoding': 'br' }); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [ { event_type: 'large-payload', event_properties: { value: 'a'.repeat(MIN_GZIP_UPLOAD_BODY_SIZE_BYTES) }, }, ], }; const setRequestHeader = jest.fn(); const send = jest.fn(); const mockXhr = { open: jest.fn(), setRequestHeader, send, readyState: 4, responseText: '{}', onreadystatechange: null as (() => void) | null, }; jest.spyOn(global, 'XMLHttpRequest').mockImplementation(() => mockXhr as unknown as XMLHttpRequest); const sendPromise = transport.send(url, payload, true); await new Promise((r) => setTimeout(r, 0)); mockXhr.onreadystatechange?.(); await sendPromise; expect(setRequestHeader).toHaveBeenCalledWith('Content-Encoding', 'gzip'); (global as { Response?: unknown }).Response = OriginalResponse; delete (Blob.prototype as unknown as { stream?: () => ReadableStream }).stream; const g = global as { CompressionStream?: unknown }; delete g.CompressionStream; }); }); }); ================================================ FILE: packages/analytics-browser/test/types.test.ts ================================================ import * as amplitude from '../src/index'; describe('Type Exports', () => { test('IdentifyOperation should be an enum', () => { expect(amplitude.Types.IdentifyOperation.ADD).toBe('$add'); }); test('SpecialEventType should be an enum', () => { expect(amplitude.Types.SpecialEventType.IDENTIFY).toBe('$identify'); }); test('exported enums are proper enums', () => { const enumTypes = ['RevenueProperty', 'LogLevel', 'ServerZone']; enumTypes.forEach((enumType) => { expect((amplitude.Types as any)[enumType]).toBeDefined(); expect(typeof (amplitude.Types as any)[enumType]).toBe('object'); expect(Object.keys((amplitude.Types as any)[enumType]).length).toBeGreaterThan(0); }); }); test('exported null to be null', () => { expect(amplitude.Types.OfflineDisabled).toBe(null); }); test('exported arrays are proper arrays', () => { const arrTypes = ['DEFAULT_CSS_SELECTOR_ALLOWLIST', 'DEFAULT_ACTION_CLICK_ALLOWLIST']; arrTypes.forEach((arrType) => { expect((amplitude.Types as any)[arrType]).toBeDefined(); expect(Array.isArray((amplitude.Types as any)[arrType])).toBe(true); expect((amplitude.Types as any)[arrType].length).toBeGreaterThan(0); }); }); test('exported string is string', () => { expect(typeof amplitude.Types.DEFAULT_DATA_ATTRIBUTE_PREFIX).toBe('string'); }); }); ================================================ FILE: packages/analytics-browser/test/utils/fake-browser-client.ts ================================================ import { BrowserClient, returnWrapper, Plugin, BrowserOptions, AmplitudeReturn, Result, EventOptions, IIdentify, IRevenue, BaseEvent, TransportType, AnalyticsIdentity, } from '@amplitude/analytics-core'; export class FakeBrowserClient implements BrowserClient { // BrowserClient specific methods init(apiKey: string, options?: BrowserOptions): AmplitudeReturn; init(apiKey: string, userId?: string, options?: BrowserOptions): AmplitudeReturn; init( apiKey: string, userIdOrOptions?: string | BrowserOptions, maybeOptions?: BrowserOptions, ): AmplitudeReturn { console.log('FakeBrowserClient.init called with:', { apiKey, userIdOrOptions, maybeOptions }); return returnWrapper(Promise.resolve()); } setTransport(transport: TransportType): void { console.log('FakeBrowserClient.setTransport called with:', { transport }); } add(plugin: Plugin): AmplitudeReturn { console.log('FakeBrowserClient.add called with:', { plugin }); return returnWrapper(Promise.resolve()); } getIdentity(): AnalyticsIdentity { console.log('FakeBrowserClient.getIdentity called'); return { userId: undefined, deviceId: undefined, userProperties: undefined, }; } setIdentity(identity: Partial): void { console.log('FakeBrowserClient.setIdentity called with:', { identity }); } getOptOut(): boolean | undefined { console.log('FakeBrowserClient.getOptOut called'); return false; } // CoreClient methods remove(pluginName: string): AmplitudeReturn { console.log('FakeBrowserClient.remove called with:', { pluginName }); return returnWrapper(Promise.resolve()); } track( eventInput: BaseEvent | string, eventProperties?: Record, eventOptions?: EventOptions, ): AmplitudeReturn { console.log('FakeBrowserClient.track called with:', { eventInput, eventProperties, eventOptions }); return returnWrapper( Promise.resolve({ code: 200, message: 'Event tracked successfully', event: { event_type: typeof eventInput === 'string' ? eventInput : eventInput.event_type, }, }), ); } logEvent( eventInput: BaseEvent | string, eventProperties?: Record, eventOptions?: EventOptions, ): AmplitudeReturn { console.log('FakeBrowserClient.logEvent called with:', { eventInput, eventProperties, eventOptions }); return this.track(eventInput, eventProperties, eventOptions); } identify(identify: IIdentify, eventOptions?: EventOptions): AmplitudeReturn { console.log('FakeBrowserClient.identify called with:', { identify, eventOptions }); return returnWrapper( Promise.resolve({ code: 200, message: 'Identify event tracked successfully', event: { event_type: '$identify', }, }), ); } groupIdentify( groupType: string, groupName: string | string[], identify: IIdentify, eventOptions?: EventOptions, ): AmplitudeReturn { console.log('FakeBrowserClient.groupIdentify called with:', { groupType, groupName, identify, eventOptions }); return returnWrapper( Promise.resolve({ code: 200, message: 'Group identify event tracked successfully', event: { event_type: '$groupidentify', }, }), ); } setGroup(groupType: string, groupName: string | string[], eventOptions?: EventOptions): AmplitudeReturn { console.log('FakeBrowserClient.setGroup called with:', { groupType, groupName, eventOptions }); return returnWrapper( Promise.resolve({ code: 200, message: 'Set group event tracked successfully', event: { event_type: '$setgroup', }, }), ); } revenue(revenue: IRevenue, eventOptions?: EventOptions): AmplitudeReturn { console.log('FakeBrowserClient.revenue called with:', { revenue, eventOptions }); return returnWrapper( Promise.resolve({ code: 200, message: 'Revenue event tracked successfully', event: { event_type: '$revenue', }, }), ); } setOptOut(optOut: boolean): void { console.log('FakeBrowserClient.setOptOut called with:', { optOut }); } flush(): AmplitudeReturn { console.log('FakeBrowserClient.flush called'); return returnWrapper(Promise.resolve()); } // Client methods (from Client interface) getUserId(): string | undefined { console.log('FakeBrowserClient.getUserId called'); return undefined; } setUserId(userId: string | undefined): void { console.log('FakeBrowserClient.setUserId called with:', { userId }); } getDeviceId(): string | undefined { console.log('FakeBrowserClient.getDeviceId called'); return undefined; } setDeviceId(deviceId: string): void { console.log('FakeBrowserClient.setDeviceId called with:', { deviceId }); } getSessionId(): number | undefined { console.log('FakeBrowserClient.getSessionId called'); return undefined; } setSessionId(sessionId: number): void { console.log('FakeBrowserClient.setSessionId called with:', { sessionId }); } extendSession(): void { console.log('FakeBrowserClient.extendSession called'); } reset(): void { console.log('FakeBrowserClient.reset called'); } _setDiagnosticsSampleRate(sampleRate: number): void { console.log('FakeBrowserClient.setDiagnosticsSampleRate called with:', { sampleRate }); } } ================================================ FILE: packages/analytics-browser/test/utils/snippet-helper.test.ts ================================================ import * as SnippetHelper from '../../src/utils/snippet-helper'; describe('snippet-helper', () => { const API_KEY = 'apiKey'; describe('runQueuedFunctions', () => { test('should convert to real object', () => { const obj = {}; const convertProxyObjectToRealObject = jest .spyOn(SnippetHelper, 'convertProxyObjectToRealObject') .mockReturnValueOnce(obj); SnippetHelper.runQueuedFunctions(obj, []); expect(convertProxyObjectToRealObject).toHaveBeenCalledTimes(1); }); }); describe('convertProxyObjectToRealObject', () => { test('should convert to real object', () => { const init = (apiKey: string) => { expect(apiKey).toBe(API_KEY); return { promise: Promise.resolve() }; }; const resolve = jest.fn(); const proxyObj = { name: 'init', args: [API_KEY], resolve, }; const queue = [proxyObj]; const instance = { init }; SnippetHelper.convertProxyObjectToRealObject(instance, queue); expect(resolve).toHaveBeenCalledTimes(1); }); test('should handle no result', () => { const init = () => { return undefined; }; const resolve = jest.fn(); const proxyObj = { name: 'init', args: [], resolve, }; const queue = [proxyObj]; const instance = { init }; expect(SnippetHelper.convertProxyObjectToRealObject(instance, queue)).toBe(instance); expect(resolve).toHaveBeenCalledTimes(1); }); }); }); ================================================ FILE: packages/analytics-browser/test/video-capture/mock-video-observer.ts ================================================ /* eslint-disable @typescript-eslint/no-this-alias -- singleton test double */ import type { VideoObserverParams, VideoState } from '@amplitude/analytics-core'; /** Last instance constructed (cleared by {@link resetMockVideoObserver}). */ export let currentVideoObserver: MockVideoObserver | undefined; export function resetMockVideoObserver(): void { currentVideoObserver = undefined; } /** * Lightweight stand-in for {@link VideoObserver} in unit tests (no DOM / trackHtmlVideo). */ export class MockVideoObserver { readonly videoEl: VideoObserverParams['videoEl']; private isDestroyed = false; readonly vendor: VideoObserverParams['vendor']; readonly isEmbedded: VideoObserverParams['isEmbedded']; private readonly onStateChange: VideoObserverParams['onStateChange']; constructor({ videoEl, onStateChange, vendor, isEmbedded }: VideoObserverParams) { this.videoEl = videoEl; this.onStateChange = onStateChange; this.vendor = vendor; this.isEmbedded = isEmbedded; currentVideoObserver = this; } emitStateChange(previousState: VideoState, nextState: VideoState): void { if (this.isDestroyed) { return; } this.onStateChange(previousState, nextState); } destroy(): void { this.isDestroyed = true; } } ================================================ FILE: packages/analytics-browser/test/video-capture/video-capture.test.ts ================================================ /* eslint-disable @typescript-eslint/no-non-null-assertion, @typescript-eslint/unbound-method -- jest expectations */ import { AmplitudeBrowser } from '@amplitude/analytics-browser'; import { EmbeddedVideoPlayer, VideoState } from '@amplitude/analytics-core'; import { VideoCapture, trackVideo } from '../../src/video-capture/video-capture'; import { currentVideoObserver, resetMockVideoObserver } from './mock-video-observer'; jest.mock('@amplitude/analytics-core', () => { const actual = jest.requireActual('@amplitude/analytics-core'); const { MockVideoObserver } = jest.requireActual('./mock-video-observer'); return { ...actual, VideoObserver: MockVideoObserver, }; }); describe('VideoCapture', () => { let mockAmplitude: AmplitudeBrowser; beforeEach(() => { resetMockVideoObserver(); mockAmplitude = { track: jest.fn(), } as unknown as AmplitudeBrowser; }); describe('kitchen sink', () => { it('should track start and stop events', () => { const capture = new VideoCapture(mockAmplitude) .withVideoElement(document.createElement('video')) .captureVideoStarted() .captureVideoStopped() .withExtraEventProperties({ hello: 'world', number: 123, }) .start(); // mock a play event let previousState: VideoState = { playbackState: 'paused', lastEvent: undefined }; let nextState: VideoState = { playbackState: 'playing', lastEvent: { duration: 10, last_position: undefined } }; currentVideoObserver!.emitStateChange(previousState, nextState); expect(mockAmplitude.track).toHaveBeenCalledWith('Video Content Started', { duration: 10, hello: 'world', number: 123, }); // mock a pause event previousState = nextState; nextState = { playbackState: 'paused', lastEvent: { duration: 10, last_position: 5 } }; currentVideoObserver!.emitStateChange(previousState, nextState); expect(mockAmplitude.track).toHaveBeenCalledWith('Video Content Stopped', { duration: 10, last_position: 5, hello: 'world', number: 123, }); expect(mockAmplitude.track).toHaveBeenCalledTimes(2); // stop the capture capture.stop(); // mock another play event previousState = nextState; nextState = { playbackState: 'playing', lastEvent: { duration: 10, last_position: undefined } }; currentVideoObserver!.emitStateChange(previousState, nextState); // assert that the track method was not called again expect(mockAmplitude.track).toHaveBeenCalledTimes(2); }); }); describe('withEmbeddedPlayer()', () => { it('should capture start and stop events', () => { const dummyPlayer = {}; new VideoCapture(mockAmplitude) .withEmbeddedPlayer(dummyPlayer as unknown as EmbeddedVideoPlayer) .withVendor('mux') .start(); expect(currentVideoObserver!.isEmbedded).toBe(true); expect(currentVideoObserver!.vendor).toBe('mux'); }); }); describe('withVendor()', () => { it('should capture start and stop events', () => { const videoCapture = new VideoCapture(mockAmplitude).withVendor('mux'); expect((videoCapture as unknown as { vendor: string }).vendor).toBe('mux'); }); }); describe('start()', () => { it('should throw an error if neither withVideoElement nor withEmbeddedPlayer was called', () => { const capture = new VideoCapture(mockAmplitude); expect(() => capture.start()).toThrow(/withVideoElement/g); }); it('should throw an error if both video element and embedded video player are specified', () => { const capture = new VideoCapture(mockAmplitude) .withVideoElement(document.createElement('video')) .withEmbeddedPlayer({} as unknown as EmbeddedVideoPlayer); expect(() => capture.start()).toThrow(/withVideoElement/g); }); }); describe('trackVideo()', () => { beforeEach(() => { resetMockVideoObserver(); }); it('should capture start and stop events', () => { const stopVideoCapture = trackVideo(mockAmplitude, document.createElement('video'), { vendor: 'mux', extraEventProperties: { hello: 'world', number: 123 }, }); expect(currentVideoObserver!.vendor).toBe('mux'); currentVideoObserver!.emitStateChange( { playbackState: 'paused', lastEvent: undefined }, { playbackState: 'playing', lastEvent: { duration: 10, last_position: undefined } }, ); expect(mockAmplitude.track).toHaveBeenCalledWith('Video Content Started', { duration: 10, hello: 'world', number: 123, }); currentVideoObserver!.emitStateChange( { playbackState: 'playing', lastEvent: { duration: 10, last_position: undefined } }, { playbackState: 'paused', lastEvent: { duration: 10, last_position: 5 } }, ); expect(mockAmplitude.track).toHaveBeenCalledWith('Video Content Stopped', { duration: 10, last_position: 5, hello: 'world', number: 123, }); stopVideoCapture(); currentVideoObserver!.emitStateChange( { playbackState: 'paused', lastEvent: { duration: 10, last_position: 5 } }, { playbackState: 'playing', lastEvent: { duration: 10, last_position: undefined } }, ); expect(mockAmplitude.track).toHaveBeenCalledTimes(2); }); it('should capture start and stop events with embedded video player', () => { const stopVideoCapture = trackVideo(mockAmplitude, { onPlay: jest.fn(), onPause: jest.fn(), onEnded: jest.fn(), onError: jest.fn(), } as unknown as EmbeddedVideoPlayer); currentVideoObserver!.emitStateChange( { playbackState: 'paused', lastEvent: undefined }, { playbackState: 'playing', lastEvent: { duration: 10, last_position: undefined } }, ); expect(mockAmplitude.track).toHaveBeenCalledWith('Video Content Started', { duration: 10, }); currentVideoObserver!.emitStateChange( { playbackState: 'playing', lastEvent: { duration: 10, last_position: undefined } }, { playbackState: 'paused', lastEvent: { duration: 10, last_position: 5 } }, ); expect(mockAmplitude.track).toHaveBeenCalledWith('Video Content Stopped', { duration: 10, last_position: 5, }); stopVideoCapture(); }); }); }); ================================================ FILE: packages/analytics-browser/tsconfig.es5.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "module": "commonjs", "noEmit": false, "outDir": "lib/cjs", "rootDir": "./src" } } ================================================ FILE: packages/analytics-browser/tsconfig.esm.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "module": "es6", "noEmit": false, "outDir": "lib/esm", "rootDir": "./src" } } ================================================ FILE: packages/analytics-browser/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "include": ["src/**/*", "test/**/*", "e2e/**/*"], "compilerOptions": { "baseUrl": ".", "esModuleInterop": true, "lib": ["dom"], "noEmit": true, "rootDir": "." } } ================================================ FILE: packages/analytics-browser-test/CHANGELOG.md ================================================ # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.7.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.6.2...@amplitude/analytics-browser-test@2.7.0) (2023-05-04) ### Features - add attribution tracking for linkedin click id li_fat_id ([ca81f3d](https://github.com/amplitude/Amplitude-TypeScript/commit/ca81f3d75ece7e0e23a1bc1b6889107d53a60a86)) - add rtd_cid for Reddit campaign tracking/attribution ([784e080](https://github.com/amplitude/Amplitude-TypeScript/commit/784e080aa129c37e850d7f34115beb9770044e4e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.6.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.6.1...@amplitude/analytics-browser-test@2.6.2) (2023-04-27) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.6.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.6.0...@amplitude/analytics-browser-test@2.6.1) (2023-04-27) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.6.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.4...@amplitude/analytics-browser-test@2.6.0) (2023-04-25) ### Features - send user_agent with events ([#375](https://github.com/amplitude/Amplitude-TypeScript/issues/375)) ([26086b5](https://github.com/amplitude/Amplitude-TypeScript/commit/26086b543d7f0ee2d35e09b43199b5c26ed24e36)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.3...@amplitude/analytics-browser-test@2.5.4) (2023-04-06) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.2...@amplitude/analytics-browser-test@2.5.3) (2023-03-31) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.2-beta.0...@amplitude/analytics-browser-test@2.5.2) (2023-03-31) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.2-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.1...@amplitude/analytics-browser-test@2.5.2-beta.0) (2023-03-31) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.1-beta.1...@amplitude/analytics-browser-test@2.5.1) (2023-03-03) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.1-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.1-beta.0...@amplitude/analytics-browser-test@2.5.1-beta.1) (2023-03-03) ### Bug Fixes - event types and properties for default events ([#341](https://github.com/amplitude/Amplitude-TypeScript/issues/341)) ([707522d](https://github.com/amplitude/Amplitude-TypeScript/commit/707522d440d5aa3be48809afcb44a4147f103903)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.5.1-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.0...@amplitude/analytics-browser-test@2.5.1-beta.0) (2023-03-03) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.5.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.0-beta.4...@amplitude/analytics-browser-test@2.5.0) (2023-02-27) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.5.0-beta.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.0-beta.3...@amplitude/analytics-browser-test@2.5.0-beta.4) (2023-02-27) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.5.0-beta.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.0-beta.2...@amplitude/analytics-browser-test@2.5.0-beta.3) (2023-02-26) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.5.0-beta.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.0-beta.1...@amplitude/analytics-browser-test@2.5.0-beta.2) (2023-02-25) ### Bug Fixes - inconsistent user and device id on session events ([#337](https://github.com/amplitude/Amplitude-TypeScript/issues/337)) ([0dfbc6c](https://github.com/amplitude/Amplitude-TypeScript/commit/0dfbc6c78335a7578fc0207d91c1ef9845950f16)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.5.0-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.5.0-beta.0...@amplitude/analytics-browser-test@2.5.0-beta.1) (2023-02-24) ### Bug Fixes - improper cookie usage ([#330](https://github.com/amplitude/Amplitude-TypeScript/issues/330)) ([e670091](https://github.com/amplitude/Amplitude-TypeScript/commit/e670091e59014bb35bd9b3ec2a7192f259393575)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.5.0-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.4.2...@amplitude/analytics-browser-test@2.5.0-beta.0) (2023-02-24) ### Features - add session start/end event tracker ([#332](https://github.com/amplitude/Amplitude-TypeScript/issues/332)) ([e26cf15](https://github.com/amplitude/Amplitude-TypeScript/commit/e26cf15503c59d3b25bd54391bb330a8c634eca3)) - retrofit web attribution and page view plugins to browser SDK ([#331](https://github.com/amplitude/Amplitude-TypeScript/issues/331)) ([ba845d3](https://github.com/amplitude/Amplitude-TypeScript/commit/ba845d3329bd6bebe3b89f24f4f316088c2d62b9)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.4.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.4.1...@amplitude/analytics-browser-test@2.4.2) (2023-02-09) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.4.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.4.0...@amplitude/analytics-browser-test@2.4.1) (2023-02-02) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.4.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.4.0-beta.0...@amplitude/analytics-browser-test@2.4.0) (2023-01-31) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.4.0-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.3.5...@amplitude/analytics-browser-test@2.4.0-beta.0) (2023-01-26) ### Features - allow opt out of deleting legacy sdk cookies ([c6a82fb](https://github.com/amplitude/Amplitude-TypeScript/commit/c6a82fb52e1301e427116891d1f31208bcfc6548)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.3.4...@amplitude/analytics-browser-test@2.3.5) (2023-01-11) **Note:** Version bump only for package @amplitude/analytics-browser-test # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.3.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.3.3...@amplitude/analytics-browser-test@2.3.4) (2022-12-21) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.3.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.3.2...@amplitude/analytics-browser-test@2.3.3) (2022-12-10) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.3.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.3.1...@amplitude/analytics-browser-test@2.3.2) (2022-12-06) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.3.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.3.0...@amplitude/analytics-browser-test@2.3.1) (2022-12-05) **Note:** Version bump only for package @amplitude/analytics-browser-test # [2.3.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.2.3...@amplitude/analytics-browser-test@2.3.0) (2022-11-28) ### Features - add utm_id tracking ([#284](https://github.com/amplitude/Amplitude-TypeScript/issues/284)) ([f72dcf1](https://github.com/amplitude/Amplitude-TypeScript/commit/f72dcf1788ebc84544aaee1dc41b1d1ba6e4c06e)) ## [2.2.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.2.2...@amplitude/analytics-browser-test@2.2.3) (2022-11-22) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.2.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.2.1...@amplitude/analytics-browser-test@2.2.2) (2022-11-15) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.2.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.2.0...@amplitude/analytics-browser-test@2.2.1) (2022-11-01) **Note:** Version bump only for package @amplitude/analytics-browser-test # [2.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.11...@amplitude/analytics-browser-test@2.2.0) (2022-11-01) ### Features - enhance logger with debug information ([#254](https://github.com/amplitude/Amplitude-TypeScript/issues/254)) ([5c6175e](https://github.com/amplitude/Amplitude-TypeScript/commit/5c6175e9372cbeea264ddb34c6cc68148063d4f7)) ## [2.1.11](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.10...@amplitude/analytics-browser-test@2.1.11) (2022-10-26) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.10-beta.1...@amplitude/analytics-browser-test@2.1.10) (2022-10-25) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.10-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.10-beta.0...@amplitude/analytics-browser-test@2.1.10-beta.1) (2022-10-25) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.10-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.9...@amplitude/analytics-browser-test@2.1.10-beta.0) (2022-10-25) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.9](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.8...@amplitude/analytics-browser-test@2.1.9) (2022-10-25) ### Bug Fixes - invoke pre-init track fns after attribution ([#253](https://github.com/amplitude/Amplitude-TypeScript/issues/253)) ([b8996d7](https://github.com/amplitude/Amplitude-TypeScript/commit/b8996d793f74d388c1a96e0cde5c0ac060c1e565)) ## [2.1.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.7...@amplitude/analytics-browser-test@2.1.8) (2022-10-14) ### Bug Fixes - run queued functions after attribution in browser-client.ts ([#249](https://github.com/amplitude/Amplitude-TypeScript/issues/249)) ([751b7ca](https://github.com/amplitude/Amplitude-TypeScript/commit/751b7ca6b0f05131dc932b89dd89e8979e334b4b)) ## [2.1.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.6...@amplitude/analytics-browser-test@2.1.7) (2022-10-04) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.5...@amplitude/analytics-browser-test@2.1.6) (2022-09-30) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.4...@amplitude/analytics-browser-test@2.1.5) (2022-09-30) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.4-beta.1...@amplitude/analytics-browser-test@2.1.4) (2022-09-28) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.4-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.4-beta.0...@amplitude/analytics-browser-test@2.1.4-beta.1) (2022-09-27) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.4-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.3...@amplitude/analytics-browser-test@2.1.4-beta.0) (2022-09-26) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.2...@amplitude/analytics-browser-test@2.1.3) (2022-09-26) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.1...@amplitude/analytics-browser-test@2.1.2) (2022-09-22) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.1.0...@amplitude/analytics-browser-test@2.1.1) (2022-09-16) **Note:** Version bump only for package @amplitude/analytics-browser-test # [2.1.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.13...@amplitude/analytics-browser-test@2.1.0) (2022-09-08) ### Features - add ingestion_metadata field ([#212](https://github.com/amplitude/Amplitude-TypeScript/issues/212)) ([ebe8448](https://github.com/amplitude/Amplitude-TypeScript/commit/ebe8448b23609134f846e18da2e769158ca30bf1)) ## [2.0.13](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.12...@amplitude/analytics-browser-test@2.0.13) (2022-08-31) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.12](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.11...@amplitude/analytics-browser-test@2.0.12) (2022-08-29) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.11](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.10...@amplitude/analytics-browser-test@2.0.11) (2022-08-23) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.9...@amplitude/analytics-browser-test@2.0.10) (2022-08-18) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.9](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.8...@amplitude/analytics-browser-test@2.0.9) (2022-08-16) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.7...@amplitude/analytics-browser-test@2.0.8) (2022-08-13) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.6...@amplitude/analytics-browser-test@2.0.7) (2022-08-12) ### Bug Fixes - add callable queue when init is pending ([#181](https://github.com/amplitude/Amplitude-TypeScript/issues/181)) ([d8fc361](https://github.com/amplitude/Amplitude-TypeScript/commit/d8fc36195b96e2c10ccc5106027beaa7e970e0c0)) ## [2.0.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.5...@amplitude/analytics-browser-test@2.0.6) (2022-08-02) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.4...@amplitude/analytics-browser-test@2.0.5) (2022-07-30) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.3...@amplitude/analytics-browser-test@2.0.4) (2022-07-29) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.2...@amplitude/analytics-browser-test@2.0.3) (2022-07-22) ### Bug Fixes - adds error handling for invalid api ([#153](https://github.com/amplitude/Amplitude-TypeScript/issues/153)) ([c03f9d7](https://github.com/amplitude/Amplitude-TypeScript/commit/c03f9d7dad51e3026673dca31418a74591d79bbc)) ## [2.0.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.1...@amplitude/analytics-browser-test@2.0.2) (2022-07-15) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [2.0.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@2.0.0...@amplitude/analytics-browser-test@2.0.1) (2022-07-13) **Note:** Version bump only for package @amplitude/analytics-browser-test # [2.0.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@1.3.1...@amplitude/analytics-browser-test@2.0.0) (2022-06-29) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [1.3.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@1.3.0...@amplitude/analytics-browser-test@1.3.1) (2022-06-29) **Note:** Version bump only for package @amplitude/analytics-browser-test # [1.3.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@1.2.1...@amplitude/analytics-browser-test@1.3.0) (2022-06-29) ### Features - make storage interface async to enable react-native ([#122](https://github.com/amplitude/Amplitude-TypeScript/issues/122)) ([42bb39c](https://github.com/amplitude/Amplitude-TypeScript/commit/42bb39c967db015d5899487618d066f3540c9f18)) ## [1.2.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@1.2.0...@amplitude/analytics-browser-test@1.2.1) (2022-06-24) **Note:** Version bump only for package @amplitude/analytics-browser-test # [1.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@1.1.3...@amplitude/analytics-browser-test@1.2.0) (2022-06-24) ### Features - add marketing campaign tracking ([#112](https://github.com/amplitude/Amplitude-TypeScript/issues/112)) ([bca73ed](https://github.com/amplitude/Amplitude-TypeScript/commit/bca73ede308ecb1663986a99600657732969d60c)) ## [1.1.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@1.1.2...@amplitude/analytics-browser-test@1.1.3) (2022-06-21) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [1.1.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@1.1.1...@amplitude/analytics-browser-test@1.1.2) (2022-06-17) **Note:** Version bump only for package @amplitude/analytics-browser-test ## [1.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-browser-test@1.1.0...@amplitude/analytics-browser-test@1.1.1) (2022-05-17) ### Bug Fixes - allow option.serverUrl to be used in destination plugin ([#104](https://github.com/amplitude/Amplitude-TypeScript/issues/104)) ([f353367](https://github.com/amplitude/Amplitude-TypeScript/commit/f353367b8b264f86b6ea15b15f30385f8d5b8ad5)) # 1.1.0 (2022-05-12) ### Bug Fixes - allow event level groups tracking ([#90](https://github.com/amplitude/Amplitude-TypeScript/issues/90)) ([3240660](https://github.com/amplitude/Amplitude-TypeScript/commit/3240660e94db9e5c5a1ce4280d07faced2b5fd4d)) - e2e tests hardcoded library version ([c6caac6](https://github.com/amplitude/Amplitude-TypeScript/commit/c6caac64e0716d779c073d872e3745d5377868fe)) ### Features - parse old cookies and convert to new format ([#85](https://github.com/amplitude/Amplitude-TypeScript/issues/85)) ([bda78be](https://github.com/amplitude/Amplitude-TypeScript/commit/bda78be5d2de335e7b1ff6da413b20d3dc751aca)) ================================================ FILE: packages/analytics-browser-test/README.md ================================================


# `@amplitude/analytics-browser-test` > Internal Node package for Amplitude ================================================ FILE: packages/analytics-browser-test/jest.config.js ================================================ const baseConfig = require('../../jest.config.js'); const package = require('./package'); module.exports = { ...baseConfig, collectCoverage: false, displayName: package.name, rootDir: '.', setupFiles: ['./test/setup.ts'], testEnvironment: 'jsdom', }; ================================================ FILE: packages/analytics-browser-test/package.json ================================================ { "name": "@amplitude/analytics-browser-test", "version": "2.8.0-beta.0", "private": true, "description": "", "author": "Amplitude Inc", "homepage": "https://github.com/amplitude/Amplitude-TypeScript", "repository": { "type": "git", "url": "git+https://github.com/amplitude/Amplitude-TypeScript.git" }, "scripts": { "test": "jest" }, "bugs": { "url": "https://github.com/amplitude/Amplitude-TypeScript/issues" }, "dependencies": { }, "devDependencies": { "@amplitude/analytics-browser": "workspace:*", "@amplitude/analytics-core": "workspace:*", "nock": "^13.2.4" } } ================================================ FILE: packages/analytics-browser-test/test/constants.ts ================================================ export const uuidPattern = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/; export const url = 'https://api2.amplitude.com'; export const path = '/2/httpapi'; export const SUCCESS_MESSAGE = 'Event tracked successfully'; ================================================ FILE: packages/analytics-browser-test/test/helpers.ts ================================================ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import { BaseEvent, Campaign, BASE_CAMPAIGN } from '@amplitude/analytics-core'; import { uuidPattern } from './constants'; const uuid: string = expect.stringMatching(uuidPattern) as string; const userAgent = expect.any(String) as string; const library = expect.stringMatching(/^amplitude-ts\/.+/) as string; const number = expect.any(Number) as number; const parseQueryString = (url: string) => { const params: { [key: string]: string } = {}; // Extract the query string part from the URL const queryString = url.split('?')[1]; if (queryString) { // Split the query string into key-value pairs queryString.split('&').forEach((part) => { const [key, value] = part.split('='); // Decode URI components and add to the params object params[decodeURIComponent(key)] = decodeURIComponent(value); }); } return params; }; const getReferrerObject = (referrerString?: string) => { if (!referrerString) return {}; const referrerURL = new URL(referrerString); const referrer = referrerURL.href.split('?')[0]; const referring_domain = referrerURL.hostname; return { referrer, referring_domain }; }; const generateAttributionUserProps = (campaignURL: string, referrerString?: string) => { const referrer = getReferrerObject(referrerString); const campaign = parseQueryString(campaignURL); const campaignObject: Campaign = { ...BASE_CAMPAIGN, ...campaign, ...referrer, }; const hasNoCampaign = Object.entries(campaign).length === 0; const hasAllCampaign = Object.entries(campaign).length === Object.entries(BASE_CAMPAIGN).length; const operationObject: { [key: string]: { [key: string]: string } } = { $setOnce: {}, ...(!hasAllCampaign ? { $unset: {} } : {}), ...(!hasNoCampaign ? { $set: {} } : {}), }; const user_properties = Object.keys(campaignObject).reduce((operationObject, key) => { if (campaignObject[key] !== undefined) { operationObject.$setOnce['initial_' + key] = campaignObject[key] as string; operationObject.$set[key] = campaignObject[key] as string; // Assert that the value is a string } else { operationObject.$setOnce['initial_' + key] = 'EMPTY'; operationObject.$unset[key] = '-'; } return operationObject; }, operationObject); return user_properties; }; export const generateEvent = ( event_id: number, event_type: string, options?: { withPageURLEnrichmentProperties?: { url?: string; previousPageUrl?: string; }; }, ): BaseEvent => { const event = { device_id: uuid, event_id: event_id, event_type: event_type, insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }; if (options?.withPageURLEnrichmentProperties) { return addPageUrlEnrichmentProperties( event, options.withPageURLEnrichmentProperties.url || '', options.withPageURLEnrichmentProperties.previousPageUrl || '', ); } return event; }; export const generateAttributionEvent = (event_id: number, campaignURL: string, referrer?: string) => { const attributionEvent = generateEvent(event_id, '$identify'); attributionEvent.user_properties = generateAttributionUserProps(campaignURL, referrer); return attributionEvent; }; export const generateSessionStartEvent = ( event_id: number, options: { withPageURLEnrichmentProperties: { url?: string; previousPageUrl?: string; }; }, ) => { const sessionStartEvent = generateEvent(event_id, 'session_start'); if (options.withPageURLEnrichmentProperties) { return addPageUrlEnrichmentProperties( sessionStartEvent, options.withPageURLEnrichmentProperties.url || '', options.withPageURLEnrichmentProperties.previousPageUrl || '', ); } return sessionStartEvent; }; export const generateSessionEndEvent = ( event_id: number, options?: { withPageURLEnrichmentProperties: { url?: string; previousPageUrl?: string; }; }, ) => { const sessionEndEvent = generateEvent(event_id, 'session_end'); if (options?.withPageURLEnrichmentProperties) { return addPageUrlEnrichmentProperties( sessionEndEvent, options?.withPageURLEnrichmentProperties.url || '', options?.withPageURLEnrichmentProperties.previousPageUrl || '', ); } return sessionEndEvent; }; const generatePageViewEventProps = ( pageCounter: number, urlString: string, referrerString?: string, options?: { withPageURLEnrichmentProperties?: { previousPageUrl?: string; }; }, ) => { const referrer = getReferrerObject(referrerString); const previousUrl = options?.withPageURLEnrichmentProperties?.previousPageUrl ? new URL(options?.withPageURLEnrichmentProperties.previousPageUrl) : { href: '' }; const url = new URL(urlString); const campaign = parseQueryString(urlString); return { '[Amplitude] Page Counter': pageCounter, '[Amplitude] Page Domain': url.hostname, '[Amplitude] Page Location': url.href, '[Amplitude] Page Path': url.pathname, '[Amplitude] Page Title': '', '[Amplitude] Page URL': url.href.split('?')[0], '[Amplitude] Page View ID': uuid, ...(options?.withPageURLEnrichmentProperties ? addPageUrlEnrichmentPreviousPageProperties(url.href, previousUrl.href || '') : {}), ...campaign, ...referrer, }; }; export const generatePageViewEvent = ( event_id: number, pageCounter: number, url: string, referrer?: string, options?: { withPageURLEnrichmentProperties?: { previousPageUrl?: string; }; }, ) => { const generatePageViewEvent = generateEvent(event_id, '[Amplitude] Page Viewed'); generatePageViewEvent.event_properties = generatePageViewEventProps(pageCounter, url, referrer, { withPageURLEnrichmentProperties: options?.withPageURLEnrichmentProperties, }); return generatePageViewEvent; }; export const navigateTo = (urlString: string, referrer?: string) => { if (referrer) { Object.defineProperty(document, 'referrer', { value: referrer, configurable: true }); } const url = new URL(urlString); // eslint-disable-next-line no-restricted-globals Object.defineProperty(window, 'location', { value: { hostname: url.hostname, href: url.href, pathname: url.pathname, search: url.search, }, writable: true, }); }; export const addPageUrlEnrichmentProperties = (event: BaseEvent, urlString: string, previousPageUrl?: string) => { const url = new URL(urlString); const previousUrl = previousPageUrl ? new URL(previousPageUrl) : { href: '' }; event.event_properties = { ...event.event_properties, '[Amplitude] Page Domain': url.hostname, '[Amplitude] Page Location': url.href, '[Amplitude] Page Path': url.pathname, '[Amplitude] Page Title': '', '[Amplitude] Page URL': url.href.split('?')[0], ...addPageUrlEnrichmentPreviousPageProperties(url.href, previousUrl.href), }; return event; }; export const addPageUrlEnrichmentPreviousPageProperties = (current: string, previous: string) => { // note that the five duplicate properties with the page viewed are skipped here return { '[Amplitude] Previous Page Location': previous, '[Amplitude] Previous Page Type': getPreviousPageType(current, previous), }; }; export const getPreviousPageType = (current: string, previous: string) => { if (!previous) { return 'direct'; } const currentUrl = new URL(current); const previousUrl = new URL(previous); return previousUrl.hostname === currentUrl.hostname ? 'internal' : 'external'; }; ================================================ FILE: packages/analytics-browser-test/test/in-memory-storage.test.ts ================================================ import { createInstance } from '@amplitude/analytics-browser'; import { MemoryStorage, UUID } from '@amplitude/analytics-core'; import { default as nock } from 'nock'; import { path, url } from './constants'; import { success } from './responses'; import 'isomorphic-fetch'; describe('Storage options', () => { let apiKey = ''; let shortenedApiKey = ''; const defaultTracking = { attribution: false, }; beforeEach(() => { apiKey = UUID(); shortenedApiKey = `${apiKey.substring(0, 10)}`; }); afterEach(() => { // clean up storage document.cookie = `AMP_${shortenedApiKey}=null; expires=1 Jan 1970 00:00:00 GMT`; window.localStorage.clear(); }); test('should use default storage', async () => { const scope = nock(url).post(path).reply(200, success); const amplitude = createInstance(); await amplitude.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; await amplitude.track('Event').promise; /** * cookies are the default storage option for user session * asserts that cookie storage was used */ expect(document.cookie).toContain(`AMP_${shortenedApiKey}=`); /** * local storage is the default storage option for unsent events * asserts that local storage was used */ expect(window.localStorage.key(0)).toBe(`AMP_unsent_${shortenedApiKey}`); scope.done(); }); test('should use local storage', async () => { const scope = nock(url).post(path).reply(200, success); const amplitude = createInstance(); await amplitude.init(apiKey, { defaultTracking, identityStorage: 'localStorage', fetchRemoteConfig: false, }).promise; await amplitude.track('Event').promise; /** * cookies are disabled * asserts that cookie storage was not used */ expect(document.cookie).toBe(''); /** * with `disableCookies: true`, user session is stored in local storage * asserts that local storage is used for use session and unsent events */ expect(window.localStorage.key(0)).toContain(`AMP_${shortenedApiKey}`); expect(window.localStorage.key(1)).toBe(`AMP_unsent_${shortenedApiKey}`); expect(window.localStorage.length).toBe(2); scope.done(); }); test('should use memory storage', async () => { const scope = nock(url).post(path).reply(200, success); const amplitude = createInstance(); await amplitude.init(apiKey, { defaultTracking, identityStorage: 'none', storageProvider: new MemoryStorage(), fetchRemoteConfig: false, }).promise; await amplitude.track('Event').promise; /** * cookieStorage is set to new MemoryStorage() * asserts that cookie storage is not used */ expect(document.cookie).toBe(''); /** * storageProvider is set to new MemoryStorage() * asserts that local storage is not used */ expect(window.localStorage.length).toBe(0); scope.done(); }); }); ================================================ FILE: packages/analytics-browser-test/test/index.test.ts ================================================ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import * as amplitude from '@amplitude/analytics-browser'; import { default as nock } from 'nock'; import { success } from './responses'; import 'isomorphic-fetch'; import { path, url, SUCCESS_MESSAGE, uuidPattern } from './constants'; import { LogLevel, UUID } from '@amplitude/analytics-core'; describe('integration', () => { const uuid: string = expect.stringMatching(uuidPattern) as string; const library = expect.stringMatching(/^amplitude-ts\/.+/) as string; const number = expect.any(Number) as number; const userAgent = expect.any(String) as string; const defaultTracking = { attribution: false, fileDownloads: false, formInteractions: false, pageViews: false, sessions: false, }; let apiKey = ''; let client = amplitude.createInstance(); const event_upload_time = '2023-01-01T12:00:00:000Z'; Date.prototype.toISOString = jest.fn(() => event_upload_time); beforeAll(() => { Object.defineProperty(window, 'location', { value: { hostname: '', href: '', pathname: '', search: '', }, writable: true, }); }); beforeEach(() => { client = amplitude.createInstance(); apiKey = UUID(); (window.location as any) = { hostname: '', href: '', pathname: '', search: '', }; }); afterEach(() => { // clean up cookies document.cookie = `amp_${apiKey.substring(0, 6)}=null; expires=1 Jan 1970 00:00:00 GMT`; document.cookie = `AMP_${apiKey.substring(0, 10)}=null; expires=1 Jan 1970 00:00:00 GMT`; document.cookie = `AMP_MKTG_${apiKey.substring(0, 10)}=null; expires=1 Jan 1970 00:00:00 GMT`; // clear url info in session storage window.sessionStorage.setItem('AMP_URL_INFO', '{}'); }); describe('defer initialization', () => { beforeAll(() => { Object.defineProperty(window, 'location', { value: { hostname: '', href: '', pathname: '', search: '', }, writable: true, }); }); beforeEach(() => { (window.location as any) = { hostname: '', href: '', pathname: '', search: '', }; }); test('should allow init to be called after other APIs', () => { return new Promise((resolve) => { const scope = nock(url).post(path).reply(200, success); // NOTE: Values to assert on const sessionId = Date.now() - 1000; const userId = 'user@amplitude.com'; const deviceId = 'device-12345'; const platform = 'Jest'; client.setUserId(userId); client.setDeviceId(deviceId); client.setSessionId(sessionId); client.add({ type: 'enrichment', name: 'custom', setup: async () => { return undefined; }, execute: async (event) => { event.platform = platform; return event; }, }); void client.track('Event Before Init').promise.then((response) => { expect(response.event).toEqual({ device_id: deviceId, // NOTE: Device ID was set before init event_id: 0, event_type: 'Event Before Init', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, insert_id: uuid, ip: '$remote', language: 'en-US', library: library, partner_id: undefined, plan: undefined, ingestion_metadata: undefined, platform: platform, // NOTE: Session ID was set using a plugin added before init session_id: sessionId, // NOTE: Session ID was set before init time: number, user_id: userId, // NOTE: User ID was set before init user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); resolve(undefined); }); client.init(apiKey, { defaultTracking, serverUrl: url + path, fetchRemoteConfig: false, }); }); }); test('should set attribution on init prior to running queued methods', async () => { let requestBody1: Record = {}; const scope1 = nock(url) .post(path, (body: Record) => { requestBody1 = body; return true; }) .reply(200, success); // NOTE: Values to assert on const sessionId = Date.now() - 1000; const userId = 'user@amplitude.com'; const deviceId = 'device-12345'; client.setUserId(userId); client.setDeviceId(deviceId); client.setSessionId(sessionId); const trackPromise = client.track('Event Before Init').promise; await client.init(apiKey, { defaultTracking: { ...defaultTracking, attribution: true, pageViews: { trackOn: 'attribution', }, }, fetchRemoteConfig: false, }).promise; await trackPromise; expect(requestBody1).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ { device_id: deviceId, session_id: sessionId, user_id: userId, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, event_type: '[Amplitude] Page Viewed', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Page Counter': 1, '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, user_agent: userAgent, user_properties: { $setOnce: { initial_dclid: 'EMPTY', initial_fbclid: 'EMPTY', initial_gbraid: 'EMPTY', initial_gclid: 'EMPTY', initial_ko_click_id: 'EMPTY', initial_li_fat_id: 'EMPTY', initial_msclkid: 'EMPTY', initial_referrer: 'EMPTY', initial_referring_domain: 'EMPTY', initial_rdt_cid: 'EMPTY', initial_ttclid: 'EMPTY', initial_twclid: 'EMPTY', initial_utm_campaign: 'EMPTY', initial_utm_content: 'EMPTY', initial_utm_medium: 'EMPTY', initial_utm_source: 'EMPTY', initial_utm_term: 'EMPTY', initial_utm_id: 'EMPTY', initial_wbraid: 'EMPTY', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_campaign: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', wbraid: '-', }, }, event_id: 0, library: library, }, { device_id: deviceId, session_id: sessionId, user_id: userId, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, event_type: 'Event Before Init', event_id: 1, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, library: library, user_agent: userAgent, }, ], options: {}, }); scope1.done(); }); }); describe('track', () => { test('should track event', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; const response = await client.track('test event', { mode: 'test', }).promise; expect(response.event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_id: 0, event_properties: { mode: 'test', '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); }); test('should track event with custom config', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, 'sdk.dev@amplitude.com', { deviceId: 'deviceId', sessionId: 1, defaultTracking, fetchRemoteConfig: false, }).promise; const response = await client.track('test event').promise; expect(response.event).toEqual({ user_id: 'sdk.dev@amplitude.com', device_id: 'deviceId', session_id: 1, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 0, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); }); test('should track event with event options', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; const response = await client.track('test event', undefined, { user_id: 'sdk.dev@amplitude.com', device_id: 'deviceId', session_id: 1, }).promise; expect(response.event).toEqual({ user_id: 'sdk.dev@amplitude.com', device_id: 'deviceId', session_id: 1, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 0, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); }); test('should track event with optional ingestionMetadata option', async () => { const scope = nock(url).post(path).reply(200, success); const sourceName = 'ampli'; const sourceVersion = '2.0.0'; await client.init(apiKey, { defaultTracking, ingestionMetadata: { sourceName, sourceVersion, }, fetchRemoteConfig: false, }).promise; const response = await client.track('test event', undefined, { user_id: 'sdk.dev@amplitude.com', device_id: 'deviceId', session_id: 1, }).promise; expect(response.event).toEqual({ user_id: 'sdk.dev@amplitude.com', device_id: 'deviceId', session_id: 1, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 0, library: library, ingestion_metadata: { source_name: sourceName, source_version: sourceVersion, }, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); }); test('should track event with base event', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; const response = await client.track( { event_type: 'test event', groups: { org: '15', }, }, undefined, { user_id: 'sdk.dev@amplitude.com', device_id: 'deviceId', session_id: 1, }, ).promise; expect(response.event).toEqual({ user_id: 'sdk.dev@amplitude.com', device_id: 'deviceId', session_id: 1, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 0, library: library, groups: { org: '15', }, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); }); test('should handle 400 error', async () => { const first = nock(url) .post(path) .reply(400, { code: 400, error: 'Invalid field values on some events', events_with_invalid_fields: { device_id: [1], }, }); const second = nock(url).post(path).reply(200, success); await client.init(apiKey, { logLevel: 0, defaultTracking, fetchRemoteConfig: false, }).promise; const response = await Promise.all([ client.track('test event 1').promise, client.track('test event 2', undefined, { device_id: undefined, }).promise, ]); expect(response[0].event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event 1', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 0, library: library, user_agent: userAgent, }); expect(response[0].code).toBe(200); expect(response[0].message).toBe(SUCCESS_MESSAGE); expect(response[1].event).toEqual({ user_id: undefined, device_id: undefined, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event 2', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 1, library: library, user_agent: userAgent, }); expect(response[1].code).toBe(400); expect(response[1].message).toBe('Invalid field values on some events'); first.done(); second.done(); }); test('should handle 413 error', async () => { const first = nock(url).post(path).reply(413, { code: 413, error: 'Payload too large', }); const second = nock(url).post(path).times(2).reply(200, success); await client.init(apiKey, { logLevel: 0, flushQueueSize: 2, defaultTracking, fetchRemoteConfig: false, }).promise; const response = await Promise.all([client.track('test event 1').promise, client.track('test event 2').promise]); expect(response[0].event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event 1', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 0, library: library, user_agent: userAgent, }); expect(response[0].code).toBe(200); expect(response[0].message).toBe(SUCCESS_MESSAGE); expect(response[1].event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event 2', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 1, library: library, user_agent: userAgent, }); expect(response[1].code).toBe(200); expect(response[1].message).toBe(SUCCESS_MESSAGE); first.done(); second.done(); }); test('should handle 429 error', async () => { const first = nock(url) .post(path) .reply(429, { code: 429, error: 'Too many requests for some devices and users', exceeded_daily_quota_devices: { throttled_device_id: 1, }, }); const second = nock(url).post(path).reply(200, success); await client.init(apiKey, { logLevel: 0, defaultTracking, fetchRemoteConfig: false, }).promise; const response = await Promise.all([ client.track('test event 1').promise, client.track('test event 2', undefined, { device_id: 'throttled_device_id', }).promise, ]); expect(response[0].event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event 1', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 0, library: library, user_agent: userAgent, }); expect(response[0].code).toBe(200); expect(response[0].message).toBe(SUCCESS_MESSAGE); expect(response[1].event).toEqual({ user_id: undefined, device_id: 'throttled_device_id', session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event 2', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 1, library: library, user_agent: userAgent, }); expect(response[1].code).toBe(429); expect(response[1].message).toBe('Too many requests for some devices and users'); first.done(); second.done(); }); test('should handle 500 error', async () => { const first = nock(url).post(path).reply(500, { code: 500, }); const second = nock(url).post(path).reply(200, success); await client.init(apiKey, { logLevel: 0, defaultTracking, fetchRemoteConfig: false, }).promise; const response = await Promise.all([client.track('test event 1').promise, client.track('test event 2').promise]); expect(response[0].event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event 1', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 0, library: library, user_agent: userAgent, }); expect(response[0].code).toBe(200); expect(response[0].message).toBe(SUCCESS_MESSAGE); expect(response[1].event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event 2', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 1, library: library, user_agent: userAgent, }); expect(response[0].code).toBe(200); expect(response[0].message).toBe(SUCCESS_MESSAGE); first.done(); second.done(); }); test('should exhaust max retries', async () => { const scope = nock(url).post(path).times(3).reply(500, { code: 500, }); await client.init(apiKey, { logLevel: 0, flushMaxRetries: 3, defaultTracking, fetchRemoteConfig: false, }).promise; const response = await client.track('test event').promise; expect(response.event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_id: 0, library: library, user_agent: userAgent, }); expect(response.code).toBe(500); expect(response.message).toBe('Event rejected due to exceeded retry count'); scope.done(); }, 10000); test('should handle missing api key', async () => { await client.init('', undefined, { logLevel: 0, defaultTracking, fetchRemoteConfig: false, }).promise; const response = await client.track('test event').promise; expect(response.code).toBe(400); expect(response.message).toBe('Event rejected due to missing API key'); document.cookie = `AMP=null; expires=1 Jan 1970 00:00:00 GMT`; }); test('should handle client opt out', async () => { await client.init(apiKey, { logLevel: 0, defaultTracking, fetchRemoteConfig: false, }).promise; client.setOptOut(true); const response = await client.track('test event').promise; expect(response.code).toBe(0); expect(response.message).toBe('Event skipped due to optOut config'); }); }); describe('identify', () => { test('should track event', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; const id = new amplitude.Identify(); id.set('org', 'amp'); id.setOnce('initial_org', 'amp'); id.append('locations_1', 'ca'); id.prepend('locations_2', 'ny'); id.postInsert('tasks_1', 'a'); id.preInsert('tasks_2', 'b'); id.remove('company', 'x'); id.add('employees', 1); const response = await client.identify(id).promise; expect(response.event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: '$identify', event_id: 0, library: library, user_agent: userAgent, user_properties: { $add: { employees: 1, }, $append: { locations_1: 'ca', }, $postInsert: { tasks_1: 'a', }, $preInsert: { tasks_2: 'b', }, $prepend: { locations_2: 'ny', }, $remove: { company: 'x', }, $set: { org: 'amp', }, $setOnce: { initial_org: 'amp', }, }, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); }); }); describe('revenue', () => { test('should track event', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; const rev = new amplitude.Revenue(); rev.setProductId('1'); rev.setQuantity(1); rev.setPrice(100); rev.setRevenueType('t'); rev.setCurrency('USD'); rev.setRevenue(200); rev.setReceipt('receipt'); rev.setReceiptSig('receipt sig'); const response = await client.revenue(rev).promise; expect(response.event).toEqual({ device_id: uuid, event_id: 0, event_properties: { $price: 100, $productId: '1', $quantity: 1, $revenue: 200, $revenueType: 't', $currency: 'USD', $receipt: 'receipt', $receiptSig: 'receipt sig', }, event_type: 'revenue_amount', insert_id: uuid, ip: '$remote', language: 'en-US', library: library, partner_id: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: undefined, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); }); }); describe('setGroup', () => { test('should track event', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; const response = await client.setGroup('org', 'engineering').promise; expect(response.event).toEqual({ device_id: uuid, event_id: 0, event_type: '$identify', groups: { org: 'engineering', }, insert_id: uuid, ip: '$remote', language: 'en-US', library: library, partner_id: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: undefined, user_properties: { $set: { org: 'engineering', }, }, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); }); }); describe('session handler', () => { const previousSessionId = Date.now() - 31 * 60 * 1000; // now minus 31 minutes const previousSessionLastEventTime = Date.now() - 31 * 60 * 1000; // now minus 31 minutes const previousSessionLastEventId = 99; const previousSessionDeviceId = 'a7a96s8d'; const previousSessionUserId = 'a7a96s8d'; beforeEach(() => { // setup expired previous session setLegacyCookie( apiKey, previousSessionDeviceId, previousSessionUserId, undefined, previousSessionId, previousSessionLastEventTime, previousSessionLastEventId, ); }); test('should send session events and replace with known user', () => { let payload: any = undefined; const scope = nock(url) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking: { ...defaultTracking, attribution: true, sessions: true, }, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }); // Sends `session_start` event client.track('Event in first session'); setTimeout(() => { client.track('Event in next session'); // Sends `session_end` event for previous session // Sends `session_start` event for next session }, 1000); setTimeout(() => { client.setUserId('user2@amplitude.com'); }, 2000); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ { // This is a `session_end` event for the previous session device_id: previousSessionDeviceId, event_id: 100, event_type: 'session_end', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: previousSessionId, time: previousSessionId + 1, user_agent: userAgent, user_id: previousSessionUserId, }, { device_id: uuid, event_id: 101, event_type: '$identify', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', user_properties: { $setOnce: { initial_dclid: 'EMPTY', initial_fbclid: 'EMPTY', initial_gbraid: 'EMPTY', initial_gclid: 'EMPTY', initial_ko_click_id: 'EMPTY', initial_li_fat_id: 'EMPTY', initial_msclkid: 'EMPTY', initial_referrer: 'EMPTY', initial_referring_domain: 'EMPTY', initial_rdt_cid: 'EMPTY', initial_ttclid: 'EMPTY', initial_twclid: 'EMPTY', initial_utm_campaign: 'EMPTY', initial_utm_content: 'EMPTY', initial_utm_id: 'EMPTY', initial_utm_medium: 'EMPTY', initial_utm_source: 'EMPTY', initial_utm_term: 'EMPTY', initial_wbraid: 'EMPTY', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_campaign: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', wbraid: '-', }, }, }, { device_id: uuid, event_id: 102, event_type: 'session_start', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 103, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: 'Event in first session', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 104, event_type: 'session_end', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 105, event_type: 'session_start', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 106, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: 'Event in next session', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should send session events and replace with unknown user', () => { // Reset previous session cookies document.cookie = `amp_${apiKey.substring(0, 6)}=null; expires=1 Jan 1970 00:00:00 GMT`; let payload: any = undefined; const scope = nock(url) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); client.init(apiKey, 'user1@amplitude.com', { defaultTracking: { ...defaultTracking, attribution: true, sessions: true, }, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }); // Sends `session_start` event client.track('Event in first session'); setTimeout(() => { client.track('Event in next session'); // Sends `session_end` event for previous session // Sends `session_start` event for next session }, 1000); setTimeout(() => { client.reset(); }, 2000); return new Promise((resolve) => { setTimeout(() => { const deviceId0 = payload.events[0].device_id; [ payload.events[1].device_id, payload.events[2].device_id, payload.events[3].device_id, payload.events[4].device_id, payload.events[5].device_id, ].forEach((deviceId) => { expect(deviceId).toEqual(deviceId0); }); const sessionId0 = payload.events[0].session_id; [payload.events[1].session_id, payload.events[2].session_id, payload.events[3].session_id].forEach( (sessionId) => { expect(sessionId).toEqual(sessionId0); }, ); expect(sessionId0).not.toEqual(payload.events[4].session_id); expect(payload.events[4].session_id).toEqual(payload.events[5].session_id); expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ { device_id: uuid, event_id: 0, event_type: '$identify', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', user_properties: { $setOnce: { initial_dclid: 'EMPTY', initial_fbclid: 'EMPTY', initial_gbraid: 'EMPTY', initial_gclid: 'EMPTY', initial_ko_click_id: 'EMPTY', initial_li_fat_id: 'EMPTY', initial_msclkid: 'EMPTY', initial_referrer: 'EMPTY', initial_referring_domain: 'EMPTY', initial_rdt_cid: 'EMPTY', initial_ttclid: 'EMPTY', initial_twclid: 'EMPTY', initial_utm_campaign: 'EMPTY', initial_utm_content: 'EMPTY', initial_utm_id: 'EMPTY', initial_utm_medium: 'EMPTY', initial_utm_source: 'EMPTY', initial_utm_term: 'EMPTY', initial_wbraid: 'EMPTY', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_campaign: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', wbraid: '-', }, }, }, { device_id: uuid, event_id: 1, event_type: 'session_start', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 2, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: 'Event in first session', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 3, event_type: 'session_end', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 4, event_type: 'session_start', event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 5, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: 'Event in next session', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should extend session with new event', () => { let payload: any = undefined; const scope = nock(url) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking: { ...defaultTracking, }, sessionId: 1, sessionTimeout: 1000, flushIntervalMillis: 3000, fetchRemoteConfig: false, }); client.track('First event in first session'); setTimeout(() => { // Track event before first session expires client.track('Second event in first session'); }, 800); setTimeout(() => { // Track event before extended session expires // Without second event, session should have expired client.track('Third event in first session'); }, 1600); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ { device_id: uuid, event_id: 100, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: 'First event in first session', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: 1, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 101, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: 'Second event in first session', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: 1, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 102, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: 'Third event in first session', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: 1, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should handle expired session', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; const response = await client.track('test event', { mode: 'test', }).promise; expect(response.event.session_id).not.toBe(previousSessionId); expect(response.event).toEqual({ user_id: previousSessionUserId, device_id: previousSessionDeviceId, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_id: 100, event_properties: { mode: 'test', '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); expect(document.cookie.includes('amp_')).toBe(false); scope.done(); }); test('should handle expired session and set with options.sessionId', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, sessionId: 1, fetchRemoteConfig: false, }).promise; const response = await client.track('test event', { mode: 'test', }).promise; expect(response.event.session_id).toBe(1); expect(response.event).toEqual({ user_id: previousSessionUserId, device_id: previousSessionDeviceId, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_id: 100, event_properties: { mode: 'test', '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); expect(document.cookie.includes('amp_')).toBe(false); scope.done(); }); test('should handle expired session and set with setSessionId', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; client.setSessionId(1); const response = await client.track('test event', { mode: 'test', }).promise; expect(response.event).toEqual({ user_id: previousSessionUserId, device_id: previousSessionDeviceId, session_id: 1, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_id: 100, event_properties: { mode: 'test', '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); expect(document.cookie.includes('amp_')).toBe(false); scope.done(); }); }); describe('default page view tracking', () => { test('should send page view on attribution', () => { let payload: any = undefined; const scope = nock(url) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); client.init(apiKey, 'user1@amplitude.com', { defaultTracking: { ...defaultTracking, attribution: true, pageViews: { trackOn: 'attribution', }, }, fetchRemoteConfig: false, }); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ { device_id: uuid, event_id: 0, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Page Counter': 1, '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: '[Amplitude] Page Viewed', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', user_properties: { $setOnce: { initial_dclid: 'EMPTY', initial_fbclid: 'EMPTY', initial_gbraid: 'EMPTY', initial_gclid: 'EMPTY', initial_ko_click_id: 'EMPTY', initial_li_fat_id: 'EMPTY', initial_msclkid: 'EMPTY', initial_referrer: 'EMPTY', initial_referring_domain: 'EMPTY', initial_rdt_cid: 'EMPTY', initial_ttclid: 'EMPTY', initial_twclid: 'EMPTY', initial_utm_campaign: 'EMPTY', initial_utm_content: 'EMPTY', initial_utm_id: 'EMPTY', initial_utm_medium: 'EMPTY', initial_utm_source: 'EMPTY', initial_utm_term: 'EMPTY', initial_wbraid: 'EMPTY', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_campaign: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', wbraid: '-', }, }, }, ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 2000); }); }); test('should send page view with and clear pageCounter in new session', () => { let payload: any = undefined; const scope = nock(url) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); const client = amplitude.createInstance(); client.init(apiKey, 'user1@amplitude.com', { defaultTracking: { ...defaultTracking, pageViews: true, }, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }); client.track('Event in first session'); const oldURL = new URL('https://www.example.com'); mockWindowLocationFromURL(oldURL); window.history.pushState(undefined, oldURL.href); const newURL = new URL('https://www.example.com/about'); mockWindowLocationFromURL(newURL); window.history.pushState(undefined, newURL.href); // Fire page view event in current session setTimeout(() => { const latestURL = new URL('https://www.example.com/contact'); mockWindowLocationFromURL(latestURL); window.history.pushState(undefined, latestURL.href); }, 500); // Fire page view event in new session setTimeout(() => { const anotherURL = new URL('https://www.example.com/more'); mockWindowLocationFromURL(anotherURL); window.history.pushState(undefined, anotherURL.href); }, 2000); return new Promise((resolve) => { setTimeout(() => { try { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ { device_id: uuid, event_id: 0, event_properties: { '[Amplitude] Page Domain': 'www.example.com', '[Amplitude] Page Location': 'https://www.example.com/about', '[Amplitude] Page Path': '/about', '[Amplitude] Page Title': '', '[Amplitude] Page URL': 'https://www.example.com/about', '[Amplitude] Page View ID': uuid, '[Amplitude] Page Counter': 1, '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: '[Amplitude] Page Viewed', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 1, event_type: 'Event in first session', event_properties: { '[Amplitude] Page Domain': 'www.example.com', '[Amplitude] Page Location': 'https://www.example.com/about', '[Amplitude] Page Path': '/about', '[Amplitude] Page Title': '', '[Amplitude] Page URL': 'https://www.example.com/about', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 2, event_properties: { '[Amplitude] Page Domain': 'www.example.com', '[Amplitude] Page Location': 'https://www.example.com/contact', '[Amplitude] Page Path': '/contact', '[Amplitude] Page Title': '', '[Amplitude] Page URL': 'https://www.example.com/contact', '[Amplitude] Page View ID': uuid, '[Amplitude] Previous Page Location': 'https://www.example.com/about', '[Amplitude] Previous Page Type': 'internal', '[Amplitude] Page Counter': 2, }, event_type: '[Amplitude] Page Viewed', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, { device_id: uuid, event_id: 3, event_properties: { '[Amplitude] Page Domain': 'www.example.com', '[Amplitude] Page Location': 'https://www.example.com/more', '[Amplitude] Page Path': '/more', '[Amplitude] Page Title': '', '[Amplitude] Page URL': 'https://www.example.com/more', '[Amplitude] Page Counter': 1, '[Amplitude] Page View ID': uuid, '[Amplitude] Previous Page Location': 'https://www.example.com/contact', '[Amplitude] Previous Page Type': 'internal', }, event_type: '[Amplitude] Page Viewed', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, ], options: { min_id_length: undefined, }, }); } finally { scope.done(); } resolve(); }, 4000); }); }); test('should send page view', () => { let payload: any = undefined; const scope = nock(url) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); client.init(apiKey, 'user1@amplitude.com', { defaultTracking: { ...defaultTracking, pageViews: true, }, fetchRemoteConfig: false, }); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ { device_id: uuid, event_id: 0, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Page View ID': uuid, '[Amplitude] Page Counter': 1, '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, event_type: '[Amplitude] Page Viewed', insert_id: uuid, ip: '$remote', language: 'en-US', library, partner_id: undefined, plan: undefined, platform: 'Web', session_id: number, time: number, user_agent: userAgent, user_id: 'user1@amplitude.com', }, ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 2000); }); }); }); describe('cookie migration', () => { const previousSessionId = Date.now(); // now minus 31 minutes const previousSessionLastEventTime = Date.now(); // now minus 31 minutes const previousSessionLastEventId = 99; const previousSessionDeviceId = 'deviceId'; const previousSessionUserId = 'userId'; beforeEach(() => { // setup expired previous session setLegacyCookie( apiKey, previousSessionDeviceId, previousSessionUserId, undefined, previousSessionId, previousSessionLastEventTime, previousSessionLastEventId, ); }); test('should use old cookies', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, fetchRemoteConfig: false, }).promise; const response = await client.track('test event', { mode: 'test', }).promise; expect(response.event).toEqual({ user_id: previousSessionUserId, device_id: previousSessionDeviceId, session_id: previousSessionId, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_id: 100, event_properties: { mode: 'test', '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); expect(document.cookie.includes('amp_')).toBe(false); scope.done(); }); test('should retain old cookies', async () => { const scope = nock(url).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, cookieOptions: { upgrade: false, }, fetchRemoteConfig: false, }).promise; const response = await client.track('test event', { mode: 'test', }).promise; expect(response.event).toEqual({ user_id: previousSessionUserId, device_id: previousSessionDeviceId, session_id: previousSessionId, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_id: 100, event_properties: { mode: 'test', '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); expect(document.cookie.includes('amp_')).toBe(true); scope.done(); }); }); describe('custom config', () => { describe('serverUrl', () => { test('should track event to custom serverUrl', async () => { const serverUrl = 'https://domain.com'; const scope = nock(serverUrl).post(path).reply(200, success); await client.init(apiKey, { defaultTracking, serverUrl: serverUrl + path, fetchRemoteConfig: false, }).promise; const response = await client.track('test event').promise; expect(response.event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_id: 0, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); }); }); describe('debug mode', () => { test('should enable debug mode for track', async () => { const scope = nock(url).post(path).reply(200, success); const logger = { disable: jest.fn(), enable: jest.fn(), debug: jest.fn(), log: jest.fn(), warn: jest.fn(), error: jest.fn(), }; await client.init(apiKey, { defaultTracking, loggerProvider: logger, logLevel: LogLevel.Debug, fetchRemoteConfig: false, }).promise; const response = await client.track('test event').promise; expect(response.event).toEqual({ user_id: undefined, device_id: uuid, session_id: number, time: number, platform: 'Web', language: 'en-US', ip: '$remote', insert_id: uuid, partner_id: undefined, event_type: 'test event', event_id: 0, event_properties: { '[Amplitude] Page Domain': '', '[Amplitude] Page Location': '', '[Amplitude] Page Path': '', '[Amplitude] Page Title': '', '[Amplitude] Page URL': '', '[Amplitude] Previous Page Location': '', '[Amplitude] Previous Page Type': 'direct', }, library: library, user_agent: userAgent, }); expect(response.code).toBe(200); expect(response.message).toBe(SUCCESS_MESSAGE); scope.done(); expect(logger.debug).toHaveBeenCalledTimes(6); /* eslint-disable */ const debugContext = JSON.parse(logger.debug.mock.calls[5]); expect(debugContext.type).toBeDefined(); expect(debugContext.name).toEqual('track'); expect(debugContext.args).toBeDefined(); expect(debugContext.stacktrace).toBeDefined(); expect(debugContext.time).toBeDefined(); expect(debugContext.states).toBeDefined(); /* eslint-enable */ }); test('should enable debug mode for setOptOut', async () => { const logger = { disable: jest.fn(), enable: jest.fn(), debug: jest.fn(), log: jest.fn(), warn: jest.fn(), error: jest.fn(), }; await client.init(apiKey, { defaultTracking, loggerProvider: logger, logLevel: LogLevel.Debug, fetchRemoteConfig: false, }).promise; client.setOptOut(true); expect(logger.debug).toHaveBeenCalledTimes(6); /* eslint-disable */ const debugContext = JSON.parse(logger.debug.mock.calls[5]); expect(debugContext.type).toBeDefined(); expect(debugContext.name).toEqual('setOptOut'); expect(debugContext.args).toBeDefined(); expect(debugContext.stacktrace).toBeDefined(); expect(debugContext.time).toBeDefined(); expect(debugContext.states).toBeDefined(); /* eslint-enable */ }); }); }); describe('browser cookie existence', () => { test('should create cookies', async () => { // intercept for attribution event and identify event const scope1 = nock(url).post(path).reply(200, success); // intercept for test event const scope2 = nock(url).post(path).reply(200, success); await client.init(apiKey, { identityStorage: 'cookie', fetchRemoteConfig: false, }).promise; await client.identify(new amplitude.Identify().set('a', 'b')).promise; await client.track('Test Event').promise; expect(document.cookie).toContain(`AMP_${apiKey.substring(0, 10)}`); expect(document.cookie).toContain(`AMP_MKTG_${apiKey.substring(0, 10)}`); scope1.done(); scope2.done(); }); test('should not create cookies', async () => { // intercept for attribution event and identify event const scope1 = nock(url).post(path).reply(200, success); // intercept for test event const scope2 = nock(url).post(path).reply(200, success); await client.init(apiKey, { identityStorage: 'localStorage', fetchRemoteConfig: false, }).promise; await client.identify(new amplitude.Identify().set('a', 'b')).promise; await client.track('Test Event').promise; expect(document.cookie).not.toContain(`AMP_${apiKey.substring(0, 10)}`); expect(document.cookie).not.toContain(`AMP_MKTG_${apiKey.substring(0, 10)}`); scope1.done(); scope2.done(); }); }); }); const setLegacyCookie = ( apiKey: string, deviceId?: string, userId?: string, optOut?: '1', sessionId?: number, lastEventTime?: number, eventId?: number, ) => { document.cookie = `amp_${apiKey.substring(0, 6)}=${[ deviceId, btoa(userId || ''), optOut, sessionId ? sessionId.toString(32) : '', lastEventTime ? lastEventTime.toString(32) : '', eventId ? eventId.toString(32) : '', ].join('.')}`; }; const mockWindowLocationFromURL = (url: URL) => { window.location.href = url.toString(); window.location.search = url.search; window.location.hostname = url.hostname; window.location.pathname = url.pathname; }; ================================================ FILE: packages/analytics-browser-test/test/responses.ts ================================================ export const success = { code: 200, events_ingested: 1, payload_size_bytes: 50, server_upload_time: 1396381378123, }; ================================================ FILE: packages/analytics-browser-test/test/setup.ts ================================================ import { TextEncoder } from 'util'; if (typeof global.TextEncoder === 'undefined') { (global as typeof global & { TextEncoder?: typeof TextEncoder }).TextEncoder = TextEncoder; } ================================================ FILE: packages/analytics-browser-test/test/web-attribution.test.ts ================================================ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import * as amplitude from '@amplitude/analytics-browser'; import { UUID } from '@amplitude/analytics-core'; import { default as nock } from 'nock'; import { path, url as httpEndPoint } from './constants'; import { success } from './responses'; import 'isomorphic-fetch'; import { generateEvent, generateAttributionEvent, generateSessionStartEvent, generateSessionEndEvent, generatePageViewEvent, navigateTo, } from './helpers'; describe('Web attribution', () => { const defaultTracking = { attribution: true, fileDownloads: false, formInteractions: false, pageViews: true, sessions: true, }; let apiKey = ''; let client = amplitude.createInstance(); const event_upload_time = '2023-01-01T12:00:00:000Z'; Date.prototype.toISOString = jest.fn(() => event_upload_time); beforeEach(() => { client = amplitude.createInstance(); apiKey = UUID(); }); describe('Page load', () => { describe('in a new session', () => { let eventId = -1; beforeEach(() => { eventId = -1; }); afterEach(() => { cleanup(); }); test('should track all UTMs and referrers', async () => { const referrer = 'https://www.google.com/'; const url = 'https://www.example.com?utm_source=test_utm_source'; navigateTo(url, referrer); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateAttributionEvent(++eventId, url, referrer), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url, previousPageUrl: referrer }, }), generatePageViewEvent(++eventId, 1, url, referrer, { withPageURLEnrichmentProperties: { previousPageUrl: referrer }, }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should track EMPTY campaign if no UTMs and no referrer', async () => { const url = 'https://www.example.com'; navigateTo(url); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateAttributionEvent(++eventId, url), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url } }), generatePageViewEvent(++eventId, 1, url, undefined, { withPageURLEnrichmentProperties: {}, }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should not track all UTMs and referrers if the referrer is excluded referrer', async () => { const referrer = 'https://www.google.com/'; const referrerDomain = 'www.google.com'; const url = 'https://www.example.com?utm_source=test_utm_source'; navigateTo(url, referrer); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking: { ...defaultTracking, attribution: { excludeReferrers: [referrerDomain], }, }, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url, previousPageUrl: referrer }, }), generatePageViewEvent(++eventId, 1, url, referrer, { withPageURLEnrichmentProperties: { previousPageUrl: referrer }, }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); }); describe('during a session', () => { let eventId = -1; beforeEach(() => { eventId = -1; }); afterEach(() => { cleanup(); }); test('should not fire campaign identify event for direct traffic', async () => { const url = 'https://www.example.com?utm_source=test_utm_source'; navigateTo(url); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; await new Promise((resolve) => setTimeout(resolve, 200)); // refresh during the session. const directUrl = 'https://www.example.com/home'; navigateTo(directUrl); await new Promise((resolve) => setTimeout(resolve, 100)); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateAttributionEvent(++eventId, url), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url } }), generatePageViewEvent(++eventId, 1, url, undefined, { withPageURLEnrichmentProperties: {}, }), generatePageViewEvent(++eventId, 2, directUrl, undefined, { withPageURLEnrichmentProperties: {}, // no referrer because the previous page prop relies on document.referrer for non-SPA sites }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should track all UTMs and referrers if any campaign changed and not direct traffic', async () => { const url = 'https://www.example.com?utm_source=test_utm_source'; navigateTo(url); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; await new Promise((resolve) => setTimeout(resolve, 200)); // mock refresh during the session with updated campaign change. const newCampaignURL = 'https://www.example.com/?utm_source=second_utm_source&utm_content=test_utm_content'; navigateTo(newCampaignURL); await new Promise((resolve) => setTimeout(resolve, 100)); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateAttributionEvent(++eventId, url), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url } }), generatePageViewEvent(++eventId, 1, url, undefined, { withPageURLEnrichmentProperties: {}, }), generateAttributionEvent(++eventId, newCampaignURL), generatePageViewEvent(++eventId, 2, newCampaignURL, undefined, { withPageURLEnrichmentProperties: {}, // no referrer because the previous page prop relies on document.referrer for non-SPA sites }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should start a new session with resetSessionCampaign enable and track campaign updates', async () => { const url = 'https://www.example.com?utm_source=test_utm_source'; navigateTo(url); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking: { ...defaultTracking, attribution: { resetSessionOnNewCampaign: true, }, }, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; await new Promise((resolve) => setTimeout(resolve, 100)); // refresh during the session. const directUrl = 'https://www.example.com/?utm_content=test_utm_content'; navigateTo(directUrl); // eslint-disable-next-line @typescript-eslint/no-misused-promises setTimeout(async () => { await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking: { ...defaultTracking, attribution: { resetSessionOnNewCampaign: true, }, }, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; }, 100); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateAttributionEvent(++eventId, url), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url } }), generatePageViewEvent(++eventId, 1, url, undefined, { withPageURLEnrichmentProperties: {}, }), generateSessionEndEvent(++eventId, { withPageURLEnrichmentProperties: { url: directUrl } }), // no referrer because the previous page prop relies on document.referrer for non-SPA sites generateAttributionEvent(++eventId, directUrl), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url: directUrl } }), // no referrer because the previous page prop relies on document.referrer for non-SPA sites generatePageViewEvent(++eventId, 1, directUrl, undefined, { withPageURLEnrichmentProperties: {}, }), // no referrer because the previous page prop relies on document.referrer for non-SPA sites ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); }); }); describe('process event', () => { describe('in a new session', () => { let eventId = -1; beforeEach(() => { eventId = -1; }); afterEach(() => { cleanup(); }); //The SPA won't reload the page when redirected. We don't track campaign updates without reinitializing the SDK (reloading the page) for now. test('Not track campaign change while processing any event', async () => { const url = 'https://www.example.com?utm_source=test_utm_source'; navigateTo(url); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; // update the url and fire the first event after session timeout const newCampaignURL = 'https://www.example.com?utm_source=second_utm_source&utm_content=test_utm_content'; setTimeout(() => { navigateTo(newCampaignURL); client.track('test event after session timeout'); }, 600); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateAttributionEvent(++eventId, url), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url } }), generatePageViewEvent(++eventId, 1, url, undefined, { withPageURLEnrichmentProperties: {}, }), generateSessionEndEvent(++eventId, { withPageURLEnrichmentProperties: { url: newCampaignURL } }), // no previous page url prop since there is no pushstate event or referrer generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url: newCampaignURL } }), // no previous page url prop since there is no pushstate event or referrer generateEvent(++eventId, 'test event after session timeout', { withPageURLEnrichmentProperties: { url: newCampaignURL }, // no previous page url prop since there is no pushstate event or referrer }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should not track UTMs and referrers if the referrer is excluded referrer', async () => { const referrer = 'https://www.google.com/'; const referring_domain = 'www.google.com'; const url = 'https://www.example.com?utm_source=test_utm_source'; navigateTo(url, referrer); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking: { ...defaultTracking, attribution: { excludeReferrers: [referring_domain], }, sessions: true, }, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; // update the url and fire the first event after session timeout const newCampaignURL = 'https://www.example.com?utm_source=second_utm_source&utm_content=test_utm_content'; setTimeout(() => { navigateTo(newCampaignURL); client.track('test event after session timeout'); }, 600); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url, previousPageUrl: referrer }, }), generatePageViewEvent(++eventId, 1, url, referrer, { withPageURLEnrichmentProperties: { previousPageUrl: referrer }, }), generateSessionEndEvent(++eventId, { withPageURLEnrichmentProperties: { url: newCampaignURL, previousPageUrl: referrer }, // referrer stays the same as it has not been changed or removed }), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url: newCampaignURL, previousPageUrl: referrer }, // referrer stays the same as it has not been changed or removed }), generateEvent(++eventId, 'test event after session timeout', { withPageURLEnrichmentProperties: { url: newCampaignURL, previousPageUrl: referrer }, // referrer stays the same as it has not been changed or removed }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); }); // Specific tests for an SPA. The SPA won't reload the page when redirected. We don't track campaign updates without reinitializing the SDK (reloading the page). describe('during a session', () => { let eventId = -1; beforeEach(() => { eventId = -1; }); afterEach(() => { cleanup(); }); test('should not track updated campaign', async () => { const url = 'https://www.example.com?utm_source=test_utm_source'; navigateTo(url); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; await new Promise((resolve) => setTimeout(resolve, 100)); // update the url and fire the first event during the same session without refreshing the page const newCampaignURL = 'https://www.example.com?utm_source=second_utm_source&utm_content=test_utm_content'; navigateTo(newCampaignURL); client.track('test event in the same session'); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateAttributionEvent(++eventId, url), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url } }), generatePageViewEvent(++eventId, 1, url, undefined, { withPageURLEnrichmentProperties: { previousPageUrl: '' }, // no previous page url prop since there is no pushstate event or referrer }), generateEvent(++eventId, 'test event in the same session', { withPageURLEnrichmentProperties: { url: newCampaignURL, previousPageUrl: '' }, // no previous page url prop since there is no pushstate event or referrer }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should not track campaign with resetSessionCampaign enable', async () => { const url = 'https://www.example.com?utm_source=test_utm_source'; navigateTo(url); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking: { ...defaultTracking, attribution: { resetSessionOnNewCampaign: true, }, sessions: true, }, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; await new Promise((resolve) => setTimeout(resolve, 100)); // refresh during the session. const directUrl = 'https://www.example.com/?utm_content=test_utm_content'; navigateTo(directUrl); client.track('test event in same session'); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateAttributionEvent(++eventId, url), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url } }), generatePageViewEvent(++eventId, 1, url, undefined, { withPageURLEnrichmentProperties: {}, }), generateEvent(++eventId, 'test event in same session', { withPageURLEnrichmentProperties: { url: directUrl, previousPageUrl: '' }, // no previous page url prop since there is no pushstate event or referrer }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); test('should not drop campaign without reinitializing the SDK after unsetting the referrer', async () => { const url = 'https://www.example.com?utm_source=test_utm_source'; const initReferrer = 'https://www.test.com/'; navigateTo(url, initReferrer); expect(document.referrer).toEqual(initReferrer); let payload: any = undefined; const scope = nock(httpEndPoint) .post(path, (body: Record) => { payload = body; return true; }) .reply(200, success); await client.init(apiKey, 'user1@amplitude.com', { deviceId: UUID(), defaultTracking, sessionTimeout: 500, flushIntervalMillis: 3000, fetchRemoteConfig: false, }).promise; await new Promise((resolve) => setTimeout(resolve, 100)); // Unset the referrer after first hit Object.defineProperty(document, 'referrer', { value: '', configurable: true }); expect(document.referrer).toEqual(''); // Update the url to drop all UTM to mock SPA redirect during the same session without refreshing the page // Fire page view event in current session const newURL = 'https://www.example.com'; navigateTo(newURL); window.history.pushState(undefined, newURL); return new Promise((resolve) => { setTimeout(() => { expect(payload).toEqual({ api_key: apiKey, client_upload_time: event_upload_time, events: [ generateAttributionEvent(++eventId, url, initReferrer), generateSessionStartEvent(++eventId, { withPageURLEnrichmentProperties: { url, previousPageUrl: initReferrer }, }), generatePageViewEvent(++eventId, 1, url, initReferrer, { withPageURLEnrichmentProperties: { previousPageUrl: initReferrer }, }), generatePageViewEvent(++eventId, 2, newURL, undefined, { withPageURLEnrichmentProperties: { previousPageUrl: url }, }), ], options: { min_id_length: undefined, }, }); scope.done(); resolve(); }, 4000); }); }); }); }); const cleanup = () => { // clean up cookies document.cookie = `amp_${apiKey.substring(0, 6)}=null; expires=1 Jan 1970 00:00:00 GMT`; document.cookie = `AMP_${apiKey.substring(0, 10)}=null; expires=1 Jan 1970 00:00:00 GMT`; document.cookie = `AMP_MKTG_${apiKey.substring(0, 10)}=null; expires=1 Jan 1970 00:00:00 GMT`; (window.location as any) = { hostname: '', href: '', pathname: '', search: '', }; Object.defineProperty(document, 'referrer', { value: '', configurable: true }); // clear url info in session storage from page url enrichment plugin window.sessionStorage.setItem('AMP_URL_INFO', '{}'); }; }); ================================================ FILE: packages/analytics-browser-test/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "include": ["test/**/*"], "compilerOptions": { "baseUrl": ".", "esModuleInterop": true, "lib": ["dom"], "noEmit": true, "rootDir": ".", } } ================================================ FILE: packages/analytics-client-common/CHANGELOG.md ================================================ # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.4.47](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.46...@amplitude/analytics-client-common@2.4.47) (2026-04-28) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.46](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.45...@amplitude/analytics-client-common@2.4.46) (2026-04-22) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.45](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.44...@amplitude/analytics-client-common@2.4.45) (2026-04-21) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.44](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.43...@amplitude/analytics-client-common@2.4.44) (2026-04-14) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.43](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.42...@amplitude/analytics-client-common@2.4.43) (2026-04-09) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.42](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.41...@amplitude/analytics-client-common@2.4.42) (2026-04-01) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.41](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.40...@amplitude/analytics-client-common@2.4.41) (2026-03-26) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.40](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.39...@amplitude/analytics-client-common@2.4.40) (2026-03-23) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.39](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.38...@amplitude/analytics-client-common@2.4.39) (2026-03-20) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.38](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.37...@amplitude/analytics-client-common@2.4.38) (2026-03-19) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.37](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.36...@amplitude/analytics-client-common@2.4.37) (2026-03-17) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.36](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.35...@amplitude/analytics-client-common@2.4.36) (2026-03-16) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.35](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.34...@amplitude/analytics-client-common@2.4.35) (2026-03-13) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.34](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.33...@amplitude/analytics-client-common@2.4.34) (2026-03-12) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.33](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.32...@amplitude/analytics-client-common@2.4.33) (2026-03-09) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.32](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.31...@amplitude/analytics-client-common@2.4.32) (2026-03-05) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.31](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.30...@amplitude/analytics-client-common@2.4.31) (2026-03-03) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.30](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.29...@amplitude/analytics-client-common@2.4.30) (2026-03-03) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.29](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.28...@amplitude/analytics-client-common@2.4.29) (2026-02-26) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.28](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.27...@amplitude/analytics-client-common@2.4.28) (2026-02-24) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.27](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.26...@amplitude/analytics-client-common@2.4.27) (2026-02-19) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.26](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.25...@amplitude/analytics-client-common@2.4.26) (2026-02-17) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.25](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.24...@amplitude/analytics-client-common@2.4.25) (2026-02-10) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.24](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.23...@amplitude/analytics-client-common@2.4.24) (2026-01-26) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.23](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.22...@amplitude/analytics-client-common@2.4.23) (2026-01-21) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.22](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.21...@amplitude/analytics-client-common@2.4.22) (2026-01-15) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.21](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.20...@amplitude/analytics-client-common@2.4.21) (2026-01-14) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.20](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.19...@amplitude/analytics-client-common@2.4.20) (2026-01-14) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.19](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.18...@amplitude/analytics-client-common@2.4.19) (2025-12-24) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.18](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.17...@amplitude/analytics-client-common@2.4.18) (2025-12-16) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.17](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.16...@amplitude/analytics-client-common@2.4.17) (2025-12-09) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.16](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.15...@amplitude/analytics-client-common@2.4.16) (2025-11-21) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.15](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.14...@amplitude/analytics-client-common@2.4.15) (2025-11-20) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.14](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.13...@amplitude/analytics-client-common@2.4.14) (2025-11-17) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.13](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.12...@amplitude/analytics-client-common@2.4.13) (2025-11-17) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.12](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.11...@amplitude/analytics-client-common@2.4.12) (2025-11-05) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.11](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.10...@amplitude/analytics-client-common@2.4.11) (2025-10-29) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.9...@amplitude/analytics-client-common@2.4.10) (2025-10-23) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.9](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.8...@amplitude/analytics-client-common@2.4.9) (2025-10-23) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.7...@amplitude/analytics-client-common@2.4.8) (2025-10-17) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.6...@amplitude/analytics-client-common@2.4.7) (2025-10-15) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.5...@amplitude/analytics-client-common@2.4.6) (2025-10-14) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.4...@amplitude/analytics-client-common@2.4.5) (2025-10-14) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.3...@amplitude/analytics-client-common@2.4.4) (2025-10-07) ### Bug Fixes * Revert "feat(analytics-client-common): refactor getPageTitle from aut… ([#1328](https://github.com/amplitude/Amplitude-TypeScript/issues/1328)) ([3976910](https://github.com/amplitude/Amplitude-TypeScript/commit/3976910d2e17a61f9f8e588a006cd44012f2f250)) ## [2.4.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.2...@amplitude/analytics-client-common@2.4.3) (2025-10-03) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.1...@amplitude/analytics-client-common@2.4.2) (2025-10-01) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.4.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.4.0...@amplitude/analytics-client-common@2.4.1) (2025-09-25) **Note:** Version bump only for package @amplitude/analytics-client-common # [2.4.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.42...@amplitude/analytics-client-common@2.4.0) (2025-09-23) ### Features * **analytics-client-common:** refactor getPageTitle from autocapture to make it reusable ([#1298](https://github.com/amplitude/Amplitude-TypeScript/issues/1298)) ([3c931ee](https://github.com/amplitude/Amplitude-TypeScript/commit/3c931eeb7bb4d2482523c48cf796113187d9b078)) ## [2.3.42](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.41...@amplitude/analytics-client-common@2.3.42) (2025-09-18) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.41](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.40...@amplitude/analytics-client-common@2.3.41) (2025-09-12) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.40](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.39...@amplitude/analytics-client-common@2.3.40) (2025-09-05) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.39](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.38...@amplitude/analytics-client-common@2.3.39) (2025-08-28) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.38](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.37...@amplitude/analytics-client-common@2.3.38) (2025-08-26) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.37](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.36...@amplitude/analytics-client-common@2.3.37) (2025-08-25) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.36](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.35...@amplitude/analytics-client-common@2.3.36) (2025-08-22) ### Bug Fixes * **analytics-core:** fix typo in Reddit click-id ([#1267](https://github.com/amplitude/Amplitude-TypeScript/issues/1267)) ([43e581d](https://github.com/amplitude/Amplitude-TypeScript/commit/43e581d6465546a38373f758f179eee103172755)) ## [2.3.35](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.34...@amplitude/analytics-client-common@2.3.35) (2025-08-21) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.34](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.33...@amplitude/analytics-client-common@2.3.34) (2025-08-13) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.33](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.32...@amplitude/analytics-client-common@2.3.33) (2025-08-08) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.32](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.31...@amplitude/analytics-client-common@2.3.32) (2025-08-05) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.31](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.30...@amplitude/analytics-client-common@2.3.31) (2025-07-29) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.30](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.29...@amplitude/analytics-client-common@2.3.30) (2025-07-17) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.29](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.28...@amplitude/analytics-client-common@2.3.29) (2025-07-15) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.28](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.27...@amplitude/analytics-client-common@2.3.28) (2025-07-08) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.27](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.26...@amplitude/analytics-client-common@2.3.27) (2025-06-30) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.26](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.25...@amplitude/analytics-client-common@2.3.26) (2025-06-26) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.25](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.24...@amplitude/analytics-client-common@2.3.25) (2025-06-25) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.24](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.23...@amplitude/analytics-client-common@2.3.24) (2025-06-11) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.23](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.22...@amplitude/analytics-client-common@2.3.23) (2025-06-03) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.22](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.21...@amplitude/analytics-client-common@2.3.22) (2025-05-27) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.21](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.20...@amplitude/analytics-client-common@2.3.21) (2025-05-13) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.20](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.19...@amplitude/analytics-client-common@2.3.20) (2025-05-05) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.19](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.18...@amplitude/analytics-client-common@2.3.19) (2025-05-02) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.18](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.17...@amplitude/analytics-client-common@2.3.18) (2025-05-02) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.17](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.16...@amplitude/analytics-client-common@2.3.17) (2025-04-22) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.16](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.15...@amplitude/analytics-client-common@2.3.16) (2025-04-17) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.15](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.14...@amplitude/analytics-client-common@2.3.15) (2025-04-15) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.14](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.13...@amplitude/analytics-client-common@2.3.14) (2025-04-10) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.13](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.12...@amplitude/analytics-client-common@2.3.13) (2025-04-07) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.12](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.11...@amplitude/analytics-client-common@2.3.12) (2025-04-02) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.11](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.10...@amplitude/analytics-client-common@2.3.11) (2025-03-24) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.9...@amplitude/analytics-client-common@2.3.10) (2025-03-21) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.9](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.8...@amplitude/analytics-client-common@2.3.9) (2025-03-14) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.7...@amplitude/analytics-client-common@2.3.8) (2025-02-28) ### Reverts * Revert "chore(release): publish" ([d392f62](https://github.com/amplitude/Amplitude-TypeScript/commit/d392f6290b8bb4dd955d6e6f20b00191679489c4)) ## [2.3.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.6...@amplitude/analytics-client-common@2.3.7) (2024-12-31) ### Bug Fixes * add comments in isNewCampaign() ([#941](https://github.com/amplitude/Amplitude-TypeScript/issues/941)) ([a14a68c](https://github.com/amplitude/Amplitude-TypeScript/commit/a14a68c65cea7a4bf8a842761ff7a81830e5d3ba)) ## [2.3.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.5...@amplitude/analytics-client-common@2.3.6) (2024-12-17) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.4...@amplitude/analytics-client-common@2.3.5) (2024-11-05) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.3...@amplitude/analytics-client-common@2.3.4) (2024-10-21) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.2...@amplitude/analytics-client-common@2.3.3) (2024-09-17) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.1...@amplitude/analytics-client-common@2.3.2) (2024-09-10) **Note:** Version bump only for package @amplitude/analytics-client-common ## [2.3.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.3.0...@amplitude/analytics-client-common@2.3.1) (2024-08-13) **Note:** Version bump only for package @amplitude/analytics-client-common # [2.3.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.2.4...@amplitude/analytics-client-common@2.3.0) (2024-08-02) ### Features * remote config ([#832](https://github.com/amplitude/Amplitude-TypeScript/issues/832)) ([c415f79](https://github.com/amplitude/Amplitude-TypeScript/commit/c415f792a98253ac60885eb1dc7e53b78ca47dcb)), closes [#769](https://github.com/amplitude/Amplitude-TypeScript/issues/769) [#772](https://github.com/amplitude/Amplitude-TypeScript/issues/772) [#780](https://github.com/amplitude/Amplitude-TypeScript/issues/780) [#782](https://github.com/amplitude/Amplitude-TypeScript/issues/782) [#811](https://github.com/amplitude/Amplitude-TypeScript/issues/811) [#828](https://github.com/amplitude/Amplitude-TypeScript/issues/828) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.2.3...@amplitude/analytics-client-common@2.2.4) (2024-06-24) ### Bug Fixes - **analytics-browser:** handle double URL encoded cookie values ([#790](https://github.com/amplitude/Amplitude-TypeScript/issues/790)) ([577c1a9](https://github.com/amplitude/Amplitude-TypeScript/commit/577c1a940cfe2d3b64590b09bf2cdb03cb961c3f)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.2.2...@amplitude/analytics-client-common@2.2.3) (2024-06-24) ### Bug Fixes - adding ampIntegrationsContext to getGlobalScope ([bd6f08c](https://github.com/amplitude/Amplitude-TypeScript/commit/bd6f08c10c9814e4f098c37810332c6881b4f424)) - checking for undefined and added tests ([4176f5f](https://github.com/amplitude/Amplitude-TypeScript/commit/4176f5f0571dbd535761f92c997fb825253807a5)) - fix reference error ([1af86fa](https://github.com/amplitude/Amplitude-TypeScript/commit/1af86fa8900d8755848d0dece9658cb1f136ed48)) - fixed minifing the global variable name ([09b733b](https://github.com/amplitude/Amplitude-TypeScript/commit/09b733bcb0dfcb4da2969c5332fdb9b24b060633)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.2.1...@amplitude/analytics-client-common@2.2.2) (2024-06-17) ### Bug Fixes - add cookie storage logs ([#778](https://github.com/amplitude/Amplitude-TypeScript/issues/778)) ([743b9c0](https://github.com/amplitude/Amplitude-TypeScript/commit/743b9c053ec4db4fc754da812534c329de4d1fff)) - response with non-json format ([#758](https://github.com/amplitude/Amplitude-TypeScript/issues/758)) ([3d234ca](https://github.com/amplitude/Amplitude-TypeScript/commit/3d234ca5a71bacf9ab7f82a115cb2010e94a3a33)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.2.0...@amplitude/analytics-client-common@2.2.1) (2024-05-24) ### Bug Fixes - success response with no body ([#755](https://github.com/amplitude/Amplitude-TypeScript/issues/755)) ([5d1eb72](https://github.com/amplitude/Amplitude-TypeScript/commit/5d1eb72bf9114acd884e709660eeedb0511ef4af)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.1.6...@amplitude/analytics-client-common@2.2.0) (2024-05-21) ### Features - support sessionId from url for cross domain tracking ([#753](https://github.com/amplitude/Amplitude-TypeScript/issues/753)) ([691d725](https://github.com/amplitude/Amplitude-TypeScript/commit/691d725131b5dfba497084fcf101a4e6e22bbd59)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.1.5...@amplitude/analytics-client-common@2.1.6) (2024-05-15) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.1.4...@amplitude/analytics-client-common@2.1.5) (2024-05-03) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.1.4-beta.0...@amplitude/analytics-client-common@2.1.4) (2024-04-29) ### Bug Fixes - add logic to escape campaign tracking for direct traffic in session ([#726](https://github.com/amplitude/Amplitude-TypeScript/issues/726)) ([c0c9a9d](https://github.com/amplitude/Amplitude-TypeScript/commit/c0c9a9d3fcd2a9d6dfe9e12d4a187cf2dba6424c)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.4-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.1.3...@amplitude/analytics-client-common@2.1.4-beta.0) (2024-04-19) ### Bug Fixes - fix web attribution identify and session start order ([#696](https://github.com/amplitude/Amplitude-TypeScript/issues/696)) ([2f077da](https://github.com/amplitude/Amplitude-TypeScript/commit/2f077da7b528ed6f23f7459b7c961c099dbcb1bb)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.1.3-beta.0...@amplitude/analytics-client-common@2.1.3) (2024-04-09) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.3-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.1.2...@amplitude/analytics-client-common@2.1.3-beta.0) (2024-03-28) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.1.1...@amplitude/analytics-client-common@2.1.2) (2024-03-23) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.1.0...@amplitude/analytics-client-common@2.1.1) (2024-03-12) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.1.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.11...@amplitude/analytics-client-common@2.1.0) (2024-02-23) ### Features - landing page improvement ([#667](https://github.com/amplitude/Amplitude-TypeScript/issues/667)) ([5f365f0](https://github.com/amplitude/Amplitude-TypeScript/commit/5f365f0b933ee890aee1d9ac083576f09b0defc3)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.11](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.10...@amplitude/analytics-client-common@2.0.11) (2024-01-24) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.9...@amplitude/analytics-client-common@2.0.10) (2023-12-20) ### Reverts - update attribution plugin to apply utm params to the `session_start` event ([#638](https://github.com/amplitude/Amplitude-TypeScript/issues/638)) ([c820279](https://github.com/amplitude/Amplitude-TypeScript/commit/c820279cbef2123d890beb7861d7edbbc3926f6e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.9](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.9-beta.0...@amplitude/analytics-client-common@2.0.9) (2023-12-01) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.9-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.8...@amplitude/analytics-client-common@2.0.9-beta.0) (2023-11-22) ### Bug Fixes - update attribution plugin to apply utm params to the `session_start` event ([#619](https://github.com/amplitude/Amplitude-TypeScript/issues/619)) ([bf45ca6](https://github.com/amplitude/Amplitude-TypeScript/commit/bf45ca6c17ac8d656cb6c5bb4f4fa19ff344ac85)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.7...@amplitude/analytics-client-common@2.0.8) (2023-11-16) ### Bug Fixes - npm latest tags ([#624](https://github.com/amplitude/Amplitude-TypeScript/issues/624)) ([76bf7a4](https://github.com/amplitude/Amplitude-TypeScript/commit/76bf7a4c871375649fac45d549b711ac52c16b0d)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.6...@amplitude/analytics-client-common@2.0.7) (2023-10-18) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.5...@amplitude/analytics-client-common@2.0.6) (2023-09-18) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.4...@amplitude/analytics-client-common@2.0.5) (2023-08-24) ### Bug Fixes - fix web attribution behavior for no referrer in the same session ([#554](https://github.com/amplitude/Amplitude-TypeScript/issues/554)) ([ed54eb2](https://github.com/amplitude/Amplitude-TypeScript/commit/ed54eb28810a3edb3326f82bdd7aed901ec9452f)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.3...@amplitude/analytics-client-common@2.0.4) (2023-07-03) ### Bug Fixes - handle concurrent cookie testing ([#465](https://github.com/amplitude/Amplitude-TypeScript/issues/465)) ([92bb7de](https://github.com/amplitude/Amplitude-TypeScript/commit/92bb7de48861438e987778390a66831191b15907)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.2...@amplitude/analytics-client-common@2.0.3) (2023-06-30) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.1...@amplitude/analytics-client-common@2.0.2) (2023-06-22) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.0...@amplitude/analytics-client-common@2.0.1) (2023-06-21) ### Bug Fixes - cookie-storage SSR incompatibility ([#445](https://github.com/amplitude/Amplitude-TypeScript/issues/445)) ([0086808](https://github.com/amplitude/Amplitude-TypeScript/commit/008680806d3cd34c3d6a1fd2b8cdb77806e37bff)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.0-beta.8...@amplitude/analytics-client-common@2.0.0) (2023-06-14) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.0-beta.7...@amplitude/analytics-client-common@2.0.0-beta.8) (2023-06-14) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.0-beta.6...@amplitude/analytics-client-common@2.0.0-beta.7) (2023-06-14) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.0-beta.5...@amplitude/analytics-client-common@2.0.0-beta.6) (2023-06-13) ### Features - add option for instance name ([#428](https://github.com/amplitude/Amplitude-TypeScript/issues/428)) ([1a8ff7d](https://github.com/amplitude/Amplitude-TypeScript/commit/1a8ff7d665d2a936db7cb42f4cde5350379b7cae)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.0-beta.4...@amplitude/analytics-client-common@2.0.0-beta.5) (2023-06-13) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.0-beta.3...@amplitude/analytics-client-common@2.0.0-beta.4) (2023-06-08) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.0-beta.2...@amplitude/analytics-client-common@2.0.0-beta.3) (2023-06-07) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@2.0.0-beta.1...@amplitude/analytics-client-common@2.0.0-beta.2) (2023-06-06) ### Bug Fixes - simplify plugins and eliminate enums ([#407](https://github.com/amplitude/Amplitude-TypeScript/issues/407)) ([890ec66](https://github.com/amplitude/Amplitude-TypeScript/commit/890ec6695a8b25cd6988e9f7ae584d4ba2835f67)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.7.0...@amplitude/analytics-client-common@2.0.0-beta.1) (2023-06-06) ### Features - allow cross subdomain excluded referrer ([#391](https://github.com/amplitude/Amplitude-TypeScript/issues/391)) ([f34f64b](https://github.com/amplitude/Amplitude-TypeScript/commit/f34f64b68bbd328da354afae61ca416d7055a734)) - make default event tracking enabled by default ([#386](https://github.com/amplitude/Amplitude-TypeScript/issues/386)) ([242f42d](https://github.com/amplitude/Amplitude-TypeScript/commit/242f42dd2e46eaec95c827795e04f74fba39c35f)) - simplify browser SDK options and plugin options interface ([#384](https://github.com/amplitude/Amplitude-TypeScript/issues/384)) ([b464cfb](https://github.com/amplitude/Amplitude-TypeScript/commit/b464cfb8e09d722bf06ed3c11955f77465a23daf)) - use server side user agent parser ([#382](https://github.com/amplitude/Amplitude-TypeScript/issues/382)) ([69bd255](https://github.com/amplitude/Amplitude-TypeScript/commit/69bd2558cb37d027064b6459cc2887c219196973)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [0.7.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.6.5...@amplitude/analytics-client-common@0.7.0) (2023-05-04) ### Features - add attribution tracking for linkedin click id li_fat_id ([ca81f3d](https://github.com/amplitude/Amplitude-TypeScript/commit/ca81f3d75ece7e0e23a1bc1b6889107d53a60a86)) - add rtd_cid for Reddit campaign tracking/attribution ([784e080](https://github.com/amplitude/Amplitude-TypeScript/commit/784e080aa129c37e850d7f34115beb9770044e4e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.6.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.6.4...@amplitude/analytics-client-common@0.6.5) (2023-04-27) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.6.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.6.3...@amplitude/analytics-client-common@0.6.4) (2023-04-25) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.6.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.6.2...@amplitude/analytics-client-common@0.6.3) (2023-04-06) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.6.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.6.1...@amplitude/analytics-client-common@0.6.2) (2023-03-31) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.6.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.6.1-beta.0...@amplitude/analytics-client-common@0.6.1) (2023-03-03) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.6.1-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.6.0...@amplitude/analytics-client-common@0.6.1-beta.0) (2023-03-03) ### Bug Fixes - push user id and device id changes to analytics connector ([#342](https://github.com/amplitude/Amplitude-TypeScript/issues/342)) ([3214b08](https://github.com/amplitude/Amplitude-TypeScript/commit/3214b0836eb03e39b5753b1e6be30e1c2f5770ca)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [0.6.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.6.0-beta.0...@amplitude/analytics-client-common@0.6.0) (2023-02-27) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [0.6.0-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.5.4...@amplitude/analytics-client-common@0.6.0-beta.0) (2023-02-24) ### Bug Fixes - consolidate web attribution and page view tracking plugins for marketing analytics use case ([c268997](https://github.com/amplitude/Amplitude-TypeScript/commit/c26899787611daeda7fca288e260bbc42a831130)) ### Features - allow custom page view event type ([#335](https://github.com/amplitude/Amplitude-TypeScript/issues/335)) ([0a4f8ed](https://github.com/amplitude/Amplitude-TypeScript/commit/0a4f8ede6e30ec3450ac0a468cf22b9266b0b23c)) - pass amplitude instance to plugin.setup for enhanced plugin capabilities ([#328](https://github.com/amplitude/Amplitude-TypeScript/issues/328)) ([91eeaa0](https://github.com/amplitude/Amplitude-TypeScript/commit/91eeaa0d6bff6bde39538bb54548a938df784462)) - retrofit web attribution and page view plugins to browser SDK ([#331](https://github.com/amplitude/Amplitude-TypeScript/issues/331)) ([ba845d3](https://github.com/amplitude/Amplitude-TypeScript/commit/ba845d3329bd6bebe3b89f24f4f316088c2d62b9)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.5.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.5.3...@amplitude/analytics-client-common@0.5.4) (2023-02-09) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.5.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.5.3-beta.0...@amplitude/analytics-client-common@0.5.3) (2023-01-31) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.5.3-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.5.2...@amplitude/analytics-client-common@0.5.3-beta.0) (2023-01-26) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.5.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.5.1...@amplitude/analytics-client-common@0.5.2) (2023-01-11) **Note:** Version bump only for package @amplitude/analytics-client-common # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.5.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.5.0...@amplitude/analytics-client-common@0.5.1) (2022-12-21) ### Bug Fixes - upgrade dependencies to resolve dependabot vulnerability alerts ([#299](https://github.com/amplitude/Amplitude-TypeScript/issues/299)) ([7dd1cd1](https://github.com/amplitude/Amplitude-TypeScript/commit/7dd1cd1b23a71981a4ad90b4b30cc9b7d28c4412)) ### Reverts - Revert "Updated dependencies" ([7ca9964](https://github.com/amplitude/Amplitude-TypeScript/commit/7ca9964781e4b900c6c027bdddf2ae1e7428ba18)) # [0.5.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.4.1...@amplitude/analytics-client-common@0.5.0) (2022-11-28) ### Features - add utm_id tracking ([#284](https://github.com/amplitude/Amplitude-TypeScript/issues/284)) ([f72dcf1](https://github.com/amplitude/Amplitude-TypeScript/commit/f72dcf1788ebc84544aaee1dc41b1d1ba6e4c06e)) - persisted event identifiers (React Native) ([#280](https://github.com/amplitude/Amplitude-TypeScript/issues/280)) ([bd35e73](https://github.com/amplitude/Amplitude-TypeScript/commit/bd35e73a0a08db6609938d27f00f54cbf77ff6c1)) ## [0.4.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.4.0...@amplitude/analytics-client-common@0.4.1) (2022-11-15) **Note:** Version bump only for package @amplitude/analytics-client-common # [0.4.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.3.5...@amplitude/analytics-client-common@0.4.0) (2022-11-01) ### Features - ignore subdomains when comparing newness of campaigns ([#260](https://github.com/amplitude/Amplitude-TypeScript/issues/260)) ([8bb2b76](https://github.com/amplitude/Amplitude-TypeScript/commit/8bb2b76faf37783a58e953391468bd31c089e3a3)) ## [0.3.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.3.4...@amplitude/analytics-client-common@0.3.5) (2022-11-01) **Note:** Version bump only for package @amplitude/analytics-client-common ## [0.3.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.3.3...@amplitude/analytics-client-common@0.3.4) (2022-10-26) ### Bug Fixes - adds optional chaining to window.location ([#258](https://github.com/amplitude/Amplitude-TypeScript/issues/258)) ([c30a1e0](https://github.com/amplitude/Amplitude-TypeScript/commit/c30a1e06feb632942a1697bda4948259ea0721a5)) ## [0.3.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.3.3-beta.1...@amplitude/analytics-client-common@0.3.3) (2022-10-25) **Note:** Version bump only for package @amplitude/analytics-client-common ## [0.3.3-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.3.3-beta.0...@amplitude/analytics-client-common@0.3.3-beta.1) (2022-10-25) ### Reverts - add logging around cookie storage ([#256](https://github.com/amplitude/Amplitude-TypeScript/issues/256)) ([12016e7](https://github.com/amplitude/Amplitude-TypeScript/commit/12016e7eddb7bec885883c0ebf1619fc447beb87)) ## [0.3.3-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.3.2...@amplitude/analytics-client-common@0.3.3-beta.0) (2022-10-25) ### Bug Fixes - add logging around cookie storage ([#255](https://github.com/amplitude/Amplitude-TypeScript/issues/255)) ([dee9d32](https://github.com/amplitude/Amplitude-TypeScript/commit/dee9d3299b90b71576a8c435c26a03c1dcabdae4)) ## [0.3.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.3.1...@amplitude/analytics-client-common@0.3.2) (2022-10-25) ### Bug Fixes - add safe check for global scope before loading SDK ([#252](https://github.com/amplitude/Amplitude-TypeScript/issues/252)) ([a3f4f6f](https://github.com/amplitude/Amplitude-TypeScript/commit/a3f4f6f7b11abd9cdbdf064e31e32d5fc3e92031)) - invoke pre-init track fns after attribution ([#253](https://github.com/amplitude/Amplitude-TypeScript/issues/253)) ([b8996d7](https://github.com/amplitude/Amplitude-TypeScript/commit/b8996d793f74d388c1a96e0cde5c0ac060c1e565)) ## [0.3.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.3.0...@amplitude/analytics-client-common@0.3.1) (2022-10-14) **Note:** Version bump only for package @amplitude/analytics-client-common # [0.3.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.2.4...@amplitude/analytics-client-common@0.3.0) (2022-10-04) ### Features - add gbraid and wbraid as campaign parameters ([#242](https://github.com/amplitude/Amplitude-TypeScript/issues/242)) ([514b7cd](https://github.com/amplitude/Amplitude-TypeScript/commit/514b7cdea9fee0c4e61479b087f7acdfea889350)) ## [0.2.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.2.3...@amplitude/analytics-client-common@0.2.4) (2022-09-30) ### Bug Fixes - resolve web attribution is not tracking the first direct/organic traffic ([#239](https://github.com/amplitude/Amplitude-TypeScript/issues/239)) ([98a3363](https://github.com/amplitude/Amplitude-TypeScript/commit/98a33633a7a6de7ee147c8cbf690e5546ce53163)) ## [0.2.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.2.2...@amplitude/analytics-client-common@0.2.3) (2022-09-30) ### Bug Fixes - cover the case when apiKey is missing in the runtime ([#240](https://github.com/amplitude/Amplitude-TypeScript/issues/240)) ([308bbe8](https://github.com/amplitude/Amplitude-TypeScript/commit/308bbe8337cbab366a0ca255f2d665101f4781a0)) ## [0.2.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.2.2-beta.1...@amplitude/analytics-client-common@0.2.2) (2022-09-28) **Note:** Version bump only for package @amplitude/analytics-client-common ## [0.2.2-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.2.2-beta.0...@amplitude/analytics-client-common@0.2.2-beta.1) (2022-09-27) ### Bug Fixes - define correct dependencies for @amplitude/analytics-connector ([#234](https://github.com/amplitude/Amplitude-TypeScript/issues/234)) ([41c1351](https://github.com/amplitude/Amplitude-TypeScript/commit/41c1351e441b890b016ba123c4ed5747a4c33adb)) ## [0.2.2-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.2.1...@amplitude/analytics-client-common@0.2.2-beta.0) (2022-09-26) **Note:** Version bump only for package @amplitude/analytics-client-common ## [0.2.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.2.0...@amplitude/analytics-client-common@0.2.1) (2022-09-26) ### Bug Fixes - update base config to include additional click ids ([#229](https://github.com/amplitude/Amplitude-TypeScript/issues/229)) ([5596931](https://github.com/amplitude/Amplitude-TypeScript/commit/55969310714c43f138e1702ba285fd4dadcdcb44)) # [0.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.1.0...@amplitude/analytics-client-common@0.2.0) (2022-09-22) ### Features - add campaign params to page view events ([#216](https://github.com/amplitude/Amplitude-TypeScript/issues/216)) ([c0f99b9](https://github.com/amplitude/Amplitude-TypeScript/commit/c0f99b98d0d2c24f6f9486312b568194c690a202)) # [0.1.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-client-common@0.0.1...@amplitude/analytics-client-common@0.1.0) (2022-09-16) ### Features - attl click id campaign params ([#220](https://github.com/amplitude/Amplitude-TypeScript/issues/220)) ([7598895](https://github.com/amplitude/Amplitude-TypeScript/commit/75988950d7d3a97d00e038ae368b311f0b314604)) ## 0.0.1 (2022-09-08) **Note:** Version bump only for package @amplitude/analytics-client-common ================================================ FILE: packages/analytics-client-common/jest.config.js ================================================ const baseConfig = require('../../jest.config.js'); const package = require('./package'); module.exports = { ...baseConfig, displayName: package.name, rootDir: '.', testEnvironment: 'jsdom', coveragePathIgnorePatterns: ['index.ts', 'global-scope.ts'], }; ================================================ FILE: packages/analytics-client-common/package.json ================================================ { "name": "@amplitude/analytics-client-common", "version": "2.4.47", "description": "", "author": "Amplitude Inc", "homepage": "https://github.com/amplitude/Amplitude-TypeScript", "license": "MIT", "main": "lib/cjs/index.js", "module": "lib/esm/index.js", "types": "lib/esm/index.d.ts", "sideEffects": false, "publishConfig": { "access": "public", "tag": "latest" }, "repository": { "type": "git", "url": "git+https://github.com/amplitude/Amplitude-TypeScript.git" }, "scripts": { "build": "pnpm build:es5 && pnpm build:esm", "build:es5": "tsc -p ./tsconfig.es5.json", "build:esm": "tsc -p ./tsconfig.esm.json", "watch": "tsc -p ./tsconfig.esm.json --watch", "clean": "rimraf node_modules lib coverage", "fix": "pnpm fix:eslint & pnpm fix:prettier", "fix:eslint": "eslint '{src,test}/**/*.ts' --fix", "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", "lint": "pnpm lint:eslint & pnpm lint:prettier", "lint:eslint": "eslint '{src,test}/**/*.ts'", "lint:prettier": "prettier --check \"{src,test}/**/*.ts\"", "test": "jest", "typecheck": "tsc -p ./tsconfig.json" }, "bugs": { "url": "https://github.com/amplitude/Amplitude-TypeScript/issues" }, "dependencies": { "@amplitude/analytics-connector": "^1.4.8", "@amplitude/analytics-core": "workspace:*", "@amplitude/analytics-types": "workspace:*", "tslib": "^2.4.1" }, "files": [ "lib" ] } ================================================ FILE: packages/analytics-client-common/src/analytics-connector.ts ================================================ import { AnalyticsConnector } from '@amplitude/analytics-connector'; export const getAnalyticsConnector = (instanceName = '$default_instance'): AnalyticsConnector => { return AnalyticsConnector.getInstance(instanceName); }; export const setConnectorUserId = (userId: string | undefined, instanceName?: string): void => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore getAnalyticsConnector(instanceName).identityStore.editIdentity().setUserId(userId).commit(); }; export const setConnectorDeviceId = (deviceId: string, instanceName?: string): void => { getAnalyticsConnector(instanceName).identityStore.editIdentity().setDeviceId(deviceId).commit(); }; ================================================ FILE: packages/analytics-client-common/src/attribution/campaign-parser.ts ================================================ import { getQueryParams } from '../query-params'; import { UTM_CAMPAIGN, UTM_CONTENT, UTM_MEDIUM, UTM_SOURCE, UTM_TERM, GCLID, FBCLID, BASE_CAMPAIGN, DCLID, MSCLKID, RDT_CID, TWCLID, TTCLID, KO_CLICK_ID, LI_FAT_ID, GBRAID, WBRAID, UTM_ID, } from './constants'; import { Campaign, CampaignParser as ICampaignParser, ClickIdParameters, ReferrerParameters, UTMParameters, } from '@amplitude/analytics-types'; export class CampaignParser implements ICampaignParser { async parse(): Promise { return { ...BASE_CAMPAIGN, ...this.getUtmParam(), ...this.getReferrer(), ...this.getClickIds(), } as Campaign; } getUtmParam(): UTMParameters { const params = getQueryParams(); const utmCampaign = params[UTM_CAMPAIGN]; const utmContent = params[UTM_CONTENT]; const utmId = params[UTM_ID]; const utmMedium = params[UTM_MEDIUM]; const utmSource = params[UTM_SOURCE]; const utmTerm = params[UTM_TERM]; return { utm_campaign: utmCampaign, utm_content: utmContent, utm_id: utmId, utm_medium: utmMedium, utm_source: utmSource, utm_term: utmTerm, }; } getReferrer(): ReferrerParameters { const data: ReferrerParameters = { referrer: undefined, referring_domain: undefined, }; try { data.referrer = document.referrer || undefined; data.referring_domain = data.referrer?.split('/')[2] ?? undefined; } catch { // nothing to track } return data; } getClickIds(): ClickIdParameters { const params = getQueryParams(); return { [DCLID]: params[DCLID], [FBCLID]: params[FBCLID], [GBRAID]: params[GBRAID], [GCLID]: params[GCLID], [KO_CLICK_ID]: params[KO_CLICK_ID], [LI_FAT_ID]: params[LI_FAT_ID], [MSCLKID]: params[MSCLKID], [RDT_CID]: params[RDT_CID], [TTCLID]: params[TTCLID], [TWCLID]: params[TWCLID], [WBRAID]: params[WBRAID], }; } } ================================================ FILE: packages/analytics-client-common/src/attribution/campaign-tracker.ts ================================================ import { createIdentifyEvent, Identify } from '@amplitude/analytics-core'; import { Storage, Campaign, CampaignParser as ICampaignParser, CampaignTracker as ICampaignTracker, CampaignTrackFunction, CampaignTrackerOptions, BaseEvent, } from '@amplitude/analytics-types'; import { getCookieName as getStorageKey } from '../cookie-name'; import { CampaignParser } from './campaign-parser'; import { BASE_CAMPAIGN, EMPTY_VALUE, MKTG } from './constants'; /** * @deprecated * Campaign tracker has mixed logic from built-in and plugin web attribution * features. Do not add more features here. The plan moving foward is to consolidate * logic in @amplitude/plugin-web-attribution-browser with backward compatibility. */ export class CampaignTracker implements ICampaignTracker { storage: Storage; storageKey: string; parser: ICampaignParser; track: CampaignTrackFunction; onNewCampaign: (campaign: Campaign) => unknown; disabled: boolean; trackNewCampaigns: boolean; trackPageViews: boolean; excludeReferrers: string[]; initialEmptyValue: string; constructor(apiKey: string, options: CampaignTrackerOptions) { this.storage = options.storage; this.storageKey = getStorageKey(apiKey, MKTG); this.parser = new CampaignParser(); this.track = options.track; this.onNewCampaign = options.onNewCampaign; this.disabled = Boolean(options.disabled); this.trackNewCampaigns = Boolean(options.trackNewCampaigns); this.trackPageViews = Boolean(options.trackPageViews); this.excludeReferrers = options.excludeReferrers ?? []; if (typeof location !== 'undefined') { this.excludeReferrers.unshift(location.hostname); } this.initialEmptyValue = options.initialEmptyValue ?? EMPTY_VALUE; } isNewCampaign(current: Campaign, previous: Campaign | undefined, ignoreSubdomainInReferrer = false) { const { referrer, referring_domain, ...currentCampaign } = current; const { referrer: _previous_referrer, referring_domain: prevReferringDomain, ...previousCampaign } = previous || {}; if (current.referring_domain && this.excludeReferrers.includes(current.referring_domain)) { return false; } const hasNewCampaign = JSON.stringify(currentCampaign) !== JSON.stringify(previousCampaign); const hasNewDomain = ignoreSubdomainInReferrer ? domainWithoutSubdomain(referring_domain || '') !== domainWithoutSubdomain(prevReferringDomain || '') : referring_domain !== prevReferringDomain; return !previous || hasNewCampaign || hasNewDomain; } async saveCampaignToStorage(campaign: Campaign): Promise { await this.storage.set(this.storageKey, campaign); } async getCampaignFromStorage(): Promise { return await this.storage.get(this.storageKey); } createCampaignEvent(campaign: Campaign) { const campaignParameters: Campaign = { // This object definition allows undefined keys to be iterated on // in .reduce() to build indentify object ...BASE_CAMPAIGN, ...campaign, }; const identifyEvent = Object.entries(campaignParameters).reduce((identify, [key, value]) => { identify.setOnce(`initial_${key}`, value || this.initialEmptyValue); if (value) { return identify.set(key, value); } return identify.unset(key); }, new Identify()); const pageViewEvent: BaseEvent = { event_type: 'Page View', event_properties: { page_title: /* istanbul ignore next */ (typeof document !== 'undefined' && document.title) || '', page_location: /* istanbul ignore next */ (typeof location !== 'undefined' && location.href) || '', page_path: /* istanbul ignore next */ (typeof location !== 'undefined' && location.pathname) || '', }, }; return { ...createIdentifyEvent(identifyEvent), ...(this.trackPageViews && pageViewEvent), }; } async send(isNewSession: boolean) { if (this.disabled) { return; } const currentCampaign = await this.parser.parse(); const previousCampaign = await this.getCampaignFromStorage(); if (!isNewSession) { if (!this.trackNewCampaigns || !this.isNewCampaign(currentCampaign, previousCampaign)) { return; } this.onNewCampaign(currentCampaign); } await this.track(this.createCampaignEvent(currentCampaign)); await this.saveCampaignToStorage(currentCampaign); } } const domainWithoutSubdomain = (domain: string) => { const parts = domain.split('.'); if (parts.length <= 2) { return domain; } return parts.slice(parts.length - 2, parts.length).join('.'); }; ================================================ FILE: packages/analytics-client-common/src/attribution/constants.ts ================================================ import { Campaign } from '@amplitude/analytics-types'; export const UTM_CAMPAIGN = 'utm_campaign'; export const UTM_CONTENT = 'utm_content'; export const UTM_ID = 'utm_id'; export const UTM_MEDIUM = 'utm_medium'; export const UTM_SOURCE = 'utm_source'; export const UTM_TERM = 'utm_term'; export const DCLID = 'dclid'; export const FBCLID = 'fbclid'; export const GBRAID = 'gbraid'; export const GCLID = 'gclid'; export const KO_CLICK_ID = 'ko_click_id'; export const LI_FAT_ID = 'li_fat_id'; export const MSCLKID = 'msclkid'; export const RDT_CID = 'rdt_cid'; export const TTCLID = 'ttclid'; export const TWCLID = 'twclid'; export const WBRAID = 'wbraid'; export const EMPTY_VALUE = 'EMPTY'; export const BASE_CAMPAIGN: Campaign = { utm_campaign: undefined, utm_content: undefined, utm_id: undefined, utm_medium: undefined, utm_source: undefined, utm_term: undefined, referrer: undefined, referring_domain: undefined, dclid: undefined, gbraid: undefined, gclid: undefined, fbclid: undefined, ko_click_id: undefined, li_fat_id: undefined, msclkid: undefined, rdt_cid: undefined, ttclid: undefined, twclid: undefined, wbraid: undefined, }; export const MKTG = 'MKTG'; ================================================ FILE: packages/analytics-client-common/src/attribution/helpers.ts ================================================ import { createIdentifyEvent, Identify } from '@amplitude/analytics-core'; import { Campaign, Logger } from '@amplitude/analytics-types'; import { BASE_CAMPAIGN } from './constants'; export interface Options { excludeReferrers?: (string | RegExp)[]; initialEmptyValue?: string; resetSessionOnNewCampaign?: boolean; } const domainWithoutSubdomain = (domain: string) => { const parts = domain.split('.'); if (parts.length <= 2) { return domain; } return parts.slice(parts.length - 2, parts.length).join('.'); }; //Direct traffic mean no external referral, no UTMs, no click-ids, and no other customer identified marketing campaign url params. const isDirectTraffic = (current: Campaign) => { return Object.values(current).every((value) => !value); }; export const isNewCampaign = ( current: Campaign, previous: Campaign | undefined, options: Options, logger: Logger, isNewSession = true, ) => { const { referrer, referring_domain, ...currentCampaign } = current; const { referrer: _previous_referrer, referring_domain: prevReferringDomain, ...previousCampaign } = previous || {}; if (isExcludedReferrer(options.excludeReferrers, current.referring_domain)) { // eslint-disable-next-line @typescript-eslint/restrict-template-expressions logger.debug(`This is not a new campaign because ${current.referring_domain} is in the exclude referrer list.`); return false; } //In the same session, direct traffic should not override or unset any persisting query params if (!isNewSession && isDirectTraffic(current) && previous) { logger.debug('This is not a new campaign because this is a direct traffic in the same session.'); return false; } const hasNewCampaign = JSON.stringify(currentCampaign) !== JSON.stringify(previousCampaign); const hasNewDomain = domainWithoutSubdomain(referring_domain || '') !== domainWithoutSubdomain(prevReferringDomain || ''); const result = !previous || hasNewCampaign || hasNewDomain; if (!result) { logger.debug("This is not a new campaign because it's the same as the previous one."); } else { logger.debug(`This is a new campaign. An $identify event will be sent.`); } return result; }; export const isExcludedReferrer = (excludeReferrers: (string | RegExp)[] = [], referringDomain = '') => { return excludeReferrers.some((value) => value instanceof RegExp ? value.test(referringDomain) : value === referringDomain, ); }; export const createCampaignEvent = (campaign: Campaign, options: Options) => { const campaignParameters: Campaign = { // This object definition allows undefined keys to be iterated on // in .reduce() to build indentify object ...BASE_CAMPAIGN, ...campaign, }; const identifyEvent = Object.entries(campaignParameters).reduce((identify, [key, value]) => { identify.setOnce(`initial_${key}`, value ?? options.initialEmptyValue ?? 'EMPTY'); if (value) { return identify.set(key, value); } return identify.unset(key); }, new Identify()); return createIdentifyEvent(identifyEvent); }; export const getDefaultExcludedReferrers = (cookieDomain: string | undefined) => { let domain = cookieDomain; if (domain) { if (domain.startsWith('.')) { domain = domain.substring(1); } return [new RegExp(`${domain.replace('.', '\\.')}$`)]; } return []; }; ================================================ FILE: packages/analytics-client-common/src/attribution/web-attribution.ts ================================================ import { BrowserConfig, Logger } from '@amplitude/analytics-types'; import { Campaign, Storage } from '@amplitude/analytics-types'; import { Options, getDefaultExcludedReferrers, createCampaignEvent, isNewCampaign } from './helpers'; import { getStorageKey } from '../storage/helpers'; import { CampaignParser } from './campaign-parser'; import { BASE_CAMPAIGN } from './constants'; import { isNewSession } from '../session'; export class WebAttribution { options: Options; storage: Storage; storageKey: string; previousCampaign?: Campaign; currentCampaign: Campaign; shouldTrackNewCampaign = false; sessionTimeout: number; lastEventTime?: number; logger: Logger; constructor(options: Options, config: BrowserConfig) { this.options = { initialEmptyValue: 'EMPTY', resetSessionOnNewCampaign: false, excludeReferrers: getDefaultExcludedReferrers(config.cookieOptions?.domain), ...options, }; this.storage = config.cookieStorage as unknown as Storage; this.storageKey = getStorageKey(config.apiKey, 'MKTG'); this.currentCampaign = BASE_CAMPAIGN; this.sessionTimeout = config.sessionTimeout; this.lastEventTime = config.lastEventTime; this.logger = config.loggerProvider; config.loggerProvider.log('Installing web attribution tracking.'); } async init() { [this.currentCampaign, this.previousCampaign] = await this.fetchCampaign(); const isEventInNewSession = !this.lastEventTime ? true : isNewSession(this.sessionTimeout, this.lastEventTime); if (isNewCampaign(this.currentCampaign, this.previousCampaign, this.options, this.logger, isEventInNewSession)) { this.shouldTrackNewCampaign = true; await this.storage.set(this.storageKey, this.currentCampaign); } } async fetchCampaign() { return await Promise.all([new CampaignParser().parse(), this.storage.get(this.storageKey)]); } /** * This can be called when enable web attribution and either * 1. set a new session * 2. has new campaign and enable resetSessionOnNewCampaign */ generateCampaignEvent(event_id?: number) { // Mark this campaign has been tracked this.shouldTrackNewCampaign = false; const campaignEvent = createCampaignEvent(this.currentCampaign, this.options); if (event_id) { campaignEvent.event_id = event_id; } return campaignEvent; } shouldSetSessionIdOnNewCampaign() { return this.shouldTrackNewCampaign && !!this.options.resetSessionOnNewCampaign; } } ================================================ FILE: packages/analytics-client-common/src/cookie-name.ts ================================================ import { AMPLITUDE_PREFIX } from '@amplitude/analytics-core'; export const getCookieName = (apiKey: string, postKey = '', limit = 10) => { return [AMPLITUDE_PREFIX, postKey, apiKey.substring(0, limit)].filter(Boolean).join('_'); }; export const getOldCookieName = (apiKey: string) => { return `${AMPLITUDE_PREFIX.toLowerCase()}_${apiKey.substring(0, 6)}`; }; ================================================ FILE: packages/analytics-client-common/src/default-tracking.ts ================================================ import { AttributionOptions, AutocaptureOptions, BrowserOptions, PageTrackingHistoryChanges, PageTrackingOptions, PageTrackingTrackOn, ElementInteractionsOptions, } from '@amplitude/analytics-types'; /** * Returns false if autocapture === false or if autocapture[event], * otherwise returns true */ const isTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined, event: keyof AutocaptureOptions) => { if (typeof autocapture === 'boolean') { return autocapture; } if (autocapture?.[event] === false) { return false; } return true; }; export const isAttributionTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'attribution'); export const isFileDownloadTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'fileDownloads'); export const isFormInteractionTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'formInteractions'); export const isPageViewTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'pageViews'); export const isSessionTrackingEnabled = (autocapture: AutocaptureOptions | boolean | undefined) => isTrackingEnabled(autocapture, 'sessions'); /** * Returns true if * 1. autocapture === true * 2. if autocapture.elementInteractions === true * 3. if autocapture.elementInteractions === object * otherwise returns false */ export const isElementInteractionsEnabled = (autocapture: AutocaptureOptions | boolean | undefined): boolean => { if (typeof autocapture === 'boolean') { return autocapture; } if ( typeof autocapture === 'object' && (autocapture.elementInteractions === true || typeof autocapture.elementInteractions === 'object') ) { return true; } return false; }; export const getElementInteractionsConfig = (config: BrowserOptions): ElementInteractionsOptions | undefined => { if ( isElementInteractionsEnabled(config.autocapture) && typeof config.autocapture === 'object' && typeof config.autocapture.elementInteractions === 'object' ) { return config.autocapture.elementInteractions; } return undefined; }; export const getPageViewTrackingConfig = (config: BrowserOptions): PageTrackingOptions => { let trackOn: PageTrackingTrackOn | undefined = () => false; let trackHistoryChanges: PageTrackingHistoryChanges | undefined = undefined; let eventType: string | undefined; const pageCounter = config.pageCounter; const isDefaultPageViewTrackingEnabled = isPageViewTrackingEnabled(config.defaultTracking); if (isDefaultPageViewTrackingEnabled) { trackOn = undefined; eventType = undefined; if ( config.defaultTracking && typeof config.defaultTracking === 'object' && config.defaultTracking.pageViews && typeof config.defaultTracking.pageViews === 'object' ) { if ('trackOn' in config.defaultTracking.pageViews) { trackOn = config.defaultTracking.pageViews.trackOn; } if ('trackHistoryChanges' in config.defaultTracking.pageViews) { trackHistoryChanges = config.defaultTracking.pageViews.trackHistoryChanges; } if ('eventType' in config.defaultTracking.pageViews && config.defaultTracking.pageViews.eventType) { eventType = config.defaultTracking.pageViews.eventType; } } } return { trackOn, trackHistoryChanges, eventType, pageCounter, }; }; export const getAttributionTrackingConfig = (config: BrowserOptions): AttributionOptions => { if ( isAttributionTrackingEnabled(config.defaultTracking) && config.defaultTracking && typeof config.defaultTracking === 'object' && config.defaultTracking.attribution && typeof config.defaultTracking.attribution === 'object' ) { return { ...config.defaultTracking.attribution, }; } return {}; }; ================================================ FILE: packages/analytics-client-common/src/global-scope.ts ================================================ /* eslint-disable no-restricted-globals */ /* Only file allowed to access to globalThis, window, self */ export const getGlobalScope = (): typeof globalThis | undefined => { // This should only be used for integrations with Amplitude that are not running in a browser environment // We need to specify the name of the global variable as a string to prevent it from being minified const ampIntegrationContextName = 'ampIntegrationContext' as keyof typeof globalThis; if (typeof globalThis !== 'undefined' && typeof globalThis[ampIntegrationContextName] !== 'undefined') { return globalThis[ampIntegrationContextName] as typeof globalThis; } if (typeof globalThis !== 'undefined') { return globalThis; } if (typeof window !== 'undefined') { return window; } if (typeof self !== 'undefined') { return self; } if (typeof global !== 'undefined') { return global; } return undefined; }; ================================================ FILE: packages/analytics-client-common/src/index.ts ================================================ export { CampaignParser } from './attribution/campaign-parser'; export { CampaignTracker } from './attribution/campaign-tracker'; export { Options, isNewCampaign, isExcludedReferrer, createCampaignEvent, getDefaultExcludedReferrers, } from './attribution/helpers'; export { WebAttribution } from './attribution/web-attribution'; export { BASE_CAMPAIGN } from './attribution/constants'; export { getQueryParams } from './query-params'; export { isNewSession } from './session'; export { getCookieName, getOldCookieName } from './cookie-name'; export { getStorageKey } from './storage/helpers'; export { CookieStorage } from './storage/cookie'; export { FetchTransport } from './transports/fetch'; export { getAnalyticsConnector, setConnectorDeviceId, setConnectorUserId } from './analytics-connector'; export { IdentityEventSender } from './plugins/identity'; export { getLanguage } from './language'; export { getGlobalScope } from './global-scope'; export { getPageViewTrackingConfig, getAttributionTrackingConfig, getElementInteractionsConfig, isAttributionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isPageViewTrackingEnabled, isSessionTrackingEnabled, isElementInteractionsEnabled, } from './default-tracking'; ================================================ FILE: packages/analytics-client-common/src/language.ts ================================================ export const getLanguage = (): string => { if (typeof navigator === 'undefined') return ''; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access const userLanguage = (navigator as any).userLanguage as string | undefined; return navigator.languages?.[0] ?? navigator.language ?? userLanguage ?? ''; }; ================================================ FILE: packages/analytics-client-common/src/plugins/identity.ts ================================================ import { BeforePlugin, Config, Event } from '@amplitude/analytics-types'; import { getAnalyticsConnector } from '../analytics-connector'; export class IdentityEventSender implements BeforePlugin { name = 'identity'; type = 'before' as const; identityStore = getAnalyticsConnector().identityStore; async execute(context: Event): Promise { const userProperties = context.user_properties as Record; if (userProperties) { this.identityStore.editIdentity().updateUserProperties(userProperties).commit(); } return context; } async setup(config: Config) { if (config.instanceName) { this.identityStore = getAnalyticsConnector(config.instanceName).identityStore; } } } ================================================ FILE: packages/analytics-client-common/src/query-params.ts ================================================ import { getGlobalScope } from './global-scope'; export const getQueryParams = (): Record => { const globalScope = getGlobalScope(); /* istanbul ignore if */ if (!globalScope?.location?.search) { return {}; } const pairs = globalScope.location.search.substring(1).split('&').filter(Boolean); const params = pairs.reduce>((acc, curr) => { const query = curr.split('=', 2); const key = tryDecodeURIComponent(query[0]); const value = tryDecodeURIComponent(query[1]); if (!value) { return acc; } acc[key] = value; return acc; }, {}); return params; }; export const tryDecodeURIComponent = (value = '') => { try { return decodeURIComponent(value); } catch { return ''; } }; ================================================ FILE: packages/analytics-client-common/src/session.ts ================================================ export const isNewSession = (sessionTimeout: number, lastEventTime: number = Date.now()): boolean => { const currentTime = Date.now(); const timeSinceLastEvent = currentTime - lastEventTime; return timeSinceLastEvent > sessionTimeout; }; ================================================ FILE: packages/analytics-client-common/src/storage/cookie.ts ================================================ import { Storage, CookieStorageOptions } from '@amplitude/analytics-types'; import { getGlobalScope } from '../global-scope'; export class CookieStorage implements Storage { options: CookieStorageOptions; private static testValue: undefined | string; constructor(options?: CookieStorageOptions) { this.options = { ...options }; } async isEnabled(): Promise { /* istanbul ignore if */ if (!getGlobalScope()) { return false; } CookieStorage.testValue = String(Date.now()); const testStrorage = new CookieStorage(this.options); const testKey = 'AMP_TEST'; try { await testStrorage.set(testKey, CookieStorage.testValue); const value = await testStrorage.get(testKey); return value === CookieStorage.testValue; } catch { /* istanbul ignore next */ return false; } finally { await testStrorage.remove(testKey); } } async get(key: string): Promise { const value = await this.getRaw(key); if (!value) { return undefined; } try { const decodedValue = decodeCookiesAsDefault(value) ?? decodeCookiesWithDoubleUrlEncoding(value); if (decodedValue === undefined) { console.error(`Amplitude Logger [Error]: Failed to decode cookie value for key: ${key}, value: ${value}`); return undefined; } // eslint-disable-next-line @typescript-eslint/no-unsafe-return return JSON.parse(decodedValue); } catch { console.error(`Amplitude Logger [Error]: Failed to parse cookie value for key: ${key}, value: ${value}`); return undefined; } } async getRaw(key: string): Promise { const globalScope = getGlobalScope(); const cookie = globalScope?.document?.cookie.split('; ') ?? []; const match = cookie.find((c) => c.indexOf(key + '=') === 0); if (!match) { return undefined; } return match.substring(key.length + 1); } async set(key: string, value: T | null): Promise { try { const expirationDays = this.options.expirationDays ?? 0; const expires = value !== null ? expirationDays : -1; let expireDate: Date | undefined = undefined; if (expires) { const date = new Date(); date.setTime(date.getTime() + expires * 24 * 60 * 60 * 1000); expireDate = date; } let str = `${key}=${btoa(encodeURIComponent(JSON.stringify(value)))}`; if (expireDate) { str += `; expires=${expireDate.toUTCString()}`; } str += '; path=/'; if (this.options.domain) { str += `; domain=${this.options.domain}`; } if (this.options.secure) { str += '; Secure'; } if (this.options.sameSite) { str += `; SameSite=${this.options.sameSite}`; } const globalScope = getGlobalScope(); if (globalScope) { globalScope.document.cookie = str; } } catch (error) { const errorMessage = error instanceof Error ? error.message : String(error); console.error(`Amplitude Logger [Error]: Failed to set cookie for key: ${key}. Error: ${errorMessage}`); } } async remove(key: string): Promise { await this.set(key, null); } async reset(): Promise { return; } } const decodeCookiesAsDefault = (value: string): string | undefined => { try { return decodeURIComponent(atob(value)); } catch { return undefined; } }; const decodeCookiesWithDoubleUrlEncoding = (value: string): string | undefined => { // Modern Ruby (v7+) automatically encodes cookies with URL encoding by // https://api.rubyonrails.org/classes/ActionDispatch/Cookies.html try { return decodeURIComponent(atob(decodeURIComponent(value))); } catch { return undefined; } }; ================================================ FILE: packages/analytics-client-common/src/storage/helpers.ts ================================================ import { AMPLITUDE_PREFIX } from '@amplitude/analytics-core'; export const getStorageKey = (apiKey: string, postKey = '', limit = 10) => { return [AMPLITUDE_PREFIX, postKey, apiKey.substring(0, limit)].filter(Boolean).join('_'); }; ================================================ FILE: packages/analytics-client-common/src/transports/fetch.ts ================================================ import { BaseTransport } from '@amplitude/analytics-core'; import { Payload, Response, Transport } from '@amplitude/analytics-types'; export class FetchTransport extends BaseTransport implements Transport { async send(serverUrl: string, payload: Payload): Promise { /* istanbul ignore if */ if (typeof fetch === 'undefined') { throw new Error('FetchTransport is not supported'); } const options: RequestInit = { headers: { 'Content-Type': 'application/json', Accept: '*/*', }, body: JSON.stringify(payload), method: 'POST', }; const response = await fetch(serverUrl, options); const responseText = await response.text(); try { // eslint-disable-next-line @typescript-eslint/no-unsafe-argument return this.buildResponse(JSON.parse(responseText)); } catch { return this.buildResponse({ code: response.status }); } } } ================================================ FILE: packages/analytics-client-common/src/types/global.ts ================================================ /* eslint-disable no-restricted-globals */ // eslint-disable-next-line no-var export var ampIntegrationContext: typeof globalThis; ================================================ FILE: packages/analytics-client-common/test/analytics-connector.test.ts ================================================ import { AnalyticsConnector } from '@amplitude/analytics-connector'; import { getAnalyticsConnector, setConnectorDeviceId, setConnectorUserId } from '../src/analytics-connector'; describe('analytics-connector', () => { describe('getAnalyticsConnector', () => { test('should return connector instance', () => { const instance = new AnalyticsConnector(); const getInstance = jest.spyOn(AnalyticsConnector, 'getInstance').mockReturnValueOnce(instance); expect(getAnalyticsConnector()).toBe(instance); expect(getInstance).toHaveBeenCalledTimes(1); }); }); describe('setConnectorUserId', () => { test('should return connector instance', () => { const commit = jest.fn(); const identityEditor = { setUserId: function () { return this; }, setDeviceId: function () { return this; }, setUserProperties: function () { return this; }, updateUserProperties: function () { return this; }, setOptOut: function () { return this; }, commit, }; const instance = new AnalyticsConnector(); jest.spyOn(instance.identityStore, 'editIdentity').mockReturnValueOnce(identityEditor); const getInstance = jest.spyOn(AnalyticsConnector, 'getInstance').mockReturnValueOnce(instance); expect(setConnectorUserId('123')).toBe(undefined); expect(getInstance).toHaveBeenCalledTimes(1); expect(commit).toHaveBeenCalledTimes(1); }); }); describe('setConnectorDeviceId', () => { test('should return connector instance', () => { const commit = jest.fn(); const identityEditor = { setUserId: function () { return this; }, setDeviceId: function () { return this; }, setUserProperties: function () { return this; }, updateUserProperties: function () { return this; }, setOptOut: function () { return this; }, commit, }; const instance = new AnalyticsConnector(); jest.spyOn(instance.identityStore, 'editIdentity').mockReturnValueOnce(identityEditor); const getInstance = jest.spyOn(AnalyticsConnector, 'getInstance').mockReturnValueOnce(instance); expect(setConnectorDeviceId('123')).toBe(undefined); expect(getInstance).toHaveBeenCalledTimes(1); expect(commit).toHaveBeenCalledTimes(1); }); }); }); ================================================ FILE: packages/analytics-client-common/test/attribution/campaign-parser.test.ts ================================================ import { BASE_CAMPAIGN } from '../../src/attribution/constants'; import { CampaignParser } from '../../src/attribution/campaign-parser'; import * as queryParams from '../../src/query-params'; beforeAll(() => { Object.defineProperty(window, 'location', { value: { hostname: '', href: '', pathname: '', search: '', }, writable: true, }); Object.defineProperty(document, 'referrer', { value: '', writable: true, }); }); describe('campaign-parser', () => { describe('parse', () => { test('should return parameters', async () => { const parser = new CampaignParser(); const referringDomain = 'https://google.com'; const search = '?utm_campaign=utm_campaign&gclid=123'; (document.referrer as any) = referringDomain; window.location.search = search; const campaign = await parser.parse(); expect(campaign).toEqual({ ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referrer: 'https://google.com', referring_domain: 'google.com', gclid: '123', }); }); }); describe('getUtmParam', () => { test('should return utm param from query params', async () => { const parser = new CampaignParser(); const getQueryParams = jest.spyOn(queryParams, 'getQueryParams'); window.location.search = '?utm_source=utm_source&utm_medium=utm_medium&utm_campaign=utm_campaign&utm_term=utm_term&utm_content=utm_content'; const utmParam = parser.getUtmParam(); expect(utmParam).toEqual({ utm_source: 'utm_source', utm_medium: 'utm_medium', utm_campaign: 'utm_campaign', utm_term: 'utm_term', utm_content: 'utm_content', }); expect(getQueryParams).toHaveBeenCalledTimes(1); }); }); describe('getReferrer', () => { afterEach(() => { Object.defineProperty(document, 'referrer', { value: '', writable: true, }); }); test('should return referrer info', () => { Object.defineProperty(document, 'referrer', { value: 'https://amplitude.com', writable: true, }); const parser = new CampaignParser(); const referrer = parser.getReferrer(); expect(referrer).toEqual({ referrer: 'https://amplitude.com', referring_domain: 'amplitude.com', }); }); test('should return not referrer info', () => { Object.defineProperty(document, 'referrer', { value: undefined, writable: true, }); const parser = new CampaignParser(); const referrer = parser.getReferrer(); expect(referrer).toEqual({}); }); }); describe('getGclid', () => { test('should return gclid data', () => { const parser = new CampaignParser(); jest.spyOn(queryParams, 'getQueryParams').mockReturnValueOnce({ gclid: 'hello google', fbclid: 'hello fb', }); const data = parser.getClickIds(); expect(data).toEqual({ gclid: 'hello google', fbclid: 'hello fb', }); }); test('should return empty data', () => { const parser = new CampaignParser(); jest.spyOn(queryParams, 'getQueryParams').mockReturnValueOnce({}); const data = parser.getClickIds(); expect(data).toEqual({}); }); }); }); ================================================ FILE: packages/analytics-client-common/test/attribution/campaign-tracker.test.ts ================================================ import { API_KEY } from '../helpers/constants'; import { CampaignTracker } from '../../src/attribution/campaign-tracker'; import { BASE_CAMPAIGN } from '../../src/attribution/constants'; import { MemoryStorage } from '@amplitude/analytics-core'; import { Campaign } from '@amplitude/analytics-types'; describe('CampaignTracker', () => { describe('isNewCampaign', () => { test('should return true for new campaign', () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), }; const campaignTracker = new CampaignTracker(API_KEY, config); const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }; expect(campaignTracker.isNewCampaign(currentCampaign, previousCampaign)).toBe(true); }); test('should return true for new referrer', () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), }; const campaignTracker = new CampaignTracker(API_KEY, config); const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'a', }; const currentCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'b', }; expect(campaignTracker.isNewCampaign(currentCampaign, previousCampaign)).toBe(true); }); test('should return false for excluded referrer', () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), excludeReferrers: ['a'], }; const campaignTracker = new CampaignTracker(API_KEY, config); const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'a', }; expect(campaignTracker.isNewCampaign(currentCampaign, previousCampaign)).toBe(false); }); test('should return true for undefined previous campaign', () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), excludeReferrers: ['a'], }; const campaignTracker = new CampaignTracker(API_KEY, config); const previousCampaign = undefined; const currentCampaign = { ...BASE_CAMPAIGN, }; expect(campaignTracker.isNewCampaign(currentCampaign, previousCampaign)).toBe(true); }); test('should return false for undefined previous campaign and excluded referrer', () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), excludeReferrers: ['a'], }; const campaignTracker = new CampaignTracker(API_KEY, config); const previousCampaign = undefined; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'a', }; expect(campaignTracker.isNewCampaign(currentCampaign, previousCampaign)).toBe(false); }); }); describe('saveCampaignToStorage', () => { test('should save campaign', async () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), }; const campaignTracker = new CampaignTracker(API_KEY, config); const set = jest.spyOn(campaignTracker.storage, 'set'); await campaignTracker.saveCampaignToStorage({ ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }); expect(set).toHaveBeenCalledTimes(1); }); }); describe('getCampaignFromStorage', () => { test('should get campaign', async () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), }; const campaignTracker = new CampaignTracker(API_KEY, config); const get = jest.spyOn(campaignTracker.storage, 'get'); expect(await campaignTracker.getCampaignFromStorage()).toEqual(undefined); expect(get).toHaveBeenCalledTimes(1); }); }); describe('createCampaignEvent', () => { test('should return event', () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), trackPageViews: true, }; const campaignTracker = new CampaignTracker(API_KEY, config); const campaignEvent = campaignTracker.createCampaignEvent({ ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }); expect(campaignEvent).toEqual({ event_type: 'Page View', event_properties: { page_location: 'http://localhost/', page_path: '/', page_title: '', }, user_id: undefined, user_properties: { $set: { utm_campaign: 'utm_campaign', }, $setOnce: { initial_dclid: 'EMPTY', initial_fbclid: 'EMPTY', initial_gbraid: 'EMPTY', initial_gclid: 'EMPTY', initial_ko_click_id: 'EMPTY', initial_li_fat_id: 'EMPTY', initial_msclkid: 'EMPTY', initial_wbraid: 'EMPTY', initial_referrer: 'EMPTY', initial_referring_domain: 'EMPTY', initial_rdt_cid: 'EMPTY', initial_ttclid: 'EMPTY', initial_twclid: 'EMPTY', initial_utm_campaign: 'utm_campaign', initial_utm_content: 'EMPTY', initial_utm_id: 'EMPTY', initial_utm_medium: 'EMPTY', initial_utm_source: 'EMPTY', initial_utm_term: 'EMPTY', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', wbraid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', }, }, }); }); test('should return event with custom empty value', () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), initialEmptyValue: '(none)', }; const campaignTracker = new CampaignTracker(API_KEY, config); const campaignEvent = campaignTracker.createCampaignEvent({ ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }); expect(campaignEvent).toEqual({ event_type: '$identify', user_id: undefined, user_properties: { $set: { utm_campaign: 'utm_campaign', }, $setOnce: { initial_dclid: '(none)', initial_fbclid: '(none)', initial_gbraid: '(none)', initial_gclid: '(none)', initial_ko_click_id: '(none)', initial_li_fat_id: '(none)', initial_msclkid: '(none)', initial_wbraid: '(none)', initial_referrer: '(none)', initial_referring_domain: '(none)', initial_rdt_cid: '(none)', initial_ttclid: '(none)', initial_twclid: '(none)', initial_utm_campaign: 'utm_campaign', initial_utm_content: '(none)', initial_utm_id: '(none)', initial_utm_medium: '(none)', initial_utm_source: '(none)', initial_utm_term: '(none)', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', wbraid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', }, }, }); }); }); describe('send', () => { test('should force track', async () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), }; const campaignTracker = new CampaignTracker(API_KEY, config); const track = jest.spyOn(campaignTracker, 'track').mockReturnValueOnce(Promise.resolve()); const saveCampaignToStorage = jest .spyOn(campaignTracker, 'saveCampaignToStorage') .mockResolvedValueOnce(undefined); await campaignTracker.send(true); expect(track).toHaveBeenCalledTimes(1); expect(saveCampaignToStorage).toHaveBeenCalledTimes(1); }); test('should disbale tracking', async () => { const config = { disabled: true, storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: jest.fn(), }; const campaignTracker = new CampaignTracker(API_KEY, config); const track = jest.spyOn(campaignTracker, 'track').mockReturnValueOnce(Promise.resolve()); const saveCampaignToStorage = jest .spyOn(campaignTracker, 'saveCampaignToStorage') .mockResolvedValueOnce(undefined); await campaignTracker.send(true); expect(track).toHaveBeenCalledTimes(0); expect(saveCampaignToStorage).toHaveBeenCalledTimes(0); }); test('should track new campaigns', async () => { const onNewCampaign = jest.fn(); const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign, trackNewCampaigns: true, }; const campaignTracker = new CampaignTracker(API_KEY, config); const isNewCampaign = jest.spyOn(campaignTracker, 'isNewCampaign').mockReturnValueOnce(true); const track = jest.spyOn(campaignTracker, 'track').mockReturnValueOnce(Promise.resolve()); const saveCampaignToStorage = jest .spyOn(campaignTracker, 'saveCampaignToStorage') .mockResolvedValueOnce(undefined); await campaignTracker.send(false); expect(onNewCampaign).toHaveBeenCalledTimes(1); expect(isNewCampaign).toHaveBeenCalledTimes(1); expect(track).toHaveBeenCalledTimes(1); expect(saveCampaignToStorage).toHaveBeenCalledTimes(1); }); test('should not track same campaigns', async () => { const onNewCampaign = jest.fn(); const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign, trackNewCampaigns: true, }; const campaignTracker = new CampaignTracker(API_KEY, config); const isNewCampaign = jest.spyOn(campaignTracker, 'isNewCampaign').mockReturnValueOnce(false); const track = jest.spyOn(campaignTracker, 'track').mockReturnValueOnce(Promise.resolve()); const saveCampaignToStorage = jest .spyOn(campaignTracker, 'saveCampaignToStorage') .mockResolvedValueOnce(undefined); await campaignTracker.send(false); expect(onNewCampaign).toHaveBeenCalledTimes(0); expect(isNewCampaign).toHaveBeenCalledTimes(1); expect(track).toHaveBeenCalledTimes(0); expect(saveCampaignToStorage).toHaveBeenCalledTimes(0); }); test('should not track new campaigns', async () => { const onNewCampaign = jest.fn(); const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign, trackNewCampaigns: false, }; const campaignTracker = new CampaignTracker(API_KEY, config); const track = jest.spyOn(campaignTracker, 'track').mockReturnValueOnce(Promise.resolve()); const saveCampaignToStorage = jest .spyOn(campaignTracker, 'saveCampaignToStorage') .mockResolvedValueOnce(undefined); await campaignTracker.send(false); expect(onNewCampaign).toHaveBeenCalledTimes(0); expect(track).toHaveBeenCalledTimes(0); expect(saveCampaignToStorage).toHaveBeenCalledTimes(0); }); }); describe('domain comparison without subdomains', () => { const cases = [ ['amplitude.com', 'www.amplitude.com', false] as const, ['google.com', 'amplitude.com', true] as const, ['', '', false] as const, ['www.amplitude.com', 'www.amplitude.com', false] as const, ['', 'www.amplitude.com', true] as const, ]; for (const [domain1, domain2, isNewCampaign] of cases) { test(`for "${domain1}" and "${domain2}", should track new campaign: ${isNewCampaign.toString()} `, () => { const config = { storage: new MemoryStorage(), track: jest.fn(), onNewCampaign: () => false, }; const campaignTracker = new CampaignTracker(API_KEY, config); const result = campaignTracker.isNewCampaign( { referring_domain: domain1 } as Campaign, { referring_domain: domain2 } as Campaign, true, ); expect(result).toBe(isNewCampaign); }); } }); }); ================================================ FILE: packages/analytics-client-common/test/attribution/helpers.test.ts ================================================ import { BASE_CAMPAIGN } from '../../src/attribution/constants'; import { isNewCampaign, createCampaignEvent, getDefaultExcludedReferrers, isExcludedReferrer, } from '../../src/attribution/helpers'; import { getStorageKey } from '../../src/storage/helpers'; const loggerProvider = { log: jest.fn(), debug: jest.fn(), warn: jest.fn(), error: jest.fn(), enable: jest.fn(), disable: jest.fn(), }; describe('getStorageKey', () => { test('should return storage key without explicit suffix and limit', () => { expect(getStorageKey('API_KEY')).toBe('AMP_API_KEY'); }); test('should return storage key', () => { expect(getStorageKey('API_KEY', 'MKTG', 3)).toBe('AMP_MKTG_API'); }); }); describe('isNewCampaign', () => { test('should return true for new campaign', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }; expect(isNewCampaign(currentCampaign, previousCampaign, {}, loggerProvider)).toBe(true); }); test('should return true for new referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'a.b.c.d', }; const currentCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'b.c.d.e', }; expect(isNewCampaign(currentCampaign, previousCampaign, {}, loggerProvider)).toBe(true); }); test('should return false for string excluded referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'amplitude.com', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: ['amplitude.com'], }, loggerProvider, ), ).toBe(false); }); test('should return false for regexp excluded referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'amplitude.com', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: getDefaultExcludedReferrers('.amplitude.com'), }, loggerProvider, ), ).toBe(false); }); test('should return false for cross subdomain regexp excluded referrer', () => { const previousCampaign = { ...BASE_CAMPAIGN, }; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'analytics.amplitude.com', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: getDefaultExcludedReferrers('.amplitude.com'), }, loggerProvider, ), ).toBe(false); }); test('should return true for undefined previous campaign', () => { const previousCampaign = undefined; const currentCampaign = { ...BASE_CAMPAIGN, }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: ['a'], }, loggerProvider, ), ).toBe(true); }); test('should return false for undefined previous campaign and excluded referrer', () => { const previousCampaign = undefined; const currentCampaign = { ...BASE_CAMPAIGN, referring_domain: 'a', }; expect( isNewCampaign( currentCampaign, previousCampaign, { excludeReferrers: ['a'], }, loggerProvider, ), ).toBe(false); }); test('should return false for no extra referrer with direct traffic in the same session', () => { const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'a.b.c.d', }; const currentCampaign = { ...BASE_CAMPAIGN, }; expect(isNewCampaign(currentCampaign, previousCampaign, {}, loggerProvider, false)).toBe(false); }); test('should return true for no referrer with any new campaign in the same session', () => { const previousCampaign = { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', referring_domain: 'a.b.c.d', }; const currentCampaign = { ...BASE_CAMPAIGN, utm_source: 'utm_source', }; expect(isNewCampaign(currentCampaign, previousCampaign, {}, loggerProvider, false)).toBe(true); }); }); describe('isExcludedReferrer', () => { test('should return true with string excluded referrer', () => { expect(isExcludedReferrer(['data.amplitude.com'], 'data.amplitude.com')).toEqual(true); }); test('should return true with regexp excluded referrer', () => { expect(isExcludedReferrer(getDefaultExcludedReferrers('.amplitude.com'), 'data.amplitude.com')).toEqual(true); }); }); describe('createCampaignEvent', () => { test('should return event', () => { const campaignEvent = createCampaignEvent( { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }, {}, ); expect(campaignEvent).toEqual({ event_type: '$identify', user_id: undefined, user_properties: { $set: { utm_campaign: 'utm_campaign', }, $setOnce: { initial_dclid: 'EMPTY', initial_fbclid: 'EMPTY', initial_gbraid: 'EMPTY', initial_gclid: 'EMPTY', initial_ko_click_id: 'EMPTY', initial_li_fat_id: 'EMPTY', initial_msclkid: 'EMPTY', initial_wbraid: 'EMPTY', initial_referrer: 'EMPTY', initial_referring_domain: 'EMPTY', initial_rdt_cid: 'EMPTY', initial_ttclid: 'EMPTY', initial_twclid: 'EMPTY', initial_utm_campaign: 'utm_campaign', initial_utm_content: 'EMPTY', initial_utm_id: 'EMPTY', initial_utm_medium: 'EMPTY', initial_utm_source: 'EMPTY', initial_utm_term: 'EMPTY', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', wbraid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', }, }, }); }); test('should return event with custom empty value', () => { const campaignEvent = createCampaignEvent( { ...BASE_CAMPAIGN, utm_campaign: 'utm_campaign', }, { initialEmptyValue: '(none)', }, ); expect(campaignEvent).toEqual({ event_type: '$identify', user_id: undefined, user_properties: { $set: { utm_campaign: 'utm_campaign', }, $setOnce: { initial_dclid: '(none)', initial_fbclid: '(none)', initial_gbraid: '(none)', initial_gclid: '(none)', initial_ko_click_id: '(none)', initial_li_fat_id: '(none)', initial_msclkid: '(none)', initial_wbraid: '(none)', initial_referrer: '(none)', initial_referring_domain: '(none)', initial_rdt_cid: '(none)', initial_ttclid: '(none)', initial_twclid: '(none)', initial_utm_campaign: 'utm_campaign', initial_utm_content: '(none)', initial_utm_id: '(none)', initial_utm_medium: '(none)', initial_utm_source: '(none)', initial_utm_term: '(none)', }, $unset: { dclid: '-', fbclid: '-', gbraid: '-', gclid: '-', ko_click_id: '-', li_fat_id: '-', msclkid: '-', wbraid: '-', referrer: '-', referring_domain: '-', rdt_cid: '-', ttclid: '-', twclid: '-', utm_content: '-', utm_id: '-', utm_medium: '-', utm_source: '-', utm_term: '-', }, }, }); }); }); describe('getDefaultExcludedReferrers', () => { test('should return empty array', () => { const excludedReferrers = getDefaultExcludedReferrers(undefined); expect(excludedReferrers).toEqual([]); }); test('should return array with regex 1', () => { const excludedReferrers = getDefaultExcludedReferrers('amplitude.com'); expect(excludedReferrers).toEqual([new RegExp('amplitude\\.com$')]); }); test('should return array with regex 2', () => { const excludedReferrers = getDefaultExcludedReferrers('.amplitude.com'); expect(excludedReferrers).toEqual([new RegExp('amplitude\\.com$')]); }); }); ================================================ FILE: packages/analytics-client-common/test/attribution/web-attribution.test.ts ================================================ import { Logger, UUID } from '@amplitude/analytics-core'; import { AttributionOptions, BrowserConfig, LogLevel } from '@amplitude/analytics-types'; import { BASE_CAMPAIGN } from '../../src/attribution/constants'; import { CampaignParser } from '../../src/attribution/campaign-parser'; import { WebAttribution } from '../../src/attribution/web-attribution'; import { FetchTransport } from '../../src/transports/fetch'; import { CookieStorage } from '../../src/storage/cookie'; describe('shouldTrackNewCampaign', () => { const mockConfig: BrowserConfig = { apiKey: UUID(), flushIntervalMillis: 0, flushMaxRetries: 0, flushQueueSize: 0, logLevel: LogLevel.None, loggerProvider: new Logger(), offline: false, optOut: false, serverUrl: undefined, transportProvider: new FetchTransport(), useBatch: false, cookieOptions: { domain: '.amplitude.com', expiration: 365, sameSite: 'Lax', secure: false, upgrade: true, }, cookieStorage: new CookieStorage(), sessionTimeout: 30 * 60 * 1000, trackingOptions: { ipAddress: true, language: true, platform: true, }, }; const option: AttributionOptions = {}; test('should track campaign with new campaign', async () => { const overrideMockConfig = { ...mockConfig, cookieOptions: undefined, }; const webAttribution = new WebAttribution(option, overrideMockConfig); jest.spyOn(CampaignParser.prototype, 'parse').mockResolvedValueOnce({ ...BASE_CAMPAIGN, utm_source: 'amp-test', }); jest.spyOn(webAttribution.storage, 'get').mockResolvedValueOnce({ ...BASE_CAMPAIGN, }); await webAttribution.init(); expect(webAttribution.shouldTrackNewCampaign).toBe(true); }); test('should not track campaign without new campaign', async () => { const overrideMockConfig = { ...mockConfig, cookieOptions: undefined, }; const emptyCampaign = { ...BASE_CAMPAIGN }; const webAttribution = new WebAttribution(option, overrideMockConfig); jest.spyOn(CampaignParser.prototype, 'parse').mockResolvedValue(emptyCampaign); jest.spyOn(webAttribution.storage, 'get').mockResolvedValue(emptyCampaign); await webAttribution.init(); expect(webAttribution.shouldTrackNewCampaign).toBe(false); }); test('should generate campaign event with given eventId', async () => { const webAttribution = new WebAttribution(option, mockConfig); const event_id = 1; const campaignEvent = webAttribution.generateCampaignEvent(event_id); expect(campaignEvent.event_id).toBe(event_id); }); test('should set session id on a new Campaign', async () => { const option = { resetSessionOnNewCampaign: true, }; const webAttribution = new WebAttribution(option, mockConfig); await webAttribution.init(); expect(webAttribution.shouldSetSessionIdOnNewCampaign()).toBe(true); }); test('should not set session id on a new Campaign', async () => { const option = { resetSessionOnNewCampaign: true, }; const webAttribution = new WebAttribution(option, mockConfig); await webAttribution.init(); webAttribution.generateCampaignEvent(); expect(webAttribution.shouldSetSessionIdOnNewCampaign()).toBe(false); }); test('should ignore the campaign for direct traffic in session', async () => { const lastEventTime = Date.now(); const overrideMockConfig = { ...mockConfig, // In session event lastEventTime, }; const webAttribution = new WebAttribution({}, overrideMockConfig); const previousCampaign = { ...BASE_CAMPAIGN, referrer: 'https://www.google.com', referring_domain: 'www.google.com', }; jest.spyOn(CampaignParser.prototype, 'parse').mockResolvedValue(BASE_CAMPAIGN); // Direct Traffic jest.spyOn(webAttribution.storage, 'get').mockResolvedValue(previousCampaign); await webAttribution.init(); expect(webAttribution.shouldTrackNewCampaign).toBe(false); }); test('should not ignore the campaign for direct traffic in new session', async () => { const lastEventTime = Date.now() - 2 * 30 * 60 * 1000; const overrideMockConfig = { ...mockConfig, // Out of session event lastEventTime, }; const webAttribution = new WebAttribution({}, overrideMockConfig); const previousCampaign = { ...BASE_CAMPAIGN, referrer: 'https://www.google.com', referring_domain: 'www.google.com', }; jest.spyOn(CampaignParser.prototype, 'parse').mockResolvedValue(BASE_CAMPAIGN); // Direct Traffic jest.spyOn(webAttribution.storage, 'get').mockResolvedValue(previousCampaign); await webAttribution.init(); expect(webAttribution.shouldTrackNewCampaign).toBe(true); }); }); ================================================ FILE: packages/analytics-client-common/test/cookie-name.test.ts ================================================ import { getCookieName, getOldCookieName } from '../src/cookie-name'; import { API_KEY } from './helpers/constants'; describe('cookie-name', () => { describe('getCookieName', () => { test('should return cookie name', () => { expect(getCookieName(API_KEY)).toBe('AMP_apiKey'); }); test('should handle apiKey is empty string', () => { expect(getCookieName('')).toBe('AMP'); }); }); describe('getOldCookieName', () => { test('should return cookie name', () => { expect(getOldCookieName(API_KEY)).toBe('amp_apiKey'); }); test('should handle apiKey is empty string', () => { expect(getOldCookieName('')).toBe('amp_'); }); }); }); ================================================ FILE: packages/analytics-client-common/test/default-tracking.test.ts ================================================ import { getAttributionTrackingConfig, getPageViewTrackingConfig, getElementInteractionsConfig, isAttributionTrackingEnabled, isFileDownloadTrackingEnabled, isFormInteractionTrackingEnabled, isPageViewTrackingEnabled, isSessionTrackingEnabled, isElementInteractionsEnabled, } from '../src/default-tracking'; describe('isFileDownloadTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isFileDownloadTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isFileDownloadTrackingEnabled(undefined)).toBe(true); }); test('should return false with false parameter', () => { expect(isFileDownloadTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isFileDownloadTrackingEnabled({ fileDownloads: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isFileDownloadTrackingEnabled({ fileDownloads: false, }), ).toBe(false); }); }); describe('isFormInteractionTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isFormInteractionTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isFormInteractionTrackingEnabled(undefined)).toBe(true); }); test('should return false with false parameter', () => { expect(isFormInteractionTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isFormInteractionTrackingEnabled({ formInteractions: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isFormInteractionTrackingEnabled({ formInteractions: false, }), ).toBe(false); }); }); describe('isPageViewTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isPageViewTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isPageViewTrackingEnabled(undefined)).toBe(true); }); test('should return true with false parameter', () => { expect(isPageViewTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isPageViewTrackingEnabled({ pageViews: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isPageViewTrackingEnabled({ pageViews: false, }), ).toBe(false); }); test('should return true with nested object parameter', () => { expect( isPageViewTrackingEnabled({ pageViews: {}, }), ).toBe(true); }); }); describe('isSessionTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isSessionTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isSessionTrackingEnabled(undefined)).toBe(true); }); test('should return false with false parameter', () => { expect(isSessionTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isSessionTrackingEnabled({ sessions: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isSessionTrackingEnabled({ sessions: false, }), ).toBe(false); }); }); describe('isAttributionTrackingEnabled', () => { test('should return true with true parameter', () => { expect(isAttributionTrackingEnabled(true)).toBe(true); }); test('should return true with undefined parameter', () => { expect(isAttributionTrackingEnabled(undefined)).toBe(true); }); test('should return false with false parameter', () => { expect(isAttributionTrackingEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isAttributionTrackingEnabled({ attribution: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isAttributionTrackingEnabled({ attribution: false, }), ).toBe(false); }); }); describe('isElementInteractionsEnabled', () => { test('should return true with true parameter', () => { expect(isElementInteractionsEnabled(true)).toBe(true); }); test('should return false with undefined parameter', () => { expect(isElementInteractionsEnabled(undefined)).toBe(false); }); test('should return false with false parameter', () => { expect(isElementInteractionsEnabled(false)).toBe(false); }); test('should return true with object parameter', () => { expect( isElementInteractionsEnabled({ elementInteractions: true, }), ).toBe(true); }); test('should return false with object parameter', () => { expect( isElementInteractionsEnabled({ elementInteractions: false, }), ).toBe(false); }); test('should return false with object parameter undefined', () => { expect( isElementInteractionsEnabled({ elementInteractions: undefined, }), ).toBe(false); }); }); describe('getPageViewTrackingConfig', () => { test('should return undefined trackOn config', () => { const config = getPageViewTrackingConfig({ defaultTracking: { pageViews: true, }, }); expect(config.trackOn).toBe(undefined); }); test('should return trackOn config returning false', () => { const config = getPageViewTrackingConfig({ defaultTracking: { pageViews: false, }, }); expect(typeof config.trackOn).toBe('function'); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore asserts that track on is a function that returns a boolean expect(config.trackOn()).toBe(false); }); test('should return advanced options', () => { const config = getPageViewTrackingConfig({ defaultTracking: { pageViews: { trackOn: 'attribution', trackHistoryChanges: 'all', eventType: 'Page View', }, }, }); expect(typeof config.trackOn).toBe('string'); expect(config.trackOn).toBe('attribution'); expect(config.trackHistoryChanges).toBe('all'); expect(config.eventType).toBe('Page View'); }); }); describe('getAttributionTrackingConfig', () => { test('should return disabled config', () => { const config = getAttributionTrackingConfig({ defaultTracking: { attribution: false, }, }); expect(config).toEqual({ excludeReferrers: undefined, initialEmptyValue: undefined, resetSessionOnNewCampaign: undefined, }); }); test('should return default config', () => { const config = getAttributionTrackingConfig({ defaultTracking: { attribution: {}, }, }); expect(config).toEqual({ excludeReferrers: undefined, initialEmptyValue: undefined, resetSessionOnNewCampaign: undefined, }); }); test('should return custom config', () => { const config = getAttributionTrackingConfig({ defaultTracking: { attribution: { excludeReferrers: [], initialEmptyValue: 'EMPTY', resetSessionOnNewCampaign: true, }, }, }); expect(config).toEqual({ excludeReferrers: [], initialEmptyValue: 'EMPTY', resetSessionOnNewCampaign: true, }); }); }); describe('getElementInteractionsConfig', () => { test('should return an empty object when autocapture is true', () => { const config = getElementInteractionsConfig({ autocapture: true, }); expect(config).toBeUndefined(); }); test('should return an empty object when userInteraction is true', () => { const config = getElementInteractionsConfig({ autocapture: { elementInteractions: true, }, }); expect(config).toBeUndefined(); }); test('should return advanced options', () => { const testCssSelectorAllowlist = ['button']; const testPageUrlAllowlist = ['example.com']; const mockedShouldTrackEventResolver = jest.fn(() => true); const testDataAttributePrefix = 'data-amp-track'; const config = getElementInteractionsConfig({ autocapture: { elementInteractions: { cssSelectorAllowlist: testCssSelectorAllowlist, pageUrlAllowlist: testPageUrlAllowlist, shouldTrackEventResolver: mockedShouldTrackEventResolver, dataAttributePrefix: testDataAttributePrefix, }, }, }); expect(config?.cssSelectorAllowlist).toBe(testCssSelectorAllowlist); expect(config?.pageUrlAllowlist).toBe(testPageUrlAllowlist); expect(config?.shouldTrackEventResolver).toBe(mockedShouldTrackEventResolver); expect(config?.dataAttributePrefix).toBe(testDataAttributePrefix); }); }); ================================================ FILE: packages/analytics-client-common/test/global-scope.test.ts ================================================ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ import { getGlobalScope } from '../src/global-scope'; describe('getGlobalScope', () => { let originalGlobalThis: any; beforeEach(() => { originalGlobalThis = globalThis; }); afterEach(() => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment globalThis = originalGlobalThis; delete (globalThis as any).ampIntegrationContext; }); test('returns ampIntegrationContext if it exists', () => { (globalThis as any).ampIntegrationContext = { someKey: 'someValue' }; expect(getGlobalScope()).toBe((globalThis as any).ampIntegrationContext); }); test('returns globalThis if ampIntegrationContext does not exist', () => { const scope = getGlobalScope(); // Need to use Object.is because expect(scope).toBe(globalThis) will throw an error expect(Object.is(scope, globalThis)).toBeTruthy(); }); test('should return window if globalThis is undefined and window is defined', () => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore globalThis = undefined; const scope = getGlobalScope(); // Note: We NEED to reassign globalThis to its original state because the jest expect function requires it // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment globalThis = originalGlobalThis; // Need to use Object.is because expect(scope).toBe(globalThis) will throw an error expect(Object.is(scope, window)).toBeTruthy(); }); }); ================================================ FILE: packages/analytics-client-common/test/helpers/constants.ts ================================================ export const API_KEY = 'apiKey'; ================================================ FILE: packages/analytics-client-common/test/language.test.ts ================================================ import { getLanguage } from '../src/language'; interface Navigator { language: string | undefined; languages: string[] | undefined; userLanguage: string | undefined; } describe('language', () => { // Simulates other browser version // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore const nav: Navigator = navigator; beforeAll(() => { Object.defineProperty(nav, 'userLanguage', { get: () => '', configurable: true, enumerable: true, }); }); afterAll(() => { if (nav.userLanguage) { delete nav.userLanguage; } }); test('should return a language', () => { enableNavigatorLanguageProperties(['languages', 'language', 'userLanguage']); expect(getLanguage()).not.toBeNull(); }); test('should prioritize the first language of navigator.languages', () => { enableNavigatorLanguageProperties(['languages', 'language', 'userLanguage']); expect(getLanguage()).toBe('some-locale'); }); test('should secondly use the language of navigator.language', () => { enableNavigatorLanguageProperties(['language', 'userLanguage']); expect(getLanguage()).toBe('some-second-locale'); }); test('should thirdly use the language of navigator.userLanguage', () => { enableNavigatorLanguageProperties(['userLanguage']); expect(getLanguage()).toBe('some-third-locale'); }); test('should return empty string if navigator language is not set', () => { enableNavigatorLanguageProperties([]); expect(getLanguage()).toBe(''); }); test('should return empty string if navigator is not set', () => { jest.spyOn(window as any, 'navigator', 'get').mockReturnValue(undefined); expect(getLanguage()).toBe(''); }); function enableNavigatorLanguageProperties(properties: Array<'languages' | 'language' | 'userLanguage'>) { jest .spyOn(nav, 'languages', 'get') .mockReturnValue(properties.includes('languages') ? ['some-locale', 'some-other-locale'] : undefined); jest .spyOn(nav, 'language', 'get') .mockReturnValue(properties.includes('language') ? 'some-second-locale' : undefined); jest .spyOn(nav, 'userLanguage', 'get') .mockReturnValue(properties.includes('userLanguage') ? 'some-third-locale' : undefined); } }); ================================================ FILE: packages/analytics-client-common/test/plugins/identity.test.ts ================================================ import { IdentityEventSender } from '../../src/plugins/identity'; import { Config } from '@amplitude/analytics-types'; import { getAnalyticsConnector } from '../../src/analytics-connector'; describe('identity', () => { describe('execute', () => { beforeEach(() => { getAnalyticsConnector().identityStore.setIdentity({ userProperties: {} }); }); test('should set identity in analytics connector on identify with default instance', async () => { const plugin = new IdentityEventSender(); await plugin.setup({} as Config); const event = { event_type: '$identify', user_properties: { $set: { k: 'v' }, }, }; const result = await plugin.execute(event); const identity = getAnalyticsConnector().identityStore.getIdentity(); expect(result).toEqual(event); expect(identity.userProperties).toEqual({ k: 'v' }); }); test('should set identity in analytics connector on identify with instance name', async () => { const plugin = new IdentityEventSender(); await plugin.setup({ instanceName: 'env', } as Config); const event = { event_type: '$identify', user_properties: { $set: { k: 'v' }, }, }; const result = await plugin.execute(event); const identity = getAnalyticsConnector('env').identityStore.getIdentity(); expect(result).toEqual(event); expect(identity.userProperties).toEqual({ k: 'v' }); }); test('should do nothing on track event', async () => { const plugin = new IdentityEventSender(); await plugin.setup({} as Config); const event = { event_type: 'test_track', }; const result = await plugin.execute(event); expect(result).toEqual(event); const emptyIdentity = { userProperties: {} }; const identity = getAnalyticsConnector().identityStore.getIdentity(); expect(identity).toEqual(emptyIdentity); }); }); }); ================================================ FILE: packages/analytics-client-common/test/query-params.test.ts ================================================ import { getQueryParams } from '../src/query-params'; import * as GlobalScopeModule from '../src/global-scope'; describe('query-params', () => { describe('getQueryParams', () => { beforeAll(() => { Object.defineProperty(window, 'location', { value: { search: '', writable: true, }, }); }); afterAll(() => { Object.defineProperty(window, 'location', { value: { search: '', writable: false, }, }); }); test('should parse query params', () => { window.location.search = '?a=1&b=2%20test&&c%24=hello&d'; const params = getQueryParams(); expect(params).toEqual({ a: '1', b: '2 test', c$: 'hello', }); }); test('should parse malformed uri', () => { window.location.search = '?fb=X+%EF%BF%BD%93+C'; const params = getQueryParams(); expect(params).toEqual({}); }); test('should handle undefined global scope', () => { jest.spyOn(GlobalScopeModule, 'getGlobalScope').mockReturnValueOnce(undefined); const params = getQueryParams(); expect(params).toEqual({}); }); }); }); ================================================ FILE: packages/analytics-client-common/test/session.test.ts ================================================ import { isNewSession } from '../src/session'; describe('session', () => { const sessionTimeout: number = 30 * 60 * 1000; test('should be in a same session for undefined lastEventTime', () => { const isEventInNewSession = isNewSession(sessionTimeout, undefined); expect(isEventInNewSession).toBe(false); }); test('should be a new session', () => { const lastEventTime = Date.now() - sessionTimeout * 2; const isEventInNewSession = isNewSession(sessionTimeout, lastEventTime); expect(isEventInNewSession).toBe(true); }); test('should be in a same session', () => { const lastEventTime = Date.now(); const isEventInNewSession = isNewSession(sessionTimeout, lastEventTime); expect(isEventInNewSession).toBe(false); }); }); ================================================ FILE: packages/analytics-client-common/test/storage/cookies.test.ts ================================================ import { CookieStorage } from '../../src/storage/cookie'; import * as GlobalScopeModule from '../../src/global-scope'; describe('cookies', () => { describe('isEnabled', () => { test('should return true', async () => { const cookies = new CookieStorage(); expect(await cookies.isEnabled()).toBe(true); }); }); describe('get', () => { test('should return undefined for no cookie value', async () => { const cookies = new CookieStorage(); expect(await cookies.get('hello')).toBe(undefined); }); test('should return non-encoded value', async () => { const cookies = new CookieStorage(); document.cookie = 'hello=world'; expect(await cookies.get('hello')).toBe(undefined); await cookies.remove('world'); }); test('should handle double url encoded value for Ruby Rails', async () => { const cookies = new CookieStorage(); const value = { a: 1 }; const cookieValue = encodeURIComponent(btoa(encodeURIComponent(JSON.stringify(value)))); document.cookie = `hello=${cookieValue}`; expect(await cookies.get('hello')).toEqual(value); await cookies.remove('world'); }); test('should return cookie object value', async () => { const cookies = new CookieStorage>(); await cookies.set('hello', { a: 1 }); expect(await cookies.get('hello')).toEqual({ a: 1 }); await cookies.remove('hello'); }); test('should catch non-json format value', async () => { const cookies = new CookieStorage(); const value = '{"a":1'; const encodedValue = btoa(encodeURIComponent(value)); document.cookie = `hello=${encodedValue}`; expect(await cookies.get('hello')).toBe(undefined); }); test('should return cookie array value', async () => { const cookies = new CookieStorage(); await cookies.set('hello', [1]); expect(await cookies.get('hello')).toEqual([1]); await cookies.remove('hello'); }); test('should return undefined when global scope is not defined', async () => { const cookies = new CookieStorage(); await cookies.set('hello', [1]); jest.spyOn(GlobalScopeModule, 'getGlobalScope').mockReturnValueOnce(undefined); expect(await cookies.get('hello')).toEqual(undefined); await cookies.remove('hello'); }); test('should return undefined when global scope is defined but document is not', async () => { const cookies = new CookieStorage(); await cookies.set('hello', [1]); jest.spyOn(GlobalScopeModule, 'getGlobalScope').mockReturnValueOnce({} as typeof globalThis); expect(await cookies.get('hello')).toEqual(undefined); await cookies.remove('hello'); }); }); describe('set', () => { test('should set cookie value', async () => { const cookies = new CookieStorage(); await cookies.set('hello', 'world'); expect(await cookies.get('hello')).toBe('world'); await cookies.remove('hello'); }); test('should set cookie value with options', async () => { const cookies = new CookieStorage({ expirationDays: 365, domain: '', secure: false, sameSite: 'Lax', }); await cookies.set('hello', 'world'); expect(await cookies.get('hello')).toBe('world'); await cookies.remove('hello'); }); test('should set restricted cookie value with options', async () => { const cookies = new CookieStorage({ expirationDays: 365, domain: '.amplitude.com', secure: true, sameSite: 'Lax', }); await cookies.set('hello', 'world'); expect(await cookies.get('hello')).toBe(undefined); await cookies.remove('hello'); }); test.each([new Error('Simulated error'), 'Simulated error'])( 'logs an error message when setting a cookie fails', async (error) => { console.error = jest.fn(); jest.spyOn(global, 'btoa').mockImplementation(() => { throw error; }); const cookies = new CookieStorage(); await cookies.set('hello', 'world'); expect(console.error).toHaveBeenCalledWith( expect.stringContaining( `Amplitude Logger [Error]: Failed to set cookie for key: hello. Error: Simulated error`, ), ); jest.restoreAllMocks(); }, ); }); describe('remove', () => { test('should call set', async () => { const cookies = new CookieStorage(); const set = jest.spyOn(cookies, 'set'); await cookies.remove('key'); expect(set).toHaveBeenCalledTimes(1); }); }); describe('reset', () => { test('should return undefined', async () => { const cookies = new CookieStorage(); expect(await cookies.reset()).toBe(undefined); }); }); }); ================================================ FILE: packages/analytics-client-common/test/transports/fetch.test.ts ================================================ import { FetchTransport } from '../../src/transports/fetch'; import { Status } from '@amplitude/analytics-types'; import 'isomorphic-fetch'; describe('fetch', () => { describe('send', () => { test.each([ ['{}'], // ideally response body should be json format to an application/json request [''], // test the edge case where response body is non-json format ['<'], ])('should resolve with response', async (body) => { const transport = new FetchTransport(); const url = 'http://localhost:3000'; const payload = { api_key: '', events: [], }; const result = { statusCode: 200, status: Status.Success as const, body: { eventsIngested: 0, payloadSizeBytes: 0, serverUploadTime: 0, }, }; jest.spyOn(window, 'fetch').mockReturnValueOnce(Promise.resolve(new Response(body))); jest.spyOn(transport, 'buildResponse').mockReturnValueOnce(result); const response = await transport.send(url, payload); expect(response).toEqual(result); }); }); }); ================================================ FILE: packages/analytics-client-common/tsconfig.es5.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "module": "commonjs", "noEmit": false, "outDir": "lib/cjs", "rootDir": "./src" } } ================================================ FILE: packages/analytics-client-common/tsconfig.esm.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "module": "es6", "noEmit": false, "outDir": "lib/esm", "rootDir": "./src" } } ================================================ FILE: packages/analytics-client-common/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "include": ["src/**/*", "test/**/*"], "compilerOptions": { "baseUrl": ".", "esModuleInterop": true, "lib": ["dom"], "noEmit": true, "rootDir": ".", } } ================================================ FILE: packages/analytics-core/CHANGELOG.md ================================================ # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.48.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.48.0...@amplitude/analytics-core@2.48.1) (2026-05-05) ### Bug Fixes * **analytics-browser:** make autocapture opt-in within Chrome Extension ([#1710](https://github.com/amplitude/Amplitude-TypeScript/issues/1710)) ([de5ff6e](https://github.com/amplitude/Amplitude-TypeScript/commit/de5ff6e4fc9bfcf5d880fb291c796614ef86cc59)) * **analytics-core:** close TOCTOU race in Timeline.register() ([#1702](https://github.com/amplitude/Amplitude-TypeScript/issues/1702)) ([3c399a5](https://github.com/amplitude/Amplitude-TypeScript/commit/3c399a5770097e657dafb7394023b4518076eca5)) # [2.48.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.47.1...@amplitude/analytics-core@2.48.0) (2026-04-28) ### Features * remove experimental request body compression backdoor ([#1699](https://github.com/amplitude/Amplitude-TypeScript/issues/1699)) ([98ecb9d](https://github.com/amplitude/Amplitude-TypeScript/commit/98ecb9dc1f3658cf6d0dfae1e9784335c9d33b5e)) ## [2.47.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.47.0...@amplitude/analytics-core@2.47.1) (2026-04-22) ### Bug Fixes * **analytics-browser:** replace "blocklist" with "excludelist" in networkTracking ([#1692](https://github.com/amplitude/Amplitude-TypeScript/issues/1692)) ([f84374e](https://github.com/amplitude/Amplitude-TypeScript/commit/f84374eb0a4754e9fedfec0fbb9694531ba021e9)) # [2.47.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.46.0...@amplitude/analytics-core@2.47.0) (2026-04-21) ### Features * add long task tracking ([#1622](https://github.com/amplitude/Amplitude-TypeScript/issues/1622)) ([d995e1f](https://github.com/amplitude/Amplitude-TypeScript/commit/d995e1f2c098441808d65f6c171e171587e37ac2)) # [2.46.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.45.0...@amplitude/analytics-core@2.46.0) (2026-04-14) ### Features * **analytics-browser:** event property attribution ([#1628](https://github.com/amplitude/Amplitude-TypeScript/issues/1628)) ([6d37e79](https://github.com/amplitude/Amplitude-TypeScript/commit/6d37e797976e0e77dc11046b9259eb4b80259996)) * **analytics-browser:** make "attribution.excludeInternalReferrers" GA ([#1660](https://github.com/amplitude/Amplitude-TypeScript/issues/1660)) ([72bcc33](https://github.com/amplitude/Amplitude-TypeScript/commit/72bcc335ad78c54512d26c0e359ae0c47611fd30)) * **analytics-browser:** make errorClicks and thrashedCursor GA ([#1658](https://github.com/amplitude/Amplitude-TypeScript/issues/1658)) ([bfd0b9f](https://github.com/amplitude/Amplitude-TypeScript/commit/bfd0b9fbe9f0b7f954b20012ecc448afd3535be5)) # [2.45.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.44.1...@amplitude/analytics-core@2.45.0) (2026-04-09) ### Features * **analytics-browser:** [experimental] add video tracking function ([#1652](https://github.com/amplitude/Amplitude-TypeScript/issues/1652)) ([3af90e2](https://github.com/amplitude/Amplitude-TypeScript/commit/3af90e2f662d9ed82c56a506c8d2ef6d5da85bd8)) ## [2.44.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.44.0...@amplitude/analytics-core@2.44.1) (2026-04-01) **Note:** Version bump only for package @amplitude/analytics-core # [2.44.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.43.1...@amplitude/analytics-core@2.44.0) (2026-03-26) ### Features * **autocapture:** add viewportContentUpdated support to remote config ([#1621](https://github.com/amplitude/Amplitude-TypeScript/issues/1621)) ([f40b150](https://github.com/amplitude/Amplitude-TypeScript/commit/f40b150ddb44da9c69bc97da69f9ba003d1eb7d6)) ## [2.43.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.43.0...@amplitude/analytics-core@2.43.1) (2026-03-23) **Note:** Version bump only for package @amplitude/analytics-core # [2.43.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.42.0...@amplitude/analytics-core@2.43.0) (2026-03-20) ### Bug Fixes * **analytics-browser:** double thrashed cursor threshold ([#1604](https://github.com/amplitude/Amplitude-TypeScript/issues/1604)) ([32cb4b6](https://github.com/amplitude/Amplitude-TypeScript/commit/32cb4b63ddce39dc6b68d3ae3b3798b0ae73ccd4)) * **analytics-core:** network request event circular dependency ([#1606](https://github.com/amplitude/Amplitude-TypeScript/issues/1606)) ([12ef222](https://github.com/amplitude/Amplitude-TypeScript/commit/12ef222ee990188f5700a8dd27d31cabd36f0ffc)) ### Features * **plugin-custom-enrichment:** add custom enrichment plugin ([#1339](https://github.com/amplitude/Amplitude-TypeScript/issues/1339)) ([b236190](https://github.com/amplitude/Amplitude-TypeScript/commit/b236190fa30d0e4325c37b8896824e11f980e20c)) * **plugin-custom-enrichment:** add plugin based on remote config settings ([#1586](https://github.com/amplitude/Amplitude-TypeScript/issues/1586)) ([617ebfe](https://github.com/amplitude/Amplitude-TypeScript/commit/617ebfe7aaee04b0aef3db09b48ed11bad9a6ca3)) # [2.42.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.41.7...@amplitude/analytics-core@2.42.0) (2026-03-19) ### Bug Fixes * **analytics-core:** filter invalid event properties instead of rejecting whole object ([#1598](https://github.com/amplitude/Amplitude-TypeScript/issues/1598)) ([882db5c](https://github.com/amplitude/Amplitude-TypeScript/commit/882db5c6361c6279fd4b487b5ce681263e18d35f)) * **analytics-core:** treat 403 as invalid API key in remote config client ([#1603](https://github.com/amplitude/Amplitude-TypeScript/issues/1603)) ([1c70064](https://github.com/amplitude/Amplitude-TypeScript/commit/1c70064e347219b5c8f6283d05c6e609580140e5)) ### Features * **autocapture:** zoning beta ([#1589](https://github.com/amplitude/Amplitude-TypeScript/issues/1589)) ([2bb3608](https://github.com/amplitude/Amplitude-TypeScript/commit/2bb36088dc1342512ba0289fb1108ed8a61361f6)) ## [2.41.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.41.6...@amplitude/analytics-core@2.41.7) (2026-03-17) ### Bug Fixes * **analytics-browser:** catch navigator.locks exceptions and fallback to no-locking ([#1600](https://github.com/amplitude/Amplitude-TypeScript/issues/1600)) ([8f58ef7](https://github.com/amplitude/Amplitude-TypeScript/commit/8f58ef753ceeae958eb0f22fa1430b7e30133308)) ## [2.41.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.41.5...@amplitude/analytics-core@2.41.6) (2026-03-16) **Note:** Version bump only for package @amplitude/analytics-core ## [2.41.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.41.4...@amplitude/analytics-core@2.41.5) (2026-03-13) ### Bug Fixes * **analytics-core:** check document before writing cookie ([#1594](https://github.com/amplitude/Amplitude-TypeScript/issues/1594)) ([d88bd4e](https://github.com/amplitude/Amplitude-TypeScript/commit/d88bd4eca1f4b1dd19733c194f45f2317e7cb545)) ## [2.41.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.41.3...@amplitude/analytics-core@2.41.4) (2026-03-12) ### Bug Fixes * **analytics-core:** remote config should not retry client side error except 429 ([#1590](https://github.com/amplitude/Amplitude-TypeScript/issues/1590)) ([b1445cb](https://github.com/amplitude/Amplitude-TypeScript/commit/b1445cb43272281ceb60da5055283fb42c494068)) ## [2.41.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.41.2...@amplitude/analytics-core@2.41.3) (2026-03-09) ### Bug Fixes * **analytics-browser:** remove zen observable version with bad polyfill ([#1580](https://github.com/amplitude/Amplitude-TypeScript/issues/1580)) ([e07cbe4](https://github.com/amplitude/Amplitude-TypeScript/commit/e07cbe4eaccb261ce8db05d3fd6bd561e7e6da1b)) * **analytics-browser:** Safari cookie writing race condition + extra exception catching ([#1578](https://github.com/amplitude/Amplitude-TypeScript/issues/1578)) ([bbcc6d7](https://github.com/amplitude/Amplitude-TypeScript/commit/bbcc6d77342a78388fce3fdf8b01d208e6403acf)) ## [2.41.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.41.1...@amplitude/analytics-core@2.41.2) (2026-03-05) ### Bug Fixes * make getTopLevelDomain and isEnabled synchronous to avoid re-entrancy ([#1564](https://github.com/amplitude/Amplitude-TypeScript/issues/1564)) ([ab9b09f](https://github.com/amplitude/Amplitude-TypeScript/commit/ab9b09f9ec9b9583f92c7cdffb7194cc30e0ea9f)) ## [2.41.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.41.0...@amplitude/analytics-core@2.41.1) (2026-03-03) **Note:** Version bump only for package @amplitude/analytics-core # [2.41.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.40.2...@amplitude/analytics-core@2.41.0) (2026-03-03) ### Bug Fixes * **analytics-browser:** duplicate cookie resolution bugfix ([#1566](https://github.com/amplitude/Amplitude-TypeScript/issues/1566)) ([3fe77c6](https://github.com/amplitude/Amplitude-TypeScript/commit/3fe77c6034799afad8668373d296b367b2fd478c)) ### Features * **analytics-browser:** add config attribution.excludeInternalReferrers ([#1548](https://github.com/amplitude/Amplitude-TypeScript/issues/1548)) ([df16648](https://github.com/amplitude/Amplitude-TypeScript/commit/df1664856bea96afde1dbac8dc523b4d69925c2a)) * **analytics-browser:** support gzip request body compression ([#1542](https://github.com/amplitude/Amplitude-TypeScript/issues/1542)) ([0d2a7d2](https://github.com/amplitude/Amplitude-TypeScript/commit/0d2a7d2d873c86d8854dad16109af461ad392166)) * manual opt in gzip ([#1568](https://github.com/amplitude/Amplitude-TypeScript/issues/1568)) ([303c130](https://github.com/amplitude/Amplitude-TypeScript/commit/303c130429c51b0913f3903db4ace5263e1c78e7)) ## [2.40.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.40.1...@amplitude/analytics-core@2.40.2) (2026-02-26) ### Bug Fixes * early return isEnabled false when document not present ([#1555](https://github.com/amplitude/Amplitude-TypeScript/issues/1555)) ([50c9a38](https://github.com/amplitude/Amplitude-TypeScript/commit/50c9a38580997b952e7cec6835139239d5de63a8)) ## [2.40.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.40.0...@amplitude/analytics-core@2.40.1) (2026-02-24) ### Bug Fixes * import globalScope from named versus root ([#1554](https://github.com/amplitude/Amplitude-TypeScript/issues/1554)) ([b565551](https://github.com/amplitude/Amplitude-TypeScript/commit/b56555199782f070b0a8e5163add3ff36d5350ea)) # [2.40.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.39.0...@amplitude/analytics-core@2.40.0) (2026-02-19) ### Bug Fixes * **analytics-browser:** handle XHR open vs send race condition ([#1541](https://github.com/amplitude/Amplitude-TypeScript/issues/1541)) ([b952b81](https://github.com/amplitude/Amplitude-TypeScript/commit/b952b8145f8be436ccf1fe62d1275162c8a92f70)) * **analytics-browser:** prevent circular reference in logBrowserOptions ([#1537](https://github.com/amplitude/Amplitude-TypeScript/issues/1537)) ([23b4fdb](https://github.com/amplitude/Amplitude-TypeScript/commit/23b4fdb106a242e4f64b81842f4227bcf771432b)) * **analytics-core:** diagnostics supports multiple script urls ([#1538](https://github.com/amplitude/Amplitude-TypeScript/issues/1538)) ([8ae3b27](https://github.com/amplitude/Amplitude-TypeScript/commit/8ae3b27e9011a7fddcb63b6dd421d943f26873d8)) ### Features * screenshot capture messenger ([#1535](https://github.com/amplitude/Amplitude-TypeScript/issues/1535)) ([93ef551](https://github.com/amplitude/Amplitude-TypeScript/commit/93ef551ff0ab7dc48014aa5fa25841437d641993)) # [2.39.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.38.0...@amplitude/analytics-core@2.39.0) (2026-02-17) ### Bug Fixes * **analytics-browser:** cookie re-entrancy problem in isEnabled ([#1539](https://github.com/amplitude/Amplitude-TypeScript/issues/1539)) ([bb4b25e](https://github.com/amplitude/Amplitude-TypeScript/commit/bb4b25e03d05ca2b86e2bfb530b371c155ba70d1)) ### Features * **analytics-browser:** add setIdentity() ([#1517](https://github.com/amplitude/Amplitude-TypeScript/issues/1517)) ([314b3c1](https://github.com/amplitude/Amplitude-TypeScript/commit/314b3c1b7ee5b0ef135848a66156eb2874daec5f)) # [2.38.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.37.0...@amplitude/analytics-core@2.38.0) (2026-02-10) ### Bug Fixes * **analytics-browser:** defer session_start and attribution when optOut is "true" ([#1509](https://github.com/amplitude/Amplitude-TypeScript/issues/1509)) ([3a3818d](https://github.com/amplitude/Amplitude-TypeScript/commit/3a3818d19bd84e4aa8405e10f8538886dd647f38)) * **analytics-core:** add ValidPropertyType type ([#1525](https://github.com/amplitude/Amplitude-TypeScript/issues/1525)) ([f63c657](https://github.com/amplitude/Amplitude-TypeScript/commit/f63c6570f95acab087ad47d9ce9442fe42765a2c)) ### Features * **analytics-browser:** [@experimental](https://github.com/experimental) add Thrashed Cursor frustration signal ([#1523](https://github.com/amplitude/Amplitude-TypeScript/issues/1523)) ([376b034](https://github.com/amplitude/Amplitude-TypeScript/commit/376b0342716057c82430ab72c0fc5bab55bc0dba)) # [2.37.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.36.1...@amplitude/analytics-core@2.37.0) (2026-01-26) ### Features * **analytics-browser:** add shouldTrackSubmit for custom form validation ([#1500](https://github.com/amplitude/Amplitude-TypeScript/issues/1500)) ([1d76745](https://github.com/amplitude/Amplitude-TypeScript/commit/1d76745dc202e27d188bfe47ae76d69806bbb566)) ## [2.36.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.36.0...@amplitude/analytics-core@2.36.1) (2026-01-21) **Note:** Version bump only for package @amplitude/analytics-core # [2.36.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.35.2...@amplitude/analytics-core@2.36.0) (2026-01-15) ### Features * **analytics-core:** add console observer helper ([#1478](https://github.com/amplitude/Amplitude-TypeScript/issues/1478)) ([f81ad91](https://github.com/amplitude/Amplitude-TypeScript/commit/f81ad91459cb0b69d1fdb2c4bcc463ac887dd44f)) ## [2.35.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.35.1...@amplitude/analytics-core@2.35.2) (2026-01-14) ### Bug Fixes * **analytics-browser:** re-entrant error in cookies.isEnabled ([#1493](https://github.com/amplitude/Amplitude-TypeScript/issues/1493)) ([ed4f62c](https://github.com/amplitude/Amplitude-TypeScript/commit/ed4f62cb57a389deb1b67f3fdb310e30caf7e3e2)) * **plugin-autocapture-browser:** allow selective configuration of frustration interactions ([#1489](https://github.com/amplitude/Amplitude-TypeScript/issues/1489)) ([5350f5b](https://github.com/amplitude/Amplitude-TypeScript/commit/5350f5b53d134b516f1e0e0cd202090015751ce0)) ## [2.35.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.35.0...@amplitude/analytics-core@2.35.1) (2026-01-14) ### Bug Fixes * **analytics-browser:** two cookie problem resolution ([#1490](https://github.com/amplitude/Amplitude-TypeScript/issues/1490)) ([506638a](https://github.com/amplitude/Amplitude-TypeScript/commit/506638a2a412dc3843b0da9450325f70ff465422)) # [2.35.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.34.1...@amplitude/analytics-core@2.35.0) (2025-12-24) ### Features * **analytics-browser:** add support to set headers for transport pro… ([#1444](https://github.com/amplitude/Amplitude-TypeScript/issues/1444)) ([c277239](https://github.com/amplitude/Amplitude-TypeScript/commit/c277239d317106496f7a08fc2933e72e391be9de)) ## [2.34.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.34.0...@amplitude/analytics-core@2.34.1) (2025-12-16) ### Bug Fixes * **plugin-page-url-enrichment-browser:** add internalDomains config for subdomain matching ([#1433](https://github.com/amplitude/Amplitude-TypeScript/issues/1433)) ([cf97ca3](https://github.com/amplitude/Amplitude-TypeScript/commit/cf97ca344e81666d4227aba67b0368d2213c9b34)) # [2.34.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.33.0...@amplitude/analytics-core@2.34.0) (2025-12-09) ### Features * diagnostics uncaught sdk errors installed by script ([#1419](https://github.com/amplitude/Amplitude-TypeScript/issues/1419)) ([dc0b3cc](https://github.com/amplitude/Amplitude-TypeScript/commit/dc0b3cc9df5915d1bfb773b64099c70fc9408fda)) # [2.33.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.32.2...@amplitude/analytics-core@2.33.0) (2025-11-21) ### Features * **analytics-browser:** reduce bundle size via refactoring out rxjs ([#1391](https://github.com/amplitude/Amplitude-TypeScript/issues/1391)) ([09ade0b](https://github.com/amplitude/Amplitude-TypeScript/commit/09ade0b37cfdbaacb0e328cb812168d60dc25124)) ## [2.32.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.32.1...@amplitude/analytics-core@2.32.2) (2025-11-20) ### Bug Fixes * **analytics-core:** record unsuccessful response from catch error ([#1411](https://github.com/amplitude/Amplitude-TypeScript/issues/1411)) ([c298d58](https://github.com/amplitude/Amplitude-TypeScript/commit/c298d58e3d32eb3bafe61d7d6efbcb9c775c363b)) ## [2.32.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.32.0...@amplitude/analytics-core@2.32.1) (2025-11-17) ### Bug Fixes * **analytics-core:** record unsuccessful response ([#1405](https://github.com/amplitude/Amplitude-TypeScript/issues/1405)) ([7e842fe](https://github.com/amplitude/Amplitude-TypeScript/commit/7e842feb0aa36ec4274b97a205b19613f3b5c642)) # [2.32.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.31.1...@amplitude/analytics-core@2.32.0) (2025-11-17) ### Bug Fixes * **analytics-core:** batch remote config requests ([#1398](https://github.com/amplitude/Amplitude-TypeScript/issues/1398)) ([29da299](https://github.com/amplitude/Amplitude-TypeScript/commit/29da299e7c378a2c4221826f1b87e94aa6df3cb7)) * **analytics-core:** remote config should not return null from cache for first time users ([#1401](https://github.com/amplitude/Amplitude-TypeScript/issues/1401)) ([568554a](https://github.com/amplitude/Amplitude-TypeScript/commit/568554a4849ff9069ae6948783458bc3c2997523)) ### Features * **analytics-browser:** add reset listener API ([#1393](https://github.com/amplitude/Amplitude-TypeScript/issues/1393)) ([7bd85e5](https://github.com/amplitude/Amplitude-TypeScript/commit/7bd85e51b01cefdb43b8474d930e8c219b739323)) ### Reverts * "fix: make setDiagnosticsRate an optional function ([#1382](https://github.com/amplitude/Amplitude-TypeScript/issues/1382))" ([#1394](https://github.com/amplitude/Amplitude-TypeScript/issues/1394)) ([f8ddc88](https://github.com/amplitude/Amplitude-TypeScript/commit/f8ddc88961e14a3ae7ad7e79ac7a182e84b158a0)) ## [2.31.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.31.0...@amplitude/analytics-core@2.31.1) (2025-11-05) ### Bug Fixes * make setDiagnosticsRate an optional function ([#1382](https://github.com/amplitude/Amplitude-TypeScript/issues/1382)) ([8898186](https://github.com/amplitude/Amplitude-TypeScript/commit/889818637c41c6469a89b70553e8dcfc9725ab87)) # [2.31.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.30.0...@amplitude/analytics-core@2.31.0) (2025-10-29) ### Features * more diagnostics metrics ([#1371](https://github.com/amplitude/Amplitude-TypeScript/issues/1371)) ([40e255c](https://github.com/amplitude/Amplitude-TypeScript/commit/40e255c89c98f4ffffd883296d3d8a9947326aaa)) # [2.30.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.29.0...@amplitude/analytics-core@2.30.0) (2025-10-23) ### Features * **autocapture:** set page url enrichment plugin to default on and add/fix tests ([#1287](https://github.com/amplitude/Amplitude-TypeScript/issues/1287)) ([d96d7dd](https://github.com/amplitude/Amplitude-TypeScript/commit/d96d7dd7db156eae51a342b4956db2530ca64d29)) # [2.29.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.28.0...@amplitude/analytics-core@2.29.0) (2025-10-23) ### Features * **analytics-browser:** add remote config server url to proxy remote config requests ([#1348](https://github.com/amplitude/Amplitude-TypeScript/issues/1348)) ([461b598](https://github.com/amplitude/Amplitude-TypeScript/commit/461b59876a75af0d97fd639c35ce08f6b0f4c24b)) # [2.28.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.27.2...@amplitude/analytics-core@2.28.0) (2025-10-17) ### Features * make web-vitals autocapture GA ([#1347](https://github.com/amplitude/Amplitude-TypeScript/issues/1347)) ([178862f](https://github.com/amplitude/Amplitude-TypeScript/commit/178862f87e6ea8a882c1d612f48692ab1ab65e14)) ## [2.27.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.27.1...@amplitude/analytics-core@2.27.2) (2025-10-15) ### Bug Fixes * **plugin-page-view-tracking-browser:** migrate to analytics-core ([#1341](https://github.com/amplitude/Amplitude-TypeScript/issues/1341)) ([676d347](https://github.com/amplitude/Amplitude-TypeScript/commit/676d347a04a6bd1ab5264ac8f58a358fd983ea54)) ## [2.27.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.27.0...@amplitude/analytics-core@2.27.1) (2025-10-14) ### Bug Fixes * **analytics-core:** diagnostics client use temp sampling algo ([#1340](https://github.com/amplitude/Amplitude-TypeScript/issues/1340)) ([3e89dd7](https://github.com/amplitude/Amplitude-TypeScript/commit/3e89dd7a678cf7043d843949b0c7934e74f59d29)) # [2.27.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.26.2...@amplitude/analytics-core@2.27.0) (2025-10-14) ### Features * **autocapture:** refactor getPageTitle from autocapture to make it reusable ([#1331](https://github.com/amplitude/Amplitude-TypeScript/issues/1331)) ([44eabd1](https://github.com/amplitude/Amplitude-TypeScript/commit/44eabd1139252ed71845d29a86ceccd2ef119d15)) * **plugin-network-capture-browser:** make networkTracking headers + body capturing GA ([#1334](https://github.com/amplitude/Amplitude-TypeScript/issues/1334)) ([8b57656](https://github.com/amplitude/Amplitude-TypeScript/commit/8b576569d28f323b21f6c82d708867d91c641063)) ## [2.26.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.26.1...@amplitude/analytics-core@2.26.2) (2025-10-03) ### Bug Fixes * add diagnostics to client and track autocapture getHierachy block time ([#1312](https://github.com/amplitude/Amplitude-TypeScript/issues/1312)) ([a919e22](https://github.com/amplitude/Amplitude-TypeScript/commit/a919e223428083a87954cffa50bc765baa5360b0)) ## [2.26.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.26.0...@amplitude/analytics-core@2.26.1) (2025-10-01) ### Bug Fixes * suppress relative url errors ([#1311](https://github.com/amplitude/Amplitude-TypeScript/issues/1311)) ([9f3b3b0](https://github.com/amplitude/Amplitude-TypeScript/commit/9f3b3b0ded160ef56e046a35d7f0eb747a2a4ef3)) # [2.26.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.25.0...@amplitude/analytics-core@2.26.0) (2025-09-25) ### Features * **analytics-browser:** add "identify" to config ([#1303](https://github.com/amplitude/Amplitude-TypeScript/issues/1303)) ([693720c](https://github.com/amplitude/Amplitude-TypeScript/commit/693720c348eaac0ffef8b88454deae06ceca0bb4)) # [2.25.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.24.1...@amplitude/analytics-core@2.25.0) (2025-09-23) ### Bug Fixes * **analytics-core:** add events support for diagnostics client ([#1301](https://github.com/amplitude/Amplitude-TypeScript/issues/1301)) ([9671929](https://github.com/amplitude/Amplitude-TypeScript/commit/9671929b6cfa63621e6e8ca6f2575d057990775e)) ### Features * **analytics-core:** add diagnostics client ([#1281](https://github.com/amplitude/Amplitude-TypeScript/issues/1281)) ([c511002](https://github.com/amplitude/Amplitude-TypeScript/commit/c5110024832f09d3f69d25077c4c5b825e538e6c)) ## [2.24.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.24.0...@amplitude/analytics-core@2.24.1) (2025-09-18) ### Bug Fixes * **analytics-browser:** add URI decoding to Element Clicked event attribute ([#1297](https://github.com/amplitude/Amplitude-TypeScript/issues/1297)) ([ebb2120](https://github.com/amplitude/Amplitude-TypeScript/commit/ebb212080948e8acbaeadbdc410580e04202f818)) # [2.24.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.23.0...@amplitude/analytics-core@2.24.0) (2025-09-12) ### Features * **analytics-browser:** make frustrationInteractions GA ([#1286](https://github.com/amplitude/Amplitude-TypeScript/issues/1286)) ([40d62be](https://github.com/amplitude/Amplitude-TypeScript/commit/40d62be5e1713a3756464f83bd15d25fe1294956)) # [2.23.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.22.1...@amplitude/analytics-core@2.23.0) (2025-09-05) ### Bug Fixes * **analytics-core:** strip out basic auth from url ([#1279](https://github.com/amplitude/Amplitude-TypeScript/issues/1279)) ([d9ee8af](https://github.com/amplitude/Amplitude-TypeScript/commit/d9ee8afc34537cf96c05e98bebfad94b3bc426ad)) ### Features * **autocapture:** include pageUrlExcludelist ([#1264](https://github.com/amplitude/Amplitude-TypeScript/issues/1264)) ([dd2aa7f](https://github.com/amplitude/Amplitude-TypeScript/commit/dd2aa7fbb476ead45831f2dc39a94db224131699)) ## [2.22.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.22.0...@amplitude/analytics-core@2.22.1) (2025-08-28) ### Bug Fixes * **analytics-core:** handle XHR responseType JSON ([#1276](https://github.com/amplitude/Amplitude-TypeScript/issues/1276)) ([cd35193](https://github.com/amplitude/Amplitude-TypeScript/commit/cd35193ba51cdb986b3a4b8a50989067e3f8bf5b)) # [2.22.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.21.2...@amplitude/analytics-core@2.22.0) (2025-08-26) ### Bug Fixes * **plugin-network-autocapture:** replace consumption check with cache ([#1274](https://github.com/amplitude/Amplitude-TypeScript/issues/1274)) ([9c41081](https://github.com/amplitude/Amplitude-TypeScript/commit/9c41081ce23aea51ff9c9a82f0b8b9e5e3c53061)) ### Features * **autocapture:** add maskTextRegex option to autocapture ([#1259](https://github.com/amplitude/Amplitude-TypeScript/issues/1259)) ([2f1cf07](https://github.com/amplitude/Amplitude-TypeScript/commit/2f1cf075b3e0728f4124bb5c30c8a7e7c21d5a12)) ## [2.21.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.21.1...@amplitude/analytics-core@2.21.2) (2025-08-25) ### Bug Fixes * **plugin-autocapture-browser:** make rage click less noisy ([#1265](https://github.com/amplitude/Amplitude-TypeScript/issues/1265)) ([a31acd3](https://github.com/amplitude/Amplitude-TypeScript/commit/a31acd34f2389d12427daba776ce22a262db7874)) ## [2.21.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.21.0...@amplitude/analytics-core@2.21.1) (2025-08-22) ### Bug Fixes * **analytics-core:** fix typo in Reddit click-id ([#1267](https://github.com/amplitude/Amplitude-TypeScript/issues/1267)) ([43e581d](https://github.com/amplitude/Amplitude-TypeScript/commit/43e581d6465546a38373f758f179eee103172755)) # [2.21.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.20.2...@amplitude/analytics-core@2.21.0) (2025-08-21) ### Features * **analytics-browser:** add urls matching attribute to network capture rules (experimental) ([#1252](https://github.com/amplitude/Amplitude-TypeScript/issues/1252)) ([c28a98c](https://github.com/amplitude/Amplitude-TypeScript/commit/c28a98c13536d3eb2472edcce6ec225539db00aa)) * **plugin-network-capture-browser:** add ability to capture headers (experimental) ([#1253](https://github.com/amplitude/Amplitude-TypeScript/issues/1253)) ([52cfc0c](https://github.com/amplitude/Amplitude-TypeScript/commit/52cfc0c6dab309f30cfce56c091065ff95d95fc2)) * **plugin-network-capture-browser:** add request + response body capture (experimental) ([#1256](https://github.com/amplitude/Amplitude-TypeScript/issues/1256)) ([1850c58](https://github.com/amplitude/Amplitude-TypeScript/commit/1850c58d145973b3bd104ab70368eb4e2fdbafbc)) ## [2.20.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.20.1...@amplitude/analytics-core@2.20.2) (2025-08-13) **Note:** Version bump only for package @amplitude/analytics-core ## [2.20.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.20.0...@amplitude/analytics-core@2.20.1) (2025-08-08) ### Bug Fixes * **analytics-core:** should abort remote config request ([#1234](https://github.com/amplitude/Amplitude-TypeScript/issues/1234)) ([394f18b](https://github.com/amplitude/Amplitude-TypeScript/commit/394f18b52c383f30fbed85cb0dcf4fa80df527b5)) # [2.20.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.19.0...@amplitude/analytics-core@2.20.0) (2025-08-05) ### Bug Fixes * **analtyics-browser): Revert "feat(analytics-browser:** add page-url-previous-page plugin" ([#1237](https://github.com/amplitude/Amplitude-TypeScript/issues/1237)) ([dfd7340](https://github.com/amplitude/Amplitude-TypeScript/commit/dfd7340f6519e647a814b3c66913b0c96b0567cf)) * **analytics-browser:** use the new remote config client ([#1191](https://github.com/amplitude/Amplitude-TypeScript/issues/1191)) ([9af61ea](https://github.com/amplitude/Amplitude-TypeScript/commit/9af61ea1f29fa97644910f37440562e5a6d5eeba)) * **plugin-autocapture-browser:** remove unused configurations from FrustrationInteractions ([#1229](https://github.com/amplitude/Amplitude-TypeScript/issues/1229)) ([d7af23b](https://github.com/amplitude/Amplitude-TypeScript/commit/d7af23b4b02d475475c3249d67ee6e24c49136af)) ### Features * **analytics-browser:** add page-url-previous-page plugin ([#1110](https://github.com/amplitude/Amplitude-TypeScript/issues/1110)) ([dc053ed](https://github.com/amplitude/Amplitude-TypeScript/commit/dc053ed9f0b6378fce6a49f6a6e4196f3622bd25)) * **plugin-page-url-enrichment-browser:** AMP-130401 create Page URL Enrichment plugin for additional Page URL related properties ([#1238](https://github.com/amplitude/Amplitude-TypeScript/issues/1238)) ([4673be8](https://github.com/amplitude/Amplitude-TypeScript/commit/4673be86ab5535fdca66d1743ef4ee071d5fdef7)) # [2.19.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.18.0...@amplitude/analytics-core@2.19.0) (2025-07-29) ### Bug Fixes * **analytics-react-native:** migrate to analytics-core v2 ([#1216](https://github.com/amplitude/Amplitude-TypeScript/issues/1216)) ([76e85a1](https://github.com/amplitude/Amplitude-TypeScript/commit/76e85a1daa704a1c4c44d0176a56c8dd8d4ad3f1)) ### Features * **analytics-core:** expose unified AmplitudeContext and AnalyticsClient ([#1222](https://github.com/amplitude/Amplitude-TypeScript/issues/1222)) ([7e32712](https://github.com/amplitude/Amplitude-TypeScript/commit/7e327128b4032592897dc6bb50dedda053ad8eda)) * **autocapture:** fetch page actions from remote config ([#1168](https://github.com/amplitude/Amplitude-TypeScript/issues/1168)) ([da213cc](https://github.com/amplitude/Amplitude-TypeScript/commit/da213cc33c4986bcebff2b4264b2c17314f5f310)) # [2.18.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.17.0...@amplitude/analytics-core@2.18.0) (2025-07-17) ### Features * **analytics-browser:** support autocapture.webVitals ([#1195](https://github.com/amplitude/Amplitude-TypeScript/issues/1195)) ([a186f52](https://github.com/amplitude/Amplitude-TypeScript/commit/a186f523a28d8a322842566b892f50bcf2643142)) # [2.17.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.16.0...@amplitude/analytics-core@2.17.0) (2025-07-15) ### Bug Fixes * **analytics-browser:** prevent infinite Amplitude network requests ([#1100](https://github.com/amplitude/Amplitude-TypeScript/issues/1100)) ([fde763c](https://github.com/amplitude/Amplitude-TypeScript/commit/fde763cd4889bda41edc55789ee18186711d825e)) ### Features * **analytics-browser:** add experimental frustrationInteractions ([#1209](https://github.com/amplitude/Amplitude-TypeScript/issues/1209)) ([e321744](https://github.com/amplitude/Amplitude-TypeScript/commit/e3217444c58be15e779ff1fd54a55027c93f5db0)) * **analytics-node:** migrate to v2.x core ([#1207](https://github.com/amplitude/Amplitude-TypeScript/issues/1207)) ([e1c1b28](https://github.com/amplitude/Amplitude-TypeScript/commit/e1c1b28ed2036f7ebb68173f8da2e6cbb82cb287)) # [2.16.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.15.0...@amplitude/analytics-core@2.16.0) (2025-07-08) ### Bug Fixes * **analytics-core:** more logs in timeline ([#1180](https://github.com/amplitude/Amplitude-TypeScript/issues/1180)) ([dcb6cee](https://github.com/amplitude/Amplitude-TypeScript/commit/dcb6ceee00e3587b8eaf601074940696c94a4466)) * **analytics-core:** remote config use new schema & config group ([#1185](https://github.com/amplitude/Amplitude-TypeScript/issues/1185)) ([db54ae5](https://github.com/amplitude/Amplitude-TypeScript/commit/db54ae5ce87d5d7a4ae49c80aab5037dee3dd03c)) ### Features * **analytics-browser:** change definition of rage click ([#1183](https://github.com/amplitude/Amplitude-TypeScript/issues/1183)) ([108f930](https://github.com/amplitude/Amplitude-TypeScript/commit/108f930114629fdb3d600532a2c6b8b4f6cafd01)) # [2.15.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.14.0...@amplitude/analytics-core@2.15.0) (2025-06-30) ### Features * add getOptOut() and getIdentity() ([#1174](https://github.com/amplitude/Amplitude-TypeScript/issues/1174)) ([72017c8](https://github.com/amplitude/Amplitude-TypeScript/commit/72017c8a1a54d929542e883e61d61168f214a780)) # [2.14.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.13.0...@amplitude/analytics-core@2.14.0) (2025-06-26) ### Features * **plugin-autocapture-browser:** add rage+dead clicks to autocapture plugin ([#1146](https://github.com/amplitude/Amplitude-TypeScript/issues/1146)) ([c850f02](https://github.com/amplitude/Amplitude-TypeScript/commit/c850f020a6b56bbd8d64e0f946acaf0eac15ccf7)) # [2.13.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.12.3...@amplitude/analytics-core@2.13.0) (2025-06-25) ### Features * **autocapture:** Added config to capture event properties ([#1111](https://github.com/amplitude/Amplitude-TypeScript/issues/1111)) ([109c3e2](https://github.com/amplitude/Amplitude-TypeScript/commit/109c3e220293fff92f870f8efe1a6cb4a20bebf4)) ## [2.12.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.12.2...@amplitude/analytics-core@2.12.3) (2025-06-11) **Note:** Version bump only for package @amplitude/analytics-core ## [2.12.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.12.1...@amplitude/analytics-core@2.12.2) (2025-06-03) ### Bug Fixes * **analytics-core:** bump version ([#1123](https://github.com/amplitude/Amplitude-TypeScript/issues/1123)) ([65ab775](https://github.com/amplitude/Amplitude-TypeScript/commit/65ab77559dc0a61895043eb10c08922ad4f19690)) ## [2.12.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.12.0...@amplitude/analytics-core@2.12.1) (2025-05-27) ### Bug Fixes * **analytics-browser:** support autocapture.networkTracking as object ([#1095](https://github.com/amplitude/Amplitude-TypeScript/issues/1095)) ([121abc7](https://github.com/amplitude/Amplitude-TypeScript/commit/121abc7e69a354cc704de7cbe493b8c79fa6eacd)) * **analytics-browser:** support XHR in network capture ([#1089](https://github.com/amplitude/Amplitude-TypeScript/issues/1089)) ([339d49c](https://github.com/amplitude/Amplitude-TypeScript/commit/339d49cfa7b07ffc20fe085b8548f6489a3029f3)) # [2.12.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.11.2...@amplitude/analytics-core@2.12.0) (2025-05-13) ### Bug Fixes * **analytics-core:** make network observer event callbacks handle exceptions ([#1071](https://github.com/amplitude/Amplitude-TypeScript/issues/1071)) ([baf46e2](https://github.com/amplitude/Amplitude-TypeScript/commit/baf46e22585f58924b801e301db78c7aecda1b4a)) ### Features * **analytics-core:** add plugins to look up plugin by class type ([#1079](https://github.com/amplitude/Amplitude-TypeScript/issues/1079)) ([14c73b9](https://github.com/amplitude/Amplitude-TypeScript/commit/14c73b9bffcf621b44f66febc2801582e26b7cae)) ## [2.11.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.11.1...@amplitude/analytics-core@2.11.2) (2025-05-05) ### Bug Fixes * **analytics-browser:** use performance.now in network capture ([#1060](https://github.com/amplitude/Amplitude-TypeScript/issues/1060)) ([70917e2](https://github.com/amplitude/Amplitude-TypeScript/commit/70917e26369d27adf62e6b9a44a39599a312b3ef)) ## [2.11.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.11.0...@amplitude/analytics-core@2.11.1) (2025-05-02) **Note:** Version bump only for package @amplitude/analytics-core # [2.11.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.10.1...@amplitude/analytics-core@2.11.0) (2025-05-02) ### Features * **analytics-browser:** autocapture network errors ([#1050](https://github.com/amplitude/Amplitude-TypeScript/issues/1050)) ([104350f](https://github.com/amplitude/Amplitude-TypeScript/commit/104350ffe8b1bd1a7090482ac3bf24d85672bd43)) ## [2.10.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.10.0...@amplitude/analytics-core@2.10.1) (2025-04-22) ### Bug Fixes * **analytics-core:** add missing analytics-connector dependency ([#1031](https://github.com/amplitude/Amplitude-TypeScript/issues/1031)) ([820a761](https://github.com/amplitude/Amplitude-TypeScript/commit/820a7614cba3ce58c5e42cdf0f61880619196750)) # [2.10.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.9.0...@amplitude/analytics-core@2.10.0) (2025-04-17) ### Bug Fixes * **analytics-core:** add support for experiment plugin ([#1033](https://github.com/amplitude/Amplitude-TypeScript/issues/1033)) ([69a20c7](https://github.com/amplitude/Amplitude-TypeScript/commit/69a20c7a895eb4bb4668583ea3371d0ca2df18d2)) ### Features * **analytics-core:** new plugin interfaces onXXXchanged() ([#1025](https://github.com/amplitude/Amplitude-TypeScript/issues/1025)) ([e6fd23b](https://github.com/amplitude/Amplitude-TypeScript/commit/e6fd23b17809d0c7d94e7627636b200166d41a0f)) # [2.9.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.8.1...@amplitude/analytics-core@2.9.0) (2025-04-15) ### Features * **session-replay-browser:** migrate to core v2.x ([#1022](https://github.com/amplitude/Amplitude-TypeScript/issues/1022)) ([7a665d5](https://github.com/amplitude/Amplitude-TypeScript/commit/7a665d55fff89092ed5f2bb94caa1eb2c7efe5b1)) ## [2.8.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.8.0...@amplitude/analytics-core@2.8.1) (2025-04-10) ### Bug Fixes * **uuid:** set UUID's using crypto libraries instead of Math.random ([#852](https://github.com/amplitude/Amplitude-TypeScript/issues/852)) ([54b86bb](https://github.com/amplitude/Amplitude-TypeScript/commit/54b86bba518261e365a0b3ff49cb44521531491c)) # [2.8.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.7.0...@amplitude/analytics-core@2.8.0) (2025-04-07) ### Features * **analytics-core:** remote config client ([#997](https://github.com/amplitude/Amplitude-TypeScript/issues/997)) ([9a25350](https://github.com/amplitude/Amplitude-TypeScript/commit/9a25350802fc6326501bd31a201534d2f906985b)) # [2.7.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.6.1...@amplitude/analytics-core@2.7.0) (2025-04-02) ### Bug Fixes * **analytics-browser:** export more types ([#1011](https://github.com/amplitude/Amplitude-TypeScript/issues/1011)) ([561afc2](https://github.com/amplitude/Amplitude-TypeScript/commit/561afc2538da25867db02646829b2eb81693abcd)) ### Features * **analytics-browser:** set default for fetchRemoteConfig option to true ([#1008](https://github.com/amplitude/Amplitude-TypeScript/issues/1008)) ([5138cd1](https://github.com/amplitude/Amplitude-TypeScript/commit/5138cd16be1ff3bb57c38ec0eae5098a1b7933fc)) ## [2.6.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.6.0...@amplitude/analytics-core@2.6.1) (2025-03-21) ### Bug Fixes * **analytics-browser:** replace analytics-types with analytics-core ([#993](https://github.com/amplitude/Amplitude-TypeScript/issues/993)) ([f180f05](https://github.com/amplitude/Amplitude-TypeScript/commit/f180f05854393bf18d94f1753d284778ba3b5377)) # [2.6.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.5.6...@amplitude/analytics-core@2.6.0) (2025-03-14) ### Features * **analytics-core:** add support for revenue receipt and receipt sig ([#991](https://github.com/amplitude/Amplitude-TypeScript/issues/991)) ([e736a65](https://github.com/amplitude/Amplitude-TypeScript/commit/e736a65e35f0462a6b6080e66a27ffaec9a512b5)) * **analytics-core:** merge analytics-client-common ([#977](https://github.com/amplitude/Amplitude-TypeScript/issues/977)) ([1746ae5](https://github.com/amplitude/Amplitude-TypeScript/commit/1746ae5efb1ecd0e7586bc22ff8a704a6928c26a)) * **analytics-core:** merge analytics-types ([#989](https://github.com/amplitude/Amplitude-TypeScript/issues/989)) ([9f7ed68](https://github.com/amplitude/Amplitude-TypeScript/commit/9f7ed68e8ec468f5c597ce427c70ffd855dde629)) ## [2.5.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.5.5...@amplitude/analytics-core@2.5.6) (2025-02-28) ### Bug Fixes * ability to send revenue currency to amplitude ([d4f52e7](https://github.com/amplitude/Amplitude-TypeScript/commit/d4f52e74e9840a3361784dfc37ef21125375d02e)) * adding tests ([ba9688a](https://github.com/amplitude/Amplitude-TypeScript/commit/ba9688a31377a3e7903e9689970a99878e635569)) * **analytics-core:** should not flush until previous request resolves ([#964](https://github.com/amplitude/Amplitude-TypeScript/issues/964)) ([771ce55](https://github.com/amplitude/Amplitude-TypeScript/commit/771ce556cb131b71ddb28461268a6feb5f3a1b1d)) ### Reverts * Revert "chore(release): publish" ([d392f62](https://github.com/amplitude/Amplitude-TypeScript/commit/d392f6290b8bb4dd955d6e6f20b00191679489c4)) ## [2.5.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.5.4...@amplitude/analytics-core@2.5.5) (2024-12-17) ### Bug Fixes * amplitude.remove should only remove if plugin was already registered ([ad84bf6](https://github.com/amplitude/Amplitude-TypeScript/commit/ad84bf62a8b113a3d59de1b16a052b72ffe14c22)) * **analytics-browser:** should send batches sequentially ([#935](https://github.com/amplitude/Amplitude-TypeScript/issues/935)) ([ad319d6](https://github.com/amplitude/Amplitude-TypeScript/commit/ad319d602d167b1db7ee3c8d07beb4c00be8c080)) ## [2.5.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.5.3...@amplitude/analytics-core@2.5.4) (2024-11-05) ### Bug Fixes * **analytics-types:** allow an array of objects as identity value type ([#914](https://github.com/amplitude/Amplitude-TypeScript/issues/914)) ([a6ddf9f](https://github.com/amplitude/Amplitude-TypeScript/commit/a6ddf9f369fb0240f7fe9ca7040ef36a48a65d41)) ## [2.5.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.5.2...@amplitude/analytics-core@2.5.3) (2024-10-21) **Note:** Version bump only for package @amplitude/analytics-core ## [2.5.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.5.1...@amplitude/analytics-core@2.5.2) (2024-09-17) **Note:** Version bump only for package @amplitude/analytics-core ## [2.5.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.5.0...@amplitude/analytics-core@2.5.1) (2024-09-10) **Note:** Version bump only for package @amplitude/analytics-core # [2.5.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.4.0...@amplitude/analytics-core@2.5.0) (2024-08-13) ### Features * support remote config for each autocapture field ([#848](https://github.com/amplitude/Amplitude-TypeScript/issues/848)) ([939d49f](https://github.com/amplitude/Amplitude-TypeScript/commit/939d49f488bda8bbe4fa57cd2a2ab23f75540fc5)) # [2.4.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.3.0...@amplitude/analytics-core@2.4.0) (2024-08-02) ### Features * remote config ([#832](https://github.com/amplitude/Amplitude-TypeScript/issues/832)) ([c415f79](https://github.com/amplitude/Amplitude-TypeScript/commit/c415f792a98253ac60885eb1dc7e53b78ca47dcb)), closes [#769](https://github.com/amplitude/Amplitude-TypeScript/issues/769) [#772](https://github.com/amplitude/Amplitude-TypeScript/issues/772) [#780](https://github.com/amplitude/Amplitude-TypeScript/issues/780) [#782](https://github.com/amplitude/Amplitude-TypeScript/issues/782) [#811](https://github.com/amplitude/Amplitude-TypeScript/issues/811) [#828](https://github.com/amplitude/Amplitude-TypeScript/issues/828) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.3.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.8...@amplitude/analytics-core@2.3.0) (2024-06-17) ### Features - **analytics-browser:** consume remote config ([#769](https://github.com/amplitude/Amplitude-TypeScript/issues/769)) ([9c4e03c](https://github.com/amplitude/Amplitude-TypeScript/commit/9c4e03c3b3989213ac04410c8b9bf5e78ed393cf)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.7...@amplitude/analytics-core@2.2.8) (2024-05-21) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.6...@amplitude/analytics-core@2.2.7) (2024-05-15) ### Bug Fixes - **core:** api calls should queue while awaiting queued promises ([60fe272](https://github.com/amplitude/Amplitude-TypeScript/commit/60fe272d7bc4ea20944dbf444f73fa14e4785030)) - **core:** flush queue if more functions are added while awaiting promises in queue ([1b7ce6d](https://github.com/amplitude/Amplitude-TypeScript/commit/1b7ce6dd36c98ac4a0d49241284d763cf56960cb)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.5...@amplitude/analytics-core@2.2.6) (2024-05-03) ### Bug Fixes - **core:** correctly await promises called before init ([b329e05](https://github.com/amplitude/Amplitude-TypeScript/commit/b329e057023d266abb6b1145ea45e3c3471335fc)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.4...@amplitude/analytics-core@2.2.5) (2024-04-29) ### Bug Fixes - error when sending data to Amplitude should get retried ([fb29785](https://github.com/amplitude/Amplitude-TypeScript/commit/fb297852288a9cd158b6171e79697e990f375a49)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.4-beta.0...@amplitude/analytics-core@2.2.4) (2024-04-09) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.4-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.3...@amplitude/analytics-core@2.2.4-beta.0) (2024-03-28) ### Bug Fixes - fix event drop issue ([#689](https://github.com/amplitude/Amplitude-TypeScript/issues/689)) ([43a0ca3](https://github.com/amplitude/Amplitude-TypeScript/commit/43a0ca3e1797bdb8a74938c6a0f65d6dec1e5b89)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.2...@amplitude/analytics-core@2.2.3) (2024-03-23) ### Bug Fixes - stop accumulating bad events ([9fc9550](https://github.com/amplitude/Amplitude-TypeScript/commit/9fc9550c20c5693bc0322bf376cd7958d1a2154e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.1...@amplitude/analytics-core@2.2.2) (2024-03-12) ### Bug Fixes - fix event flush process ([#673](https://github.com/amplitude/Amplitude-TypeScript/issues/673)) ([043987f](https://github.com/amplitude/Amplitude-TypeScript/commit/043987f1382172fa5b700220b0b39f0e655514e4)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.2.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.2.0...@amplitude/analytics-core@2.2.1) (2024-02-23) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.1.3...@amplitude/analytics-core@2.2.0) (2024-01-24) ### Features - add offline mode ([#644](https://github.com/amplitude/Amplitude-TypeScript/issues/644)) ([f2cd717](https://github.com/amplitude/Amplitude-TypeScript/commit/f2cd717316eef66b101153cb8eedf37fadc6de0c)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.1.2...@amplitude/analytics-core@2.1.3) (2023-12-20) ### Reverts - update attribution plugin to apply utm params to the `session_start` event ([#638](https://github.com/amplitude/Amplitude-TypeScript/issues/638)) ([c820279](https://github.com/amplitude/Amplitude-TypeScript/commit/c820279cbef2123d890beb7861d7edbbc3926f6e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.1.2-beta.0...@amplitude/analytics-core@2.1.2) (2023-12-01) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.2-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.1.1...@amplitude/analytics-core@2.1.2-beta.0) (2023-11-22) ### Bug Fixes - update attribution plugin to apply utm params to the `session_start` event ([#619](https://github.com/amplitude/Amplitude-TypeScript/issues/619)) ([bf45ca6](https://github.com/amplitude/Amplitude-TypeScript/commit/bf45ca6c17ac8d656cb6c5bb4f4fa19ff344ac85)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.1.0...@amplitude/analytics-core@2.1.1) (2023-11-16) ### Bug Fixes - npm latest tags ([#624](https://github.com/amplitude/Amplitude-TypeScript/issues/624)) ([76bf7a4](https://github.com/amplitude/Amplitude-TypeScript/commit/76bf7a4c871375649fac45d549b711ac52c16b0d)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.1.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.5...@amplitude/analytics-core@2.1.0) (2023-10-18) ### Features - add client upload time ([#601](https://github.com/amplitude/Amplitude-TypeScript/issues/601)) ([b80d090](https://github.com/amplitude/Amplitude-TypeScript/commit/b80d090c5a70f75b4d3cb653efa1af48ff2fcd34)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.4...@amplitude/analytics-core@2.0.5) (2023-09-18) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.3...@amplitude/analytics-core@2.0.4) (2023-08-24) ### Bug Fixes - apply 'core' changes fom 1.x/migrate-legacy-data ([#531](https://github.com/amplitude/Amplitude-TypeScript/issues/531)) ([502a080](https://github.com/amplitude/Amplitude-TypeScript/commit/502a080b6eca2bc390b5d8076f24b9137d213f89)) - **core:** allow no destination plugins on instance ([2c72800](https://github.com/amplitude/Amplitude-TypeScript/commit/2c728009c79116aa4fc038cd266fba830a6ca0b6)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.2...@amplitude/analytics-core@2.0.3) (2023-06-30) ### Bug Fixes - allow plugins to teardown to remove listeners ([#460](https://github.com/amplitude/Amplitude-TypeScript/issues/460)) ([c337363](https://github.com/amplitude/Amplitude-TypeScript/commit/c337363c25b0a1285e8df455511516fc0a9bec7e)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.1...@amplitude/analytics-core@2.0.2) (2023-06-22) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [2.0.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.0...@amplitude/analytics-core@2.0.1) (2023-06-21) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.0-beta.8...@amplitude/analytics-core@2.0.0) (2023-06-14) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.0-beta.7...@amplitude/analytics-core@2.0.0-beta.8) (2023-06-14) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.0-beta.6...@amplitude/analytics-core@2.0.0-beta.7) (2023-06-14) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.0-beta.5...@amplitude/analytics-core@2.0.0-beta.6) (2023-06-13) ### Features - add option for instance name ([#428](https://github.com/amplitude/Amplitude-TypeScript/issues/428)) ([1a8ff7d](https://github.com/amplitude/Amplitude-TypeScript/commit/1a8ff7d665d2a936db7cb42f4cde5350379b7cae)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.0-beta.4...@amplitude/analytics-core@2.0.0-beta.5) (2023-06-13) ### Features - log response body from API to logger ([#415](https://github.com/amplitude/Amplitude-TypeScript/issues/415)) ([#422](https://github.com/amplitude/Amplitude-TypeScript/issues/422)) ([d14b5c0](https://github.com/amplitude/Amplitude-TypeScript/commit/d14b5c00a88f1a61149a61128bb4c4d07ed35836)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.0-beta.3...@amplitude/analytics-core@2.0.0-beta.4) (2023-06-08) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.0-beta.2...@amplitude/analytics-core@2.0.0-beta.3) (2023-06-07) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@2.0.0-beta.1...@amplitude/analytics-core@2.0.0-beta.2) (2023-06-06) ### Bug Fixes - simplify plugins and eliminate enums ([#407](https://github.com/amplitude/Amplitude-TypeScript/issues/407)) ([890ec66](https://github.com/amplitude/Amplitude-TypeScript/commit/890ec6695a8b25cd6988e9f7ae584d4ba2835f67)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [2.0.0-beta.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.13.3...@amplitude/analytics-core@2.0.0-beta.1) (2023-06-06) ### Features - simplify browser SDK options and plugin options interface ([#384](https://github.com/amplitude/Amplitude-TypeScript/issues/384)) ([b464cfb](https://github.com/amplitude/Amplitude-TypeScript/commit/b464cfb8e09d722bf06ed3c11955f77465a23daf)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.13.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.13.2...@amplitude/analytics-core@0.13.3) (2023-05-04) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.13.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.13.1...@amplitude/analytics-core@0.13.2) (2023-04-27) ### Bug Fixes - do not overwrite flushIntervalMillis=0 with default value (10 seconds) ([#377](https://github.com/amplitude/Amplitude-TypeScript/issues/377)) ([02dc428](https://github.com/amplitude/Amplitude-TypeScript/commit/02dc428a5b5b453a245d893a4baaf7ef8757d7ca)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.13.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.13.0...@amplitude/analytics-core@0.13.1) (2023-04-25) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [0.13.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.12.1...@amplitude/analytics-core@0.13.0) (2023-04-06) ### Features - update Plugin implementation to allow for dropping events ([#361](https://github.com/amplitude/Amplitude-TypeScript/issues/361)) ([3db4d13](https://github.com/amplitude/Amplitude-TypeScript/commit/3db4d1327e87ebcf7a2a8c1d50a62e5c8bc2b418)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.12.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.12.0...@amplitude/analytics-core@0.12.1) (2023-03-31) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [0.12.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.12.0-beta.0...@amplitude/analytics-core@0.12.0) (2023-02-27) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [0.12.0-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.11.4...@amplitude/analytics-core@0.12.0-beta.0) (2023-02-24) ### Features - pass amplitude instance to plugin.setup for enhanced plugin capabilities ([#328](https://github.com/amplitude/Amplitude-TypeScript/issues/328)) ([91eeaa0](https://github.com/amplitude/Amplitude-TypeScript/commit/91eeaa0d6bff6bde39538bb54548a938df784462)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.11.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.11.3...@amplitude/analytics-core@0.11.4) (2023-02-09) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.11.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.11.3-beta.0...@amplitude/analytics-core@0.11.3) (2023-01-31) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.11.3-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.11.2...@amplitude/analytics-core@0.11.3-beta.0) (2023-01-26) **Note:** Version bump only for package @amplitude/analytics-core # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.11.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.11.1...@amplitude/analytics-core@0.11.2) (2023-01-11) ### Bug Fixes - avoid loading types node ([#301](https://github.com/amplitude/Amplitude-TypeScript/issues/301)) ([1141807](https://github.com/amplitude/Amplitude-TypeScript/commit/1141807e77ea86423b092943dbbe357813967bd0)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.11.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.11.0...@amplitude/analytics-core@0.11.1) (2022-12-21) ### Bug Fixes - upgrade dependencies to resolve dependabot vulnerability alerts ([#299](https://github.com/amplitude/Amplitude-TypeScript/issues/299)) ([7dd1cd1](https://github.com/amplitude/Amplitude-TypeScript/commit/7dd1cd1b23a71981a4ad90b4b30cc9b7d28c4412)) ### Reverts - Revert "Updated dependencies" ([7ca9964](https://github.com/amplitude/Amplitude-TypeScript/commit/7ca9964781e4b900c6c027bdddf2ae1e7428ba18)) # [0.11.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.10.1...@amplitude/analytics-core@0.11.0) (2022-11-28) ### Features - add nest.js example app and improve response message with body content ([#275](https://github.com/amplitude/Amplitude-TypeScript/issues/275)) ([1379195](https://github.com/amplitude/Amplitude-TypeScript/commit/1379195677af0120a09cdf632c3bae36baa4fd1c)) ## [0.10.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.10.0...@amplitude/analytics-core@0.10.1) (2022-11-15) ### Bug Fixes - clear open timeouts when flush is called ([0cebcb7](https://github.com/amplitude/Amplitude-TypeScript/commit/0cebcb72d10de9c4af8c6665a098434b511a6de1)) - clear open timeouts when flush is called ([f404100](https://github.com/amplitude/Amplitude-TypeScript/commit/f4041003a6024875b9fe03806d487382d7f044d4)) # [0.10.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.9.7...@amplitude/analytics-core@0.10.0) (2022-11-01) ### Features - enhance logger with debug information ([#254](https://github.com/amplitude/Amplitude-TypeScript/issues/254)) ([5c6175e](https://github.com/amplitude/Amplitude-TypeScript/commit/5c6175e9372cbeea264ddb34c6cc68148063d4f7)) ## [0.9.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.9.6...@amplitude/analytics-core@0.9.7) (2022-10-25) ### Bug Fixes - invoke pre-init track fns after attribution ([#253](https://github.com/amplitude/Amplitude-TypeScript/issues/253)) ([b8996d7](https://github.com/amplitude/Amplitude-TypeScript/commit/b8996d793f74d388c1a96e0cde5c0ac060c1e565)) ## [0.9.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.9.5...@amplitude/analytics-core@0.9.6) (2022-10-14) ### Bug Fixes - run queued functions after attribution in browser-client.ts ([#249](https://github.com/amplitude/Amplitude-TypeScript/issues/249)) ([751b7ca](https://github.com/amplitude/Amplitude-TypeScript/commit/751b7ca6b0f05131dc932b89dd89e8979e334b4b)) ## [0.9.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.9.4...@amplitude/analytics-core@0.9.5) (2022-10-04) **Note:** Version bump only for package @amplitude/analytics-core ## [0.9.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.9.4-beta.0...@amplitude/analytics-core@0.9.4) (2022-09-28) **Note:** Version bump only for package @amplitude/analytics-core ## [0.9.4-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.9.3...@amplitude/analytics-core@0.9.4-beta.0) (2022-09-26) **Note:** Version bump only for package @amplitude/analytics-core ## [0.9.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.9.2...@amplitude/analytics-core@0.9.3) (2022-09-26) **Note:** Version bump only for package @amplitude/analytics-core ## [0.9.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.9.1...@amplitude/analytics-core@0.9.2) (2022-09-22) **Note:** Version bump only for package @amplitude/analytics-core ## [0.9.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.9.0...@amplitude/analytics-core@0.9.1) (2022-09-16) **Note:** Version bump only for package @amplitude/analytics-core # [0.9.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.8.1...@amplitude/analytics-core@0.9.0) (2022-09-08) ### Features - add ingestion_metadata field ([#212](https://github.com/amplitude/Amplitude-TypeScript/issues/212)) ([ebe8448](https://github.com/amplitude/Amplitude-TypeScript/commit/ebe8448b23609134f846e18da2e769158ca30bf1)) ## [0.8.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.8.0...@amplitude/analytics-core@0.8.1) (2022-08-31) **Note:** Version bump only for package @amplitude/analytics-core # [0.8.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.7.0...@amplitude/analytics-core@0.8.0) (2022-08-18) ### Bug Fixes - prevent concurrent init calls ([#191](https://github.com/amplitude/Amplitude-TypeScript/issues/191)) ([efda076](https://github.com/amplitude/Amplitude-TypeScript/commit/efda0760f4f1e92e47a3150985e18efcc3b108d9)) ### Features - adds create instance api ([#188](https://github.com/amplitude/Amplitude-TypeScript/issues/188)) ([050c1d9](https://github.com/amplitude/Amplitude-TypeScript/commit/050c1d96cedbc9e68aedf6fd55e85d2d3dc2fee4)) # [0.7.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.6.6...@amplitude/analytics-core@0.7.0) (2022-08-16) ### Bug Fixes - add event options to setGroup ([6ee19e2](https://github.com/amplitude/Amplitude-TypeScript/commit/6ee19e2abb326a687e6e43ecb95fe84adf35a8ce)) ### Features - add 'extra' to eventOptions ([#186](https://github.com/amplitude/Amplitude-TypeScript/issues/186)) ([32266f4](https://github.com/amplitude/Amplitude-TypeScript/commit/32266f459c180b75236d036bac66c3e7ecd33920)) ## [0.6.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.6.5...@amplitude/analytics-core@0.6.6) (2022-08-13) **Note:** Version bump only for package @amplitude/analytics-core ## [0.6.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.6.4...@amplitude/analytics-core@0.6.5) (2022-08-12) ### Bug Fixes - add callable queue when init is pending ([#181](https://github.com/amplitude/Amplitude-TypeScript/issues/181)) ([d8fc361](https://github.com/amplitude/Amplitude-TypeScript/commit/d8fc36195b96e2c10ccc5106027beaa7e970e0c0)) ## [0.6.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.6.3...@amplitude/analytics-core@0.6.4) (2022-07-22) ### Bug Fixes - adds error handling for invalid api ([#153](https://github.com/amplitude/Amplitude-TypeScript/issues/153)) ([c03f9d7](https://github.com/amplitude/Amplitude-TypeScript/commit/c03f9d7dad51e3026673dca31418a74591d79bbc)) - allow undefined storage provider ([#146](https://github.com/amplitude/Amplitude-TypeScript/issues/146)) ([e704342](https://github.com/amplitude/Amplitude-TypeScript/commit/e704342761c8ad7de3921ba21901ef8d3a768188)) - missing tracked events before init issue ([#144](https://github.com/amplitude/Amplitude-TypeScript/issues/144)) ([60d0f68](https://github.com/amplitude/Amplitude-TypeScript/commit/60d0f6848087f7b8fc3c870d55489a238e841b26)) - removes saveEvents config ([#147](https://github.com/amplitude/Amplitude-TypeScript/issues/147)) ([6fde736](https://github.com/amplitude/Amplitude-TypeScript/commit/6fde736ca8a865462522082a8085673756dbcc7d)) - update default flush config for node ([#152](https://github.com/amplitude/Amplitude-TypeScript/issues/152)) ([2445dff](https://github.com/amplitude/Amplitude-TypeScript/commit/2445dff0842e7e0a2b7ee767ab926b5a93348214)) ## [0.6.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.6.2...@amplitude/analytics-core@0.6.3) (2022-07-15) **Note:** Version bump only for package @amplitude/analytics-core ## [0.6.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.6.1...@amplitude/analytics-core@0.6.2) (2022-07-13) ### Bug Fixes - handle error gracefully when identify is set with null ([#138](https://github.com/amplitude/Amplitude-TypeScript/issues/138)) ([e0458d1](https://github.com/amplitude/Amplitude-TypeScript/commit/e0458d1256d2a96195bc8029c3df0d6ac257a588)) ## [0.6.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.6.0...@amplitude/analytics-core@0.6.1) (2022-06-29) ### Bug Fixes - remove Awaited type to support older versions of typescript ([#121](https://github.com/amplitude/Amplitude-TypeScript/issues/121)) ([23d36f8](https://github.com/amplitude/Amplitude-TypeScript/commit/23d36f8aade258b995132dafd725ada00e400916)) # [0.6.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.5.0...@amplitude/analytics-core@0.6.0) (2022-06-29) ### Features - add flush() api to send all events immediately ([#125](https://github.com/amplitude/Amplitude-TypeScript/issues/125)) ([b5dbcbb](https://github.com/amplitude/Amplitude-TypeScript/commit/b5dbcbb803c76ee5ade7ea85f76fbea50d8bab49)) - make storage interface async to enable react-native ([#122](https://github.com/amplitude/Amplitude-TypeScript/issues/122)) ([42bb39c](https://github.com/amplitude/Amplitude-TypeScript/commit/42bb39c967db015d5899487618d066f3540c9f18)) # [0.5.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.4.1...@amplitude/analytics-core@0.5.0) (2022-06-24) ### Features - add marketing campaign tracking ([#112](https://github.com/amplitude/Amplitude-TypeScript/issues/112)) ([bca73ed](https://github.com/amplitude/Amplitude-TypeScript/commit/bca73ede308ecb1663986a99600657732969d60c)) ## [0.4.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.4.0...@amplitude/analytics-core@0.4.1) (2022-06-21) ### Bug Fixes - remove userId and deviceId from createIdentifyEvent and createGroupIdentifyEvent ([#119](https://github.com/amplitude/Amplitude-TypeScript/issues/119)) ([e7726bb](https://github.com/amplitude/Amplitude-TypeScript/commit/e7726bb9ba16c390638b51042169ede9e083e331)) # [0.4.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.3.1...@amplitude/analytics-core@0.4.0) (2022-06-17) ### Features - add event bridge components ([#93](https://github.com/amplitude/Amplitude-TypeScript/issues/93)) ([64452fc](https://github.com/amplitude/Amplitude-TypeScript/commit/64452fcfeee66e10367220da023137232b2ea112)) - add Plan option to config ([#117](https://github.com/amplitude/Amplitude-TypeScript/issues/117)) ([194d7e6](https://github.com/amplitude/Amplitude-TypeScript/commit/194d7e66af0209cb8155cf6aa0b05a5dcb170f9d)) - introduce NodeJS package ([#92](https://github.com/amplitude/Amplitude-TypeScript/issues/92)) ([476fb44](https://github.com/amplitude/Amplitude-TypeScript/commit/476fb44efcf2dfcd84af6f0ef45e141ad87dac43)) ## [0.3.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.3.0...@amplitude/analytics-core@0.3.1) (2022-05-17) ### Bug Fixes - allow min_id_length option in http payload ([#99](https://github.com/amplitude/Amplitude-TypeScript/issues/99)) ([85ec965](https://github.com/amplitude/Amplitude-TypeScript/commit/85ec965d1202f8ee68ca15fbc46015fba76ba3c9)) - allow option.serverUrl to be used in destination plugin ([#104](https://github.com/amplitude/Amplitude-TypeScript/issues/104)) ([f353367](https://github.com/amplitude/Amplitude-TypeScript/commit/f353367b8b264f86b6ea15b15f30385f8d5b8ad5)) # [0.3.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.2.4...@amplitude/analytics-core@0.3.0) (2022-05-12) ### Bug Fixes - allow event level groups tracking ([#90](https://github.com/amplitude/Amplitude-TypeScript/issues/90)) ([3240660](https://github.com/amplitude/Amplitude-TypeScript/commit/3240660e94db9e5c5a1ce4280d07faced2b5fd4d)) - fix early return if array element is a valid object ([#95](https://github.com/amplitude/Amplitude-TypeScript/issues/95)) ([2a82b37](https://github.com/amplitude/Amplitude-TypeScript/commit/2a82b37ec06573318703f3f89d72b44a10b7a392)) - handle 400 error with invalid id lengths ([#81](https://github.com/amplitude/Amplitude-TypeScript/issues/81)) ([fd1686f](https://github.com/amplitude/Amplitude-TypeScript/commit/fd1686fa427588d1dcb6d2125cb4d53647c699e8)) ### Features - parse old cookies and convert to new format ([#85](https://github.com/amplitude/Amplitude-TypeScript/issues/85)) ([bda78be](https://github.com/amplitude/Amplitude-TypeScript/commit/bda78be5d2de335e7b1ff6da413b20d3dc751aca)) ## [0.2.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.2.3...@amplitude/analytics-core@0.2.4) (2022-04-09) ### Bug Fixes - fix error handling in fetch client ([#79](https://github.com/amplitude/Amplitude-TypeScript/issues/79)) ([749925f](https://github.com/amplitude/Amplitude-TypeScript/commit/749925f907ba72f0e67f3828da99151d00278e6b)) ## [0.2.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.2.2...@amplitude/analytics-core@0.2.3) (2022-04-02) **Note:** Version bump only for package @amplitude/analytics-core ## [0.2.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.2.1...@amplitude/analytics-core@0.2.2) (2022-04-01) **Note:** Version bump only for package @amplitude/analytics-core ## [0.2.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.2.0...@amplitude/analytics-core@0.2.1) (2022-04-01) **Note:** Version bump only for package @amplitude/analytics-core # [0.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.1.1...@amplitude/analytics-core@0.2.0) (2022-04-01) ### Bug Fixes - context plugin library version ([8d29c6f](https://github.com/amplitude/Amplitude-TypeScript/commit/8d29c6f4a612510188d920ac243c0bdb116fe02c)) ### Features - add snippet promise support ([#64](https://github.com/amplitude/Amplitude-TypeScript/issues/64)) ([4d23c98](https://github.com/amplitude/Amplitude-TypeScript/commit/4d23c98c25c7caa4cd5e63b2a37398f711991288)) ## [0.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/analytics-core@0.1.0...@amplitude/analytics-core@0.1.1) (2022-03-31) ### Bug Fixes - add missing dependency ([6283f64](https://github.com/amplitude/Amplitude-TypeScript/commit/6283f64dc40b070d68a0243a93ab58d95d436664)) # 0.1.0 (2022-03-31) ### Bug Fixes - add log message ([#44](https://github.com/amplitude/Amplitude-TypeScript/issues/44)) ([92325bc](https://github.com/amplitude/Amplitude-TypeScript/commit/92325bc34cf0143f5f33ec4b0afd3e2d148c3d38)) - couple plugins with config instance ([#43](https://github.com/amplitude/Amplitude-TypeScript/issues/43)) ([abf687a](https://github.com/amplitude/Amplitude-TypeScript/commit/abf687a5d7a395638d8154f65ececc9b5464c366)) - max retry limit ([#53](https://github.com/amplitude/Amplitude-TypeScript/issues/53)) ([fdc0391](https://github.com/amplitude/Amplitude-TypeScript/commit/fdc0391885ac9822f42324d2fd66a8aace001afe)) - update event results callback parameter ([#29](https://github.com/amplitude/Amplitude-TypeScript/issues/29)) ([1acd3c0](https://github.com/amplitude/Amplitude-TypeScript/commit/1acd3c02310e5e9a2b7ab19140f7d6249e9a8452)) - update logger config to logger provider ([#19](https://github.com/amplitude/Amplitude-TypeScript/issues/19)) ([ef89d9f](https://github.com/amplitude/Amplitude-TypeScript/commit/ef89d9f5ffdc9dd88c3652ac36705c79741f53d1)) - use config reference as plugin instance property ([#21](https://github.com/amplitude/Amplitude-TypeScript/issues/21)) ([38c2e33](https://github.com/amplitude/Amplitude-TypeScript/commit/38c2e3334b27063e23275c020207f647acbbaf6f)) ### Features - add amplitude built-in plugins ([#22](https://github.com/amplitude/Amplitude-TypeScript/issues/22)) ([443a424](https://github.com/amplitude/Amplitude-TypeScript/commit/443a424d6dfd3a2c867f528f953429151de96ed0)) - add context plugin ([#13](https://github.com/amplitude/Amplitude-TypeScript/issues/13)) ([3d63991](https://github.com/amplitude/Amplitude-TypeScript/commit/3d639917905b25cab0bb012286b8ba487d0f63fb)) - add EU and batch endpoint support ([#50](https://github.com/amplitude/Amplitude-TypeScript/issues/50)) ([af6be60](https://github.com/amplitude/Amplitude-TypeScript/commit/af6be606a0e049657129ddbcbbf83c3dff844443)) - add getter and setter for config and group ([#45](https://github.com/amplitude/Amplitude-TypeScript/issues/45)) ([60e0073](https://github.com/amplitude/Amplitude-TypeScript/commit/60e00734a73002dffc98ddf6171ee74c5ac53aa4)) - add identify class and handle identify logging ([#10](https://github.com/amplitude/Amplitude-TypeScript/issues/10)) ([9075b1f](https://github.com/amplitude/Amplitude-TypeScript/commit/9075b1f0cf4270dacc05b1b7f4bad36c50e2500b)) - add partner_id in event options ([#38](https://github.com/amplitude/Amplitude-TypeScript/issues/38)) ([880fe57](https://github.com/amplitude/Amplitude-TypeScript/commit/880fe57e5813d8bbe05c2a2a9428bd8a0a1e7d08)) - add serverZone check while calling getApiHost ([#51](https://github.com/amplitude/Amplitude-TypeScript/issues/51)) ([fa3014d](https://github.com/amplitude/Amplitude-TypeScript/commit/fa3014dd730e624b6320769edbdf35350d0edc3d)) - adds default logger provider ([#14](https://github.com/amplitude/Amplitude-TypeScript/issues/14)) ([c5c3d62](https://github.com/amplitude/Amplitude-TypeScript/commit/c5c3d62cf505e3df949a4225e3fa3ae2b56d5a0a)) - adds group identify api ([#18](https://github.com/amplitude/Amplitude-TypeScript/issues/18)) ([8871527](https://github.com/amplitude/Amplitude-TypeScript/commit/8871527fb74d0f5745c57a053492a00d19a68c5a)) - adds session management ([#15](https://github.com/amplitude/Amplitude-TypeScript/issues/15)) ([e23a563](https://github.com/amplitude/Amplitude-TypeScript/commit/e23a563c27befa5a3dc31ee55c559359e0159de3)) - analytics core initialization ([#2](https://github.com/amplitude/Amplitude-TypeScript/issues/2)) ([7ba8a7b](https://github.com/amplitude/Amplitude-TypeScript/commit/7ba8a7b1e9b7dfc0af304dd44718a3deb5912fe9)) - browser init config ([#6](https://github.com/amplitude/Amplitude-TypeScript/issues/6)) ([c5a0992](https://github.com/amplitude/Amplitude-TypeScript/commit/c5a09925e64f8a613eeab612ee6efb43419f39b4)) - core timeline implementation ([#3](https://github.com/amplitude/Amplitude-TypeScript/issues/3)) ([ac8bc3a](https://github.com/amplitude/Amplitude-TypeScript/commit/ac8bc3a7212c4e13240fca0da1fbca2cdf7d68c2)) - create browser folder structure ([#5](https://github.com/amplitude/Amplitude-TypeScript/issues/5)) ([b1b279d](https://github.com/amplitude/Amplitude-TypeScript/commit/b1b279da067af7a5ca0c797b4f45fc154e3c2ae4)) - create cookie/events storage providers ([#7](https://github.com/amplitude/Amplitude-TypeScript/issues/7)) ([b3d6fab](https://github.com/amplitude/Amplitude-TypeScript/commit/b3d6fab5239d0d14854af9aa8a0c31826447ac48)) - create transport providers (fetch/xhr/sendBeacon) ([#8](https://github.com/amplitude/Amplitude-TypeScript/issues/8)) ([5ad3477](https://github.com/amplitude/Amplitude-TypeScript/commit/5ad3477974c779d696088922f56cae38a89f911c)) - implement revenue ([#12](https://github.com/amplitude/Amplitude-TypeScript/issues/12)) ([dafd10e](https://github.com/amplitude/Amplitude-TypeScript/commit/dafd10e9feb84513bdcd415a965e3216b044206a)) - implement save events to storage on destination plugin ([#26](https://github.com/amplitude/Amplitude-TypeScript/issues/26)) ([5f47677](https://github.com/amplitude/Amplitude-TypeScript/commit/5f476773f0a546db15de45fc40725a138a037c97)) - implemented destination plugin with retry ([#4](https://github.com/amplitude/Amplitude-TypeScript/issues/4)) ([f4f085e](https://github.com/amplitude/Amplitude-TypeScript/commit/f4f085ed343ea3a0571c778f2d40d637573817d7)) - implements optOut config ([#30](https://github.com/amplitude/Amplitude-TypeScript/issues/30)) ([bdf1eb0](https://github.com/amplitude/Amplitude-TypeScript/commit/bdf1eb0c46f535947f66162639dd0b23f154ce28)) - improve browser config logic ([#56](https://github.com/amplitude/Amplitude-TypeScript/issues/56)) ([3054c68](https://github.com/amplitude/Amplitude-TypeScript/commit/3054c6856dd8f8ed49c9326f25c14b672890915b)) - update track event ([#25](https://github.com/amplitude/Amplitude-TypeScript/issues/25)) ([bcccd65](https://github.com/amplitude/Amplitude-TypeScript/commit/bcccd659f83bd235ce7cb59848e259e14e1df392)) ================================================ FILE: packages/analytics-core/README.md ================================================


# @amplitude/analytics-core Internal Node package for Amplitude ================================================ FILE: packages/analytics-core/jest.config.js ================================================ const baseConfig = require('../../jest.config.js'); const package = require('./package'); module.exports = { ...baseConfig, displayName: package.name, setupFiles: ['./test/setup.js'], rootDir: '.', testEnvironment: 'node', coveragePathIgnorePatterns: ['global-scope.ts', 'types/'], }; ================================================ FILE: packages/analytics-core/package.json ================================================ { "name": "@amplitude/analytics-core", "version": "2.48.1", "description": "", "author": "Amplitude Inc", "homepage": "https://github.com/amplitude/Amplitude-TypeScript", "license": "MIT", "main": "lib/cjs/index.js", "module": "lib/esm/index.js", "types": "lib/esm/index.d.ts", "sideEffects": false, "publishConfig": { "access": "public", "tag": "latest" }, "repository": { "type": "git", "url": "git+https://github.com/amplitude/Amplitude-TypeScript.git" }, "scripts": { "build": "pnpm build:es5 & pnpm build:esm", "build:es5": "tsc -p ./tsconfig.es5.json", "build:esm": "tsc -p ./tsconfig.esm.json", "watch": "tsc -p ./tsconfig.esm.json --watch", "clean": "rimraf node_modules lib coverage", "fix": "pnpm fix:eslint & pnpm fix:prettier", "fix:eslint": "eslint '{src,test}/**/*.ts' --fix", "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", "lint": "pnpm lint:eslint & pnpm lint:prettier", "lint:eslint": "eslint '{src,test}/**/*.ts'", "lint:prettier": "prettier --check \"{src,test}/**/*.ts\"", "test": "jest", "typecheck": "tsc -p ./tsconfig.json" }, "bugs": { "url": "https://github.com/amplitude/Amplitude-TypeScript/issues" }, "dependencies": { "@amplitude/analytics-connector": "^1.6.4", "@types/zen-observable": "0.8.3", "safe-json-stringify": "1.2.0", "tslib": "^2.4.1", "zen-observable": "0.10.0" }, "files": [ "lib" ], "devDependencies": { "@types/safe-json-stringify": "1.1.5" } } ================================================ FILE: packages/analytics-core/src/__mocks__/logger.ts ================================================ export class Logger { disable(): void { return undefined; } enable(): void { return undefined; } log(): void { return undefined; } warn(): void { return undefined; } error(): void { return undefined; } } ================================================ FILE: packages/analytics-core/src/analytics-connector.ts ================================================ import { AnalyticsConnector } from '@amplitude/analytics-connector'; import { DEFAULT_INSTANCE_NAME } from './types/constants'; export const getAnalyticsConnector = (instanceName = DEFAULT_INSTANCE_NAME): AnalyticsConnector => { return AnalyticsConnector.getInstance(instanceName); }; export const setConnectorUserId = (userId: string | undefined, instanceName?: string): void => { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore getAnalyticsConnector(instanceName).identityStore.editIdentity().setUserId(userId).commit(); }; export const setConnectorDeviceId = (deviceId: string, instanceName?: string): void => { getAnalyticsConnector(instanceName).identityStore.editIdentity().setDeviceId(deviceId).commit(); }; ================================================ FILE: packages/analytics-core/src/campaign/campaign-parser.ts ================================================ import { getQueryParams } from '../query-params'; import { UTM_CAMPAIGN, UTM_CONTENT, UTM_MEDIUM, UTM_SOURCE, UTM_TERM, GCLID, FBCLID, BASE_CAMPAIGN, DCLID, MSCLKID, RDT_CID, TWCLID, TTCLID, KO_CLICK_ID, LI_FAT_ID, GBRAID, WBRAID, UTM_ID, } from '../types/constants'; import { Campaign, ICampaignParser, ClickIdParameters, ReferrerParameters, UTMParameters } from '../types/campaign'; export class CampaignParser implements ICampaignParser { async parse(): Promise { return { ...BASE_CAMPAIGN, ...this.getUtmParam(), ...this.getReferrer(), ...this.getClickIds(), } as Campaign; } getUtmParam(): UTMParameters { const params = getQueryParams(); const utmCampaign = params[UTM_CAMPAIGN]; const utmContent = params[UTM_CONTENT]; const utmId = params[UTM_ID]; const utmMedium = params[UTM_MEDIUM]; const utmSource = params[UTM_SOURCE]; const utmTerm = params[UTM_TERM]; return { utm_campaign: utmCampaign, utm_content: utmContent, utm_id: utmId, utm_medium: utmMedium, utm_source: utmSource, utm_term: utmTerm, }; } getReferrer(): ReferrerParameters { const data: ReferrerParameters = { referrer: undefined, referring_domain: undefined, }; try { data.referrer = document.referrer || undefined; data.referring_domain = data.referrer?.split('/')[2] ?? undefined; } catch { // nothing to track } return data; } getClickIds(): ClickIdParameters { const params = getQueryParams(); return { [DCLID]: params[DCLID], [FBCLID]: params[FBCLID], [GBRAID]: params[GBRAID], [GCLID]: params[GCLID], [KO_CLICK_ID]: params[KO_CLICK_ID], [LI_FAT_ID]: params[LI_FAT_ID], [MSCLKID]: params[MSCLKID], [RDT_CID]: params[RDT_CID], [TTCLID]: params[TTCLID], [TWCLID]: params[TWCLID], [WBRAID]: params[WBRAID], }; } } ================================================ FILE: packages/analytics-core/src/config.ts ================================================ import { OfflineDisabled } from './types/offline'; import { ServerZoneType } from './types/server-zone'; import { Transport } from './types/transport'; import { Event } from './types/event/event'; import { Plan } from './types/event/plan'; import { IngestionMetadata } from './types/event/ingestion-metadata'; import { Storage } from './types/storage'; import { AMPLITUDE_SERVER_URL, AMPLITUDE_BATCH_SERVER_URL, EU_AMPLITUDE_SERVER_URL, EU_AMPLITUDE_BATCH_SERVER_URL, DEFAULT_INSTANCE_NAME, } from './types/constants'; import { Logger, ILogger } from './logger'; import { LogLevel } from './types/loglevel'; import { ConfigOptions, IRequestMetadata, IHistogramOptions, HistogramKey, IConfig } from './types/config/core-config'; export const getDefaultConfig = () => ({ flushMaxRetries: 12, flushQueueSize: 200, flushIntervalMillis: 10000, instanceName: DEFAULT_INSTANCE_NAME, logLevel: LogLevel.Warn, loggerProvider: new Logger(), offline: false, optOut: false, serverUrl: AMPLITUDE_SERVER_URL, serverZone: 'US' as ServerZoneType, useBatch: false, }); export class Config implements IConfig { apiKey: string; flushIntervalMillis: number; flushMaxRetries: number; flushQueueSize: number; instanceName?: string; loggerProvider: ILogger; logLevel: LogLevel; minIdLength?: number; offline?: boolean | typeof OfflineDisabled; plan?: Plan; ingestionMetadata?: IngestionMetadata; serverUrl: string | undefined; serverZone?: ServerZoneType; transportProvider: Transport; storageProvider?: Storage; useBatch: boolean; requestMetadata?: RequestMetadata; protected _optOut = false; get optOut() { return this._optOut; } set optOut(optOut: boolean) { this._optOut = optOut; } constructor(options: ConfigOptions) { const defaultConfig = getDefaultConfig(); this.apiKey = options.apiKey; this.flushIntervalMillis = options.flushIntervalMillis ?? defaultConfig.flushIntervalMillis; this.flushMaxRetries = options.flushMaxRetries || defaultConfig.flushMaxRetries; this.flushQueueSize = options.flushQueueSize || defaultConfig.flushQueueSize; this.instanceName = options.instanceName || defaultConfig.instanceName; this.loggerProvider = options.loggerProvider || defaultConfig.loggerProvider; this.logLevel = options.logLevel ?? defaultConfig.logLevel; this.minIdLength = options.minIdLength; this.plan = options.plan; this.ingestionMetadata = options.ingestionMetadata; this.offline = options.offline !== undefined ? options.offline : defaultConfig.offline; this.optOut = options.optOut ?? defaultConfig.optOut; this.serverUrl = options.serverUrl; this.serverZone = options.serverZone || defaultConfig.serverZone; this.storageProvider = options.storageProvider; this.transportProvider = options.transportProvider; this.useBatch = options.useBatch ?? defaultConfig.useBatch; this.loggerProvider.enable(this.logLevel); const serverConfig = createServerConfig(options.serverUrl, options.serverZone, options.useBatch); this.serverZone = serverConfig.serverZone; this.serverUrl = serverConfig.serverUrl; } } export const getServerUrl = (serverZone: ServerZoneType, useBatch: boolean) => { if (serverZone === 'EU') { return useBatch ? EU_AMPLITUDE_BATCH_SERVER_URL : EU_AMPLITUDE_SERVER_URL; } return useBatch ? AMPLITUDE_BATCH_SERVER_URL : AMPLITUDE_SERVER_URL; }; export const createServerConfig = ( serverUrl = '', serverZone: ServerZoneType = getDefaultConfig().serverZone, useBatch: boolean = getDefaultConfig().useBatch, ) => { if (serverUrl) { return { serverUrl, serverZone: undefined }; } const _serverZone = ['US', 'EU'].includes(serverZone) ? serverZone : getDefaultConfig().serverZone; return { serverZone: _serverZone, serverUrl: getServerUrl(_serverZone, useBatch), }; }; export class RequestMetadata implements IRequestMetadata { sdk: { metrics: { histogram: HistogramOptions; }; }; constructor() { this.sdk = { metrics: { histogram: {}, }, }; } recordHistogram(key: T, value: HistogramOptions[T]) { this.sdk.metrics.histogram[key] = value; } } class HistogramOptions implements IHistogramOptions { remote_config_fetch_time_IDB?: number; remote_config_fetch_time_API_success?: number; remote_config_fetch_time_API_fail?: number; } ================================================ FILE: packages/analytics-core/src/cookie-name.ts ================================================ import { AMPLITUDE_PREFIX } from './types/constants'; export const getCookieName = (apiKey: string, postKey = '', limit = 10) => { return [AMPLITUDE_PREFIX, postKey, apiKey.substring(0, limit)].filter(Boolean).join('_'); }; export const getOldCookieName = (apiKey: string) => { return `${AMPLITUDE_PREFIX.toLowerCase()}_${apiKey.substring(0, 6)}`; }; ================================================ FILE: packages/analytics-core/src/core-client.ts ================================================ import { Plugin } from './types/plugin'; import { IConfig } from './types/config/core-config'; import { BaseEvent, EventOptions } from './types/event/base-event'; import { Result } from './types/result'; import { Event, IdentifyOperation, IdentifyUserProperties, SpecialEventType, UserProperties, } from './types/event/event'; import { IIdentify, OrderedIdentifyOperations } from './identify'; import { IRevenue } from './revenue'; import { CLIENT_NOT_INITIALIZED, OPT_OUT_MESSAGE } from './types/messages'; import { Timeline } from './timeline'; import { createGroupEvent, createGroupIdentifyEvent, createIdentifyEvent, createRevenueEvent, createTrackEvent, } from './utils/event-builder'; import { buildResult } from './utils/result-builder'; import { returnWrapper } from './utils/return-wrapper'; import { CoreClient, PluginHost } from './types/client/core-client'; export class AmplitudeCore implements CoreClient, PluginHost { protected initializing = false; protected name: string; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore config: IConfig; // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore timeline: Timeline; isReady = false; protected q: Array = []; protected dispatchQ: Array = []; /** * Current user properties (operation-applied, flat key-value). * Only used by client-side SDKs; server SDKs may leave this undefined. */ userProperties: { [key: string]: any } | undefined; constructor(name = '$default') { this.timeline = new Timeline(this); this.name = name; } protected async _init(config: IConfig) { this.config = config; this.timeline.reset(this); this.timeline.loggerProvider = this.config.loggerProvider; await this.runQueuedFunctions('q'); this.isReady = true; } async runQueuedFunctions(queueName: 'q' | 'dispatchQ') { const queuedFunctions = this[queueName]; this[queueName] = []; for (const queuedFunction of queuedFunctions) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const val: ReturnType | Promise = queuedFunction(); if (val && 'promise' in val) { await val.promise; } else { await val; } } // Rerun queued functions if the queue has accrued more while awaiting promises if (this[queueName].length) { await this.runQueuedFunctions(queueName); } } track(eventInput: BaseEvent | string, eventProperties?: Record, eventOptions?: EventOptions) { const event = createTrackEvent(eventInput, eventProperties, eventOptions); // Update client user properties immediately and synchronously this.userProperties = this.getOperationAppliedUserProperties(event.user_properties); return returnWrapper(this.dispatch(event)); } logEvent = this.track.bind(this); identify(identify: IIdentify, eventOptions?: EventOptions) { const event = createIdentifyEvent(identify, eventOptions); // Update client user properties immediately and synchronously this.userProperties = this.getOperationAppliedUserProperties(event.user_properties); return returnWrapper(this.dispatch(event)); } groupIdentify(groupType: string, groupName: string | string[], identify: IIdentify, eventOptions?: EventOptions) { const event = createGroupIdentifyEvent(groupType, groupName, identify, eventOptions); return returnWrapper(this.dispatch(event)); } setGroup(groupType: string, groupName: string | string[], eventOptions?: EventOptions) { const event = createGroupEvent(groupType, groupName, eventOptions); // Update client user properties immediately and synchronously this.userProperties = this.getOperationAppliedUserProperties(event.user_properties); return returnWrapper(this.dispatch(event)); } revenue(revenue: IRevenue, eventOptions?: EventOptions) { const event = createRevenueEvent(revenue, eventOptions); return returnWrapper(this.dispatch(event)); } add(plugin: Plugin) { if (!this.isReady) { this.q.push(this._addPlugin.bind(this, plugin)); return returnWrapper(); } return this._addPlugin(plugin); } _addPlugin(plugin: Plugin) { return returnWrapper(this.timeline.register(plugin, this.config)); } remove(pluginName: string) { if (!this.isReady) { this.q.push(this._removePlugin.bind(this, pluginName)); return returnWrapper(); } return this._removePlugin(pluginName); } _removePlugin(pluginName: string) { return returnWrapper(this.timeline.deregister(pluginName, this.config)); } dispatchWithCallback(event: Event, callback: (result: Result) => void): void { if (!this.isReady) { return callback(buildResult(event, 0, CLIENT_NOT_INITIALIZED)); } void this.process(event).then(callback); } async dispatch(event: Event): Promise { if (!this.isReady) { return new Promise((resolve) => { this.dispatchQ.push(this.dispatchWithCallback.bind(this, event, resolve)); }); } return this.process(event); } /** * * This method applies identify operations to user properties and * returns a single object representing the final user property state. * * This is a best-effort api that only supports $set, $clearAll, and $unset. * Other operations are not supported and are ignored. * * Operations are applied on top of current client state (this.userProperties). * * @param userProperties The new user properties object from identify() or setIdentity(). * @returns A key-value object user properties without operations. * * @example * Input: * { * $set: { plan: 'premium' }, * custom_flag: true * } * * Output: * { * plan: 'premium', * custom_flag: true * } */ getOperationAppliedUserProperties(userProperties: UserProperties | undefined): { [key: string]: any } { const base = this.userProperties ?? {}; const updatedProperties: { [key: string]: any } = { ...base }; if (userProperties === undefined) { return updatedProperties; } // Keep non-operation keys for later merge const nonOpProperties: { [key in Exclude]: any; } = {}; Object.keys(userProperties).forEach((key) => { if (!Object.values(IdentifyOperation).includes(key as IdentifyOperation)) { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment nonOpProperties[key] = userProperties[key]; } }); OrderedIdentifyOperations.forEach((operation) => { // Skip when key is an operation. if (!Object.keys(userProperties).includes(operation)) return; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const opProperties: IdentifyUserProperties = userProperties[operation]; switch (operation) { case IdentifyOperation.CLEAR_ALL: // Due to operation order, the following line will never execute. /* istanbul ignore next */ Object.keys(updatedProperties).forEach((prop) => { delete updatedProperties[prop]; }); break; case IdentifyOperation.UNSET: Object.keys(opProperties).forEach((prop) => { delete updatedProperties[prop]; }); break; case IdentifyOperation.SET: Object.assign(updatedProperties, opProperties); break; } }); // Merge non-operation properties. // Custom properties should not be affected by operations. // https://github.com/amplitude/nova/blob/343f678ded83c032e83b189796b3c2be161b48f5/src/main/java/com/amplitude/userproperty/model/ModifyUserPropertiesIdent.java#L79-L83 Object.assign(updatedProperties, nonOpProperties); return updatedProperties; } async process(event: Event): Promise { try { // skip event processing if opt out if (this.config.optOut) { return buildResult(event, 0, OPT_OUT_MESSAGE); } if (event.event_type === SpecialEventType.IDENTIFY) { // Do not update this.userProperties here. // It is only set synchronously in identify() or setIdentity() this.timeline.onIdentityChanged({ userProperties: this.userProperties }); } const result = await this.timeline.push(event); result.code === 200 ? this.config.loggerProvider.log(result.message) : result.code === 100 ? this.config.loggerProvider.warn(result.message) : this.config.loggerProvider.error(result.message); return result; } catch (e) { const message = String(e); this.config.loggerProvider.error(message); const result = buildResult(event, 0, message); return result; } } setOptOut(optOut: boolean) { if (!this.isReady) { this.q.push(this._setOptOut.bind(this, Boolean(optOut))); return; } this._setOptOut(optOut); } _setOptOut(optOut: boolean) { if (this.config.optOut !== optOut) { this.config.optOut = Boolean(optOut); this.timeline.onOptOutChanged(optOut); } } flush() { return returnWrapper(this.timeline.flush()); } plugin(name: string): Plugin | undefined { const plugin = this.timeline.plugins.find((plugin) => plugin.name === name); if (plugin === undefined) { this.config.loggerProvider.debug(`Cannot find plugin with name ${name}`); return undefined; } return plugin; } plugins(pluginClass: { new (...args: any[]): T }): T[] { return this.timeline.plugins.filter((plugin) => plugin instanceof pluginClass) as T[]; } } ================================================ FILE: packages/analytics-core/src/diagnostics/diagnostics-client.ts ================================================ import { ILogger } from '../logger'; import { DiagnosticsStorage, IDiagnosticsStorage } from './diagnostics-storage'; import { ServerZoneType } from '../types/server-zone'; import { getGlobalScope } from '../global-scope'; import { isTimestampInSampleTemp } from '../utils/sampling'; import { enableSdkErrorListeners } from './uncaught-sdk-errors'; export const SAVE_INTERVAL_MS = 1000; // 1 second export const FLUSH_INTERVAL_MS = 5 * 60 * 1000; // 5 minutes export const DIAGNOSTICS_US_SERVER_URL = 'https://diagnostics.prod.us-west-2.amplitude.com/v1/capture'; export const DIAGNOSTICS_EU_SERVER_URL = 'https://diagnostics.prod.eu-central-1.amplitude.com/v1/capture'; // In-memory storage limits export const MAX_MEMORY_STORAGE_COUNT = 10000; // for tags, counters, histograms separately export const MAX_MEMORY_STORAGE_EVENTS_COUNT = 10; // === Core Data Types === /** * Key-value pairs for environment/context information */ type DiagnosticsTags = Record; /** * Numeric counters that can be incremented */ type DiagnosticsCounters = Record; /** * Properties for diagnostic events */ type EventProperties = Record; /** * Individual diagnostic event */ interface DiagnosticsEvent { readonly event_name: string; readonly time: number; readonly event_properties: EventProperties; } /** * Computed histogram statistics for final payload */ interface HistogramResult { readonly count: number; readonly min: number; readonly max: number; readonly avg: number; } /** * Internal histogram statistics with sum for efficient incremental updates */ export interface HistogramStats { count: number; min: number; max: number; sum: number; // Used for avg calculation } /** * Collection of histogram results keyed by histogram name */ type DiagnosticsHistograms = Record; /** * Collection of histogram stats keyed by histogram name (internal use for memory + persistence storage) */ type DiagnosticsHistogramStats = Record; // === Payload Types === /** * Complete diagnostics payload sent to backend */ interface FlushPayload { readonly tags: DiagnosticsTags; readonly histogram: DiagnosticsHistograms; readonly counters: DiagnosticsCounters; readonly events: readonly DiagnosticsEvent[]; } /** * Amplitude Diagnostics Client * * A client for collecting and managing diagnostics data including tags, counters, * histograms, and events. Data is stored persistently using IndexedDB to survive browser restarts and offline scenarios. * * Key Features: * - IndexedDB storage * - Time-based persistent storage flush interval (5 minutes since last flush) * - 1 second time-based memory storage flush to persistent storage * - Histogram statistics calculation (min, max, avg) */ export interface IDiagnosticsClient { /** * Set or update a tag * * @example * ```typescript * // Set environment tags * diagnostics.setTag('library', 'amplitude-typescript/2.0.0'); * diagnostics.setTag('user_agent', navigator.userAgent); * ``` */ setTag(name: string, value: string): void; /** * Increment a counter. If doesn't exist, create a counter and set value to 1 * * @example * ```typescript * // Track counters * diagnostics.increment('analytics.fileNotFound'); * diagnostics.increment('network.retry', 3); * ``` */ increment(name: string, size?: number): void; /** * Record a histogram value * * @example * ```typescript * // Record performance metrics * diagnostics.recordHistogram('sr.time', 5.2); * diagnostics.recordHistogram('network.latency', 150); * ``` */ recordHistogram(name: string, value: number): void; /** * Record an event * * @example * ```typescript * // Record diagnostic events * diagnostics.recordEvent('error', { * stack_trace: '...', * }); * ``` */ recordEvent(name: string, properties: EventProperties): void; // Flush storage _flush(): void; /** * Sets the sample rate for diagnostics. * * @example * ```typescript * diagnostics.setSampleRate(0.5); * ``` */ _setSampleRate(sampleRate: number): void; } export class DiagnosticsClient implements IDiagnosticsClient { storage?: IDiagnosticsStorage; logger: ILogger; serverUrl: string; apiKey: string; // Whether to track diagnostics data based on sample rate and enabled flag shouldTrack: boolean; config: { enabled: boolean; sampleRate: number; }; /** * The timestamp when the diagnostics client was initialized. * Save in memory to keep lifecycle sample rate calculation consistency. */ startTimestamp: number; // In-memory storages inMemoryTags: DiagnosticsTags = {}; inMemoryCounters: DiagnosticsCounters = {}; inMemoryHistograms: DiagnosticsHistogramStats = {}; inMemoryEvents: DiagnosticsEvent[] = []; // Timer for 1-second persistence saveTimer: ReturnType | null = null; // Timer for flush interval flushTimer: ReturnType | null = null; constructor( apiKey: string, logger: ILogger, serverZone: ServerZoneType = 'US', options?: { enabled?: boolean; sampleRate?: number; }, ) { this.apiKey = apiKey; this.logger = logger; this.serverUrl = serverZone === 'US' ? DIAGNOSTICS_US_SERVER_URL : DIAGNOSTICS_EU_SERVER_URL; this.logger.debug('DiagnosticsClient: Initializing with options', JSON.stringify(options, null, 2)); // Diagnostics is enabled by default with sample rate of 0 (no sampling) this.config = { enabled: true, sampleRate: 0, ...options }; this.startTimestamp = Date.now(); this.shouldTrack = isTimestampInSampleTemp(this.startTimestamp, this.config.sampleRate) && this.config.enabled; if (DiagnosticsStorage.isSupported()) { this.storage = new DiagnosticsStorage(apiKey, logger); } else { this.logger.debug('DiagnosticsClient: IndexedDB is not supported'); } void this.initializeFlushInterval(); // Track internal diagnostics metrics for sampling if (this.shouldTrack) { this.increment('sdk.diagnostics.sampled.in.and.enabled'); enableSdkErrorListeners(this); } } /** * Check if storage is available and tracking is enabled */ isStorageAndTrackEnabled(): boolean { return Boolean(this.storage) && Boolean(this.shouldTrack); } setTag(name: string, value: string) { if (!this.isStorageAndTrackEnabled()) { return; } if (Object.keys(this.inMemoryTags).length >= MAX_MEMORY_STORAGE_COUNT) { this.logger.debug('DiagnosticsClient: Early return setTags as reaching memory limit'); return; } this.inMemoryTags[name] = value; this.startTimersIfNeeded(); } increment(name: string, size = 1) { if (!this.isStorageAndTrackEnabled()) { return; } if (Object.keys(this.inMemoryCounters).length >= MAX_MEMORY_STORAGE_COUNT) { this.logger.debug('DiagnosticsClient: Early return increment as reaching memory limit'); return; } this.inMemoryCounters[name] = (this.inMemoryCounters[name] || 0) + size; this.startTimersIfNeeded(); } recordHistogram(name: string, value: number) { if (!this.isStorageAndTrackEnabled()) { return; } if (Object.keys(this.inMemoryHistograms).length >= MAX_MEMORY_STORAGE_COUNT) { this.logger.debug('DiagnosticsClient: Early return recordHistogram as reaching memory limit'); return; } const existing = this.inMemoryHistograms[name]; if (existing) { // Update existing stats incrementally existing.count += 1; existing.min = Math.min(existing.min, value); existing.max = Math.max(existing.max, value); existing.sum += value; } else { // Create new stats this.inMemoryHistograms[name] = { count: 1, min: value, max: value, sum: value, }; } this.startTimersIfNeeded(); } recordEvent(name: string, properties: EventProperties) { if (!this.isStorageAndTrackEnabled()) { return; } if (this.inMemoryEvents.length >= MAX_MEMORY_STORAGE_EVENTS_COUNT) { this.logger.debug('DiagnosticsClient: Early return recordEvent as reaching memory limit'); return; } this.inMemoryEvents.push({ event_name: name, time: Date.now(), event_properties: properties, }); this.startTimersIfNeeded(); } startTimersIfNeeded() { if (!this.saveTimer) { this.saveTimer = setTimeout(() => { this.saveAllDataToStorage() .catch((error) => { this.logger.debug('DiagnosticsClient: Failed to save all data to storage', error); }) .finally(() => { this.saveTimer = null; }); }, SAVE_INTERVAL_MS); } if (!this.flushTimer) { this.flushTimer = setTimeout(() => { this._flush() .catch((error) => { this.logger.debug('DiagnosticsClient: Failed to flush', error); }) .finally(() => { this.flushTimer = null; }); }, FLUSH_INTERVAL_MS); } } async saveAllDataToStorage() { if (!this.storage) { return; } const tagsToSave = { ...this.inMemoryTags }; const countersToSave = { ...this.inMemoryCounters }; const histogramsToSave = { ...this.inMemoryHistograms }; const eventsToSave = [...this.inMemoryEvents]; this.inMemoryEvents = []; this.inMemoryTags = {}; this.inMemoryCounters = {}; this.inMemoryHistograms = {}; await Promise.all([ this.storage.setTags(tagsToSave), this.storage.incrementCounters(countersToSave), this.storage.setHistogramStats(histogramsToSave), this.storage.addEventRecords(eventsToSave), ]); } async _flush() { if (!this.storage) { return; } await this.saveAllDataToStorage(); this.saveTimer = null; this.flushTimer = null; // Get all data from storage and clear it const { tags: tagRecords, counters: counterRecords, histogramStats: histogramStatsRecords, events: eventRecords, } = await this.storage.getAllAndClear(); // Update the last flush timestamp void this.storage.setLastFlushTimestamp(Date.now()); // Convert metrics to the expected format const tags: DiagnosticsTags = {}; tagRecords.forEach((record) => { tags[record.key] = record.value; }); const counters: DiagnosticsCounters = {}; counterRecords.forEach((record) => { counters[record.key] = record.value; }); const histogram: DiagnosticsHistograms = {}; histogramStatsRecords.forEach((stats) => { histogram[stats.key] = { count: stats.count, min: stats.min, max: stats.max, avg: Math.round((stats.sum / stats.count) * 100) / 100, // round the average to 2 decimal places. }; }); const events: DiagnosticsEvent[] = eventRecords.map((record) => ({ event_name: record.event_name, time: record.time, event_properties: record.event_properties, })); // Early return if all data collections are empty if (Object.keys(counters).length === 0 && Object.keys(histogram).length === 0 && events.length === 0) { return; } // Create flush payload const payload: FlushPayload = { tags, histogram, counters, events, }; // Send payload to diagnostics server void this.fetch(payload); } /** * Send diagnostics data to the server */ async fetch(payload: FlushPayload) { try { if (!getGlobalScope()) { throw new Error('DiagnosticsClient: Fetch is not supported'); } const response = await fetch(this.serverUrl, { method: 'POST', headers: { 'X-ApiKey': this.apiKey, 'Content-Type': 'application/json', }, body: JSON.stringify(payload), }); if (!response.ok) { this.logger.debug('DiagnosticsClient: Failed to send diagnostics data.'); return; } this.logger.debug('DiagnosticsClient: Successfully sent diagnostics data'); } catch (error) { this.logger.debug('DiagnosticsClient: Failed to send diagnostics data. ', error); } } /** * Initialize flush interval logic. * Check if 5 minutes has passed since last flush, if so flush immediately. * Otherwise set a timer to flush when the interval is reached. */ async initializeFlushInterval() { if (!this.storage) { return; } const now = Date.now(); const lastFlushTimestamp = (await this.storage.getLastFlushTimestamp()) || -1; // If last flush timestamp is -1, it means this is a new client // Save current timestamp as the initial "last flush timestamp" // and schedule the flush timer if (lastFlushTimestamp === -1) { void this.storage.setLastFlushTimestamp(now); this._setFlushTimer(FLUSH_INTERVAL_MS); return; } const timeSinceLastFlush = now - lastFlushTimestamp; if (timeSinceLastFlush >= FLUSH_INTERVAL_MS) { // More than 5 minutes has passed, flush immediately void this._flush(); return; } else { // Set timer for remaining time this._setFlushTimer(FLUSH_INTERVAL_MS - timeSinceLastFlush); } } /** * Helper method to set flush timer with consistent error handling */ private _setFlushTimer(delay: number) { this.flushTimer = setTimeout(() => { this._flush() .catch((error) => { this.logger.debug('DiagnosticsClient: Failed to flush', error); }) .finally(() => { this.flushTimer = null; }); }, delay); } _setSampleRate(sampleRate: number): void { this.logger.debug('DiagnosticsClient: Setting sample rate to', sampleRate); this.config.sampleRate = sampleRate; this.shouldTrack = isTimestampInSampleTemp(this.startTimestamp, this.config.sampleRate) && this.config.enabled; this.logger.debug('DiagnosticsClient: Should track is', this.shouldTrack); } } ================================================ FILE: packages/analytics-core/src/diagnostics/diagnostics-storage.ts ================================================ import { getGlobalScope } from '../global-scope'; import { ILogger } from '../logger'; import { HistogramStats } from './diagnostics-client'; const MAX_PERSISTENT_STORAGE_EVENTS_COUNT = 10; // Database configuration const DB_VERSION = 1; // Table names for different diagnostics types export const TABLE_NAMES = { TAGS: 'tags', COUNTERS: 'counters', HISTOGRAMS: 'histograms', EVENTS: 'events', INTERNAL: 'internal', // New table for internal storage like flush timestamps } as const; // Keys for internal storage table export const INTERNAL_KEYS = { LAST_FLUSH_TIMESTAMP: 'last_flush_timestamp', } as const; // Record interfaces for each table export interface TagRecord { key: string; value: string; } export interface CounterRecord { key: string; value: number; } export interface HistogramRecord { key: string; count: number; min: number; max: number; sum: number; } export interface EventRecord { id?: number; // Auto-increment primary key event_name: string; time: number; event_properties: Record; } export interface InternalRecord { key: string; value: string; } export interface IDiagnosticsStorage { /** * Set multiple tags in a single transaction (batch operation) * Promise never rejects - errors are logged and operation continues gracefully */ setTags(tags: Record): Promise; /** * Increment multiple counters in a single transaction (batch operation) * Uses read-modify-write pattern to accumulate with existing values * Promise never rejects - errors are logged and operation continues gracefully */ incrementCounters(counters: Record): Promise; /** * Set multiple histogram stats in a single transaction (batch operation) * Uses read-modify-write pattern to accumulate count/sum and update min/max with existing values * Promise never rejects - errors are logged and operation continues gracefully */ setHistogramStats( histogramStats: Record, ): Promise; /** * Add multiple event records in a single transaction (batch operation) * Promise never rejects - errors are logged and operation continues gracefully */ addEventRecords( events: Array<{ event_name: string; time: number; event_properties: Record }>, ): Promise; setLastFlushTimestamp(timestamp: number): Promise; getLastFlushTimestamp(): Promise; /** * Get all data except internal data from storage and clear it */ getAllAndClear(): Promise<{ tags: TagRecord[]; counters: CounterRecord[]; histogramStats: HistogramRecord[]; events: EventRecord[]; }>; } /** * Purpose-specific IndexedDB storage for diagnostics data * Provides optimized methods for each type of diagnostics data */ export class DiagnosticsStorage implements IDiagnosticsStorage { dbPromise: Promise | null = null; dbName: string; logger: ILogger; constructor(apiKey: string, logger: ILogger) { this.logger = logger; this.dbName = `AMP_diagnostics_${apiKey.substring(0, 10)}`; } /** * Check if IndexedDB is supported in the current environment * @returns true if IndexedDB is available, false otherwise */ static isSupported(): boolean { return getGlobalScope()?.indexedDB !== undefined; } async getDB(): Promise { if (!this.dbPromise) { this.dbPromise = this.openDB(); } return this.dbPromise; } openDB(): Promise { return new Promise((resolve, reject) => { const request = indexedDB.open(this.dbName, DB_VERSION); request.onerror = () => { // Clear dbPromise when it rejects for the first time this.dbPromise = null; reject(new Error('Failed to open IndexedDB')); }; request.onsuccess = () => { const db = request.result; // Clear dbPromise when connection was on but went off later db.onclose = () => { this.dbPromise = null; this.logger.debug('DiagnosticsStorage: DB connection closed.'); }; db.onerror = (event) => { this.logger.debug('DiagnosticsStorage: A global database error occurred.', event); db.close(); }; resolve(db); }; request.onupgradeneeded = (event) => { const db = (event.target as IDBOpenDBRequest).result; this.createTables(db); }; }); } createTables(db: IDBDatabase): void { // Create tags table if (!db.objectStoreNames.contains(TABLE_NAMES.TAGS)) { db.createObjectStore(TABLE_NAMES.TAGS, { keyPath: 'key' }); } // Create counters table if (!db.objectStoreNames.contains(TABLE_NAMES.COUNTERS)) { db.createObjectStore(TABLE_NAMES.COUNTERS, { keyPath: 'key' }); } // Create histograms table for storing histogram stats (count, min, max, sum) if (!db.objectStoreNames.contains(TABLE_NAMES.HISTOGRAMS)) { db.createObjectStore(TABLE_NAMES.HISTOGRAMS, { keyPath: 'key', }); } // Create events table if (!db.objectStoreNames.contains(TABLE_NAMES.EVENTS)) { const eventsStore = db.createObjectStore(TABLE_NAMES.EVENTS, { keyPath: 'id', autoIncrement: true, }); // Create index on time for chronological queries eventsStore.createIndex('time_idx', 'time', { unique: false }); } // Create internal table for storing internal data like flush timestamps if (!db.objectStoreNames.contains(TABLE_NAMES.INTERNAL)) { db.createObjectStore(TABLE_NAMES.INTERNAL, { keyPath: 'key' }); } } async setTags(tags: Record): Promise { try { if (Object.entries(tags).length === 0) { return; } const db = await this.getDB(); const transaction = db.transaction([TABLE_NAMES.TAGS], 'readwrite'); const store = transaction.objectStore(TABLE_NAMES.TAGS); return new Promise((resolve) => { const entries = Object.entries(tags); transaction.oncomplete = () => { resolve(); }; transaction.onabort = (event) => { this.logger.debug('DiagnosticsStorage: Failed to set tags', event); resolve(); }; entries.forEach(([key, value]) => { const putRequest = store.put({ key, value }); putRequest.onerror = (event) => { this.logger.debug('DiagnosticsStorage: Failed to set tag', key, value, event); }; }); }); } catch (error) { this.logger.debug('DiagnosticsStorage: Failed to set tags', error); } } async incrementCounters(counters: Record): Promise { try { if (Object.entries(counters).length === 0) { return; } const db = await this.getDB(); const transaction = db.transaction([TABLE_NAMES.COUNTERS], 'readwrite'); const store = transaction.objectStore(TABLE_NAMES.COUNTERS); return new Promise((resolve) => { const entries = Object.entries(counters); transaction.oncomplete = () => { resolve(); }; transaction.onabort = (event) => { this.logger.debug('DiagnosticsStorage: Failed to increment counters', event); resolve(); }; // Read existing values and update them entries.forEach(([key, incrementValue]) => { const getRequest = store.get(key); getRequest.onsuccess = () => { const existingRecord = getRequest.result as CounterRecord | undefined; /* istanbul ignore next */ const existingValue = existingRecord ? existingRecord.value : 0; const putRequest = store.put({ key, value: existingValue + incrementValue }); putRequest.onerror = (event) => { this.logger.debug('DiagnosticsStorage: Failed to update counter', key, event); }; }; getRequest.onerror = (event) => { this.logger.debug('DiagnosticsStorage: Failed to read existing counter', key, event); }; }); }); } catch (error) { this.logger.debug('DiagnosticsStorage: Failed to increment counters', error); } } async setHistogramStats(histogramStats: Record): Promise { try { if (Object.entries(histogramStats).length === 0) { return; } const db = await this.getDB(); const transaction = db.transaction([TABLE_NAMES.HISTOGRAMS], 'readwrite'); const store = transaction.objectStore(TABLE_NAMES.HISTOGRAMS); return new Promise((resolve) => { const entries = Object.entries(histogramStats); transaction.oncomplete = () => { resolve(); }; transaction.onabort = (event) => { this.logger.debug('DiagnosticsStorage: Failed to set histogram stats', event); resolve(); }; // Read existing values and update them entries.forEach(([key, newStats]) => { const getRequest = store.get(key); getRequest.onsuccess = () => { const existingRecord = getRequest.result as HistogramRecord | undefined; let updatedStats: HistogramRecord; /* istanbul ignore next */ if (existingRecord) { // Accumulate with existing stats updatedStats = { key, count: existingRecord.count + newStats.count, min: Math.min(existingRecord.min, newStats.min), max: Math.max(existingRecord.max, newStats.max), sum: existingRecord.sum + newStats.sum, }; } else { // Create new stats updatedStats = { key, count: newStats.count, min: newStats.min, max: newStats.max, sum: newStats.sum, }; } const putRequest = store.put(updatedStats); putRequest.onerror = (event) => { this.logger.debug('DiagnosticsStorage: Failed to set histogram stats', key, event); }; }; getRequest.onerror = (event) => { this.logger.debug('DiagnosticsStorage: Failed to read existing histogram stats', key, event); }; }); }); } catch (error) { this.logger.debug('DiagnosticsStorage: Failed to set histogram stats', error); } } async addEventRecords( events: Array<{ event_name: string; time: number; event_properties: Record }>, ): Promise { try { if (events.length === 0) { return; } const db = await this.getDB(); const transaction = db.transaction([TABLE_NAMES.EVENTS], 'readwrite'); const store = transaction.objectStore(TABLE_NAMES.EVENTS); return new Promise((resolve) => { transaction.oncomplete = () => { resolve(); }; /* istanbul ignore next */ transaction.onabort = (event) => { this.logger.debug('DiagnosticsStorage: Failed to add event records', event); resolve(); }; // First, check how many events are currently stored const countRequest = store.count(); countRequest.onsuccess = () => { const currentCount = countRequest.result; // Calculate how many events we can add const availableSlots = Math.max(0, MAX_PERSISTENT_STORAGE_EVENTS_COUNT - currentCount); if (availableSlots < events.length) { this.logger.debug( `DiagnosticsStorage: Only added ${availableSlots} of ${events.length} events due to storage limit`, ); } // Only add events up to the available slots (take the least recent ones) events.slice(0, availableSlots).forEach((event) => { const request = store.add(event); request.onerror = (event) => { this.logger.debug('DiagnosticsStorage: Failed to add event record', event); }; }); }; countRequest.onerror = (event) => { this.logger.debug('DiagnosticsStorage: Failed to count existing events', event); }; }); } catch (error) { this.logger.debug('DiagnosticsStorage: Failed to add event records', error); } } async setInternal(key: string, value: string): Promise { try { const db = await this.getDB(); const transaction = db.transaction([TABLE_NAMES.INTERNAL], 'readwrite'); const store = transaction.objectStore(TABLE_NAMES.INTERNAL); return new Promise((resolve, reject) => { /* istanbul ignore next */ transaction.onabort = () => reject(new Error('Failed to set internal value')); const request = store.put({ key, value }); request.onsuccess = () => resolve(); /* istanbul ignore next */ request.onerror = () => reject(new Error('Failed to set internal value')); }); } catch (error) { /* istanbul ignore next */ this.logger.debug('DiagnosticsStorage: Failed to set internal value', error); } } async getInternal(key: string): Promise { try { const db = await this.getDB(); const transaction = db.transaction([TABLE_NAMES.INTERNAL], 'readonly'); const store = transaction.objectStore(TABLE_NAMES.INTERNAL); return new Promise((resolve, reject) => { /* istanbul ignore next */ transaction.onabort = () => reject(new Error('Failed to get internal value')); const request = store.get(key); request.onsuccess = () => resolve(request.result as InternalRecord | undefined); /* istanbul ignore next */ request.onerror = () => reject(new Error('Failed to get internal value')); }); } catch (error) { this.logger.debug('DiagnosticsStorage: Failed to get internal value', error); return undefined; } } async getLastFlushTimestamp(): Promise { try { const record = await this.getInternal(INTERNAL_KEYS.LAST_FLUSH_TIMESTAMP); return record ? parseInt(record.value, 10) : undefined; } catch (error) { /* istanbul ignore next */ this.logger.debug('DiagnosticsStorage: Failed to get last flush timestamp', error); /* istanbul ignore next */ return undefined; } } async setLastFlushTimestamp(timestamp: number): Promise { try { await this.setInternal(INTERNAL_KEYS.LAST_FLUSH_TIMESTAMP, timestamp.toString()); } catch (error) { /* istanbul ignore next */ this.logger.debug('DiagnosticsStorage: Failed to set last flush timestamp', error); } } /* istanbul ignore next */ clearTable(transaction: IDBTransaction, tableName: string): Promise { return new Promise((resolve, reject) => { const store = transaction.objectStore(tableName); const request = store.clear(); request.onsuccess = () => resolve(); request.onerror = () => reject(new Error(`Failed to clear table ${tableName}`)); }); } /* istanbul ignore next */ async getAllAndClear(): Promise<{ tags: TagRecord[]; counters: CounterRecord[]; histogramStats: HistogramRecord[]; events: EventRecord[]; }> { try { const db = await this.getDB(); const transaction = db.transaction( [TABLE_NAMES.TAGS, TABLE_NAMES.COUNTERS, TABLE_NAMES.HISTOGRAMS, TABLE_NAMES.EVENTS], 'readwrite', ); // Get all data first const [tags, counters, histogramStats, events] = await Promise.all([ this.getAllFromStore(transaction, TABLE_NAMES.TAGS), this.getAllFromStore(transaction, TABLE_NAMES.COUNTERS), this.getAllFromStore(transaction, TABLE_NAMES.HISTOGRAMS), this.getAllFromStore(transaction, TABLE_NAMES.EVENTS), ]); // Clear all data in the same transaction await Promise.all([ this.clearTable(transaction, TABLE_NAMES.COUNTERS), this.clearTable(transaction, TABLE_NAMES.HISTOGRAMS), this.clearTable(transaction, TABLE_NAMES.EVENTS), ]); return { tags, counters, histogramStats, events }; } catch (error) { this.logger.debug('DiagnosticsStorage: Failed to get all and clear data', error); return { tags: [], counters: [], histogramStats: [], events: [] }; } } /** * Helper method to get all records from a store within a transaction */ /* istanbul ignore next */ private getAllFromStore(transaction: IDBTransaction, tableName: string): Promise { return new Promise((resolve, reject) => { const store = transaction.objectStore(tableName); const request = store.getAll(); request.onsuccess = () => resolve(request.result as T[]); request.onerror = () => reject(new Error(`Failed to get all from ${tableName}`)); }); } } ================================================ FILE: packages/analytics-core/src/diagnostics/uncaught-sdk-errors.ts ================================================ import { getGlobalScope } from '../global-scope'; import { IDiagnosticsClient } from './diagnostics-client'; type ErrorEventType = 'error' | 'unhandledrejection'; interface CapturedErrorContext { readonly type: ErrorEventType; readonly message: string; readonly stack?: string; readonly filename?: string; readonly errorName?: string; readonly metadata?: Record; } export const GLOBAL_KEY = '__AMPLITUDE_SCRIPT_URL__'; export const EVENT_NAME_ERROR_UNCAUGHT = 'sdk.error.uncaught'; const getNormalizedScriptUrls = (): string[] => { const scope = getGlobalScope() as Record | null; /* istanbul ignore next */ if (!scope) { return []; } const value = scope[GLOBAL_KEY]; if (Array.isArray(value)) { return value as string[]; } /* istanbul ignore next - legacy single URL stored as string */ if (typeof value === 'string') { return [value]; } return []; }; const addNormalizedScriptUrl = (url: string) => { const scope = getGlobalScope() as Record | null; /* istanbul ignore next */ if (!scope) { return; } const urls = getNormalizedScriptUrls(); if (!urls.includes(url)) { urls.push(url); scope[GLOBAL_KEY] = urls; } }; export const registerSdkLoaderMetadata = (metadata: { scriptUrl?: string }) => { if (metadata.scriptUrl) { const normalized = normalizeUrl(metadata.scriptUrl); if (normalized) { addNormalizedScriptUrl(normalized); } } }; export const enableSdkErrorListeners = (client: IDiagnosticsClient) => { const scope = getGlobalScope(); if (!scope || typeof scope.addEventListener !== 'function') { return; } const handleError = (event: ErrorEvent) => { const error = event.error instanceof Error ? event.error : undefined; const stack = error?.stack; const match = detectSdkOrigin({ filename: event.filename, stack }); if (!match) { return; } capture({ type: 'error', message: event.message, stack, filename: event.filename, errorName: error?.name, metadata: { colno: event.colno, lineno: event.lineno, isTrusted: event.isTrusted, matchReason: match, }, }); }; const handleRejection = (event: PromiseRejectionEvent) => { const error = event.reason instanceof Error ? event.reason : undefined; const stack = error?.stack; const filename = extractFilenameFromStack(stack); const match = detectSdkOrigin({ filename, stack }); if (!match) { return; } /* istanbul ignore next */ capture({ type: 'unhandledrejection', message: error?.message ?? stringifyReason(event.reason), stack, filename, errorName: error?.name, metadata: { isTrusted: event.isTrusted, matchReason: match, }, }); }; const capture = (context: CapturedErrorContext) => { client.recordEvent(EVENT_NAME_ERROR_UNCAUGHT, { type: context.type, message: context.message, filename: context.filename, error_name: context.errorName, stack: context.stack, ...context.metadata, }); }; scope.addEventListener('error', handleError, true); scope.addEventListener('unhandledrejection', handleRejection, true); }; const detectSdkOrigin = (payload: { filename?: string; stack?: string }): 'filename' | 'stack' | undefined => { const normalizedScriptUrls = getNormalizedScriptUrls(); if (normalizedScriptUrls.length === 0) { return undefined; } for (const normalizedScriptUrl of normalizedScriptUrls) { if (payload.filename && payload.filename.includes(normalizedScriptUrl)) { return 'filename'; } if (payload.stack && payload.stack.includes(normalizedScriptUrl)) { return 'stack'; } } return undefined; }; const normalizeUrl = (value: string) => { try { /* istanbul ignore next */ const url = new URL(value, getGlobalScope()?.location?.origin); return url.origin + url.pathname; } catch { return undefined; } }; const extractFilenameFromStack = (stack?: string) => { if (!stack) { return undefined; } const match = stack.match(/(https?:\/\/\S+?)(?=[)\s]|$)/); /* istanbul ignore next */ return match ? match[1] : undefined; }; /* istanbul ignore next */ const stringifyReason = (reason: unknown) => { if (typeof reason === 'string') { return reason; } try { return JSON.stringify(reason); } catch { return '[object Object]'; } }; ================================================ FILE: packages/analytics-core/src/event-bridge/event-bridge-channel.ts ================================================ import { IEventBridgeReceiver } from './event-bridge'; import { Event } from '../types/event/event'; const QUEUE_CAPACITY = 512; export class EventBridgeChannel { channel: string; queue: Event[] = []; receiver: IEventBridgeReceiver | undefined; constructor(channel: string) { this.channel = channel; } sendEvent(event: Event) { if (!this.receiver) { this.queue = [...this.queue.slice(0, QUEUE_CAPACITY), event]; return; } this.receiver.receive(this.channel, event); } setReceiver(receiver: IEventBridgeReceiver) { if (this.receiver) { return; } this.receiver = receiver; const events = this.queue; this.queue = []; events.forEach((event) => { (this.receiver as IEventBridgeReceiver).receive(this.channel, event); }); } } ================================================ FILE: packages/analytics-core/src/event-bridge/event-bridge-container.ts ================================================ import { EventBridge, IEventBridge } from './event-bridge'; export class EventBridgeContainer { static instances: Record = {}; static getInstance(instanceName: string): IEventBridge { if (!this.instances[instanceName]) { this.instances[instanceName] = new EventBridge(); } return this.instances[instanceName]; } } ================================================ FILE: packages/analytics-core/src/event-bridge/event-bridge.ts ================================================ import { Event } from '../types/event/event'; import { EventBridgeChannel } from './event-bridge-channel'; export interface IEventBridge { sendEvent(channel: string, event: Event): void; setReceiver(channel: string, receiver: IEventBridgeReceiver): void; } export interface IEventBridgeReceiver { receive(channel: string, event: Event): void; } export class EventBridge implements IEventBridge { eventBridgeChannels: Record = {}; sendEvent(channel: string, event: Event) { if (!this.eventBridgeChannels[channel]) { this.eventBridgeChannels[channel] = new EventBridgeChannel(channel); } (this.eventBridgeChannels[channel] as EventBridgeChannel).sendEvent(event); } setReceiver(channel: string, receiver: IEventBridgeReceiver) { if (!this.eventBridgeChannels[channel]) { this.eventBridgeChannels[channel] = new EventBridgeChannel(channel); } (this.eventBridgeChannels[channel] as EventBridgeChannel).setReceiver(receiver); } } ================================================ FILE: packages/analytics-core/src/global-scope.ts ================================================ /* eslint-disable no-restricted-globals */ /* Only file allowed to access to globalThis, window, self */ export const getGlobalScope = (): typeof globalThis | undefined => { // This should only be used for integrations with Amplitude that are not running in a browser environment // We need to specify the name of the global variable as a string to prevent it from being minified const ampIntegrationContextName = 'ampIntegrationContext' as keyof typeof globalThis; if (typeof globalThis !== 'undefined' && typeof globalThis[ampIntegrationContextName] !== 'undefined') { return globalThis[ampIntegrationContextName] as typeof globalThis; } if (typeof globalThis !== 'undefined') { return globalThis; } if (typeof window !== 'undefined') { return window; } if (typeof self !== 'undefined') { return self; } if (typeof global !== 'undefined') { return global; } return undefined; }; ================================================ FILE: packages/analytics-core/src/identify.ts ================================================ import { UNSET_VALUE } from './types/constants'; import { isValidProperties } from './utils/valid-properties'; export interface IIdentify { getUserProperties(): IdentifyUserProperties; set(property: string, value: ValidPropertyType): IIdentify; setOnce(property: string, value: ValidPropertyType): IIdentify; append(property: string, value: ValidPropertyType): IIdentify; prepend(property: string, value: ValidPropertyType): IIdentify; postInsert(property: string, value: ValidPropertyType): IIdentify; preInsert(property: string, value: ValidPropertyType): IIdentify; remove(property: string, value: ValidPropertyType): IIdentify; add(property: string, value: number): IIdentify; unset(property: string): IIdentify; clearAll(): IIdentify; } export class Identify implements IIdentify { protected readonly _propertySet: Set = new Set(); protected _properties: IdentifyUserProperties = {}; public getUserProperties(): IdentifyUserProperties { return { ...this._properties }; } public set(property: string, value: ValidPropertyType): Identify { this._safeSet(IdentifyOperation.SET, property, value); return this; } public setOnce(property: string, value: ValidPropertyType): Identify { this._safeSet(IdentifyOperation.SET_ONCE, property, value); return this; } public append(property: string, value: ValidPropertyType): Identify { this._safeSet(IdentifyOperation.APPEND, property, value); return this; } public prepend(property: string, value: ValidPropertyType): Identify { this._safeSet(IdentifyOperation.PREPEND, property, value); return this; } public postInsert(property: string, value: ValidPropertyType): Identify { this._safeSet(IdentifyOperation.POSTINSERT, property, value); return this; } public preInsert(property: string, value: ValidPropertyType): Identify { this._safeSet(IdentifyOperation.PREINSERT, property, value); return this; } public remove(property: string, value: ValidPropertyType): Identify { this._safeSet(IdentifyOperation.REMOVE, property, value); return this; } public add(property: string, value: number): Identify { this._safeSet(IdentifyOperation.ADD, property, value); return this; } public unset(property: string): Identify { this._safeSet(IdentifyOperation.UNSET, property, UNSET_VALUE); return this; } public clearAll(): Identify { // When clear all happens, all properties are unset. Reset the entire object. this._properties = {}; this._properties[IdentifyOperation.CLEAR_ALL] = UNSET_VALUE; return this; } // Returns whether or not this set actually worked. private _safeSet(operation: IdentifyOperation, property: string, value: ValidPropertyType): boolean { if (this._validate(operation, property, value)) { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment let userPropertyMap: any = this._properties[operation]; if (userPropertyMap === undefined) { userPropertyMap = {}; // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment this._properties[operation] = userPropertyMap; } // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access userPropertyMap[property] = value; this._propertySet.add(property); return true; } return false; } private _validate(operation: IdentifyOperation, property: string, value: ValidPropertyType): boolean { if (this._properties[IdentifyOperation.CLEAR_ALL] !== undefined) { // clear all already set. Skipping operation; return false; } if (this._propertySet.has(property)) { // Property already used. Skipping operation return false; } if (operation === IdentifyOperation.ADD) { return typeof value === 'number'; } if (operation !== IdentifyOperation.UNSET && operation !== IdentifyOperation.REMOVE) { return isValidProperties(property, value); } return true; } } export type ValidPropertyType = | number | string | boolean | Array | { [key: string]: ValidPropertyType } | Array<{ [key: string]: ValidPropertyType }>; interface BaseOperationConfig { [key: string]: ValidPropertyType; } export interface IdentifyUserProperties { // Add operations can only take numbers [IdentifyOperation.ADD]?: { [key: string]: number }; // This reads the keys of the passed object, but the values are not used [IdentifyOperation.UNSET]?: BaseOperationConfig; // This option does not read the key as it unsets all user properties [IdentifyOperation.CLEAR_ALL]?: any; // These operations can take numbers, strings, or arrays of both. [IdentifyOperation.SET]?: BaseOperationConfig; [IdentifyOperation.SET_ONCE]?: BaseOperationConfig; [IdentifyOperation.APPEND]?: BaseOperationConfig; [IdentifyOperation.PREPEND]?: BaseOperationConfig; [IdentifyOperation.POSTINSERT]?: BaseOperationConfig; [IdentifyOperation.PREINSERT]?: BaseOperationConfig; [IdentifyOperation.REMOVE]?: BaseOperationConfig; } export enum IdentifyOperation { // Base Operations to set values SET = '$set', SET_ONCE = '$setOnce', // Operations around modifying existing values ADD = '$add', APPEND = '$append', PREPEND = '$prepend', REMOVE = '$remove', // Operations around appending values *if* they aren't present PREINSERT = '$preInsert', POSTINSERT = '$postInsert', // Operations around removing properties/values UNSET = '$unset', CLEAR_ALL = '$clearAll', } /** * Note that the order of operations should align with https://github.com/amplitude/nova/blob/7701b5986b565d4b2fb53b99a9f2175df055dea8/src/main/java/com/amplitude/ingestion/core/UserPropertyUtils.java#L210 */ export const OrderedIdentifyOperations = [ IdentifyOperation.CLEAR_ALL, IdentifyOperation.UNSET, IdentifyOperation.SET, IdentifyOperation.SET_ONCE, IdentifyOperation.ADD, IdentifyOperation.APPEND, IdentifyOperation.PREPEND, IdentifyOperation.PREINSERT, IdentifyOperation.POSTINSERT, IdentifyOperation.REMOVE, ]; ================================================ FILE: packages/analytics-core/src/index.ts ================================================ export { AmplitudeCore } from './core-client'; export { CoreClient, PluginHost } from './types/client/core-client'; export { AnalyticsClient } from './types/client/analytics-client'; export { AmplitudeContext } from './types/amplitude-context'; export { Identify, IIdentify, ValidPropertyType } from './identify'; export { Revenue, IRevenue, RevenueProperty } from './revenue'; export { Destination } from './plugins/destination'; export { IdentityEventSender } from './plugins/identity'; export { Config, RequestMetadata } from './config'; export { IConfig } from './types/config/core-config'; export { Logger, ILogger, LogConfig } from './logger'; export { getGlobalScope } from './global-scope'; export { getAnalyticsConnector, setConnectorDeviceId, setConnectorUserId } from './analytics-connector'; export { isNewSession } from './session'; export { getCookieName, getOldCookieName } from './cookie-name'; export { getLanguage } from './language'; export { getQueryParams } from './query-params'; export { returnWrapper, AmplitudeReturn } from './utils/return-wrapper'; export { debugWrapper, getClientLogConfig, getClientStates } from './utils/debug'; export { UUID } from './utils/uuid'; export { createIdentifyEvent } from './utils/event-builder'; export { isUrlMatchAllowlist, getDecodeURI } from './utils/url-utils'; export { generateHashCode, isTimestampInSample } from './utils/sampling'; export { omitUndefined } from './utils/omit-undefined'; export { MemoryStorage } from './storage/memory'; export { CookieStorage, isDomainEqual, decodeCookieValue } from './storage/cookie'; export { getStorageKey } from './storage/helpers'; export { BrowserStorage } from './storage/browser-storage'; export { DiagnosticsClient, IDiagnosticsClient } from './diagnostics/diagnostics-client'; export { registerSdkLoaderMetadata } from './diagnostics/uncaught-sdk-errors'; export { BaseTransport } from './transports/base'; export { FetchTransport } from './transports/fetch'; export { compressToGzipArrayBuffer, isCompressionStreamAvailable, MIN_GZIP_UPLOAD_BODY_SIZE_BYTES, } from './transports/gzip'; export { RemoteConfigClient, IRemoteConfigClient, RemoteConfig, Source } from './remote-config/remote-config'; export { LogLevel } from './types/loglevel'; export { AMPLITUDE_PREFIX, STORAGE_PREFIX } from './types/constants'; export { Storage, IdentityStorageType, CookieStorageConfig } from './types/storage'; export { consoleObserver } from './observers/console'; export { Event, IdentifyOperation, SpecialEventType, IdentifyEvent, GroupIdentifyEvent, IdentifyUserProperties, } from './types/event/event'; export { EventOptions, BaseEvent } from './types/event/base-event'; export { IngestionMetadata } from './types/event/ingestion-metadata'; export { ServerZoneType, ServerZone } from './types/server-zone'; export { OfflineDisabled } from './types/offline'; export { Plan } from './types/event/plan'; export { TransportType, Transport, TransportOptions, TransportTypeOrOptions } from './types/transport'; export { Payload } from './types/payload'; export { Response } from './types/response'; export { UserSession } from './types/user-session'; export { Plugin, BeforePlugin, DestinationPlugin, EnrichmentPlugin, PluginType, AnalyticsIdentity, } from './types/plugin'; export { Result } from './types/result'; export { ElementInteractionsOptions, Messenger, ActionType, DEFAULT_CSS_SELECTOR_ALLOWLIST, DEFAULT_DATA_ATTRIBUTE_PREFIX, DEFAULT_ACTION_CLICK_ALLOWLIST, DEFAULT_EXPOSURE_DURATION, LabeledEvent, Trigger, DataSource, } from './types/element-interactions'; export { FrustrationInteractionsOptions, DEFAULT_DEAD_CLICK_ALLOWLIST, DEFAULT_RAGE_CLICK_ALLOWLIST, DEFAULT_ERROR_CLICK_ALLOWLIST, DEFAULT_RAGE_CLICK_THRESHOLD, DEFAULT_RAGE_CLICK_WINDOW_MS, DEFAULT_RAGE_CLICK_OUT_OF_BOUNDS_THRESHOLD, DEFAULT_DEAD_CLICK_WINDOW_MS, } from './types/frustration-interactions'; export { PageTrackingOptions, PageTrackingTrackOn, PageTrackingHistoryChanges } from './types/page-view-tracking'; export { FormInteractionsOptions } from './types/form-interactions'; export { Status } from './types/status'; export { NetworkEventCallback, networkObserver } from './observers/network'; export { NetworkRequestEvent, IRequestWrapper, JsonObject, JsonValue, JsonArray } from './network-request-event'; export { NetworkTrackingOptions, NetworkCaptureRule } from './types/network-tracking'; export { SAFE_HEADERS, FORBIDDEN_HEADERS } from './types/constants'; export { PageUrlEnrichmentOptions } from './types/page-url-enrichment'; export { CustomEnrichmentOptions } from './types/custom-enrichment'; export { PerformanceTrackingOptions, MainThreadBlockOptions } from './types/performance-tracking'; // Campaign export { Campaign, UTMParameters, ReferrerParameters, ClickIdParameters, ICampaignParser } from './types/campaign'; export { EMPTY_VALUE, BASE_CAMPAIGN, MKTG } from './types/constants'; export { CampaignParser } from './campaign/campaign-parser'; export { getPageTitle, TEXT_MASK_ATTRIBUTE, MASKED_TEXT_VALUE, replaceSensitiveString, CC_REGEX, SSN_REGEX, EMAIL_REGEX, } from './plugins/helpers'; // Browser export { BrowserConfig, BrowserOptions, DefaultTrackingOptions, TrackingOptions, TrackingMethod, AutocaptureOptions, CookieOptions, AttributionOptions, RemoteConfigOptions, } from './types/config/browser-config'; export { BrowserClient } from './types/client/browser-client'; // Node export { NodeClient } from './types/client/node-client'; export { NodeConfig, NodeOptions } from './types/config/node-config'; // React Native export { ReactNativeConfig, ReactNativeTrackingOptions, ReactNativeOptions, ReactNativeAttributionOptions, } from './types/config/react-native-config'; export { ReactNativeClient } from './types/client/react-native-client'; export { Observable, asyncMap, merge, multicast, Unsubscribable } from './utils/observable'; export { InstanceProxy } from './types/proxy'; export { safeJsonStringify } from './utils/safe-stringify'; // Messenger (cross-window communication) export type { BaseWindowMessenger, ActionHandler } from './messenger/base-window-messenger'; export { getOrCreateWindowMessenger } from './messenger/base-window-messenger'; export { enableBackgroundCapture } from './messenger/background-capture'; export { AMPLITUDE_ORIGIN, AMPLITUDE_ORIGIN_EU, AMPLITUDE_ORIGIN_STAGING, AMPLITUDE_ORIGINS_MAP, AMPLITUDE_BACKGROUND_CAPTURE_SCRIPT_URL, } from './messenger/constants'; export { ExcludeInternalReferrersOptions, EXCLUDE_INTERNAL_REFERRERS_CONDITIONS } from './types/config/browser-config'; export { VideoObserver, State as VideoState, type VideoObserverParams } from './observers/video'; export { EmbeddedVideoPlayer, type Vendor as VideoVendor } from './video-analytics/types'; export { isChromeExtension } from './utils/environment'; ================================================ FILE: packages/analytics-core/src/language.ts ================================================ export const getLanguage = (): string => { if (typeof navigator === 'undefined') return ''; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access const userLanguage = (navigator as any).userLanguage as string | undefined; return navigator.languages?.[0] ?? navigator.language ?? userLanguage ?? ''; }; ================================================ FILE: packages/analytics-core/src/logger.ts ================================================ import { LogLevel } from './types/loglevel'; const PREFIX = 'Amplitude Logger '; export interface ILogger { disable(): void; enable(logLevel: LogLevel): void; log(...args: any[]): void; warn(...args: any[]): void; error(...args: any[]): void; debug(...args: any[]): void; } export interface LogConfig { logger: ILogger; logLevel: LogLevel; } type TimeKey = 'start' | 'end'; export interface DebugContext { type: string; name: string; args: string[] | string; stacktrace?: string[] | string; time?: { [key in TimeKey]?: string }; states?: { [key: string]: any }; } export class Logger implements ILogger { logLevel: LogLevel; constructor() { this.logLevel = LogLevel.None; } disable(): void { this.logLevel = LogLevel.None; } enable(logLevel: LogLevel = LogLevel.Warn): void { this.logLevel = logLevel; } log(...args: any[]): void { if (this.logLevel < LogLevel.Verbose) { return; } console.log(`${PREFIX}[Log]: ${args.join(' ')}`); } warn(...args: any[]): void { if (this.logLevel < LogLevel.Warn) { return; } console.warn(`${PREFIX}[Warn]: ${args.join(' ')}`); } error(...args: any[]): void { if (this.logLevel < LogLevel.Error) { return; } console.error(`${PREFIX}[Error]: ${args.join(' ')}`); } debug(...args: any[]): void { if (this.logLevel < LogLevel.Debug) { return; } // console.debug output is hidden by default in chrome console.log(`${PREFIX}[Debug]: ${args.join(' ')}`); } } ================================================ FILE: packages/analytics-core/src/messenger/background-capture.ts ================================================ /* eslint-disable no-restricted-globals */ import type { BaseWindowMessenger } from './base-window-messenger'; import { AMPLITUDE_BACKGROUND_CAPTURE_SCRIPT_URL } from './constants'; /** * Brand key set on the messenger instance to track whether background capture * has been enabled. */ const BG_CAPTURE_BRAND = '__AMPLITUDE_BACKGROUND_CAPTURE__' as const; /** * Enable background capture on a messenger instance. * Plugins can call this on a shared messenger instance. * The first call registers the handlers; subsequent calls are no-ops. * * @param messenger - The messenger to enable background capture on * @param options.scriptUrl - Override the background capture script URL (optional) */ export function enableBackgroundCapture(messenger: BaseWindowMessenger, options?: { scriptUrl?: string }): void { // Check the brand on the messenger object itself — works across bundle boundaries const branded = messenger as unknown as Record; if (branded[BG_CAPTURE_BRAND] === true) { return; } branded[BG_CAPTURE_BRAND] = true; const scriptUrl = options?.scriptUrl ?? AMPLITUDE_BACKGROUND_CAPTURE_SCRIPT_URL; let backgroundCaptureInstance: any = null; const onBackgroundCapture = (type: string, backgroundCaptureData: { [key: string]: string | number | null }) => { if (type === 'background-capture-complete') { messenger.logger?.debug?.('Background capture complete'); messenger.notify({ action: 'background-capture-complete', data: backgroundCaptureData }); } }; messenger.registerActionHandler('initialize-background-capture', () => { messenger.logger?.debug?.('Initializing background capture (external script)'); const resolvedUrl = new URL(scriptUrl, messenger.endpoint).toString(); messenger .loadScriptOnce(resolvedUrl) .then(() => { messenger.logger?.debug?.('Background capture script loaded (external)'); // eslint-disable-next-line backgroundCaptureInstance = /* istanbul ignore next -- window is always defined in browser */ ( window as any )?.amplitudeBackgroundCapture?.({ messenger, onBackgroundCapture, }); messenger.notify({ action: 'background-capture-loaded' }); }) .catch(() => { messenger.logger?.warn('Failed to initialize background capture'); }); }); messenger.registerActionHandler('close-background-capture', () => { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call backgroundCaptureInstance?.close?.(); backgroundCaptureInstance = null; }); } ================================================ FILE: packages/analytics-core/src/messenger/base-window-messenger.ts ================================================ /* eslint-disable no-restricted-globals */ import { ILogger } from '../logger'; import { Messenger } from '../types/element-interactions'; import { getGlobalScope } from '../global-scope'; import { AMPLITUDE_ORIGIN } from './constants'; import { asyncLoadScript, generateUniqueId } from './utils'; type MessageRequest = { id: string; action: string; args: Record; }; type MessageResponse = { id: string; action: string; responseData: any; }; export type ActionHandler = (data: any) => void; /** * Brand key used to identify BaseWindowMessenger instances across bundle boundaries. */ const MESSENGER_BRAND = '__AMPLITUDE_MESSENGER_INSTANCE__' as const; /** Global scope key where the singleton messenger is stored. */ const MESSENGER_GLOBAL_KEY = '__AMPLITUDE_MESSENGER__'; /** * BaseWindowMessenger provides generic cross-window communication via postMessage. * Singleton access via getOrCreateWindowMessenger() to prevent duplicate instances */ class BaseWindowMessenger implements Messenger { /** Brand property for cross-bundle instanceof checks. */ readonly [MESSENGER_BRAND] = true; endpoint: string; logger?: ILogger; private isSetup = false; private messageHandler: ((event: MessageEvent) => void) | null = null; requestCallbacks: { [id: string]: { resolve: (data: any) => void; reject: (data: any) => void; }; } = {}; private actionHandlers = new Map(); /** * Messages received for actions that had no registered handler yet. * Drained automatically when the corresponding handler is registered via * registerActionHandler(), solving startup race conditions between * independently-initialized plugins. */ private pendingMessages = new Map(); /** * Tracks in-flight and completed script loads by URL. * Using a map, this prevents duplicate loads before the first resolves. */ private scriptLoadPromises = new Map>(); constructor({ origin = AMPLITUDE_ORIGIN }: { origin?: string } = {}) { this.endpoint = origin; } /** * Send a message to the parent window (window.opener). */ notify(message: { action: string; data?: any } | MessageRequest) { this.logger?.debug?.('Message sent: ', JSON.stringify(message)); (window.opener as WindowProxy)?.postMessage?.(message, this.endpoint); } /** * Send an async request to the parent window with a unique ID. * Returns a Promise that resolves when the parent responds. */ public sendRequest(action: string, args: Record, options = { timeout: 15_000 }): Promise { const id = generateUniqueId(); const request: MessageRequest = { id, action, args }; const promise = new Promise((resolve, reject) => { this.requestCallbacks[id] = { resolve, reject }; this.notify(request); if (options.timeout > 0) { setTimeout(() => { reject(new Error(`${action} timed out (id: ${id})`)); delete this.requestCallbacks[id]; }, options.timeout); } }); return promise; } /** * Handle a response to a previous request by resolving its Promise. */ private handleResponse(response: MessageResponse) { if (!this.requestCallbacks[response.id]) { this.logger?.warn(`No callback found for request id: ${response.id}`); return; } this.requestCallbacks[response.id].resolve(response.responseData); delete this.requestCallbacks[response.id]; } /** * Register a handler for a specific action type. * Logs a warning if overwriting an existing handler. */ registerActionHandler(action: string, handler: ActionHandler) { if (this.actionHandlers.has(action)) { this.logger?.warn?.(`Overwriting existing action handler for: ${action}`); } this.actionHandlers.set(action, handler); // Replay any messages that arrived before this handler was registered const queued = this.pendingMessages.get(action); if (queued) { this.pendingMessages.delete(action); for (const data of queued) { handler(data); } } } /** * Load a script once, deduplicating by URL. * Safe against concurrent calls — the second call awaits the first's in-flight Promise * rather than triggering a duplicate load. */ async loadScriptOnce(url: string): Promise { const existing = this.scriptLoadPromises.get(url); if (existing) { return existing; } const loadPromise = asyncLoadScript(url).then(() => { // Resolve to void }); this.scriptLoadPromises.set(url, loadPromise); try { await loadPromise; } catch (error) { // Remove failed loads so they can be retried this.scriptLoadPromises.delete(url); throw error; } } /** * Set up the message listener. Idempotent — safe to call multiple times. * Subclasses should call super.setup() and then register their own action handlers. */ setup({ logger, endpoint }: { logger?: ILogger; endpoint?: string } = {}) { if (logger) { this.logger = logger; } // If endpoint is customized, don't override a previously customized endpoint. if (endpoint && this.endpoint === AMPLITUDE_ORIGIN) { this.endpoint = endpoint; } // Only attach the message listener once if (this.isSetup) { return; } this.isSetup = true; this.logger?.debug?.('Setting up messenger'); // Attach Event Listener to listen for messages from the parent window this.messageHandler = (event: MessageEvent) => { this.logger?.debug?.('Message received: ', JSON.stringify(event)); // Only accept messages from the specified origin if (this.endpoint !== event.origin) { return; } const eventData = event.data as { action?: string; id?: string; data?: any; responseData?: any }; const action = eventData?.action; // Ignore messages without action if (!action) { return; } // If id exists, handle responses to previous requests if ('id' in eventData && eventData.id) { this.logger?.debug?.('Received Response to previous request: ', JSON.stringify(event)); this.handleResponse(eventData as MessageResponse); } else { if (action === 'ping') { this.notify({ action: 'pong' }); return; } // Dispatch to registered action handlers, or buffer for late registration const handler = this.actionHandlers.get(action); if (handler) { handler(eventData.data); } else { const queue = this.pendingMessages.get(action) ?? []; queue.push(eventData.data); this.pendingMessages.set(action, queue); } } }; window.addEventListener('message', this.messageHandler); this.notify({ action: 'page-loaded' }); } /** * Tear down the messenger: remove the message listener, clear all state. */ destroy() { if (this.messageHandler) { window.removeEventListener('message', this.messageHandler); this.messageHandler = null; } this.isSetup = false; this.actionHandlers.clear(); this.pendingMessages.clear(); this.requestCallbacks = {}; this.scriptLoadPromises.clear(); // Remove from global scope if this is the singleton const globalScope = getGlobalScope() as Record | undefined; if (globalScope?.[MESSENGER_GLOBAL_KEY] === this) { delete globalScope[MESSENGER_GLOBAL_KEY]; } } } /** * Type guard: checks whether a value is a BaseWindowMessenger instance. */ function isWindowMessenger(value: unknown): value is BaseWindowMessenger { return ( typeof value === 'object' && value !== null && MESSENGER_BRAND in value && (value as Record)[MESSENGER_BRAND] === true ); } /** * Get or create a singleton BaseWindowMessenger instance. * Ensures only one messenger (and one message listener) exists per page, * preventing duplicate script loads and double notifications. * * The singleton is stored on globalScope under the same MESSENGER_KEY. * The branded property check verifies the stored value is actually a messenger. */ export function getOrCreateWindowMessenger(options?: { origin?: string }): BaseWindowMessenger { const globalScope = getGlobalScope() as Record | undefined; const existing = globalScope?.[MESSENGER_GLOBAL_KEY]; if (isWindowMessenger(existing)) { return existing; } const messenger = new BaseWindowMessenger(options); if (globalScope) { globalScope[MESSENGER_GLOBAL_KEY] = messenger; } return messenger; } export type { BaseWindowMessenger }; ================================================ FILE: packages/analytics-core/src/messenger/constants.ts ================================================ // Shared origin constants for Amplitude cross-window communication export const AMPLITUDE_ORIGIN = 'https://app.amplitude.com'; export const AMPLITUDE_ORIGIN_EU = 'https://app.eu.amplitude.com'; export const AMPLITUDE_ORIGIN_STAGING = 'https://apps.stag2.amplitude.com'; export const AMPLITUDE_ORIGINS_MAP: Record = { US: AMPLITUDE_ORIGIN, EU: AMPLITUDE_ORIGIN_EU, STAGING: AMPLITUDE_ORIGIN_STAGING, }; // Background capture script URL (shared between autocapture and session-replay) export const AMPLITUDE_BACKGROUND_CAPTURE_SCRIPT_URL = 'https://cdn.amplitude.com/libs/background-capture-1.0.1.js.gz'; ================================================ FILE: packages/analytics-core/src/messenger/utils.ts ================================================ /* eslint-disable no-restricted-globals */ /** * Dynamically loads an external script by appending a ================================================ FILE: packages/session-replay-browser/test/session-replay-factory.test.ts ================================================ import { SessionReplay } from '../src/session-replay'; import { getLogConfig } from '../src/session-replay-factory'; describe('session replay factory', () => { describe('getLogConfig', () => { test('return the log config if config defined on session replay', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init('apiKey', {}).promise; expect(Object.keys(getLogConfig(sessionReplay)())).toEqual(['logger', 'logLevel']); }); test('return the log config if no config defined on session replay', async () => { const sessionReplay = new SessionReplay(); expect(Object.keys(getLogConfig(sessionReplay)())).toEqual(['logger', 'logLevel']); }); }); }); ================================================ FILE: packages/session-replay-browser/test/session-replay.test.ts ================================================ /* eslint-disable @typescript-eslint/no-non-null-assertion */ /* eslint-disable @typescript-eslint/unbound-method */ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ import * as AnalyticsCore from '@amplitude/analytics-core'; import { LogLevel, ILogger, ServerZone, SpecialEventType, RemoteConfig, Source } from '@amplitude/analytics-core'; import { SessionReplayLocalConfig } from '../src/config/local-config'; import * as JoinedConfigModule from '../src/config/joined-config'; import { NetworkObservers, NetworkRequestEvent } from '../src/observers'; import { IDBFactory } from 'fake-indexeddb'; import { LoggingConfig, SessionReplayJoinedConfig } from '../src/config/types'; import { CustomRRwebEvent, DEFAULT_SAMPLE_RATE } from '../src/constants'; import * as SessionReplayIDB from '../src/events/events-idb-store'; import * as SessionReplayEventsManager from '../src/events/events-manager'; import * as Sampling from '../src/sampling'; import * as Helpers from '../src/helpers'; import { SessionReplay } from '../src/session-replay'; import * as targetingManager from '../src/targeting/targeting-manager'; // Mock the worker module jest.mock( '../src/worker', () => ({ compressionScript: 'console.log("webworker script");', }), { virtual: true }, ); import { SessionReplayOptions } from '../src/typings/session-replay'; // Mock cross-origin-iframes so spies work reliably regardless of test ordering jest.mock('../src/cross-origin-iframes', () => ({ isInIframe: jest.fn().mockReturnValue(false), CrossOriginIframeCoordinator: jest.fn().mockImplementation(() => ({ start: jest.fn(), stop: jest.fn(), })), listenForParentSignals: jest.fn().mockReturnValue(jest.fn()), })); import { isInIframe as mockIsInIframe, CrossOriginIframeCoordinator as MockCrossOriginIframeCoordinator, listenForParentSignals as mockListenForParentSignals, } from '../src/cross-origin-iframes'; // Mock the URL tracking plugin jest.mock('../src/plugins/url-tracking-plugin', () => ({ createUrlTrackingPlugin: jest.fn().mockImplementation((options: any = {}) => ({ name: 'amplitude/url-tracking@1', observer: jest.fn().mockImplementation((_callback: any, _opts: any) => { // Return a cleanup function return () => { // cleanup function }; }), options: { ugcFilterRules: options.ugcFilterRules || [], enablePolling: options.enablePolling || false, pollingInterval: options.pollingInterval || 1000, captureDocumentTitle: options.captureDocumentTitle ?? false, }, })), subscribeToUrlChanges: jest.fn().mockImplementation(() => jest.fn()), })); import { createUrlTrackingPlugin, subscribeToUrlChanges } from '../src/plugins/url-tracking-plugin'; // Mock remote config storage let mockRemoteConfig: RemoteConfig | null = null; // Mock RemoteConfigClient - will be recreated for each test let mockRemoteConfigClient: any; let MockedRemoteConfigClient: jest.SpyInstance; let originalRemoteConfigClient: typeof AnalyticsCore.RemoteConfigClient; type MockedLogger = jest.Mocked; const mockCreateUrlTrackingPlugin = createUrlTrackingPlugin as jest.MockedFunction; const mockEvent = { type: 4, data: { href: 'https://analytics.amplitude.com/', width: 1728, height: 154 }, timestamp: 1687358660935, }; const mockEventString = JSON.stringify(mockEvent); const samplingConfig = { sample_rate: 1, capture_enabled: true, }; // Default mock implementation const defaultMockImplementation = (options: any = {}) => ({ name: 'amplitude/url-tracking@1', observer: jest.fn().mockImplementation((_callback: any, _opts: any) => { // Return a cleanup function return () => { // cleanup function }; }), options: { ugcFilterRules: options.ugcFilterRules || [], enablePolling: options.enablePolling || false, pollingInterval: options.pollingInterval || 1000, captureDocumentTitle: options.captureDocumentTitle ?? false, }, }); describe('SessionReplay', () => { let originalFetch: typeof global.fetch; let deferEvents: typeof global.requestIdleCallback; let globalSpy: jest.SpyInstance; const mockLoggerProvider: MockedLogger = { error: jest.fn(), log: jest.fn(), disable: jest.fn(), enable: jest.fn(), warn: jest.fn(), debug: jest.fn(), }; const addEventListenerMock = jest.fn() as jest.Mock; const removeEventListenerMock = jest.fn() as jest.Mock; const mockGlobalScope = { addEventListener: addEventListenerMock, removeEventListener: removeEventListenerMock, document: { hasFocus: () => true, }, location: { href: 'http://localhost', }, indexedDB: new IDBFactory(), // jsdom provides a working localStorage; expose it so the replay-start-time-store // (which reads through getGlobalScope) sees a real storage in tests. localStorage: globalThis.localStorage, navigator: { storage: { estimate: () => { return { usage: 1000, quota: 100000, usageDetails: { indexedDB: 10, }, }; }, }, }, } as unknown as typeof globalThis; const apiKey = 'static_key'; const mockOptions: SessionReplayOptions = { flushIntervalMillis: 0, flushMaxRetries: 1, flushQueueSize: 0, logLevel: LogLevel.None, loggerProvider: mockLoggerProvider, deviceId: '1a2b3c', optOut: false, sampleRate: 1, sessionId: 123, serverZone: ServerZone.EU, storeType: 'idb', privacyConfig: { blockSelector: '.className', maskSelector: ['.className1', '.className2'], }, }; const mockEmptyOptions: SessionReplayOptions = { flushIntervalMillis: 0, flushMaxRetries: 1, flushQueueSize: 0, logLevel: LogLevel.None, loggerProvider: mockLoggerProvider, deviceId: '1a2b3c', sessionId: 123, }; let sessionReplay: SessionReplay; let initialize: jest.SpyInstance; let mockRecordFunction: jest.Mock & { addCustomEvent: jest.Mock; mirror: { getNode: jest.Mock } }; // Add this helper function at the top of your describe block function createMockRecordFunction() { const mockRecordFn = jest.fn().mockReturnValue(jest.fn()) as jest.Mock & { addCustomEvent: jest.Mock; takeFullSnapshot: jest.Mock; mirror: { getNode: jest.Mock }; }; mockRecordFn.addCustomEvent = jest.fn(); mockRecordFn.takeFullSnapshot = jest.fn(); mockRecordFn.mirror = { getNode: jest.fn().mockReturnValue(null), }; return mockRecordFn; } beforeEach(() => { // Reset the mock implementation to default for each test mockCreateUrlTrackingPlugin.mockImplementation(defaultMockImplementation); // Reset all other mocks and setup jest.clearAllMocks(); // Set default remote config mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, }; // Create a fresh mock client for each test mockRemoteConfigClient = { subscribe: jest .fn() .mockImplementation( ( _configKey: string | undefined, _deliveryMode: any, callback: (remoteConfig: RemoteConfig | null, source: Source, lastFetch: Date) => void, ) => { // Call the callback synchronously with the mock remote config callback(mockRemoteConfig, 'cache', new Date()); return 'mock-subscription-id'; }, ), unsubscribe: jest.fn(() => true), updateConfigs: jest.fn(), }; // Set up RemoteConfigClient mock originalRemoteConfigClient = AnalyticsCore.RemoteConfigClient; // eslint-disable-next-line @typescript-eslint/no-unsafe-return MockedRemoteConfigClient = jest.fn().mockImplementation(() => mockRemoteConfigClient); Object.defineProperty(AnalyticsCore, 'RemoteConfigClient', { value: MockedRemoteConfigClient, writable: true, configurable: true, }); jest.spyOn(SessionReplayIDB, 'createStore'); sessionReplay = new SessionReplay(); initialize = jest.spyOn(sessionReplay, 'initialize'); jest.useFakeTimers(); originalFetch = global.fetch; (global.fetch as jest.Mock) = jest.fn(() => { return Promise.resolve({ status: 200, }); }); deferEvents = global.requestIdleCallback; (global.requestIdleCallback as jest.Mock) = jest.fn((callback, options) => { setTimeout(() => { callback(); }, (options?.timeout as number) || 0); }); globalSpy = jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue(mockGlobalScope); // Create mock record function with addCustomEvent method and mirror property mockRecordFunction = createMockRecordFunction(); mockRecordFunction.addCustomEvent = jest.fn(); mockRecordFunction.mirror = { getNode: jest.fn().mockReturnValue(null), }; jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any).mockResolvedValue(mockRecordFunction); }); afterEach(() => { jest.resetAllMocks(); jest.spyOn(global.Math, 'random').mockRestore(); global.fetch = originalFetch; global.requestIdleCallback = deferEvents; jest.useRealTimers(); // Clean up RemoteConfigClient mock if (MockedRemoteConfigClient) { Object.defineProperty(AnalyticsCore, 'RemoteConfigClient', { value: originalRemoteConfigClient, writable: true, configurable: true, }); } }); describe('init: sessionStartTime persistence', () => { beforeEach(() => { globalThis.localStorage.clear(); }); test('fresh init writes Date.now() and reads it back', async () => { const before = Date.now(); await sessionReplay.init(apiKey, mockOptions).promise; const after = Date.now(); expect(sessionReplay.sessionStartTime).toBeGreaterThanOrEqual(before); expect(sessionReplay.sessionStartTime).toBeLessThanOrEqual(after); const stored = globalThis.localStorage.getItem(`AMP_SR_START_${apiKey.substring(0, 10)}_123`); expect(Number(stored)).toBe(sessionReplay.sessionStartTime); }); test('second init for same sessionId recovers stored value', async () => { // Seed storage to simulate a prior init having written the start time. const original = Date.now() - 60_000; globalThis.localStorage.setItem(`AMP_SR_START_${apiKey.substring(0, 10)}_123`, String(original)); await sessionReplay.init(apiKey, mockOptions).promise; expect(sessionReplay.sessionStartTime).toBe(original); }); test('corrupt stored value falls back to Date.now() and overwrites', async () => { globalThis.localStorage.setItem(`AMP_SR_START_${apiKey.substring(0, 10)}_123`, 'not-a-number'); const before = Date.now(); await sessionReplay.init(apiKey, mockOptions).promise; const after = Date.now(); expect(sessionReplay.sessionStartTime).toBeGreaterThanOrEqual(before); expect(sessionReplay.sessionStartTime).toBeLessThanOrEqual(after); const stored = Number(globalThis.localStorage.getItem(`AMP_SR_START_${apiKey.substring(0, 10)}_123`)); expect(stored).toBe(sessionReplay.sessionStartTime); }); test('TTL prune drops stale entries on init', async () => { const staleKey = `AMP_SR_START_${apiKey.substring(0, 10)}_999`; // 25 hours ago, beyond REPLAY_START_TIME_TTL_MS (24h). globalThis.localStorage.setItem(staleKey, String(Date.now() - 25 * 60 * 60 * 1000)); await sessionReplay.init(apiKey, mockOptions).promise; expect(globalThis.localStorage.getItem(staleKey)).toBeNull(); }); test('falls back to Date.now() when localStorage access throws', async () => { // jsdom's localStorage methods live on Storage.prototype, not as own properties, // so jest.spyOn doesn't bind — patch the prototype directly. const proto = Object.getPrototypeOf(globalThis.localStorage) as Storage; const origGet = proto.getItem; const origSet = proto.setItem; proto.getItem = () => { throw new Error('storage disabled'); }; proto.setItem = () => { throw new Error('storage disabled'); }; try { const before = Date.now(); await sessionReplay.init(apiKey, mockOptions).promise; const after = Date.now(); expect(sessionReplay.sessionStartTime).toBeGreaterThanOrEqual(before); expect(sessionReplay.sessionStartTime).toBeLessThanOrEqual(after); } finally { proto.getItem = origGet; proto.setItem = origSet; } }); test('uses Date.now() when sessionId is undefined', async () => { const before = Date.now(); await sessionReplay.init(apiKey, { ...mockOptions, sessionId: undefined }).promise; const after = Date.now(); expect(sessionReplay.sessionStartTime).toBeGreaterThanOrEqual(before); expect(sessionReplay.sessionStartTime).toBeLessThanOrEqual(after); }); }); describe('init', () => { test('should pass current page to evaluateTargetingAndCapture during init', async () => { const evaluateTargetingAndCaptureSpy = jest.spyOn(sessionReplay, 'evaluateTargetingAndCapture'); await sessionReplay.init(apiKey, mockOptions).promise; expect(evaluateTargetingAndCaptureSpy).toHaveBeenCalledWith( { userProperties: undefined, page: { url: 'http://localhost' }, }, true, ); }); test('should remove invalid selectors', async () => { await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, privacyConfig: { blockSelector: ['AFFA$!@$'], maskSelector: ['AFFA$!@$!!'], unmaskSelector: ['AFFA$!@$@@'], }, }).promise; expect(sessionReplay.config?.privacyConfig?.blockSelector).toStrictEqual(undefined); expect(sessionReplay.config?.privacyConfig?.maskSelector).toStrictEqual(undefined); // .amp-unmask is always injected as a default and is a valid selector, so it survives expect(sessionReplay.config?.privacyConfig?.unmaskSelector).toStrictEqual(['.amp-unmask']); }); test('should start network observers when network logging is enabled in remote config', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, }, sr_logging_config: { network: { enabled: true, }, }, }; await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); const startSpy = jest.spyOn(NetworkObservers.prototype, 'start'); await sessionReplay.recordEvents(); expect(startSpy).toHaveBeenCalled(); }); test('should not start network observers when network logging is disabled in remote config', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const startSpy = jest.spyOn(NetworkObservers.prototype, 'start'); await sessionReplay.recordEvents(); expect(startSpy).not.toHaveBeenCalled(); }); test('should handle interaction config enabled with no performanceConfig.interaction', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, }, }; await sessionReplay.init(apiKey, { ...mockOptions, performanceConfig: { enabled: false }, // No interaction property }).promise; await sessionReplay.recordEvents(); expect(mockRecordFunction).toHaveBeenCalled(); const recordArg = mockRecordFunction.mock.calls[0][0]; expect(recordArg?.hooks?.mouseInteraction).toBeDefined(); }); test('should handle interaction config enabled when performanceConfig is set to null', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, }, }; const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; // Manually set performanceConfig to null to test edge case if (sessionReplay.config) { (sessionReplay.config as any).performanceConfig = null; } await sessionReplay.recordEvents(); expect(mockRecordFunction).toHaveBeenCalled(); const recordArg = mockRecordFunction.mock.calls[0][0]; expect(recordArg?.hooks?.mouseInteraction).toBeDefined(); }); test('should not initialize network observers when config is undefined', async () => { // Create a new SessionReplay instance without initializing const sessionReplayWithoutConfig = new SessionReplay(); const networkObserversConstructorSpy = jest.spyOn(NetworkObservers.prototype, 'constructor' as any); await (sessionReplayWithoutConfig as any).initializeNetworkObservers(); expect(networkObserversConstructorSpy).not.toHaveBeenCalled(); expect((sessionReplayWithoutConfig as any).networkObservers).toBeUndefined(); }); test('should log warning when NetworkObservers import fails', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, }, sr_logging_config: { network: { enabled: true, }, }, }; // Mock the dynamic import to throw an error jest.doMock('../src/observers', () => { throw new Error('Import failed'); }); await sessionReplay.init(apiKey, mockOptions).promise; // Call initializeNetworkObservers directly to test the catch block await (sessionReplay as any).initializeNetworkObservers(); expect(mockLoggerProvider.warn).toHaveBeenCalledWith( 'Failed to import or instantiate NetworkObservers:', expect.any(Error), ); expect((sessionReplay as any).networkObservers).toBeUndefined(); // Clean up the mock jest.dontMock('../src/observers'); }); test('should catch error and log a warn when initializing', async () => { // enable interaction config mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, }, }; // mock the error when creating events managers jest.spyOn(SessionReplayEventsManager, 'createEventsManager').mockImplementation(() => { throw new Error('test error'); }); await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, privacyConfig: { blockSelector: ['AFFA$!@$'], maskSelector: ['AFFA$!@$!!'], unmaskSelector: ['AFFA$!@$@@'], }, }).promise; expect(mockLoggerProvider.warn).toHaveBeenCalled(); }); test('should setup sdk', async () => { await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5 }).promise; expect(sessionReplay.config?.transportProvider).toBeDefined(); expect(sessionReplay.config?.flushMaxRetries).toBe(1); expect(sessionReplay.config?.optOut).toBe(false); expect(sessionReplay.config?.sampleRate).toBe(1); // Comes from remote config mock expect(sessionReplay.config?.captureEnabled).toBe(true); // Comes from remote config mock expect(sessionReplay.identifiers?.deviceId).toBe('1a2b3c'); expect(sessionReplay.identifiers?.sessionId).toBe(123); expect(sessionReplay.config?.logLevel).toBe(0); expect(sessionReplay.loggerProvider).toBeDefined(); }); test('should invoke page leave listeners', async () => { const invokeEventMap = new Map(); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ document: { hasFocus: () => false, }, location: { href: 'http://localhost', }, addEventListener: jest.fn((eventName, listenerFn): any => { invokeEventMap.set(eventName as string, listenerFn); }) as jest.Mock>, removeEventListener: removeEventListenerMock, } as unknown as typeof globalThis); await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5 }).promise; const mockFn = jest.fn(); sessionReplay.pageLeaveFns = [mockFn]; invokeEventMap.get('beforeunload')({}); expect(mockFn).toHaveBeenCalled(); }); test('should not throw when pageLeaveListener fires with no eventCompressor', async () => { const invokeEventMap = new Map(); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ document: { hasFocus: () => false, }, location: { href: 'http://localhost', }, addEventListener: jest.fn((eventName, listenerFn): any => { invokeEventMap.set(eventName as string, listenerFn); }) as jest.Mock>, removeEventListener: removeEventListenerMock, } as unknown as typeof globalThis); await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5 }).promise; sessionReplay.eventCompressor = undefined; const trigger = invokeEventMap.get('beforeunload') as (e: Event) => void; expect(() => trigger(new Event('beforeunload'))).not.toThrow(); }); test('should setup sdk with privacy config', async () => { await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, privacyConfig: { blockSelector: ['.class', '#id'] }, }).promise; expect(sessionReplay.config?.transportProvider).toBeDefined(); expect(sessionReplay.config?.flushMaxRetries).toBe(1); expect(sessionReplay.config?.optOut).toBe(false); expect(sessionReplay.config?.sampleRate).toBe(1); expect(sessionReplay.identifiers?.deviceId).toBe('1a2b3c'); expect(sessionReplay.identifiers?.sessionId).toBe(123); expect(sessionReplay.config?.logLevel).toBe(0); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.enable).toHaveBeenCalledWith(0); expect(sessionReplay.config?.privacyConfig?.blockSelector).toEqual(['.class', '#id']); expect(sessionReplay.loggerProvider).toBeDefined(); }); test('should setup sdk with webworker when useWebWorker is true', async () => { // Mock Worker constructor class MockWorker { postMessage = jest.fn(); onmessage = jest.fn(); onerror = jest.fn(); terminate = jest.fn(); } const originalWorker = global.Worker; global.Worker = MockWorker as unknown as typeof global.Worker; // Mock the dynamic import by mocking the import function const mockCompressionScript = 'console.log("webworker script");'; const originalImport = (global as any).import; (global as any).import = jest.fn().mockImplementation((path: string) => { if (path === './worker') { return Promise.resolve({ compressionScript: mockCompressionScript }); } // eslint-disable-next-line @typescript-eslint/no-unsafe-return return originalImport(path); }); // Mock URL.createObjectURL and Blob const originalCreateObjectURL = URL.createObjectURL; const originalBlob = global.Blob; URL.createObjectURL = jest.fn().mockReturnValue('blob:mock-url'); global.Blob = jest.fn().mockImplementation((parts, options) => ({ parts, options, })) as any; // Mock getGlobalScope to include Worker const originalGlobalScope = globalSpy; globalSpy = jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ ...mockGlobalScope, Worker: MockWorker as unknown as typeof global.Worker, }); await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, useWebWorker: true, }).promise; expect(sessionReplay.config?.transportProvider).toBeDefined(); expect(sessionReplay.config?.flushMaxRetries).toBe(1); expect(sessionReplay.config?.optOut).toBe(false); expect(sessionReplay.config?.sampleRate).toBe(1); expect(sessionReplay.identifiers?.deviceId).toBe('1a2b3c'); expect(sessionReplay.identifiers?.sessionId).toBe(123); expect(sessionReplay.config?.logLevel).toBe(0); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.enable).toHaveBeenCalledWith(0); // The import should have been called (coverage will show this) // Restore original values global.Worker = originalWorker; (global as any).import = originalImport; URL.createObjectURL = originalCreateObjectURL; global.Blob = originalBlob; globalSpy = originalGlobalScope; }); test('should not use webworker when useWebWorker is not provided (default)', async () => { await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, }).promise; expect(sessionReplay.config?.useWebWorker).toBeUndefined(); expect(sessionReplay.config?.transportProvider).toBeDefined(); expect(sessionReplay.config?.flushMaxRetries).toBe(1); expect(sessionReplay.config?.optOut).toBe(false); expect(sessionReplay.config?.sampleRate).toBe(1); }); test('should support legacy experimental.useWebWorker config for backwards compatibility', async () => { // Mock Worker constructor class MockWorker { postMessage = jest.fn(); onmessage = jest.fn(); onerror = jest.fn(); terminate = jest.fn(); } const originalWorker = global.Worker; global.Worker = MockWorker as unknown as typeof global.Worker; // Mock the dynamic import by mocking the import function const mockCompressionScript = 'console.log("webworker script");'; const originalImport = (global as any).import; (global as any).import = jest.fn().mockImplementation((path: string) => { if (path === './worker') { return Promise.resolve({ compressionScript: mockCompressionScript }); } // eslint-disable-next-line @typescript-eslint/no-unsafe-return return originalImport(path); }); // Mock URL.createObjectURL and Blob const originalCreateObjectURL = URL.createObjectURL; const originalBlob = global.Blob; URL.createObjectURL = jest.fn().mockReturnValue('blob:mock-url'); global.Blob = jest.fn().mockImplementation((parts, options) => ({ parts, options, })) as any; // Mock getGlobalScope to include Worker const originalGlobalScope = globalSpy; globalSpy = jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ ...mockGlobalScope, Worker: MockWorker as unknown as typeof global.Worker, }); await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, experimental: { useWebWorker: true }, } as any).promise; expect(sessionReplay.config?.useWebWorker).toBe(true); // Restore original values global.Worker = originalWorker; (global as any).import = originalImport; URL.createObjectURL = originalCreateObjectURL; global.Blob = originalBlob; globalSpy = originalGlobalScope; }); test('fallback to memory store if no indexeddb', async () => { globalSpy = jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ ...mockGlobalScope, indexedDB: null as any, }); await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, storeType: 'idb', }).promise; expect(mockLoggerProvider.log).toHaveBeenCalledWith('Using memory for event storage.'); }); test('fallback to memory store if no global scope', async () => { globalSpy = jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue(undefined); await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, storeType: 'idb', }).promise; expect(mockLoggerProvider.log).toHaveBeenCalledWith('Using memory for event storage.'); }); test.each([ [ { enabled: true, trackEveryNms: 500, }, async (config: SessionReplayJoinedConfig) => { expect(config.interactionConfig?.enabled).toBe(true); expect(config.interactionConfig?.batch).toBeUndefined(); expect(config.interactionConfig?.trackEveryNms).toBe(500); }, ], [ { enabled: true, }, async (config: SessionReplayJoinedConfig) => { expect(config.interactionConfig?.enabled).toBe(true); expect(config.interactionConfig?.batch).toBeUndefined(); expect(config.interactionConfig?.trackEveryNms).toBeUndefined(); }, ], [ { enabled: false, trackEveryNms: 1_000, }, async (config: SessionReplayJoinedConfig) => { expect(config.interactionConfig?.enabled).toBe(false); expect(config.interactionConfig?.batch).toBeUndefined(); expect(config.interactionConfig?.trackEveryNms).toBe(1_000); }, ], [ undefined, async (config: SessionReplayJoinedConfig) => { expect(config.interactionConfig?.enabled).toBeUndefined(); expect(config.interactionConfig?.batch).toBeUndefined(); expect(config.interactionConfig?.trackEveryNms).toBeUndefined(); }, ], [ { enabled: true, batch: true, }, async (config: SessionReplayJoinedConfig) => { expect(config.interactionConfig?.enabled).toBe(true); expect(config.interactionConfig?.batch).toBe(true); expect(config.interactionConfig?.trackEveryNms).toBeUndefined(); }, ], [ { enabled: true, batch: false, }, async (config: SessionReplayJoinedConfig) => { expect(config.interactionConfig?.enabled).toBe(true); expect(config.interactionConfig?.batch).toBe(false); expect(config.interactionConfig?.trackEveryNms).toBeUndefined(); }, ], ])('should setup sdk with interaction config', async (interactionConfig, expectationFn) => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: interactionConfig, }; await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, }).promise; expect(sessionReplay.config?.transportProvider).toBeDefined(); expect(sessionReplay.config?.flushMaxRetries).toBe(1); expect(sessionReplay.config?.optOut).toBe(false); expect(sessionReplay.identifiers?.deviceId).toBe('1a2b3c'); expect(sessionReplay.identifiers?.sessionId).toBe(123); expect(sessionReplay.config?.logLevel).toBe(0); expect(sessionReplay.loggerProvider).toBeDefined(); if (sessionReplay.config) { await expectationFn(sessionReplay.config); } }); test.each([ [ { enabled: true, interaction: { timeoutMs: 5000, maxNumberOfTries: 5000, threshold: 500, }, }, async (config: SessionReplayJoinedConfig) => { expect(config.performanceConfig?.enabled).toBe(true); expect(config.performanceConfig?.interaction?.timeoutMs).toBe(5000); expect(config.performanceConfig?.interaction?.maxNumberOfTries).toBe(5000); expect(config.performanceConfig?.interaction?.threshold).toBe(500); }, ], [ { enabled: true, interaction: { timeoutMs: 3000, }, }, async (config: SessionReplayJoinedConfig) => { expect(config.performanceConfig?.enabled).toBe(true); expect(config.performanceConfig?.interaction?.timeoutMs).toBe(3000); expect(config.performanceConfig?.interaction?.maxNumberOfTries).toBeUndefined(); expect(config.performanceConfig?.interaction?.threshold).toBeUndefined(); }, ], [ { enabled: false, }, async (config: SessionReplayJoinedConfig) => { expect(config.performanceConfig?.enabled).toBe(false); expect(config.performanceConfig?.interaction).toBeUndefined(); }, ], [ undefined, async (config: SessionReplayJoinedConfig) => { expect(config.performanceConfig?.enabled).toBe(true); expect(config.performanceConfig?.interaction).toBeUndefined(); }, ], ])('should setup sdk with performance config', async (performanceConfig, expectationFn) => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, }; await sessionReplay.init(apiKey, { ...mockOptions, performanceConfig, sampleRate: 0.5, }).promise; if (sessionReplay.config) { await expectationFn(sessionReplay.config); } }); test.each([ [ { console: { enabled: true, levels: ['warn', 'error'] }, }, async (config: SessionReplayJoinedConfig) => { expect(config.loggingConfig?.console.enabled).toBe(true); expect(config.loggingConfig?.console.levels).toStrictEqual(['warn', 'error']); }, ], [ { console: { enabled: true, levels: ['error'] }, }, async (config: SessionReplayJoinedConfig) => { expect(config.loggingConfig?.console.enabled).toBe(true); expect(config.loggingConfig?.console.levels).toStrictEqual(['error']); }, ], ])('should setup sdk with interaction config', async (loggingConfig, expectationFn) => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_logging_config: loggingConfig, }; await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, }).promise; expect(sessionReplay.config?.transportProvider).toBeDefined(); expect(sessionReplay.config?.flushMaxRetries).toBe(1); expect(sessionReplay.config?.optOut).toBe(false); expect(sessionReplay.identifiers?.deviceId).toBe('1a2b3c'); expect(sessionReplay.identifiers?.sessionId).toBe(123); expect(sessionReplay.config?.logLevel).toBe(0); expect(sessionReplay.loggerProvider).toBeDefined(); if (sessionReplay.config) { await expectationFn(sessionReplay.config); } }); test('should call initialize with shouldSendStoredEvents=true', async () => { await sessionReplay.init(apiKey, mockOptions).promise; expect(initialize).toHaveBeenCalledTimes(1); expect(initialize.mock.calls[0]).toEqual([true]); }); test('should set up blur and focus event listeners', async () => { const initialize = jest.spyOn(sessionReplay, 'initialize'); await sessionReplay.init(apiKey, mockOptions).promise; const recordMock = jest.fn().mockResolvedValue(undefined); sessionReplay.recordEvents = recordMock; // Clear recordCancelCallback and recordEventsInFlight so focusListener takes the fallback recordEvents path sessionReplay.recordCancelCallback = null; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordEventsInFlight = false; initialize.mockReset(); expect(addEventListenerMock).toHaveBeenCalledTimes(3); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(addEventListenerMock.mock.calls[0][0]).toEqual('blur'); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment const blurCallback = addEventListenerMock.mock.calls[0][1]; // eslint-disable-next-line @typescript-eslint/no-unsafe-call blurCallback(); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(addEventListenerMock.mock.calls[1][0]).toEqual('focus'); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment const focusCallback = addEventListenerMock.mock.calls[1][1]; // eslint-disable-next-line @typescript-eslint/no-unsafe-call focusCallback(); expect(recordMock).toHaveBeenCalledWith(false); }); describe('focusListener', () => { test('calls takeFullSnapshot(true) when already recording, does not call recordEvents', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const takeFullSnapshotMock = jest.fn(); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordCancelCallback = jest.fn(); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordFunction = { takeFullSnapshot: takeFullSnapshotMock }; const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); sessionReplay.focusListener(); expect(takeFullSnapshotMock).toHaveBeenCalledWith(true); expect(recordEventsSpy).not.toHaveBeenCalled(); }); test('calls recordEvents(false) when not recording and not in-flight', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordCancelCallback = null; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordEventsInFlight = false; const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents').mockResolvedValue(undefined); sessionReplay.focusListener(); expect(recordEventsSpy).toHaveBeenCalledWith(false); }); test('does nothing when not recording but already in-flight', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordCancelCallback = null; // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordEventsInFlight = true; const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); const takeFullSnapshotMock = jest.fn(); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordFunction = { takeFullSnapshot: takeFullSnapshotMock }; sessionReplay.focusListener(); expect(takeFullSnapshotMock).not.toHaveBeenCalled(); expect(recordEventsSpy).not.toHaveBeenCalled(); }); test('warns via loggerProvider when takeFullSnapshot throws', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const warnSpy = jest.spyOn(sessionReplay.loggerProvider, 'warn'); const testError = new Error('rrweb snapshot failed'); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordCancelCallback = jest.fn(); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (sessionReplay as any).recordFunction = { takeFullSnapshot: jest.fn().mockImplementation(() => { throw testError; }), }; sessionReplay.focusListener(); expect(warnSpy).toHaveBeenCalledWith('Failed to take full snapshot on focus:', testError); }); }); test('it should not call initialize if the document does not have focus', () => { const initialize = jest.spyOn(sessionReplay, 'initialize'); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ document: { hasFocus: () => false, }, } as typeof globalThis); expect(initialize).not.toHaveBeenCalled(); }); describe('flushMaxRetries config', () => { test('should use default config value if no max retries', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, { ...mockOptions, flushMaxRetries: undefined }).promise; expect(sessionReplay.config?.flushMaxRetries).toBe(2); }); test('should cap max retries at default config value', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, { ...mockOptions, flushMaxRetries: 10 }).promise; expect(sessionReplay.config?.flushMaxRetries).toBe(2); }); test('should allow a lower value than default config value', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, { ...mockOptions, flushMaxRetries: 0 }).promise; expect(sessionReplay.config?.flushMaxRetries).toBe(0); }); }); test('should terminate previous eventCompressor on re-initialization', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Spy on terminate of the first eventCompressor const terminateSpy = jest.spyOn(sessionReplay.eventCompressor!, 'terminate'); // Call init again to trigger terminate await sessionReplay.init(apiKey, mockOptions).promise; expect(terminateSpy).toHaveBeenCalled(); }); test.each([ { description: 'should call rrweb with applyBackgroundColorToBlockedElements=true when option is true', options: { applyBackgroundColorToBlockedElements: true }, expectedValue: true, }, { description: 'should call rrweb with applyBackgroundColorToBlockedElements=false when option is false', options: { applyBackgroundColorToBlockedElements: false }, expectedValue: false, }, { description: 'should call rrweb with applyBackgroundColorToBlockedElements=false when option is undefined', options: { applyBackgroundColorToBlockedElements: undefined }, expectedValue: false, }, { description: 'should call rrweb with applyBackgroundColorToBlockedElements=false when option is not provided', options: {}, expectedValue: false, }, ])('$description', async ({ options, expectedValue }) => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, { ...mockOptions, ...options, }).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; expect(recordArg?.applyBackgroundColorToBlockedElements).toBe(expectedValue); }); test.each([ { description: 'should pass captureAdoptedStyleSheets=true to rrweb when option is true', options: { captureAdoptedStyleSheets: true }, expectedValue: true, }, { description: 'should pass captureAdoptedStyleSheets=false to rrweb when option is false', options: { captureAdoptedStyleSheets: false }, expectedValue: false, }, { description: 'should pass captureAdoptedStyleSheets=true to rrweb when option is not provided (default)', options: {}, expectedValue: true, }, ])('$description', async ({ options, expectedValue }) => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, { ...mockOptions, ...options, }).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; expect(recordArg?.captureAdoptedStyleSheets).toBe(expectedValue); }); describe('background capture', () => { let mockMessenger: { setup: jest.Mock }; let getOrCreateSpy: jest.SpyInstance; let enableBgCaptureSpy: jest.SpyInstance; beforeEach(() => { mockMessenger = { setup: jest.fn() }; getOrCreateSpy = jest.spyOn(AnalyticsCore, 'getOrCreateWindowMessenger').mockReturnValue(mockMessenger as any); enableBgCaptureSpy = jest.spyOn(AnalyticsCore, 'enableBackgroundCapture').mockImplementation(jest.fn()); }); test('should enable background capture when window.opener exists', async () => { globalSpy = jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ ...mockGlobalScope, opener: {}, }); await sessionReplay.init(apiKey, mockOptions).promise; expect(getOrCreateSpy).toHaveBeenCalled(); expect(enableBgCaptureSpy).toHaveBeenCalledWith(mockMessenger); expect(mockMessenger.setup).toHaveBeenCalledTimes(1); const setupArg = mockMessenger.setup.mock.calls[0][0]; expect(setupArg.endpoint).toBe(AnalyticsCore.AMPLITUDE_ORIGINS_MAP[mockOptions.serverZone!]); }); test('should not enable background capture when window.opener is absent', async () => { await sessionReplay.init(apiKey, mockOptions).promise; expect(getOrCreateSpy).not.toHaveBeenCalled(); expect(enableBgCaptureSpy).not.toHaveBeenCalled(); }); test('should pass the correct endpoint for each server zone', async () => { globalSpy = jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ ...mockGlobalScope, opener: {}, }); await sessionReplay.init(apiKey, { ...mockOptions, serverZone: ServerZone.US, }).promise; const setupArg = mockMessenger.setup.mock.calls[0][0]; expect(setupArg.endpoint).toBe(AnalyticsCore.AMPLITUDE_ORIGINS_MAP['US']); }); }); }); describe('setSessionId', () => { test('should stop recording events for current session', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const stopRecordingMock = jest.fn(); // Mock class as if it has already been recording events sessionReplay.sendEvents = stopRecordingMock; sessionReplay.setSessionId(456); expect(stopRecordingMock).toHaveBeenCalled(); }); test('should update the session id and start recording', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Clear any calls from initialization mockRecordFunction.mockClear(); expect(sessionReplay.identifiers?.sessionId).toEqual(123); expect(sessionReplay.identifiers?.sessionReplayId).toEqual('1a2b3c/123'); if (!sessionReplay.eventsManager || !sessionReplay.joinedConfigGenerator || !sessionReplay.config) { throw new Error('Init not called'); } const updatedConfig = { ...sessionReplay.config, sampleRate: 0.9 }; const generateJoinedConfigPromise = Promise.resolve({ joinedConfig: updatedConfig, localConfig: updatedConfig, remoteConfig: undefined, }); jest .spyOn(sessionReplay.joinedConfigGenerator, 'generateJoinedConfig') .mockReturnValue(generateJoinedConfigPromise); await sessionReplay.setSessionId(456).promise; expect(sessionReplay.identifiers?.sessionId).toEqual(456); expect(sessionReplay.identifiers?.sessionReplayId).toEqual('1a2b3c/456'); await generateJoinedConfigPromise; // With targeting functionality, setSessionId triggers recording via evaluateTargetingAndCapture // The function may be called multiple times due to focus listeners or other async operations expect(mockRecordFunction).toHaveBeenCalled(); expect(sessionReplay.config).toEqual(updatedConfig); }); test('should regenerate config', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.joinedConfigGenerator || !sessionReplay.eventsManager) { throw new Error('Did not call init'); } const mockUpdatedConfig = new SessionReplayLocalConfig('static_key', { ...mockOptions, sampleRate: 0.6 }); const mockSessionReplayConfigs = { joinedConfig: mockUpdatedConfig, localConfig: mockUpdatedConfig, remoteConfig: undefined, }; const generateJoinedConfig = jest .spyOn(sessionReplay.joinedConfigGenerator, 'generateJoinedConfig') .mockResolvedValue(mockSessionReplayConfigs); expect(sessionReplay.identifiers?.sessionId).toEqual(123); expect(sessionReplay.identifiers?.sessionReplayId).toEqual('1a2b3c/123'); await sessionReplay.setSessionId(456).promise; expect(generateJoinedConfig).toHaveBeenCalledTimes(1); expect(sessionReplay.config).toEqual(mockUpdatedConfig); }); test('should not record if no config', async () => { await sessionReplay.setSessionId(456).promise; expect(mockRecordFunction).not.toHaveBeenCalled(); }); test('should update the device id if passed', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.loggerProvider = mockLoggerProvider; sessionReplay.setSessionId(456, '9l8m7n'); expect(sessionReplay.identifiers?.sessionId).toEqual(456); expect(sessionReplay.identifiers?.sessionReplayId).toEqual('9l8m7n/456'); expect(sessionReplay.identifiers?.deviceId).toEqual('9l8m7n'); expect(sessionReplay.getDeviceId()).toEqual('9l8m7n'); }); test('should call asyncSetSessionId with userProperties when options provided', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Create a mock config with targeting config that will be returned by generateJoinedConfig const mockConfigWithTargeting = new SessionReplayLocalConfig(apiKey, mockOptions); (mockConfigWithTargeting as SessionReplayJoinedConfig).targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; // Mock generateJoinedConfig to return config with targeting const mockSessionReplayConfigs = { joinedConfig: mockConfigWithTargeting, localConfig: mockConfigWithTargeting, remoteConfig: undefined, }; jest .spyOn(sessionReplay.joinedConfigGenerator!, 'generateJoinedConfig') .mockResolvedValue(mockSessionReplayConfigs); const evaluateTargetingAndCaptureSpy = jest.spyOn(sessionReplay, 'evaluateTargetingAndCapture'); // Test with userProperties const userProperties = { age: 30, city: 'New York' }; await (sessionReplay as any).asyncSetSessionId(456, '9l8m7n', { userProperties }); expect(evaluateTargetingAndCaptureSpy).toHaveBeenCalledWith( { userProperties, page: { url: 'http://localhost' } }, false, true, ); // Test without userProperties (options is undefined) await (sessionReplay as any).asyncSetSessionId(789, '9l8m7n'); expect(evaluateTargetingAndCaptureSpy).toHaveBeenCalledWith( { userProperties: undefined, page: { url: 'http://localhost' } }, false, true, ); // Test with empty options await (sessionReplay as any).asyncSetSessionId(101, '9l8m7n', {}); expect(evaluateTargetingAndCaptureSpy).toHaveBeenCalledWith( { userProperties: undefined, page: { url: 'http://localhost' } }, false, true, ); }); test('should call evaluateTargetingAndCapture with forceRestart true when targetingConfig exists', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Create a mock config with targeting config const mockConfigWithTargeting = new SessionReplayLocalConfig(apiKey, mockOptions); (mockConfigWithTargeting as SessionReplayJoinedConfig).targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; const mockSessionReplayConfigs = { joinedConfig: mockConfigWithTargeting, localConfig: mockConfigWithTargeting, remoteConfig: undefined, }; jest .spyOn(sessionReplay.joinedConfigGenerator!, 'generateJoinedConfig') .mockResolvedValue(mockSessionReplayConfigs); const evaluateTargetingAndCaptureSpy = jest.spyOn(sessionReplay, 'evaluateTargetingAndCapture'); // Simulate recording is already active sessionReplay.recordCancelCallback = jest.fn(); await (sessionReplay as any).asyncSetSessionId(456, '9l8m7n'); // Verify that evaluateTargetingAndCapture was called with forceRestart = true expect(evaluateTargetingAndCaptureSpy).toHaveBeenCalledWith( { userProperties: undefined, page: { url: 'http://localhost' } }, false, true, ); }); test('should call recordEvents when no targetingConfig', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await (sessionReplay as any).asyncSetSessionId(456, '9l8m7n'); expect(recordEventsSpy).toHaveBeenCalled(); }); test('should invalidate in-flight URL-change targeting evaluation on session change', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; await sessionReplay.init(apiKey, mockOptions).promise; const mockConfigWithTargeting = new SessionReplayLocalConfig(apiKey, mockOptions); (mockConfigWithTargeting as SessionReplayJoinedConfig).targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; jest.spyOn(sessionReplay.joinedConfigGenerator!, 'generateJoinedConfig').mockResolvedValue({ joinedConfig: mockConfigWithTargeting, localConfig: mockConfigWithTargeting, remoteConfig: undefined, }); let resolveStaleEvaluation!: (value: boolean) => void; const staleEvaluationPromise = new Promise((resolve) => { resolveStaleEvaluation = resolve; }); jest .spyOn(targetingManager, 'evaluateTargetingAndStore') .mockImplementationOnce(() => staleEvaluationPromise) .mockResolvedValueOnce(false); sessionReplay.sessionTargetingMatch = false; ( sessionReplay as unknown as { latestUrlChangeTargetingEvaluationId: number; } ).latestUrlChangeTargetingEvaluationId = 1; const staleUrlEvaluation = sessionReplay.evaluateTargetingAndCapture( { page: { url: 'https://example.com/old-session-page' } }, false, false, true, ); await (sessionReplay as any).asyncSetSessionId(456, '9l8m7n'); resolveStaleEvaluation(true); await staleUrlEvaluation; expect(sessionReplay.sessionTargetingMatch).toBe(false); expect( ( sessionReplay as unknown as { latestUrlChangeTargetingEvaluationId: number; } ).latestUrlChangeTargetingEvaluationId, ).toBe(2); }); test('writes new session start time and removes previous session entry', async () => { globalThis.localStorage.clear(); await sessionReplay.init(apiKey, mockOptions).promise; const prevKey = `AMP_SR_START_${apiKey.substring(0, 10)}_123`; const nextKey = `AMP_SR_START_${apiKey.substring(0, 10)}_456`; expect(globalThis.localStorage.getItem(prevKey)).not.toBeNull(); await (sessionReplay as any).asyncSetSessionId(456, '9l8m7n'); expect(globalThis.localStorage.getItem(prevKey)).toBeNull(); const newStart = Number(globalThis.localStorage.getItem(nextKey)); expect(newStart).toBe(sessionReplay.sessionStartTime); }); test('preserves stored and in-memory start time when sessionId is unchanged', async () => { globalThis.localStorage.clear(); await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.config) throw new Error('init'); const key = `AMP_SR_START_${apiKey.substring(0, 10)}_123`; // Pin a known start time so a regression (overwrite to Date.now()) is visible // regardless of how Date.now() advances during the asyncSetSessionId call. const pinned = 1_700_000_000_000; sessionReplay.sessionStartTime = pinned; globalThis.localStorage.setItem(key, String(pinned)); // Trip gate-decision state so we can assert it survives. (sessionReplay as any).hasEmittedGateDecision = true; (sessionReplay as any).suppressedSendCount = 7; // Caller passes the current sessionId redundantly — must NOT restart the gate clock. await (sessionReplay as any).asyncSetSessionId(123, '1a2b3c'); expect(Number(globalThis.localStorage.getItem(key))).toBe(pinned); expect(sessionReplay.sessionStartTime).toBe(pinned); // Per-session gate state must also be preserved. expect((sessionReplay as any).hasEmittedGateDecision).toBe(true); expect((sessionReplay as any).suppressedSendCount).toBe(7); }); test('drops previous-session beacon buffer ONLY on real session change', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.rrwebEventManager) throw new Error('init'); const dropBeaconMock = jest.fn(); sessionReplay.rrwebEventManager.dropPendingBeaconEvents = dropBeaconMock; // Redundant same-id call: buffer must NOT be dropped (it belongs to the continuing session). await (sessionReplay as any).asyncSetSessionId(123, '1a2b3c'); expect(dropBeaconMock).not.toHaveBeenCalled(); // Real change: buffer MUST be dropped. await (sessionReplay as any).asyncSetSessionId(456, '9l8m7n'); expect(dropBeaconMock).toHaveBeenCalledTimes(1); }); test('drops previous-session beacon buffer on session transition', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.rrwebEventManager) throw new Error('init'); const dropBeaconMock = jest.fn(); sessionReplay.rrwebEventManager.dropPendingBeaconEvents = dropBeaconMock; await (sessionReplay as any).asyncSetSessionId(456, '9l8m7n'); // Prevents the page-leave beacon path from misattributing previous-session // events to the new session id. expect(dropBeaconMock).toHaveBeenCalledTimes(1); }); test('resets per-session gate-decision state on session change', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) throw new Error('init'); sessionReplay.eventsManager.sendCurrentSequenceEvents = jest.fn(); const addCustomSpy = jest.spyOn(sessionReplay, 'addCustomRRWebEvent').mockResolvedValue(undefined); // Recording must be active for the gate-decision emission to fire. sessionReplay.recordCancelCallback = jest.fn(); (sessionReplay as any).recordFunction = { addCustomEvent: jest.fn() }; sessionReplay.config.minSessionDurationMs = 1000; sessionReplay.sessionStartTime = Date.now() - 5000; // First send for session A emits gate-decision and trips hasEmittedGateDecision. sessionReplay.sendEvents(); const sessionAGateCall = addCustomSpy.mock.calls.find((c) => c[0] === 'replay-gate-decision'); expect(sessionAGateCall).toBeDefined(); expect(sessionAGateCall?.[1]).toEqual(expect.objectContaining({ sessionId: 123 })); await (sessionReplay as any).asyncSetSessionId(456, '9l8m7n'); // asyncSetSessionId regenerates the joined config; restore the threshold so the new // session is gated identically to the prior one. if (sessionReplay.config) sessionReplay.config.minSessionDurationMs = 1000; // Drop calls from the session-id transition itself (debug-info / targeting-decision) // so we can assert specifically that the next sendEvents re-emits gate-decision. addCustomSpy.mockClear(); sessionReplay.sessionStartTime = Date.now() - 5000; sessionReplay.sendEvents(); expect(addCustomSpy).toHaveBeenCalledWith( 'replay-gate-decision', expect.objectContaining({ sessionId: 456, suppressedSendCount: 0 }), false, ); }); }); describe('getSessionId', () => { test('should update session id', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const stopRecordingMock = jest.fn(); expect(sessionReplay.getSessionId()).toEqual(mockOptions.sessionId); // Mock class as if it has already been recording events sessionReplay.sendEvents = stopRecordingMock; sessionReplay.setSessionId(456); expect(stopRecordingMock).toHaveBeenCalled(); expect(sessionReplay.getSessionId()).toEqual(456); }); test('should return null if not initialized', () => { expect(sessionReplay.getSessionId()).toBeUndefined(); }); }); describe('getSessionReplayProperties', () => { test('should return an empty object if config not set', () => { sessionReplay.loggerProvider = mockLoggerProvider; const result = sessionReplay.getSessionReplayProperties(); expect(result).toEqual({}); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalled(); }); test('should return an empty object if shouldRecord is false', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.getShouldRecord = () => false; const result = sessionReplay.getSessionReplayProperties(); expect(result).toEqual({}); }); test('should return the session recorded property if shouldRecord is true', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.getShouldRecord = () => true; const result = sessionReplay.getSessionReplayProperties(); expect(result).toEqual({ '[Amplitude] Session Replay ID': '1a2b3c/123', }); }); test('should ignore focus handler when debug mode is on.', async () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ ...mockGlobalScope, document: { hasFocus: () => false, }, } as typeof globalThis); await sessionReplay.init(apiKey, { ...mockOptions, debugMode: true }).promise; const result = sessionReplay.getSessionReplayProperties(); // eslint-disable-next-line @typescript-eslint/unbound-method expect(result).toEqual({ '[Amplitude] Session Replay ID': '1a2b3c/123', '[Amplitude] Session Replay Debug': '{"appHash":"-109988594"}', }); }); test('should return session replay id property with null', async () => { await sessionReplay.init(apiKey, { ...mockOptions }).promise; sessionReplay.getShouldRecord = () => true; if (sessionReplay.identifiers) { sessionReplay.identifiers.sessionReplayId = undefined; } const result = sessionReplay.getSessionReplayProperties(); expect(result).toEqual({ '[Amplitude] Session Replay ID': null, }); }); test('should return debug property', async () => { await sessionReplay.init(apiKey, { ...mockOptions, debugMode: true }).promise; sessionReplay.getShouldRecord = () => true; const result = sessionReplay.getSessionReplayProperties(); expect(result).toEqual({ '[Amplitude] Session Replay ID': '1a2b3c/123', '[Amplitude] Session Replay Debug': '{"appHash":"-109988594"}', }); }); test('should add a custom rrweb event', async () => { await sessionReplay.init(apiKey, { ...mockOptions, debugMode: true }).promise; sessionReplay.addCustomRRWebEvent = jest.fn(); sessionReplay.getShouldRecord = () => true; const result = sessionReplay.getSessionReplayProperties(); expect(sessionReplay.addCustomRRWebEvent).toHaveBeenCalledWith( CustomRRwebEvent.GET_SR_PROPS, { shouldRecord: true, eventProperties: result, }, false, ); }); test('should increment the event count', async () => { await sessionReplay.init(apiKey, { ...mockOptions, debugMode: true }).promise; expect(sessionReplay.eventCount).toBe(0); sessionReplay.getSessionReplayProperties(); expect(sessionReplay.eventCount).toBe(1); }); test('should add a custom rrweb event with storage info if event count is 10, then reset event count', async () => { await sessionReplay.init(apiKey, { ...mockOptions, debugMode: true }).promise; sessionReplay.addCustomRRWebEvent = jest.fn(); sessionReplay.getShouldRecord = () => true; sessionReplay.eventCount = 10; const result = sessionReplay.getSessionReplayProperties(); expect(sessionReplay.addCustomRRWebEvent).toHaveBeenCalledWith( CustomRRwebEvent.GET_SR_PROPS, { shouldRecord: true, eventProperties: result, }, true, ); expect(sessionReplay.eventCount).toEqual(1); }); }); describe('initialize', () => { test('should return early if session id not set', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.identifiers) { throw new Error('Did not call init'); } sessionReplay.identifiers.sessionId = undefined; const sendStoredEventsSpy = jest.spyOn(sessionReplay.eventsManager, 'sendStoredEvents'); await sessionReplay.initialize(true); expect(sendStoredEventsSpy).not.toHaveBeenCalled(); }); test('should return early if no identifiers', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.identifiers = undefined; if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const sendStoredEventsSpy = jest.spyOn(sessionReplay.eventsManager, 'sendStoredEvents'); await sessionReplay.initialize(true); expect(sendStoredEventsSpy).not.toHaveBeenCalled(); }); test('should return early if no device id', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.getDeviceId = jest.fn().mockReturnValue(undefined); if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const sendStoredEventsSpy = jest.spyOn(sessionReplay.eventsManager, 'sendStoredEvents'); await sessionReplay.initialize(true); expect(sendStoredEventsSpy).not.toHaveBeenCalled(); }); test('should send stored events and record events', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const eventsManagerInitSpy = jest.spyOn(sessionReplay.eventsManager, 'sendStoredEvents'); // Override the exisiting global record function with a mock record function const recordFunction = createMockRecordFunction(); const existingRecordFunction = jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any); existingRecordFunction.mockResolvedValue(recordFunction); await sessionReplay.initialize(true); expect(eventsManagerInitSpy).toHaveBeenCalledWith({ deviceId: mockOptions.deviceId, }); expect(recordFunction).toHaveBeenCalledTimes(1); }); test('should not send stored events if shouldSendStoredEvents is false', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const eventsManagerInitSpy = jest.spyOn(sessionReplay.eventsManager, 'sendStoredEvents'); // Override the exisiting global record function with a mock record function const recordFunction = createMockRecordFunction(); const existingRecordFunction = jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any); existingRecordFunction.mockResolvedValue(recordFunction); await sessionReplay.initialize(false); expect(eventsManagerInitSpy).not.toHaveBeenCalled(); expect(recordFunction).toHaveBeenCalledTimes(1); }); test.each([ { enabled: true, expectedLength: 2 }, // scroll fn + beacon fn { enabled: false, expectedLength: 1 }, // beacon fn only { enabled: undefined, expectedLength: 1 }, // beacon fn only ])('should not register scroll if interaction config not enabled', async ({ enabled, expectedLength }) => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled, }, }; await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.5, }).promise; await sessionReplay.initialize(true); expect(sessionReplay.pageLeaveFns).toHaveLength(expectedLength); }); test('should call recordEvents when called without params', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await sessionReplay.initialize(); expect(recordEventsSpy).toHaveBeenCalled(); }); }); describe('shouldOptOut', () => { test('should return undefined if no config set', () => { expect(sessionReplay.shouldOptOut()).toEqual(undefined); }); test('should return opt out from identity store if set', async () => { jest.spyOn(AnalyticsCore, 'getAnalyticsConnector').mockReturnValue({ identityStore: { getIdentity: () => { return { optOut: true, }; }, }, } as unknown as ReturnType); await sessionReplay.init(apiKey, { ...mockOptions, instanceName: 'my_instance' }).promise; expect(sessionReplay.shouldOptOut()).toEqual(true); }); test('should return opt out from identity store even if set to false', async () => { jest.spyOn(AnalyticsCore, 'getAnalyticsConnector').mockReturnValue({ identityStore: { getIdentity: () => { return { optOut: false, }; }, }, } as unknown as ReturnType); await sessionReplay.init(apiKey, { ...mockOptions, instanceName: 'my_instance', optOut: true }).promise; expect(sessionReplay.shouldOptOut()).toEqual(false); }); test('should return config device id if set', async () => { await sessionReplay.init(apiKey, { ...mockOptions, instanceName: 'my_instance', optOut: true }).promise; expect(sessionReplay.shouldOptOut()).toEqual(true); }); }); describe('getShouldRecord', () => { test('should return true if there are options', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const sampleRate = sessionReplay.config?.sampleRate; expect(sampleRate).toBe(mockOptions.sampleRate); const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(true); }); test('should return false if no options', async () => { // Mock as if remote config call fails mockRemoteConfig = null; await sessionReplay.init(apiKey, mockEmptyOptions).promise; const sampleRate = sessionReplay.config?.sampleRate; expect(sampleRate).toBe(DEFAULT_SAMPLE_RATE); const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(false); }); test('should return false if captureEnabled is false', async () => { mockRemoteConfig = { sr_sampling_config: { capture_enabled: false, sample_rate: 0.5, }, sr_privacy_config: {}, }; await sessionReplay.init(apiKey, { ...mockOptions }).promise; const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(false); }); test('should return false if session not included in sample rate', async () => { // Mock as if remote config call fails mockRemoteConfig = null; jest.spyOn(Sampling, 'isSessionInSample').mockImplementationOnce(() => false); await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.2 }).promise; const sampleRate = sessionReplay.config?.sampleRate; expect(sampleRate).toBe(0.2); const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(false); }); test('should set record as true if session is included in sample rate', async () => { await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.2 }).promise; jest.spyOn(Sampling, 'isSessionInSample').mockImplementationOnce(() => true); const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(true); }); test('should set record as false if opt out in config', async () => { await sessionReplay.init(apiKey, { ...mockOptions, optOut: true }).promise; const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(false); }); test('should set record as false if no session id', async () => { await sessionReplay.init(apiKey, { ...mockOptions, sessionId: undefined }).promise; const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(false); }); test('opt out in config should override the sample rate', async () => { jest.spyOn(Math, 'random').mockImplementationOnce(() => 0.7); await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.8, optOut: true }).promise; const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(false); }); test('should return false if no config', async () => { const shouldRecord = sessionReplay.getShouldRecord(); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).not.toHaveBeenCalled(); expect(shouldRecord).toBe(false); }); test('should set record as false if sample rate is too low', async () => { await sessionReplay.init(apiKey, { ...mockOptions, sampleRate: 0.2 }).promise; jest.spyOn(Sampling, 'isSessionInSample').mockImplementationOnce(() => false); const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(false); }); }); describe('sendEventsViaBeacon', () => { // The beacon logic is registered as the last entry in pageLeaveFns during initialize(). const triggerBeacon = (sr: SessionReplay) => { const beaconFn = sr.pageLeaveFns[sr.pageLeaveFns.length - 1]; beaconFn(new Event('pagehide')); }; test('should call sendBeacon with pending events on page exit', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const mockSendBeacon = jest.fn().mockReturnValue(true); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); // Simulate pending events in the replay manager const pendingEvent = JSON.stringify({ type: 3, timestamp: 1 }); if (!sessionReplay.eventsManager) throw new Error('No eventsManager'); sessionReplay.eventsManager.addEvent({ sessionId: 123, event: { type: 'replay', data: pendingEvent }, deviceId: '1a2b3c', }); triggerBeacon(sessionReplay); expect(mockSendBeacon).toHaveBeenCalledTimes(1); const [url, body] = mockSendBeacon.mock.calls[0] as [string, Blob]; expect(url).toContain('api_key='); expect(url).toContain('device_id=1a2b3c'); expect(url).toContain('type=replay'); expect(body).toBeInstanceOf(Blob); expect(body.type).toBe('application/json'); }); test('should not call sendBeacon if no pending events', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const mockSendBeacon = jest.fn(); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); triggerBeacon(sessionReplay); expect(mockSendBeacon).not.toHaveBeenCalled(); }); test('should not call sendBeacon if no config', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.config = undefined; const mockSendBeacon = jest.fn(); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); triggerBeacon(sessionReplay); expect(mockSendBeacon).not.toHaveBeenCalled(); }); test('should not call sendBeacon if no device id', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.identifiers!.deviceId = undefined; const mockSendBeacon = jest.fn(); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); if (!sessionReplay.eventsManager) throw new Error('No eventsManager'); sessionReplay.eventsManager.addEvent({ sessionId: 123, event: { type: 'replay', data: 'x' }, deviceId: '1a2b3c', }); triggerBeacon(sessionReplay); expect(mockSendBeacon).not.toHaveBeenCalled(); }); test('should swallow sendBeacon errors', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const mockSendBeacon = jest.fn().mockImplementation(() => { throw new Error('beacon error'); }); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); if (!sessionReplay.eventsManager) throw new Error('No eventsManager'); sessionReplay.eventsManager.addEvent({ sessionId: 123, event: { type: 'replay', data: 'x' }, deviceId: '1a2b3c', }); expect(() => { triggerBeacon(sessionReplay); }).not.toThrow(); }); test('should invoke beacon via pageLeaveFns on page exit', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.initialize(true); const mockSendBeacon = jest.fn().mockReturnValue(true); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); if (!sessionReplay.eventsManager) throw new Error('No eventsManager'); sessionReplay.eventsManager.addEvent({ sessionId: 123, event: { type: 'replay', data: 'x' }, deviceId: '1a2b3c', }); // The beacon fn is always the last item added to pageLeaveFns during initialize() const beaconFn = sessionReplay.pageLeaveFns[sessionReplay.pageLeaveFns.length - 1]; beaconFn(new Event('pagehide')); expect(mockSendBeacon).toHaveBeenCalledTimes(1); }); test('should not call sendBeacon if identifiers is undefined', async () => { await sessionReplay.init(apiKey, mockOptions).promise; (sessionReplay as any).identifiers = undefined; const mockSendBeacon = jest.fn(); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); triggerBeacon(sessionReplay); expect(mockSendBeacon).not.toHaveBeenCalled(); }); test('should not call sendBeacon if no pending events in beacon buffer', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const mockSendBeacon = jest.fn(); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); // No events added — beacon buffer is empty triggerBeacon(sessionReplay); expect(mockSendBeacon).not.toHaveBeenCalled(); }); test('should not throw when globalScope is null', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager) throw new Error('No eventsManager'); sessionReplay.eventsManager.addEvent({ sessionId: 123, event: { type: 'replay', data: 'x' }, deviceId: '1a2b3c', }); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue(null as unknown as typeof globalThis); expect(() => { triggerBeacon(sessionReplay); }).not.toThrow(); }); test('should not throw when navigator is undefined', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager) throw new Error('No eventsManager'); sessionReplay.eventsManager.addEvent({ sessionId: 123, event: { type: 'replay', data: 'x' }, deviceId: '1a2b3c', }); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({} as unknown as typeof globalThis); expect(() => { triggerBeacon(sessionReplay); }).not.toThrow(); }); test('should not throw when sendBeacon is undefined', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager) throw new Error('No eventsManager'); sessionReplay.eventsManager.addEvent({ sessionId: 123, event: { type: 'replay', data: 'x' }, deviceId: '1a2b3c', }); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: {}, } as unknown as typeof globalThis); expect(() => { triggerBeacon(sessionReplay); }).not.toThrow(); }); test('should not call sendBeacon if session duration is below minSessionDurationMs', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) throw new Error('No eventsManager or config'); sessionReplay.config.minSessionDurationMs = 5000; sessionReplay.sessionStartTime = Date.now() - 1000; const mockSendBeacon = jest.fn().mockReturnValue(true); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); sessionReplay.eventsManager.addEvent({ sessionId: 123, event: { type: 'replay', data: 'x' }, deviceId: '1a2b3c', }); triggerBeacon(sessionReplay); expect(mockSendBeacon).not.toHaveBeenCalled(); }); test('should call sendBeacon if session duration meets minSessionDurationMs', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) throw new Error('No eventsManager or config'); sessionReplay.config.minSessionDurationMs = 1000; sessionReplay.sessionStartTime = Date.now() - 5000; const mockSendBeacon = jest.fn().mockReturnValue(true); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); sessionReplay.eventsManager.addEvent({ sessionId: 123, event: { type: 'replay', data: 'x' }, deviceId: '1a2b3c', }); triggerBeacon(sessionReplay); expect(mockSendBeacon).toHaveBeenCalledTimes(1); }); test('should not call sendBeacon if rrwebEventManager failed to initialize', async () => { // When createEventsManager throws for the 'replay' type, rrwebEventManager stays // undefined in the pageLeaveFns closure — the beacon fn should handle this gracefully. jest.spyOn(SessionReplayEventsManager, 'createEventsManager').mockRejectedValueOnce(new Error('init failed')); await sessionReplay.init(apiKey, mockOptions).promise; const mockSendBeacon = jest.fn(); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); triggerBeacon(sessionReplay); expect(mockSendBeacon).not.toHaveBeenCalled(); }); }); describe('sendEvents', () => { test('it should send events for passed session', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const sendEventsMock = jest.fn(); if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } sessionReplay.eventsManager.sendCurrentSequenceEvents = sendEventsMock; sessionReplay.sendEvents(123); expect(sendEventsMock).toHaveBeenCalledWith({ sessionId: 123, deviceId: '1a2b3c', }); }); test('it should send events for config session if none passed', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const sendEventsMock = jest.fn(); if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } sessionReplay.eventsManager.sendCurrentSequenceEvents = sendEventsMock; sessionReplay.sendEvents(); expect(sendEventsMock).toHaveBeenCalledWith({ sessionId: 123, deviceId: '1a2b3c', }); }); test('it should not send if no identifiers', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.identifiers = undefined; const sendEventsMock = jest.fn(); if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } sessionReplay.eventsManager.sendCurrentSequenceEvents = sendEventsMock; sessionReplay.sendEvents(); expect(sendEventsMock).not.toHaveBeenCalled(); }); test('it should not send if session duration is below minSessionDurationMs', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config || !sessionReplay.rrwebEventManager) { throw new Error('Did not call init'); } const sendEventsMock = jest.fn(); const dropBeaconMock = jest.fn(); sessionReplay.eventsManager.sendCurrentSequenceEvents = sendEventsMock; sessionReplay.rrwebEventManager.dropPendingBeaconEvents = dropBeaconMock; sessionReplay.config.minSessionDurationMs = 5000; sessionReplay.sessionStartTime = Date.now() - 1000; sessionReplay.sendEvents(); expect(sendEventsMock).not.toHaveBeenCalled(); // Beacon buffer is intentionally preserved here: a later send-after-pass within // the same session may legitimately deliver these events via beacon on page exit. // Cross-session leak is prevented in asyncSetSessionId instead. expect(dropBeaconMock).not.toHaveBeenCalled(); }); test('it should not throw on below-threshold sendEvents when rrwebEventManager is undefined', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) { throw new Error('Did not call init'); } const sendEventsMock = jest.fn(); sessionReplay.eventsManager.sendCurrentSequenceEvents = sendEventsMock; sessionReplay.rrwebEventManager = undefined; sessionReplay.config.minSessionDurationMs = 5000; sessionReplay.sessionStartTime = Date.now() - 1000; expect(() => sessionReplay.sendEvents()).not.toThrow(); expect(sendEventsMock).not.toHaveBeenCalled(); }); test('it should send if minSessionDurationMs is set but sessionStartTime is undefined', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) { throw new Error('Did not call init'); } const sendEventsMock = jest.fn(); sessionReplay.eventsManager.sendCurrentSequenceEvents = sendEventsMock; sessionReplay.config.minSessionDurationMs = 5000; sessionReplay.sessionStartTime = undefined; sessionReplay.sendEvents(); expect(sendEventsMock).toHaveBeenCalled(); }); test('it should send if config is undefined', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const sendEventsMock = jest.fn(); sessionReplay.eventsManager.sendCurrentSequenceEvents = sendEventsMock; sessionReplay.config = undefined; sessionReplay.sendEvents(); expect(sendEventsMock).toHaveBeenCalled(); }); test('it should send if session duration meets minSessionDurationMs', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) { throw new Error('Did not call init'); } const sendEventsMock = jest.fn(); sessionReplay.eventsManager.sendCurrentSequenceEvents = sendEventsMock; sessionReplay.config.minSessionDurationMs = 1000; sessionReplay.sessionStartTime = Date.now() - 5000; sessionReplay.sendEvents(); expect(sendEventsMock).toHaveBeenCalledWith({ sessionId: 123, deviceId: '1a2b3c', }); }); test('emits REPLAY_GATE_DECISION on first send-after-pass with suppressed count', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) { throw new Error('Did not call init'); } sessionReplay.eventsManager.sendCurrentSequenceEvents = jest.fn(); const addCustomSpy = jest.spyOn(sessionReplay, 'addCustomRRWebEvent').mockResolvedValue(undefined); // Recording must be active for the gate-decision event to fire; addCustomRRWebEvent // is a no-op when recordCancelCallback / recordFunction are unset. sessionReplay.recordCancelCallback = jest.fn(); (sessionReplay as any).recordFunction = { addCustomEvent: jest.fn() }; sessionReplay.config.minSessionDurationMs = 5000; // First call: below threshold, suppressed. sessionReplay.sessionStartTime = Date.now() - 1000; sessionReplay.sendEvents(); // Second call: still below threshold, suppressed. sessionReplay.sendEvents(); expect(addCustomSpy).not.toHaveBeenCalled(); // Third call: now above threshold — emits gate-decision event with the two prior suppressions. sessionReplay.sessionStartTime = Date.now() - 6000; sessionReplay.sendEvents(); expect(addCustomSpy).toHaveBeenCalledWith( 'replay-gate-decision', expect.objectContaining({ sessionId: 123, suppressedSendCount: 2, minSessionDurationMs: 5000, elapsedMs: expect.any(Number), }), false, ); // Fourth call: subsequent send doesn't re-emit (once per session). addCustomSpy.mockClear(); sessionReplay.sendEvents(); expect(addCustomSpy).not.toHaveBeenCalled(); }); test('does not emit REPLAY_GATE_DECISION when minSessionDurationMs is unset', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) { throw new Error('Did not call init'); } sessionReplay.eventsManager.sendCurrentSequenceEvents = jest.fn(); const addCustomSpy = jest.spyOn(sessionReplay, 'addCustomRRWebEvent').mockResolvedValue(undefined); sessionReplay.recordCancelCallback = jest.fn(); (sessionReplay as any).recordFunction = { addCustomEvent: jest.fn() }; sessionReplay.config.minSessionDurationMs = undefined; sessionReplay.sendEvents(); expect(addCustomSpy).not.toHaveBeenCalled(); }); test('does not emit or trip the gate-decision flag when recording is inactive', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) { throw new Error('Did not call init'); } sessionReplay.eventsManager.sendCurrentSequenceEvents = jest.fn(); const addCustomSpy = jest.spyOn(sessionReplay, 'addCustomRRWebEvent').mockResolvedValue(undefined); sessionReplay.config.minSessionDurationMs = 5000; sessionReplay.sessionStartTime = Date.now() - 6000; // Recording not started yet — emission is a no-op so the flag must NOT trip. sessionReplay.recordCancelCallback = null; (sessionReplay as any).recordFunction = null; sessionReplay.sendEvents(); expect(addCustomSpy).not.toHaveBeenCalled(); // Once recording activates, the next send should emit. sessionReplay.recordCancelCallback = jest.fn(); (sessionReplay as any).recordFunction = { addCustomEvent: jest.fn() }; sessionReplay.sendEvents(); expect(addCustomSpy).toHaveBeenCalledWith( 'replay-gate-decision', expect.objectContaining({ sessionId: 123 }), false, ); }); test('emits elapsedMs as undefined when sessionStartTime is missing at first send-after-pass', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager || !sessionReplay.config) { throw new Error('Did not call init'); } sessionReplay.eventsManager.sendCurrentSequenceEvents = jest.fn(); const addCustomSpy = jest.spyOn(sessionReplay, 'addCustomRRWebEvent').mockResolvedValue(undefined); sessionReplay.recordCancelCallback = jest.fn(); (sessionReplay as any).recordFunction = { addCustomEvent: jest.fn() }; sessionReplay.config.minSessionDurationMs = 5000; // sessionStartTime undefined makes isBelowMinSessionDuration() return false, so the // pass-path fires but elapsedMs can't be computed. sessionReplay.sessionStartTime = undefined; sessionReplay.sendEvents(); expect(addCustomSpy).toHaveBeenCalledWith( 'replay-gate-decision', expect.objectContaining({ elapsedMs: undefined }), false, ); }); }); describe('stopRecordingEvents', () => { test('it should catch errors as warnings', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const mockStopRecordingEvents = jest.fn().mockImplementation(() => { throw new Error('test error'); }); sessionReplay.recordCancelCallback = mockStopRecordingEvents; sessionReplay.stopRecordingEvents(); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalled(); }); test('it should call recordCancelCallback and set it to null', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const mockStopRecordingEvents = jest.fn(); sessionReplay.recordCancelCallback = mockStopRecordingEvents; sessionReplay.stopRecordingEvents(); expect(mockStopRecordingEvents).toHaveBeenCalled(); expect(sessionReplay.recordCancelCallback).toEqual(null); }); }); describe('recordEvents', () => { let createEventsIDBStoreInstance: SessionReplayIDB.SessionReplayEventsIDBStore; beforeEach(async () => { createEventsIDBStoreInstance = (await SessionReplayIDB.SessionReplayEventsIDBStore.new('replay', { loggerProvider: mockLoggerProvider, apiKey, }))!; }); test('should return early if no config', async () => { // Spy on recordEvents to track calls const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await sessionReplay.init(apiKey, mockOptions).promise; // Advance timers to allow any pending async operations to complete jest.runAllTimers(); // Reset both spies after initialization recordEventsSpy.mockClear(); // Now set config to undefined and call recordEvents sessionReplay.config = undefined; // Override the exisiting global record function with a mock record function const recordFunction = createMockRecordFunction(); const existingRecordFunction = jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any); existingRecordFunction.mockResolvedValue(recordFunction); await sessionReplay.recordEvents(); // Verify recordEvents was called but mockRecordFunction was not expect(recordEventsSpy).toHaveBeenCalledTimes(1); expect(recordFunction).not.toHaveBeenCalled(); if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const currentSequenceEvents = await createEventsIDBStoreInstance.getCurrentSequenceEvents(123); expect(currentSequenceEvents).toEqual(undefined); // Clean up spy recordEventsSpy.mockRestore(); }); test('should return early if no identifiers', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.identifiers = undefined; // Override the exisiting global record function with a mock record function const recordFunction = createMockRecordFunction(); const existingRecordFunction = jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any); existingRecordFunction.mockResolvedValue(recordFunction); await sessionReplay.recordEvents(); expect(recordFunction).not.toHaveBeenCalled(); }); test('should return early if user opts out', async () => { await sessionReplay.init(apiKey, { ...mockOptions, optOut: true, privacyConfig: { blockSelector: ['#class'] } }) .promise; await sessionReplay.recordEvents(); expect(mockRecordFunction).not.toHaveBeenCalled(); if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const currentSequenceEvents = await createEventsIDBStoreInstance.getCurrentSequenceEvents(123); expect(currentSequenceEvents).toEqual(undefined); }); test('should stop recording before starting anew', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Drain any background recordEvents() call fired via `void initialize()` await jest.runAllTimersAsync(); const stopRecordingMock = jest.fn(); sessionReplay.recordCancelCallback = stopRecordingMock; await sessionReplay.recordEvents(); expect(stopRecordingMock).toHaveBeenCalled(); }); test('should stop recording and send events if user opts out during recording', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const stopRecordingMock = jest.fn(); sessionReplay.recordCancelCallback = stopRecordingMock; if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const currentSequenceEvents = await createEventsIDBStoreInstance.getCurrentSequenceEvents(123); expect(currentSequenceEvents).toEqual(undefined); await createEventsIDBStoreInstance.addEventToCurrentSequence(123, mockEventString); // Add one event to list to trigger sending in sendEvents const sendEventsMock = jest.spyOn(sessionReplay.eventsManager, 'sendCurrentSequenceEvents'); sessionReplay.shouldOptOut = () => true; const recordArg = mockRecordFunction.mock.calls[0][0]; recordArg?.emit && recordArg?.emit(mockEvent); expect(sendEventsMock).toHaveBeenCalledTimes(1); expect(sendEventsMock).toHaveBeenCalledWith({ sessionId: 123, deviceId: '1a2b3c', }); expect(stopRecordingMock).toHaveBeenCalled(); expect(sessionReplay.recordCancelCallback).toEqual(null); // The emitted mockEvent must be ignored due to opt-out — opt-out path returns // before any addEvent call. After the (now atomic) storeCurrentSequence // promotes the pre-existing mockEventString to sequencesToSend, the original // event still exists exactly once in the combined view across both stores — // no duplication, no extra event from the emit. const updatedCurrentSequenceEvents = (await createEventsIDBStoreInstance.getCurrentSequenceEvents(123)) ?? []; const sequencesToSend = (await createEventsIDBStoreInstance.getSequencesToSend()) ?? []; const allEvents = [ ...updatedCurrentSequenceEvents.flatMap((s) => s.events), ...sequencesToSend.flatMap((s) => s.events), ]; expect(allEvents).toEqual([mockEventString]); // exactly the one pre-existing event }); test('should add an error handler', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const errorHandlerReturn = recordArg?.errorHandler && recordArg?.errorHandler(new Error('test error')); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalled(); expect(errorHandlerReturn).toBe(true); }); test('should enable all slim dom options by default', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; expect(recordArg?.slimDOMOptions).toEqual({ script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaDescKeywords: true, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaAuthorship: true, headMetaVerification: true, }); }); test('should pass fullSnapshotIntervalMs to record function as checkoutEveryNms when configured', async () => { await sessionReplay.init(apiKey, { ...mockOptions, fullSnapshotIntervalMs: 300000 }).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; expect(recordArg?.checkoutEveryNms).toBe(300000); }); test('should not pass checkoutEveryNms to record function when fullSnapshotIntervalMs is not configured', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; expect(recordArg?.checkoutEveryNms).toBeUndefined(); }); test('should rethrow CSSStylesheet errors', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const stylesheetErrorMessage = "Failed to execute 'insertRule' on 'CSSStyleSheet': Failed to parse the rule 'body::-ms-expand{display: none}"; expect(() => { recordArg?.errorHandler && recordArg?.errorHandler(new Error(stylesheetErrorMessage)); }).toThrow(stylesheetErrorMessage); }); test('should rethrow external errors', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const error = new Error('test') as Error & { _external_?: boolean }; error._external_ = true; expect(() => { recordArg?.errorHandler && recordArg?.errorHandler(error); }).toThrow(error); }); test('should not add hooks if interaction config is not enabled', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const error = new Error('test') as Error & { _external_?: boolean }; error._external_ = true; expect(recordArg?.hooks).toStrictEqual({}); }); test('should add hooks if interaction config is enabled', async () => { // enable interaction config mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, }, }; const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const error = new Error('test') as Error & { _external_?: boolean }; error._external_ = true; expect(recordArg?.hooks?.mouseInteraction).toBeDefined(); expect(recordArg?.hooks?.scroll).toBeDefined(); }); test('should handle interaction config enabled without clickHandler initialized', async () => { // enable interaction config mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, }, }; const sessionReplay = new SessionReplay(); // Init without sessionId so clickHandler is not created const optionsWithoutSessionId = { ...mockOptions }; delete optionsWithoutSessionId.sessionId; await sessionReplay.init(apiKey, optionsWithoutSessionId).promise; // Set sessionId after init — await so the internal recordEvents() call completes await sessionReplay.setSessionId(123456).promise; const recordArg = mockRecordFunction.mock.calls[0][0]; // mouseInteraction should be undefined because clickHandler was never initialized expect(recordArg?.hooks?.mouseInteraction).toBeUndefined(); // scroll should still be undefined because scrollHook was never initialized either expect(recordArg?.hooks?.scroll).toBeUndefined(); }); test('should warn if record throws during recordEvents', async () => { await sessionReplay.init(apiKey, mockOptions).promise; (mockRecordFunction as unknown as jest.Mock).mockImplementationOnce(() => { throw new Error('record failed'); }); const warnSpy = jest.spyOn(sessionReplay.loggerProvider, 'warn'); await sessionReplay.recordEvents(); expect(warnSpy).toHaveBeenCalledWith('Failed to initialize session replay:', expect.any(Error)); }); test('should pass empty array for ugcFilterRules when not provided', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, }, }; const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const mouseInteractionHook = recordArg?.hooks?.mouseInteraction; expect(mouseInteractionHook).toBeDefined(); expect(mouseInteractionHook).toBeInstanceOf(Function); }); test('should pass provided ugcFilterRules when configured', async () => { const mockUgcFilterRules = ['rule1', 'rule2']; mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: mockUgcFilterRules, }, }; const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const mouseInteractionHook = recordArg?.hooks?.mouseInteraction; expect(mouseInteractionHook).toBeDefined(); expect(mouseInteractionHook).toBeInstanceOf(Function); }); test('should pass empty array for ugcFilterRules when explicitly set to empty', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: [], }, }; const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const mouseInteractionHook = recordArg?.hooks?.mouseInteraction; expect(mouseInteractionHook).toBeDefined(); expect(mouseInteractionHook).toBeInstanceOf(Function); }); describe('emit callback - meta event URL filtering', () => { test('should apply UGC filter rules to meta event href when interaction config is enabled and ugcFilterRules exist', async () => { const mockUgcFilterRules = [{ selector: 'https://example.com/*', replacement: 'https://example.com/filtered' }]; mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: mockUgcFilterRules, }, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const metaEvent = { type: 4, data: { href: 'https://example.com/sensitive-page' }, timestamp: Date.now(), }; // Simulate emitting a meta event recordArg?.emit && recordArg?.emit(metaEvent); expect(getPageUrlSpy).toHaveBeenCalledWith('https://example.com/sensitive-page', mockUgcFilterRules); expect(metaEvent.data.href).toBe('https://example.com/filtered'); }); test('should not apply UGC filter rules to meta event when interaction config is disabled', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: false, ugcFilterRules: [{ selector: 'https://example.com/*', replacement: 'https://example.com/filtered' }], }, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl').mockReturnValue('https://example.com/sensitive-page'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const originalHref = 'https://example.com/sensitive-page'; const metaEvent = { type: 4, data: { href: originalHref }, timestamp: Date.now(), }; // Simulate emitting a meta event recordArg?.emit && recordArg?.emit(metaEvent); expect(getPageUrlSpy).toHaveBeenCalledWith(originalHref, []); expect(metaEvent.data.href).toBe(originalHref); }); test('should not apply UGC filter rules to meta event when ugcFilterRules is undefined', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: undefined, }, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl').mockReturnValue('https://example.com/sensitive-page'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const originalHref = 'https://example.com/sensitive-page'; const metaEvent = { type: 4, data: { href: originalHref }, timestamp: Date.now(), }; // Simulate emitting a meta event recordArg?.emit && recordArg?.emit(metaEvent); expect(getPageUrlSpy).toHaveBeenCalledWith(originalHref, []); expect(metaEvent.data.href).toBe(originalHref); }); test('should call getPageUrl with empty array when ugcFilterRules is empty array', async () => { const emptyUgcFilterRules: any[] = []; mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: emptyUgcFilterRules, }, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl').mockReturnValue('https://example.com/sensitive-page'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const originalHref = 'https://example.com/sensitive-page'; const metaEvent = { type: 4, data: { href: originalHref }, timestamp: Date.now(), }; // Simulate emitting a meta event recordArg?.emit && recordArg?.emit(metaEvent); // Empty array is truthy, so getPageUrl should be called expect(getPageUrlSpy).toHaveBeenCalledWith(originalHref, emptyUgcFilterRules); expect(metaEvent.data.href).toBe(originalHref); // Since we mocked the return value to be the same }); test('should not apply UGC filter rules to non-meta events', async () => { const mockUgcFilterRules = [{ selector: 'https://example.com/*', replacement: 'https://example.com/filtered' }]; mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: mockUgcFilterRules, }, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const originalHref = 'https://example.com/sensitive-page'; const nonMetaEvent = { type: 2, // Not a meta event (type 4) data: { href: originalHref }, timestamp: Date.now(), }; // Simulate emitting a non-meta event recordArg?.emit && recordArg?.emit(nonMetaEvent); expect(getPageUrlSpy).not.toHaveBeenCalled(); expect(nonMetaEvent.data.href).toBe(originalHref); }); test('should handle meta event without href data', async () => { const mockUgcFilterRules = [{ selector: 'https://example.com/*', replacement: 'https://example.com/filtered' }]; mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: mockUgcFilterRules, }, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const metaEvent = { type: 4, data: { width: 1728, height: 154 }, // No href property timestamp: Date.now(), }; // Simulate emitting a meta event without href expect(() => { recordArg?.emit && recordArg?.emit(metaEvent); }).not.toThrow(); expect(getPageUrlSpy).toHaveBeenCalledWith(undefined, mockUgcFilterRules); }); test('should not apply UGC filter rules when config is undefined', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: [{ selector: 'https://example.com/*', replacement: 'https://example.com/filtered' }], }, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl').mockReturnValue('https://example.com/sensitive-page'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); // Set config to undefined to test optional chaining sessionReplay.config = undefined; const recordArg = mockRecordFunction.mock.calls[0][0]; const originalHref = 'https://example.com/sensitive-page'; const metaEvent = { type: 4, data: { href: originalHref }, timestamp: Date.now(), }; // Simulate emitting a meta event when config is undefined expect(() => { recordArg?.emit && recordArg?.emit(metaEvent); }).not.toThrow(); // Note: ugcFilterRules was set during initialization, so it will use the configured rules expect(getPageUrlSpy).toHaveBeenCalledWith(originalHref, [ { selector: 'https://example.com/*', replacement: 'https://example.com/filtered' }, ]); expect(metaEvent.data.href).toBe(originalHref); }); test('should not apply UGC filter rules when interactionConfig is undefined', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: undefined, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl').mockReturnValue('https://example.com/sensitive-page'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const originalHref = 'https://example.com/sensitive-page'; const metaEvent = { type: 4, data: { href: originalHref }, timestamp: Date.now(), }; // Simulate emitting a meta event when interactionConfig is undefined expect(() => { recordArg?.emit && recordArg?.emit(metaEvent); }).not.toThrow(); expect(getPageUrlSpy).toHaveBeenCalledWith(originalHref, []); expect(metaEvent.data.href).toBe(originalHref); }); test('should not apply UGC filter rules when config exists but interactionConfig is null', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: [{ selector: 'https://example.com/*', replacement: 'https://example.com/filtered' }], }, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl').mockReturnValue('https://example.com/sensitive-page'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); // Manually set interactionConfig to null to test optional chaining if (sessionReplay.config) { (sessionReplay.config as any).interactionConfig = null; } const recordArg = mockRecordFunction.mock.calls[0][0]; const originalHref = 'https://example.com/sensitive-page'; const metaEvent = { type: 4, data: { href: originalHref }, timestamp: Date.now(), }; // Simulate emitting a meta event when interactionConfig is null expect(() => { recordArg?.emit && recordArg?.emit(metaEvent); }).not.toThrow(); // Note: ugcFilterRules was set during initialization, so it will use the configured rules expect(getPageUrlSpy).toHaveBeenCalledWith(originalHref, [ { selector: 'https://example.com/*', replacement: 'https://example.com/filtered' }, ]); expect(metaEvent.data.href).toBe(originalHref); }); test('should not apply UGC filter rules when ugcFilterRules is explicitly null', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: null, }, }; const sessionReplay = new SessionReplay(); const getPageUrlSpy = jest.spyOn(Helpers, 'getPageUrl').mockReturnValue('https://example.com/sensitive-page'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); const recordArg = mockRecordFunction.mock.calls[0][0]; const originalHref = 'https://example.com/sensitive-page'; const metaEvent = { type: 4, data: { href: originalHref }, timestamp: Date.now(), }; // Simulate emitting a meta event when ugcFilterRules is null expect(() => { recordArg?.emit && recordArg?.emit(metaEvent); }).not.toThrow(); expect(getPageUrlSpy).toHaveBeenCalledWith(originalHref, []); expect(metaEvent.data.href).toBe(originalHref); }); }); describe('recordEventsInFlight guard', () => { test('concurrent call sets pending and _recordEvents runs twice total', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Drain the background recordEvents() fired by `void initialize()` during init await jest.runAllTimersAsync(); // Make _recordEvents hang until we resolve this promise, simulating in-flight async work let resolveInFlight: () => void; const inFlightBarrier = new Promise((res) => { resolveInFlight = res; }); const recordFunctionForGuardTest = createMockRecordFunction(); jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any).mockImplementation(async () => { await inFlightBarrier; return recordFunctionForGuardTest; }); // Start first call (will be suspended at the barrier) const first = sessionReplay.recordEvents(); // Second call should see in-flight=true, set pending=true, and return immediately const second = sessionReplay.recordEvents(); expect((sessionReplay as any).recordEventsPendingShouldLogMetadata).toBe(true); // Let the first call complete — it will then replay _recordEvents for the pending call resolveInFlight!(); await Promise.all([first, second]); // _recordEvents ran once for the original call and once for the pending replay expect(recordFunctionForGuardTest).toHaveBeenCalledTimes(2); expect((sessionReplay as any).recordEventsInFlight).toBe(false); expect((sessionReplay as any).recordEventsPendingShouldLogMetadata).toBeNull(); }); test('guard resets to false after successful completion', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); await sessionReplay.recordEvents(); expect((sessionReplay as any).recordEventsInFlight).toBe(false); // A second sequential call should also complete normally const recordFunctionAfter = createMockRecordFunction(); jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any).mockResolvedValue(recordFunctionAfter); await sessionReplay.recordEvents(); expect(recordFunctionAfter).toHaveBeenCalledTimes(1); expect((sessionReplay as any).recordEventsInFlight).toBe(false); }); test('guard resets to false after _recordEvents throws', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); // Simulate a throw inside the try/catch in _recordEvents (recordFunction() call throws) (mockRecordFunction as unknown as jest.Mock).mockImplementationOnce(() => { throw new Error('record failed'); }); // Should not propagate — the throw is caught by the try/catch inside _recordEvents await sessionReplay.recordEvents(); expect((sessionReplay as any).recordEventsInFlight).toBe(false); // Subsequent call proceeds normally const recordFunctionAfterError = createMockRecordFunction(); jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any).mockResolvedValue(recordFunctionAfterError); await sessionReplay.recordEvents(); expect(recordFunctionAfterError).toHaveBeenCalledTimes(1); }); test('sequential calls both run _recordEvents fully', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); const rf1 = createMockRecordFunction(); const rf2 = createMockRecordFunction(); const getRecordFunctionSpy = jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any); getRecordFunctionSpy.mockResolvedValueOnce(rf1).mockResolvedValueOnce(rf2); await sessionReplay.recordEvents(); await sessionReplay.recordEvents(); expect(rf1).toHaveBeenCalledTimes(1); expect(rf2).toHaveBeenCalledTimes(1); expect((sessionReplay as any).recordEventsInFlight).toBe(false); }); test('_recordEvents default shouldLogMetadata param is true when called without argument', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); // Call the private method directly without passing shouldLogMetadata to exercise the default=true branch await (sessionReplay as any)._recordEvents(); expect(mockRecordFunction).toHaveBeenCalled(); }); test('_recordEvents returns early when identifiers is null', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); // Force identifiers to null so this.identifiers?.sessionId takes the nullish branch (sessionReplay as any).identifiers = null; mockRecordFunction.mockClear(); await (sessionReplay as any)._recordEvents(); expect(mockRecordFunction).not.toHaveBeenCalled(); }); test('_recordEvents passes undefined performanceOptions when performanceConfig is undefined', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true }, }; await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); // Force performanceConfig to undefined so config.performanceConfig?.interaction takes the nullish branch if (sessionReplay.config) { (sessionReplay.config as any).performanceConfig = undefined; } await (sessionReplay as any)._recordEvents(); expect(mockRecordFunction).toHaveBeenCalled(); const recordArg = mockRecordFunction.mock.calls[0][0]; expect(recordArg?.hooks?.mouseInteraction).toBeDefined(); }); test('pending call is replayed after in-flight completes, picking up updated state', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); // Suspend the first _recordEvents at getRecordFunction let resolveInFlight: () => void; const inFlightBarrier = new Promise((res) => { resolveInFlight = res; }); const rf1 = createMockRecordFunction(); const rf2 = createMockRecordFunction(); let callCount = 0; jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any).mockImplementation(async () => { callCount++; if (callCount === 1) { await inFlightBarrier; return rf1; } // Simulate state change: new sessionId visible on the second (pending replay) run sessionReplay.identifiers = { ...sessionReplay.identifiers!, sessionId: 999 }; return rf2; }); const first = sessionReplay.recordEvents(); // Fire concurrent call while first is suspended — sets pending flag const second = sessionReplay.recordEvents(); expect((sessionReplay as any).recordEventsPendingShouldLogMetadata).toBe(true); resolveInFlight!(); await Promise.all([first, second]); // rf1 called for the original run, rf2 for the pending replay with updated sessionId expect(rf1).toHaveBeenCalledTimes(1); expect(rf2).toHaveBeenCalledTimes(1); // State is fully reset expect((sessionReplay as any).recordEventsInFlight).toBe(false); expect((sessionReplay as any).recordEventsPendingShouldLogMetadata).toBeNull(); // The pending replay picked up the new sessionId expect(sessionReplay.identifiers?.sessionId).toBe(999); }); test('concurrent call during replay is also picked up — _recordEvents runs three times total', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); let resolveFirst: () => void; let notifyReplayStarted: () => void; let resolveReplay: () => void; const firstBarrier = new Promise((res) => { resolveFirst = res; }); // Signal from mock to test: replay _recordEvents has started const replayStarted = new Promise((res) => { notifyReplayStarted = res; }); // Signal from test to mock: let the replay _recordEvents finish const replayBarrier = new Promise((res) => { resolveReplay = res; }); const rf1 = createMockRecordFunction(); const rf2 = createMockRecordFunction(); const rf3 = createMockRecordFunction(); let callCount = 0; jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any).mockImplementation(async () => { callCount++; if (callCount === 1) { await firstBarrier; return rf1; } if (callCount === 2) { notifyReplayStarted(); await replayBarrier; return rf2; } return rf3; }); // First call — suspended at firstBarrier const first = sessionReplay.recordEvents(); // Second call while first is in-flight — sets pending void sessionReplay.recordEvents(); expect((sessionReplay as any).recordEventsPendingShouldLogMetadata).toBe(true); // Unblock first run; while loop clears pending and starts the replay resolveFirst!(); // Wait until the replay _recordEvents has actually started before firing the third call await replayStarted; // Third concurrent call arrives while replay is in-flight — sets pending again void sessionReplay.recordEvents(); expect((sessionReplay as any).recordEventsPendingShouldLogMetadata).toBe(true); // Unblock the replay; while loop fires one more _recordEvents (rf3) and exits resolveReplay!(); await first; await jest.runAllTimersAsync(); expect(rf1).toHaveBeenCalledTimes(1); expect(rf2).toHaveBeenCalledTimes(1); expect(rf3).toHaveBeenCalledTimes(1); expect((sessionReplay as any).recordEventsInFlight).toBe(false); expect((sessionReplay as any).recordEventsPendingShouldLogMetadata).toBeNull(); }); }); describe('pendingEmitEvents — eventCompressor not yet ready', () => { test('FullSnapshot emitted before eventCompressor is ready is buffered and flushed once compressor is assigned', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); // Simulate the race: null out eventCompressor as it would be before _init() line 283 const realCompressor = sessionReplay.eventCompressor!; sessionReplay.eventCompressor = undefined; // Run _recordEvents() — simulates a concurrent setSessionId() call during _init()'s async gap const concurrentRf = createMockRecordFunction(); jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any).mockResolvedValueOnce(concurrentRf); await (sessionReplay as any)._recordEvents(); // Grab the emit callback passed to the concurrent record function const concurrentEmit = concurrentRf.mock.calls[0]?.[0]?.emit; expect(concurrentEmit).toBeDefined(); // Fire a FullSnapshot event through the emit callback const fullSnapshotEvent = { type: 2, timestamp: Date.now(), data: { node: {}, initialOffset: {} } }; concurrentEmit(fullSnapshotEvent); // Event should be buffered — not yet forwarded to eventsManager expect((sessionReplay as any).pendingEmitEvents).toHaveLength(1); expect((sessionReplay as any).pendingEmitEvents[0].event).toBe(fullSnapshotEvent); // Now simulate _init() completing: restore eventCompressor and drain the buffer sessionReplay.eventCompressor = realCompressor; const enqueueSpy = jest.spyOn(realCompressor, 'enqueueEvent'); const pending = (sessionReplay as any).pendingEmitEvents.splice(0); for (const { event, sessionId } of pending) { sessionReplay.eventCompressor.enqueueEvent(event, sessionId); } // The buffered FullSnapshot was delivered to the compressor expect(enqueueSpy).toHaveBeenCalledTimes(1); expect(enqueueSpy).toHaveBeenCalledWith(fullSnapshotEvent, expect.anything()); }); test('after _init() assigns eventCompressor, subsequent emit calls go directly without buffering', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); // With a real eventCompressor set, emit should not populate pendingEmitEvents expect(sessionReplay.eventCompressor).toBeDefined(); const enqueueSpy = jest.spyOn(sessionReplay.eventCompressor!, 'enqueueEvent'); await (sessionReplay as any)._recordEvents(); const recordArg = mockRecordFunction.mock.calls[mockRecordFunction.mock.calls.length - 1]?.[0]; const emitFn = recordArg?.emit; expect(emitFn).toBeDefined(); const event = { type: 2, timestamp: Date.now(), data: { node: {}, initialOffset: {} } }; emitFn(event); expect((sessionReplay as any).pendingEmitEvents).toHaveLength(0); expect(enqueueSpy).toHaveBeenCalledWith(event, expect.anything()); }); test('pre-buffered events are drained into eventCompressor when _init() assigns it', async () => { // Pre-populate the buffer to simulate events that arrived during _init()'s async gap const bufferedEvent1 = { type: 2, timestamp: 1, data: { node: {}, initialOffset: {} } }; const bufferedEvent2 = { type: 3, timestamp: 2, data: {} }; (sessionReplay as any).pendingEmitEvents.push({ event: bufferedEvent1, sessionId: 'session-a' }); (sessionReplay as any).pendingEmitEvents.push({ event: bufferedEvent2, sessionId: 'session-b' }); await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); // _init() should have drained the buffer into the freshly-assigned eventCompressor expect((sessionReplay as any).pendingEmitEvents).toHaveLength(0); expect(sessionReplay.eventCompressor).toBeDefined(); }); }); }); describe('getDeviceId', () => { test('should return undefined if no config set', () => { expect(sessionReplay.getDeviceId()).toEqual(undefined); }); test('should return config device id if set', async () => { await sessionReplay.init(apiKey, { ...mockOptions, instanceName: 'my_instance' }).promise; expect(sessionReplay.getDeviceId()).toEqual(mockOptions.deviceId); }); test('should be consistent with session replay id', async () => { await sessionReplay.init(apiKey, { ...mockOptions, instanceName: 'my_instance' }).promise; const deviceIdFromSRId = sessionReplay.identifiers?.sessionReplayId?.split('/')[0]; expect(sessionReplay.getDeviceId()).toEqual(deviceIdFromSRId); }); }); describe('flush', () => { test('should do nothing on flush if init not called', async () => { await sessionReplay.flush(true); expect(sessionReplay.eventsManager).toBeUndefined(); }); test('should call track destination flush with useRetry as true', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const flushMock = jest.spyOn(sessionReplay.eventsManager, 'flush'); await sessionReplay.flush(true); expect(flushMock).toHaveBeenCalled(); expect(flushMock).toHaveBeenCalledWith(true); }); test('should call track destination flush without useRetry', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } const flushMock = jest.spyOn(sessionReplay.eventsManager, 'flush'); await sessionReplay.flush(); expect(flushMock).toHaveBeenCalled(); expect(flushMock).toHaveBeenCalledWith(false); }); }); describe('shutdown', () => { test('should remove event listeners', async () => { await sessionReplay.init(apiKey, mockOptions).promise; removeEventListenerMock.mockReset(); sessionReplay.shutdown(); expect(removeEventListenerMock).toHaveBeenCalledTimes(3); // blur, focus, beforeunload - popstate handled by plugin cleanup expect(removeEventListenerMock.mock.calls[0][0]).toEqual('blur'); expect(removeEventListenerMock.mock.calls[1][0]).toEqual('focus'); expect(removeEventListenerMock.mock.calls[2][0]).toEqual('beforeunload'); }); test('should remove event listeners with pagehide', async () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ ...mockGlobalScope, self: { onpagehide: (() => { /* do nothing */ }) as any, }, } as typeof globalThis); await sessionReplay.init(apiKey, mockOptions).promise; removeEventListenerMock.mockReset(); sessionReplay.shutdown(); expect(removeEventListenerMock).toHaveBeenCalledTimes(3); // blur, focus, pagehide - popstate handled by plugin cleanup expect(removeEventListenerMock.mock.calls[0][0]).toEqual('blur'); expect(removeEventListenerMock.mock.calls[1][0]).toEqual('focus'); expect(removeEventListenerMock.mock.calls[2][0]).toEqual('pagehide'); }); test('should stop recording and send any events in queue', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const createEventsIDBStoreInstance = await SessionReplayIDB.SessionReplayEventsIDBStore.new('replay', { loggerProvider: mockLoggerProvider, apiKey, }); const stopRecordingMock = jest.fn(); sessionReplay.recordCancelCallback = stopRecordingMock; if (!sessionReplay.eventsManager) { throw new Error('Did not call init'); } await createEventsIDBStoreInstance?.addEventToCurrentSequence(123, mockEventString); const sendEventsMock = jest.spyOn(sessionReplay.eventsManager, 'sendCurrentSequenceEvents'); sessionReplay.shutdown(); expect(stopRecordingMock).toHaveBeenCalled(); expect(sessionReplay.recordCancelCallback).toBe(null); expect(sendEventsMock).toHaveBeenCalled(); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access expect(sendEventsMock.mock.calls[0][0]).toEqual({ sessionId: 123, deviceId: '1a2b3c', }); }); }); describe('getCurrentUrl', () => { test('returns url if exists', () => { globalSpy.mockImplementation(() => ({ location: { href: 'https://www.amplitude.com', }, })); const url = Helpers.getCurrentUrl(); expect(url).toEqual('https://www.amplitude.com'); }); test('returns empty string if url does not exist', () => { globalSpy.mockImplementation(() => undefined); const url = Helpers.getCurrentUrl(); expect(url).toEqual(''); }); }); describe('getMaskTextSelectors', () => { test('null config', () => { sessionReplay.config = undefined; expect(sessionReplay.getMaskTextSelectors()).not.toBeDefined(); }); test('null privacy config', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.privacyConfig = undefined; } expect(sessionReplay.getMaskTextSelectors()).not.toBeDefined(); }); test('returns mask text selectors', async () => { await sessionReplay.init(apiKey, mockOptions).promise; expect(sessionReplay.getMaskTextSelectors()).toEqual(['.className1', '.className2']); }); test('should track all text elements when level is conservative', async () => { await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'conservative', }, }).promise; expect(sessionReplay.getMaskTextSelectors()).toEqual('*'); }); test('should return * when any urlMaskLevels rule is conservative, even if default is not', async () => { await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'light', urlMaskLevels: [ { match: 'https://example.com/admin/*', maskLevel: 'conservative' }, { match: 'https://example.com/public/*', maskLevel: 'light' }, ], }, }).promise; // Any conservative URL rule → '*' so rrweb routes all text nodes through maskTextFn expect(sessionReplay.getMaskTextSelectors()).toEqual('*'); }); test('should not return * when urlMaskLevels has no conservative rule', async () => { await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'light', urlMaskLevels: [{ match: 'https://example.com/checkout/*', maskLevel: 'medium' }], }, }).promise; // No conservative rule → falls through to maskSelector logic (no selectors configured) expect(sessionReplay.getMaskTextSelectors()).toBeUndefined(); }); test('should return * when defaultMaskLevel is conservative and urlMaskLevels are present', async () => { // Bug scenario: session starts on a URL matching a non-conservative rule (effective level ≠ // conservative), so the first branch doesn't fire. No rule in urlMaskLevels is conservative, // so the second branch doesn't fire either. But defaultMaskLevel is conservative, meaning any // page that matches NO rule at all falls back to conservative masking — rrweb must be told to // route all text through maskTextFn from the start. await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'conservative', urlMaskLevels: [{ match: 'https://example.com/public/*', maskLevel: 'light' }], }, }).promise; expect(sessionReplay.getMaskTextSelectors()).toEqual('*'); }); test('should return * when defaultMaskLevel is conservative and urlMaskLevels is non-empty even if current URL matches a non-conservative rule', async () => { // Even if the recording-start URL happens to match a light rule (effectiveLevel = light), // the fallback path (no rule match → conservative) still needs rrweb to call maskTextFn. jest.spyOn(Helpers, 'getCurrentUrl').mockReturnValue('https://example.com/public/page'); await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'conservative', urlMaskLevels: [{ match: 'https://example.com/public/*', maskLevel: 'light' }], }, }).promise; expect(sessionReplay.getMaskTextSelectors()).toEqual('*'); }); test('should not return * when defaultMaskLevel is conservative but urlMaskLevels is empty', async () => { // defaultMaskLevel: conservative with no URL rules → effectiveLevel is always conservative, // which is handled by the first branch. The third branch only fires when urlMaskLevels is non-empty. await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'conservative', urlMaskLevels: [], }, }).promise; // effectiveLevel = conservative → caught by the first branch, still returns '*' expect(sessionReplay.getMaskTextSelectors()).toEqual('*'); }); test('should return * when defaultMaskLevel is conservative and urlMaskLevels is undefined', async () => { // urlMaskLevels not set at all (undefined) — exercises the ?. optional chain short-circuit path // in the third guard of getMaskTextSelectors. With no urlMaskLevels, effectiveLevel is always // conservative, so the first guard fires instead — result is still '*'. await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'conservative', // urlMaskLevels intentionally absent }, }).promise; expect(sessionReplay.getMaskTextSelectors()).toEqual('*'); }); }); describe('mask function URL getters (currentPageUrl integration)', () => { test('maskInputFn, maskTextFn, and maskAttributeFn closures expose currentPageUrl dynamically', async () => { // This test exercises the three `() => this.currentPageUrl` arrow functions passed to // maskFn/maskAttributeFn at lines 805-807 of session-replay.ts. await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'light', maskAttributes: ['placeholder'], urlMaskLevels: [{ match: 'https://example.com/admin/*', maskLevel: 'conservative' }], }, }).promise; await sessionReplay.recordEvents(); expect(mockRecordFunction).toHaveBeenCalled(); const recordArg = mockRecordFunction.mock.calls[mockRecordFunction.mock.calls.length - 1][0]; const { maskInputFn, maskTextFn, maskAttributeFn: attrFn } = recordArg; expect(maskInputFn).toBeDefined(); expect(maskTextFn).toBeDefined(); expect(attrFn).toBeDefined(); const divElement = document.createElement('div'); const inputElement = document.createElement('input'); inputElement.type = 'text'; // currentPageUrl starts as '' (jsdom has no real location) → light level → not conservative // maskTextFn: light does NOT mask text nodes expect(maskTextFn('hello', divElement)).toEqual('hello'); // maskInputFn: light does not mask plain text inputs (non-sensitive input type) expect(maskInputFn('hello', inputElement)).toEqual('hello'); // maskAttributeFn: attribute in allowlist, light level → not masked (light leaves text visible) expect(attrFn('placeholder', 'Enter name', inputElement)).toEqual('Enter name'); // Now simulate navigation to a conservative URL (sessionReplay as any).currentPageUrl = 'https://example.com/admin/dashboard'; // maskTextFn: conservative URL → text IS masked expect(maskTextFn('hello', divElement)).toEqual('*****'); // maskInputFn: conservative URL → input IS masked expect(maskInputFn('hello', inputElement)).toEqual('*****'); // maskAttributeFn: conservative URL + attribute in allowlist → masked expect(attrFn('placeholder', 'Enter name', inputElement)).toEqual('***** ****'); }); }); describe('getBlockSelectors', () => { test('null config', () => { sessionReplay.config = undefined; expect(sessionReplay.getBlockSelectors()).not.toBeDefined(); }); test('null privacy config', async () => { await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.privacyConfig = undefined; } expect(sessionReplay.getBlockSelectors()).not.toBeDefined(); }); test('returns block selectors', async () => { await sessionReplay.init(apiKey, mockOptions).promise; expect(sessionReplay.getBlockSelectors()).toStrictEqual(['.className']); }); }); describe('addCustomRRWebEvent', () => { test('should add custom event if null config', async () => { sessionReplay.config = undefined; sessionReplay.recordCancelCallback = () => { return; }; // Set the recordFunction directly since addCustomRRWebEvent checks this.recordFunction (sessionReplay as any).recordFunction = mockRecordFunction; await sessionReplay.addCustomRRWebEvent(CustomRRwebEvent.GET_SR_PROPS, { myKey: 'data' }); expect(mockRecordFunction.addCustomEvent).toHaveBeenCalledWith(CustomRRwebEvent.GET_SR_PROPS, { myKey: 'data' }); }); test('should add custom event with config and storage data', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.recordCancelCallback = () => { return; }; mockRecordFunction.addCustomEvent = jest.fn(); (sessionReplay as any).recordFunction = mockRecordFunction; await sessionReplay.addCustomRRWebEvent(CustomRRwebEvent.GET_SR_PROPS, { myKey: 'data' }); expect(mockRecordFunction.addCustomEvent).toHaveBeenCalledWith( CustomRRwebEvent.GET_SR_PROPS, expect.objectContaining({ myKey: 'data', config: expect.objectContaining({ apiKey: '****_key', }), version: expect.stringMatching(/\d+.\d+.\d+/), percentOfQuota: 0.01, totalStorageSize: 1, usageDetails: JSON.stringify({ indexedDB: 10, }), }), ); }); test('should not add custom event if not recording', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.recordCancelCallback = undefined; mockRecordFunction.addCustomEvent = jest.fn(); await sessionReplay.addCustomRRWebEvent(CustomRRwebEvent.GET_SR_PROPS, { myKey: 'data' }); expect(mockRecordFunction.addCustomEvent).not.toHaveBeenCalled(); }); test('should add storage info if addStorageInfo is true', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.recordCancelCallback = () => { return; }; mockRecordFunction.addCustomEvent = jest.fn(); (sessionReplay as any).recordFunction = mockRecordFunction; await sessionReplay.addCustomRRWebEvent(CustomRRwebEvent.GET_SR_PROPS, { myKey: 'data' }, true); expect(mockRecordFunction.addCustomEvent).toHaveBeenCalledWith( CustomRRwebEvent.GET_SR_PROPS, expect.objectContaining({ percentOfQuota: 0.01, totalStorageSize: 1, usageDetails: JSON.stringify({ indexedDB: 10, }), }), ); }); test('should not add storage info if addStorageInfo is false', async () => { await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.recordCancelCallback = () => { return; }; mockRecordFunction.addCustomEvent = jest.fn(); (sessionReplay as any).recordFunction = mockRecordFunction; await sessionReplay.addCustomRRWebEvent(CustomRRwebEvent.GET_SR_PROPS, { myKey: 'data' }, false); expect(mockRecordFunction.addCustomEvent).toHaveBeenCalledWith( CustomRRwebEvent.GET_SR_PROPS, expect.not.objectContaining({ percentOfQuota: 0.01, totalStorageSize: 1, usageDetails: JSON.stringify({ indexedDB: 10, }), }), ); }); test('should handle an error', async () => { await sessionReplay.init(apiKey, mockOptions).promise; jest.spyOn(Helpers, 'getStorageSize').mockImplementation(() => { throw new Error(); }); mockRecordFunction.addCustomEvent = jest.fn(); await sessionReplay.addCustomRRWebEvent(CustomRRwebEvent.GET_SR_PROPS, { myKey: 'data' }); expect(mockRecordFunction.addCustomEvent).not.toHaveBeenCalled(); expect(mockLoggerProvider.debug).toHaveBeenCalled(); }); test('should send targeting decision event when getShouldRecord is called', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Mock targeting parameters and store them const targetingParams = { userProperties: { userType: 'premium' }, event: { event_type: 'page_view', user_id: '123' }, }; (sessionReplay as any).lastTargetingParams = targetingParams; // Set up targeting config and match sessionReplay.config!.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; sessionReplay.sessionTargetingMatch = true; // Reset the decision to ensure we start fresh (sessionReplay as any).lastShouldRecordDecision = undefined; // Spy on addCustomRRWebEvent const addCustomRRWebEventSpy = jest.spyOn(sessionReplay, 'addCustomRRWebEvent'); // Call getShouldRecord first time - should fire event sessionReplay.getShouldRecord(); // Verify the targeting decision event was sent expect(addCustomRRWebEventSpy).toHaveBeenCalledWith( CustomRRwebEvent.TARGETING_DECISION, expect.objectContaining({ message: expect.stringContaining('Capturing replays for session'), sessionId: 123, matched: true, targetingParams: targetingParams, }), ); // Clear the spy and call again - should NOT fire event since decision hasn't changed addCustomRRWebEventSpy.mockClear(); sessionReplay.getShouldRecord(); // Should not have been called again expect(addCustomRRWebEventSpy).not.toHaveBeenCalledWith(CustomRRwebEvent.TARGETING_DECISION, expect.anything()); // Change the targeting match and call again - should fire event sessionReplay.sessionTargetingMatch = false; sessionReplay.getShouldRecord(); // Should have been called with the new decision expect(addCustomRRWebEventSpy).toHaveBeenCalledWith( CustomRRwebEvent.TARGETING_DECISION, expect.objectContaining({ message: expect.stringContaining('Not capturing replays for session'), sessionId: 123, matched: false, targetingParams: targetingParams, }), ); }); test('should reset targeting decision when session ID changes', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Set up targeting config sessionReplay.config!.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; sessionReplay.sessionTargetingMatch = true; // Ensure we start fresh (sessionReplay as any).lastShouldRecordDecision = undefined; // Spy on addCustomRRWebEvent const addCustomRRWebEventSpy = jest.spyOn(sessionReplay, 'addCustomRRWebEvent'); // Call getShouldRecord to establish initial decision sessionReplay.getShouldRecord(); expect(addCustomRRWebEventSpy).toHaveBeenCalledWith(CustomRRwebEvent.TARGETING_DECISION, expect.anything()); // Clear the spy addCustomRRWebEventSpy.mockClear(); // Change session ID - this should reset the targeting decision await sessionReplay.setSessionId(456).promise; // Set the targeting config to undefined sessionReplay.config!.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; // Call getShouldRecord again - should fire event for new session sessionReplay.getShouldRecord(); expect(addCustomRRWebEventSpy).toHaveBeenCalledWith( CustomRRwebEvent.TARGETING_DECISION, expect.objectContaining({ sessionId: 456, }), ); }); }); describe('getRecordingPlugins', () => { test('disabled console logging', async () => { const loggingConfig: LoggingConfig = { console: { enabled: false, levels: [], }, }; const plugins = await sessionReplay.getRecordingPlugins(loggingConfig); expect(plugins).toBeDefined(); expect(plugins?.length).toBe(1); // URL tracking plugin is always present expect(plugins?.[0].name).toBe('amplitude/url-tracking@1'); }); test('enabled console logging', async () => { const loggingConfig: LoggingConfig = { console: { enabled: true, levels: ['warn', 'error'], }, }; const plugins = await sessionReplay.getRecordingPlugins(loggingConfig); expect(plugins).toBeDefined(); expect(plugins?.length).toBe(2); // URL tracking plugin + console plugin expect(plugins?.find((p) => p.name === 'amplitude/url-tracking@1')).toBeDefined(); expect(plugins?.find((p) => p.name === 'rrweb/console@1')).toBeDefined(); }); test('should warn if loading console plugin fails', async () => { const loggingConfig: LoggingConfig = { console: { enabled: true, levels: ['warn', 'error'], }, }; // Mock the dynamic import to throw for this test only jest.resetModules(); jest.doMock('@amplitude/rrweb-plugin-console-record', () => { throw new Error('Import failed'); }); const warnSpy = jest.spyOn(sessionReplay.loggerProvider, 'warn'); await sessionReplay.getRecordingPlugins(loggingConfig); expect(warnSpy).toHaveBeenCalledWith('Failed to load console plugin:', expect.any(Error)); jest.dontMock('@amplitude/rrweb-plugin-console-record'); }); test('should return undefined when no plugins are available', async () => { // Mock createUrlTrackingPlugin to throw an error mockCreateUrlTrackingPlugin.mockImplementationOnce(() => { throw new Error('URL tracking plugin creation failed'); }); const warnSpy = jest.spyOn(sessionReplay.loggerProvider, 'warn'); const plugins = await sessionReplay.getRecordingPlugins(undefined); expect(plugins).toBeUndefined(); expect(warnSpy).toHaveBeenCalledWith('Failed to create URL tracking plugin:', expect.any(Error)); }); }); describe('should call addCustomRRWebEvent with network request events', () => { test('should call addCustomRRWebEvent with network request events', async () => { // Mock the observers module before initialization const mockStart = jest.fn(); const mockNetworkObserversClass = jest.fn().mockImplementation(() => ({ start: mockStart, stop: jest.fn(), })); jest.doMock('../src/observers', () => ({ NetworkObservers: mockNetworkObserversClass, NetworkRequestEvent: {} as any, })); mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_logging_config: { network: { enabled: true, }, }, }; await sessionReplay.init(apiKey, mockOptions).promise; const addCustomRRWebEventSpy = jest.spyOn(sessionReplay, 'addCustomRRWebEvent'); const mockNetworkEvent = { type: 'fetch' as const, url: 'https://example.com', timestamp: Date.now(), method: 'GET', status: 200, requestHeaders: {}, responseHeaders: {}, requestBody: '', responseBody: '', }; await sessionReplay.recordEvents(); expect(mockStart).toHaveBeenCalled(); const startCallback = mockStart.mock.calls[0][0] as (event: NetworkRequestEvent) => void; startCallback(mockNetworkEvent); expect(addCustomRRWebEventSpy).toHaveBeenCalledWith(CustomRRwebEvent.FETCH_REQUEST, mockNetworkEvent); // Requests to the SR track URL should be filtered out addCustomRRWebEventSpy.mockClear(); const trackUrlEvent = { ...mockNetworkEvent, url: 'https://api-sr.amplitude.com/sessions/v2/track?foo=bar' }; startCallback(trackUrlEvent); expect(addCustomRRWebEventSpy).not.toHaveBeenCalled(); jest.dontMock('../src/observers'); }); }); describe('setMetadata', () => { test('should set replaySDKVersion from options.version?.version in metadata', async () => { const customVersion = '1.8.7'; await sessionReplay.init(apiKey, { ...mockOptions, version: { version: customVersion, type: 'plugin' }, }).promise; // Access private property for test only const metadata = (sessionReplay as any).metadata; expect(metadata?.replaySDKVersion).toBe(customVersion); }); test('should set replaySDKType to @amplitude/segment-session-replay-plugin if type is segment', async () => { await sessionReplay.init(apiKey, { ...mockOptions, version: { version: '1.8.7', type: 'segment' }, }).promise; const metadata = (sessionReplay as any).metadata; expect(metadata?.replaySDKType).toBe('@amplitude/segment-session-replay-plugin'); }); }); describe('URL Tracking', () => { describe('Plugin Integration', () => { test('should include URL tracking plugin in recording plugins', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const plugins = await sessionReplay.getRecordingPlugins(undefined); expect(plugins).toBeDefined(); expect(plugins?.length).toBeGreaterThan(0); // Find the URL tracking plugin const urlTrackingPlugin = plugins?.find((plugin) => plugin.name === 'amplitude/url-tracking@1'); expect(urlTrackingPlugin).toBeDefined(); expect(urlTrackingPlugin?.observer).toBeDefined(); }); test('should create URL tracking plugin with UGC filter rules from interaction config', async () => { const mockUgcFilterRules = [ { selector: 'test', replacement: 'filtered' }, { selector: '/test/', replacement: 'filtered' }, ]; mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: mockUgcFilterRules, }, }; await sessionReplay.init(apiKey, mockOptions).promise; const plugins = await sessionReplay.getRecordingPlugins(undefined); const urlTrackingPlugin = plugins?.find((plugin) => plugin.name === 'amplitude/url-tracking@1'); expect(urlTrackingPlugin).toBeDefined(); expect((urlTrackingPlugin?.options as any).ugcFilterRules).toEqual(mockUgcFilterRules); }); test('should create URL tracking plugin with polling enabled', async () => { await sessionReplay.init(apiKey, { ...mockOptions, enableUrlChangePolling: true, }).promise; const plugins = await sessionReplay.getRecordingPlugins(undefined); const urlTrackingPlugin = plugins?.find((plugin) => plugin.name === 'amplitude/url-tracking@1'); expect(urlTrackingPlugin).toBeDefined(); // The config options should be passed to the plugin expect((urlTrackingPlugin?.options as any).enablePolling).toBe(true); }); test('should create URL tracking plugin with custom polling interval', async () => { const customInterval = 2000; await sessionReplay.init(apiKey, { ...mockOptions, enableUrlChangePolling: true, urlChangePollingInterval: customInterval, }).promise; const plugins = await sessionReplay.getRecordingPlugins(undefined); const urlTrackingPlugin = plugins?.find((plugin) => plugin.name === 'amplitude/url-tracking@1'); expect(urlTrackingPlugin).toBeDefined(); expect((urlTrackingPlugin?.options as any).pollingInterval).toBe(customInterval); }); test('should create URL tracking plugin with captureDocumentTitle enabled', async () => { await sessionReplay.init(apiKey, { ...mockOptions, captureDocumentTitle: true, }).promise; const plugins = await sessionReplay.getRecordingPlugins(undefined); const urlTrackingPlugin = plugins?.find((plugin) => plugin.name === 'amplitude/url-tracking@1'); expect(urlTrackingPlugin).toBeDefined(); expect((urlTrackingPlugin?.options as any).captureDocumentTitle).toBe(true); }); }); test('should handle empty UGC filter rules', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_interaction_config: { enabled: true, ugcFilterRules: [], }, }; await sessionReplay.init(apiKey, mockOptions).promise; const plugins = await sessionReplay.getRecordingPlugins(undefined); const urlTrackingPlugin = plugins?.find((plugin) => plugin.name === 'amplitude/url-tracking@1'); expect((urlTrackingPlugin?.options as any).ugcFilterRules).toEqual([]); }); test('should handle missing interaction config', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, }; await sessionReplay.init(apiKey, mockOptions).promise; const plugins = await sessionReplay.getRecordingPlugins(undefined); const urlTrackingPlugin = plugins?.find((plugin) => plugin.name === 'amplitude/url-tracking@1'); expect((urlTrackingPlugin?.options as any).ugcFilterRules).toEqual([]); }); }); describe('getRecordFunction', () => { let getRecordFunctionSpy: jest.SpyInstance; beforeEach(() => { // Restore the original implementation for these tests getRecordFunctionSpy = jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any); getRecordFunctionSpy.mockRestore(); }); afterEach(() => { // Clean up any mocks we created jest.dontMock('@amplitude/rrweb-record'); }); test('should return cached recordFunction if it already exists', async () => { await sessionReplay.init(apiKey, mockOptions).promise; const mockCachedFunction = jest.fn(); (sessionReplay as any).recordFunction = mockCachedFunction; const result = await (sessionReplay as any).getRecordFunction(); expect(result).toBe(mockCachedFunction); }); test('should dynamically import and cache record function on first call', async () => { await sessionReplay.init(apiKey, mockOptions).promise; (sessionReplay as any).recordFunction = null; const mockRecord = jest.fn(); jest.doMock( '@amplitude/rrweb-record', () => ({ record: mockRecord, }), { virtual: true }, ); const result = await (sessionReplay as any).getRecordFunction(); expect(result).toBe(mockRecord); expect((sessionReplay as any).recordFunction).toBe(mockRecord); }); test('should log warning and return null when import fails', async () => { await sessionReplay.init(apiKey, mockOptions).promise; (sessionReplay as any).recordFunction = null; jest.resetModules(); jest.doMock('@amplitude/rrweb-record', () => { throw new Error('Import failed'); }); const warnSpy = jest.spyOn(sessionReplay.loggerProvider, 'warn'); const result = await (sessionReplay as any).getRecordFunction(); expect(result).toBeNull(); expect(warnSpy).toHaveBeenCalledWith('Failed to load rrweb-record module:', expect.any(Error)); }); test('should return cached function on subsequent calls after successful import', async () => { await sessionReplay.init(apiKey, mockOptions).promise; (sessionReplay as any).recordFunction = null; const mockRecord = jest.fn(); jest.doMock( '@amplitude/rrweb-record', () => ({ record: mockRecord, }), { virtual: true }, ); const firstResult = await (sessionReplay as any).getRecordFunction(); expect(firstResult).toBe(mockRecord); const secondResult = await (sessionReplay as any).getRecordFunction(); expect(secondResult).toBe(mockRecord); expect(secondResult).toBe(firstResult); }); test('should return early if recordFunction is null', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); // Mock getRecordFunction to return null (simulating import failure) const getRecordFunctionSpy = jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any); getRecordFunctionSpy.mockResolvedValue(null); // Spy on the record function to ensure it's not called mockRecordFunction.mockClear(); await sessionReplay.recordEvents(); expect(mockRecordFunction).not.toHaveBeenCalled(); expect(getRecordFunctionSpy).toHaveBeenCalled(); getRecordFunctionSpy.mockRestore(); }); test('should return early if recordFunction is undefined', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await jest.runAllTimersAsync(); const getRecordFunctionSpy = jest.spyOn(SessionReplay.prototype, 'getRecordFunction' as any); getRecordFunctionSpy.mockResolvedValue(undefined); mockRecordFunction.mockClear(); await sessionReplay.recordEvents(); expect(mockRecordFunction).not.toHaveBeenCalled(); expect(getRecordFunctionSpy).toHaveBeenCalled(); getRecordFunctionSpy.mockRestore(); }); }); describe('evaluateTargetingAndCapture', () => { test('should return early if no identifiers', async () => { const sessionReplay = new SessionReplay(); sessionReplay.identifiers = undefined; sessionReplay.loggerProvider = mockLoggerProvider; await sessionReplay.evaluateTargetingAndCapture({}); expect(mockLoggerProvider.warn).toHaveBeenCalledWith( 'Session replay init has not been called, cannot evaluate targeting.', ); }); test('should return early if no sessionId', async () => { const sessionReplay = new SessionReplay(); sessionReplay.identifiers = { sessionId: undefined, deviceId: '123', sessionReplayId: '123/undefined' }; sessionReplay.loggerProvider = mockLoggerProvider; await sessionReplay.evaluateTargetingAndCapture({}); expect(mockLoggerProvider.log).toHaveBeenCalledWith( 'Session ID has not been set yet, cannot evaluate targeting for Session Replay.', ); }); test('should return early if no config', async () => { const sessionReplay = new SessionReplay(); sessionReplay.identifiers = { sessionId: 123, deviceId: '123', sessionReplayId: '123/123' }; sessionReplay.config = undefined; sessionReplay.loggerProvider = mockLoggerProvider; await sessionReplay.evaluateTargetingAndCapture({}); expect(mockLoggerProvider.warn).toHaveBeenCalledWith( 'Session replay init has not been called, cannot evaluate targeting.', ); }); test('should call initialize when isInit is true', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; const initializeSpy = jest.spyOn(sessionReplay, 'initialize'); await sessionReplay.evaluateTargetingAndCapture({}, true); expect(initializeSpy).toHaveBeenCalledWith(true); }); test('should call recordEvents when isInit is false', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await sessionReplay.evaluateTargetingAndCapture({}, false); // recordEvents should not be called because we're already recording from init expect(recordEventsSpy).not.toHaveBeenCalled(); }); test('should skip targeting evaluation when no targetingConfig', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await sessionReplay.evaluateTargetingAndCapture({}); expect(recordEventsSpy).not.toHaveBeenCalled(); }); test('should skip targeting evaluation when sessionTargetingMatch is already true', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; // Set targeting config directly on the config object if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } sessionReplay.sessionTargetingMatch = true; const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await sessionReplay.evaluateTargetingAndCapture({}); expect(recordEventsSpy).toHaveBeenCalled(); }); test('should execute targeting evaluation branch when targetingConfig exists and sessionTargetingMatch is false', async () => { const sessionReplay = new SessionReplay(); // Set up namespace config to include targeting config mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; await sessionReplay.init(apiKey, mockOptions).promise; // Ensure sessionTargetingMatch is false to trigger the evaluation sessionReplay.sessionTargetingMatch = false; const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); const userProperties = { age: 30, city: 'San Francisco' }; await sessionReplay.evaluateTargetingAndCapture({ userProperties }); // Verify the targeting evaluation branch was executed by checking that sessionTargetingMatch was updated expect(typeof sessionReplay.sessionTargetingMatch).toBe('boolean'); // recordEvents should not be called because we're already recording from init expect(recordEventsSpy).not.toHaveBeenCalled(); }); test('should handle special event types in targeting evaluation', async () => { const sessionReplay = new SessionReplay(); // Set up namespace config to include targeting config mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; await sessionReplay.init(apiKey, mockOptions).promise; // Ensure sessionTargetingMatch is false to trigger the evaluation sessionReplay.sessionTargetingMatch = false; const specialEvent = { event_type: SpecialEventType.IDENTIFY, event_properties: {}, }; await sessionReplay.evaluateTargetingAndCapture({ event: specialEvent }); // Verify the function executed without throwing errors expect(typeof sessionReplay.sessionTargetingMatch).toBe('boolean'); }); test('should pass targetingParams.page to evaluateTargetingAndStore', async () => { const page = { url: 'https://replay-page-test.example.com/path' }; const evaluateTargetingAndStoreSpy = jest .spyOn(targetingManager, 'evaluateTargetingAndStore') .mockResolvedValue(true); const sessionReplay = new SessionReplay(); mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.sessionTargetingMatch = false; await sessionReplay.evaluateTargetingAndCapture({ page }); expect(evaluateTargetingAndStoreSpy).toHaveBeenCalledWith( expect.objectContaining({ targetingParams: expect.objectContaining({ page, }), }), ); }); test('should pass page undefined when targetingParams.page is not provided', async () => { const mockGlobalScope = { location: { href: 'https://global-url.example.com/ignored' }, addEventListener: jest.fn(), removeEventListener: jest.fn(), }; jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue(mockGlobalScope as any); const evaluateTargetingAndStoreSpy = jest .spyOn(targetingManager, 'evaluateTargetingAndStore') .mockResolvedValue(true); const sessionReplay = new SessionReplay(); mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.sessionTargetingMatch = false; await sessionReplay.evaluateTargetingAndCapture({}); // When targetingParams.page is not provided, we derive page from location.href expect(evaluateTargetingAndStoreSpy).toHaveBeenCalledWith( expect.objectContaining({ targetingParams: expect.objectContaining({ page: { url: 'https://global-url.example.com/ignored' }, }), }), ); }); test('should pass page undefined when targetingParams.page not provided and location.href is empty', async () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ location: { href: '' }, addEventListener: jest.fn(), removeEventListener: jest.fn(), } as any); const evaluateTargetingAndStoreSpy = jest .spyOn(targetingManager, 'evaluateTargetingAndStore') .mockResolvedValue(true); const sessionReplay = new SessionReplay(); mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.sessionTargetingMatch = false; await sessionReplay.evaluateTargetingAndCapture({}); expect(evaluateTargetingAndStoreSpy).toHaveBeenCalledWith( expect.objectContaining({ targetingParams: expect.objectContaining({ page: undefined, }), }), ); }); test('should pass page undefined when targetingParams.page not provided and getGlobalScope returns undefined', async () => { const evaluateTargetingAndStoreSpy = jest .spyOn(targetingManager, 'evaluateTargetingAndStore') .mockResolvedValue(true); const sessionReplay = new SessionReplay(); mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.sessionTargetingMatch = false; jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue(undefined as any); await sessionReplay.evaluateTargetingAndCapture({}); expect(evaluateTargetingAndStoreSpy).toHaveBeenCalledWith( expect.objectContaining({ targetingParams: expect.objectContaining({ page: undefined, }), }), ); }); test('should not call recordEvents when already recording and forceRestart is false', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } sessionReplay.sessionTargetingMatch = true; // Simulate that recording is already active sessionReplay.recordCancelCallback = jest.fn(); const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await sessionReplay.evaluateTargetingAndCapture({}, false, false); // recordEvents should NOT be called because we're already recording and forceRestart is false expect(recordEventsSpy).not.toHaveBeenCalled(); }); test('should call recordEvents when already recording but forceRestart is true', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } sessionReplay.sessionTargetingMatch = true; // Simulate that recording is already active sessionReplay.recordCancelCallback = jest.fn(); const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await sessionReplay.evaluateTargetingAndCapture({}, false, true); // recordEvents SHOULD be called because forceRestart is true expect(recordEventsSpy).toHaveBeenCalled(); }); test('should not call recordEvents when URL change re-evaluation still matches and recording is active', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } sessionReplay.sessionTargetingMatch = true; sessionReplay.recordCancelCallback = jest.fn(); jest.spyOn(targetingManager, 'evaluateTargetingAndStore').mockResolvedValue(true); const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await sessionReplay.evaluateTargetingAndCapture( { page: { url: 'https://example.com/still-matching' } }, false, false, true, ); // URL-change re-evaluation should not restart rrweb when already recording and still matching. expect(recordEventsSpy).not.toHaveBeenCalled(); }); test('should call recordEvents when not recording and forceRestart is false', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } sessionReplay.sessionTargetingMatch = true; // Ensure recording is not active sessionReplay.recordCancelCallback = null; const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); await sessionReplay.evaluateTargetingAndCapture({}, false, false); // recordEvents SHOULD be called because we're not recording expect(recordEventsSpy).toHaveBeenCalled(); }); test('should ignore stale forceTargetingReevaluation result when latest URL evaluation id changes', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } let resolveEvaluation!: (value: boolean) => void; const evaluationPromise = new Promise((resolve) => { resolveEvaluation = resolve; }); jest.spyOn(targetingManager, 'evaluateTargetingAndStore').mockImplementationOnce(() => evaluationPromise); ( sessionReplay as unknown as { latestUrlChangeTargetingEvaluationId: number; } ).latestUrlChangeTargetingEvaluationId = 1; const evalPromise = sessionReplay.evaluateTargetingAndCapture( { page: { url: 'https://example.com/stale-targeting' } }, false, false, true, ); ( sessionReplay as unknown as { latestUrlChangeTargetingEvaluationId: number; } ).latestUrlChangeTargetingEvaluationId = 2; resolveEvaluation(true); await evalPromise; expect(sessionReplay.sessionTargetingMatch).toBe(false); expect(mockLoggerProvider.debug).toHaveBeenCalledWith( expect.stringContaining('Ignoring stale URL-change targeting result #1; latest is #2.'), ); }); test('should not let a late URL-change false overwrite a newer non-URL true match', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } let resolveUrlChangeEvaluation!: (value: boolean) => void; const urlChangeEvaluationPromise = new Promise((resolve) => { resolveUrlChangeEvaluation = resolve; }); jest .spyOn(targetingManager, 'evaluateTargetingAndStore') .mockImplementationOnce(() => urlChangeEvaluationPromise) .mockResolvedValueOnce(true); sessionReplay.sessionTargetingMatch = false; const urlChangeEval = sessionReplay.evaluateTargetingAndCapture( { page: { url: 'https://example.com/url-change' } }, false, false, true, ); await sessionReplay.evaluateTargetingAndCapture({ event: { event_type: 'regular_event' } as any }); expect(sessionReplay.sessionTargetingMatch).toBe(true); resolveUrlChangeEvaluation(false); await urlChangeEval; expect(sessionReplay.sessionTargetingMatch).toBe(true); }); test('should keep recording for the session after first targeting match', async () => { const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } sessionReplay.sessionTargetingMatch = true; sessionReplay.recordCancelCallback = jest.fn(); const stopSpy = jest.spyOn(sessionReplay, 'stopRecordingEvents'); const recordEventsSpy = jest.spyOn(sessionReplay, 'recordEvents'); const evaluateTargetingAndStoreSpy = jest .spyOn(targetingManager, 'evaluateTargetingAndStore') .mockResolvedValue(false); await sessionReplay.evaluateTargetingAndCapture( { page: { url: 'https://example.com/non-matching' } }, false, false, true, ); // Once matched, we do not re-evaluate/stop on later URL changes in the same session. expect(evaluateTargetingAndStoreSpy).not.toHaveBeenCalled(); expect(sessionReplay.sessionTargetingMatch).toBe(true); expect(stopSpy).not.toHaveBeenCalled(); expect(recordEventsSpy).not.toHaveBeenCalled(); }); }); describe('URL change listener for targeting', () => { test('should not call subscribeToUrlChanges when getGlobalScope has no location', () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({} as any); const sessionReplay = new SessionReplay(); sessionReplay.config = { targetingConfig: {} } as any; sessionReplay.identifiers = { sessionId: 123 } as any; (sessionReplay as any).setupUrlChangeListener(); expect(subscribeToUrlChanges).not.toHaveBeenCalled(); }); test('should not call subscribeToUrlChanges when getGlobalScope returns null', () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue(null as any); const sessionReplay = new SessionReplay(); sessionReplay.config = { targetingConfig: {} } as any; sessionReplay.identifiers = { sessionId: 123 } as any; (sessionReplay as any).setupUrlChangeListener(); expect(subscribeToUrlChanges).not.toHaveBeenCalled(); }); test('should call evaluateTargetingAndCapture when URL change callback is invoked', async () => { mockRemoteConfig = { sr_sampling_config: {}, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; const sessionReplay = new SessionReplay(); const subscribeMock = subscribeToUrlChanges as jest.MockedFunction; const callCountBefore = subscribeMock.mock.calls.length; await sessionReplay.init(apiKey, mockOptions).promise; const evaluateSpy = jest.spyOn(sessionReplay, 'evaluateTargetingAndCapture'); const lastCall = subscribeMock.mock.calls[callCountBefore]; const onUrlChange = lastCall?.[1]; expect(onUrlChange).toBeDefined(); onUrlChange('https://example.com/new-page'); expect(evaluateSpy).toHaveBeenCalledWith( expect.objectContaining({ userProperties: {}, event: undefined, page: { url: 'https://example.com/new-page' }, }), false, false, true, ); }); test('should ignore stale URL-change targeting results when reevaluations resolve out of order', async () => { mockRemoteConfig = { sr_sampling_config: {}, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; const sessionReplay = new SessionReplay(); const subscribeMock = subscribeToUrlChanges as jest.MockedFunction; const callCountBefore = subscribeMock.mock.calls.length; await sessionReplay.init(apiKey, mockOptions).promise; sessionReplay.recordCancelCallback = jest.fn(); let resolveFirst!: (value: boolean) => void; let resolveSecond!: (value: boolean) => void; const firstEvaluation = new Promise((resolve) => { resolveFirst = resolve; }); const secondEvaluation = new Promise((resolve) => { resolveSecond = resolve; }); jest .spyOn(targetingManager, 'evaluateTargetingAndStore') .mockImplementationOnce(() => firstEvaluation) .mockImplementationOnce(() => secondEvaluation); const stopSpy = jest.spyOn(sessionReplay, 'stopRecordingEvents'); const lastCall = subscribeMock.mock.calls[callCountBefore]; const onUrlChange = lastCall?.[1] as ((href: string) => void) | undefined; expect(onUrlChange).toBeDefined(); onUrlChange?.('https://example.com/route-a'); onUrlChange?.('https://example.com/route-b'); resolveSecond(true); await Promise.resolve(); await Promise.resolve(); expect(sessionReplay.sessionTargetingMatch).toBe(true); resolveFirst(false); await Promise.resolve(); await Promise.resolve(); expect(sessionReplay.sessionTargetingMatch).toBe(true); expect(stopSpy).not.toHaveBeenCalled(); }); test('should call urlChangeCleanup on shutdown when targeting was set up', async () => { mockRemoteConfig = { sr_sampling_config: {}, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; let capturedCleanup: (() => void) | null = null; (subscribeToUrlChanges as jest.Mock).mockImplementation(() => { const cleanup = jest.fn(); capturedCleanup = cleanup; return cleanup; }); const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; expect(capturedCleanup).not.toBeNull(); expect(typeof capturedCleanup).toBe('function'); sessionReplay.shutdown(); expect(capturedCleanup).toHaveBeenCalled(); }); test('should clean up previous URL subscription before re-subscribing on re-init', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, sr_targeting_config: { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }, }; const callbacks = new Set<(href: string) => void>(); (subscribeToUrlChanges as jest.Mock).mockImplementation( (_scope: Window | undefined, cb: (href: string) => void) => { callbacks.add(cb); return () => { callbacks.delete(cb); }; }, ); const evaluateTargetingAndCaptureSpy = jest.spyOn(sessionReplay, 'evaluateTargetingAndCapture'); await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.init(apiKey, mockOptions).promise; // Init itself evaluates targeting; clear those calls and test only URL-change behavior. evaluateTargetingAndCaptureSpy.mockClear(); callbacks.forEach((cb) => cb('https://example.com/new-route')); expect(callbacks.size).toBe(1); expect(evaluateTargetingAndCaptureSpy).toHaveBeenCalledTimes(1); expect(evaluateTargetingAndCaptureSpy).toHaveBeenCalledWith( { userProperties: {}, event: undefined, page: { url: 'https://example.com/new-route' }, }, false, false, true, ); }); test('should clean up existing URL subscription when setupUrlChangeListener is called again', () => { jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ location: { href: 'https://example.com/current' }, } as any); const firstCleanup = jest.fn(); const secondCleanup = jest.fn(); (subscribeToUrlChanges as jest.Mock) .mockImplementationOnce(() => firstCleanup) .mockImplementationOnce(() => secondCleanup); const sessionReplay = new SessionReplay(); (sessionReplay as any).setupUrlChangeListener(); (sessionReplay as any).setupUrlChangeListener(); expect(firstCleanup).toHaveBeenCalledTimes(1); expect(secondCleanup).not.toHaveBeenCalled(); }); test('should not call subscribeToUrlChanges when init completes with no targetingConfig and no urlMaskLevels', async () => { (subscribeToUrlChanges as jest.Mock).mockClear(); mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, }; const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; expect(subscribeToUrlChanges).not.toHaveBeenCalled(); }); test('should call subscribeToUrlChanges when urlMaskLevels has entries and there is no targetingConfig', async () => { (subscribeToUrlChanges as jest.Mock).mockClear(); mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, }; const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'light', urlMaskLevels: [{ match: 'https://example.com/admin/*', maskLevel: 'conservative' }], }, }).promise; expect(subscribeToUrlChanges).toHaveBeenCalled(); }); test('should not call subscribeToUrlChanges when privacyConfig is undefined and no targetingConfig', async () => { (subscribeToUrlChanges as jest.Mock).mockClear(); const mockLocalConfig = new SessionReplayLocalConfig(apiKey, mockOptions); const mockJoinedConfig: SessionReplayJoinedConfig = { ...mockLocalConfig, optOut: false, privacyConfig: undefined, captureEnabled: true, }; const mockGenerator = { generateJoinedConfig: jest.fn().mockResolvedValue({ joinedConfig: mockJoinedConfig, localConfig: mockLocalConfig, remoteConfig: undefined, }), }; const createGeneratorSpy = jest .spyOn(JoinedConfigModule, 'createSessionReplayJoinedConfigGenerator') .mockResolvedValue(mockGenerator as any); const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, mockOptions).promise; expect(subscribeToUrlChanges).not.toHaveBeenCalled(); createGeneratorSpy.mockRestore(); }); test('should update currentPageUrl on URL change even without targetingConfig', async () => { mockRemoteConfig = { sr_sampling_config: samplingConfig, sr_privacy_config: {}, }; const subscribeMock = subscribeToUrlChanges as jest.MockedFunction; const callCountBefore = subscribeMock.mock.calls.length; const sessionReplay = new SessionReplay(); await sessionReplay.init(apiKey, { ...mockOptions, privacyConfig: { defaultMaskLevel: 'light', urlMaskLevels: [{ match: 'https://example.com/admin/*', maskLevel: 'conservative' }], }, }).promise; const lastCall = subscribeMock.mock.calls[callCountBefore]; const onUrlChange = lastCall?.[1] as ((href: string) => void) | undefined; expect(onUrlChange).toBeDefined(); onUrlChange?.('https://example.com/admin/dashboard'); expect((sessionReplay as any).currentPageUrl).toBe('https://example.com/admin/dashboard'); }); }); describe('targeting decision events', () => { test('should return false when targetingConfig exists but sessionTargetingMatch is false', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Set targeting config directly on the config object if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } sessionReplay.sessionTargetingMatch = false; const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(false); expect(mockLoggerProvider.log).toHaveBeenCalledWith( `Not capturing replays for session ${ mockOptions.sessionId?.toString() || '' } due to not matching targeting conditions.`, ); }); test('should return true when targetingConfig exists and sessionTargetingMatch is true', async () => { await sessionReplay.init(apiKey, mockOptions).promise; // Set targeting config directly on the config object if (sessionReplay.config) { sessionReplay.config.targetingConfig = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' } }, segments: [], }; } sessionReplay.sessionTargetingMatch = true; const shouldRecord = sessionReplay.getShouldRecord(); expect(shouldRecord).toBe(true); expect(mockLoggerProvider.log).toHaveBeenCalledWith( `Capturing replays for session ${ mockOptions.sessionId?.toString() || '' } due to matching targeting conditions.`, ); }); }); describe('cross-origin iframes', () => { const crossOriginOptions: SessionReplayOptions = { ...mockOptions, crossOriginIframes: { enabled: true }, }; // Helper to get the mock coordinator instance created during the last recordEvents() call. // Uses mock.results (not mock.instances) because mockImplementation() return values // are tracked in results, not in instances (instances tracks the `this` context). function getLastCoordinatorInstance() { const ctor = MockCrossOriginIframeCoordinator as jest.Mock; const last = ctor.mock.results[ctor.mock.results.length - 1]; return last?.value as { start: jest.Mock; stop: jest.Mock }; } beforeEach(() => { (mockIsInIframe as jest.Mock).mockReturnValue(false); // jest.resetAllMocks() in the outer afterEach clears mockImplementation, so re-set it here. (MockCrossOriginIframeCoordinator as jest.Mock).mockImplementation(() => ({ start: jest.fn(), stop: jest.fn(), })); (mockListenForParentSignals as jest.Mock).mockReturnValue(jest.fn()); }); describe('parent mode', () => { test('passes recordCrossOriginIframes: true to rrweb when enabled', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); expect(mockRecordFunction).toHaveBeenCalledWith(expect.objectContaining({ recordCrossOriginIframes: true })); }); test('does not pass recordCrossOriginIframes when feature is disabled', async () => { await sessionReplay.init(apiKey, mockOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const callArg = mockRecordFunction.mock.calls[0]?.[0] as Record | undefined; expect(callArg?.recordCrossOriginIframes).toBeFalsy(); }); test('stopRecordingEvents stops the coordinator', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const instance = getLastCoordinatorInstance(); sessionReplay.stopRecordingEvents(); expect(instance.stop).toHaveBeenCalled(); }); test('coordinateChildren: false skips coordinator but still passes flag to rrweb', async () => { await sessionReplay.init(apiKey, { ...mockOptions, crossOriginIframes: { enabled: true, coordinateChildren: false }, }).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); expect(mockRecordFunction).toHaveBeenCalledWith(expect.objectContaining({ recordCrossOriginIframes: true })); expect(MockCrossOriginIframeCoordinator).not.toHaveBeenCalled(); }); }); describe('child mode', () => { beforeEach(() => { (mockIsInIframe as jest.Mock).mockReturnValue(true); }); test('does not call rrweb record immediately when in child mode with coordinateChildren: true', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); expect(mockRecordFunction).not.toHaveBeenCalled(); }); test('sets up parent signal listener in child mode', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); expect(mockListenForParentSignals).toHaveBeenCalledWith( expect.objectContaining({ onStart: expect.any(Function), onStop: expect.any(Function) }), ); }); test('re-entering child mode cancels the previous parent signal listener', async () => { const firstCleanup = jest.fn(); (mockListenForParentSignals as jest.Mock).mockReturnValueOnce(firstCleanup); await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); // Record again (e.g. after a session-ID rotation) — should tear down the old listener await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); expect(firstCleanup).toHaveBeenCalled(); }); test('starts recording when onStart callback is invoked', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; onStop: () => void; }; onStart(); expect(mockRecordFunction).toHaveBeenCalledWith(expect.objectContaining({ recordCrossOriginIframes: true })); }); test('stops recording when onStop callback is invoked', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart, onStop } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; onStop: () => void; }; onStart(); const cancelCallback = mockRecordFunction.mock.results[0].value as jest.Mock; onStop(); expect(cancelCallback).toHaveBeenCalled(); }); test('onStop before onStart does not throw', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStop } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStop: () => void; }; expect(() => onStop()).not.toThrow(); }); test('onStop logs warning if cancel callback throws', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart, onStop } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; onStop: () => void; }; onStart(); const cancelCallback = mockRecordFunction.mock.results[0].value as jest.Mock; cancelCallback.mockImplementation(() => { throw new Error('cancel failure'); }); onStop(); expect(mockLoggerProvider.warn).toHaveBeenCalledWith( expect.stringContaining('Error occurred while stopping child iframe replay capture:'), ); }); test('parent signal listener stays alive across onStop/onStart cycles', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart, onStop } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; onStop: () => void; }; onStart(); onStop(); // Listener must still be alive — a subsequent onStart should work mockRecordFunction.mockClear(); onStart(); expect(mockRecordFunction).toHaveBeenCalledWith(expect.objectContaining({ recordCrossOriginIframes: true })); }); test('subsequent onStart cancels previous rrweb recording before starting a new one', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; }; onStart(); const firstCancelCallback = mockRecordFunction.mock.results[0].value as jest.Mock; // Second onStart (e.g. parent session rotated) should cancel the first recording onStart(); expect(firstCancelCallback).toHaveBeenCalled(); }); test('cleans up parent signal listener on shutdown', async () => { const mockCleanup = jest.fn(); (mockListenForParentSignals as jest.Mock).mockReturnValueOnce(mockCleanup); await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); sessionReplay.shutdown(); expect(mockCleanup).toHaveBeenCalled(); }); test('stopRecordingEvents cleans up parent signal listener to prevent stale mode', async () => { const mockCleanup = jest.fn(); (mockListenForParentSignals as jest.Mock).mockReturnValueOnce(mockCleanup); await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); sessionReplay.stopRecordingEvents(); expect(mockCleanup).toHaveBeenCalled(); }); test('coordinateChildren: false records immediately even in iframe context', async () => { await sessionReplay.init(apiKey, { ...mockOptions, crossOriginIframes: { enabled: true, coordinateChildren: false }, }).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); expect(mockRecordFunction).toHaveBeenCalledWith(expect.objectContaining({ recordCrossOriginIframes: true })); }); test('child mode emit callback is a no-op (events forwarded via postMessage by rrweb)', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; }; onStart(); const callArgs = mockRecordFunction.mock.calls[0]?.[0] as Record unknown>; // The emit callback is a no-op in child mode — just verify it does not throw expect(() => callArgs.emit({ type: 4, data: {}, timestamp: 1 })).not.toThrow(); }); test('mask function URL getters in child mode return currentPageUrl', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; }; onStart(); const callArgs = mockRecordFunction.mock.calls[0]?.[0] as Record unknown>; // Invoke the URL getter lambdas by calling the mask functions with dummy input if (typeof callArgs?.maskInputFn === 'function') { callArgs.maskInputFn('test', null); } if (typeof callArgs?.maskTextFn === 'function') { callArgs.maskTextFn('test', null); } // No assertion needed — just exercising the lambdas for coverage }); test('passes full slimDOMOptions into child mode', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; }; onStart(); expect(mockRecordFunction).toHaveBeenCalledWith( expect.objectContaining({ slimDOMOptions: { script: true, comment: true, headFavicon: true, headWhitespace: true, headMetaDescKeywords: true, headMetaSocial: true, headMetaRobots: true, headMetaHttpEquiv: true, headMetaAuthorship: true, headMetaVerification: true, }, }), ); }); test('maskAttributeFn in child mode invokes URL getter when key is in maskAttributes', async () => { // Need a config with maskAttributes so the URL getter lambda is actually called await sessionReplay.init(apiKey, { ...crossOriginOptions, privacyConfig: { maskAttributes: ['data-sensitive'] }, }).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; }; onStart(); const callArgs = mockRecordFunction.mock.calls[0]?.[0] as Record unknown>; if (typeof callArgs?.maskAttributeFn === 'function') { callArgs.maskAttributeFn('data-sensitive', 'secret', document.createElement('div')); } }); test('errorHandler in child mode logs warning for generic errors', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; }; onStart(); const callArgs = mockRecordFunction.mock.calls[0]?.[0] as Record unknown>; const result = callArgs.errorHandler(new Error('some rrweb error')); expect(result).toBe(true); expect(mockLoggerProvider.warn).toHaveBeenCalledWith( 'Error while capturing replay (child iframe): ', expect.any(String), ); }); test('errorHandler in child mode re-throws CSSStyleSheet insertRule errors', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; }; onStart(); const callArgs = mockRecordFunction.mock.calls[0]?.[0] as Record unknown>; const cssError = new Error('insertRule CSSStyleSheet problem'); expect(() => callArgs.errorHandler(cssError)).toThrow(cssError); }); test('errorHandler in child mode re-throws _external_ flagged errors', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; }; onStart(); const callArgs = mockRecordFunction.mock.calls[0]?.[0] as Record unknown>; const externalError = Object.assign(new Error('external error'), { _external_: true }); expect(() => callArgs.errorHandler(externalError)).toThrow(externalError); }); test('_recordEventsInChildMode catch block logs warning when recordFunction throws', async () => { await sessionReplay.init(apiKey, crossOriginOptions).promise; await sessionReplay.recordEvents(); await jest.runAllTimersAsync(); const { onStart } = (mockListenForParentSignals as jest.Mock).mock.calls[0][0] as { onStart: () => void; }; mockRecordFunction.mockImplementationOnce(() => { throw new Error('rrweb init failure'); }); onStart(); expect(mockLoggerProvider.warn).toHaveBeenCalledWith( 'Failed to initialize session replay in child iframe mode:', expect.any(Error), ); }); }); }); }); ================================================ FILE: packages/session-replay-browser/test/targeting/targeting-idb-store.test.ts ================================================ import { Logger } from '@amplitude/analytics-types'; import { IDBPDatabase } from 'idb'; import { SessionReplayTargetingDB, targetingIDBStore } from '../../src/targeting/targeting-idb-store'; type MockedLogger = jest.Mocked; const apiKey = 'static_key'; describe('TargetingIDBStore', () => { const mockLoggerProvider: MockedLogger = { error: jest.fn(), log: jest.fn(), disable: jest.fn(), enable: jest.fn(), warn: jest.fn(), debug: jest.fn(), }; let db: IDBPDatabase; beforeEach(async () => { db = await targetingIDBStore.openOrCreateDB('static_key'); await db.clear('sessionTargetingMatch'); jest.useFakeTimers(); }); afterEach(() => { jest.resetAllMocks(); jest.useRealTimers(); }); describe('getTargetingMatchForSession', () => { test('should return the targeting match from idb store', async () => { await targetingIDBStore.storeTargetingMatchForSession({ loggerProvider: mockLoggerProvider, sessionId: 123, apiKey, targetingMatch: true, }); const targetingMatch = await targetingIDBStore.getTargetingMatchForSession({ loggerProvider: mockLoggerProvider, sessionId: 123, apiKey, }); expect(targetingMatch).toEqual(true); }); test('should return undefined if no matching entry in the store', async () => { const targetingMatch = await targetingIDBStore.getTargetingMatchForSession({ loggerProvider: mockLoggerProvider, sessionId: 123, apiKey, }); expect(targetingMatch).toEqual(undefined); }); test('should catch errors', async () => { const mockDB: IDBPDatabase = { get: jest.fn().mockImplementation(() => Promise.reject('error')), } as unknown as IDBPDatabase; jest.spyOn(targetingIDBStore, 'openOrCreateDB').mockResolvedValueOnce(mockDB); await targetingIDBStore.getTargetingMatchForSession({ loggerProvider: mockLoggerProvider, sessionId: 123, apiKey, }); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalledTimes(1); expect(mockLoggerProvider.warn.mock.calls[0][0]).toEqual( 'Failed to get targeting match for session id 123: error', ); }); }); describe('storeTargetingMatchForSession', () => { test('should add the targeting match to idb store', async () => { await targetingIDBStore.storeTargetingMatchForSession({ loggerProvider: mockLoggerProvider, sessionId: 123, apiKey, targetingMatch: true, }); const targetingMatch = await targetingIDBStore.getTargetingMatchForSession({ loggerProvider: mockLoggerProvider, sessionId: 123, apiKey, }); expect(targetingMatch).toEqual(true); }); test('should catch errors', async () => { const mockDB: IDBPDatabase = { put: jest.fn().mockImplementation(() => Promise.reject('error')), } as unknown as IDBPDatabase; jest.spyOn(targetingIDBStore, 'openOrCreateDB').mockResolvedValueOnce(mockDB); await targetingIDBStore.storeTargetingMatchForSession({ loggerProvider: mockLoggerProvider, sessionId: 123, apiKey, targetingMatch: true, }); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalledTimes(1); expect(mockLoggerProvider.warn.mock.calls[0][0]).toEqual( 'Failed to store targeting match for session id 123: error', ); }); }); describe('clearStoreOfOldSessions', () => { test('should delete object stores with sessions older than 2 days', async () => { // Set current time to 08:30 jest.useFakeTimers().setSystemTime(new Date('2023-07-31 08:30:00').getTime()); // Current session from one hour before, 07:30 const currentSessionId = new Date('2023-07-31 07:30:00').getTime(); await targetingIDBStore.storeTargetingMatchForSession({ loggerProvider: mockLoggerProvider, apiKey, sessionId: currentSessionId, targetingMatch: true, }); // Add session from the same day await targetingIDBStore.storeTargetingMatchForSession({ loggerProvider: mockLoggerProvider, apiKey, sessionId: new Date('2023-07-31 05:30:00').getTime(), targetingMatch: true, }); // Add session from one month ago - set the time to simulate this being created a month ago jest.setSystemTime(new Date('2023-06-31 10:30:00').getTime()); await targetingIDBStore.storeTargetingMatchForSession({ loggerProvider: mockLoggerProvider, apiKey, sessionId: new Date('2023-06-31 10:30:00').getTime(), targetingMatch: true, }); // Reset time back to current jest.setSystemTime(new Date('2023-07-31 08:30:00').getTime()); const allEntries = targetingIDBStore.dbs && (await targetingIDBStore.dbs['static_key'].getAll('sessionTargetingMatch')); expect(allEntries).toEqual([ { sessionId: String(new Date('2023-06-31 10:30:00').getTime()), targetingMatch: true, lastUpdated: new Date('2023-06-31 10:30:00').getTime(), }, { sessionId: String(new Date('2023-07-31 05:30:00').getTime()), targetingMatch: true, lastUpdated: new Date('2023-07-31 08:30:00').getTime(), }, { sessionId: String(currentSessionId), targetingMatch: true, lastUpdated: new Date('2023-07-31 08:30:00').getTime(), }, ]); await targetingIDBStore.clearStoreOfOldSessions({ loggerProvider: mockLoggerProvider, apiKey, currentSessionId, }); const allEntriesUpdated = targetingIDBStore.dbs && (await targetingIDBStore.dbs['static_key'].getAll('sessionTargetingMatch')); // Only one month old entry should be deleted expect(allEntriesUpdated).toEqual([ { sessionId: String(new Date('2023-07-31 05:30:00').getTime()), targetingMatch: true, lastUpdated: new Date('2023-07-31 08:30:00').getTime(), }, { sessionId: String(currentSessionId), targetingMatch: true, lastUpdated: new Date('2023-07-31 08:30:00').getTime(), }, ]); }); test('should catch errors', async () => { const mockDB: IDBPDatabase = { transaction: jest.fn().mockImplementation(() => { throw new Error('error'); }), } as unknown as IDBPDatabase; jest.spyOn(targetingIDBStore, 'openOrCreateDB').mockResolvedValueOnce(mockDB); await targetingIDBStore.clearStoreOfOldSessions({ loggerProvider: mockLoggerProvider, currentSessionId: 123, apiKey, }); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalledTimes(1); expect(mockLoggerProvider.warn.mock.calls[0][0]).toEqual( 'Failed to clear old targeting matches for sessions: Error: error', ); }); }); }); ================================================ FILE: packages/session-replay-browser/test/targeting/targeting-manager.test.ts ================================================ import { Logger } from '@amplitude/analytics-types'; import * as Targeting from '@amplitude/targeting'; import { IDBPDatabase } from 'idb'; import { SessionReplayJoinedConfig } from '../../src/config/types'; import { SessionReplayTargetingDB, targetingIDBStore } from '../../src/targeting/targeting-idb-store'; import { evaluateTargetingAndStore } from '../../src/targeting/targeting-manager'; import { flagConfig } from '../flag-config-data'; type MockedLogger = jest.Mocked; jest.mock('@amplitude/targeting'); type MockedTargeting = jest.Mocked; describe('Targeting Manager', () => { // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment const { evaluateTargeting } = Targeting as MockedTargeting; let originalFetch: typeof global.fetch; const mockLoggerProvider: MockedLogger = { error: jest.fn(), log: jest.fn(), disable: jest.fn(), enable: jest.fn(), warn: jest.fn(), debug: jest.fn(), }; const config: SessionReplayJoinedConfig = { apiKey: 'static_key', loggerProvider: mockLoggerProvider, sampleRate: 1, targetingConfig: flagConfig, } as unknown as SessionReplayJoinedConfig; let db: IDBPDatabase; beforeEach(async () => { db = await targetingIDBStore.openOrCreateDB('static_key'); await db.clear('sessionTargetingMatch'); jest.useFakeTimers(); originalFetch = global.fetch; global.fetch = jest.fn(() => Promise.resolve({ status: 200, }), ) as jest.Mock; }); afterEach(() => { jest.resetAllMocks(); global.fetch = originalFetch; jest.useRealTimers(); }); describe('evaluateTargetingAndStore', () => { let storeTargetingMatchForSessionMock: jest.SpyInstance; let getTargetingMatchForSessionMock: jest.SpyInstance; beforeEach(() => { storeTargetingMatchForSessionMock = jest.spyOn(targetingIDBStore, 'storeTargetingMatchForSession'); getTargetingMatchForSessionMock = jest.spyOn(targetingIDBStore, 'getTargetingMatchForSession'); }); test('should return a true match from IndexedDB', async () => { jest.spyOn(targetingIDBStore, 'getTargetingMatchForSession').mockResolvedValueOnce(true); const sessionTargetingMatch = await evaluateTargetingAndStore({ sessionId: 123, loggerProvider: config.loggerProvider, apiKey: config.apiKey, targetingConfig: flagConfig, }); expect(getTargetingMatchForSessionMock).toHaveBeenCalled(); expect(evaluateTargeting).not.toHaveBeenCalled(); expect(sessionTargetingMatch).toBe(true); }); test('should use remote config to determine targeting match', async () => { jest.spyOn(targetingIDBStore, 'getTargetingMatchForSession').mockResolvedValueOnce(false); // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access (evaluateTargeting as jest.Mock).mockResolvedValueOnce({ sr_targeting_config: { key: 'on', }, }); const mockUserProperties = { country: 'US', city: 'San Francisco', }; const sessionTargetingMatch = await evaluateTargetingAndStore({ sessionId: 123, loggerProvider: config.loggerProvider, apiKey: config.apiKey, targetingConfig: flagConfig, targetingParams: { userProperties: mockUserProperties, }, }); expect(evaluateTargeting).toHaveBeenCalledWith({ apiKey: 'static_key', loggerProvider: mockLoggerProvider, flag: flagConfig, sessionId: 123, userProperties: mockUserProperties, }); expect(sessionTargetingMatch).toBe(true); }); test('should pass page to evaluateTargeting when provided in targetingParams', async () => { jest.spyOn(targetingIDBStore, 'getTargetingMatchForSession').mockResolvedValueOnce(false); // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access (evaluateTargeting as jest.Mock).mockResolvedValueOnce({ sr_targeting_config: { key: 'on', }, }); const page = { url: 'https://example.com/analytics' }; const sessionTargetingMatch = await evaluateTargetingAndStore({ sessionId: 123, loggerProvider: config.loggerProvider, apiKey: config.apiKey, targetingConfig: flagConfig, targetingParams: { userProperties: {}, page, }, }); expect(evaluateTargeting).toHaveBeenCalledWith( expect.objectContaining({ apiKey: 'static_key', loggerProvider: mockLoggerProvider, flag: flagConfig, sessionId: 123, page, }), ); expect(sessionTargetingMatch).toBe(true); }); test('should re-evaluate when urlChange is true even if IDB cache is true (URL change)', async () => { jest.spyOn(targetingIDBStore, 'getTargetingMatchForSession').mockResolvedValueOnce(true); // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access (evaluateTargeting as jest.Mock).mockResolvedValueOnce({ sr_targeting_config: { key: 'off' }, }); const sessionTargetingMatch = await evaluateTargetingAndStore({ sessionId: 123, loggerProvider: config.loggerProvider, apiKey: config.apiKey, targetingConfig: flagConfig, targetingParams: { page: { url: 'https://example.com/new-page' } }, urlChange: true, }); expect(evaluateTargeting).toHaveBeenCalled(); expect(sessionTargetingMatch).toBe(false); }); test('should store sessionTargetingMatch', async () => { // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access (evaluateTargeting as jest.Mock).mockResolvedValueOnce({ sr_targeting_config: { key: 'on', }, }); const sessionTargetingMatch = await evaluateTargetingAndStore({ sessionId: 123, loggerProvider: config.loggerProvider, apiKey: config.apiKey, targetingConfig: flagConfig, }); expect(storeTargetingMatchForSessionMock).toHaveBeenCalledWith({ targetingMatch: true, sessionId: 123, apiKey: config.apiKey, loggerProvider: mockLoggerProvider, }); expect(sessionTargetingMatch).toBe(true); }); test('should handle error', async () => { jest.spyOn(targetingIDBStore, 'storeTargetingMatchForSession').mockImplementationOnce(() => { throw new Error('storage error'); }); const sessionTargetingMatch = await evaluateTargetingAndStore({ sessionId: 123, loggerProvider: config.loggerProvider, apiKey: config.apiKey, targetingConfig: flagConfig, }); expect(sessionTargetingMatch).toBe(true); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalledTimes(1); expect(mockLoggerProvider.warn.mock.calls[0][0]).toEqual('storage error'); }); test('should parse string sessionId to number when calling evaluateTargeting', async () => { jest.spyOn(targetingIDBStore, 'getTargetingMatchForSession').mockResolvedValueOnce(false); // eslint-disable-next-line @typescript-eslint/no-unsafe-call,@typescript-eslint/no-unsafe-member-access (evaluateTargeting as jest.Mock).mockResolvedValueOnce({ sr_targeting_config: { key: 'on', }, }); const sessionTargetingMatch = await evaluateTargetingAndStore({ sessionId: '456', loggerProvider: config.loggerProvider, apiKey: config.apiKey, targetingConfig: flagConfig, }); expect(evaluateTargeting).toHaveBeenCalledWith({ apiKey: 'static_key', loggerProvider: mockLoggerProvider, flag: flagConfig, sessionId: 456, }); expect(sessionTargetingMatch).toBe(true); }); }); }); ================================================ FILE: packages/session-replay-browser/test/test-data.ts ================================================ // This session id will be included in a 20% sample rate or higher (xxHash32 ratio ~0.1097) export const SESSION_ID_IN_20_SAMPLE = 1719847315013; ================================================ FILE: packages/session-replay-browser/test/track-destination.test.ts ================================================ import * as AnalyticsCore from '@amplitude/analytics-core'; import { ILogger, ServerZone } from '@amplitude/analytics-core'; import { SessionReplayDestinationContext } from 'src/typings/session-replay'; import { SessionReplayTrackDestination } from '../src/track-destination'; import { VERSION } from '../src/version'; type MockedLogger = jest.Mocked; const mockEvent = { type: 4, data: { href: 'https://analytics.amplitude.com/', width: 1728, height: 154 }, timestamp: 1687358660935, }; const mockEventString = JSON.stringify(mockEvent); async function runScheduleTimers() { // exhause first setTimeout jest.runAllTimers(); // wait for next tick to call nested setTimeout await Promise.resolve(); // exhause nested setTimeout jest.runAllTimers(); } const apiKey = 'static_key'; describe('SessionReplayTrackDestination', () => { let originalFetch: typeof global.fetch; const mockLoggerProvider: MockedLogger = { error: jest.fn(), log: jest.fn(), disable: jest.fn(), enable: jest.fn(), warn: jest.fn(), debug: jest.fn(), }; const mockOnComplete = jest.fn(); beforeEach(() => { jest.useFakeTimers(); originalFetch = global.fetch; global.fetch = jest.fn(() => Promise.resolve({ status: 200, }), ) as jest.Mock; jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({} as unknown as typeof globalThis); }); afterEach(() => { jest.resetAllMocks(); jest.spyOn(global.Math, 'random').mockRestore(); global.fetch = originalFetch; jest.useRealTimers(); }); describe('addToQueue', () => { test('should add to queue and schedule a flush', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const schedule = jest.spyOn(trackDestination, 'schedule').mockReturnValueOnce(undefined); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, flushMaxRetries: 1, }; trackDestination.addToQueue(context); expect(schedule).toHaveBeenCalledTimes(1); expect(schedule).toHaveBeenCalledWith(0); expect(context.attempts).toBe(1); }); test('should not add to queue if attemps are greater than allowed retries', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const completeRequest = jest.spyOn(trackDestination, 'completeRequest').mockReturnValueOnce(undefined); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 1, timeout: 0, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; trackDestination.addToQueue(context); expect(completeRequest).toHaveBeenCalledTimes(1); expect(completeRequest).toHaveBeenCalledWith({ context: context, err: 'Session replay event batch rejected due to exceeded retry count', }); }); test('should not add a duplicate sequence to the queue', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const schedule = jest.spyOn(trackDestination, 'schedule').mockReturnValueOnce(undefined); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, flushMaxRetries: 1, }; trackDestination.addToQueue(context); // Add the same context a second time trackDestination.addToQueue(context); expect(schedule).toHaveBeenCalledTimes(1); expect(trackDestination.queue).toEqual([context]); }); }); describe('schedule', () => { test('should schedule a flush', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (trackDestination as any).scheduled = null; trackDestination.queue = [ { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }, ]; const flush = jest .spyOn(trackDestination, 'flush') .mockImplementationOnce(() => { // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (trackDestination as any).scheduled = null; return Promise.resolve(undefined); }) .mockReturnValueOnce(Promise.resolve(undefined)); trackDestination.schedule(0); await runScheduleTimers(); expect(flush).toHaveBeenCalledTimes(2); }); test('should not schedule if one is already in progress', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access (trackDestination as any).scheduled = setTimeout(jest.fn, 0); const flush = jest.spyOn(trackDestination, 'flush').mockReturnValueOnce(Promise.resolve(undefined)); trackDestination.schedule(0); expect(flush).toHaveBeenCalledTimes(0); }); }); describe('flush', () => { test('should call send', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); trackDestination.queue = [ { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }, ]; const send = jest.spyOn(trackDestination, 'send').mockReturnValueOnce(Promise.resolve()); const result = await trackDestination.flush(); expect(trackDestination.queue).toEqual([]); expect(result).toBe(undefined); expect(send).toHaveBeenCalledTimes(1); }); test('should send batches sequentially in order', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const sendOrder: number[] = []; let resolveFirst!: () => void; jest .spyOn(trackDestination, 'send') .mockImplementationOnce(() => { sendOrder.push(1); return new Promise((resolve) => { resolveFirst = resolve; }); }) .mockImplementationOnce(() => { sendOrder.push(2); return Promise.resolve(); }); trackDestination.queue = [ { events: [mockEventString], sessionId: 1, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }, { events: [mockEventString], sessionId: 2, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }, ]; const flushPromise = trackDestination.flush(); // First send should have started; second should not have started yet expect(sendOrder).toEqual([1]); resolveFirst(); await flushPromise; expect(sendOrder).toEqual([1, 2]); }); }); describe('send', () => { test('should not send anything if no events present', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); trackDestination.loggerProvider = mockLoggerProvider; const context: SessionReplayDestinationContext = { events: [], sessionId: 123, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', apiKey, onComplete: mockOnComplete, }; await trackDestination.send(context); expect(fetch).not.toHaveBeenCalled(); }); test('should not send anything if api key not set', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); trackDestination.loggerProvider = mockLoggerProvider; const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; await trackDestination.send(context); expect(fetch).not.toHaveBeenCalled(); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalled(); }); test('should not send anything if device id not set', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, deviceId: undefined, flushMaxRetries: 1, sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; await trackDestination.send(context); expect(fetch).not.toHaveBeenCalled(); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalled(); }); test('should make a request correctly', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, version: { type: 'plugin', version: VERSION, }, }; await trackDestination.send(context); expect(fetch).toHaveBeenCalledTimes(1); expect(fetch).toHaveBeenCalledWith( 'https://api-sr.amplitude.com/sessions/v2/track?device_id=1a2b3c&session_id=123&type=replay', { body: JSON.stringify({ version: 1, events: [mockEventString] }), headers: { Accept: '*/*', 'Content-Type': 'application/json', Authorization: 'Bearer static_key', 'X-Client-Library': `plugin/${VERSION}`, 'X-Client-Sample-Rate': '1', 'X-Sampling-Hash-Alg': 'xxhash32', 'X-Client-Url': '', 'X-Client-Version': VERSION, }, method: 'POST', keepalive: true, }, ); }); test('should make a request to eu', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, serverZone: ServerZone.EU, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, type: 'replay', onComplete: mockOnComplete, }; await trackDestination.send(context); expect(fetch).toHaveBeenCalledTimes(1); expect(fetch).toHaveBeenCalledWith( 'https://api-sr.eu.amplitude.com/sessions/v2/track?device_id=1a2b3c&session_id=123&type=replay', { body: JSON.stringify({ version: 1, events: [mockEventString] }), headers: { Accept: '*/*', 'Content-Type': 'application/json', Authorization: 'Bearer static_key', 'X-Client-Library': `standalone/${VERSION}`, 'X-Client-Sample-Rate': '1', 'X-Sampling-Hash-Alg': 'xxhash32', 'X-Client-Url': '', 'X-Client-Version': VERSION, }, method: 'POST', keepalive: true, }, ); }); test('should retry if retry param is true', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 2, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; (global.fetch as jest.Mock) .mockImplementationOnce(() => Promise.resolve({ status: 500, }), ) .mockImplementationOnce(() => Promise.resolve({ status: 200, }), ); const sendPromise = trackDestination.send(context, true); await jest.runAllTimersAsync(); await sendPromise; expect(fetch).toHaveBeenCalledTimes(2); }); test.each([408, 429, 499])('should retry on %i', async (statusCode) => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 2, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; (global.fetch as jest.Mock) .mockImplementationOnce(() => Promise.resolve({ status: statusCode })) .mockImplementationOnce(() => Promise.resolve({ status: 200 })); const sendPromise = trackDestination.send(context, true); await jest.runAllTimersAsync(); await sendPromise; expect(fetch).toHaveBeenCalledTimes(2); }); test('should not retry if retry param is false', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; (global.fetch as jest.Mock).mockImplementationOnce(() => Promise.resolve({ status: 500, }), ); const addToQueue = jest.spyOn(trackDestination, 'addToQueue'); await trackDestination.send(context, false); expect(addToQueue).toHaveBeenCalledTimes(0); }); }); describe('keepalive', () => { test('sets keepalive true for small payloads', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; await trackDestination.send(context); const options = (fetch as jest.Mock).mock.calls[0][1] as RequestInit; expect(options.keepalive).toBe(true); }); test('sets keepalive false when uncompressed payload exceeds 64 KB', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); // ~66 KB of event data const bigEvent = 'x'.repeat(66 * 1024); const context: SessionReplayDestinationContext = { events: [bigEvent], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; await trackDestination.send(context); const options = (fetch as jest.Mock).mock.calls[0][1] as RequestInit; expect(options.keepalive).toBe(false); }); }); describe('gzip compression', () => { const makeContext = (): SessionReplayDestinationContext => ({ events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }); test('should send with Content-Encoding: gzip when CompressionStream is available', async () => { const mockCompressed = new Uint8Array([0x1f, 0x8b]); // minimal gzip magic bytes // Mock a CompressionStream that returns a compressed chunk const mockWriter = { write: jest.fn(), close: jest.fn().mockResolvedValue(undefined) }; const mockReader = { read: jest .fn() .mockResolvedValueOnce({ done: false, value: mockCompressed }) .mockResolvedValueOnce({ done: true, value: undefined }), }; class MockCompressionStream { writable = { getWriter: () => mockWriter }; readable = { getReader: () => mockReader }; } // Override getGlobalScope to expose CompressionStream jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ CompressionStream: MockCompressionStream, } as unknown as typeof globalThis); const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); await trackDestination.send(makeContext()); expect(fetch).toHaveBeenCalledTimes(1); const options = (fetch as jest.Mock).mock.calls[0][1] as RequestInit; expect((options.headers as Record)['Content-Encoding']).toBe('gzip'); expect(options.body).toEqual(mockCompressed); }); test('should send without Content-Encoding when CompressionStream throws', async () => { class BrokenCompressionStream { constructor() { throw new Error('not supported'); } } jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ CompressionStream: BrokenCompressionStream, } as unknown as typeof globalThis); const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); await trackDestination.send(makeContext()); const options = (fetch as jest.Mock).mock.calls[0][1] as RequestInit; expect((options.headers as Record)['Content-Encoding']).toBeUndefined(); expect(typeof options.body).toBe('string'); }); }); describe('handleReponse', () => { test('handles 413 without responseBody argument (uses default empty string)', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const handlePayloadTooLarge = jest .spyOn(trackDestination, 'handlePayloadTooLargeResponse') .mockReturnValueOnce(undefined); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 1, timeout: 0, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; // Call without the optional responseBody argument to exercise the default await trackDestination.handleReponse(413, context); expect(handlePayloadTooLarge).toHaveBeenCalledWith(context, false); }); }); describe('handleOtherResponse', () => { test('should complete request when flushMaxRetries is not set', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const completeRequest = jest.spyOn(trackDestination, 'completeRequest').mockReturnValueOnce(undefined); const context: SessionReplayDestinationContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 1, timeout: 0, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, }; await trackDestination.handleOtherResponse(context); expect(completeRequest).toHaveBeenCalledWith({ context, err: 'Session replay event batch rejected due to exceeded retry count', }); }); }); describe('handlePayloadTooLargeResponse', () => { const baseContext = (overrides = {}): SessionReplayDestinationContext => ({ events: [mockEventString], sessionId: 123, apiKey, attempts: 1, timeout: 0, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, ...overrides, }); test('drops non-WAF batch immediately without bisecting', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const completeRequest = jest.spyOn(trackDestination, 'completeRequest').mockReturnValueOnce(undefined); const sendEventsList = jest.spyOn(trackDestination, 'sendEventsList'); const context = baseContext({ events: ['event1', 'event2'] }); trackDestination.handlePayloadTooLargeResponse(context, false); expect(completeRequest).toHaveBeenCalledWith({ context, err: expect.stringContaining('not retrying non-WAF 413'), }); expect(sendEventsList).not.toHaveBeenCalled(); }); test('drops single WAF event and logs error with size', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const completeRequest = jest.spyOn(trackDestination, 'completeRequest').mockReturnValueOnce(undefined); const context = baseContext(); trackDestination.handlePayloadTooLargeResponse(context, true); expect(completeRequest).toHaveBeenCalledWith({ context, err: expect.stringContaining('single event'), }); expect(completeRequest.mock.calls[0][0].err).toContain('cannot split further'); }); test('names WAF as source when isWaf is true', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); jest.spyOn(trackDestination, 'completeRequest').mockReturnValueOnce(undefined); const context = baseContext(); trackDestination.handlePayloadTooLargeResponse(context, true); // eslint-disable-next-line @typescript-eslint/unbound-method const errArg = (trackDestination.completeRequest as jest.Mock).mock.calls[0][0].err as string; expect(errArg).toContain('WAF'); }); test('bisects multi-event WAF batch and re-enqueues both halves', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const capturedOnCompletes: Array<() => Promise> = []; jest.spyOn(trackDestination, 'sendEventsList').mockImplementation((dest) => { capturedOnCompletes.push(dest.onComplete); }); const context = baseContext({ events: ['event1', 'event2', 'event3', 'event4'] }); trackDestination.handlePayloadTooLargeResponse(context, true); expect((trackDestination.sendEventsList as jest.Mock).mock.calls).toHaveLength(2); expect((trackDestination.sendEventsList as jest.Mock).mock.calls[0][0].events).toEqual(['event1', 'event2']); expect((trackDestination.sendEventsList as jest.Mock).mock.calls[1][0].events).toEqual(['event3', 'event4']); expect(mockOnComplete).toHaveBeenCalledTimes(1); // The noop onComplete passed to each half must be callable expect(capturedOnCompletes).toHaveLength(2); void Promise.all(capturedOnCompletes.map((fn) => fn())); }); test('logs warn with event count and size when bisecting WAF batch', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); jest.spyOn(trackDestination, 'sendEventsList').mockReturnValue(undefined); const context = baseContext({ events: ['event1', 'event2'] }); trackDestination.handlePayloadTooLargeResponse(context, true); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalledWith(expect.stringContaining('splitting')); }); }); describe('server back-pressure (X-Session-Replay-Event-Skipped header)', () => { const baseDirectiveContext = ( overrides: Partial = {}, ): SessionReplayDestinationContext => ({ events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, flushMaxRetries: 1, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay', onComplete: mockOnComplete, ...overrides, }); const mockFetchWithHeader = (status: number, headerValue: string | null) => { (global.fetch as jest.Mock).mockResolvedValueOnce({ status, headers: { get: jest.fn().mockReturnValue(headerValue) }, }); }; test('throttled (429) header pauses next flush by 60s', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); mockFetchWithHeader(200, '429'); jest.setSystemTime(1_000_000); await trackDestination.send(baseDirectiveContext(), true); // Internal state set: flushPauseUntilMs ~ now + 60_000 expect((trackDestination as any).flushPauseUntilMs).toBe(1_000_000 + 60_000); }); test('clean 200 (no skip header) clears any prior throttle pause', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); (trackDestination as any).flushPauseUntilMs = Date.now() + 60_000; mockFetchWithHeader(200, null); await trackDestination.send(baseDirectiveContext(), true); expect((trackDestination as any).flushPauseUntilMs).toBe(0); }); test('schedule defers next flush by remaining pause when throttled', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); jest.setSystemTime(2_000_000); (trackDestination as any).flushPauseUntilMs = 2_000_000 + 30_000; // 30s remaining const setTimeoutSpy = jest.spyOn(global, 'setTimeout'); trackDestination.schedule(0); // The schedule should use the remaining-pause as effective timeout, not the requested 0. const recordedTimeout = setTimeoutSpy.mock.calls[0][1] as number; expect(recordedTimeout).toBe(30_000); }); test('schedule keeps requested timeout when no pause is active', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const setTimeoutSpy = jest.spyOn(global, 'setTimeout'); trackDestination.schedule(500); const recordedTimeout = setTimeoutSpy.mock.calls[0][1] as number; expect(recordedTimeout).toBe(500); }); test.each([ ['4004', 'session_in_invalid_range'], ['4005', 'capture_disabled'], ])('header %s (%s) hard-kills the session — drops queued contexts and future adds', async (code) => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); mockFetchWithHeader(200, code); const context = baseDirectiveContext({ sessionId: 555 }); await trackDestination.send(context, true); expect((trackDestination as any).killedSessions.has(555)).toBe(true); // Queued contexts for the killed session are drained on add (never flushed). const followUpOnComplete = jest.fn().mockResolvedValue(undefined); const followUp = baseDirectiveContext({ sessionId: 555, onComplete: followUpOnComplete }); trackDestination.addToQueue(followUp); expect(trackDestination.queue).toEqual([]); expect(followUpOnComplete).toHaveBeenCalled(); }); test('hard-kill drains contexts already enqueued for that session, leaves others alone', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const killedSessionOnComplete = jest.fn().mockResolvedValue(undefined); const otherSessionOnComplete = jest.fn().mockResolvedValue(undefined); const queuedKilled = baseDirectiveContext({ sessionId: 999, onComplete: killedSessionOnComplete }); const queuedOther = baseDirectiveContext({ sessionId: 1000, onComplete: otherSessionOnComplete }); trackDestination.queue = [queuedKilled, queuedOther]; mockFetchWithHeader(200, '4005'); await trackDestination.send(baseDirectiveContext({ sessionId: 999 }), true); expect(killedSessionOnComplete).toHaveBeenCalled(); expect(otherSessionOnComplete).not.toHaveBeenCalled(); expect(trackDestination.queue).toEqual([queuedOther]); }); test('killing a session is idempotent (re-killing the same session is a no-op)', () => { // killSession() can be reached twice for the same session if a worker request // that started before the kill completes after — its skipCode loops through // applyServerDirective again. The early-return guards against re-draining and // re-logging in that case. const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); (trackDestination as any).killSession(42, '4005'); (trackDestination as any).killSession(42, '4005'); const killLogCalls = (mockLoggerProvider.log as jest.Mock).mock.calls.filter( (c) => typeof c[0] === 'string' && c[0].includes('capture stopped for session 42'), ); expect(killLogCalls).toHaveLength(1); }); test('a different session is unaffected by another session being killed', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); (trackDestination as any).killedSessions.add(111); const onComplete = jest.fn().mockResolvedValue(undefined); trackDestination.addToQueue(baseDirectiveContext({ sessionId: 222, onComplete })); // Different session goes through the normal queue path (attempts incremented, queued). expect(trackDestination.queue).toHaveLength(1); expect(trackDestination.queue[0].sessionId).toBe(222); expect(onComplete).not.toHaveBeenCalled(); }); test('unknown skip codes are treated as a normal 200 (no slowdown, no kill)', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); mockFetchWithHeader(200, '9999'); await trackDestination.send(baseDirectiveContext(), true); expect((trackDestination as any).flushPauseUntilMs).toBe(0); expect((trackDestination as any).killedSessions.size).toBe(0); }); test('worker complete message with skipCode applies directive on main thread', () => { const mockWorker = { postMessage: jest.fn(), terminate: jest.fn(), onerror: null as ((e: ErrorEvent) => void) | null, onmessage: null as ((e: MessageEvent) => void) | null, }; global.Worker = jest.fn(() => mockWorker) as unknown as typeof Worker; global.URL.createObjectURL = jest.fn().mockReturnValue('blob:mock'); const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); // Inject a pending request so the complete handler has something to resolve. const pendingContext = baseDirectiveContext({ sessionId: 777 }); const resolve = jest.fn(); (trackDestination as any).pendingWorkerRequests.set('1', { context: pendingContext, resolve }); mockWorker.onmessage?.({ data: { type: 'complete', id: '1', skipCode: '4004' } } as MessageEvent); expect((trackDestination as any).killedSessions.has(777)).toBe(true); expect(resolve).toHaveBeenCalled(); }); test('worker complete message with no skipCode (error path) does not apply any directive', () => { const mockWorker = { postMessage: jest.fn(), terminate: jest.fn(), onerror: null as ((e: ErrorEvent) => void) | null, onmessage: null as ((e: MessageEvent) => void) | null, }; global.Worker = jest.fn(() => mockWorker) as unknown as typeof Worker; global.URL.createObjectURL = jest.fn().mockReturnValue('blob:mock'); const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); (trackDestination as any).flushPauseUntilMs = Date.now() + 60_000; const pauseBefore = (trackDestination as any).flushPauseUntilMs; const pendingContext = baseDirectiveContext(); (trackDestination as any).pendingWorkerRequests.set('1', { context: pendingContext, resolve: jest.fn() }); // skipCode is omitted entirely (the worker only sends it on a 2xx). mockWorker.onmessage?.({ data: { type: 'complete', id: '1' } } as MessageEvent); // No reset, no kill — pause stays as it was. expect((trackDestination as any).flushPauseUntilMs).toBe(pauseBefore); expect((trackDestination as any).killedSessions.size).toBe(0); }); test('once a session is killed, in-flight contexts already snapshotted by flush() are dropped before fetch', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); // First batch returns 4005 — kill arrives mid-flush. mockFetchWithHeader(200, '4005'); // Pre-load three queued batches for the same session. flush() will snapshot all three // and iterate them; the first send() triggers the kill, and the next two should be // dropped without firing fetch. trackDestination.queue = [ baseDirectiveContext({ sessionId: 555 }), baseDirectiveContext({ sessionId: 555 }), baseDirectiveContext({ sessionId: 555 }), ]; await trackDestination.flush(true); expect(global.fetch).toHaveBeenCalledTimes(1); expect((trackDestination as any).killedSessions.has(555)).toBe(true); }); test('throttle pause clears on the next clean 200 and a fresh schedule uses no pause', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); // First send: 200 + throttled. mockFetchWithHeader(200, '429'); jest.setSystemTime(5_000_000); await trackDestination.send(baseDirectiveContext(), true); expect((trackDestination as any).flushPauseUntilMs).toBe(5_000_000 + 60_000); // While paused, scheduling honors the remaining pause. const setTimeoutSpy = jest.spyOn(global, 'setTimeout'); trackDestination.schedule(0); expect(setTimeoutSpy.mock.calls[0][1]).toBe(60_000); setTimeoutSpy.mockClear(); // Clear the pending schedule before continuing the e2e flow. clearTimeout((trackDestination as any).scheduled); (trackDestination as any).scheduled = null; // Advance past the pause; next response is a clean 200. jest.setSystemTime(5_000_000 + 61_000); mockFetchWithHeader(200, null); await trackDestination.send(baseDirectiveContext(), true); expect((trackDestination as any).flushPauseUntilMs).toBe(0); // A fresh schedule call now uses the requested timeout, with no pause carry-over. trackDestination.schedule(500); expect(setTimeoutSpy.mock.calls[0][1]).toBe(500); }); test('throttle log fires once per pause-state transition, not per response', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); jest.setSystemTime(7_000_000); mockFetchWithHeader(200, '429'); mockFetchWithHeader(200, '429'); mockFetchWithHeader(200, '429'); await trackDestination.send(baseDirectiveContext(), true); // Re-throttle within the pause window — should not log again. jest.setSystemTime(7_000_000 + 1_000); await trackDestination.send(baseDirectiveContext(), true); jest.setSystemTime(7_000_000 + 2_000); await trackDestination.send(baseDirectiveContext(), true); const throttleLogs = (mockLoggerProvider.log as jest.Mock).mock.calls.filter( (c) => typeof c[0] === 'string' && c[0].includes('throttled by server'), ); expect(throttleLogs).toHaveLength(1); }); test('killedSessions is bounded — oldest entry is evicted when cap is exceeded', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); // Drive far past any reasonable cap and assert the eviction invariant // (size doesn't grow unbounded; oldest dropped, newest retained). const drives = 1000; for (let i = 0; i < drives; i++) { (trackDestination as any).killSession(i, '4005'); } const finalSize = (trackDestination as any).killedSessions.size as number; expect(finalSize).toBeLessThan(drives); // The very first session (id 0) was the oldest and got evicted long before we finished. expect((trackDestination as any).killedSessions.has(0)).toBe(false); // And the most recent kill is retained. expect((trackDestination as any).killedSessions.has(drives - 1)).toBe(true); }); test('non-2xx response on main thread does not invoke any directive', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); (trackDestination as any).flushPauseUntilMs = 1_500_000; // Server returns 500 — applyServerDirective must not be called for non-2xx. (global.fetch as jest.Mock).mockResolvedValueOnce({ status: 500, headers: { get: jest.fn().mockReturnValue(null) }, }); const applySpy = jest.spyOn(trackDestination as any, 'applyServerDirective'); // useRetry=false so the call returns without recursion await trackDestination.send(baseDirectiveContext(), false); expect(applySpy).not.toHaveBeenCalled(); // Pause stays as it was. expect((trackDestination as any).flushPauseUntilMs).toBe(1_500_000); }); }); describe('worker support', () => { const mockContext = { events: [mockEventString], sessionId: 123, apiKey, attempts: 0, timeout: 0, deviceId: '1a2b3c', sampleRate: 1, serverZone: ServerZone.US, type: 'replay' as const, flushMaxRetries: 2, onComplete: jest.fn(), }; let mockWorker: { postMessage: jest.Mock; terminate: jest.Mock; onerror: ((e: ErrorEvent) => void) | null; onmessage: ((e: MessageEvent) => void) | null; }; let originalBlob: typeof Blob; beforeEach(() => { mockWorker = { postMessage: jest.fn(), terminate: jest.fn(), onerror: null, onmessage: null, }; global.Worker = jest.fn(() => mockWorker) as unknown as typeof Worker; global.URL.createObjectURL = jest.fn().mockReturnValue('blob:mock'); originalBlob = global.Blob; global.Blob = jest.fn((parts) => ({ size: (parts as string[]).join('').length })) as unknown as typeof Blob; }); afterEach(() => { global.Blob = originalBlob; }); test('constructor initializes worker from workerScript', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); expect(global.Worker).toHaveBeenCalledTimes(1); expect((trackDestination as any).worker).toBeDefined(); }); test('constructor falls back gracefully when Worker constructor throws', () => { global.Worker = jest.fn(() => { throw new Error('Worker not supported'); }) as unknown as typeof Worker; const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.error).toHaveBeenCalledWith( expect.stringContaining('Failed to create track destination worker'), expect.any(Error), ); expect((trackDestination as any).worker).toBeUndefined(); }); test('worker onerror clears worker and resolves pending requests', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); // Inject a fake pending request const resolve = jest.fn(); (trackDestination as any).pendingWorkerRequests.set('1', { context: mockContext, resolve }); // Trigger onerror const errorEvent = { preventDefault: jest.fn(), message: 'test error', filename: 'blob:test', lineno: 1, } as unknown as ErrorEvent; mockWorker.onerror?.(errorEvent); // eslint-disable-next-line @typescript-eslint/unbound-method expect(errorEvent.preventDefault).toHaveBeenCalled(); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.error).toHaveBeenCalledWith(expect.stringContaining('Track destination worker failed')); // onComplete must NOT be called — events were never delivered and must remain in // the store for recovery by sendStoredEvents on next init expect(mockContext.onComplete).not.toHaveBeenCalled(); // warn should be emitted per pending request // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalledWith( expect.stringContaining('Session replay event send failed due to worker crash'), ); expect(resolve).toHaveBeenCalled(); expect((trackDestination as any).worker).toBeUndefined(); expect((trackDestination as any).pendingWorkerRequests.size).toBe(0); }); test('worker onmessage logs for log type', () => { new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); mockWorker.onmessage?.({ data: { type: 'log', id: '1', message: 'test log' } } as MessageEvent); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.log).toHaveBeenCalledWith('test log'); }); test('worker onmessage warns for warn type', () => { new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); mockWorker.onmessage?.({ data: { type: 'warn', id: '1', message: 'test warn' } } as MessageEvent); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalledWith('test warn'); }); test('worker onmessage handles payload_too_large by invoking handlePayloadTooLargeResponse', () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); const handleSpy = jest.spyOn(trackDestination, 'handlePayloadTooLargeResponse').mockReturnValueOnce(undefined); const resolve = jest.fn(); (trackDestination as any).pendingWorkerRequests.set('1', { context: mockContext, resolve }); mockWorker.onmessage?.({ data: { type: 'payload_too_large', id: '1', isWaf: false } } as MessageEvent); expect(handleSpy).toHaveBeenCalledWith(mockContext, false); expect(resolve).toHaveBeenCalled(); expect((trackDestination as any).pendingWorkerRequests.size).toBe(0); }); test('worker onmessage completes request for complete type', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); const resolve = jest.fn(); (trackDestination as any).pendingWorkerRequests.set('1', { context: mockContext, resolve }); mockWorker.onmessage?.({ data: { type: 'complete', id: '1' } } as MessageEvent); expect(resolve).toHaveBeenCalled(); expect((trackDestination as any).pendingWorkerRequests.size).toBe(0); }); test('send routes to worker when worker is present', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); const sendPromise = trackDestination.send(mockContext, false); // Simulate worker completing immediately const pendingEntries = [...(trackDestination as any).pendingWorkerRequests.entries()]; expect(pendingEntries).toHaveLength(1); const [id] = pendingEntries[0] as [string, { resolve: () => void }]; mockWorker.onmessage?.({ data: { type: 'complete', id } } as MessageEvent); await sendPromise; expect(mockWorker.postMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'send' })); }); test('send via worker uses 0 when flushMaxRetries is undefined', async () => { const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider, workerScript: 'self.onmessage = () => {}', }); const contextWithoutRetries = { ...mockContext, flushMaxRetries: undefined as unknown as number }; const sendPromise = trackDestination.send(contextWithoutRetries, false); const pendingEntries = [...(trackDestination as any).pendingWorkerRequests.entries()]; const [id] = pendingEntries[0] as [string, { resolve: () => void }]; mockWorker.onmessage?.({ data: { type: 'complete', id } } as MessageEvent); await sendPromise; const postedMessage = mockWorker.postMessage.mock.calls[0][0] as Record; expect((postedMessage.context as Record).flushMaxRetries).toBe(0); }); }); describe('sendBeacon', () => { const beaconArgs = { sessionId: 123, deviceId: 'device-abc', apiKey: 'key-abc', serverZone: 'US' as keyof typeof ServerZone, }; test('calls sendBeacon with serialized payload', () => { const mockSendBeacon = jest.fn().mockReturnValue(true); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); const events = ['e1', 'e2']; trackDestination.sendBeacon({ ...beaconArgs, events }); expect(mockSendBeacon).toHaveBeenCalledWith( expect.stringContaining('device_id=device-abc'), expect.objectContaining({ type: 'application/json' }), ); }); test('warns when sendBeacon returns false', () => { const mockSendBeacon = jest.fn().mockReturnValue(false); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); trackDestination.sendBeacon({ ...beaconArgs, events: ['e1'] }); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalledWith('sendBeacon failed to queue session replay payload'); }); test('trims events and warns when payload exceeds 64 KB', () => { const mockSendBeacon = jest.fn().mockReturnValue(true); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); // Create events large enough that many together exceed 64 KB const bigEvent = 'x'.repeat(2000); const events = Array.from({ length: 50 }, () => bigEvent); // ~100 KB total const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); trackDestination.sendBeacon({ ...beaconArgs, events }); // eslint-disable-next-line @typescript-eslint/unbound-method expect(mockLoggerProvider.warn).toHaveBeenCalledWith( expect.stringMatching(/sendBeacon payload exceeded 64 KB limit, trimmed from 50 to \d+ events/), ); // Sent payload must be within beacon limit and have correct content type const sentPayload = mockSendBeacon.mock.calls[0][1] as Blob; expect(sentPayload.size).toBeLessThanOrEqual(64 * 1024); expect(sentPayload.type).toBe('application/json'); }); test('does not call sendBeacon when all events are too large to fit', () => { const mockSendBeacon = jest.fn().mockReturnValue(true); jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue({ navigator: { sendBeacon: mockSendBeacon }, } as unknown as typeof globalThis); // A single event larger than 64 KB const hugeEvent = 'x'.repeat(65 * 1024); const trackDestination = new SessionReplayTrackDestination({ loggerProvider: mockLoggerProvider }); trackDestination.sendBeacon({ ...beaconArgs, events: [hugeEvent] }); expect(mockSendBeacon).not.toHaveBeenCalled(); }); }); }); ================================================ FILE: packages/session-replay-browser/test/tsconfig.json ================================================ { "extends": "../tsconfig.json", "include": ["**/*"], "compilerOptions": { "types": ["jest", "node"] } } ================================================ FILE: packages/session-replay-browser/test/url-tracking-plugin.test.ts ================================================ import { createUrlTrackingPlugin, subscribeToUrlChanges, URLTrackingPluginOptions, } from '../src/plugins/url-tracking-plugin'; import * as AnalyticsCore from '@amplitude/analytics-core'; import * as Helpers from '../src/helpers'; import { IWindow } from '@amplitude/rrweb-types'; jest.mock('../src/helpers', () => ({ getPageUrl: jest.fn(), })); // Mock interface representing the global scope (window) for testing interface MockGlobalScope { history?: { pushState: jest.Mock; replaceState: jest.Mock; }; location?: { href?: string; } | null; document?: { title?: string; } | null; addEventListener: jest.Mock void]>; removeEventListener: jest.Mock; setInterval: jest.Mock void, number]>; clearInterval: jest.Mock; innerHeight: number; innerWidth: number; } // Helper functions for creating test data const createMockUgcFilterRules = () => [ { selector: 'test', replacement: 'filtered' }, { selector: '/test/', replacement: 'filtered' }, ]; // Factory function to create a mock global scope with sensible defaults const createMockGlobalScope = (overrides: Partial = {}): MockGlobalScope => ({ history: { pushState: jest.fn(), replaceState: jest.fn(), }, location: { href: 'https://example.com/initial', }, document: { title: 'Initial Page', }, addEventListener: jest.fn() as jest.Mock void]>, removeEventListener: jest.fn(), setInterval: jest.fn().mockReturnValue(123) as jest.Mock void, number]>, clearInterval: jest.fn(), innerHeight: 768, innerWidth: 1024, ...overrides, }); describe('URL Tracking Plugin', () => { let mockCallback: jest.MockedFunction<(...args: unknown[]) => void>; let mockGlobalScope: MockGlobalScope; // Helper function to call the plugin's observer and return cleanup function const callObserver = ( plugin: ReturnType, globalScope: MockGlobalScope | undefined, ) => { if (!plugin.observer || !globalScope) return () => { // No cleanup needed }; return plugin.observer(mockCallback, globalScope as unknown as IWindow, {}); }; beforeEach(() => { // Use fake timers for testing intervals and timeouts jest.useFakeTimers(); mockCallback = jest.fn(); mockGlobalScope = createMockGlobalScope(); // Mock the global scope to return our test mock jest.spyOn(AnalyticsCore, 'getGlobalScope').mockReturnValue(mockGlobalScope as unknown as typeof globalThis); // Mock getPageUrl to return the URL as-is (no filtering by default) (Helpers.getPageUrl as jest.Mock).mockImplementation((url: string) => url); }); afterEach(() => { jest.useRealTimers(); jest.restoreAllMocks(); (Helpers.getPageUrl as jest.Mock).mockClear(); }); describe('subscribeToUrlChanges', () => { test('returns no-op cleanup when globalScope is undefined', () => { const cb = jest.fn(); const unsubscribe = subscribeToUrlChanges(undefined, cb); expect(typeof unsubscribe).toBe('function'); expect(() => unsubscribe()).not.toThrow(); expect(cb).not.toHaveBeenCalled(); }); test('returns no-op cleanup when globalScope has no location and cleanup is callable', () => { const cb = jest.fn(); const scopeNoLocation = createMockGlobalScope({ location: undefined as any }) as unknown as Window; const unsubscribe = subscribeToUrlChanges(scopeNoLocation, cb); expect(typeof unsubscribe).toBe('function'); expect(() => unsubscribe()).not.toThrow(); expect(cb).not.toHaveBeenCalled(); }); test('invokes callback on pushState with new URL and teardown on unsubscribe', () => { const cb = jest.fn(); const win = createMockGlobalScope() as unknown as Window; const unsubscribe = subscribeToUrlChanges(win, cb); expect(cb).not.toHaveBeenCalled(); if (win.location) { win.location.href = 'https://example.com/page1'; } win.history.pushState({}, '', 'https://example.com/page1'); expect(cb).toHaveBeenCalledWith('https://example.com/page1'); unsubscribe(); cb.mockClear(); if (win.location) { win.location.href = 'https://example.com/page2'; } win.history.pushState({}, '', 'https://example.com/page2'); expect(cb).not.toHaveBeenCalled(); }); test('does not re-wrap history across unsubscribe and re-subscribe cycles', () => { const cb1 = jest.fn(); const cb2 = jest.fn(); const win = createMockGlobalScope() as unknown as Window; const history = win.history; const unsubscribe1 = subscribeToUrlChanges(win, cb1); const firstPatchedPushState = Reflect.get(history, 'pushState'); const firstPatchedReplaceState = Reflect.get(history, 'replaceState'); unsubscribe1(); const unsubscribe2 = subscribeToUrlChanges(win, cb2); expect(Reflect.get(history, 'pushState')).toBe(firstPatchedPushState); expect(Reflect.get(history, 'replaceState')).toBe(firstPatchedReplaceState); if (win.location) { win.location.href = 'https://example.com/resubscribed'; } history.pushState({}, '', 'https://example.com/resubscribed'); expect(cb2).toHaveBeenCalledTimes(1); expect(cb2).toHaveBeenCalledWith('https://example.com/resubscribed'); unsubscribe2(); }); test('resolves relative pushState URL to absolute href and dedupes subsequent popstate', () => { const cb = jest.fn(); const scope = createMockGlobalScope(); scope.history = { pushState: jest.fn((_state: unknown, _title: string, url?: string | URL | null) => { if (scope.location && url != null) { scope.location.href = new URL(String(url), scope.location.href).href; } }), replaceState: jest.fn((_state: unknown, _title: string, url?: string | URL | null) => { if (scope.location && url != null) { scope.location.href = new URL(String(url), scope.location.href).href; } }), }; const win = scope as unknown as Window; subscribeToUrlChanges(win, cb); win.history.pushState({}, '', '/page2'); expect(cb).toHaveBeenCalledWith('https://example.com/page2'); expect(cb).toHaveBeenCalledTimes(1); const [, popstateListener] = (win.addEventListener as jest.Mock).mock.calls.find( (c: [string]) => c[0] === 'popstate', ) ?? [undefined, undefined]; popstateListener?.(); // No duplicate notification because lastHref is stored as absolute href. expect(cb).toHaveBeenCalledTimes(1); }); test('invokes callback on pushState with null url uses getHref', () => { const cb = jest.fn(); const win = createMockGlobalScope() as unknown as Window; subscribeToUrlChanges(win, cb); win.history.pushState({}, '', null as unknown as string); expect(cb).toHaveBeenCalledWith('https://example.com/initial'); }); test('invokes callback on replaceState', () => { const cb = jest.fn(); const win = createMockGlobalScope() as unknown as Window; subscribeToUrlChanges(win, cb); if (win.location) { win.location.href = 'https://example.com/replaced'; } win.history.replaceState({}, '', 'https://example.com/replaced'); expect(cb).toHaveBeenCalledWith('https://example.com/replaced'); }); test('replaceState with null url invokes callback with getHref', () => { const cb = jest.fn(); const win = createMockGlobalScope() as unknown as Window; subscribeToUrlChanges(win, cb); win.history.replaceState({}, '', null as unknown as string); expect(cb).toHaveBeenCalledWith('https://example.com/initial'); }); test('invokes callback on popstate/hashchange with current location.href', () => { const cb = jest.fn(); const win = createMockGlobalScope() as unknown as Window; subscribeToUrlChanges(win, cb); const [, popstateListener] = (win.addEventListener as jest.Mock).mock.calls.find( (c: [string]) => c[0] === 'popstate', ) ?? [undefined, undefined]; expect(popstateListener).toBeDefined(); popstateListener?.(); expect(cb).toHaveBeenCalledWith('https://example.com/initial'); expect(cb).toHaveBeenCalledTimes(1); // Same href is deduped, so a second trigger does not call again popstateListener?.(); expect(cb).toHaveBeenCalledTimes(1); }); test('uses polling when enablePolling option is true and cleanup clears interval', () => { const cb = jest.fn(); const win = createMockGlobalScope() as unknown as Window; const cleanup = subscribeToUrlChanges(win, cb, { enablePolling: true, pollingInterval: 1000, }); const setIntervalMock = Reflect.get(win, 'setInterval') as jest.Mock; expect(setIntervalMock).toHaveBeenCalledWith(expect.any(Function), 1000); const tick = setIntervalMock.mock.calls[0][0] as (this: void) => void; tick.call(undefined); expect(cb).not.toHaveBeenCalled(); if (win.location) { win.location.href = 'https://example.com/changed-by-polling'; } tick.call(undefined); expect(cb).toHaveBeenCalledWith('https://example.com/changed-by-polling'); (cleanup as (this: void) => void).call(undefined); expect(Reflect.get(win, 'clearInterval')).toHaveBeenCalledWith(123); }); test('polling dedupes repeated ticks when href is unchanged', () => { const cb = jest.fn(); const win = createMockGlobalScope() as unknown as Window; subscribeToUrlChanges(win, cb, { enablePolling: true, pollingInterval: 1000, }); const setIntervalMock = Reflect.get(win, 'setInterval') as jest.Mock; const tick = setIntervalMock.mock.calls[0][0] as (this: void) => void; tick.call(undefined); tick.call(undefined); expect(cb).not.toHaveBeenCalled(); if (win.location) { win.location.href = 'https://example.com/changed'; } tick.call(undefined); expect(cb).toHaveBeenCalledTimes(1); expect(cb).toHaveBeenCalledWith('https://example.com/changed'); tick.call(undefined); expect(cb).toHaveBeenCalledTimes(1); }); test('polling cleanup does not call clearInterval when interval id is null', () => { const cb = jest.fn(); const win = createMockGlobalScope() as unknown as Window; (Reflect.get(win, 'setInterval') as jest.Mock).mockReturnValue(null); const cleanup = subscribeToUrlChanges(win, cb, { enablePolling: true, pollingInterval: 1000, }); (cleanup as (this: void) => void).call(undefined); expect(Reflect.get(win, 'clearInterval')).not.toHaveBeenCalled(); }); test('polling getHref returns empty string when href is removed', () => { const cb = jest.fn(); const win = createMockGlobalScope() as unknown as Window; const cleanup = subscribeToUrlChanges(win, cb, { enablePolling: true, pollingInterval: 1000, }); const setIntervalMock = Reflect.get(win, 'setInterval') as jest.Mock; const tick = setIntervalMock.mock.calls[0][0] as (this: void) => void; if (win.location) { (win.location as unknown as { href?: string }).href = undefined; } tick.call(undefined); expect(cb).toHaveBeenCalledWith(''); (cleanup as (this: void) => void).call(undefined); }); test('adds second subscriber to same scope and notifies both', () => { const cb1 = jest.fn(); const cb2 = jest.fn(); const win = createMockGlobalScope() as unknown as Window; subscribeToUrlChanges(win, cb1); subscribeToUrlChanges(win, cb2); if (win.location) { win.location.href = 'https://example.com/page1'; } const history = Reflect.get(win, 'history') as | { pushState: (state: unknown, title: string, url?: string) => void } | undefined; history?.pushState.call(history, {}, '', 'https://example.com/page1'); expect(cb1).toHaveBeenCalledWith('https://example.com/page1'); expect(cb2).toHaveBeenCalledWith('https://example.com/page1'); }); test('notifies via popstate when history or pushState/replaceState is missing', () => { const cb = jest.fn(); const win = createMockGlobalScope({ history: undefined }) as unknown as Window; subscribeToUrlChanges(win, cb); const [, popstateListener] = (win.addEventListener as jest.Mock).mock.calls.find( (c: [string]) => c[0] === 'popstate', ) ?? [undefined, undefined]; expect(popstateListener).toBeDefined(); popstateListener?.(); expect(cb).toHaveBeenCalledWith('https://example.com/initial'); }); test('getHref uses empty string when location has no href (event-based path)', () => { const cb = jest.fn(); const win = createMockGlobalScope({ location: {} as any }) as unknown as Window; subscribeToUrlChanges(win, cb); const [, popstateListener] = (win.addEventListener as jest.Mock).mock.calls.find( (c: [string]) => c[0] === 'popstate', ) ?? [undefined, undefined]; popstateListener?.(); expect(cb).toHaveBeenCalledWith(''); }); }); describe('plugin creation', () => { test('should create plugin with default options', () => { const plugin = createUrlTrackingPlugin(); expect(plugin).toBeDefined(); expect(plugin.name).toBe('amplitude/url-tracking@1'); expect(plugin.observer).toBeDefined(); expect(plugin.options).toEqual({}); }); test('should create plugin with custom options', () => { const options: URLTrackingPluginOptions = { ugcFilterRules: createMockUgcFilterRules(), enablePolling: true, pollingInterval: 2000, captureDocumentTitle: false, }; const plugin = createUrlTrackingPlugin(options); expect(plugin.options).toEqual(options); }); }); describe('observer', () => { test('should emit initial URL and return cleanup function', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/initial', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); expect(typeof cleanup).toBe('function'); cleanup(); }); test('should stop tracking when cleanup is called', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); cleanup(); mockGlobalScope.history?.pushState({}, '', '/after-cleanup'); expect(mockCallback).not.toHaveBeenCalled(); }); }); describe('History API + Hash routing mode (scenario 2)', () => { test('should detect URL changes via pushState', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL and title change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/new-page'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'New Page'; // Trigger pushState which should be patched by the plugin mockGlobalScope.history?.pushState({}, '', '/new-page'); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/new-page', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should detect URL changes via replaceState', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL and title change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/replaced-page'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'Replaced Page'; // Trigger replaceState which should be patched by the plugin mockGlobalScope.history?.replaceState({}, '', '/replaced-page'); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/replaced-page', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should detect URL changes via popstate event', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL and title change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/back-page'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'Back Page'; // Find and trigger the popstate event listener that was registered by the plugin const popstateCall = mockGlobalScope.addEventListener.mock.calls.find(([event]) => event === 'popstate'); const popstateListener = popstateCall?.[1]; if (popstateListener) popstateListener(); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/back-page', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should not emit duplicate URL changes', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Try to navigate to the same URL - should not trigger callback mockGlobalScope.history?.pushState({}, '', '/initial'); expect(mockCallback).not.toHaveBeenCalled(); cleanup(); }); test('should include viewport dimensions in URL change events', () => { // Update viewport dimensions mockGlobalScope.innerHeight = 600; mockGlobalScope.innerWidth = 800; const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/viewport-test'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'Viewport Test'; mockGlobalScope.history?.pushState({}, '', '/viewport-test'); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/viewport-test', title: '', // Default behavior: no document title capture viewportHeight: 600, viewportWidth: 800, type: 'url-change-event', }); cleanup(); }); }); describe('hash routing detection (scenario 2)', () => { test('should detect URL changes via hashchange event', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL and title change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/page#new-hash'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'Hash Page'; // Find and trigger the hashchange event listener that was registered by the plugin const hashchangeCall = mockGlobalScope.addEventListener.mock.calls.find(([event]) => event === 'hashchange'); const hashchangeListener = hashchangeCall?.[1]; if (hashchangeListener) hashchangeListener(); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/page#new-hash', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should detect hash changes with document title capture enabled', () => { const plugin = createUrlTrackingPlugin({ captureDocumentTitle: true }); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL and title change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/page#new-hash'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'Hash Page'; // Find and trigger the hashchange event listener const hashchangeCall = mockGlobalScope.addEventListener.mock.calls.find(([event]) => event === 'hashchange'); const hashchangeListener = hashchangeCall?.[1]; if (hashchangeListener) hashchangeListener(); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/page#new-hash', title: 'Hash Page', // Document title captured when enabled viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should not emit duplicate hash changes', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Find the hashchange event listener const hashchangeCall = mockGlobalScope.addEventListener.mock.calls.find(([event]) => event === 'hashchange'); const hashchangeListener = hashchangeCall?.[1]; expect(hashchangeListener).toBeDefined(); // Trigger hashchange with same URL - should not trigger callback if (hashchangeListener) { hashchangeListener(); } expect(mockCallback).not.toHaveBeenCalled(); cleanup(); }); test('should handle hash changes in fallback mode (no history API)', () => { const scope = createMockGlobalScope({ history: undefined }); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); mockCallback.mockClear(); // Simulate URL change if (scope.location) scope.location.href = 'https://example.com/page#fallback-hash'; if (scope.document) scope.document.title = 'Fallback Hash'; // Find and trigger the hashchange event listener const hashchangeCall = scope.addEventListener.mock.calls.find(([event]) => event === 'hashchange'); const hashchangeListener = hashchangeCall?.[1]; if (hashchangeListener) hashchangeListener(); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/page#fallback-hash', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should not add hashchange listener in polling mode', () => { const plugin = createUrlTrackingPlugin({ enablePolling: true }); const cleanup = callObserver(plugin, mockGlobalScope); // Verify that hashchange event listener was not added in polling mode (polling covers everything) const hashchangeCall = mockGlobalScope.addEventListener.mock.calls.find(([event]) => event === 'hashchange'); expect(hashchangeCall).toBeUndefined(); cleanup(); }); }); describe('hash routing only mode (scenario 3)', () => { test('should handle hash changes when no history API available', () => { const scope = createMockGlobalScope({ history: undefined }); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); mockCallback.mockClear(); // Simulate URL change if (scope.location) scope.location.href = 'https://example.com/page#hash-only'; if (scope.document) scope.document.title = 'Hash Only'; // Find and trigger the hashchange event listener const hashchangeCall = scope.addEventListener.mock.calls.find(([event]) => event === 'hashchange'); const hashchangeListener = hashchangeCall?.[1]; expect(hashchangeListener).toBeDefined(); if (hashchangeListener) { hashchangeListener(); } expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/page#hash-only', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should emit initial URL in hash routing only mode', () => { const scope = createMockGlobalScope({ history: undefined }); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); // Should emit initial URL even when history API is not available expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/initial', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should clean up hashchange listener in hash routing only mode', () => { const scope = createMockGlobalScope({ history: undefined }); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); cleanup(); // Should remove hashchange event listener on cleanup expect(scope.removeEventListener).toHaveBeenCalledWith('hashchange', expect.any(Function)); }); }); describe('document title capture', () => { test('should not capture document title by default', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/initial', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should capture document title when explicitly enabled', () => { const plugin = createUrlTrackingPlugin({ captureDocumentTitle: true }); const cleanup = callObserver(plugin, mockGlobalScope); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/initial', title: 'Initial Page', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should not capture document title on URL changes by default', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL and title change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/new-page'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'New Page'; // Trigger pushState which should be patched by the plugin mockGlobalScope.history?.pushState({}, '', '/new-page'); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/new-page', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should capture document title on URL changes when explicitly enabled', () => { const plugin = createUrlTrackingPlugin({ captureDocumentTitle: true }); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL and title change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/new-page'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'New Page'; // Trigger pushState which should be patched by the plugin mockGlobalScope.history?.pushState({}, '', '/new-page'); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/new-page', title: 'New Page', // Document title captured when enabled viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); }); describe('UGC filtering', () => { test('should apply UGC filtering when rules are provided', () => { // Mock getPageUrl to return a filtered URL (Helpers.getPageUrl as jest.Mock).mockReturnValue('https://example.com/filtered'); const plugin = createUrlTrackingPlugin({ ugcFilterRules: createMockUgcFilterRules() }); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate navigation to a sensitive URL if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/sensitive'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'Sensitive'; mockGlobalScope.history?.pushState({}, '', '/sensitive'); // Verify that getPageUrl was called with the filtering rules expect(Helpers.getPageUrl).toHaveBeenCalledWith('https://example.com/sensitive', createMockUgcFilterRules()); // Verify that the filtered URL was emitted expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/filtered', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should not apply filtering when no rules are provided', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate navigation to a URL if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/no-filtering'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'No Filtering'; mockGlobalScope.history?.pushState({}, '', '/no-filtering'); // Verify that getPageUrl was not called (no filtering rules) expect(Helpers.getPageUrl).not.toHaveBeenCalled(); // Verify that the original URL was emitted expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/no-filtering', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); }); describe('polling mode (scenario 1)', () => { test('should enable polling when explicitly configured', () => { const plugin = createUrlTrackingPlugin({ enablePolling: true }); const cleanup = callObserver(plugin, mockGlobalScope); // Verify that setInterval was called with the default polling interval expect(mockGlobalScope.setInterval).toHaveBeenCalledWith(expect.any(Function), 1000); cleanup(); }); test('should use custom polling interval when specified', () => { const plugin = createUrlTrackingPlugin({ enablePolling: true, pollingInterval: 2000 }); const cleanup = callObserver(plugin, mockGlobalScope); // Verify that setInterval was called with the custom polling interval expect(mockGlobalScope.setInterval).toHaveBeenCalledWith(expect.any(Function), 2000); cleanup(); }); test('should detect URL changes via polling', () => { const plugin = createUrlTrackingPlugin({ enablePolling: true }); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/polled'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'Polled'; // Get the polling function and execute it manually const pollingFunction = mockGlobalScope.setInterval.mock.calls[0]?.[0]; pollingFunction(); // Verify that the URL change was detected via polling expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/polled', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should clear polling interval on cleanup', () => { const plugin = createUrlTrackingPlugin({ enablePolling: true }); const cleanup = callObserver(plugin, mockGlobalScope); cleanup(); // Verify that the polling interval was cleared expect(mockGlobalScope.clearInterval).toHaveBeenCalledWith(123); }); test('should handle null polling interval on cleanup', () => { // Mock setInterval to return null mockGlobalScope.setInterval.mockReturnValue(null as unknown as number); const plugin = createUrlTrackingPlugin({ enablePolling: true }); const cleanup = callObserver(plugin, mockGlobalScope); cleanup(); // Should not call clearInterval when interval is null expect(mockGlobalScope.clearInterval).not.toHaveBeenCalled(); }); test('should detect URL changes via polling with document title capture enabled', () => { const plugin = createUrlTrackingPlugin({ enablePolling: true, captureDocumentTitle: true }); const cleanup = callObserver(plugin, mockGlobalScope); mockCallback.mockClear(); // Simulate URL change if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/polled'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'Polled'; // Get the polling function and execute it manually const pollingFunction = mockGlobalScope.setInterval.mock.calls[0]?.[0]; pollingFunction(); // Verify that the URL change was detected via polling with title captured expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/polled', title: 'Polled', // Document title captured when enabled viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); }); describe('error handling', () => { test('should handle missing global scope gracefully', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, undefined); // Should not emit any events when global scope is missing expect(mockCallback).not.toHaveBeenCalled(); expect(typeof cleanup).toBe('function'); cleanup(); }); test('should handle direct observer call with undefined globalScope', () => { const plugin = createUrlTrackingPlugin(); const cleanup = plugin.observer?.(jest.fn(), undefined as unknown as IWindow, {}); // Should return a cleanup function even with undefined global scope expect(typeof cleanup).toBe('function'); if (cleanup) cleanup(); }); // PARAMETERIZED: Location edge cases (missing/null/undefined/empty) test.each([ [{ location: undefined }, 'missing location'], [{ location: null }, 'null location'], [{ location: { href: undefined } }, 'undefined href'], [{ location: { href: null as unknown as string } }, 'null href'], [{ location: { href: '' } }, 'empty string href'], ])('should emit event with empty href for %s', (locationOverride, _label) => { const scope = createMockGlobalScope(locationOverride); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); expect(mockCallback).toHaveBeenCalledWith({ href: '', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should handle missing or null document', () => { const testCases = [ { document: undefined, description: 'undefined document' }, { document: null, description: 'null document' }, ]; testCases.forEach(({ document }) => { const scope = createMockGlobalScope({ document }); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); // Should emit event with empty title when document is missing or null expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/initial', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); mockCallback.mockClear(); }); }); test('should handle document with undefined title', () => { const scope = createMockGlobalScope({ document: { title: undefined } }); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); // Should emit event with empty title when document.title is undefined expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/initial', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should handle missing history gracefully (falls back to scenario 3)', () => { const scope = createMockGlobalScope({ history: undefined }); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); // Should still emit initial URL even when history is missing (scenario 3: hash routing only) expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/initial', title: '', // Default behavior: no document title capture viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); }); // PARAMETERIZED: Document title edge cases describe('document title edge cases', () => { test.each([ [{ document: { title: undefined } }, 'undefined title'], [{ document: { title: null as unknown as string } }, 'null title'], [{ document: { title: '' } }, 'empty string title'], [{ document: undefined }, 'undefined document'], ])('should emit empty title for %s when captureDocumentTitle is true', (docOverride, _label) => { const scope = createMockGlobalScope(docOverride); const plugin = createUrlTrackingPlugin({ captureDocumentTitle: true }); const cleanup = callObserver(plugin, scope); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/initial', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); }); // PARAMETERIZED: Consistency across modes describe('URL consistency and temporal dead zone fixes', () => { test('should handle temporal dead zone correctly - lastTrackedUrl accessible in emitUrlChange', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); // This test verifies that lastTrackedUrl is properly accessible // The fact that we can call emitUrlChange without ReferenceError proves the fix works mockCallback.mockClear(); // Simulate multiple URL changes to test lastTrackedUrl tracking if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/first'; mockGlobalScope.history?.pushState({}, '', '/first'); if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/second'; mockGlobalScope.history?.pushState({}, '', '/second'); // Should emit both URL changes (no temporal dead zone error) expect(mockCallback).toHaveBeenCalledTimes(2); expect(mockCallback).toHaveBeenNthCalledWith(1, { href: 'https://example.com/first', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); expect(mockCallback).toHaveBeenNthCalledWith(2, { href: 'https://example.com/second', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); // PARAMETERIZED: Consistency across modes (undefined/null/empty) test.each([ [undefined, 'undefined'], [null, 'null'], ['', 'empty string'], ])('should handle %s location.href consistently across all modes', (hrefValue, _label) => { const testCases = [{ options: { enablePolling: true } }, { options: {} }, { options: {}, history: undefined }]; testCases.forEach(({ options, history }) => { const scope = createMockGlobalScope({ location: { href: hrefValue as string }, history: history !== undefined ? history : mockGlobalScope.history, }); const plugin = createUrlTrackingPlugin(options); const cleanup = callObserver(plugin, scope); // Should emit event with empty href consistently across all modes expect(mockCallback).toHaveBeenCalledWith({ href: '', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); mockCallback.mockClear(); }); }); test('should handle null location.href consistently across all modes', () => { const testCases = [{ options: { enablePolling: true } }, { options: {} }, { options: {}, history: undefined }]; testCases.forEach(({ options, history }) => { const scope = createMockGlobalScope({ location: { href: null as unknown as string }, history: history !== undefined ? history : mockGlobalScope.history, }); const plugin = createUrlTrackingPlugin(options); const cleanup = callObserver(plugin, scope); // Should emit event with empty href consistently across all modes expect(mockCallback).toHaveBeenCalledWith({ href: '', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); mockCallback.mockClear(); }); }); test('should handle empty string location.href consistently across all modes', () => { const testCases = [{ options: { enablePolling: true } }, { options: {} }, { options: {}, history: undefined }]; testCases.forEach(({ options, history }) => { const scope = createMockGlobalScope({ location: { href: '' }, history: history !== undefined ? history : mockGlobalScope.history, }); const plugin = createUrlTrackingPlugin(options); const cleanup = callObserver(plugin, scope); // Should emit event with empty href consistently across all modes expect(mockCallback).toHaveBeenCalledWith({ href: '', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); mockCallback.mockClear(); }); }); test('should prevent duplicate events when location.href transitions between undefined/empty values', () => { const scope = createMockGlobalScope({ location: { href: undefined } }); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); // Initial call should emit empty href expect(mockCallback).toHaveBeenCalledWith({ href: '', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); mockCallback.mockClear(); // Change to empty string - should not emit duplicate if (scope.location) scope.location.href = ''; scope.history?.pushState({}, '', '/'); // Should not emit duplicate event for same normalized URL expect(mockCallback).not.toHaveBeenCalled(); // Change to actual URL - should emit if (scope.location) scope.location.href = 'https://example.com/actual'; scope.history?.pushState({}, '', '/actual'); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/actual', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); }); test('should handle getCurrentUrl function behavior correctly', () => { const testCases = [ { href: undefined, expected: '' }, { href: null, expected: '' }, { href: '', expected: '' }, { href: 'https://example.com/test', expected: 'https://example.com/test' }, ]; testCases.forEach(({ href, expected }) => { const scope = createMockGlobalScope({ location: { href: href as string } }); const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, scope); // Should emit event with expected href expect(mockCallback).toHaveBeenCalledWith({ href: expected, title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup(); mockCallback.mockClear(); }); }); }); describe('shared subscription (subscribeToUrlChanges)', () => { test('multiple plugin instances share a single history patch', () => { const plugin = createUrlTrackingPlugin(); const cleanup1 = callObserver(plugin, mockGlobalScope); const patchedPushState = mockGlobalScope.history?.pushState; const patchedReplaceState = mockGlobalScope.history?.replaceState; const cleanup2 = callObserver(plugin, mockGlobalScope); expect(mockGlobalScope.history?.pushState).toBe(patchedPushState); expect(mockGlobalScope.history?.replaceState).toBe(patchedReplaceState); cleanup1(); cleanup2(); }); test('multiple plugin instances each receive URL change and share one patch', () => { const scope = createMockGlobalScope() as unknown as MockGlobalScope; const plugin1 = createUrlTrackingPlugin(); const plugin2 = createUrlTrackingPlugin(); const plugin3 = createUrlTrackingPlugin(); const cleanup1 = callObserver(plugin1, scope); const cleanup2 = callObserver(plugin2, scope); const cleanup3 = callObserver(plugin3, scope); expect(scope.history?.pushState).toBeDefined(); mockCallback.mockClear(); // Trigger via popstate listener (subscription notifies all callbacks with current location.href) if (scope.location) scope.location.href = 'https://example.com/multi-instance'; const popstateCalls = (scope.addEventListener as jest.Mock).mock.calls.filter( (c: [string]) => c[0] === 'popstate', ); const popstateListener = popstateCalls[0]?.[1]; expect(popstateListener).toBeDefined(); popstateListener?.(); expect(mockCallback).toHaveBeenCalledTimes(3); expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/multi-instance', title: '', viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup1(); cleanup2(); cleanup3(); }); test('when plugin is the only subscriber, cleanup removes listeners but does not restore history', () => { const plugin = createUrlTrackingPlugin(); const cleanup = callObserver(plugin, mockGlobalScope); const patchedPushState = mockGlobalScope.history?.pushState; const patchedReplaceState = mockGlobalScope.history?.replaceState; cleanup(); // We do not restore history (other scripts may have patched); patch remains expect(mockGlobalScope.history?.pushState).toBe(patchedPushState); expect(mockGlobalScope.history?.replaceState).toBe(patchedReplaceState); expect(mockGlobalScope.removeEventListener).toHaveBeenCalledWith('popstate', expect.any(Function)); expect(mockGlobalScope.removeEventListener).toHaveBeenCalledWith('hashchange', expect.any(Function)); }); test('when another subscriber exists, plugin cleanup leaves patch and listeners in place', () => { const cb = jest.fn(); const unsubscribeTargeting = subscribeToUrlChanges(mockGlobalScope as unknown as Window, cb); const plugin = createUrlTrackingPlugin(); const cleanupPlugin = callObserver(plugin, mockGlobalScope); const patchedPushState = mockGlobalScope.history?.pushState; cleanupPlugin(); expect(mockGlobalScope.history?.pushState).toBe(patchedPushState); cb.mockClear(); if (mockGlobalScope.location) { mockGlobalScope.location.href = 'https://example.com/after-plugin-cleanup'; } if (mockGlobalScope.history?.pushState) { mockGlobalScope.history.pushState({}, '', 'https://example.com/after-plugin-cleanup'); } expect(cb).toHaveBeenCalledWith('https://example.com/after-plugin-cleanup'); unsubscribeTargeting(); }); test('should work correctly with different plugin options', () => { const plugin1 = createUrlTrackingPlugin({ captureDocumentTitle: true }); const plugin2 = createUrlTrackingPlugin({ captureDocumentTitle: false }); const cleanup1 = callObserver(plugin1, mockGlobalScope); // Store first patched methods const firstPatchedPushState = mockGlobalScope.history?.pushState; const cleanup2 = callObserver(plugin2, mockGlobalScope); // Second plugin should detect existing patch and skip expect(mockGlobalScope.history?.pushState).toBe(firstPatchedPushState); // Test that functionality still works mockCallback.mockClear(); if (mockGlobalScope.location) mockGlobalScope.location.href = 'https://example.com/options-test'; if (mockGlobalScope.document) mockGlobalScope.document.title = 'Options Test'; mockGlobalScope.history?.pushState({}, '', '/options-test'); // Should emit event (from the first plugin's configuration) expect(mockCallback).toHaveBeenCalledWith({ href: 'https://example.com/options-test', title: 'Options Test', // First plugin had captureDocumentTitle: true viewportHeight: 768, viewportWidth: 1024, type: 'url-change-event', }); cleanup1(); cleanup2(); }); }); }); ================================================ FILE: packages/session-replay-browser/test/utils/get-input-type.test.ts ================================================ import { getInputType, toLowerCase } from '../../src/utils/get-input-type'; describe('getInputType', () => { beforeEach(() => { // Clear the DOM before each test document.body.innerHTML = ''; }); describe('toLowerCase', () => { test('should convert string to lowercase', () => { expect(toLowerCase('TEXT')).toBe('text'); expect(toLowerCase('Password')).toBe('password'); expect(toLowerCase('EMAIL')).toBe('email'); expect(toLowerCase('MiXeD')).toBe('mixed'); }); test('should handle already lowercase strings', () => { expect(toLowerCase('text')).toBe('text'); expect(toLowerCase('password')).toBe('password'); }); test('should handle empty string', () => { expect(toLowerCase('')).toBe(''); }); }); describe('getInputType', () => { test('should return null for non-input elements without type attribute', () => { const div = document.createElement('div'); expect(getInputType(div)).toBeNull(); }); test('should return "password" for elements with data-rr-is-password attribute', () => { const input = document.createElement('input'); input.type = 'text'; input.setAttribute('data-rr-is-password', ''); expect(getInputType(input)).toBe('password'); }); test('should return "password" for elements with data-rr-is-password attribute regardless of actual type', () => { const input = document.createElement('input'); input.type = 'email'; input.setAttribute('data-rr-is-password', ''); expect(getInputType(input)).toBe('password'); }); test('should return lowercase type for input elements without data-rr-is-password', () => { const input = document.createElement('input'); input.type = 'TEXT'; expect(getInputType(input)).toBe('text'); }); test('should return lowercase type for various input types', () => { const testTypes = ['EMAIL', 'Password', 'Number', 'Tel', 'Url', 'Search']; testTypes.forEach((type) => { const input = document.createElement('input'); input.type = type; expect(getInputType(input)).toBe(type.toLowerCase()); }); }); test('should return "text" for input elements without explicit type (default behavior)', () => { const input = document.createElement('input'); // When no type is specified, HTMLInputElement.type defaults to 'text' expect(getInputType(input)).toBe('text'); }); test('should handle elements that were originally password inputs but changed to text', () => { const input = document.createElement('input'); input.type = 'text'; input.setAttribute('data-rr-is-password', 'true'); // This simulates the case where a password input was changed to text input // but we still want to treat it as password for privacy expect(getInputType(input)).toBe('password'); }); test('should return null for elements without type property', () => { const span = document.createElement('span'); expect(getInputType(span)).toBeNull(); }); test('should handle mixed case types correctly', () => { const input = document.createElement('input'); input.type = 'PaSSworD'; expect(getInputType(input)).toBe('password'); }); test('should prioritize data-rr-is-password over actual type', () => { const input = document.createElement('input'); input.type = 'number'; input.setAttribute('data-rr-is-password', ''); expect(getInputType(input)).toBe('password'); }); test('should handle elements with falsy data-rr-is-password attribute values', () => { const input = document.createElement('input'); input.type = 'text'; input.setAttribute('data-rr-is-password', 'false'); // hasAttribute returns true even if the value is 'false', since the attribute exists expect(getInputType(input)).toBe('password'); }); test('should not treat elements without data-rr-is-password as password', () => { const input = document.createElement('input'); input.type = 'password'; // No data-rr-is-password attribute expect(getInputType(input)).toBe('password'); }); }); }); ================================================ FILE: packages/session-replay-browser/test/utils/is-abort-error.test.ts ================================================ import { logIdbError } from '../../src/utils/is-abort-error'; describe('logIdbError', () => { const mockLogger = { debug: jest.fn(), log: jest.fn(), warn: jest.fn(), error: jest.fn(), enable: jest.fn(), disable: jest.fn(), }; beforeEach(() => jest.clearAllMocks()); test('should log at debug level for AbortError', () => { const abortError = new DOMException('The transaction was aborted', 'AbortError'); logIdbError(mockLogger, 'idb failed', abortError); expect(mockLogger.debug).toHaveBeenCalledWith('idb failed'); expect(mockLogger.warn).not.toHaveBeenCalled(); }); test('should log at debug level for plain object with name AbortError', () => { const abortLike = { name: 'AbortError', message: 'aborted' }; logIdbError(mockLogger, 'idb failed', abortLike); expect(mockLogger.debug).toHaveBeenCalledWith('idb failed'); expect(mockLogger.warn).not.toHaveBeenCalled(); }); test('should log at warn level for non-AbortError', () => { logIdbError(mockLogger, 'idb failed', new Error('something broke')); expect(mockLogger.warn).toHaveBeenCalledWith('idb failed'); expect(mockLogger.debug).not.toHaveBeenCalled(); }); test('should log at warn level when error is undefined', () => { logIdbError(mockLogger, 'idb failed'); expect(mockLogger.warn).toHaveBeenCalledWith('idb failed'); expect(mockLogger.debug).not.toHaveBeenCalled(); }); }); ================================================ FILE: packages/session-replay-browser/test/utils/rrweb.test.ts ================================================ import { getViewportHeight, getViewportWidth } from '../../src/utils/rrweb'; import { getGlobalScope } from '@amplitude/analytics-core'; // Mock the getGlobalScope function jest.mock('@amplitude/analytics-core', () => ({ getGlobalScope: jest.fn(), })); const mockGetGlobalScope = getGlobalScope as jest.MockedFunction; describe('rrweb utils', () => { beforeEach(() => { jest.clearAllMocks(); // Reset document properties Object.defineProperty(document, 'documentElement', { writable: true, value: document.documentElement, }); Object.defineProperty(document, 'body', { writable: true, value: document.body, }); }); describe('getViewportHeight', () => { test('should return globalScope.innerHeight when available', () => { mockGetGlobalScope.mockReturnValue({ innerHeight: 800 } as typeof globalThis); expect(getViewportHeight()).toBe(800); }); test('should return document.documentElement.clientHeight when globalScope is null', () => { mockGetGlobalScope.mockReturnValue(undefined); Object.defineProperty(document, 'documentElement', { value: { clientHeight: 600 }, writable: true, }); expect(getViewportHeight()).toBe(600); }); test('should return document.documentElement.clientHeight when globalScope.innerHeight not available', () => { mockGetGlobalScope.mockReturnValue({} as typeof globalThis); Object.defineProperty(document, 'documentElement', { value: { clientHeight: 600 }, writable: true, }); expect(getViewportHeight()).toBe(600); }); test('should return 0 when documentElement.clientHeight is 0 (not fallback to body.clientHeight)', () => { mockGetGlobalScope.mockReturnValue({} as typeof globalThis); Object.defineProperty(document, 'documentElement', { value: { clientHeight: 0 }, writable: true, }); Object.defineProperty(document, 'body', { value: { clientHeight: 14000 }, writable: true, }); expect(getViewportHeight()).toBe(0); }); test('should return 0 when documentElement.clientHeight not available', () => { mockGetGlobalScope.mockReturnValue({} as typeof globalThis); Object.defineProperty(document, 'documentElement', { value: null, writable: true, }); expect(getViewportHeight()).toBe(0); }); test('should return 0 when no height sources are available', () => { mockGetGlobalScope.mockReturnValue({} as typeof globalThis); Object.defineProperty(document, 'documentElement', { value: null, writable: true, }); Object.defineProperty(document, 'body', { value: null, writable: true, }); expect(getViewportHeight()).toBe(0); }); }); describe('getViewportWidth', () => { test('should return globalScope.innerWidth when available', () => { mockGetGlobalScope.mockReturnValue({ innerWidth: 1200 } as typeof globalThis); expect(getViewportWidth()).toBe(1200); }); test('should return document.documentElement.clientWidth when globalScope is null', () => { mockGetGlobalScope.mockReturnValue(undefined); Object.defineProperty(document, 'documentElement', { value: { clientWidth: 1000 }, writable: true, }); expect(getViewportWidth()).toBe(1000); }); test('should return document.documentElement.clientWidth when globalScope.innerWidth not available', () => { mockGetGlobalScope.mockReturnValue({} as typeof globalThis); Object.defineProperty(document, 'documentElement', { value: { clientWidth: 1000 }, writable: true, }); expect(getViewportWidth()).toBe(1000); }); test('should return 0 when documentElement.clientWidth is 0 (not fallback to body.clientWidth)', () => { mockGetGlobalScope.mockReturnValue({} as typeof globalThis); Object.defineProperty(document, 'documentElement', { value: { clientWidth: 0 }, writable: true, }); Object.defineProperty(document, 'body', { value: { clientWidth: 10000 }, writable: true, }); expect(getViewportWidth()).toBe(0); }); test('should return 0 when documentElement.clientWidth not available', () => { mockGetGlobalScope.mockReturnValue({} as typeof globalThis); Object.defineProperty(document, 'documentElement', { value: null, writable: true, }); expect(getViewportWidth()).toBe(0); }); test('should return 0 when no width sources are available', () => { mockGetGlobalScope.mockReturnValue({} as typeof globalThis); Object.defineProperty(document, 'documentElement', { value: null, writable: true, }); Object.defineProperty(document, 'body', { value: null, writable: true, }); expect(getViewportWidth()).toBe(0); }); }); }); ================================================ FILE: packages/session-replay-browser/test/worker/compression.test.ts ================================================ import { eventWithTime } from '@amplitude/rrweb-types'; import { compressionOnMessage } from '../../src/worker/compression'; describe('compression', () => { test('should serialize event with type and timestamp first', async () => { global.postMessage = jest.fn(); const testEvent: eventWithTime = { timestamp: 1, type: 4, data: { height: 1, width: 1, href: 'http://localhost', }, }; // hack to make typescript not complain (compressionOnMessage as (_: unknown) => void)({ data: { event: testEvent, sessionId: 1234, }, }); // Key ordering: type and timestamp must appear first const expected = JSON.stringify({ type: testEvent.type, timestamp: testEvent.timestamp, data: testEvent.data }); expect(global.postMessage).toHaveBeenCalledWith({ sessionId: 1234, compressedEvent: expected, }); }); test('should include delay field when present', async () => { global.postMessage = jest.fn(); const testEventWithDelay = { timestamp: 1, type: 3, delay: 50, data: { source: 0 }, }; (compressionOnMessage as (_: unknown) => void)({ data: { event: testEventWithDelay, sessionId: 1234, }, }); const expected = JSON.stringify({ type: testEventWithDelay.type, timestamp: testEventWithDelay.timestamp, delay: testEventWithDelay.delay, data: testEventWithDelay.data, }); expect(global.postMessage).toHaveBeenCalledWith({ sessionId: 1234, compressedEvent: expected, }); }); test('should serialize event from JSON string data when DataCloneError fallback is used', async () => { global.postMessage = jest.fn(); const testEvent: eventWithTime = { timestamp: 1, type: 4, data: { height: 1, width: 1, href: 'http://localhost', }, }; // Simulate the actual behavior: JSON.stringify produces a primitive string const jsonData = JSON.stringify({ event: testEvent, sessionId: 5678, }); // Pass the primitive string as e.data (this is what actually happens with JSON.stringify fallback) (compressionOnMessage as (_: unknown) => void)({ data: jsonData, }); const expected = JSON.stringify({ type: testEvent.type, timestamp: testEvent.timestamp, data: testEvent.data }); expect(global.postMessage).toHaveBeenCalledWith({ sessionId: 5678, compressedEvent: expected, }); }); }); ================================================ FILE: packages/session-replay-browser/test/worker/track-destination.test.ts ================================================ import { trackDestinationOnMessage } from '../../src/worker/track-destination'; const SESSION_REPLAY_SERVER_URL = 'https://api-sr.amplitude.com/sessions/v2/track'; type OnMessageHandler = (e: MessageEvent) => Promise; const invokeOnMessage = async (data: Record) => { await (trackDestinationOnMessage as unknown as OnMessageHandler)({ data } as MessageEvent); }; describe('worker/track-destination', () => { let mockFetch: jest.Mock; let mockPostMessage: jest.Mock; beforeEach(() => { mockFetch = jest.fn(); mockPostMessage = jest.fn(); global.fetch = mockFetch; global.postMessage = mockPostMessage; }); afterEach(() => { jest.resetAllMocks(); }); const baseContext = { apiKey: 'test-api-key', deviceId: 'device-123', sessionId: 456, events: ['{"type":3,"timestamp":1}'], eventType: 'replay', flushMaxRetries: 2, sampleRate: 1, currentUrl: 'https://example.com', sdkVersion: '1.0.0', }; const basePayload = { version: 1, events: ['{"type":3,"timestamp":1}'] }; test('ignores messages with unknown type', async () => { await invokeOnMessage({ type: 'unknown', id: '1', payload: basePayload, context: baseContext, useRetry: false }); expect(mockFetch).not.toHaveBeenCalled(); expect(mockPostMessage).not.toHaveBeenCalled(); }); test('sends fetch request and posts complete on success', async () => { mockFetch.mockResolvedValueOnce({ status: 200 }); await invokeOnMessage({ type: 'send', id: '1', payload: basePayload, context: baseContext, useRetry: false }); expect(mockFetch).toHaveBeenCalledTimes(1); const [url, options] = mockFetch.mock.calls[0] as [string, RequestInit]; expect(url).toContain(SESSION_REPLAY_SERVER_URL); expect(url).toContain('device_id=device-123'); expect(url).toContain('session_id=456'); expect(url).toContain('type=replay'); expect((options.headers as Record)['Authorization']).toBe('Bearer test-api-key'); expect(options.method).toBe('POST'); expect(options.keepalive).toBe(true); expect(mockPostMessage).toHaveBeenCalledWith( expect.objectContaining({ type: 'log', id: '1', message: expect.stringContaining('tracked successfully') }), ); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: '1', skipCode: null }); }); test('posts warn and complete on non-retryable failure (4xx)', async () => { mockFetch.mockResolvedValueOnce({ status: 400 }); await invokeOnMessage({ type: 'send', id: '2', payload: basePayload, context: baseContext, useRetry: true }); expect(mockFetch).toHaveBeenCalledTimes(1); expect(mockPostMessage).toHaveBeenCalledWith(expect.objectContaining({ type: 'warn', id: '2' })); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: '2' }); }); test.each([408, 429, 499])('retries on %i and succeeds on second attempt', async (statusCode) => { const realSetTimeout = global.setTimeout; jest .spyOn(global, 'setTimeout') .mockImplementation((fn) => realSetTimeout(fn, 0) as unknown as ReturnType); mockFetch.mockResolvedValueOnce({ status: statusCode }).mockResolvedValueOnce({ status: 200 }); await invokeOnMessage({ type: 'send', id: '3b', payload: basePayload, context: { ...baseContext, flushMaxRetries: 2 }, useRetry: true, }); expect(mockFetch).toHaveBeenCalledTimes(2); expect(mockPostMessage).toHaveBeenCalledWith( expect.objectContaining({ type: 'log', id: '3b', message: expect.stringContaining('tracked successfully') }), ); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: '3b', skipCode: null }); }); test('posts payload_too_large with isWaf=false for app-layer 413', async () => { mockFetch.mockResolvedValueOnce({ status: 413, text: () => Promise.resolve('Payload Too Large') }); await invokeOnMessage({ type: 'send', id: '7', payload: basePayload, context: baseContext, useRetry: true }); expect(mockFetch).toHaveBeenCalledTimes(1); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'payload_too_large', id: '7', isWaf: false }); expect(mockPostMessage).not.toHaveBeenCalledWith(expect.objectContaining({ type: 'complete' })); }); test('posts payload_too_large with isWaf=true for WAF 413', async () => { mockFetch.mockResolvedValueOnce({ status: 413, text: () => Promise.resolve('{"error":"Payload exceeds the maximum allowed size of 10MB"}'), }); await invokeOnMessage({ type: 'send', id: '8', payload: basePayload, context: baseContext, useRetry: true }); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'payload_too_large', id: '8', isWaf: true }); }); test('posts payload_too_large even when body read fails', async () => { mockFetch.mockResolvedValueOnce({ status: 413, text: () => Promise.reject(new Error('stream error')) }); await invokeOnMessage({ type: 'send', id: '9', payload: basePayload, context: baseContext, useRetry: true }); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'payload_too_large', id: '9', isWaf: false }); }); test('uses false for isWaf when result.isWaf is undefined', async () => { // Simulate a response where text() succeeds but body is empty (isWaf will be false via ?? false) mockFetch.mockResolvedValueOnce({ status: 413, text: () => Promise.resolve('') }); await invokeOnMessage({ type: 'send', id: '10', payload: basePayload, context: baseContext, useRetry: true }); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'payload_too_large', id: '10', isWaf: false }); }); test('does not bisect on 413 when useRetry=false', async () => { mockFetch.mockResolvedValueOnce({ status: 413, text: () => Promise.resolve('Payload Too Large') }); await invokeOnMessage({ type: 'send', id: '11', payload: basePayload, context: baseContext, useRetry: false }); expect(mockPostMessage).not.toHaveBeenCalledWith(expect.objectContaining({ type: 'payload_too_large' })); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: '11' }); }); test('retries on 5xx and succeeds on second attempt', async () => { // Use a real timer but patch setTimeout to fire immediately so the test is fast const realSetTimeout = global.setTimeout; jest .spyOn(global, 'setTimeout') .mockImplementation((fn) => realSetTimeout(fn, 0) as unknown as ReturnType); mockFetch.mockResolvedValueOnce({ status: 500 }).mockResolvedValueOnce({ status: 200 }); await invokeOnMessage({ type: 'send', id: '3', payload: basePayload, context: { ...baseContext, flushMaxRetries: 2 }, useRetry: true, }); expect(mockFetch).toHaveBeenCalledTimes(2); expect(mockPostMessage).toHaveBeenCalledWith( expect.objectContaining({ type: 'log', id: '3', message: expect.stringContaining('tracked successfully') }), ); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: '3', skipCode: null }); }); test('posts warn with max retries message when retries exhausted', async () => { const realSetTimeout = global.setTimeout; jest .spyOn(global, 'setTimeout') .mockImplementation((fn) => realSetTimeout(fn, 0) as unknown as ReturnType); mockFetch.mockResolvedValue({ status: 500 }); await invokeOnMessage({ type: 'send', id: '4', payload: basePayload, context: { ...baseContext, flushMaxRetries: 2 }, useRetry: true, }); expect(mockFetch).toHaveBeenCalledTimes(2); expect(mockPostMessage).toHaveBeenCalledWith( expect.objectContaining({ type: 'warn', id: '4', message: 'Session replay event batch rejected due to exceeded retry count', }), ); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: '4' }); }); test('does not retry when useRetry is false', async () => { mockFetch.mockResolvedValueOnce({ status: 500 }); await invokeOnMessage({ type: 'send', id: '5', payload: basePayload, context: { ...baseContext, flushMaxRetries: 5 }, useRetry: false, }); expect(mockFetch).toHaveBeenCalledTimes(1); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: '5' }); }); test('posts warn and complete on fetch network error', async () => { mockFetch.mockRejectedValueOnce(new Error('network failure')); await invokeOnMessage({ type: 'send', id: '6', payload: basePayload, context: baseContext, useRetry: false }); expect(mockPostMessage).toHaveBeenCalledWith( expect.objectContaining({ type: 'warn', id: '6', message: expect.stringContaining('network failure') }), ); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: '6' }); }); test('uses EU server URL when serverZone is EU', async () => { mockFetch.mockResolvedValueOnce({ status: 200 }); await invokeOnMessage({ type: 'send', id: '7', payload: basePayload, context: { ...baseContext, serverZone: 'EU' }, useRetry: false, }); const [url] = mockFetch.mock.calls[0] as [string]; expect(url).toContain('api-sr.eu.amplitude.com'); }); test('uses custom trackServerUrl when provided', async () => { mockFetch.mockResolvedValueOnce({ status: 200 }); await invokeOnMessage({ type: 'send', id: '8', payload: basePayload, context: { ...baseContext, trackServerUrl: 'https://custom.example.com/track' }, useRetry: false, }); const [url] = mockFetch.mock.calls[0] as [string]; expect(url).toContain('https://custom.example.com/track'); }); test('uses staging URL when serverZone is STAGING', async () => { mockFetch.mockResolvedValueOnce({ status: 200 }); await invokeOnMessage({ type: 'send', id: '9', payload: basePayload, context: { ...baseContext, serverZone: 'STAGING' }, useRetry: false, }); const [url] = mockFetch.mock.calls[0] as [string]; expect(url).toContain('api-sr.stag2.amplitude.com'); }); test('includes version library header when version is provided', async () => { mockFetch.mockResolvedValueOnce({ status: 200 }); await invokeOnMessage({ type: 'send', id: '10', payload: basePayload, context: { ...baseContext, version: { type: 'plugin', version: '2.0.0' } }, useRetry: false, }); const [, options] = mockFetch.mock.calls[0] as [string, RequestInit]; expect((options.headers as Record)['X-Client-Library']).toBe('plugin/2.0.0'); }); test('returns null result when fetch returns null', async () => { mockFetch.mockResolvedValueOnce(null); await invokeOnMessage({ type: 'send', id: '11', payload: basePayload, context: baseContext, useRetry: false }); expect(mockPostMessage).toHaveBeenCalledWith( expect.objectContaining({ type: 'warn', id: '11', message: 'Unexpected error occurred' }), ); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: '11' }); }); describe('X-Session-Replay-Event-Skipped header', () => { test('forwards throttled (429) skip code on the complete message', async () => { mockFetch.mockResolvedValueOnce({ status: 200, headers: { get: jest.fn().mockReturnValue('429') }, }); await invokeOnMessage({ type: 'send', id: 's1', payload: basePayload, context: baseContext, useRetry: false }); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: 's1', skipCode: '429' }); }); test.each(['4004', '4005'])('forwards hard-kill skip code %s on the complete message', async (code) => { mockFetch.mockResolvedValueOnce({ status: 200, headers: { get: jest.fn().mockReturnValue(code) }, }); await invokeOnMessage({ type: 'send', id: 's2', payload: basePayload, context: baseContext, useRetry: false }); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: 's2', skipCode: code }); }); test('emits skipCode=null when 2xx has no skip header (header.get returns null)', async () => { mockFetch.mockResolvedValueOnce({ status: 200, headers: { get: jest.fn().mockReturnValue(null) }, }); await invokeOnMessage({ type: 'send', id: 's3', payload: basePayload, context: baseContext, useRetry: false }); expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: 's3', skipCode: null }); }); test('omits skipCode field on non-2xx (failure) complete messages', async () => { mockFetch.mockResolvedValueOnce({ status: 400 }); await invokeOnMessage({ type: 'send', id: 's4', payload: basePayload, context: baseContext, useRetry: false }); // Failure path emits a plain complete (no skipCode), so the main thread won't apply any directive. expect(mockPostMessage).toHaveBeenCalledWith({ type: 'complete', id: 's4' }); }); }); test('falls back to uncompressed when CompressionStream throws', async () => { class BrokenCompressionStream { constructor() { throw new Error('not supported'); } } (global as any).CompressionStream = BrokenCompressionStream; try { mockFetch.mockResolvedValueOnce({ status: 200 }); await invokeOnMessage({ type: 'send', id: '13', payload: basePayload, context: baseContext, useRetry: false }); expect(mockFetch).toHaveBeenCalledTimes(1); const [, options] = mockFetch.mock.calls[0] as [string, RequestInit]; expect((options.headers as Record)['Content-Encoding']).toBeUndefined(); expect(typeof options.body).toBe('string'); } finally { delete (global as any).CompressionStream; } }); test('gzip-compresses payload when CompressionStream is available', async () => { // Mock CompressionStream with mock reader/writer objects (avoids ReadableStream/WritableStream // availability issues in the jsdom test environment). const mockCompressed = new Uint8Array([0x1f, 0x8b]); const mockWriter = { write: jest.fn().mockResolvedValue(undefined), close: jest.fn().mockResolvedValue(undefined) }; const mockReader = { read: jest .fn() .mockResolvedValueOnce({ done: false, value: mockCompressed }) .mockResolvedValueOnce({ done: true, value: undefined }), }; class MockCompressionStream { writable = { getWriter: () => mockWriter }; readable = { getReader: () => mockReader }; } // In jest+jsdom, 'CompressionStream' is checked via `'CompressionStream' in self` // where `self === global`. Set it on global so the check passes. (global as any).CompressionStream = MockCompressionStream; try { mockFetch.mockResolvedValueOnce({ status: 200 }); await invokeOnMessage({ type: 'send', id: '12', payload: basePayload, context: baseContext, useRetry: false }); expect(mockFetch).toHaveBeenCalledTimes(1); const [, options] = mockFetch.mock.calls[0] as [string, RequestInit]; expect((options.headers as Record)['Content-Encoding']).toBe('gzip'); expect(options.body).toEqual(mockCompressed); } finally { delete (global as any).CompressionStream; } }); }); ================================================ FILE: packages/session-replay-browser/tsconfig.es5.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "exclude": ["src/worker/compression.ts", "src/worker/track-destination.ts"], "compilerOptions": { "module": "commonjs", "noEmit": false, "outDir": "lib/cjs", "rootDir": "./src" } } ================================================ FILE: packages/session-replay-browser/tsconfig.esm.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "exclude": ["src/worker/compression.ts", "src/worker/track-destination.ts"], "compilerOptions": { "module": "es2020", "noEmit": false, "outDir": "lib/esm", "rootDir": "./src" } } ================================================ FILE: packages/session-replay-browser/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "include": ["src/**/*", "test/**/*", "e2e/**/*"], "compilerOptions": { "baseUrl": ".", "esModuleInterop": true, "lib": ["dom"], "noEmit": true, "rootDir": "." } } ================================================ FILE: packages/session-replay-browser/tsconfig.worker.json ================================================ { "extends": "./tsconfig.json", "include": ["src/worker/compression.ts", "src/worker/track-destination.ts"], "compilerOptions": { "module": "commonjs", "noEmit": false, "outDir": "lib/cjs", "rootDir": "./src", "lib": ["ES2020", "WebWorker"], "noUnusedLocals": false, "noUnusedParameters": false, "skipLibCheck": true } } ================================================ FILE: packages/session-replay-react-native/.gitattributes ================================================ *.pbxproj -text # specific for windows script files *.bat text eol=crlf ================================================ FILE: packages/session-replay-react-native/.gitignore ================================================ # OSX # .DS_Store # XDE .expo/ # VSCode .vscode/ jsconfig.json # Xcode # build/ *.pbxuser !default.pbxuser *.mode1v3 !default.mode1v3 *.mode2v3 !default.mode2v3 *.perspectivev3 !default.perspectivev3 xcuserdata *.xccheckout *.moved-aside DerivedData *.hmap *.ipa *.xcuserstate project.xcworkspace # Android/IJ # .classpath .cxx .gradle .idea .project .settings local.properties android.iml # Cocoapods # example/ios/Pods # Ruby example/vendor/ # node.js # node_modules/ npm-debug.log yarn-debug.log yarn-error.log # BUCK buck-out/ \.buckd/ android/app/libs android/keystores/debug.keystore # Yarn .yarn/* !.yarn/patches !.yarn/plugins !.yarn/releases !.yarn/sdks !.yarn/versions # Expo .expo/ # Turborepo .turbo/ # generated by bob lib/ # React Native Codegen ios/generated android/generated ================================================ FILE: packages/session-replay-react-native/.nvmrc ================================================ v18 ================================================ FILE: packages/session-replay-react-native/.watchmanconfig ================================================ {} ================================================ FILE: packages/session-replay-react-native/AmplitudeSessionReplayReactNative.podspec ================================================ require "json" package = JSON.parse(File.read(File.join(__dir__, "package.json"))) folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32' Pod::Spec.new do |s| s.name = "AmplitudeSessionReplayReactNative" s.version = package["version"].split(/[-+]/).first s.summary = package["description"] s.homepage = package["homepage"] s.license = package["license"] s.authors = package["author"] s.platforms = { :ios => min_ios_version_supported } s.source = { :git => "https://github.com/amplitude/Amplitude-TypeScript.git", :tag => "#{s.version}" } s.source_files = "ios/**/*.{h,m,mm,swift}" s.dependency 'AmplitudeSessionReplay', '>=0.9.5' s.dependency 'AmplitudeCore', '>=1.4.2' # This code is to support RN prior to 0.71.0. Should be removed when we drop support for RN < 0.71.0. # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. if respond_to?(:install_modules_dependencies, true) install_modules_dependencies(s) else s.dependency "React-Core" # Don't install the dependencies when we run `pod install` in the old architecture. if ENV['RCT_NEW_ARCH_ENABLED'] == '1' then s.compiler_flags = folly_compiler_flags + " -DRCT_NEW_ARCH_ENABLED=1" s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\"", "OTHER_CPLUSPLUSFLAGS" => "-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1", "CLANG_CXX_LANGUAGE_STANDARD" => "c++17" } s.dependency "React-Codegen" s.dependency "RCT-Folly" s.dependency "RCTRequired" s.dependency "RCTTypeSafety" s.dependency "ReactCommon/turbomodule/core" end end end ================================================ FILE: packages/session-replay-react-native/CHANGELOG.md ================================================ # Changelog ## 0.0.1-beta.3 (2025-12-02) - Release 0.0.1-beta.3 ## 0.0.1-beta.2 (2025-07-08) - Release 0.0.1-beta.2 All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ================================================ FILE: packages/session-replay-react-native/LICENSE ================================================ MIT License Copyright (c) 2024 Amplitude, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: packages/session-replay-react-native/README.md ================================================ # @amplitude/session-replay-react-native Amplitude Session Replay for React Native ## Installation ```sh npm install @amplitude/session-replay-react-native ``` ## Usage ### Session Replay React Native Standalone SDK Initialize SDK with your amplidude API Key ```js import { init, SessionReplayConfig } from '@amplitude/session-replay-react-native'; const config: SessionReplayConfig = { apiKey: 'YOUR_API_KEY', deviceId: 'YOUR_DEVICE_ID', sessionId: Date.now() } await init(config); ``` ### Session Replay React Native Plugin Add the session replay plugin to your Amplitude instance as follows ```js import { SessionReplayPlugin, SessionReplaPluginConfig } from '@amplitude/session-replay-react-native'; // ... const config: SessionReplaPluginConfig = { enableRemoteConfig: true, // default true sampleRate: 1, // default 0 logLevel: LogLevel.Warn, // default LogLevel.Warn }; await init('YOUR_API_KEY').promise; await add(new SessionReplayPlugin(config)).promise; ``` ## Masking views To maks certain views, add the `AmpMaskView` tag with the mask property `amp-mask` around the section to be masked ```js import { AmpMaskView } from '@amplitude/session-replay-react-native'; // ... {title} ; ``` ## Unmasking views To unmask views, add the `AmpMaskView` tag with the mask property `amp-unmask` around the section to be unmasked ```js import { AmpMaskView } from '@amplitude/session-replay-react-native'; // ... {title} ; ``` ## Tracking Web Views (Beta) Web views are blocked by default and will not be tracked. If you'd like webviews to be tracked, you can manually unmask them by doing the following ```js ``` ================================================ FILE: packages/session-replay-react-native/android/build.gradle ================================================ def reactNativeArchitectures() { def value = rootProject.getProperties().get("reactNativeArchitectures") return value ? value.split(",") : ["armeabi-v7a", "x86", "x86_64", "arm64-v8a"] } def isNewArchitectureEnabled() { return rootProject.hasProperty("newArchEnabled") && rootProject.getProperty("newArchEnabled") == "true" } apply plugin: "com.android.library" apply plugin: "kotlin-android" if (isNewArchitectureEnabled()) { apply plugin: "com.facebook.react" } def getExtOrDefault(name) { return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["SessionReplayReactNative_" + name] } def getExtOrIntegerDefault(name) { return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["SessionReplayReactNative_" + name]).toInteger() } def supportsNamespace() { def parsed = com.android.Version.ANDROID_GRADLE_PLUGIN_VERSION.tokenize('.') def major = parsed[0].toInteger() def minor = parsed[1].toInteger() // Namespace support was added in 7.3.0 return (major == 7 && minor >= 3) || major >= 8 } android { if (supportsNamespace()) { namespace "com.amplitude.sessionreplayreactnative" sourceSets { main { manifest.srcFile "src/main/AndroidManifestNew.xml" } } } compileSdkVersion getExtOrIntegerDefault("compileSdkVersion") defaultConfig { minSdkVersion getExtOrIntegerDefault("minSdkVersion") targetSdkVersion getExtOrIntegerDefault("targetSdkVersion") } buildTypes { release { minifyEnabled false } } lintOptions { disable "GradleCompatible" } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } } repositories { mavenCentral() google() } def kotlin_version = getExtOrDefault("kotlinVersion") dependencies { implementation("com.amplitude:session-replay-android:[0.24.0,0.25.0)") implementation("com.amplitude:analytics-android:[1.25.0,1.26.0)") // For < 0.71, this will be from the local maven repo // For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin //noinspection GradleDynamicVersion implementation "com.facebook.react:react-native:+" implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version" } ================================================ FILE: packages/session-replay-react-native/android/gradle.properties ================================================ SessionReplayReactNative_kotlinVersion=1.7.0 SessionReplayReactNative_minSdkVersion=21 SessionReplayReactNative_targetSdkVersion=31 SessionReplayReactNative_compileSdkVersion=31 SessionReplayReactNative_ndkversion=21.4.7075529 ================================================ FILE: packages/session-replay-react-native/android/src/main/AndroidManifest.xml ================================================ ================================================ FILE: packages/session-replay-react-native/android/src/main/AndroidManifestNew.xml ================================================ ================================================ FILE: packages/session-replay-react-native/android/src/main/java/com/amplitude/sessionreplayreactnative/SessionReplayReactNativeModule.kt ================================================ package com.amplitude.sessionreplayreactnative import com.amplitude.android.sessionreplay.SessionReplay import com.amplitude.android.sessionreplay.config.MaskLevel import com.amplitude.android.sessionreplay.config.PrivacyConfig import com.amplitude.common.Logger import com.amplitude.common.android.LogcatLogger import com.amplitude.core.ServerZone import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.bridge.ReactContextBaseJavaModule import com.facebook.react.bridge.ReactMethod import com.facebook.react.bridge.Promise import com.facebook.react.bridge.WritableMap import com.facebook.react.bridge.WritableNativeMap import com.facebook.react.bridge.ReadableMap class SessionReplayReactNativeModule(private val reactContext: ReactApplicationContext) : ReactContextBaseJavaModule(reactContext) { private lateinit var sessionReplay: SessionReplay override fun getName(): String { return "AMPNativeSessionReplay" } @ReactMethod fun setup(config: ReadableMap, promise: Promise) { try { val apiKey = config.getString("apiKey") ?: throw IllegalArgumentException("apiKey is required") val deviceId = config.getString("deviceId") val sessionId = config.getDouble("sessionId").toLong() val serverZone = config.getString("serverZone") ?: "US" val sampleRate = config.getDouble("sampleRate") val enableRemoteConfig = config.getBoolean("enableRemoteConfig") val logLevel = config.getInt("logLevel") val autoStart = config.getBoolean("autoStart") val optOut = config.getBoolean("optOut") val maskLevel = when ((config.getString("maskLevel") ?: "medium").lowercase()) { "light" -> MaskLevel.LIGHT "medium" -> MaskLevel.MEDIUM "conservative" -> MaskLevel.CONSERVATIVE else -> MaskLevel.MEDIUM } LogcatLogger.logger.logMode = when (logLevel) { 0 -> Logger.LogMode.OFF 1 -> Logger.LogMode.ERROR 2 -> Logger.LogMode.WARN 3 -> Logger.LogMode.INFO 4 -> Logger.LogMode.DEBUG else -> Logger.LogMode.WARN } LogcatLogger.logger.debug(""" setup: API Key: $apiKey Device Id: $deviceId Session Id: $sessionId Server Zone: $serverZone Sample Rate: $sampleRate Enable Remote Config: $enableRemoteConfig Log Level: $logLevel Auto Start: $autoStart Mask Level: $maskLevel Opt Out: $optOut """.trimIndent()) sessionReplay = SessionReplay( apiKey = apiKey, context = reactContext.applicationContext, deviceId = deviceId ?: "", sessionId = sessionId, optOut = optOut, sampleRate = sampleRate, logger = LogcatLogger.logger, enableRemoteConfig = enableRemoteConfig, serverZone = when (serverZone) { "EU" -> ServerZone.EU else -> ServerZone.US }, autoStart = autoStart, privacyConfig = PrivacyConfig(maskLevel = maskLevel), ) promise.resolve(null) } catch (e: Exception) { promise.reject("SETUP_ERROR", e.message, e) } } @ReactMethod fun setSessionId(sessionId: Double, promise: Promise) { try { sessionReplay.setSessionId(sessionId.toLong()) promise.resolve(null) } catch (e: Exception) { promise.reject("SET_SESSION_ID_ERROR", e.message, e) } } @ReactMethod fun setDeviceId(deviceId: String?, promise: Promise) { try { sessionReplay.setDeviceId(deviceId ?: "") promise.resolve(null) } catch (e: Exception) { promise.reject("SET_DEVICE_ID_ERROR", e.message, e) } } @ReactMethod fun getSessionId(promise: Promise) { try { promise.resolve(sessionReplay.getSessionId().toDouble()) } catch (e: Exception) { promise.reject("GET_SESSION_ID_ERROR", e.message, e) } } @ReactMethod fun getSessionReplayProperties(promise: Promise) { try { val properties: Map = sessionReplay.getSessionReplayProperties() val map: WritableMap = WritableNativeMap() for ((key, value) in properties) { if (value is String) { map.putString(key, value) } else if (value is Int) { map.putInt(key, value) } else if (value is Long) { map.putDouble(key, value.toDouble()) } else if (value is Double) { map.putDouble(key, value) } else if (value is Boolean) { map.putBoolean(key, value) } } promise.resolve(map) } catch (e: Exception) { promise.reject("GET_PROPERTIES_ERROR", e.message, e) } } @ReactMethod fun start(promise: Promise) { try { sessionReplay.start() promise.resolve(null) } catch (e: Exception) { promise.reject("START_ERROR", e.message, e) } } @ReactMethod fun stop(promise: Promise) { try { sessionReplay.stop() promise.resolve(null) } catch (e: Exception) { promise.reject("STOP_ERROR", e.message, e) } } @ReactMethod fun flush(promise: Promise) { try { sessionReplay.flush() promise.resolve(null) } catch (e: Exception) { promise.reject("FLUSH_ERROR", e.message, e) } } @ReactMethod fun teardown() { sessionReplay.shutdown() } override fun invalidate() { if (::sessionReplay.isInitialized) { sessionReplay.shutdown() } } } ================================================ FILE: packages/session-replay-react-native/android/src/main/java/com/amplitude/sessionreplayreactnative/SessionReplayReactNativePackage.kt ================================================ package com.amplitude.sessionreplayreactnative import com.facebook.react.ReactPackage import com.facebook.react.bridge.NativeModule import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.uimanager.ViewManager class SessionReplayReactNativePackage : ReactPackage { override fun createNativeModules(reactContext: ReactApplicationContext): List { return listOf(SessionReplayReactNativeModule(reactContext)) } override fun createViewManagers(reactContext: ReactApplicationContext): List> { return listOf(SessionReplayReactNativeViewManager()) } } ================================================ FILE: packages/session-replay-react-native/android/src/main/java/com/amplitude/sessionreplayreactnative/SessionReplayReactNativeViewManager.kt ================================================ package com.amplitude.sessionreplayreactnative import android.view.ViewGroup import com.amplitude.android.sessionreplay.SessionReplay import com.facebook.react.uimanager.annotations.ReactProp import com.facebook.react.views.view.ReactViewManager class SessionReplayReactNativeViewManager : ReactViewManager() { override fun getName(): String { return "AMPMaskComponentView" } @ReactProp(name = "mask") fun setMask(view: ViewGroup, ampMask: String) { when (ampMask) { "amp-mask" -> SessionReplay.mask(view) "amp-unmask" -> SessionReplay.unmask(view) "amp-block" -> SessionReplay.block(view) } } } ================================================ FILE: packages/session-replay-react-native/babel.config.js ================================================ module.exports = { presets: ['module:metro-react-native-babel-preset'], }; ================================================ FILE: packages/session-replay-react-native/ios/AMPNativeSessionReplay.mm ================================================ #import @interface RCT_EXTERN_MODULE(AMPNativeSessionReplay, NSObject) RCT_EXTERN_METHOD(flush:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(getSessionId:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(getSessionReplayProperties:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(setSessionId:(nonnull NSNumber)sessionId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(setDeviceId:(NSString)deviceId resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(setup:(NSDictionary *)config resolve:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(start:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) RCT_EXTERN_METHOD(stop:(RCTPromiseResolveBlock)resolve reject:(RCTPromiseRejectBlock)reject) @end ================================================ FILE: packages/session-replay-react-native/ios/NativeSessionReplay-Bridging-Header.h ================================================ #import #import ================================================ FILE: packages/session-replay-react-native/ios/NativeSessionReplay.swift ================================================ import Foundation import AmplitudeSessionReplay import AmplitudeCore @objc(AMPNativeSessionReplay) class NativeSessionReplay: NSObject, RCTBridgeModule { static func moduleName() -> String! { "AMPNativeSessionReplay" } var sessionReplay: SessionReplay! var logger: CoreLogger! override init() { print("NativeSessionReplay init") } @objc(setup:resolve:reject:) func setup(_ config: NSDictionary, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { guard let apiKey = config["apiKey"] as? String, let sessionId = config["sessionId"] as? NSNumber, let serverZone = config["serverZone"] as? String, let sampleRate = config["sampleRate"] as? NSNumber, let enableRemoteConfig = config["enableRemoteConfig"] as? Bool, let logLevel = config["logLevel"] as? Int, let autoStart = config["autoStart"] as? Bool, let maskLevel = config["maskLevel"] as? String, let optOut = config["optOut"] as? Bool else { reject("INVALID_CONFIG", "Invalid configuration parameters", nil) return } let deviceId = config["deviceId"] as? String logger = OSLogger(logLevel: LogLevel(rawValue: logLevel) ?? .warn) logger.log(message: """ setup: API Key: \(apiKey) Device ID: \(deviceId ?? "null") Session ID: \(sessionId) Server Zone: \(serverZone) Sample Rate: \(sampleRate) Enable Remote Config: \(enableRemoteConfig) Log Level: \(logLevel) Auto Start: \(autoStart) Mask Level: \(maskLevel) Opt Out: \(optOut) """ ) sessionReplay = SessionReplay( apiKey: apiKey, deviceId: deviceId, sessionId: sessionId.int64Value, optOut: optOut, sampleRate: Float(truncating: sampleRate), logger: logger, serverZone: serverZone == "EU" ? .EU : .US, maskLevel: .fromString(maskLevel), enableRemoteConfig: enableRemoteConfig ) if (autoStart) { sessionReplay.start() } resolve(nil) } @objc(setSessionId:resolve:reject:) func setSessionId(_ sessionId: NSNumber, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { logger.debug(message: "setSessionId: \(sessionId)") sessionReplay.sessionId = sessionId.int64Value resolve(nil) } @objc(setDeviceId:resolve:reject:) func setDeviceId(_ deviceId: NSString, resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { logger.debug(message: "setDeviceId: \(deviceId)") sessionReplay.deviceId = deviceId as String? resolve(nil) } @objc(getSessionId:reject:) func getSessionId( _ resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock ) { logger.debug(message: "getSessionId") resolve(NSNumber(value:sessionReplay.sessionId)) } @objc(getSessionReplayProperties:reject:) func getSessionReplayProperties( _ resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock ) { logger.debug(message: "getSessionReplayProperties") resolve(sessionReplay.additionalEventProperties) } @objc(start:reject:) func start(_ resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { logger.debug(message: "start") sessionReplay.start() print(sessionReplay.additionalEventProperties) print( "SessionId: \(sessionReplay.sessionId); DeviceId: \(sessionReplay.deviceId ?? "nil")" ) resolve(nil) } @objc(stop:reject:) func stop(_ resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { logger.debug(message: "stop") sessionReplay.stop() resolve(nil) } @objc(flush:reject:) func flush(_ resolve: RCTPromiseResolveBlock, reject: RCTPromiseRejectBlock) -> Void { logger.debug(message: "flush") sessionReplay.flush() resolve(nil) } @objc(invalidate) func invalidate() { print("invalidate") // could be nil here sessionReplay?.stop() sessionReplay = nil } } extension MaskLevel { static func fromString(_ input: String) -> MaskLevel { switch input.lowercased() { case "light": return .light case "medium": return .medium case "conservative": return .conservative default: return .medium } } } ================================================ FILE: packages/session-replay-react-native/ios/RCTAmpMaskViewManager.m ================================================ #import #import @import AmplitudeSessionReplay; @interface AMPMaskComponentViewManager : RCTViewManager @end @implementation AMPMaskComponentViewManager RCT_EXPORT_MODULE(AMPMaskComponentView) - (UIView *)view { return [[RCTView alloc] init]; } RCT_CUSTOM_VIEW_PROPERTY(mask, NSString, RCTView) { NSString* mask = [RCTConvert NSString:json]; if ([mask isEqualToString:@"amp-mask"]) { view.amp_isBlocked = true; } else if ([mask isEqualToString:@"amp-block"]) { view.amp_isBlocked = true; } else if ([mask isEqualToString:@"amp-unmask"]) { view.amp_isBlocked = false; } } @end ================================================ FILE: packages/session-replay-react-native/jest.config.js ================================================ const baseConfig = require('../../jest.config.js'); const package = require('./package'); module.exports = { ...baseConfig, displayName: package.name, rootDir: '.', preset: 'react-native', testEnvironment: 'jsdom', modulePathIgnorePatterns: ['/lib/'], moduleFileExtensions: ['tsx', 'ts', 'js', 'jsx', 'json'], transformIgnorePatterns: [ 'node_modules/(?!(.pnpm|@react-native|react-native|@segment)/)', ], // TODO: get full coverage coverageThreshold: { global: { branches: 0, functions: 0, lines: 0, statements: 0, }, }, }; ================================================ FILE: packages/session-replay-react-native/package.json ================================================ { "name": "@amplitude/session-replay-react-native", "version": "0.0.1-beta.3", "description": "Amplitude Session Replay for React Native", "keywords": [ "analytics", "amplitude", "react-native", "ios", "android", "session-replay" ], "author": "Amplitude Inc", "homepage": "https://github.com/amplitude/Amplitude-TypeScript", "license": "MIT", "main": "lib/commonjs/index", "module": "lib/module/index", "types": "lib/typescript/index.d.ts", "react-native": "src/index", "publishConfig": { "access": "public", "tag": "latest" }, "repository": { "type": "git", "url": "git+https://github.com/amplitude/Amplitude-TypeScript.git" }, "scripts": { "build": "bob build", "clean": "rimraf node_modules lib coverage", "fix": "pnpm fix:eslint & pnpm fix:prettier", "fix:eslint": "eslint '{src,test}/**/*.ts' --fix", "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", "lint": "pnpm lint:prettier && pnpm lint:eslint", "lint:eslint": "eslint '{src,test}/**/*.ts'", "lint:prettier": "prettier --check \"{src,test}/**/*.ts\"", "test": "jest", "typecheck": "tsc -p ./tsconfig.json", "version": "pnpm version-file && pnpm build", "version-file": "node -p \"'export const VERSION = \\'' + require('./package.json').version + '\\';'\" > src/version.ts", "typescript": "tsc --noEmit", "example": "yarn workspace @amplitude/plugin-session-replay-react-native-example", "pods": "cd example && pod-install --quiet" }, "source": "src/index", "files": [ "src", "lib", "android", "ios", "cpp", "*.podspec", "!ios/build", "!android/build", "!android/gradle", "!android/gradlew", "!android/gradlew.bat", "!android/local.properties", "!test", "!**/__tests__", "!**/__fixtures__", "!**/__mocks__", "!**/.*" ], "bugs": { "url": "https://github.com/amplitude/Amplitude-TypeScript/issues" }, "dependencies": { "@amplitude/analytics-types": "^1.3.4" }, "devDependencies": { "@types/react": "^18.0.26", "react": "18.2.0", "react-native": "0.73.0", "react-native-builder-bob": "^0.20.3" }, "peerDependencies": { "react": "*", "react-native": "*" }, "react-native-builder-bob": { "source": "src", "output": "lib", "targets": [ "commonjs", "module", [ "typescript", { "project": "tsconfig.build.json" } ] ] }, "private": true } ================================================ FILE: packages/session-replay-react-native/src/amp-mask-view.tsx ================================================ import { requireNativeComponent, type ViewProps } from 'react-native'; interface AmpMaskViewProps extends ViewProps { mask: 'amp-mask' | 'amp-unmask' | 'amp-block'; } export const AmpMaskView = requireNativeComponent('AMPMaskComponentView'); ================================================ FILE: packages/session-replay-react-native/src/index.tsx ================================================ export { init, setSessionId, getSessionId, getSessionReplayProperties, flush, start, stop, setDeviceId, } from './session-replay'; export { type SessionReplayConfig, MaskLevel } from './session-replay-config'; export { SessionReplayPlugin } from './plugin-session-replay'; export type { SessionReplayPluginConfig } from './plugin-session-replay-config'; export { AmpMaskView } from './amp-mask-view'; ================================================ FILE: packages/session-replay-react-native/src/logger.ts ================================================ import { LogLevel } from '@amplitude/analytics-types'; const PREFIX = 'Amplitude Session Replay '; export const createSessionReplayLogger = () => { let logLevel: LogLevel = LogLevel.Warn; return { setLogLevel: function setLogLevel(level: LogLevel): void { logLevel = level; }, log: function log(...args: unknown[]): void { if (logLevel < LogLevel.Verbose) { return; } console.log(`${PREFIX}[Log]:`, ...args); }, warn: function warn(...args: unknown[]): void { if (logLevel < LogLevel.Warn) { return; } console.warn(`${PREFIX}[Warn]:`, ...args); }, error: function error(...args: unknown[]): void { if (logLevel < LogLevel.Error) { return; } console.error(`${PREFIX}[Error]:`, ...args); }, debug: function debug(...args: unknown[]): void { if (logLevel < LogLevel.Debug) { return; } console.log(`${PREFIX}[Debug]:`, ...args); }, }; }; ================================================ FILE: packages/session-replay-react-native/src/native-module.ts ================================================ import { NativeModules, Platform } from 'react-native'; const LINKING_ERROR = `The package '@amplitude/session-replay-react-native' doesn't seem to be linked. Make sure: \n\n` + Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n'; export const NativeSessionReplay = NativeModules.AMPNativeSessionReplay ? (NativeModules.AMPNativeSessionReplay as NativeSessionReplaySpec) : (new Proxy( {}, { get() { throw new Error(LINKING_ERROR); }, }, ) as NativeSessionReplaySpec); /** * Configuration interface for setting up the native iOS and Android session replay modules. * This interface defines all the parameters required to initialize the native session replay functionality. */ export interface NativeSessionReplayConfig { /** Your Amplitude API key for authentication and data routing */ apiKey: string; /** Whether to automatically start recording when the module is initialized */ autoStart: boolean; /** Device identifier that matches the device ID sent with Amplitude events */ deviceId: string | null; /** Whether to enable remote configuration for dynamic settings updates */ enableRemoteConfig: boolean; /** Log level for native module logging (0=None, 1=Error, 2=Warn, 3=Log, 4=Debug) */ logLevel: 0 | 1 | 2 | 3 | 4; /** Level of masking applied to sensitive content in recordings */ maskLevel: 'light' | 'medium' | 'conservative'; /** Whether the user has opted out of session replay recording */ optOut: boolean; /** Sample rate for session replay (0.0 to 1.0) determining recording frequency */ sampleRate: number; /** Amplitude server zone for data routing ('US' or 'EU') */ serverZone: 'US' | 'EU'; /** Current session identifier for correlating events with recordings */ sessionId: number; } export interface NativeSessionReplayProperties { [key: string]: string | number | boolean; } /** * Interface defining the native session replay module specification. * This interface provides the contract for communication between JavaScript and * the native iOS/Android session replay modules through React Native's bridge. * * All methods are asynchronous and return Promises to handle the bridge communication * between JavaScript and native code. */ export interface NativeSessionReplaySpec { /** * Flushes any pending session replay data to the server. * Forces immediate upload of recorded session data that may be buffered locally. */ flush(): Promise; /** * Retrieves the current session identifier from the native module. * @returns Promise resolving to the current session ID number * @note OLD ARCH: ideally we want to cache that on JS side to avoid bridge overhead */ getSessionId(): Promise; /** * Retrieves session replay properties that should be attached to Amplitude events. * These properties help correlate events with session recordings. * @returns Promise resolving to an object containing session replay metadata * @note OLD ARCH: ideally we want to cache that on JS side to avoid bridge overhead */ getSessionReplayProperties(): Promise; /** * Updates the device identifier used for session replay tracking. * @param deviceId - The device identifier string, or null to clear the device ID * @note OLD ARCH: combine those into one method to avoid bridge overhead */ setDeviceId(deviceId: string | null): Promise; /** * Updates the session identifier used for session replay tracking. * @param sessionId - The session identifier number * @note OLD ARCH: combine those into one method to avoid bridge overhead */ setSessionId(sessionId: number): Promise; /** * Initializes the native session replay module with the provided configuration. * This method must be called before any other session replay operations. * @param config - Configuration object containing all necessary parameters for setup */ setup(config: NativeSessionReplayConfig): Promise; /** * Starts session replay recording. * Begins capturing user interactions and screen content for replay. */ start(): Promise; /** * Stops session replay recording. * Ends the current recording session and processes any captured data. */ stop(): Promise; } ================================================ FILE: packages/session-replay-react-native/src/plugin-session-replay-config.ts ================================================ import { LogLevel } from '@amplitude/analytics-types'; /** * Configuration for Session Replay React Native Plugin */ export interface SessionReplayPluginConfig { /** * Sample rate for session replay (0.0 to 1.0) * Determines what percentage of sessions will be recorded * @default 0 */ sampleRate?: number; /** * Whether to enable remote configuration * @default true */ enableRemoteConfig?: boolean; /** * Log level for the SDK * @default LogLevel.Warn */ logLevel?: LogLevel; /** * Whether to automatically start recording when the plugin is added * @default true */ autoStart?: boolean; } export const getDefaultSessionReplayPluginConfig: () => Required = () => { return { sampleRate: 0, enableRemoteConfig: true, logLevel: LogLevel.Warn, autoStart: true, }; }; ================================================ FILE: packages/session-replay-react-native/src/plugin-session-replay.ts ================================================ import { type EnrichmentPlugin, type Event, type ReactNativeClient, type ReactNativeConfig, } from '@amplitude/analytics-types'; import { SessionReplayPluginConfig, getDefaultSessionReplayPluginConfig } from './plugin-session-replay-config'; import { getSessionId, getSessionReplayProperties, privateInit, setSessionId, start, stop } from './session-replay'; import { createSessionReplayLogger } from './logger'; /** * Session Replay Plugin for React Native Amplitude SDK. * This plugin automatically handles session replay recording and event correlation. * * The plugin automatically handles: * - Device ID and Session ID management * - Session ID changes * - Event property collection and tracking */ export class SessionReplayPlugin implements EnrichmentPlugin { name = '@amplitude/plugin-session-replay-react-native'; type = 'enrichment' as const; private config: ReactNativeConfig | null = null; private isInitialized = false; private sessionReplayConfig: Required; private logger = createSessionReplayLogger(); /** * Create a new Session Replay Plugin instance. * * @param config - Configuration options for the session replay plugin * * @example * ```typescript * const sessionReplayPlugin = new SessionReplayPlugin({ * sampleRate: 0.1, * enableRemoteConfig: true, * logLevel: LogLevel.Warn, * autoStart: true * }); * ``` */ constructor(config: SessionReplayPluginConfig = {}) { this.sessionReplayConfig = { ...getDefaultSessionReplayPluginConfig(), ...config, }; this.logger.setLogLevel(this.sessionReplayConfig.logLevel); this.logger.log('Creating SessionReplayPlugin with config: ', this.sessionReplayConfig); } /** * Set up the Session Replay Plugin with the Amplitude configuration. * This method is called automatically by the Amplitude SDK during initialization. * * @param config - The React Native configuration from the Amplitude SDK * @param _ - The React Native client instance (unused) * @returns Promise that resolves when setup is complete */ async setup(config: ReactNativeConfig, _: ReactNativeClient): Promise { this.config = config; await privateInit( { apiKey: config.apiKey, deviceId: config.deviceId, sessionId: config.sessionId, serverZone: config.serverZone as 'EU' | 'US', sampleRate: this.sessionReplayConfig.sampleRate, enableRemoteConfig: this.sessionReplayConfig.enableRemoteConfig, logLevel: this.sessionReplayConfig.logLevel, autoStart: this.sessionReplayConfig.autoStart, }, this.logger, ); this.isInitialized = true; } async execute(event: Event): Promise { if (!this.isInitialized) { return Promise.resolve(event); } // On event, synchronize the session id to the what's on the browserConfig (source of truth) // Choosing not to read from event object here, concerned about offline/delayed events messing up the state stored // in SR. if (this.config?.sessionId && this.config.sessionId !== (await getSessionId())) { await setSessionId(this.config.sessionId); } // Treating config.sessionId as source of truth, if the event's session id doesn't match, the // event is not of the current session (offline/late events). In that case, don't tag the events if (this.config?.sessionId && this.config.sessionId === event.session_id) { const sessionRecordingProperties = await getSessionReplayProperties(); event.event_properties = { ...event.event_properties, ...sessionRecordingProperties, }; } return Promise.resolve(event); } /** * Start session replay recording. * Begins capturing user interactions and screen content for replay. * * @returns Promise that resolves when recording starts */ async start(): Promise { if (this.isInitialized) { await start(); } } /** * Stop session replay recording. * Ends the current recording session and processes any captured data. * * @returns Promise that resolves when recording stops */ async stop(): Promise { if (this.isInitialized) { await stop(); } } async teardown(): Promise { if (this.isInitialized) { await stop(); } this.config = null; this.isInitialized = false; } /** * Get session replay properties for manual event correlation. * When you send events to Amplitude, call this method to get the most up-to-date session replay properties for the event. * * @returns Promise that resolves to an object containing session replay metadata * * @example * ```typescript * const sessionReplayProperties = await plugin.getSessionReplayProperties(); * analytics.track('Button Clicked', { * buttonName: 'submit', * ...sessionReplayProperties * }); * ``` */ async getSessionReplayProperties() { if (!this.isInitialized) { return {}; } return getSessionReplayProperties(); } } ================================================ FILE: packages/session-replay-react-native/src/session-replay-config.ts ================================================ import { LogLevel } from '@amplitude/analytics-types'; /** * Masking levels for sensitive content in session replay */ export enum MaskLevel { /** * Light masking - minimal content is masked */ Light = 'light', /** * Medium masking - balanced approach to content masking */ Medium = 'medium', /** * Conservative masking - maximum content masking for privacy */ Conservative = 'conservative', } /** * Configuration for Session Replay React Native SDK */ export interface SessionReplayConfig { /** * Your Amplitude API key * @required */ apiKey: string; /** * Whether to automatically start recording when the SDK is initialized * @default true */ autoStart?: boolean; /** * Device identifier that matches the device ID sent with Amplitude events * Must match the Device ID passed as event properties to Amplitude * @default null */ deviceId?: string | null; /** * Whether to enable remote configuration * @default true */ enableRemoteConfig?: boolean; /** * Log level for the SDK * @default LogLevel.Warn */ logLevel?: LogLevel; /** * Level of masking applied to sensitive content * @default MaskLevel.Medium */ maskLevel?: MaskLevel; /** * Whether to opt out of session replay collection * @default false */ optOut?: boolean; /** * Sample rate for session replay (0.0 to 1.0) * Determines what percentage of sessions will be recorded * @default 0 */ sampleRate?: number; /** * Server zone for data processing * @default 'US' * @review: Verify EU server zone compliance and data residency requirements */ serverZone?: 'EU' | 'US'; /** * Session identifier that matches the session ID sent with Amplitude events * Must match the Session ID passed as event properties to Amplitude * @default -1 */ sessionId?: number; } export const getDefaultConfig: () => Required> = () => { return { autoStart: true, deviceId: null, enableRemoteConfig: true, logLevel: LogLevel.Warn, maskLevel: MaskLevel.Medium, optOut: false, sampleRate: 0, serverZone: 'US', sessionId: -1, }; }; export { LogLevel }; ================================================ FILE: packages/session-replay-react-native/src/session-replay.ts ================================================ // @refresh reset import { NativeSessionReplay, type NativeSessionReplayConfig } from './native-module'; import { getDefaultConfig, SessionReplayConfig } from './session-replay-config'; import { createSessionReplayLogger } from './logger'; import { VERSION } from './version'; let fullConfig: Required | null = null; let isInitialized = false; let logger = createSessionReplayLogger(); /** * Configure the SDK and begin collecting replays. * This function must be called before any other session replay operations. * * @param config - Configuration object containing API key, device ID, session ID, and other options * @returns Promise that resolves when initialization is complete * @throws Error if initialization fails * * @example * ```typescript * await init({ * apiKey: 'YOUR_API_KEY', * deviceId: 'user-device-id', * sessionId: Date.now(), * sampleRate: 0.1 * }); * ``` */ export async function init(config: SessionReplayConfig): Promise { if (isInitialized) { logger.warn('SessionReplay is already initialized'); return; } fullConfig = { ...getDefaultConfig(), ...config, }; logger.setLogLevel(fullConfig.logLevel); logger.log(`initializing @amplitude/session-replay-react-native version: ${VERSION} with config: `, fullConfig); try { await NativeSessionReplay.setup(nativeConfig(fullConfig)); logger.log('SessionReplay initialized'); isInitialized = true; } catch (error) { logger.error('Error initializing SessionReplay', error); } } /** * Call whenever the session ID changes. * The Session ID you pass to the SDK must match the Session ID sent as event properties to Amplitude. * * @param sessionId - The new session identifier number * @returns Promise that resolves when the session ID is updated * * @example * ```typescript * await setSessionId(Date.now()); * ``` */ export async function setSessionId(sessionId: number): Promise { if (!isInitialized) { logger.warn('SessionReplay is not initialized'); return; } await NativeSessionReplay.setSessionId(sessionId); } /** * Update the device ID used for session replay tracking. * The Device ID you pass to the SDK must match the Device ID sent as event properties to Amplitude. * * @param deviceId - The device identifier string, or null to clear the device ID * @returns Promise that resolves when the device ID is updated * * @example * ```typescript * await setDeviceId('user-device-id'); * // or clear device ID * await setDeviceId(null); * ``` */ export async function setDeviceId(deviceId: string | null): Promise { if (!isInitialized) { logger.warn('SessionReplay is not initialized'); return; } await NativeSessionReplay.setDeviceId(deviceId); } /** * Get the current session identifier from the session replay SDK. * * @returns Promise that resolves to the current session ID number, or null if not initialized * * @example * ```typescript * const sessionId = await getSessionId(); * if (sessionId !== null) { * console.log('Current session ID:', sessionId); * } * ``` */ export async function getSessionId(): Promise { if (!isInitialized) { logger.warn('SessionReplay is not initialized'); return null; } return await NativeSessionReplay.getSessionId(); } /** * Interface for session replay properties that should be attached to Amplitude events. * These properties help correlate events with session recordings. */ export interface SessionReplayProperties { [key: string]: string | boolean | null; } /** * When you send events to Amplitude, call this function to get the most up-to-date session replay properties for the event. * Collect Session Replay properties to send with other event properties. * * @returns Promise that resolves to an object containing session replay metadata * * @example * ```typescript * const sessionReplayProperties = await getSessionReplayProperties(); * analytics.track('Button Clicked', { * buttonName: 'submit', * ...sessionReplayProperties // Merge session replay properties * }); * ``` */ export async function getSessionReplayProperties(): Promise { if (!isInitialized) { logger.warn('SessionReplay is not initialized'); return {}; } const properties = await NativeSessionReplay.getSessionReplayProperties(); return properties as SessionReplayProperties; } /** * Flush any pending session replay data to the server. * Forces immediate upload of recorded session data that may be buffered locally. * * @returns Promise that resolves when the flush operation is complete * * @example * ```typescript * // Flush data before app termination * await flush(); * ``` */ export async function flush(): Promise { if (!isInitialized) { logger.warn('SessionReplay is not initialized'); return; } await NativeSessionReplay.flush(); } /** * Start session replay recording. * Begins capturing user interactions and screen content for replay. * If autoStart is enabled in the configuration, this is called automatically during initialization. * * @returns Promise that resolves when recording starts * * @example * ```typescript * // Start recording manually if autoStart is false * await start(); * ``` */ export async function start(): Promise { if (!isInitialized) { logger.warn('SessionReplay is not initialized'); return; } await NativeSessionReplay.start(); } /** * Stop session replay recording. * Ends the current recording session and processes any captured data. * * @returns Promise that resolves when recording stops * * @example * ```typescript * // Stop recording when user logs out or app goes to background * await stop(); * ``` */ export async function stop(): Promise { if (!isInitialized) { logger.warn('SessionReplay is not initialized'); return; } await NativeSessionReplay.stop(); } function nativeConfig(config: Required): NativeSessionReplayConfig { return { ...config, logLevel: config.logLevel as NativeSessionReplayConfig['logLevel'], maskLevel: config.maskLevel.toString() as NativeSessionReplayConfig['maskLevel'], }; } export async function privateInit( config: SessionReplayConfig, newLogger: ReturnType, ): Promise { logger = newLogger; return init(config); } ================================================ FILE: packages/session-replay-react-native/src/version.ts ================================================ // Autogenerated by `yarn version-file`. DO NOT EDIT export const VERSION = '0.0.1-beta.3'; ================================================ FILE: packages/session-replay-react-native/test/__mocks__/react-native.ts ================================================ // __mocks__/react-native.ts export const NativeModules = { AMPNativeSessionReplay: { setup: jest.fn().mockResolvedValue(undefined), start: jest.fn().mockResolvedValue(undefined), stop: jest.fn().mockResolvedValue(undefined), flush: jest.fn().mockResolvedValue(undefined), getSessionId: jest.fn().mockResolvedValue(12345), getSessionReplayProperties: jest.fn().mockResolvedValue({ replayId: 'test-id' }), setDeviceId: jest.fn().mockResolvedValue(undefined), setSessionId: jest.fn().mockResolvedValue(undefined), }, }; export const Platform = { OS: 'ios' as 'ios' | 'android', select: jest.fn((options: { ios?: string; android?: string; default?: string }) => { return options.ios || options.default || ''; }), }; export const requireNativeComponent = jest.fn((_componentName: string) => _componentName); ================================================ FILE: packages/session-replay-react-native/test/index.test.ts ================================================ // FIXME: remove these eslint rules /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-return */ // Use the mock from __mocks__ directory jest.mock('react-native'); // Explicitly mock the logger module using the imported mock jest.mock('../src/logger', (): any => require('./utils/logger')); import { init, setSessionId, getSessionId, getSessionReplayProperties, flush, start, stop, setDeviceId, SessionReplayPlugin, AmpMaskView, type SessionReplayConfig, type SessionReplayPluginConfig, MaskLevel, } from '../src/index'; import { NativeModules } from 'react-native'; import { LogLevel } from '@amplitude/analytics-types'; // Mock the getSessionReplayProperties return value for our tests NativeModules.AMPNativeSessionReplay.getSessionReplayProperties.mockResolvedValue({ replayId: 'test-id' }); describe('Index Exports', () => { const testConfig: SessionReplayConfig = { apiKey: 'test-api-key', serverZone: 'US', logLevel: LogLevel.Warn, }; beforeEach(() => { jest.clearAllMocks(); jest.resetModules(); }); describe('Function Exports', () => { it('should export init function that initializes session replay', async () => { await init(testConfig); expect(NativeModules.AMPNativeSessionReplay.setup).toHaveBeenCalledWith( expect.objectContaining({ apiKey: 'test-api-key', serverZone: 'US', logLevel: LogLevel.Warn, }), ); }); it('should export setSessionId function that updates session ID', async () => { const testSessionId = 54321; await init(testConfig); // Initialize first await setSessionId(testSessionId); expect(NativeModules.AMPNativeSessionReplay.setSessionId).toHaveBeenCalledWith(testSessionId); }); it('should export getSessionId function that retrieves session ID', async () => { await init(testConfig); // Initialize first const sessionId = await getSessionId(); expect(NativeModules.AMPNativeSessionReplay.getSessionId).toHaveBeenCalled(); expect(sessionId).toBe(12345); }); it('should export getSessionReplayProperties function', async () => { await init(testConfig); // Initialize first const properties = await getSessionReplayProperties(); expect(NativeModules.AMPNativeSessionReplay.getSessionReplayProperties).toHaveBeenCalled(); expect(properties).toEqual({ replayId: 'test-id' }); }); it('should export flush function that flushes session data', async () => { await init(testConfig); // Initialize first await flush(); expect(NativeModules.AMPNativeSessionReplay.flush).toHaveBeenCalled(); }); it('should export start function that starts recording', async () => { await init(testConfig); // Initialize first await start(); expect(NativeModules.AMPNativeSessionReplay.start).toHaveBeenCalled(); }); it('should export stop function that stops recording', async () => { await init(testConfig); // Initialize first await stop(); expect(NativeModules.AMPNativeSessionReplay.stop).toHaveBeenCalled(); }); it('should export setDeviceId function that updates device ID', async () => { const testDeviceId = 'test-device-id'; await init(testConfig); // Initialize first await setDeviceId(testDeviceId); expect(NativeModules.AMPNativeSessionReplay.setDeviceId).toHaveBeenCalledWith(testDeviceId); }); }); describe('Class Exports', () => { it('should export SessionReplayPlugin class', () => { const plugin = new SessionReplayPlugin(); expect(plugin).toBeInstanceOf(SessionReplayPlugin); expect(plugin.name).toBe('@amplitude/plugin-session-replay-react-native'); expect(plugin.type).toBe('enrichment'); }); it('should export AmpMaskView component', () => { expect(AmpMaskView).toBe('AMPMaskComponentView'); }); }); describe('Type Exports', () => { it('should export SessionReplayConfig interface', () => { const config: SessionReplayConfig = { apiKey: 'test-api-key', serverZone: 'US', logLevel: LogLevel.Warn, maskLevel: MaskLevel.Medium, autoStart: true, deviceId: 'test-device', enableRemoteConfig: true, optOut: false, sampleRate: 1, sessionId: 12345, }; // TypeScript compilation is the test - if it compiles, the interface is correct expect(config).toBeTruthy(); }); it('should export SessionReplayPluginConfig interface', () => { const config: SessionReplayPluginConfig = { sampleRate: 1, enableRemoteConfig: true, logLevel: LogLevel.Warn, autoStart: true, }; // TypeScript compilation is the test - if it compiles, the interface is correct expect(config).toBeTruthy(); }); it('should export MaskLevel enum', () => { expect(MaskLevel.Light).toBe('light'); expect(MaskLevel.Medium).toBe('medium'); expect(MaskLevel.Conservative).toBe('conservative'); expect(Object.keys(MaskLevel)).toHaveLength(3); }); }); }); ================================================ FILE: packages/session-replay-react-native/test/logger.test.ts ================================================ import { createSessionReplayLogger } from '../src/logger'; import { LogLevel } from '@amplitude/analytics-types'; describe('Logger', () => { let logger: ReturnType; let consoleSpy: { log: jest.SpyInstance; warn: jest.SpyInstance; error: jest.SpyInstance; }; beforeEach(() => { // Spy on console methods consoleSpy = { log: jest.spyOn(console, 'log').mockImplementation(() => undefined), warn: jest.spyOn(console, 'warn').mockImplementation(() => undefined), error: jest.spyOn(console, 'error').mockImplementation(() => undefined), }; logger = createSessionReplayLogger(); }); afterEach(() => { // Restore console methods consoleSpy.log.mockRestore(); consoleSpy.warn.mockRestore(); consoleSpy.error.mockRestore(); }); describe('createSessionReplayLogger', () => { it('should create a logger instance with default log level', () => { expect(logger).toBeDefined(); expect(typeof logger.setLogLevel).toBe('function'); expect(typeof logger.log).toBe('function'); expect(typeof logger.warn).toBe('function'); expect(typeof logger.error).toBe('function'); expect(typeof logger.debug).toBe('function'); }); it('should have Warn as default log level', () => { // At Warn level, debug and log should not output logger.debug('debug message'); logger.log('log message'); expect(consoleSpy.log).not.toHaveBeenCalled(); }); }); describe('setLogLevel', () => { it('should change the log level', () => { logger.setLogLevel(LogLevel.Debug); // Now debug should work logger.debug('debug message'); expect(consoleSpy.log).toHaveBeenCalledWith('Amplitude Session Replay [Debug]:', 'debug message'); }); it('should accept different log levels', () => { logger.setLogLevel(LogLevel.Error); // Only error should work, warn should not logger.warn('warning message'); logger.error('error message'); expect(consoleSpy.warn).not.toHaveBeenCalled(); expect(consoleSpy.error).toHaveBeenCalledWith('Amplitude Session Replay [Error]:', 'error message'); }); }); describe('log', () => { it('should log messages when log level is Verbose or lower', () => { logger.setLogLevel(LogLevel.Verbose); logger.log('test message'); expect(consoleSpy.log).toHaveBeenCalledWith('Amplitude Session Replay [Log]:', 'test message'); }); it('should not log when log level is higher than Verbose', () => { logger.setLogLevel(LogLevel.Warn); logger.log('test message'); expect(consoleSpy.log).not.toHaveBeenCalled(); }); it('should handle multiple arguments', () => { logger.setLogLevel(LogLevel.Verbose); logger.log('message', 'arg1', 'arg2'); expect(consoleSpy.log).toHaveBeenCalledWith('Amplitude Session Replay [Log]:', 'message', 'arg1', 'arg2'); }); }); describe('warn', () => { it('should warn when log level is Warn or lower', () => { logger.setLogLevel(LogLevel.Warn); logger.warn('warning message'); expect(consoleSpy.warn).toHaveBeenCalledWith('Amplitude Session Replay [Warn]:', 'warning message'); }); it('should not warn when log level is higher than Warn', () => { logger.setLogLevel(LogLevel.Error); logger.warn('warning message'); expect(consoleSpy.warn).not.toHaveBeenCalled(); }); it('should handle multiple arguments', () => { logger.setLogLevel(LogLevel.Warn); logger.warn('warning', 'arg1', 'arg2'); expect(consoleSpy.warn).toHaveBeenCalledWith('Amplitude Session Replay [Warn]:', 'warning', 'arg1', 'arg2'); }); }); describe('error', () => { it('should error when log level is Error or lower', () => { logger.setLogLevel(LogLevel.Error); logger.error('error message'); expect(consoleSpy.error).toHaveBeenCalledWith('Amplitude Session Replay [Error]:', 'error message'); }); it('should not error when log level is higher than Error', () => { logger.setLogLevel(LogLevel.None); logger.error('error message'); expect(consoleSpy.error).not.toHaveBeenCalled(); }); it('should handle multiple arguments', () => { logger.setLogLevel(LogLevel.Error); logger.error('error', 'arg1', 'arg2'); expect(consoleSpy.error).toHaveBeenCalledWith('Amplitude Session Replay [Error]:', 'error', 'arg1', 'arg2'); }); it('should handle Error objects', () => { logger.setLogLevel(LogLevel.Error); const testError = new Error('Test error'); logger.error('Error occurred:', testError); expect(consoleSpy.error).toHaveBeenCalledWith('Amplitude Session Replay [Error]:', 'Error occurred:', testError); }); }); describe('debug', () => { it('should debug when log level is Debug or lower', () => { logger.setLogLevel(LogLevel.Debug); logger.debug('debug message'); expect(consoleSpy.log).toHaveBeenCalledWith('Amplitude Session Replay [Debug]:', 'debug message'); }); it('should not debug when log level is higher than Debug', () => { logger.setLogLevel(LogLevel.Warn); logger.debug('debug message'); expect(consoleSpy.log).not.toHaveBeenCalled(); }); it('should handle multiple arguments', () => { logger.setLogLevel(LogLevel.Debug); logger.debug('debug', 'arg1', 'arg2'); expect(consoleSpy.log).toHaveBeenCalledWith('Amplitude Session Replay [Debug]:', 'debug', 'arg1', 'arg2'); }); }); describe('log level hierarchy', () => { it('should respect log level hierarchy', () => { // Test at Debug level - all should work logger.setLogLevel(LogLevel.Debug); logger.debug('debug'); logger.log('log'); logger.warn('warn'); logger.error('error'); expect(consoleSpy.log).toHaveBeenCalledTimes(2); // debug + log expect(consoleSpy.warn).toHaveBeenCalledTimes(1); expect(consoleSpy.error).toHaveBeenCalledTimes(1); }); it('should respect log level hierarchy at Verbose level', () => { logger.setLogLevel(LogLevel.Verbose); logger.debug('debug'); logger.log('log'); logger.warn('warn'); logger.error('error'); expect(consoleSpy.log).toHaveBeenCalledTimes(1); // only log (debug won't work at Verbose) expect(consoleSpy.warn).toHaveBeenCalledTimes(1); expect(consoleSpy.error).toHaveBeenCalledTimes(1); }); it('should respect log level hierarchy at Warn level', () => { logger.setLogLevel(LogLevel.Warn); logger.debug('debug'); logger.log('log'); logger.warn('warn'); logger.error('error'); expect(consoleSpy.log).not.toHaveBeenCalled(); expect(consoleSpy.warn).toHaveBeenCalledTimes(1); expect(consoleSpy.error).toHaveBeenCalledTimes(1); }); it('should respect log level hierarchy at Error level', () => { logger.setLogLevel(LogLevel.Error); logger.debug('debug'); logger.log('log'); logger.warn('warn'); logger.error('error'); expect(consoleSpy.log).not.toHaveBeenCalled(); expect(consoleSpy.warn).not.toHaveBeenCalled(); expect(consoleSpy.error).toHaveBeenCalledTimes(1); }); it('should respect log level hierarchy at None level', () => { logger.setLogLevel(LogLevel.None); logger.debug('debug'); logger.log('log'); logger.warn('warn'); logger.error('error'); expect(consoleSpy.log).not.toHaveBeenCalled(); expect(consoleSpy.warn).not.toHaveBeenCalled(); expect(consoleSpy.error).not.toHaveBeenCalled(); }); }); describe('prefix formatting', () => { it('should include correct prefix for all log levels', () => { logger.setLogLevel(LogLevel.Debug); logger.debug('debug message'); logger.log('log message'); logger.warn('warn message'); logger.error('error message'); expect(consoleSpy.log).toHaveBeenCalledWith('Amplitude Session Replay [Debug]:', 'debug message'); expect(consoleSpy.log).toHaveBeenCalledWith('Amplitude Session Replay [Log]:', 'log message'); expect(consoleSpy.warn).toHaveBeenCalledWith('Amplitude Session Replay [Warn]:', 'warn message'); expect(consoleSpy.error).toHaveBeenCalledWith('Amplitude Session Replay [Error]:', 'error message'); }); }); }); ================================================ FILE: packages/session-replay-react-native/test/plugin-session-replay.test.ts ================================================ // FIXME: remove these eslint rules /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ /* eslint-disable @typescript-eslint/no-var-requires */ // Use the mock from __mocks__ directory jest.mock('react-native'); // Explicitly mock the logger module using the imported mock jest.mock('../src/logger', () => require('./utils/logger')); import type { SessionReplayPluginConfig } from '../src/index'; import { LogLevel } from '@amplitude/analytics-types'; import type { ReactNativeConfig } from '@amplitude/analytics-types'; import mockReactNativeClient from './utils/reactNativeClient'; // Minimal config with all required properties from ReactNativeConfig const minimalConfig: ReactNativeConfig = { apiKey: 'test-api-key', serverZone: 'US', deviceId: 'test-device-id', sessionId: 12345, userId: 'test-user-id', optOut: false, cookieExpiration: 0, cookieSameSite: 'Lax', cookieSecure: false, cookieStorage: undefined as any, cookieUpgrade: false, disableCookies: false, domain: 'test.com', sessionTimeout: 1800000, trackingOptions: {}, flushIntervalMillis: 10000, flushMaxRetries: 5, flushQueueSize: 10, logLevel: LogLevel.Warn, loggerProvider: undefined as any, transportProvider: undefined as any, useBatch: false, attribution: undefined, serverUrl: undefined, appVersion: undefined, lastEventTime: undefined, lastEventId: undefined, partnerId: undefined, trackingSessionEvents: undefined, migrateLegacyData: undefined, }; describe('SessionReplayPlugin Integration', () => { let SessionReplayPlugin: typeof import('../src/plugin-session-replay').SessionReplayPlugin; let NativeModules: typeof import('react-native').NativeModules; beforeEach(() => { jest.resetModules(); // Re-import after resetting modules to clear module-level state and reapply mocks SessionReplayPlugin = require('../src/plugin-session-replay').SessionReplayPlugin; NativeModules = require('react-native').NativeModules; jest.clearAllMocks(); }); it('should instantiate and setup with default config', async () => { const plugin = new SessionReplayPlugin(); expect(plugin).toBeInstanceOf(SessionReplayPlugin); expect(plugin.name).toBe('@amplitude/plugin-session-replay-react-native'); expect(plugin.type).toBe('enrichment'); // Setup with default config await plugin.setup(minimalConfig, mockReactNativeClient); expect(NativeModules.AMPNativeSessionReplay.setup).toHaveBeenCalledWith( expect.objectContaining({ apiKey: 'test-api-key', serverZone: 'US' }), ); }); it('should instantiate and setup with custom config', async () => { const config: SessionReplayPluginConfig = { sampleRate: 0.5, enableRemoteConfig: false, logLevel: LogLevel.Debug, autoStart: false, }; const plugin = new SessionReplayPlugin(config); await plugin.setup({ ...minimalConfig, serverZone: 'EU' }, mockReactNativeClient); expect(NativeModules.AMPNativeSessionReplay.setup).toHaveBeenCalledWith( expect.objectContaining({ apiKey: 'test-api-key', serverZone: 'EU' }), ); }); it('should call start, stop, and teardown', async () => { const plugin = new SessionReplayPlugin(); await plugin.setup(minimalConfig, mockReactNativeClient); await plugin.start(); expect(NativeModules.AMPNativeSessionReplay.start).toHaveBeenCalled(); await plugin.stop(); expect(NativeModules.AMPNativeSessionReplay.stop).toHaveBeenCalled(); await plugin.teardown(); // teardown should call stop again (idempotent) expect(NativeModules.AMPNativeSessionReplay.stop).toHaveBeenCalledTimes(2); }); it('should call getSessionReplayProperties', async () => { const plugin = new SessionReplayPlugin(); await plugin.setup(minimalConfig, mockReactNativeClient); const props = await plugin.getSessionReplayProperties(); expect(NativeModules.AMPNativeSessionReplay.getSessionReplayProperties).toHaveBeenCalled(); expect(props).toEqual({ replayId: 'test-id' }); }); it('should execute and enrich event if initialized', async () => { const plugin = new SessionReplayPlugin(); await plugin.setup(minimalConfig, mockReactNativeClient); const event = { event_type: 'test_event', event_properties: {} }; const enriched = await plugin.execute(event); expect(enriched).toEqual(event); // Should return the same event (enrichment is a no-op in mock) }); it('should not enrich event if not initialized', async () => { const plugin = new SessionReplayPlugin(); await plugin.setup(minimalConfig, mockReactNativeClient); const event = { event_type: 'test_event', event_properties: {} }; const enriched = await plugin.execute(event); expect(enriched).toEqual(event); // Should return the same event }); }); ================================================ FILE: packages/session-replay-react-native/test/session-replay.test.ts ================================================ // FIXME: remove these eslint rules /* eslint-disable @typescript-eslint/no-unsafe-member-access */ /* eslint-disable @typescript-eslint/no-unsafe-call */ /* eslint-disable @typescript-eslint/no-unsafe-return */ /* eslint-disable @typescript-eslint/no-unsafe-assignment */ // Use the mock from __mocks__ directory jest.mock('react-native'); // Explicitly mock the logger module using the imported mock jest.mock('../src/logger', () => require('./utils/logger')); import { init, start, stop, getSessionId, getSessionReplayProperties, type SessionReplayConfig } from '../src/index'; import { NativeModules } from 'react-native'; import { LogLevel } from '@amplitude/analytics-types'; // Mock the getSessionReplayProperties return value for our tests const mockNativeModules = NativeModules as jest.Mocked; mockNativeModules.AMPNativeSessionReplay.getSessionReplayProperties.mockResolvedValue({ replayId: 'test-id' }); describe('Session Replay Integration Tests', () => { beforeEach(() => { jest.clearAllMocks(); jest.resetModules(); }); it('should allow complete workflow using exported functions', async () => { const testConfig: SessionReplayConfig = { apiKey: 'test-api-key', serverZone: 'US', logLevel: LogLevel.Warn, }; // Complete workflow test await init(testConfig); expect(mockNativeModules.AMPNativeSessionReplay.setup).toHaveBeenCalledWith( expect.objectContaining({ apiKey: 'test-api-key', serverZone: 'US', logLevel: LogLevel.Warn, }), ); await start(); expect(mockNativeModules.AMPNativeSessionReplay.start).toHaveBeenCalled(); const sessionId = await getSessionId(); expect(sessionId).toBe(12345); expect(mockNativeModules.AMPNativeSessionReplay.getSessionId).toHaveBeenCalled(); const properties = await getSessionReplayProperties(); expect(properties).toEqual({ replayId: 'test-id' }); expect(mockNativeModules.AMPNativeSessionReplay.getSessionReplayProperties).toHaveBeenCalled(); await stop(); expect(mockNativeModules.AMPNativeSessionReplay.stop).toHaveBeenCalled(); // Verify calls were made in sequence const calls = jest.mocked(mockNativeModules.AMPNativeSessionReplay); expect(calls.setup).toHaveBeenCalled(); expect(calls.start).toHaveBeenCalled(); expect(calls.getSessionId).toHaveBeenCalled(); expect(calls.getSessionReplayProperties).toHaveBeenCalled(); expect(calls.stop).toHaveBeenCalled(); }); }); ================================================ FILE: packages/session-replay-react-native/test/tsconfig.json ================================================ { "extends": "../tsconfig.json", "compilerOptions": { "types": ["jest", "node"] } } ================================================ FILE: packages/session-replay-react-native/test/utils/logger.ts ================================================ // __mocks__/logger.ts // Create mock functions for each log level const mockDebug = jest.fn(); const mockWarn = jest.fn(); const mockError = jest.fn(); const mockLog = jest.fn(); const mockSetLogLevel = jest.fn(); const mockLogger = { debug: mockDebug, log: mockLog, warn: mockWarn, error: mockError, setLogLevel: mockSetLogLevel, }; export const createSessionReplayLogger = jest.fn(() => { return mockLogger; }); ================================================ FILE: packages/session-replay-react-native/test/utils/reactNativeClient.ts ================================================ import type { ReactNativeClient } from '@amplitude/analytics-types'; const mockReactNativeClient: ReactNativeClient = { init: jest.fn(), add: jest.fn(), remove: jest.fn(), track: jest.fn(), logEvent: jest.fn(), identify: jest.fn(), groupIdentify: jest.fn(), setGroup: jest.fn(), revenue: jest.fn(), flush: jest.fn(), getUserId: jest.fn(), setUserId: jest.fn(), getDeviceId: jest.fn(), setDeviceId: jest.fn(), reset: jest.fn(), getSessionId: jest.fn(), setSessionId: jest.fn(), extendSession: jest.fn(), setOptOut: jest.fn(), }; export default mockReactNativeClient; ================================================ FILE: packages/session-replay-react-native/tsconfig.build.json ================================================ { "extends": "./tsconfig", "exclude": ["test", "example", "lib"] } ================================================ FILE: packages/session-replay-react-native/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "compilerOptions": { "paths": { "@amplitude/session-replay-react-native": ["./src/index"] }, "allowUnreachableCode": false, "allowUnusedLabels": false, "esModuleInterop": true, "forceConsistentCasingInFileNames": true, "jsx": "react", "lib": ["esnext", "dom"], "module": "esnext", "moduleResolution": "node", "noStrictGenericChecks": false, "skipLibCheck": true, "target": "es6" } } ================================================ FILE: packages/targeting/CHANGELOG.md ================================================ # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # [0.2.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/targeting@0.1.1...@amplitude/targeting@0.2.0) (2024-07-01) ### Features - **targeting:** add support for multiple events in targeting evaluation ([fbe083e](https://github.com/amplitude/Amplitude-TypeScript/commit/fbe083e3782f07805b7f146778de663899b1afbd)) # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [0.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/targeting@0.1.0...@amplitude/targeting@0.1.1) (2024-05-28) **Note:** Version bump only for package @amplitude/targeting # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. # 0.1.0 (2024-04-08) ### Features - **targeting:** allow for bucketing on session id ([288e95f](https://github.com/amplitude/Amplitude-TypeScript/commit/288e95f2fd24ed654567d40cf75e847fa5973351)) - **targeting:** introduce new package for targeting ([0da1316](https://github.com/amplitude/Amplitude-TypeScript/commit/0da131638fbd7b92386eb2897a8b689b09a7a22f)) # Change Log ================================================ FILE: packages/targeting/README.md ================================================


# @amplitude/targeting Internal Node package for Amplitude ================================================ FILE: packages/targeting/jest.config.js ================================================ const baseConfig = require('../../jest.config.js'); const package = require('./package'); module.exports = { ...baseConfig, displayName: package.name, rootDir: '.', testEnvironment: 'jsdom', coveragePathIgnorePatterns: ['index.ts'], setupFilesAfterEnv: ['./test/jest-setup.js'], }; ================================================ FILE: packages/targeting/package.json ================================================ { "name": "@amplitude/targeting", "version": "0.2.0", "description": "", "author": "Amplitude Inc", "homepage": "https://github.com/amplitude/Amplitude-TypeScript", "license": "MIT", "main": "lib/cjs/index.js", "module": "lib/esm/index.js", "types": "lib/esm/index.d.ts", "sideEffects": false, "publishConfig": { "access": "public" }, "repository": { "type": "git", "url": "git+https://github.com/amplitude/Amplitude-TypeScript.git" }, "private": true, "scripts": { "build": "pnpm bundle && pnpm build:es5 && pnpm build:esm", "bundle": "rollup --config rollup.config.js", "build:es5": "tsc -p ./tsconfig.es5.json", "build:esm": "tsc -p ./tsconfig.esm.json", "clean": "rimraf node_modules lib coverage", "fix": "pnpm fix:eslint & pnpm fix:prettier", "fix:eslint": "eslint '{src,test}/**/*.ts' --fix", "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", "lint": "pnpm lint:eslint & pnpm lint:prettier", "lint:eslint": "eslint '{src,test}/**/*.ts'", "lint:prettier": "prettier --check \"{src,test}/**/*.ts\"", "publish": "node ../../scripts/publish/upload-to-s3.js", "test": "jest", "typecheck": "tsc -p ./tsconfig.json", "version": "pnpm version-file && pnpm build", "version-file": "node -p \"'export const VERSION = \\'' + require('./package.json').version + '\\';'\" > src/version.ts" }, "bugs": { "url": "https://github.com/amplitude/Amplitude-TypeScript/issues" }, "dependencies": { "@amplitude/analytics-client-common": "workspace:*", "@amplitude/analytics-core": "workspace:*", "@amplitude/analytics-types": "workspace:*", "@amplitude/experiment-core": "0.7.2", "idb": "8.0.0", "tslib": "^2.4.1" }, "devDependencies": { "@aws-sdk/client-s3": "^3.229.0", "@rollup/plugin-commonjs": "^23.0.4", "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/plugin-typescript": "^10.0.1", "@types/core-js": "^2.5.8", "fake-indexeddb": "4.0.2", "rollup": "^2.79.1", "rollup-plugin-execute": "^1.1.1", "rollup-plugin-gzip": "^3.1.0", "rollup-plugin-sourcemaps": "^0.6.3", "rollup-plugin-terser": "^7.0.2" }, "files": [ "lib" ] } ================================================ FILE: packages/targeting/rollup.config.js ================================================ import { iife, umd } from '../../scripts/build/rollup.config'; iife.input = umd.input; iife.output.name = 'targeting'; export default [umd, iife]; ================================================ FILE: packages/targeting/src/index.ts ================================================ import targeting from './targeting-factory'; export const { evaluateTargeting } = targeting; export { TargetingFlag, TargetingParameters } from './typings/targeting'; ================================================ FILE: packages/targeting/src/targeting-factory.ts ================================================ import { Targeting } from './targeting'; import { Targeting as AmplitudeTargeting } from './typings/targeting'; const createInstance: () => AmplitudeTargeting = () => { const targeting = new Targeting(); return { evaluateTargeting: targeting.evaluateTargeting.bind(targeting), }; }; export default createInstance(); ================================================ FILE: packages/targeting/src/targeting-idb-store.ts ================================================ import { Logger as ILogger } from '@amplitude/analytics-types'; import { DBSchema, IDBPDatabase, IDBPTransaction, openDB } from 'idb'; export const MAX_IDB_STORAGE_LENGTH = 1000 * 60 * 60 * 24 * 2; // 2 days // This type is constructed to allow for future proofing - in the future we may want // to track how many of each event is fired, and we may want to track event properties // Any further fields, like event properties, can be added to this type without causing // a breaking change type EventData = { event_type: string }; type EventTypeStore = { [event_type: string]: { [timestamp: number]: EventData } }; export interface TargetingDB extends DBSchema { eventTypesForSession: { key: string; value: { sessionId: string; eventTypes: EventTypeStore; lastUpdated: number; }; }; } export class TargetingIDBStore { dbs: { [apiKey: string]: IDBPDatabase } = {}; createStore = async (dbName: string) => { return await openDB(dbName, 1, { upgrade: (db: IDBPDatabase) => { if (!db.objectStoreNames.contains('eventTypesForSession')) { db.createObjectStore('eventTypesForSession', { keyPath: 'sessionId', }); } }, }); }; openOrCreateDB = async (apiKey: string) => { if (this.dbs && this.dbs[apiKey]) { return this.dbs[apiKey]; } const dbName = `${apiKey.substring(0, 10)}_amp_targeting`; const db = await this.createStore(dbName); this.dbs[apiKey] = db; return db; }; updateEventListForSession = async ({ sessionId, eventType, eventTime, loggerProvider, tx, }: { sessionId: string | number; eventType: string; eventTime: number; loggerProvider: ILogger; tx: IDBPTransaction; }) => { try { const sessionIdStr = String(sessionId); const sessionData = await tx.store.get(sessionIdStr); const eventTypes = sessionData ? sessionData.eventTypes : {}; const eventTypeStore = eventTypes[eventType] || {}; const updatedEventTypes: EventTypeStore = { ...eventTypes, [eventType]: { ...eventTypeStore, [eventTime]: { event_type: eventType }, }, }; const updatedSessionData = { sessionId: sessionIdStr, eventTypes: updatedEventTypes, lastUpdated: Date.now(), }; await tx.store.put(updatedSessionData); return updatedEventTypes; } catch (e) { loggerProvider.warn(`Failed to store events for targeting ${sessionId}: ${e as string}`); } return undefined; }; deleteOldSessionEventTypes = async ({ currentSessionId, loggerProvider, tx, }: { currentSessionId: string | number; loggerProvider: ILogger; tx: IDBPTransaction; }) => { try { const currentSessionIdStr = String(currentSessionId); const allSessions = await tx.store.getAll(); for (let i = 0; i < allSessions.length; i++) { const session = allSessions[i]; const amountOfTimeSinceSession = Date.now() - session.lastUpdated; if (session.sessionId !== currentSessionIdStr && amountOfTimeSinceSession > MAX_IDB_STORAGE_LENGTH) { await tx.store.delete(session.sessionId); } } } catch (e) { loggerProvider.warn(`Failed to clear old session event types for targeting: ${e as string}`); } }; storeEventTypeForSession = async ({ loggerProvider, sessionId, eventType, eventTime, apiKey, }: { loggerProvider: ILogger; apiKey: string; eventType: string; eventTime: number; sessionId: string | number; }) => { try { const db = await this.openOrCreateDB(apiKey); const tx = db.transaction<'eventTypesForSession', 'readwrite'>('eventTypesForSession', 'readwrite'); if (!tx) { return; } // Update the list of events for the session const updatedEventTypes = await this.updateEventListForSession({ sessionId, tx, loggerProvider, eventType, eventTime, }); // Clear out sessions older than 2 days await this.deleteOldSessionEventTypes({ currentSessionId: sessionId, tx, loggerProvider }); await tx.done; return updatedEventTypes; } catch (e) { loggerProvider.warn(`Failed to store events for targeting ${sessionId}: ${e as string}`); } return undefined; }; } export const targetingIDBStore = new TargetingIDBStore(); ================================================ FILE: packages/targeting/src/targeting.ts ================================================ import { EvaluationEngine } from '@amplitude/experiment-core'; import { targetingIDBStore } from './targeting-idb-store'; import { Targeting as AmplitudeTargeting, TargetingParameters } from './typings/targeting'; export class Targeting implements AmplitudeTargeting { evaluationEngine: EvaluationEngine; constructor() { this.evaluationEngine = new EvaluationEngine(); } evaluateTargeting = async ({ apiKey, loggerProvider, event, sessionId, userProperties, deviceId, page, flag, }: TargetingParameters) => { const eventTypes = event && event.time ? await targetingIDBStore.storeEventTypeForSession({ loggerProvider: loggerProvider, apiKey: apiKey, sessionId, eventType: event.event_type, eventTime: event.time, }) : undefined; const eventStrings = eventTypes && new Set(Object.keys(eventTypes)); const context = { session_id: sessionId, event, event_types: eventStrings && Array.from(eventStrings), user: { ...userProperties, device_id: deviceId, user_properties: userProperties, }, page: page, }; const targetingBucket = this.evaluationEngine.evaluate(context, [flag]); return targetingBucket; }; } ================================================ FILE: packages/targeting/src/typings/targeting.ts ================================================ import { Event, Logger } from '@amplitude/analytics-types'; import { EvaluationFlag, EvaluationVariant } from '@amplitude/experiment-core'; export type TargetingFlag = EvaluationFlag; /** Page data passed into targeting so the evaluator can use the current URL (or other page data). */ export interface TargetingPage { url?: string; } export interface TargetingParameters { event?: Event; userProperties?: { [key: string]: any }; deviceId?: string; /** * Page data (e.g. current page URL) for context in targeting evaluation. * Used to populate context.page in the evaluation engine. */ page?: TargetingPage; flag: EvaluationFlag; sessionId: string | number; apiKey: string; loggerProvider: Logger; } export interface Targeting { evaluateTargeting: (args: TargetingParameters) => Promise>; } ================================================ FILE: packages/targeting/test/flag-config-data/catch-all.ts ================================================ export const flagCatchAll = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' }, }, segments: [ { metadata: { segmentName: 'sign in trigger' }, bucket: { selector: ['context', 'session_id'], salt: 'xdfrewd', // Different salt for each bucket to allow for fallthrough allocations: [ { range: [0, 19], // Selects 20% of users that match these conditions distributions: [ { variant: 'on', range: [0, 42949673], }, ], }, ], }, conditions: [ [ { selector: ['context', 'event', 'event_type'], op: 'is', values: ['Sign In'], }, ], ], }, { metadata: { segmentName: 'multiple event trigger' }, bucket: { selector: ['context', 'session_id'], salt: 'xdfrewd', // Different salt for each bucket to allow for fallthrough allocations: [ { range: [0, 19], // Selects 20% of users that match these conditions distributions: [ { variant: 'on', range: [0, 42949673], }, ], }, ], }, conditions: [ [ { selector: ['context', 'event_types'], op: 'set contains', values: ['Add to Cart', 'Purchase'], }, ], ], }, { metadata: { segmentName: 'user property' }, bucket: { selector: ['context', 'session_id'], salt: 'Rpr5h4vy', // Different salt for each bucket to allow for fallthrough allocations: [ { range: [0, 14], // Selects 15% of users that match these conditions distributions: [ { variant: 'on', range: [0, 42949673], }, ], }, ], }, conditions: [ [ { selector: ['context', 'user', 'user_properties', 'country'], op: 'set contains any', values: ['united states'], }, ], ], }, { metadata: { segmentName: 'leftover allocation' }, bucket: { selector: ['context', 'session_id'], salt: 'T5lhyRo', // Different salt for each bucket to allow for fallthrough allocations: [ { range: [0, 9], // Selects 10% of users that match these conditions distributions: [ { variant: 'on', range: [0, 42949673], }, ], }, ], }, }, { variant: 'off', }, ], }; ================================================ FILE: packages/targeting/test/flag-config-data/event-props.ts ================================================ import { TargetingFlag } from '../../src/typings/targeting'; export const flagEventProps: TargetingFlag = { key: 'sr_targeting_config', variants: { off: { key: 'off', }, on: { key: 'on', }, }, segments: [ { metadata: { segmentName: 'Segment 1', segmentId: 'uuid1', }, bucket: { selector: ['context', 'session_id'], salt: 'sphIslYm', allocations: [ { distributions: [ { range: [0, 42949673], variant: 'on', }, ], range: [0, 51], }, ], }, conditions: [ [ { selector: ['context', 'event', 'event_properties', '[Amplitude] Page URL'], op: 'is', values: ['http://localhost:3000/tasks-app'], }, ], ], }, ], }; ================================================ FILE: packages/targeting/test/flag-config-data/multiple-conditions.ts ================================================ export const flagConfigMultipleConditions = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' }, }, segments: [ { metadata: { segmentName: 'multiple condition trigger' }, bucket: { selector: ['context', 'session_id'], salt: 'xdfrewd', allocations: [ { range: [0, 99], distributions: [ { variant: 'on', range: [0, 42949673], }, ], }, ], }, conditions: [ [ { selector: ['context', 'event', 'event_type'], op: 'is', values: ['Sign In'], }, ], [ { selector: ['context', 'user', 'user_properties', 'name'], op: 'is', values: ['Banana'], }, ], ], }, { variant: 'off', }, ], }; ================================================ FILE: packages/targeting/test/flag-config-data/multiple-events.ts ================================================ import { TargetingFlag } from '../../src/typings/targeting'; export const flagConfigMultipleEvents: TargetingFlag = { key: 'sr_targeting_config', variants: { on: { key: 'on' }, off: { key: 'off' }, }, segments: [ { metadata: { segmentName: 'multiple event trigger' }, bucket: { selector: ['context', 'session_id'], salt: 'xdfrewd', allocations: [ { range: [0, 99], distributions: [ { variant: 'on', range: [0, 42949673], }, ], }, ], }, conditions: [ [ { selector: ['context', 'event_types'], op: 'set contains', values: ['Add to Cart', 'Sign In'], }, ], ], }, { variant: 'off', }, ], }; ================================================ FILE: packages/targeting/test/flag-config-data/user-props.ts ================================================ import { TargetingFlag } from '../../src/typings/targeting'; export const flagUserProps: TargetingFlag = { key: 'sr_targeting_config', variants: { off: { key: 'off', }, on: { key: 'on', }, }, segments: [ { metadata: { segmentName: 'Segment 1', segmentId: 'uuid1', }, bucket: { selector: ['context', 'session_id'], salt: 'sphIslYm', allocations: [ { distributions: [ { range: [0, 42949673], variant: 'on', }, ], range: [0, 51], }, ], }, conditions: [ [ { op: 'contains', selector: ['context', 'user', 'user_properties', 'plan_id'], values: ['paid', 'free'], }, ], ], }, ], }; ================================================ FILE: packages/targeting/test/jest-setup.js ================================================ require('fake-indexeddb/auto'); const { IDBFactory } = require('fake-indexeddb'); const structuredClone = require('@ungap/structured-clone'); global.structuredClone = structuredClone.default; global.beforeEach(() => { global.indexedDB = new IDBFactory(); }); ================================================ FILE: packages/targeting/test/targeting-factory.test.ts ================================================ import targeting from '../src/targeting-factory'; describe('targeting factory', () => { describe('targeting instance', () => { test('return an instance of the targeting class', async () => { expect(Object.keys(targeting)).toEqual(['evaluateTargeting']); }); }); }); ================================================ FILE: packages/targeting/test/targeting-idb-store.test.ts ================================================ /* eslint-disable @typescript-eslint/unbound-method */ import { Logger } from '@amplitude/analytics-types'; import { IDBPDatabase } from 'idb'; import { TargetingDB, targetingIDBStore } from '../src/targeting-idb-store'; type MockedLogger = jest.Mocked; type EventTypesEntry = { eventTypes: Record>; sessionId: string; lastUpdated: number; }; type StoreEventParams = { eventTime: number; eventType: string; sessionId: number | string; apiKey?: string; loggerProvider?: MockedLogger; }; // Test constants const TEST_API_KEY = 'static_key'; const TEST_EVENT_TIME = 123; const TEST_SESSION_ID = 123; // Helper function to create a fresh mock logger const createMockLogger = (): MockedLogger => ({ error: jest.fn(), log: jest.fn(), disable: jest.fn(), enable: jest.fn(), warn: jest.fn(), debug: jest.fn(), }); // Helper function to get all entries from the database async function getAllEntriesTyped(db: IDBPDatabase): Promise { const result = await db.getAll('eventTypesForSession'); if (Array.isArray(result)) { return result.map((entry) => { // Defensive: only return if entry has the expected shape if ( typeof entry === 'object' && entry !== null && 'eventTypes' in entry && 'sessionId' in entry && 'lastUpdated' in entry ) { return entry as EventTypesEntry; } throw new Error('Unexpected entry shape in getAllEntriesTyped'); }); } return []; } // Helper function to store an event with default parameters const storeEvent = async (params: Partial = {}): Promise => { const logger = createMockLogger(); await targetingIDBStore.storeEventTypeForSession({ eventTime: params.eventTime ?? TEST_EVENT_TIME, eventType: params.eventType ?? 'Add to Cart', sessionId: params.sessionId ?? TEST_SESSION_ID, apiKey: params.apiKey ?? TEST_API_KEY, loggerProvider: params.loggerProvider ?? logger, }); return logger; }; // Helper function to create a mock database that throws errors const createMockDBWithError = (errorType: 'transaction' | 'put' | 'getAll'): IDBPDatabase => { const mockStore = { put: jest.fn().mockImplementation(() => (errorType === 'put' ? Promise.reject('put error') : Promise.resolve())), getAll: jest .fn() .mockImplementation(() => (errorType === 'getAll' ? Promise.reject('getAll error') : Promise.resolve([]))), }; const mockTransaction = errorType === 'transaction' ? undefined : { store: mockStore, }; return { transaction: jest.fn().mockImplementation(() => mockTransaction), } as unknown as IDBPDatabase; }; describe('targeting idb store', () => { let db: IDBPDatabase; let mockLogger: MockedLogger; let dateNowSpy: jest.SpyInstance; beforeEach(async () => { // Create fresh mock logger for each test mockLogger = createMockLogger(); // Open database and clear it db = await targetingIDBStore.openOrCreateDB(TEST_API_KEY); await db.clear('eventTypesForSession'); // Reset all mocks jest.clearAllMocks(); }); afterEach(async () => { // Clean up database if (db) { await db.clear('eventTypesForSession'); } // Restore any mocked timers jest.useRealTimers(); // Restore Date.now spy if it exists if (dateNowSpy) { dateNowSpy.mockRestore(); } // Clear all mocks jest.clearAllMocks(); }); afterAll(async () => { // Close database connections if (db) { db.close(); } }); describe('storeEventTypeForSession', () => { test('should add event to stored event list', async () => { await storeEvent({ eventType: 'Add to Cart' }); await storeEvent({ eventType: 'Purchase' }); const allEntries = await getAllEntriesTyped(db); expect(allEntries).toHaveLength(1); expect(allEntries[0]).toMatchObject({ eventTypes: { 'Add to Cart': { [TEST_EVENT_TIME]: { event_type: 'Add to Cart' } }, Purchase: { [TEST_EVENT_TIME]: { event_type: 'Purchase' } }, }, sessionId: String(TEST_SESSION_ID), }); expect(typeof allEntries[0].lastUpdated).toBe('number'); }); test('should handle adding the same event twice correctly', async () => { await storeEvent({ eventType: 'Add to Cart' }); await storeEvent({ eventType: 'Add to Cart' }); const allEntries = await getAllEntriesTyped(db); expect(allEntries).toHaveLength(1); expect(allEntries[0]).toMatchObject({ eventTypes: { 'Add to Cart': { [TEST_EVENT_TIME]: { event_type: 'Add to Cart' } }, }, sessionId: String(TEST_SESSION_ID), }); expect(typeof allEntries[0].lastUpdated).toBe('number'); }); test('should add the same event with different timestamps', async () => { await storeEvent({ eventType: 'Add to Cart', eventTime: 123 }); await storeEvent({ eventType: 'Add to Cart', eventTime: 456 }); const allEntries = await getAllEntriesTyped(db); expect(allEntries).toHaveLength(1); expect(allEntries[0]).toMatchObject({ eventTypes: { 'Add to Cart': { 123: { event_type: 'Add to Cart' }, 456: { event_type: 'Add to Cart' }, }, }, sessionId: String(TEST_SESSION_ID), }); expect(typeof allEntries[0].lastUpdated).toBe('number'); }); test('should return updated list', async () => { await storeEvent({ eventType: 'Add to Cart' }); const updatedList = await targetingIDBStore.storeEventTypeForSession({ eventTime: TEST_EVENT_TIME, eventType: 'Purchase', sessionId: TEST_SESSION_ID, apiKey: TEST_API_KEY, loggerProvider: mockLogger, }); expect(updatedList).toEqual({ 'Add to Cart': { [String(TEST_EVENT_TIME)]: { event_type: 'Add to Cart' } }, Purchase: { [String(TEST_EVENT_TIME)]: { event_type: 'Purchase' } }, }); }); test('should handle errors in updateEventListForSession', async () => { const updateSpy = jest .spyOn(targetingIDBStore, 'updateEventListForSession') .mockRejectedValueOnce(new Error('update error')); await storeEvent({ loggerProvider: mockLogger }); expect(mockLogger.warn).toHaveBeenCalledWith(expect.stringContaining('Failed to store events for targeting')); updateSpy.mockRestore(); }); test('should handle errors on updating event list', async () => { const mockDB = createMockDBWithError('put'); const openDBSpy = jest.spyOn(targetingIDBStore, 'openOrCreateDB').mockResolvedValue(mockDB); await storeEvent({ loggerProvider: mockLogger }); expect(mockLogger.warn).toHaveBeenCalledWith(expect.stringContaining('Failed to store events for targeting')); openDBSpy.mockRestore(); }); test('should handle undefined transaction', async () => { const mockDB = createMockDBWithError('transaction'); const openDBSpy = jest.spyOn(targetingIDBStore, 'openOrCreateDB').mockResolvedValue(mockDB); const updatedEventTypes = await targetingIDBStore.storeEventTypeForSession({ eventTime: TEST_EVENT_TIME, eventType: 'Add to Cart', sessionId: TEST_SESSION_ID, apiKey: TEST_API_KEY, loggerProvider: mockLogger, }); expect(updatedEventTypes).toBeUndefined(); openDBSpy.mockRestore(); }); test('should delete old sessions', async () => { // Set up fake timers const oldSessionTime = new Date('2023-07-25 08:30:00').getTime(); jest.useFakeTimers().setSystemTime(oldSessionTime); dateNowSpy = jest.spyOn(Date, 'now'); // Create old session dateNowSpy.mockReturnValueOnce(oldSessionTime); const oldSessionId = oldSessionTime; await storeEvent({ sessionId: oldSessionId, loggerProvider: mockLogger, }); let allEntries = await getAllEntriesTyped(db); expect(allEntries).toHaveLength(1); expect(allEntries[0]).toMatchObject({ eventTypes: { 'Add to Cart': { [TEST_EVENT_TIME]: { event_type: 'Add to Cart' } } }, sessionId: String(oldSessionId), }); expect(allEntries[0].lastUpdated).toBe(oldSessionTime); // Advance time by 6 days (more than 2 days) const newSessionTime = oldSessionTime + 1000 * 60 * 60 * 24 * 6; jest.setSystemTime(newSessionTime); dateNowSpy.mockReturnValueOnce(newSessionTime); const newSessionId = new Date('2023-07-31 07:30:00').getTime(); await storeEvent({ sessionId: newSessionId, loggerProvider: mockLogger, }); allEntries = await getAllEntriesTyped(db); expect(allEntries).toHaveLength(1); expect(allEntries[0]).toMatchObject({ eventTypes: { 'Add to Cart': { [TEST_EVENT_TIME]: { event_type: 'Add to Cart' } } }, sessionId: String(newSessionId), }); expect(allEntries[0].lastUpdated).toBe(newSessionTime); }); test('should log error if deleteOldSessionEventTypes throws', async () => { const txUnknown: unknown = { store: { getAll: jest.fn().mockImplementation(() => { throw new Error('getAll error'); }), delete: jest.fn(), }, }; const tx = txUnknown as Parameters[0]['tx']; await targetingIDBStore.deleteOldSessionEventTypes({ currentSessionId: '1', loggerProvider: mockLogger, tx, }); expect(mockLogger.warn).toHaveBeenCalledWith( expect.stringContaining('Failed to clear old session event types for targeting:'), ); }); }); }); ================================================ FILE: packages/targeting/test/targeting.test.ts ================================================ import { Logger } from '@amplitude/analytics-types'; import { Targeting } from '../src/targeting'; import { targetingIDBStore } from '../src/targeting-idb-store'; import { flagCatchAll } from './flag-config-data/catch-all'; import { flagEventProps } from './flag-config-data/event-props'; import { flagConfigMultipleConditions } from './flag-config-data/multiple-conditions'; import { flagConfigMultipleEvents } from './flag-config-data/multiple-events'; import { flagUserProps } from './flag-config-data/user-props'; type MockedLogger = jest.Mocked; const mockEvent = { event_type: 'sign_in', time: 123, }; const mockUserProperties = {}; const mockLoggerProvider: MockedLogger = { error: jest.fn(), log: jest.fn(), disable: jest.fn(), enable: jest.fn(), warn: jest.fn(), debug: jest.fn(), }; describe('targeting', () => { describe('evaluateTargeting', () => { test('should call evaluation engine evaluate', async () => { const targeting = new Targeting(); const mockEngineEvaluate = jest.fn(); targeting.evaluationEngine.evaluate = mockEngineEvaluate; await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties: mockUserProperties, flag: flagCatchAll, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, }); expect(mockEngineEvaluate).toHaveBeenCalledWith( { user: { device_id: '1a2b3c', user_properties: mockUserProperties, }, session_id: 123, event_types: undefined, }, [flagCatchAll], ); }); test('should pass a list of event types to the evaluation engine evaluate', async () => { jest.spyOn(targetingIDBStore, 'storeEventTypeForSession').mockResolvedValueOnce({ 'Add to Cart': { 123: { event_type: 'Add to Cart' } }, Purchase: { 123: { event_type: 'Purchase' } }, }); const targeting = new Targeting(); const mockEngineEvaluate = jest.fn(); targeting.evaluationEngine.evaluate = mockEngineEvaluate; await targeting.evaluateTargeting({ deviceId: '1a2b3c', event: mockEvent, userProperties: mockUserProperties, flag: flagCatchAll, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, }); expect(mockEngineEvaluate).toHaveBeenCalledWith( { event: mockEvent, user: { device_id: '1a2b3c', user_properties: mockUserProperties, }, session_id: 123, event_types: ['Add to Cart', 'Purchase'], }, [flagCatchAll], ); }); test('should pass page to the evaluation engine when provided', async () => { const targeting = new Targeting(); const mockEngineEvaluate = jest.fn(); targeting.evaluationEngine.evaluate = mockEngineEvaluate; const page = { url: 'https://example.com/analytics/dashboard' }; await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties: mockUserProperties, flag: flagCatchAll, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, page, }); expect(mockEngineEvaluate).toHaveBeenCalledWith( expect.objectContaining({ page, user: { device_id: '1a2b3c', user_properties: mockUserProperties, }, session_id: 123, }), [flagCatchAll], ); }); test('should flatten user properties onto context.user for targeting selectors', async () => { const targeting = new Targeting(); const mockEngineEvaluate = jest.fn(); targeting.evaluationEngine.evaluate = mockEngineEvaluate; const userProperties = { country: 'Canada', subscription_tier: 'paid', }; await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties, flag: flagCatchAll, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, }); expect(mockEngineEvaluate).toHaveBeenCalledWith( expect.objectContaining({ user: expect.objectContaining({ device_id: '1a2b3c', user_properties: userProperties, country: 'Canada', subscription_tier: 'paid', }), }), [flagCatchAll], ); }); test('should not allow user properties to overwrite internal user context fields', async () => { const targeting = new Targeting(); const mockEngineEvaluate = jest.fn(); targeting.evaluationEngine.evaluate = mockEngineEvaluate; const userProperties = { country: 'Canada', device_id: 'malicious-device-id', user_properties: { spoofed: true }, }; await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties, flag: flagCatchAll, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, }); expect(mockEngineEvaluate).toHaveBeenCalledWith( expect.objectContaining({ user: expect.objectContaining({ country: 'Canada', device_id: '1a2b3c', user_properties: userProperties, }), }), [flagCatchAll], ); }); }); describe('condition tests', () => { test('should work with event properties', async () => { const targeting = new Targeting(); const targetingBucket = await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties: mockUserProperties, flag: flagEventProps, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, event: { event_type: 'Purchase', event_properties: { '[Amplitude] Page URL': 'http://localhost:3000/tasks-app', }, }, }); expect(targetingBucket['sr_targeting_config'].key).toEqual('on'); }); test('should work with a user property condition', async () => { const targeting = new Targeting(); const targetingBucket = await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties: { plan_id: 'paid', }, flag: flagUserProps, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, }); expect(targetingBucket['sr_targeting_config'].key).toEqual('on'); }); test('should work with multiple events', async () => { const targeting = new Targeting(); const targetingBucket = await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties: {}, event: { event_type: 'Add to Cart', time: 123, }, flag: flagConfigMultipleEvents, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, }); // Should not match with only one event expect(targetingBucket['sr_targeting_config'].key).toEqual('off'); const updatedTargetingBucket = await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties: {}, event: { event_type: 'Sign In', time: 123, }, flag: flagConfigMultipleEvents, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, }); console.log('targetingBucket', targetingBucket); expect(updatedTargetingBucket['sr_targeting_config'].key).toEqual('on'); }); test('should work with multiple conditions in a segment - user property and event', async () => { const targeting = new Targeting(); // Only user properties match the flag config here, bucket should be on const userPropertyTargetingBucket = await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties: { name: 'Banana', }, flag: flagConfigMultipleConditions, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, }); expect(userPropertyTargetingBucket['sr_targeting_config'].key).toEqual('on'); // Only the event type matches the flag config here, bucket should be on const eventTargetingBucket = await targeting.evaluateTargeting({ deviceId: '1a2b3c', userProperties: {}, event: { event_type: 'Sign In', time: 123, }, flag: flagConfigMultipleConditions, sessionId: 123, apiKey: 'static_key', loggerProvider: mockLoggerProvider, }); expect(eventTargetingBucket['sr_targeting_config'].key).toEqual('on'); }); }); }); ================================================ FILE: packages/targeting/test/tsconfig.json ================================================ { "extends": "../tsconfig.json", "include": ["**/*"], "compilerOptions": { "types": ["jest", "node"] } } ================================================ FILE: packages/targeting/tsconfig.es5.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "module": "commonjs", "noEmit": false, "outDir": "lib/cjs", "rootDir": "./src" } } ================================================ FILE: packages/targeting/tsconfig.esm.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "module": "es6", "noEmit": false, "outDir": "lib/esm", "rootDir": "./src" } } ================================================ FILE: packages/targeting/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "include": ["src/**/*", "test/**/*"], "compilerOptions": { "baseUrl": ".", "esModuleInterop": true, "lib": ["dom", "es2020"], "noEmit": true, "rootDir": "." } } ================================================ FILE: packages/unified/CHANGELOG.md ================================================ # Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. ## [1.1.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.1.6...@amplitude/unified@1.1.7) (2026-05-14) **Note:** Version bump only for package @amplitude/unified ## [1.1.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.1.5...@amplitude/unified@1.1.6) (2026-05-13) **Note:** Version bump only for package @amplitude/unified ## [1.1.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.1.4...@amplitude/unified@1.1.5) (2026-05-11) **Note:** Version bump only for package @amplitude/unified ## [1.1.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.1.3...@amplitude/unified@1.1.4) (2026-05-11) **Note:** Version bump only for package @amplitude/unified ## [1.1.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.1.2...@amplitude/unified@1.1.3) (2026-05-08) **Note:** Version bump only for package @amplitude/unified ## [1.1.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.1.1...@amplitude/unified@1.1.2) (2026-05-07) **Note:** Version bump only for package @amplitude/unified ## [1.1.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.1.0...@amplitude/unified@1.1.1) (2026-05-06) **Note:** Version bump only for package @amplitude/unified # [1.1.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.20...@amplitude/unified@1.1.0) (2026-04-28) ### Features * remove experimental request body compression backdoor ([#1699](https://github.com/amplitude/Amplitude-TypeScript/issues/1699)) ([98ecb9d](https://github.com/amplitude/Amplitude-TypeScript/commit/98ecb9dc1f3658cf6d0dfae1e9784335c9d33b5e)) ## [1.0.20](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.19...@amplitude/unified@1.0.20) (2026-04-22) **Note:** Version bump only for package @amplitude/unified ## [1.0.19](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.18...@amplitude/unified@1.0.19) (2026-04-21) **Note:** Version bump only for package @amplitude/unified ## [1.0.18](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.17...@amplitude/unified@1.0.18) (2026-04-16) **Note:** Version bump only for package @amplitude/unified ## [1.0.17](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.16...@amplitude/unified@1.0.17) (2026-04-14) ### Bug Fixes * **unified:** export public unified types ([#1664](https://github.com/amplitude/Amplitude-TypeScript/issues/1664)) ([daf5137](https://github.com/amplitude/Amplitude-TypeScript/commit/daf51376a5ac2b8b4abbf0c5c37a9da3a9d75c17)) ## [1.0.16](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.15...@amplitude/unified@1.0.16) (2026-04-09) **Note:** Version bump only for package @amplitude/unified ## [1.0.15](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.14...@amplitude/unified@1.0.15) (2026-04-01) **Note:** Version bump only for package @amplitude/unified ## [1.0.14](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.13...@amplitude/unified@1.0.14) (2026-03-26) **Note:** Version bump only for package @amplitude/unified ## [1.0.13](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.12...@amplitude/unified@1.0.13) (2026-03-24) **Note:** Version bump only for package @amplitude/unified ## [1.0.12](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.11...@amplitude/unified@1.0.12) (2026-03-24) **Note:** Version bump only for package @amplitude/unified ## [1.0.11](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.10...@amplitude/unified@1.0.11) (2026-03-23) **Note:** Version bump only for package @amplitude/unified ## [1.0.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.9...@amplitude/unified@1.0.10) (2026-03-20) **Note:** Version bump only for package @amplitude/unified ## [1.0.9](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.8...@amplitude/unified@1.0.9) (2026-03-19) **Note:** Version bump only for package @amplitude/unified ## [1.0.8](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.7...@amplitude/unified@1.0.8) (2026-03-17) **Note:** Version bump only for package @amplitude/unified ## [1.0.7](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.6...@amplitude/unified@1.0.7) (2026-03-16) **Note:** Version bump only for package @amplitude/unified ## [1.0.6](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.5...@amplitude/unified@1.0.6) (2026-03-13) **Note:** Version bump only for package @amplitude/unified ## [1.0.5](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.4...@amplitude/unified@1.0.5) (2026-03-12) ### Bug Fixes * **unified:** should not throw an error on multiple initAll calls ([#1585](https://github.com/amplitude/Amplitude-TypeScript/issues/1585)) ([10e191a](https://github.com/amplitude/Amplitude-TypeScript/commit/10e191a24600ebe767040d58e231852185f07a30)) ## [1.0.4](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.3...@amplitude/unified@1.0.4) (2026-03-11) **Note:** Version bump only for package @amplitude/unified ## [1.0.3](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.2...@amplitude/unified@1.0.3) (2026-03-09) **Note:** Version bump only for package @amplitude/unified ## [1.0.2](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.1...@amplitude/unified@1.0.2) (2026-03-06) ### Bug Fixes * **session-replay:** guarantee in-order batch delivery including retries ([#1576](https://github.com/amplitude/Amplitude-TypeScript/issues/1576)) ([0afcac6](https://github.com/amplitude/Amplitude-TypeScript/commit/0afcac6cd42b999b74ba797717f7cf0d447029ef)) ## [1.0.2-beta.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.1...@amplitude/unified@1.0.2-beta.0) (2026-03-06) ### Bug Fixes * **session-replay:** guarantee in-order batch delivery including retries ([#1576](https://github.com/amplitude/Amplitude-TypeScript/issues/1576)) ([0afcac6](https://github.com/amplitude/Amplitude-TypeScript/commit/0afcac6cd42b999b74ba797717f7cf0d447029ef)) ## [1.0.2-in-order.0](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.1...@amplitude/unified@1.0.2-in-order.0) (2026-03-06) **Note:** Version bump only for package @amplitude/unified ## [1.0.1](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.41...@amplitude/unified@1.0.1) (2026-03-05) ### Bug Fixes * **unified:** promote to GA ([#1574](https://github.com/amplitude/Amplitude-TypeScript/issues/1574)) ([0021158](https://github.com/amplitude/Amplitude-TypeScript/commit/00211581ed150b3f8ad55a15876522c2b37e9c50)) # [1.0.0-beta.41](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.40...@amplitude/unified@1.0.0-beta.41) (2026-03-05) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.40](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.39...@amplitude/unified@1.0.0-beta.40) (2026-03-03) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.39](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.38...@amplitude/unified@1.0.0-beta.39) (2026-03-03) ### Features * manual opt in gzip ([#1568](https://github.com/amplitude/Amplitude-TypeScript/issues/1568)) ([303c130](https://github.com/amplitude/Amplitude-TypeScript/commit/303c130429c51b0913f3903db4ace5263e1c78e7)) # [1.0.0-beta.38](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.37...@amplitude/unified@1.0.0-beta.38) (2026-02-26) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.37](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.36...@amplitude/unified@1.0.0-beta.37) (2026-02-24) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.36](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.35...@amplitude/unified@1.0.0-beta.36) (2026-02-20) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.35](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.34...@amplitude/unified@1.0.0-beta.35) (2026-02-19) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.34](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.33...@amplitude/unified@1.0.0-beta.34) (2026-02-17) ### Features * **analytics-browser:** add setIdentity() ([#1517](https://github.com/amplitude/Amplitude-TypeScript/issues/1517)) ([314b3c1](https://github.com/amplitude/Amplitude-TypeScript/commit/314b3c1b7ee5b0ef135848a66156eb2874daec5f)) # [1.0.0-beta.33](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.32...@amplitude/unified@1.0.0-beta.33) (2026-02-10) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.32](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.31...@amplitude/unified@1.0.0-beta.32) (2026-01-26) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.31](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.30...@amplitude/unified@1.0.0-beta.31) (2026-01-21) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.30](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.29...@amplitude/unified@1.0.0-beta.30) (2026-01-15) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.29](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.28...@amplitude/unified@1.0.0-beta.29) (2026-01-14) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.28](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.27...@amplitude/unified@1.0.0-beta.28) (2026-01-14) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.27](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.26...@amplitude/unified@1.0.0-beta.27) (2025-12-30) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.26](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.25...@amplitude/unified@1.0.0-beta.26) (2025-12-24) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.25](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.24...@amplitude/unified@1.0.0-beta.25) (2025-12-22) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.24](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.23...@amplitude/unified@1.0.0-beta.24) (2025-12-16) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.23](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.22...@amplitude/unified@1.0.0-beta.23) (2025-12-12) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.22](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.21...@amplitude/unified@1.0.0-beta.22) (2025-12-09) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.21](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.20...@amplitude/unified@1.0.0-beta.21) (2025-12-08) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.20](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.19...@amplitude/unified@1.0.0-beta.20) (2025-12-05) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.19](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.18...@amplitude/unified@1.0.0-beta.19) (2025-11-21) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.18](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.17...@amplitude/unified@1.0.0-beta.18) (2025-11-20) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.17](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.16...@amplitude/unified@1.0.0-beta.17) (2025-11-17) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.16](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.15...@amplitude/unified@1.0.0-beta.16) (2025-11-17) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.15](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.14...@amplitude/unified@1.0.0-beta.15) (2025-11-05) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.14](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.13...@amplitude/unified@1.0.0-beta.14) (2025-10-29) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.13](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.12...@amplitude/unified@1.0.0-beta.13) (2025-10-23) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.12](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.11...@amplitude/unified@1.0.0-beta.12) (2025-10-23) ### Bug Fixes * **unified:** export Identify and Revenue ([#1363](https://github.com/amplitude/Amplitude-TypeScript/issues/1363)) ([a47b8c9](https://github.com/amplitude/Amplitude-TypeScript/commit/a47b8c9fb0f59567ef7afb00f70aede885d949d1)) # [1.0.0-beta.11](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.10...@amplitude/unified@1.0.0-beta.11) (2025-10-21) **Note:** Version bump only for package @amplitude/unified # [1.0.0-beta.10](https://github.com/amplitude/Amplitude-TypeScript/compare/@amplitude/unified@1.0.0-beta.9...@amplitude/unified@1.0.0-beta.10) (2025-10-17) **Note:** Version bump only for package @amplitude/unified # Changelog ## 1.0.0-beta.9 (2025-10-06) - Release 1.0.0-beta.9 ## 1.0.0-beta.7 (2025-10-06) - Release 1.0.0-beta.7 ## 1.0.0-beta.6 (2025-10-02) - Release 1.0.0-beta.6 ## 1.0.0-beta.5 (2025-06-25) - Release 1.0.0-beta.5 ## 1.0.0-beta.4 (2025-06-25) - Release 1.0.0-beta.4 ## 1.0.0-beta.3 (2025-06-25) - Release 1.0.0-beta.3 ================================================ FILE: packages/unified/README.md ================================================


# @amplitude/unified Official Amplitude SDK for Web analytics, experiment, session replay, Guides and Surveys, and more. ## Installation This package is published on NPM registry and is available to be installed using npm and yarn. ```sh # npm npm install @amplitude/unified # yarn yarn add @amplitude/unified ``` ## Usage The Unified SDK provides a single entry point for all Amplitude features, including Analytics, Experiment, and Session Replay. It simplifies the integration process by handling the initialization and configuration of all components. ### 1. Import Amplitude Unified SDK ```typescript import { initAll } from '@amplitude/unified'; ``` ### 2. Initialize the SDK ```typescript initAll('YOUR_API_KEY', { // Shared options for all SDKs (optional) serverZone: 'US', // or 'EU' instanceName: 'my-instance', // Analytics options analytics: { // Analytics configuration options }, // Session Replay options sessionReplay: { // Session Replay configuration options }, // Experiment options experiment: { // Experiment configuration options }, // Guides and Surveys options engagement: { // Guides and Surveys configuration options }, }); ``` ### 3. Access SDK Features The Unified SDK provides access to all Amplitude features through a single interface: ```typescript import { track, identify, experiment, sessionReplay } from '@amplitude/unified'; // Track events track('Button Clicked', { buttonName: 'Sign Up' }); // Identify users identify(new Identify().set('userType', 'premium')); // Access Experiment features const variant = await experiment.fetch('experiment-key'); // Access Session Replay features sessionReplay.flush(); // Access Guides and Surveys features via engagement global const activeGuidesAndSurveys = await engagement.gs.list(); ``` ## Configuration Options ### Shared Options | Name | Type | Default | Description | | -------------- | ---------------- | ----------- | ------------------------------------------- | | `serverZone` | `'US'` or `'EU'` | `'US'` | The server zone to use for all SDKs. | | `instanceName` | `string` | `undefined` | A unique name for this instance of the SDK. | ### Analytics Options All options from `@amplitude/analytics-browser` are supported. See the [Analytics Browser SDK documentation](https://www.docs.developers.amplitude.com/analytics/browser/) for details. ### Session Replay Options All options from `@amplitude/plugin-session-replay-browser` are supported. See the [Session Replay documentation](https://www.docs.developers.amplitude.com/session-replay/) for details. ### Experiment Options All options from `@amplitude/plugin-experiment-browser` are supported. See the [Experiment documentation](https://www.docs.developers.amplitude.com/experiment/) for details. ### Guides and Surveys Options All options from `@amplitude/engagement-browser` are supported. See the [Guides and Surveys documentation](hhttps://amplitude.com/docs/guides-and-surveys/sdk) for details. ## Learn More - [Analytics Browser SDK Documentation](https://amplitude.com/docs/sdks/analytics/browser/browser-sdk-2) - [Session Replay Documentation](https://amplitude.com/docs/session-replay/session-replay-standalone-sdk) - [Experiment Documentation](https://amplitude.com/docs/sdks/experiment-sdks/experiment-javascript) - [Guides and Surveys SDK Documentation](https://amplitude.com/docs/guides-and-surveys/sdk) ================================================ FILE: packages/unified/__mocks__/@amplitude/engagement-browser.js ================================================ // Manual mock for @amplitude/engagement-browser // This prevents the engagement plugin from loading external scripts during tests. // The engagement plugin loads external scripts from a CDN during initialization, // which causes issues in jsdom test environment: // 1. jsdom doesn't actually fetch/execute external scripts // 2. Script onload events never fire, causing promises to hang indefinitely // 3. Tests would timeout waiting for initialization that never completes // This mock provides a simple plugin interface that resolves immediately. module.exports = { plugin: jest.fn(() => ({ name: '@amplitude/engagement-plugin', type: 'enrichment', setup: jest.fn().mockResolvedValue(undefined), execute: jest.fn().mockResolvedValue(undefined), })), }; ================================================ FILE: packages/unified/jest.config.js ================================================ const baseConfig = require('../../jest.config.js'); const package = require('./package'); module.exports = { ...baseConfig, displayName: package.name, rootDir: '.', testEnvironment: 'jsdom', coveragePathIgnorePatterns: ['index.ts'], }; ================================================ FILE: packages/unified/package.json ================================================ { "name": "@amplitude/unified", "version": "1.1.7", "description": "Official Amplitude SDK for Web analytics, experiment, session replay, and more.", "keywords": [ "amplitude", "analytics", "experiment", "session replay" ], "repository": { "type": "git", "url": "git+https://github.com/amplitude/Amplitude-TypeScript.git" }, "author": "Amplitude Inc", "license": "MIT", "main": "lib/cjs/index.js", "module": "lib/esm/index.js", "types": "lib/esm/index.d.ts", "sideEffects": false, "bugs": { "url": "https://github.com/amplitude/Amplitude-TypeScript/issues" }, "publishConfig": { "access": "public", "tag": "latest" }, "files": [ "lib" ], "scripts": { "build": "pnpm bundle && pnpm build:es5 && pnpm build:esm", "bundle": "rollup --config rollup.config.js", "build:es5": "tsc -p ./tsconfig.es5.json", "build:esm": "tsc -p ./tsconfig.esm.json", "watch": "tsc -p ./tsconfig.esm.json --watch", "clean": "rimraf node_modules lib coverage", "fix": "pnpm fix:eslint & pnpm fix:prettier", "fix:eslint": "eslint '{src,test}/**/*.ts' --fix", "fix:prettier": "prettier --write \"{src,test}/**/*.ts\"", "lint": "pnpm lint:eslint & pnpm lint:prettier", "lint:eslint": "eslint '{src,test}/**/*.ts'", "lint:prettier": "prettier --check \"{src,test}/**/*.ts\"", "test": "jest", "typecheck": "tsc -p ./tsconfig.json", "version": "pnpm version-file && GENERATE_SNIPPET=true pnpm build", "version-file": "echo '// Autogenerated by `pnpm version-file`. DO NOT EDIT' > src/version.ts && node -p \"'export const VERSION = \\'' + require('./package.json').version + '\\';'\" >> src/version.ts" }, "dependencies": { "@amplitude/analytics-browser": "workspace:*", "@amplitude/analytics-core": "workspace:*", "@amplitude/engagement-browser": "^1.0.3", "@amplitude/plugin-experiment-browser": "workspace:*", "@amplitude/plugin-session-replay-browser": "workspace:*" }, "devDependencies": { "rollup": "^2.79.1" } } ================================================ FILE: packages/unified/rollup.config.js ================================================ import { umd } from '../../scripts/build/rollup.config'; // Disable dynamic imports to avoid issues with the session replay browser export default [{ ...umd, inlineDynamicImports: true, }]; ================================================ FILE: packages/unified/src/index.ts ================================================ /* eslint-disable @typescript-eslint/unbound-method */ import client from './unified-client-factory'; export { createInstance } from './unified-client-factory'; export type { UnifiedClient, UnifiedOptions, UnifiedSharedOptions } from './unified'; export const { _setDiagnosticsSampleRate, initAll, experiment, sessionReplay, add, extendSession, flush, getDeviceId, getIdentity, getOptOut, getSessionId, getUserId, groupIdentify, identify, logEvent, remove, reset, revenue, setDeviceId, setGroup, setIdentity, setOptOut, setSessionId, setTransport, setUserId, track, } = client; export { Types, Revenue, Identify } from '@amplitude/analytics-browser'; ================================================ FILE: packages/unified/src/library.ts ================================================ import { Types } from '@amplitude/analytics-browser'; import { VERSION } from './version'; const LIBPREFIX = 'amplitude-ts-unified'; export const libraryPlugin = (): Types.EnrichmentPlugin => { return { type: 'enrichment', name: '@amplitude/unified-library-plugin', async execute(event: Types.Event): Promise { event.library = `${LIBPREFIX}/${VERSION}-${event.library ?? ''}`; return event; }, }; }; ================================================ FILE: packages/unified/src/unified-client-factory.ts ================================================ import { AmplitudeUnified, UnifiedClient } from './unified'; import { debugWrapper, getClientLogConfig, getClientStates } from '@amplitude/analytics-core'; export const createInstance = (): UnifiedClient => { const client = new AmplitudeUnified(); return { _setDiagnosticsSampleRate: debugWrapper( client._setDiagnosticsSampleRate.bind(client), '_setDiagnosticsSampleRate', getClientLogConfig(client), getClientStates(client, ['config']), ), experiment: debugWrapper( client.experiment.bind(client), 'experiment', getClientLogConfig(client), getClientStates(client, ['config']), ), sessionReplay: debugWrapper( client.sessionReplay.bind(client), 'sessionReplay', getClientLogConfig(client), getClientStates(client, ['config']), ), initAll: debugWrapper( client.initAll.bind(client), 'initAll', getClientLogConfig(client), getClientStates(client, ['config']), ), init: debugWrapper( client.init.bind(client), 'init', getClientLogConfig(client), getClientStates(client, ['config']), ), add: debugWrapper( client.add.bind(client), 'add', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins']), ), remove: debugWrapper( client.remove.bind(client), 'remove', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.plugins']), ), track: debugWrapper( client.track.bind(client), 'track', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), logEvent: debugWrapper( client.logEvent.bind(client), 'logEvent', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), identify: debugWrapper( client.identify.bind(client), 'identify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), groupIdentify: debugWrapper( client.groupIdentify.bind(client), 'groupIdentify', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), setGroup: debugWrapper( client.setGroup.bind(client), 'setGroup', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), revenue: debugWrapper( client.revenue.bind(client), 'revenue', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), flush: debugWrapper( client.flush.bind(client), 'flush', getClientLogConfig(client), getClientStates(client, ['config.apiKey', 'timeline.queue.length']), ), getUserId: debugWrapper( client.getUserId.bind(client), 'getUserId', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId']), ), setUserId: debugWrapper( client.setUserId.bind(client), 'setUserId', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId']), ), getDeviceId: debugWrapper( client.getDeviceId.bind(client), 'getDeviceId', getClientLogConfig(client), getClientStates(client, ['config', 'config.deviceId']), ), setDeviceId: debugWrapper( client.setDeviceId.bind(client), 'setDeviceId', getClientLogConfig(client), getClientStates(client, ['config', 'config.deviceId']), ), reset: debugWrapper( client.reset.bind(client), 'reset', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId', 'config.deviceId']), ), getSessionId: debugWrapper( client.getSessionId.bind(client), 'getSessionId', getClientLogConfig(client), getClientStates(client, ['config']), ), setSessionId: debugWrapper( client.setSessionId.bind(client), 'setSessionId', getClientLogConfig(client), getClientStates(client, ['config']), ), extendSession: debugWrapper( client.extendSession.bind(client), 'extendSession', getClientLogConfig(client), getClientStates(client, ['config']), ), setOptOut: debugWrapper( client.setOptOut.bind(client), 'setOptOut', getClientLogConfig(client), getClientStates(client, ['config']), ), getOptOut: debugWrapper( client.getOptOut.bind(client), 'getOptOut', getClientLogConfig(client), getClientStates(client, ['config']), ), setTransport: debugWrapper( client.setTransport.bind(client), 'setTransport', getClientLogConfig(client), getClientStates(client, ['config']), ), getIdentity: debugWrapper( client.getIdentity.bind(client), 'getIdentity', getClientLogConfig(client), getClientStates(client, ['config']), ), setIdentity: debugWrapper( client.setIdentity.bind(client), 'setIdentity', getClientLogConfig(client), getClientStates(client, ['config', 'config.userId', 'config.deviceId']), ), }; }; export default createInstance(); ================================================ FILE: packages/unified/src/unified.ts ================================================ import { AmplitudeBrowser } from '@amplitude/analytics-browser'; import { AmplitudeSessionReplay, SessionReplayOptions, sessionReplayPlugin, SessionReplayPlugin, } from '@amplitude/plugin-session-replay-browser'; import { IExperimentClient, ExperimentPluginConfig, ExperimentPlugin, experimentPlugin, } from '@amplitude/plugin-experiment-browser'; import { InitOptions, plugin as EngagementPlugin } from '@amplitude/engagement-browser'; import { BrowserClient, BrowserOptions } from '@amplitude/analytics-core'; import { libraryPlugin } from './library'; export interface UnifiedSharedOptions { serverZone?: 'US' | 'EU'; instanceName?: string; } export type UnifiedOptions = UnifiedSharedOptions & { analytics?: BrowserOptions; sessionReplay?: Omit; experiment?: Omit; engagement?: Omit; }; export interface UnifiedClient extends BrowserClient { initAll(apiKey: string, unifiedOptions?: UnifiedOptions): Promise; sessionReplay(): AmplitudeSessionReplay; experiment(): IExperimentClient | undefined; } export class AmplitudeUnified extends AmplitudeBrowser implements UnifiedClient { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore private _sessionReplay: AmplitudeSessionReplay; private _initAllPromise?: Promise; sessionReplay(): AmplitudeSessionReplay { return this._sessionReplay; } experiment(): IExperimentClient | undefined { // Return when init() or initAll() is not called if (this.config === undefined) { return undefined; } const expPlugins = this.plugins(ExperimentPlugin); if (expPlugins.length === 0) { this.config.loggerProvider.debug(`${ExperimentPlugin.pluginName} plugin is not found.`); return undefined; } else if (expPlugins.length === 1) { return expPlugins[0].experiment; } else { this.config.loggerProvider.debug(`Multiple instances of ${ExperimentPlugin.pluginName} are found.`); return undefined; } } /** * Initialize SDKs with configuration options. * * @param apiKey Amplitude API key. * @param analyticsOptions Analytics configuration options. Refer to {@link https://amplitude.com/docs/sdks/analytics/browser/browser-sdk-2#configure-the-sdk here} for more info. * @param unifiedOptions Shared configuration for all SDKs and for blade SDKs. */ async initAll(apiKey: string, unifiedOptions?: UnifiedOptions) { if (this._initAllPromise) { return this._initAllPromise; } this._initAllPromise = (async () => { const sharedOptions = { serverZone: unifiedOptions?.serverZone, instanceName: unifiedOptions?.instanceName, }; super.add(libraryPlugin()); await super.init(apiKey, { ...unifiedOptions?.analytics, ...sharedOptions }).promise; await super.add(sessionReplayPlugin({ ...unifiedOptions?.sessionReplay, ...sharedOptions })).promise; await super.add(experimentPlugin({ ...unifiedOptions?.experiment, ...sharedOptions })).promise; const srPlugin = this.plugin(SessionReplayPlugin.pluginName); if (srPlugin === undefined) { this.config.loggerProvider.debug(`${SessionReplayPlugin.pluginName} plugin is not found.`); } else { this._sessionReplay = (srPlugin as SessionReplayPlugin).sessionReplay; } await super.add( EngagementPlugin({ ...unifiedOptions?.engagement, ...sharedOptions, }), ).promise; })().finally(() => { this._initAllPromise = undefined; }); return this._initAllPromise; } /** * Only analytics SDK is initialized. Use initAll() instead to initialize all blade SDKs. */ /* istanbul ignore next */ init(apiKey = '', userIdOrOptions?: string | BrowserOptions, maybeOptions?: BrowserOptions) { const res = super.init(apiKey, userIdOrOptions, maybeOptions); return res; } } ================================================ FILE: packages/unified/src/version.ts ================================================ // Autogenerated by `pnpm version-file`. DO NOT EDIT export const VERSION = '1.1.7'; ================================================ FILE: packages/unified/test/index.test.ts ================================================ import * as amplitude from '../src/index'; import { sessionReplay, experiment } from '../src/index'; import type { UnifiedClient, UnifiedOptions, UnifiedSharedOptions } from '../src/index'; test('should return non undefined sessionReplay and experiment after initAll() by import method 1 & 2', async () => { // Test that methods work before and after initAll() expect(amplitude.sessionReplay()).toBeUndefined(); expect(amplitude.experiment()).toBeUndefined(); await amplitude.initAll('test-api-key'); // Method 1: import * as amplitude should work expect(amplitude.sessionReplay()).toBeDefined(); expect(amplitude.experiment()).toBeDefined(); // Method 2: named imports { initAll, sessionReplay, experiment } should work expect(sessionReplay()).toBeDefined(); expect(experiment()).toBeDefined(); }); test('should export unified public types from the package entry point', () => { const sharedOptions: UnifiedSharedOptions = { serverZone: 'US', }; const options: UnifiedOptions = { ...sharedOptions, analytics: {}, }; const client: UnifiedClient = amplitude.createInstance(); expect(options).toBeDefined(); expect(client).toBeDefined(); }); ================================================ FILE: packages/unified/test/library.test.ts ================================================ import { libraryPlugin } from '../src/library'; import { Types } from '@amplitude/analytics-browser'; import { VERSION } from '../src/version'; describe('libraryPlugin', () => { test('should prepend the correct library prefix and version to an event', async () => { const plugin = libraryPlugin(); const originalLibrary = 'amplitude-ts/2.11.0'; const event: Types.Event = { event_type: 'test_event', library: originalLibrary }; const result = await plugin.execute?.(event); expect(result?.library).toMatch(`amplitude-ts-unified/${VERSION}-${originalLibrary}`); }); test('should handle when library is undefined', async () => { const plugin = libraryPlugin(); const event: Types.Event = { event_type: 'test_event' }; const result = await plugin.execute?.(event); expect(result?.library).toMatch(`amplitude-ts-unified/${VERSION}-`); }); it('should have the correct plugin type and name', () => { const plugin = libraryPlugin(); expect(plugin.type).toBe('enrichment'); expect(plugin.name).toBe('@amplitude/unified-library-plugin'); }); }); ================================================ FILE: packages/unified/test/unified-client-factory.test.ts ================================================ import instance from '../src/unified-client-factory'; test('should create a UnifiedClient instance with expected methods', () => { expect(instance).toHaveProperty('experiment'); expect(instance).toHaveProperty('sessionReplay'); expect(typeof instance.initAll).toBe('function'); expect(typeof instance.init).toBe('function'); expect(typeof instance.add).toBe('function'); expect(typeof instance.remove).toBe('function'); expect(typeof instance.track).toBe('function'); expect(typeof instance.logEvent).toBe('function'); expect(typeof instance.identify).toBe('function'); expect(typeof instance.groupIdentify).toBe('function'); expect(typeof instance.setGroup).toBe('function'); expect(typeof instance.revenue).toBe('function'); expect(typeof instance.flush).toBe('function'); expect(typeof instance.getUserId).toBe('function'); expect(typeof instance.setUserId).toBe('function'); expect(typeof instance.getDeviceId).toBe('function'); expect(typeof instance.setDeviceId).toBe('function'); expect(typeof instance.reset).toBe('function'); expect(typeof instance.getSessionId).toBe('function'); expect(typeof instance.setSessionId).toBe('function'); expect(typeof instance.extendSession).toBe('function'); expect(typeof instance.setOptOut).toBe('function'); expect(typeof instance.setTransport).toBe('function'); }); test('should return non undefined sessionReplay and experiment after initAll() by import method 3', async () => { // Method 3: import {createInstance} from '@amplitude/unified' // Test that sessionReplay and experiment are undefined before initAll() expect(instance.sessionReplay()).toBeUndefined(); expect(instance.experiment()).toBeUndefined(); // Initialize with a test API key await instance.initAll('test-api-key'); // Test that sessionReplay and experiment are defined after initAll() expect(instance.sessionReplay()).toBeDefined(); expect(instance.experiment()).toBeDefined(); }); ================================================ FILE: packages/unified/test/unified-constructor-coverage.test.ts ================================================ jest.mock('@amplitude/analytics-browser', () => { function AmplitudeBrowserMock() { return undefined; } return { AmplitudeBrowser: AmplitudeBrowserMock, }; }); import { AmplitudeUnified } from '../src/unified'; describe('AmplitudeUnified instantiation coverage', () => { test('covers class instantiation when super call returns undefined', () => { const client = new AmplitudeUnified(); expect(client).toBeDefined(); }); }); ================================================ FILE: packages/unified/test/unified.test.ts ================================================ import { AmplitudeUnified } from '../src/unified'; import { AmplitudeBrowser } from '@amplitude/analytics-browser'; import { ILogger } from '@amplitude/analytics-core'; import { SessionReplayPlugin } from '@amplitude/plugin-session-replay-browser'; import { experimentPlugin, ExperimentPlugin } from '@amplitude/plugin-experiment-browser'; import * as libraryModule from '../src/library'; type MockedLogger = jest.Mocked; describe('AmplitudeUnified', () => { const mockLoggerProviderDebug = jest.fn(); const mockLoggerProvider: MockedLogger = { error: jest.fn(), log: jest.fn(), disable: jest.fn(), enable: jest.fn(), warn: jest.fn(), debug: mockLoggerProviderDebug, }; describe('constructor', () => { test('should construct client with no in-flight initAll promise', () => { const client = new AmplitudeUnified() as unknown as { _initAllPromise?: Promise }; expect(client._initAllPromise).toBeUndefined(); }); }); describe('initAll', () => { test.each([ { analytics: { loggerProvider: mockLoggerProvider, }, }, undefined, ])('should initialize all plugins and assign sr and experiment properties', async (unifiedOptions) => { const client = new AmplitudeUnified(); expect(client.sessionReplay()).toBeUndefined(); expect(client.experiment()).toBeUndefined(); await client.initAll('test-api-key', unifiedOptions); expect(client.sessionReplay()).toBeDefined(); expect(client.experiment()).toBeDefined(); }); test('should log when sr plugin is not found', async () => { const client = new AmplitudeUnified(); const originalPlugin = client.plugin.bind(client); jest.spyOn(client, 'plugin').mockImplementation((name) => { if (name === SessionReplayPlugin.pluginName) return undefined; return originalPlugin(name); }); expect(client.sessionReplay()).toBeUndefined(); expect(client.experiment()).toBeUndefined(); await client.initAll('test-api-key', { analytics: { loggerProvider: mockLoggerProvider, }, }); expect(client.sessionReplay()).toBeUndefined(); expect(mockLoggerProviderDebug).toHaveBeenCalledWith(`${SessionReplayPlugin.pluginName} plugin is not found.`); expect(client.experiment()).toBeDefined(); }); test('should log when experiment plugin is not found', async () => { const client = new AmplitudeUnified(); jest.spyOn(client, 'plugins').mockImplementation((_) => { return []; }); expect(client.sessionReplay()).toBeUndefined(); expect(client.experiment()).toBeUndefined(); await client.initAll('test-api-key', { analytics: { loggerProvider: mockLoggerProvider, }, }); expect(client.sessionReplay()).toBeDefined(); expect(client.experiment()).toBeUndefined(); expect(mockLoggerProviderDebug).toHaveBeenCalledWith(`${ExperimentPlugin.pluginName} plugin is not found.`); }); test('should log when multiple experiment instances are not found', async () => { const client = new AmplitudeUnified(); jest.spyOn(client, 'plugins').mockImplementation((_) => { return []; }); expect(client.sessionReplay()).toBeUndefined(); expect(client.experiment()).toBeUndefined(); await client.initAll('test-api-key', { analytics: { loggerProvider: mockLoggerProvider, }, }); expect(client.sessionReplay()).toBeDefined(); expect(client.experiment()).toBeUndefined(); expect(mockLoggerProviderDebug).toHaveBeenCalledWith(`${ExperimentPlugin.pluginName} plugin is not found.`); }); test('should add library plugin', async () => { const spy = jest.spyOn(libraryModule, 'libraryPlugin'); const client = new AmplitudeUnified(); await client.initAll('test-api-key'); expect(spy).toHaveBeenCalled(); }); test('should not throw when called concurrently without await', async () => { const client = new AmplitudeUnified(); const p1 = client.initAll('test-api-key'); const p2 = client.initAll('test-api-key'); await expect(Promise.all([p1, p2])).resolves.toEqual([undefined, undefined]); }); test('should wait for in-flight initAll for concurrent callers', async () => { const client = new AmplitudeUnified(); const originalInit = (AmplitudeBrowser.prototype as any)._init as (...args: any[]) => Promise; let unblockInit: () => void; const initBlocked = new Promise((resolve) => { unblockInit = resolve; }); const initSpy = jest .spyOn(AmplitudeBrowser.prototype as any, '_init') .mockImplementation(async function (this: AmplitudeBrowser, ...args: unknown[]) { await initBlocked; return originalInit.apply(this, args); }); const p1 = client.initAll('test-api-key'); const p2 = client.initAll('test-api-key'); let secondCallResolved = false; void p2.then(() => { secondCallResolved = true; }); await Promise.resolve(); expect(secondCallResolved).toBe(false); unblockInit!(); await Promise.all([p1, p2]); expect(initSpy).toHaveBeenCalledTimes(1); }); }); describe('init', () => { test('init should initialize only analytics SDK and log', () => { const client = new AmplitudeUnified(); const res = client.init('test-api-key', { loggerProvider: mockLoggerProvider, }); expect(res).toBeDefined(); }); }); describe('experiment method', () => { test('should return undefined and log when multiple experiment instances', async () => { const client = new AmplitudeUnified(); const experimentPlugin2 = experimentPlugin(); // Have to change name because plugin with existing name will be ignored at registration experimentPlugin2.name = '@amplitude/experiment-analytics-plugin-2'; await client.initAll('test-api-key', { analytics: { loggerProvider: mockLoggerProvider, }, }); await client.add(experimentPlugin2).promise; expect(client.plugin('@amplitude/experiment-analytics-plugin-2')).toBeDefined(); expect(client.experiment()).toBeUndefined(); expect(mockLoggerProviderDebug).toHaveBeenCalledWith( `Multiple instances of ${ExperimentPlugin.pluginName} are found.`, ); }); }); }); ================================================ FILE: packages/unified/tsconfig.es5.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "module": "commonjs", "noEmit": false, "outDir": "lib/cjs", "rootDir": "./src" } } ================================================ FILE: packages/unified/tsconfig.esm.json ================================================ { "extends": "./tsconfig.json", "include": ["src/**/*"], "compilerOptions": { "module": "es6", "noEmit": false, "outDir": "lib/esm", "rootDir": "./src" } } ================================================ FILE: packages/unified/tsconfig.json ================================================ { "extends": "../../tsconfig.json", "include": ["src/**/*", "test/**/*"], "compilerOptions": { "baseUrl": ".", "esModuleInterop": true, "lib": ["dom"], "noEmit": true, "rootDir": ".", } } ================================================ FILE: playwright.config.ts ================================================ import { defineConfig, devices } from '@playwright/test'; export default defineConfig({ testDir: '.', fullyParallel: true, forbidOnly: !!process.env.CI, retries: process.env.CI ? 2 : 0, workers: process.env.CI ? 1 : undefined, reporter: process.env.CI ? [['html'], ['github']] : 'html', use: { baseURL: 'http://localhost:5173', trace: process.env.CI ? 'on' : 'on-first-retry', actionTimeout: 30000, navigationTimeout: 30000, ignoreHTTPSErrors: true, // Capture screenshot on failure screenshot: 'only-on-failure', // Record video for all tests in CI video: process.env.CI ? 'on' : 'retain-on-failure', }, projects: [ { name: 'chromium', use: { ...devices['Desktop Chrome'] }, }, // TODO: Get this working again // { // name: 'firefox', // use: { // ...devices['Desktop Firefox'], // launchOptions: { // firefoxUserPrefs: { // 'network.http.connection-retry-timeout': 0, // 'network.http.max-connections-per-server': 10, // }, // }, // }, // }, { name: 'webkit', use: { ...devices['Desktop Safari'] }, }, ], webServer: { command: 'yarn start', url: 'http://localhost:5173', reuseExistingServer: true, timeout: 120000, }, testMatch: '**/e2e/**/*.spec.ts', testIgnore: [ '**/test-server/dist/**', // session-replay-browser e2e tests are local sanity checks only — not yet // wired into CI (requires a real remote config + SR API setup). Run manually // with `npx playwright test packages/session-replay-browser/e2e/`. '**/session-replay-browser/e2e/**', ], timeout: 30000, }); ================================================ FILE: pnpm-workspace.yaml ================================================ packages: - packages/* - apps/* - examples/react-native/app blockExoticSubdeps: true minimumReleaseAge: 4320 minimumReleaseAgeExclude: - '@amplitude/*' # These are dependencies that run the postinstall script # Only add dependencies to this if they have been vetted for security onlyBuiltDependencies: - core-js - esbuild - msw - nx - unrs-resolver trustPolicy: true ================================================ FILE: scripts/README.md ================================================ # Scripts This directory contains utility scripts for the Amplitude TypeScript monorepo. ## check-deprecated-packages.sh Runs in CI to prevent new dependencies on deprecated packages. **Deprecated packages:** - `@amplitude/analytics-types` - `@amplitude/analytics-client-common` - `@amplitude/analytics-remote-config` **Replacements:** - For `@amplitude/analytics-types` and `@amplitude/analytics-client-common`: Use `@amplitude/analytics-core` - For `@amplitude/analytics-remote-config`: Use the new remote config client in `@amplitude/analytics-core` **How it works:** - Compares `package.json` files between the base branch and PR branch - Detects new dependencies on deprecated packages - Allows existing dependencies to remain (grandfathered in) - Fails the CI build if new usage is detected **Running locally:** ```bash # Requires a git repository with a base branch to compare against GITHUB_BASE_REF=main bash scripts/check-deprecated-packages.sh ``` **Testing the script:** To test if the check would catch a new dependency: 1. Add a deprecated package to a `package.json` file 2. Run the script with your base branch: `GITHUB_BASE_REF=main bash scripts/check-deprecated-packages.sh` 3. The script should fail and report the new dependency 4. Revert your test changes **CI Integration:** This check runs automatically on all pull requests via the `check-deprecated-packages` job in `.github/workflows/ci-nx.yml`. ================================================ FILE: scripts/build/rollup.config.js ================================================ import typescript from '@rollup/plugin-typescript'; import commonjs from '@rollup/plugin-commonjs'; import resolve from '@rollup/plugin-node-resolve'; import { terser } from 'rollup-plugin-terser'; import gzip from 'rollup-plugin-gzip'; import execute from 'rollup-plugin-execute'; import json from '@rollup/plugin-json'; import sourcemaps from 'rollup-plugin-sourcemaps'; import { exec } from 'child_process'; import fs from 'fs'; import { brotliCompress } from 'zlib'; import { promisify } from 'util'; const brotliPromise = promisify(brotliCompress); // The paths are relative to process.cwd(), which are packages/* const base = '../..'; const createSnippet = () => { return { name: 'amplitude-snippet', options: (opt) => { return new Promise((resolve) => { opt.input = 'generated/amplitude-snippet.js'; if (process.env.GENERATE_SNIPPET !== 'true') return resolve(opt); exec(`node ${base}/scripts/version/create-snippet.js`, (err) => { if (err) { throw err; } resolve(opt); }); }); }, }; }; export const umd = { input: 'src/index.ts', output: { name: 'amplitude', file: 'lib/scripts/amplitude-min.umd.js', format: 'umd', }, plugins: [ typescript({ module: 'es2020', noEmit: false, outDir: 'lib/umd', rootDir: 'src', }), resolve({ browser: true, }), commonjs(), terser({ output: { comments: false, }, }), gzip(), ], }; const updateLibPrefix = (isUndo) => { const path = 'src/lib-prefix.ts' if (!fs.existsSync(path)) { // Supported in rollup 4, we're currently rollup 2 // this.error(`File not found: ${path}`); return; } let content = fs.readFileSync(path, 'utf-8'); let updatedContent; if (isUndo) { updatedContent = content.replace(/amplitude-ts-sdk-script/g, 'amplitude-ts'); } else { updatedContent = content.replace(/amplitude-ts/g, 'amplitude-ts-sdk-script'); } fs.writeFileSync(path, updatedContent, 'utf-8'); // Supported in rollup 4, we're currently rollup 2 // this.info(`File updated: ${path}`); } const updateLibPrefixPlugin = () => { return { name: 'update-lib-prefix', buildStart() { updateLibPrefix(false); }, buildEnd() { updateLibPrefix(true); } }; } export const iife = { input: 'src/snippet-index.ts', output: { name: 'amplitude', file: 'lib/scripts/amplitude-min.js', format: 'iife', sourcemap: true, }, plugins: [ updateLibPrefixPlugin(), typescript({ module: 'es2020', noEmit: false, outDir: 'lib/script', rootDir: 'src', }), resolve({ browser: true, }), commonjs(), // Flatten source maps: Dependencies like @amplitude/analytics-core are pre-compiled by // TypeScript to lib/esm/*.js with corresponding lib/esm/*.js.map files that point back to // the original .ts sources. When Rollup bundles these, the sourcemaps() plugin reads those // intermediate source maps and chains them together. The result is a final source map that // points directly to the original .ts files, enabling one-step unminification from CDN. // Note: lib/cjs/ is for Node.js and not used in the browser IIFE bundle. sourcemaps(), terser({ output: { comments: false, }, }), gzip(), ], }; export const snippet = { output: { name: 'amplitude', file: 'lib/scripts/amplitude-snippet-min.js', format: 'iife', }, plugins: [ createSnippet(), terser(), execute( `node ${base}/scripts/version/create-snippet-instructions.js && node ${base}/scripts/version/update-readme.js`, ), ], }; const createGTMSnippet = () => { return { name: 'amplitude-gtm-snippet', options: (opt) => { return new Promise((resolve) => { opt.input = 'generated/amplitude-gtm-snippet.js'; if (process.env.GENERATE_SNIPPET !== 'true') return resolve(opt); exec( `node ${base}/scripts/version/create-snippet.js --inputFile=amplitude-gtm-min.js --outputFile=amplitude-gtm-snippet.js --globalVar=amplitudeGTM --nameSuffix=-gtm`, (err) => { if (err) { throw err; } resolve(opt); }, ); }); }, }; }; export const iifeGTM = { input: 'src/gtm-snippet-index.ts', output: { name: 'amplitudeGTM', file: 'lib/scripts/amplitude-gtm-min.js', format: 'iife', sourcemap: true, }, plugins: [ typescript({ module: 'es2020', noEmit: false, outDir: 'lib/script', rootDir: 'src', }), resolve({ browser: true, }), commonjs(), // Flatten source maps: Dependencies like @amplitude/analytics-core are pre-compiled by // TypeScript to lib/esm/*.js with corresponding lib/esm/*.js.map files that point back to // the original .ts sources. When Rollup bundles these, the sourcemaps() plugin reads those // intermediate source maps and chains them together. The result is a final source map that // points directly to the original .ts files, enabling one-step unminification from CDN. // Note: lib/cjs/ is for Node.js and not used in the browser IIFE bundle. sourcemaps(), terser({ output: { comments: false, }, }), gzip(), ], }; export const snippetGTM = { output: { name: 'amplitudeGTM', // the name of the window variable file: 'lib/scripts/amplitude-gtm-snippet-min.js', format: 'iife', }, plugins: [createGTMSnippet(), terser()], }; // Input: bookmarklet js template + amplitude js // Output: bookmarklet js snippet const createBookmarkletSnippet = () => { return { name: 'amplitude-bookmarklet-snippet', options: (opt) => { return new Promise((resolve) => { opt.input = 'generated/amplitude-bookmarklet-snippet.js'; if (process.env.GENERATE_SNIPPET !== 'true') return resolve(opt); exec(`node ${base}/scripts/version/create-bookmarklet-snippet.js`, (err) => { if (err) { throw err; } resolve(opt); }); }); }, }; }; // Input: bookmarklet js snippet // Output: bookmarklet prefix + bookmarklet js snippet (url encoded) export const bookmarklet = { output: { name: 'amplitude', file: 'lib/scripts/amplitude-bookmarklet-snippet-min.js', format: 'iife', }, plugins: [createBookmarkletSnippet(), terser(), execute(`node ${base}/scripts/version/create-bookmarklet.js`)], }; export const gtmSnippetBundle = { input: 'lib/amplitude-wrapper.js', // TODO: move this around output: { name: 'amplitudeGTM', file: 'lib/scripts/analytics-browser-gtm-wrapper.min.js', format: 'iife', sourcemap: true, }, plugins: [ terser({ output: { comments: false, }, }), gzip(), gzip({ customCompression: (content) => brotliPromise(Buffer.from(content)), fileName: '.br', }), json(), ], } ================================================ FILE: scripts/check-deprecated-packages.sh ================================================ #!/bin/bash # Script to check for new usage of deprecated packages in PRs # Exits with error if: # - New dependencies on deprecated packages are detected # - Code changes are made to deprecated package directories set -e DEPRECATED_PACKAGES=("@amplitude/analytics-types" "@amplitude/analytics-client-common" "@amplitude/analytics-remote-config") DEPRECATED_PACKAGE_DIRS=("packages/analytics-types" "packages/analytics-client-common") FAILED=0 echo "Checking for new usage of deprecated packages..." # Check for code changes in deprecated package directories echo "Checking for code changes in deprecated packages..." for DIR in "${DEPRECATED_PACKAGE_DIRS[@]}"; do CHANGED_IN_DIR=$(git diff --name-only origin/${GITHUB_BASE_REF:-main}...HEAD | grep "^$DIR/" || true) if [ -n "$CHANGED_IN_DIR" ]; then echo "❌ ERROR: Code changes detected in deprecated package '$DIR'" echo "Changed files:" echo "$CHANGED_IN_DIR" | sed 's/^/ - /' echo "" FAILED=1 fi done # Get the list of changed package.json files CHANGED_FILES=$(git diff --name-only origin/${GITHUB_BASE_REF:-main}...HEAD | grep 'package.json$' || true) if [ -z "$CHANGED_FILES" ]; then echo "✓ No package.json files changed" else echo "Changed package.json files:" echo "$CHANGED_FILES" echo "" fi for FILE in $CHANGED_FILES; do if [ ! -f "$FILE" ]; then echo "Skipping deleted file: $FILE" continue fi echo "Checking $FILE..." for PACKAGE in "${DEPRECATED_PACKAGES[@]}"; do # Check if the package is present in the current version CURRENT_HAS=$(grep -c "\"$PACKAGE\"" "$FILE" || true) # Check if the package was present in the base branch BASE_HAS=$(git show origin/${GITHUB_BASE_REF:-main}:"$FILE" 2>/dev/null | grep -c "\"$PACKAGE\"" || true) # If it's newly added (present now but not before) if [ "$CURRENT_HAS" -gt 0 ] && [ "$BASE_HAS" -eq 0 ]; then echo "❌ ERROR: New dependency on deprecated package '$PACKAGE' detected in $FILE" if [ "$PACKAGE" = "@amplitude/analytics-remote-config" ]; then echo " Please use the new remote config client in @amplitude/analytics-core instead" else echo " Please use @amplitude/analytics-core instead" fi FAILED=1 elif [ "$CURRENT_HAS" -gt 0 ] && [ "$BASE_HAS" -gt 0 ]; then echo " ℹ️ Existing dependency on '$PACKAGE' found (grandfathered in)" fi done done if [ "$FAILED" -eq 1 ]; then echo "" echo "==========================================" echo "DEPRECATED PACKAGE CHECK FAILED" echo "==========================================" echo "The following packages are deprecated:" for PACKAGE in "${DEPRECATED_PACKAGES[@]}"; do echo " - $PACKAGE" done echo "" echo "Restrictions:" echo " • No new dependencies on these packages are allowed" echo " • No code changes to packages/analytics-types or packages/analytics-client-common are allowed" echo "" echo "For @amplitude/analytics-types and @amplitude/analytics-client-common:" echo " → Use @amplitude/analytics-core instead" echo "" echo "For @amplitude/analytics-remote-config:" echo " → Use the new remote config client in @amplitude/analytics-core instead" echo "" echo "If you believe this is a false positive, please contact the team." exit 1 fi echo "" echo "✓ No new usage of deprecated packages detected" echo "✓ No code changes in deprecated packages detected" exit 0 ================================================ FILE: scripts/dev/generate-signed-cert.sh ================================================ #!/bin/bash CERT_DIR=~/certs/local-website CERT_FILE=$CERT_DIR/cert.pem KEY_FILE=$CERT_DIR/key.pem echo "" echo "Step 2: Checking SSL certificates..." # Check if certificates already exist if [ -f "$CERT_FILE" ] && [ -f "$KEY_FILE" ]; then echo "✓ SSL certificates already exist" exit 0 fi echo "" echo "🔐 Generating SSL certificates for local.website.com..." echo " (This may take a moment)" echo "" mkdir -p "$CERT_DIR" cd "$CERT_DIR" openssl req -x509 -out cert.pem -keyout key.pem \ -newkey rsa:2048 -nodes -sha256 \ -subj "/CN=local.website.com" \ -addext "subjectAltName=DNS:local.website.com" \ -days 365 2>/dev/null if [ $? -eq 0 ]; then echo "" echo "✓ SSL certificates generated successfully" echo "" echo "📍 Certificates location: $CERT_DIR" echo "" echo "⚠️ Note: Your browser will show a security warning because this is a" echo " self-signed certificate. Click 'Advanced' and proceed anyway, or" echo " trust the certificate in your system keychain." else echo "✗ Failed to generate SSL certificates" exit 1 fi ================================================ FILE: scripts/dev/setup-dev-ssh.sh ================================================ #!/bin/bash # Run setup scripts sh ./scripts/dev/setup-local-domain.sh if [ $? -ne 0 ]; then exit 1 fi sh ./scripts/dev/generate-signed-cert.sh if [ $? -ne 0 ]; then exit 1 fi # Show completion message echo "" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "✅ Setup complete! Ready for HTTPS development." echo "" echo "🚀 Starting dev server at https://local.website.com:5173" echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "" ================================================ FILE: scripts/dev/setup-local-domain.sh ================================================ #!/bin/bash # Script to setup local.website.com domain in /etc/hosts DOMAIN="local.website.com" HOSTS_FILE="/etc/hosts" HOSTS_ENTRY="127.0.0.1 $DOMAIN" echo "" echo "🔧 Setting up local HTTPS development environment..." echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo "" echo "Step 1: Checking if $DOMAIN is configured..." # Check if the domain already exists in hosts file if grep -q "$DOMAIN" "$HOSTS_FILE"; then echo "✓ $DOMAIN is already configured" exit 0 else echo "✗ $DOMAIN not found in $HOSTS_FILE" echo "" echo "📝 Adding $DOMAIN to $HOSTS_FILE..." echo " (This requires sudo - you may be prompted for your password)" echo "" # Add the entry to hosts file echo "$HOSTS_ENTRY" | sudo tee -a "$HOSTS_FILE" > /dev/null if [ $? -eq 0 ]; then echo "✓ Successfully added $DOMAIN to $HOSTS_FILE" else echo "✗ Failed to add $DOMAIN to $HOSTS_FILE" exit 1 fi fi ================================================ FILE: scripts/publish/check-ref-not-advanced.sh ================================================ #!/bin/bash # Guard against the race where a PR merges to the publish ref between # the e2e job's checkout and the lerna version push. If the ref has # advanced past the SHA E2E ran against, the chore(release): publish # commit would land on top of code this run never tested in E2E, making # the git history misleading. Re-dispatch is the right recovery — it # re-runs E2E against the new HEAD. # # Required env vars: # EXPECTED_SHA - the SHA the ref is expected to still be at # (typically the e2e job's HEAD after checkout) # REF - the branch name to compare against (e.g. main) set -euo pipefail if [ -z "${EXPECTED_SHA:-}" ] || [ -z "${REF:-}" ]; then echo "❌ EXPECTED_SHA and REF must be set in the environment." exit 1 fi # Validate REF as a branch name to prevent it being interpreted as a git # flag (e.g. a value starting with '-') or a tag with the same short name. if ! git check-ref-format --branch "$REF" >/dev/null 2>&1; then echo "❌ REF is not a valid branch name: $REF" exit 1 fi # Read the current remote SHA directly. A plain `git fetch ` # without an explicit destination is not guaranteed to update # refs/remotes/origin/$REF, so reading the remote-tracking ref afterwards # can return a stale SHA and defeat the guard. Capture the command's # exit status explicitly so transient/auth failures surface a # diagnosable error rather than just a bare non-zero exit from set -e. # stderr is left to flow to the runner log so git's own error message # (auth failure, network error, etc.) is visible above our own. if ! LS_OUTPUT=$(git ls-remote origin "refs/heads/$REF"); then echo "❌ git ls-remote failed for origin refs/heads/$REF (see error above)" exit 1 fi REMOTE_SHA=$(echo "$LS_OUTPUT" | awk '{print $1}') if [ -z "$REMOTE_SHA" ]; then echo "❌ Could not resolve remote SHA for refs/heads/$REF on origin" exit 1 fi if [ "$REMOTE_SHA" != "$EXPECTED_SHA" ]; then echo "❌ $REF has advanced since this run's E2E checkout." echo " Expected SHA: $EXPECTED_SHA" echo " Current $REF: $REMOTE_SHA" echo "" echo "A commit landed on $REF while this workflow was running. The" echo "chore(release): publish commit would appear after it in history," echo "falsely implying the new commit was tested by this run's E2E." echo "" echo "Re-dispatch this workflow to include the new commits and re-run E2E." exit 1 fi echo "✅ $REF is still at expected SHA: $EXPECTED_SHA" ================================================ FILE: scripts/publish/upload-to-s3.js ================================================ const fs = require('fs'); const path = require('path'); const { S3Client, PutObjectCommand, HeadObjectCommand } = require('@aws-sdk/client-s3'); const { getName, getVersion } = require('../utils'); const bucket = process.env.S3_BUCKET_NAME; const location = path.join(process.cwd(), 'lib', 'scripts'); const isAnalyticsBrowser = location.includes('analytics-browser'); // Minified JS files to upload (gzipped) const jsFiles = ['amplitude-min.js.gz', 'amplitude-min.umd.js.gz']; if (isAnalyticsBrowser) { jsFiles.push('amplitude-gtm-min.js.gz'); } // Source map files to upload (for stack trace unminification) const sourceMapFiles = ['amplitude-min.js.map']; if (isAnalyticsBrowser) { sourceMapFiles.push('amplitude-gtm-min.js.map'); } let deployedCount = 0; let totalFiles = 0; /** * Upload a file to S3 if it doesn't already exist */ async function uploadFile(file, contentType, contentEncoding) { const filePath = path.join(location, file); if (!fs.existsSync(filePath)) { console.log(`[Publish to AWS S3] ${file} not found. Skipping.`); return; } totalFiles++; const body = fs.readFileSync(filePath); const isGtm = file.includes('-gtm-'); const suffix = isGtm ? `-gtm` : ``; const replacement = isGtm ? `amplitude-gtm` : `amplitude`; const key = `libs/${file.replace(replacement, `${getName()}${suffix}-${getVersion()}`)}`; const client = new S3Client(); const headObject = new HeadObjectCommand({ Bucket: bucket, Key: key, }); console.log(`[Publish to AWS S3] Checking if ${key} exists in target bucket...`); try { await client.send(headObject); console.log(`[Publish to AWS S3] ${key} exists in target bucket. Skipping upload.`); } catch { console.log(`[Publish to AWS S3] ${key} does not exist. Uploading to S3...`); const putObjectParams = { ACL: 'public-read', Body: body, Bucket: bucket, CacheControl: 'max-age=31536000', ContentType: contentType, Key: key, }; if (contentEncoding) { putObjectParams.ContentEncoding = contentEncoding; } const putObject = new PutObjectCommand(putObjectParams); try { await client.send(putObject); console.log(`[Publish to AWS S3] Upload success for ${key}.`); deployedCount++; } catch (err) { console.error(`[Publish to AWS S3] Upload failed for ${key}:`, err.message); } } } async function main() { console.log('[Publish to AWS S3] START'); console.log(`[Publish to AWS S3] Package: ${getName()} v${getVersion()}`); // Upload minified JS files (gzipped) for (const file of jsFiles) { await uploadFile(file, 'application/javascript', 'gzip'); } // Upload source map files (for stack trace unminification) for (const file of sourceMapFiles) { await uploadFile(file, 'application/json', null); } if (deployedCount === 0) { console.log(`[Publish to AWS S3] Complete! Nothing to deploy.`); } else { console.log(`[Publish to AWS S3] Success! Deployed ${deployedCount}/${totalFiles} files.`); } console.log('[Publish to AWS S3] END'); } main().catch((err) => { console.error('[Publish to AWS S3] Error:', err); process.exit(1); }); ================================================ FILE: scripts/templates/browser-bookmarklet.template.js ================================================ const snippet = ( name, integrity, version, globalVar, apiKey, userId, serverZone, ingestionSourceName, ingestionSourceVersion, autoTrackingPluginVersion, ) => ` !(function (window, document) { var amplitude = window.${globalVar} || { _q: [], _iq: {} }; if (amplitude.invoked) window.console && console.error && console.error('Amplitude snippet has been loaded.'); else { amplitude.invoked = true; var s = document.getElementsByTagName('script')[0]; var autoTrackingPluginScript = document.createElement('script'); autoTrackingPluginScript.src = 'https://cdn.amplitude.com/libs/plugin-autocapture-browser-${autoTrackingPluginVersion}-min.js.gz'; autoTrackingPluginScript.async = false; s.parentNode.insertBefore(autoTrackingPluginScript, s); var as = document.createElement('script'); as.type = 'text/javascript'; as.integrity = '${integrity}'; as.crossOrigin = 'anonymous'; as.async = false; as.src = 'https://cdn.amplitude.com/libs/${name}-${version}-min.js.gz'; as.onload = function () { if (!window.${globalVar}.runQueuedFunctions) { console.log('[Amplitude] Error: could not load SDK'); } window.${globalVar}.init('${apiKey}', '${userId}', { instanceName: 'amplitude-bookmarklet', serverZone: '${serverZone}', ingestionMetadata: { sourceName: '${ingestionSourceName}', sourceVersion: '${ingestionSourceVersion}', }, optOut: false, }); if (amplitudeAutocapturePlugin && amplitudeAutocapturePlugin.autocapturePlugin && typeof amplitudeAutocapturePlugin.autocapturePlugin === 'function') { window.${globalVar}.add(amplitudeAutocapturePlugin.autocapturePlugin()); } alert('Amplitude is now tracking events!'); }; s.parentNode.insertBefore(as, s); function proxy(obj, fn) { obj.prototype[fn] = function () { this._q.push({ name: fn, args: Array.prototype.slice.call(arguments, 0), }); return this; }; } var Identify = function () { this._q = []; return this; }; var identifyFuncs = [ 'add', 'append', 'clearAll', 'prepend', 'set', 'setOnce', 'unset', 'preInsert', 'postInsert', 'remove', 'getUserProperties', ]; for (var i = 0; i < identifyFuncs.length; i++) { proxy(Identify, identifyFuncs[i]); } amplitude.Identify = Identify; var Revenue = function () { this._q = []; return this; }; var revenueFuncs = [ 'getEventProperties', 'setProductId', 'setQuantity', 'setPrice', 'setRevenue', 'setRevenueType', 'setReceipt', 'setReceiptSig', 'setCurrency', 'setEventProperties', ]; for (var j = 0; j < revenueFuncs.length; j++) { proxy(Revenue, revenueFuncs[j]); } amplitude.Revenue = Revenue; var funcs = [ 'getDeviceId', 'setDeviceId', 'getSessionId', 'setSessionId', 'getUserId', 'setUserId', 'setOptOut', 'setTransport', 'reset', 'extendSession', ]; var funcsWithPromise = [ 'init', 'add', 'remove', 'track', 'logEvent', 'identify', 'groupIdentify', 'setGroup', 'revenue', 'flush', ]; function getPromiseResult(instance, fn, args) { return function (resolve) { instance._q.push({ name: fn, args: Array.prototype.slice.call(args, 0), resolve: resolve, }); }; } function proxyMain(instance, fn, isPromise) { instance[fn] = function () { if (isPromise) return { promise: new Promise(getPromiseResult(instance, fn, Array.prototype.slice.call(arguments))), }; }; } function setUpProxy(instance) { for (var k = 0; k < funcs.length; k++) { proxyMain(instance, funcs[k], false); } for (var l = 0; l < funcsWithPromise.length; l++) { proxyMain(instance, funcsWithPromise[l], true); } } setUpProxy(amplitude); amplitude.createInstance = function (instanceName) { amplitude._iq[instanceName] = { _q: [] }; setUpProxy(amplitude._iq[instanceName]); return amplitude._iq[instanceName]; }; window.${globalVar} = amplitude; ${ globalVar !== 'amplitude' ? `if (!window.amplitude) { window.amplitude = window.${globalVar}; }` : `` } } })(window, document); `; exports.snippet = snippet; ================================================ FILE: scripts/templates/browser-snippet.template.js ================================================ const snippet = (name, integrity, version, globalVar) => ` !(function (window, document) { var amplitude = window.${globalVar} || { _q: [], _iq: {} }; if (amplitude.invoked) window.console && console.error && console.error('Amplitude snippet has been loaded.'); else { amplitude.invoked = true; var as = document.createElement('script'); as.type = 'text/javascript'; as.integrity = '${integrity}'; as.crossOrigin = 'anonymous'; as.async = true; as.src = 'https://cdn.amplitude.com/libs/${name}-${version}-min.js.gz'; as.onload = function () { if (!window.${globalVar}.runQueuedFunctions) { console.log('[Amplitude] Error: could not load SDK'); } }; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(as, s); function proxy(obj, fn) { obj.prototype[fn] = function () { this._q.push({ name: fn, args: Array.prototype.slice.call(arguments, 0), }); return this; }; } var Identify = function () { this._q = []; return this; }; var identifyFuncs = [ 'add', 'append', 'clearAll', 'prepend', 'set', 'setOnce', 'unset', 'preInsert', 'postInsert', 'remove', 'getUserProperties', ]; for (var i = 0; i < identifyFuncs.length; i++) { proxy(Identify, identifyFuncs[i]); } amplitude.Identify = Identify; var Revenue = function () { this._q = []; return this; }; var revenueFuncs = [ 'getEventProperties', 'setProductId', 'setQuantity', 'setPrice', 'setRevenue', 'setRevenueType', 'setReceipt', 'setReceiptSig', 'setCurrency', 'setEventProperties', ]; for (var j = 0; j < revenueFuncs.length; j++) { proxy(Revenue, revenueFuncs[j]); } amplitude.Revenue = Revenue; var funcs = [ 'getDeviceId', 'setDeviceId', 'getSessionId', 'setSessionId', 'getUserId', 'setUserId', 'setOptOut', 'setTransport', 'reset', 'extendSession', ]; var funcsWithPromise = [ 'init', 'add', 'remove', 'track', 'logEvent', 'identify', 'groupIdentify', 'setGroup', 'revenue', 'flush', ]; function getPromiseResult(instance, fn, args) { return function (resolve) { instance._q.push({ name: fn, args: Array.prototype.slice.call(args, 0), resolve: resolve, }); }; } function proxyInstance(instance, fn, args) { instance._q.push({ name: fn, args: Array.prototype.slice.call(args, 0), }); } function proxyMain(instance, fn, isPromise) { instance[fn] = function () { if (isPromise) return { promise: new Promise(getPromiseResult(instance, fn, Array.prototype.slice.call(arguments))), }; proxyInstance(instance, fn, Array.prototype.slice.call(arguments)); }; } function setUpProxy(instance) { for (var k = 0; k < funcs.length; k++) { proxyMain(instance, funcs[k], false); } for (var l = 0; l < funcsWithPromise.length; l++) { proxyMain(instance, funcsWithPromise[l], true); } } setUpProxy(amplitude); amplitude.createInstance = function (instanceName) { amplitude._iq[instanceName] = { _q: [] }; setUpProxy(amplitude._iq[instanceName]); return amplitude._iq[instanceName]; }; window.${globalVar} = amplitude; ${ globalVar !== 'amplitude' ? `if (!window.amplitude) { window.amplitude = window.${globalVar}; }` : `` } } })(window, document); `; exports.snippet = snippet; ================================================ FILE: scripts/utils.js ================================================ const path = require('path'); const pkg = require(path.join(process.cwd(), 'package.json')); exports.getName = () => pkg.name.substring('@amplitude/'.length); exports.getVersion = () => pkg.version; ================================================ FILE: scripts/version/create-bookmarklet-snippet.js ================================================ const crypto = require('crypto'); const fs = require('fs'); const path = require('path'); const { snippet } = require('../templates/browser-bookmarklet.template'); const { getName, getVersion } = require('../utils'); const babel = require('@babel/core'); const yargs = require('yargs/yargs'); const { hideBin } = require('yargs/helpers'); const argv = yargs(hideBin(process.argv)).argv; // Setup input const inputDir = 'lib/scripts'; const inputFile = argv.inputFile ?? 'amplitude-min.js'; const inputPath = path.join(process.cwd(), inputDir, inputFile); // Setup output const outputDir = 'generated/'; const outputFile = argv.outputFile ?? 'amplitude-bookmarklet-snippet.js'; const outputPath = path.join(process.cwd(), outputDir, outputFile); const globalVar = argv.globalVar ?? 'amplitude'; const nameSuffix = argv.nameSuffix ?? ''; const apiKey = argv.apiKey ?? 'YOUR_API_KEY'; const userId = argv.userId ?? 'YOUR_USER_ID'; const serverZone = argv.serverZone ?? 'YOUR_SERVER_ZONE'; // Generate output contents const header = `/** * Create a bookmark with this code snippet in the browser, update the apiKey, userId, and serverZone, and click the bookmark on any website to run. * Script will fail to load if the website has a Content Security Policy (CSP) that blocks third-party inline scripts. */`; const algorithm = 'sha384'; const encoding = 'base64'; const inputText = fs.readFileSync(inputPath, 'utf-8'); const integrity = algorithm + '-' + crypto.createHash(algorithm).update(inputText).digest(encoding); const version = getVersion() || ''; const ingestionSourceName = 'browser-typescript-bookmarklet'; const ingestionSourceVersion = '1.0.0'; const autoTrackingPluginVersion = '0.9.0'; const outputText = header + snippet( getName() + nameSuffix, integrity, version, globalVar, apiKey, userId, serverZone, ingestionSourceName, ingestionSourceVersion, autoTrackingPluginVersion, ); const { code: transpiledOutputText } = babel.transformSync(outputText, { presets: ['env'], }); // Write to disk fs.writeFileSync(outputPath, transpiledOutputText); console.log(`Generated ${outputFile}`); ================================================ FILE: scripts/version/create-bookmarklet.js ================================================ const fs = require('fs'); const path = require('path'); const cwd = process.cwd(); // Setup input const inputDir = 'lib/scripts'; const inputFile = 'amplitude-bookmarklet-snippet-min.js'; const inputPath = path.join(cwd, inputDir, inputFile); // Setup output const outputDir = 'lib/scripts'; const outputFile = 'amplitude-bookmarklet.html'; const outputPath = path.join(cwd, outputDir, outputFile); // Generate output contents const inputText = fs.readFileSync(inputPath, 'utf-8'); const outputText = `javascript:${encodeURIComponent(inputText)}`; // Write to disk fs.writeFileSync(outputPath, outputText); console.log(`Generated ${outputFile}`); ================================================ FILE: scripts/version/create-snippet-instructions.js ================================================ const fs = require('fs'); const path = require('path'); const cwd = process.cwd(); // Setup input const inputDir = 'lib/scripts'; const inputFile = 'amplitude-snippet-min.js'; const inputPath = path.join(cwd, inputDir, inputFile); // Setup output const outputDir = 'lib/scripts'; const outputFile = 'amplitude-snippet-instructions.html'; const outputPath = path.join(cwd, outputDir, outputFile); // Generate output contents const inputText = fs.readFileSync(inputPath, 'utf-8'); const outputText = ` `; // Write to disk fs.writeFileSync(outputPath, outputText); console.log(`Generated ${outputFile}`); ================================================ FILE: scripts/version/create-snippet.js ================================================ const crypto = require('crypto'); const fs = require('fs'); const path = require('path'); const { snippet } = require('../templates/browser-snippet.template'); const { getName, getVersion } = require('../utils'); const babel = require('@babel/core'); const yargs = require('yargs/yargs'); const { hideBin } = require('yargs/helpers'); const argv = yargs(hideBin(process.argv)).argv; // Setup input const inputDir = 'lib/scripts'; const inputFile = argv.inputFile ?? 'amplitude-min.js'; const inputPath = path.join(process.cwd(), inputDir, inputFile); // Setup output const outputDir = 'generated/'; const outputFile = argv.outputFile ?? 'amplitude-snippet.js'; const outputPath = path.join(process.cwd(), outputDir, outputFile); const globalVar = argv.globalVar ?? 'amplitude'; const nameSuffix = argv.nameSuffix ?? ''; // Generate output contents const header = `/** * Imported in client browser via ================================================ FILE: test-server/analytics-snippet/index.html ================================================ Analytics Snippet Test

Analytics Snippet Test

Check the console and network tab for output.

================================================ FILE: test-server/attribution/default-tracking.html ================================================ Attribution Test

Attribution bug test

In incognito open http://localhost:5173/attribution/default-tracking.html?utm_campaign=helloworld224 ================================================ FILE: test-server/attribution/event-property-tracking.html ================================================ Attribution Event Property Test

Attribution Event Property Test

This page is a simple manual test for event-property attribution persistence in the Browser SDK.

Simple test

  1. Open this page with campaign params, for example: /attribution/event-property-tracking.html?utm_source=google&utm_campaign=spring-launch
  2. Click Track Event and confirm the event includes the current campaign params.
  3. Reload the page with a different query string if you want to validate a different campaign payload.

Controls

Current URL


      

Last action

Page loaded.
================================================ FILE: test-server/autocapture/element-interactions.html ================================================ Element Interactions Test

Element Interactions Test Page

This page contains various interactive elements to test Amplitude's autocapture functionality.

Clickable Elements Reference

Element/Selector Should be Clickable? Notes
Link Yes Always, unless tabindex="-1" or disabled
Yes Always
Yes Always
Yes Always
Yes Always
Yes Always
Role Button
Yes ARIA role, any element
Yes ARIA role, any element
Yes ARIA role, any element
Role Option
Yes ARIA role, any element
Yes ARIA role, any element
Role Treeitem
Yes ARIA role, any element
Editable
Yes Editable elements
Div
Sometimes Only if it has click handler or ARIA role
Span Sometimes Only if it has click handler or ARIA role
Yes Clickable, focuses associated input
Sometimes If controls are present
Cursor Pointer
Yes If controls are present

Buttons

Form Elements

Clickable Elements

Active Div
Do nothing div
Open New Page Test Link Large Data URI Link (Download)

Content Changing Button

Change Content

This content will change when you click the button or div above.

================================================ FILE: test-server/autocapture/error-click.html ================================================ Error Click Test

Error Click Test







0 ================================================ FILE: test-server/autocapture/long-task.html ================================================ Main Thread Block Test

Main Thread Block Test

Detecting API support...

Open the Network tab or Amplitude debugger to see [Amplitude] Main Thread Block events. The on-page log below also mirrors each event.

1. Basic block (no measure)

Blocks for 200ms. Expect: event with no [Amplitude] Main Thread Block Measures.

2. Block with measure correlation

Wraps the work in a performance.measure(). Expect: Measures: ["heavy-calculation"].

3. Block after a click

Simulates a slow click handler. Lets you correlate the task with a user action in Amplitude.

4. Multiple overlapping measures

Two measures overlap the same block. Expect: Measures: ["step-one", "step-two"].

5. Short task (should NOT fire)

Blocks for only 10ms — below the 50ms threshold. Expect: no event.

Waiting for events...
================================================ FILE: test-server/browser-sdk/cookie-consent.html ================================================ Amplitude SDK - Cookie Consent Example

Amplitude SDK - Cookie Consent Example

Cookie Consent Status

Amplitude SDK not initialized

Test Actions

Event Log

Page loaded - waiting for cookie consent...
================================================ FILE: test-server/browser-sdk/events-precision.html ================================================ Amplitude Events Test

Amplitude Events Test Page

Waiting to track Event 1...
Waiting to track Event 2...
Waiting to track Event 3...
Waiting to track Event 4...
================================================ FILE: test-server/browser-sdk/index.html ================================================ Browser SDK Test
Basic test page for the Amplitude Browser SDK
================================================ FILE: test-server/browser-sdk/page-url-enrichment-mpa-a.html ================================================ Page URL Enrichment — MPA repro: Page A

Page A (MPA repro)

Live sessionStorage[AMP_URL_INFO]


    

Events tracked from this page

(none yet — page-view events from autocapture will show here too)
================================================ FILE: test-server/browser-sdk/page-url-enrichment-mpa-b.html ================================================ Page URL Enrichment — MPA repro: Page B

Page B (MPA repro)

Live sessionStorage[AMP_URL_INFO]


    

Events tracked from this page

(none yet — page-view events from autocapture will show here too)
================================================ FILE: test-server/browser-sdk/page-url-enrichment-mpa-c.html ================================================ Page URL Enrichment — MPA repro: Page C

Page C (MPA repro)

Live sessionStorage[AMP_URL_INFO]


    

Events tracked from this page

(none yet — page-view events from autocapture will show here too)
================================================ FILE: test-server/browser-sdk/page-url-enrichment.html ================================================ Page Url Previous Page tracking

Page 1

When clicking on the button below, it will change the URL to /new-page{n}, without reloading the page. The page url enrichment plugin will track this change and augment events with the previous page url.
This button will navigate back to the previous page.
This button will replace the current state with a new state.
This button will track a precise event.
================================================ FILE: test-server/browser-sdk/page-view-history.html ================================================ Page View with History Push State tracking

Page One

Page View with History Push State tracking
When clicking on the button below, it will change the URL to /new-page, without reloading the page. The page view plugin will track this change and send an event to Amplitude with the new URL.
Clicking the button below will tear down the page view plugin. So that if you visit /new-page again, it will not track the page view.
================================================ FILE: test-server/browser-sdk/request-compression.html ================================================ Request Body Compression + Transport Test

Request Body Compression + Transport Test

Test enableRequestBodyCompression with different transports (fetch, xhr, beacon). Use DevTools → Network to verify the outgoing batch request.

Which HTTP transport the SDK uses to send events.
When enabled (and transport supports it), the request body is gzip-compressed with Content-Encoding: gzip. Note: with default server URL, Amplitude always compresses; this option only applies when a custom server URL is set.
Leave empty to use the default Amplitude endpoint (compression is always on). Set a custom URL to make compression follow the checkbox above.
Choose options and click "Apply config & init", then "Send test event". Check the Network tab for the batch request (type: fetch/xhr or sendBeacon) and request headers (Content-Encoding: gzip when compressed).
How to verify
  • Transport: In Network tab, find the request to .../batch (or similar). Request type will be XHR, Fetch, or (for beacon) a beacon request.
  • Compression: In the request headers, look for Content-Encoding: gzip. Fetch and XHR support it; SendBeacon cannot set headers, so compression is not applied for beacon.
================================================ FILE: test-server/browser-sdk/reset-test.html ================================================ Reset and OnReset Test

Reset and Plugin onReset Test

This page demonstrates the reset() functionality and how plugins can respond to reset events via the onReset() plugin hook.

Current Identity

Loading...

Actions

Logs

================================================ FILE: test-server/browser-sdk/web-vitals.html ================================================ Web Vitals

Simulate Interaction to Next Paint > 300ms

================================================ FILE: test-server/cookies/is-enabled.html ================================================ cookie isEnabled

  




================================================
FILE: test-server/cookies/transaction-test.html
================================================



  
  cookie transaction test
  Open the console to see stuff ->


  




================================================
FILE: test-server/diagnostics.html
================================================


  
    
    
    
    SDK Diagnostics Test
    
  
  
  
  
  
    

SDK Diagnostics Test

This page tests SDK diagnostics including uncaught SDK error capture. SDK is loaded via <script> tag.

SDK Initialization

Uncaught SDK Error Tests

Event Log



    

Instructions

  • Click Initialize SDK first to set up Amplitude
  • Open Developer Tools → Network tab to see diagnostics requests
  • SDK Error: Setup Error - Plugin setup returns a rejected promise (should be captured - error originates from SDK code)
  • Custom Plugin Click Handler - Custom plugin sets up a click handler that throws (NOT captured - error originates from this page's code, not SDK)
  • App Error - Throws error from application code (NOT captured - error originates from this page's code)
================================================ FILE: test-server/form-test.html ================================================ Form Test with Performance Tracking

Form Test with Performance Tracking

================================================ FILE: test-server/gtm/browser-gtm-wrapper.html ================================================ Browser SDK Test
Test Browser SDK via loading from CDN with GTM Wrapper
================================================ FILE: test-server/gtm/gtm.html ================================================ Browser SDK Test
GTM test page. Run this page from tagmanager.google.com
================================================ FILE: test-server/gtm-snippet/gtm-snippet.html ================================================ GTM Snippet Test
GTM Snippet Test This tests packages/gtm-snippet/lib/scripts/analytics-browser-gtm-wrapper.min.js.gz
================================================ FILE: test-server/helpers/tough-cookie.js ================================================ // legal cookie names // do not add or remove from this unless you're certain the new // cookie names will be accepted in a strict cookie environment const LEGAL_COOKIE_PATTERNS = [ 'AMP_TEST', 'AMP_TLDTEST', /^AMP_MKTG_[A-Za-z0-9]{10}$/, /^AMP_[A-Za-z0-9]{10}$/, ]; const desc = Object.getOwnPropertyDescriptor(Document.prototype, "cookie"); Object.defineProperty(document, "cookie", { configurable: true, enumerable: true, get() { return desc.get.call(document); }, set(value) { const name = value.split("=")[0].trim(); if (!LEGAL_COOKIE_PATTERNS.some((pattern) => { if (pattern instanceof RegExp) { return pattern.test(name); } return pattern === name; })) { throw new Error(`Illegal cookie name: ${name}`) } return desc.set.call(document, value); }, }); ================================================ FILE: test-server/iframe-sandbox/child.html ================================================

Child frame that resembles Shopify's iframe sandbox

This page is loaded inside the host shell iframe

================================================ FILE: test-server/iframe-sandbox/parent.html ================================================

Host shell

================================================ FILE: test-server/index.html ================================================ Amplitude Typescript SDK: Test Server Home Page

Amplitude Typescript SDK: Test Server Home Page

To add new test pages, add HTML files to the "test-server/" directory or any of its subdirectories. They will automatically appear in this listing.
================================================ FILE: test-server/mock-api.js ================================================ import { SourceMapConsumer } from 'source-map'; import https from 'https'; // Mock API endpoints for Vite dev server export function createMockApi() { return { name: 'mock-api', configureServer(server) { configureMockApiMiddleware(server.middlewares); configureUnminifyMiddleware(server.middlewares); }, configurePreviewServer(server) { configureMockApiMiddleware(server.middlewares); configureUnminifyMiddleware(server.middlewares); } }; } // Function to configure mock API middleware that can be used by both dev and preview servers export function configureMockApiMiddleware(middlewares) { // Status code endpoint - responds with the status code specified in the URL middlewares.use((req, res, next) => { const statusMatch = req.url.match(/^\/api\/status\/(\d+)/); if (statusMatch) { const statusCode = parseInt(statusMatch[1]); // Parse sleep parameter from query string const url = new URL(req.url, `http://${req.headers.host}`); const sleepMs = parseInt(url.searchParams.get('sleep')) || 0; // Set CORS headers res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH'); res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization, X-Requested-With'); res.setHeader('Authorization', 'SECRET TOKEN, THIS SHOULD NEVER BE CAPTURED BY AMPLITUDE'); // Handle preflight requests if (req.method === 'OPTIONS') { res.statusCode = 200; res.end(); return; } // Create response based on status code const response = { status: statusCode, message: getStatusMessage(statusCode), method: req.method, timestamp: new Date().toISOString(), url: req.url, sleep: sleepMs }; // If sleep parameter is provided, delay the response if (sleepMs > 0) { setTimeout(() => { res.statusCode = statusCode; res.setHeader('Content-Type', 'application/json'); res.end(JSON.stringify(response)); }, sleepMs); } else { // Set the status code from the URL res.statusCode = statusCode; res.setHeader('Content-Type', 'application/json'); res.end(JSON.stringify(response)); } return; } next(); }); // Simple test endpoint middlewares.use('/api/test', (req, res) => { res.setHeader('Content-Type', 'application/json'); res.setHeader('Access-Control-Allow-Origin', '*'); if (req.method === 'GET') { res.end(JSON.stringify({ message: 'Hello from mock API!', method: 'GET', timestamp: new Date().toISOString() })); } else if (req.method === 'POST') { res.end(JSON.stringify({ message: 'Data received!', method: 'POST', timestamp: new Date().toISOString() })); } }); // CORS error endpoint - only allows CORS from non-localhost domains middlewares.use('/api/cors-error', (req, res) => { const origin = req.headers.origin; // Set CORS headers only for non-localhost origins if (origin && !origin.includes('localhost') && !origin.includes('127.0.0.1')) { res.setHeader('Access-Control-Allow-Origin', origin); res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS, HEAD, PATCH'); res.setHeader('Access-Control-Allow-Headers', 'Content-Type, Authorization, X-Requested-With'); } // Handle preflight requests if (req.method === 'OPTIONS') { if (origin && !origin.includes('localhost') && !origin.includes('127.0.0.1')) { res.statusCode = 200; res.end(); } else { res.statusCode = 403; // Forbidden for localhost res.end(); } return; } res.setHeader('Content-Type', 'application/json'); if (req.method === 'GET') { res.end(JSON.stringify({ message: 'This endpoint only allows CORS from non-localhost domains', method: 'GET', timestamp: new Date().toISOString(), note: 'This should cause a CORS error when accessed from localhost', origin: origin || 'No origin header' })); } else if (req.method === 'POST') { res.end(JSON.stringify({ message: 'This endpoint only allows CORS from non-localhost domains', method: 'POST', timestamp: new Date().toISOString(), note: 'This should cause a CORS error when accessed from localhost', origin: origin || 'No origin header' })); } }); } // Helper function to get status message function getStatusMessage(statusCode) { const messages = { 200: 'OK', 201: 'Created', 204: 'No Content', 301: 'Moved Permanently', 302: 'Found', 304: 'Not Modified', 400: 'Bad Request', 401: 'Unauthorized', 403: 'Forbidden', 404: 'Not Found', 405: 'Method Not Allowed', 408: 'Request Timeout', 409: 'Conflict', 429: 'Too Many Requests', 500: 'Internal Server Error', 501: 'Not Implemented', 502: 'Bad Gateway', 503: 'Service Unavailable', 504: 'Gateway Timeout' }; return messages[statusCode] || `Status ${statusCode}`; } /** * Parse a CDN URL to extract package name, version, and file suffix * Example: https://cdn.amplitude.com/libs/analytics-browser-2.33.5-min.js.gz:1:54975 * Returns: { packageName: 'analytics-browser', version: '2.33.5', suffix: 'min', line: 1, column: 54975 } */ function parseCdnUrl(stacktraceLine) { // Pattern: https://cdn.amplitude.com/libs/{name}-{version}-{suffix}.js.gz:{line}:{column} // The suffix could be 'min' or 'gtm-min' etc. const regex = /https?:\/\/cdn\.amplitude\.com\/libs\/([a-z-]+)-([\d.]+)-([a-z-]+)\.js(?:\.gz|\.br)?:(\d+):(\d+)/i; const match = stacktraceLine.match(regex); if (!match) { return null; } return { packageName: match[1], version: match[2], suffix: match[3], line: parseInt(match[4], 10), column: parseInt(match[5], 10), originalUrl: stacktraceLine }; } /** * Build CDN URL for the source map based on parsed URL info * Example: analytics-browser-2.33.5-min.js.gz → https://cdn.amplitude.com/libs/analytics-browser-2.33.5-min.js.map */ function getSourceMapCdnUrl(parsedUrl) { const { packageName, version, suffix } = parsedUrl; return `https://cdn.amplitude.com/libs/${packageName}-${version}-${suffix}.js.map`; } /** * Fetch source map from CDN using Node.js https module */ function fetchSourceMapFromCdn(sourceMapUrl) { return new Promise((resolve, reject) => { https.get(sourceMapUrl, (res) => { const { statusCode } = res; if (statusCode === 404 || statusCode === 403) { res.resume(); // Consume response to free up memory const error = new Error('SOURCE_MAP_NOT_FOUND'); error.status = statusCode; error.sourceMapUrl = sourceMapUrl; reject(error); return; } if (statusCode !== 200) { res.resume(); reject(new Error(`Failed to fetch source map: ${statusCode}`)); return; } let data = ''; res.on('data', (chunk) => { data += chunk; }); res.on('end', () => { try { resolve(JSON.parse(data)); } catch (e) { reject(new Error(`Failed to parse source map JSON: ${e.message}`)); } }); }).on('error', (err) => { reject(new Error(`Network error fetching source map: ${err.message}`)); }); }); } /** * Clean up source path from flattened source map * The flattened source map paths are relative to packages/{package}/lib/scripts/ * Example: ../../../analytics-core/src/diagnostics/diagnostics-client.ts * -> packages/analytics-core/src/diagnostics/diagnostics-client.ts * Example: ../../../src/index.ts (same package) * -> packages/analytics-browser/src/index.ts */ function resolveSourcePath(sourcePath, parsedUrl) { // Handle node_modules paths - these are external dependencies if (sourcePath.includes('node_modules')) { return { relativePath: sourcePath, isExternal: true, isTypeScript: false }; } // Clean up the relative path // Paths like ../../../analytics-core/src/... need to be converted to packages/analytics-core/src/... // Paths like ../../../src/... refer to the same package (e.g., analytics-browser) let cleanPath = sourcePath; // Remove leading ../ segments and extract the package-relative path const pathParts = sourcePath.split('/'); let i = 0; while (i < pathParts.length && pathParts[i] === '..') { i++; } const remainingPath = pathParts.slice(i).join('/'); // Check if this is a path within a specific package (e.g., analytics-core/src/...) // or within the current package (e.g., src/...) if (remainingPath.startsWith('src/')) { // This is a path within the current package (e.g., analytics-browser) cleanPath = `packages/${parsedUrl.packageName}/${remainingPath}`; } else { // This is a path to another package (e.g., analytics-core/src/...) cleanPath = `packages/${remainingPath}`; } const isTypeScript = cleanPath.endsWith('.ts') || cleanPath.endsWith('.tsx'); return { relativePath: cleanPath, isExternal: false, isTypeScript }; } /** * Configure the unminify API middleware */ export function configureUnminifyMiddleware(middlewares) { middlewares.use('/api/unminify', async (req, res) => { // Set CORS headers res.setHeader('Access-Control-Allow-Origin', '*'); res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS'); res.setHeader('Access-Control-Allow-Headers', 'Content-Type'); res.setHeader('Content-Type', 'application/json'); // Handle preflight if (req.method === 'OPTIONS') { res.statusCode = 200; res.end(); return; } if (req.method !== 'POST') { res.statusCode = 405; res.end(JSON.stringify({ success: false, error: 'Method not allowed. Use POST.' })); return; } // Read request body let body = ''; for await (const chunk of req) { body += chunk; } let requestData; try { requestData = JSON.parse(body); } catch (e) { res.statusCode = 400; res.end(JSON.stringify({ success: false, error: 'Invalid JSON body' })); return; } const { stacktraceLine } = requestData; if (!stacktraceLine) { res.statusCode = 400; res.end(JSON.stringify({ success: false, error: 'Missing stacktraceLine in request body' })); return; } // Parse the CDN URL const parsed = parseCdnUrl(stacktraceLine); if (!parsed) { res.statusCode = 400; res.end(JSON.stringify({ success: false, error: 'Could not parse stack trace line. Expected format: https://cdn.amplitude.com/libs/{package}-{version}-{suffix}.js.gz:{line}:{column}' })); return; } // Build the source map CDN URL const sourceMapUrl = getSourceMapCdnUrl(parsed); let consumer; try { // Fetch source map from CDN const rawSourceMap = await fetchSourceMapFromCdn(sourceMapUrl); consumer = await new SourceMapConsumer(rawSourceMap); // Look up the original position const original = consumer.originalPositionFor({ line: parsed.line, column: parsed.column }); if (!original.source) { res.end(JSON.stringify({ success: false, error: 'Could not find original position for the given line and column', minified: { url: parsed.originalUrl, line: parsed.line, column: parsed.column }, sourceMapUrl })); return; } // Resolve the source path (now directly from flattened source map) const sourceInfo = resolveSourcePath(original.source, parsed); // Build GitHub link using the version tag from the CDN URL // The tag is always @amplitude/{cdnPackageName}@{version} (e.g., @amplitude/analytics-browser@2.33.5) let githubLink = null; if (sourceInfo.relativePath && !sourceInfo.isExternal) { const tag = `@amplitude/${parsed.packageName}@${parsed.version}`; githubLink = `https://github.com/amplitude/Amplitude-TypeScript/blob/${encodeURIComponent(tag)}/${sourceInfo.relativePath}#L${original.line}`; } res.end(JSON.stringify({ success: true, original: { source: original.source, line: original.line, column: original.column, name: original.name }, typescript: { relativePath: sourceInfo.relativePath, isExternal: sourceInfo.isExternal, isTypeScript: sourceInfo.isTypeScript, githubLink }, minified: { url: parsed.originalUrl, line: parsed.line, column: parsed.column }, sourceMapUrl })); } catch (error) { if (error.message === 'SOURCE_MAP_NOT_FOUND') { res.statusCode = 404; res.end(JSON.stringify({ success: false, error: 'Source map not found on CDN', sourceMapNotFound: true, sourceMapUrl, instructions: { summary: `The source map for version ${parsed.version} has not been uploaded to CDN yet.`, steps: [ `1. Build the package: cd packages/${parsed.packageName} && pnpm build`, `2. Find the source map: packages/${parsed.packageName}/lib/scripts/amplitude-${parsed.suffix}.js.map`, `3. Upload to S3/CDN with the name: ${parsed.packageName}-${parsed.version}-${parsed.suffix}.js.map` ] } })); } else { res.statusCode = 500; res.end(JSON.stringify({ success: false, error: `Error processing source map: ${error.message}`, sourceMapUrl })); } } finally { if (consumer && typeof consumer.destroy === 'function') { consumer.destroy(); } } }); } ================================================ FILE: test-server/network-capture/fetch.html ================================================ Fetch Network Tracking Test

Fetch Network Tracking Test

Running tests...

This tests the autocapture.networkTracking feature and the fetch API. It will make a series of requests to various endpoints and display the results to verify that the fetch override is working.

================================================ FILE: test-server/network-capture/xhr.html ================================================ XHR Network Tracking Test

XHR Network Tracking Test

Running tests...

This tests the autocapture.networkTracking feature and the XHR API. It will make a series of requests to various endpoints and display the results to verify that the XHR override is working.

================================================ FILE: test-server/observables/mouse-direction-change-observable.html ================================================ Mouse Direction Change Observables Test

Mouse Direction Change Observables Test

Move your mouse around to see direction changes logged

================================================ FILE: test-server/observables/mouse-observables.html ================================================ Mouse Move Observables Test

Mouse Move Observables Test

Move your mouse around to see events logged

================================================ FILE: test-server/observables/thrashed-cursor-observable.html ================================================ Thrashed Cursor Observables Test

Thrashed Cursor Observables Test

Move your mouse around quickly to see thrashed cursor events logged

================================================ FILE: test-server/observers/console.html ================================================ Console Observer Test

Console Observer Test

================================================ FILE: test-server/opt-out/index.html ================================================ Opt Out Test

Opt Out Test

This page initializes Amplitude with optOut enabled.

Not opted in

================================================ FILE: test-server/proxy-test.html ================================================ Amplitude Proxy Server Test

🚀 Amplitude Proxy Server Test

This page is used to test the proxy server. Run the proxy server with the command 'pnpm proxy:dev' in the root of this repo

Open your console and run test events to see that it works

================================================ FILE: test-server/remote-config-test.html ================================================ Remote Config Test

Amplitude Remote Config Test

This page tests Amplitude initialization with fetchRemoteConfig: true.

Interactive Section

This is the interactive section.

================================================ FILE: test-server/sampling-test.html ================================================ Sampling Test

Sampling Test

This page runs the sampling test, import from local sampling.ts. in analytics-core

How the Test Works

Each test generates sequential session IDs (timestamps starting from Date.now()) and checks whether each one passes the sampling filter. The test measures the actual sample rate and compares it to the expected rate with a ±5% tolerance. You can configure the number of sessions to test above (default: 10,000).

Why Bucket Size Matters

The two functions differ in their bucket size (the modulo value):

  • isTimestampInSample uses 1,000,000 buckets (% 1000000)
  • isTimestampInSampleTemp uses 100,000 buckets (% 100000)

The Problem with 1,000,000 Buckets

The hash function (generateHashCode) is like a bad dice - it wasn't designed for fair random distribution, just for organizing items in hash tables. When you try to use this bad dice to fill 1 million buckets:

  • Biased distribution: The dice doesn't land evenly across all buckets
  • Limited entropy: The 32-bit hash wraps and repeats, losing randomness
  • Periodic patterns: Consecutive timestamps fall into "bad zones" where sampling fails

For example, with sampleRate = 0.1 (10%), you need the hash to land in buckets 0-99,999. But the bad dice often never lands there, resulting in 0% sampling instead of 10%.

Why 100,000 Buckets Works Better

With a smaller bucket size (100,000), the same biased hash function works "good enough":

  • Faster cycling: The hash cycles through all buckets more quickly
  • Better coverage: Even with bias, the smaller space gets filled more evenly
  • More consistent: Less dependent on which timestamp range you're testing

What You'll Observe

Try testing with different session counts:

  • 10,000 sessions: isTimestampInSample often fails (exposes periodic bias)
  • 100,000+ sessions: Both might pass (averaging hides the bias, but it's still there!)
  • isTimestampInSampleTemp is more reliable across all scales
================================================ FILE: test-server/scroll-test.html ================================================ Scroll Test Page

Scroll Test Page

This page has a height of ~15,000px for scroll testing.

1000px
2000px
3000px
4000px
5000px
6000px
7000px
8000px
9000px
10000px
11000px
12000px
13000px
14000px
End
================================================ FILE: test-server/segment.html ================================================ Segment + Amplitude Autocapture

Segment + Amplitude

This is a test page for Segment + Amplitude integration with AutoCapture. To make this work, you need to set the environment variables in your `.env` file:
  • VITE_AMPLITUDE_API_KEY - Your Amplitude API key
  • VITE_SEGMENT_API_KEY - Your Segment write key
================================================ FILE: test-server/session-replay-browser/sr-capture-test.html ================================================ SR Capture Test
loading
================================================ FILE: test-server/session-replay-browser/sr-cross-origin-iframe-child.html ================================================ SR Cross-Origin Iframe Child
Child iframe unique content
loading
================================================ FILE: test-server/session-replay-browser/sr-cross-origin-iframe-parent.html ================================================ SR Cross-Origin Iframe Parent
Parent page content
loading
================================================ FILE: test-server/session-replay-browser/sr-plugin-with-analytics-sdk.html ================================================ Session Replay Plugin Test

Session Replay Plugin Test

Status: Not initialized

Test Events

================================================ FILE: test-server/session-replay-browser/sr-privacy-test.html ================================================ SR Privacy Test

Hello visible world

Secret masked text

Blocked content
Outer masked text Inner visible text
Selector blocked content

Unmask class visible text

loading
================================================ FILE: test-server/session-replay-browser/sr-shadow-dom-test.html ================================================ SR Shadow DOM Test
loading
================================================ FILE: test-server/session-replay-browser/sr-standalone-sdk.html ================================================ Session Replay Test

Session Replay Test

Status: Not initialized

================================================ FILE: test-server/snippets/cookie-deduplication.html ================================================ Cookie Deduplication Test

Cookie Deduplication Test

Instructions: This tool helps copy Amplitude cookies from full domain scope to subdomain scope.

How it works:
  1. Click the button below to scan for cookies matching the pattern AMP_*
  2. The tool will copy each found cookie and create a new version with the subdomain scope
  3. For example: .website.comlocal.website.com
  4. Refresh the page to see the updated cookies
================================================ FILE: test-server/spa-test.html ================================================ SPA Test - Single Page Application

SPA Test Page

This simulates a Single Page Application with client-side routing using the History API. Navigate between routes and reload the page - you'll stay on the same route!

IMPORTANT: This page is best tested with "dev:ssh" to simulate document.referrer being preserved upon reload

Current Route: /
How it works (History API):

• Click any link above to navigate (using pushState and popstate)

• The URL path will change without page reload (e.g., /spa-test.html/about)

• The page content updates dynamically via JavaScript

• Browser back/forward buttons work correctly

Query parameters are preserved - try adding ?param=value after the route

Amplitude autocapture is enabled - tracking element interactions, page views, sessions, and form interactions


⚠️ Server Configuration Needed for Reloads:

For reloading to work, your server must be configured to serve spa-test.html for all /spa-test.html/* routes. See below for Vite configuration.

================================================ FILE: test-server/unified/unified.html ================================================ Browser SDK Test
Test page for Unified SDK
================================================ FILE: test-server/unified-script.html ================================================ Unified Script Test

Unified Script

Open the browser DevTools Network tab to see all scripts loading.

================================================ FILE: test-server/unminifier/index.html ================================================ Stack Trace Unminifier

Stack Trace Unminifier

Paste a minified stack trace line from Amplitude CDN and get the original source location.

Result

Enter a stack trace line above and click "Unminify" to see the original source location.
================================================ FILE: test-server/video-analytics/track-embedded-video.html ================================================ Track Embedded Mux Video Test

Track Embedded Mux Video Test

================================================ FILE: test-server/video-analytics/track-html-video.html ================================================ Track HTML Video Test

Track HTML Video Test

================================================ FILE: tsconfig.json ================================================ { "compilerOptions": { "alwaysStrict": false, "declaration": true, "declarationMap": true, "downlevelIteration": true, "inlineSources": true, "importHelpers": true, "lib": ["es2021", "dom"], "module": "es2020", "moduleResolution": "node", "noEmitHelpers": true, "noFallthroughCasesInSwitch": true, "noImplicitAny": true, "noImplicitReturns": true, "noImplicitThis": true, "noUnusedLocals": true, "noUnusedParameters": true, "pretty": true, "sourceMap": true, "resolveJsonModule": true, "strict": true, "strictBindCallApply": true, "target": "es5", "types": ["jest", "node"], } } ================================================ FILE: typedoc.json ================================================ { "entryPoints": [ "packages/analytics-browser", "packages/analytics-node" ], "entryPointStrategy": "packages", "logLevel": "Error", "name": "Amplitude SDK", "out": "docs", "readme": "./README.md" } ================================================ FILE: vite.config.js ================================================ // vite.config.js import { defineConfig } from 'vite'; import path from 'path'; import fs from 'fs'; import glob from 'fast-glob'; import { createMockApi } from './test-server/mock-api.js'; const packagesDir = path.resolve(__dirname, 'packages'); const testServerDir = path.resolve(__dirname, 'test-server'); const ignorePkg = (pkgName) => { return pkgName.startsWith('.') || pkgName === 'analytics-browser-test' || pkgName === 'analytics-node-test'; } function htmlEntriesPlugin(pattern = '**/*.html', { cwd }) { return { name: 'vite-html-entries', config: () => ({ build: { rollupOptions: { input: Object.fromEntries( require('fast-glob').sync(pattern, { cwd }).map(f => [ f.replace(/\.html$/, ''), // key without ".html" require('path').join(cwd, f) // absolute file path ]) ) } } }) }; } function gzipServePlugin() { return { name: 'gzip-serve', configureServer(server) { server.middlewares.use((req, res, next) => { if (req.url && req.url.endsWith('.gz')) { // Set Content-Encoding header for gzip files res.setHeader('Content-Encoding', 'gzip'); // Determine the original content type by removing .gz extension const originalPath = req.url.replace(/\.gz$/, ''); if (originalPath.endsWith('.js')) { res.setHeader('Content-Type', 'application/javascript'); } else if (originalPath.endsWith('.css')) { res.setHeader('Content-Type', 'text/css'); } else if (originalPath.endsWith('.html')) { res.setHeader('Content-Type', 'text/html'); } else if (originalPath.endsWith('.json')) { res.setHeader('Content-Type', 'application/json'); } else { res.setHeader('Content-Type', 'application/octet-stream'); } // Add Vary header to indicate that the response varies by Accept-Encoding res.setHeader('Vary', 'Accept-Encoding'); } next(); }); } }; } function fileListingPlugin() { return { name: 'file-listing', configureServer(server) { server.middlewares.use('/api/list-files', async (req, res) => { try { const files = await glob('**/*.html', { cwd: testServerDir, absolute: false, ignore: ['**/dist/**'] }); const fileList = files.map(file => ({ name: path.basename(file, '.html'), path: '/' + file, })); res.setHeader('Content-Type', 'application/json'); res.end(JSON.stringify(fileList)); } catch (error) { console.error('Error listing files:', error); res.statusCode = 500; res.end(JSON.stringify({ error: 'Failed to list files' })); } }); } }; } function spaRoutingPlugin() { return { name: 'spa-routing', configureServer(server) { server.middlewares.use((req, res, next) => { // Handle SPA routes - serve spa-test.html for all /spa-test.html/* routes if (req.url && req.url.startsWith('/spa-test.html/')) { req.url = '/spa-test.html'; } next(); }); } }; } const amplitudeAliases = fs.readdirSync(packagesDir).reduce((aliases, pkgName) => { const fullPath = path.join(packagesDir, pkgName); if (ignorePkg(pkgName)) { return aliases; } const key = `@amplitude/${pkgName}`; aliases[key] = fullPath; return aliases; }, {}); export default defineConfig({ envDir: path.resolve(__dirname), root: testServerDir, publicDir: packagesDir, resolve: { alias: amplitudeAliases }, server: { host: process.env.SSH ? 'local.website.com' : undefined, https: process.env.SSH ? { key: fs.readFileSync(path.resolve(process.env.HOME, 'certs/local-website/key.pem')), cert: fs.readFileSync(path.resolve(process.env.HOME, 'certs/local-website/cert.pem')), } : undefined, fs: { allow: [ packagesDir, testServerDir, ] }, watch: { usePolling: true, interval: 100, ignored: ['**/node_modules/**', '**/dist/**'], }, }, preview: { port: 5173, host: true, }, plugins: [ htmlEntriesPlugin('**/*.html', { cwd: path.resolve(__dirname, 'test-server') }), gzipServePlugin(), fileListingPlugin(), spaRoutingPlugin(), createMockApi(), ], });