@feedmepos/mf-payment 0.0.0-beta.42 → 0.0.0-beta.44

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3335 +0,0 @@
1
- import { d as jt, f as Ft, _ as X, m as Gt } from "./index-9ujJCGqe.js";
2
- var Ye = { GITHUB_STATE: "/home/runner/work/_temp/_runner_file_commands/save_state_73712f89-2951-4279-8568-d968360fbbd5", npm_package_devDependencies_ts_node: "^10.9.1", npm_package_dependencies_zod: "^3.23.8", npm_package_dependencies_dinero_js: "^1.9.1", STATS_TRP: "true", DEPLOYMENT_BASEPATH: "/opt/runner", DOTNET_NOLOGO: "1", npm_package_dependencies_pinia: "^2.1.7", USER: "runner", npm_package_devDependencies_jest: "^29.6.3", npm_package_dependencies_vue_pdf_embed: "^2.1.0", npm_config_version_commit_hooks: "true", npm_config_user_agent: "yarn/1.22.22 npm/? node/v22.10.0 linux x64", npm_config_always_auth: "", CI: "true", npm_package_dependencies_vue: "^3.2.25", npm_config_bin_links: "true", npm_config_wrap_output: "", RUNNER_ENVIRONMENT: "github-hosted", GITHUB_ENV: "/home/runner/work/_temp/_runner_file_commands/set_env_73712f89-2951-4279-8568-d968360fbbd5", PIPX_HOME: "/opt/pipx", npm_node_execpath: "/opt/hostedtoolcache/node/22.10.0/x64/bin/node", npm_package_devDependencies_vite: "^5.2.11", npm_package_devDependencies__tsconfig_node20: "^20.1.4", npm_config_init_version: "1.0.0", JAVA_HOME_8_X64: "/usr/lib/jvm/temurin-8-jdk-amd64", NODE_AUTH_TOKEN: "ghs_uu7dq3xs4fZeqGotOfpok95L1WJlCm0dRT2D", SHLVL: "1", npm_package_files_0: "dist", HOME: "/home/runner", npm_package_devDependencies_sass: "1.32.12", RUNNER_TEMP: "/home/runner/work/_temp", GITHUB_EVENT_PATH: "/home/runner/work/_temp/_github_workflow/event.json", npm_package_dependencies_jspdf: "^2.5.1", npm_package_scripts_build_mf_dev: "vite build --mode fmmf:dev", JAVA_HOME_11_X64: "/usr/lib/jvm/temurin-11-jdk-amd64", PIPX_BIN_DIR: "/opt/pipx_bin", GITHUB_REPOSITORY_OWNER: "feedmepos", npm_package_dependencies_change_case: "^4.1.2", npm_package_scripts_build_mf_prod: "vite build --mode fmmf:prod", npm_config_init_license: "MIT", GRADLE_HOME: "/usr/share/gradle-8.10.2", ANDROID_NDK_LATEST_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", JAVA_HOME_21_X64: "/usr/lib/jvm/temurin-21-jdk-amd64", STATS_RDCL: "true", GITHUB_RETENTION_DAYS: "90", YARN_WRAP_OUTPUT: "false", npm_package_dependencies__feedmepos_mf_common: "^1.8.21", npm_config_version_tag_prefix: "v", GITHUB_REPOSITORY_OWNER_ID: "54831515", POWERSHELL_DISTRIBUTION_CHANNEL: "GitHub-Actions-ubuntu22", AZURE_EXTENSION_DIR: "/opt/az/azcliextensions", GITHUB_HEAD_REF: "", npm_package_devDependencies__types_file_saver: "^2.0.5", npm_config_userconfig: "/home/runner/work/_temp/.npmrc", SYSTEMD_EXEC_PID: "478", npm_package_dependencies_moment: "^2.29.4", npm_package_dependencies_dotenv: "^16.0.3", npm_package_dependencies__feedmepos_ui_library: "^1.2.44", npm_package_scripts_postinstall: "yarn --cwd .. && yarn --cwd ../package/common && yarn --cwd ../package/entity", npm_config_feedmepos_registry: "https://npm.pkg.github.com/", GITHUB_GRAPHQL_URL: "https://api.github.com/graphql", npm_package_devDependencies_typescript: "~5.4.0", npm_package_devDependencies_tailwindcss: "^3.4.14", npm_package_dependencies_i18next: "^21.8.8", npm_package_dependencies__casl_ability: "^3.2.0", npm_package_scripts_build_only_dev: "yarn build:mf:dev && yarn build:dts && yarn build-types && cp package.json ./dist", NVM_DIR: "/home/runner/.nvm", npm_package_readmeFilename: "README.md", npm_package_devDependencies_vue_tsc: "^2.0.11", npm_package_devDependencies__babel_preset_env: "^7.22.10", npm_package_dependencies_xlsx: "^0.18.5", npm_package_dependencies_google_maps: "^4.3.3", npm_package_scripts_build_only_prod: "yarn build:mf:prod && yarn build:dts && yarn build-types && cp package.json ./dist", DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1", GOROOT_1_21_X64: "/opt/hostedtoolcache/go/1.21.13/x64", JAVA_HOME_17_X64: "/usr/lib/jvm/temurin-17-jdk-amd64", ImageVersion: "20241103.1.0", npm_package_dependencies_i18next_vue: "^2.0.0-beta.0", npm_package_scripts_dev: "vite --mode dev", RUNNER_OS: "Linux", GITHUB_API_URL: "https://api.github.com", GOROOT_1_22_X64: "/opt/hostedtoolcache/go/1.22.8/x64", SWIFT_PATH: "/usr/share/swift/usr/bin", npm_package_scripts_prod: "vite --mode prod", npm_package_type: "module", RUNNER_USER: "runner", STATS_V3PS: "true", CHROMEWEBDRIVER: "/usr/local/share/chromedriver-linux64", GOROOT_1_23_X64: "/opt/hostedtoolcache/go/1.23.2/x64", JOURNAL_STREAM: "8:17988", GITHUB_WORKFLOW: "payment-mf-portal-dev", _: "/usr/local/bin/yarn", npm_package_devDependencies_ts_jest: "^29.1.1", npm_package_devDependencies_autoprefixer: "^10.4.20", npm_package_devDependencies__types_jest: "^29.5.4", npm_package_dependencies_i18next_browser_languagedetector: "^6.1.4", npm_package_module: "./dist/app.js", npm_package_devDependencies__types_uuid: "^8.3.4", npm_package_scripts_lint: "eslint --ext .ts,vue --ignore-path .gitignore . --fix", npm_config_registry: "https://registry.yarnpkg.com", ACTIONS_RUNNER_ACTION_ARCHIVE_CACHE: "/opt/actionarchivecache", STATS_D: "false", GITHUB_RUN_ID: "11736369770", STATS_VMFE: "true", GITHUB_REF_TYPE: "branch", BOOTSTRAP_HASKELL_NONINTERACTIVE: "1", GITHUB_WORKFLOW_SHA: "60bf67c343ffedb7b99780f09bb12ab46e4ec93f", GITHUB_BASE_REF: "", ImageOS: "ubuntu22", npm_package_devDependencies__vitejs_plugin_vue: "^5.0.4", npm_package_exports___import: "./dist/app.js", npm_config_ignore_scripts: "", GITHUB_WORKFLOW_REF: "feedmepos/payment-service/.github/workflows/payment-mf-portal-dev.yaml@refs/heads/dev", ACTIONS_ID_TOKEN_REQUEST_TOKEN: "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsIng1dCI6Ikh5cTROQVRBanNucUM3bWRydEFoaHJDUjJfUSJ9.eyJuYW1laWQiOiJkZGRkZGRkZC1kZGRkLWRkZGQtZGRkZC1kZGRkZGRkZGRkZGQiLCJzY3AiOiJBY3Rpb25zLkdlbmVyaWNSZWFkOjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMCBBY3Rpb25zLlJlc3VsdHM6YjEyOGZiM2QtYTkwYy00ZDI2LTk2ZTktNjhlYTU1Mzk3YWZlOmUwNzc0MmJkLTE4OWEtNTA3OS05MThiLTQzZjhiMmY5NGI4OSBBY3Rpb25zLlVwbG9hZEFydGlmYWN0czowMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDAvMTpCdWlsZC9CdWlsZC84NDEgRGlzdHJpYnV0ZWRUYXNrLkdlbmVyYXRlSWRUb2tlbjpiMTI4ZmIzZC1hOTBjLTRkMjYtOTZlOS02OGVhNTUzOTdhZmU6ZTA3NzQyYmQtMTg5YS01MDc5LTkxOGItNDNmOGIyZjk0Yjg5IExvY2F0aW9uU2VydmljZS5Db25uZWN0IFJlYWRBbmRVcGRhdGVCdWlsZEJ5VXJpOjAwMDAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMC8xOkJ1aWxkL0J1aWxkLzg0MSIsIklkZW50aXR5VHlwZUNsYWltIjoiU3lzdGVtOlNlcnZpY2VJZGVudGl0eSIsImh0dHA6Ly9zY2hlbWFzLnhtbHNvYXAub3JnL3dzLzIwMDUvMDUvaWRlbnRpdHkvY2xhaW1zL3NpZCI6IkRERERERERELUREREQtRERERC1ERERELURERERERERERERERCIsImh0dHA6Ly9zY2hlbWFzLm1pY3Jvc29mdC5jb20vd3MvMjAwOC8wNi9pZGVudGl0eS9jbGFpbXMvcHJpbWFyeXNpZCI6ImRkZGRkZGRkLWRkZGQtZGRkZC1kZGRkLWRkZGRkZGRkZGRkZCIsImF1aSI6ImEzZjFmZWRjLTY1YjEtNGVjZi05NTM3LWQ5NDE5NTZhODZiMyIsInNpZCI6IjMxNWIwOTlhLTJlMzMtNDUwYS1hYjdmLWNlNzg5YmQ0YTVmMCIsImFjIjoiW3tcIlNjb3BlXCI6XCJyZWZzL2hlYWRzL2RldlwiLFwiUGVybWlzc2lvblwiOjN9LHtcIlNjb3BlXCI6XCJyZWZzL2hlYWRzL21haW5cIixcIlBlcm1pc3Npb25cIjoxfV0iLCJhY3NsIjoiMTAiLCJvaWRjX2V4dHJhIjoie1wicmVmXCI6XCJyZWZzL2hlYWRzL2RldlwiLFwic2hhXCI6XCI2MGJmNjdjMzQzZmZlZGI3Yjk5NzgwZjA5YmIxMmFiNDZlNGVjOTNmXCIsXCJyZXBvc2l0b3J5XCI6XCJmZWVkbWVwb3MvcGF5bWVudC1zZXJ2aWNlXCIsXCJyZXBvc2l0b3J5X293bmVyXCI6XCJmZWVkbWVwb3NcIixcInJlcG9zaXRvcnlfb3duZXJfaWRcIjpcIjU0ODMxNTE1XCIsXCJydW5faWRcIjpcIjExNzM2MzY5NzcwXCIsXCJydW5fbnVtYmVyXCI6XCI2MFwiLFwicnVuX2F0dGVtcHRcIjpcIjFcIixcInJlcG9zaXRvcnlfdmlzaWJpbGl0eVwiOlwicHJpdmF0ZVwiLFwicmVwb3NpdG9yeV9pZFwiOlwiNjkwOTc5MjYwXCIsXCJhY3Rvcl9pZFwiOlwiMTU2NzQxMDdcIixcImFjdG9yXCI6XCJPc2thbmcwOVwiLFwid29ya2Zsb3dcIjpcInBheW1lbnQtbWYtcG9ydGFsLWRldlwiLFwiaGVhZF9yZWZcIjpcIlwiLFwiYmFzZV9yZWZcIjpcIlwiLFwiZXZlbnRfbmFtZVwiOlwicHVzaFwiLFwicmVmX3Byb3RlY3RlZFwiOlwiZmFsc2VcIixcInJlZl90eXBlXCI6XCJicmFuY2hcIixcIndvcmtmbG93X3JlZlwiOlwiZmVlZG1lcG9zL3BheW1lbnQtc2VydmljZS8uZ2l0aHViL3dvcmtmbG93cy9wYXltZW50LW1mLXBvcnRhbC1kZXYueWFtbEByZWZzL2hlYWRzL2RldlwiLFwid29ya2Zsb3dfc2hhXCI6XCI2MGJmNjdjMzQzZmZlZGI3Yjk5NzgwZjA5YmIxMmFiNDZlNGVjOTNmXCIsXCJqb2Jfd29ya2Zsb3dfcmVmXCI6XCJmZWVkbWVwb3MvcGF5bWVudC1zZXJ2aWNlLy5naXRodWIvd29ya2Zsb3dzL3BheW1lbnQtbWYtcG9ydGFsLWRldi55YW1sQHJlZnMvaGVhZHMvZGV2XCIsXCJqb2Jfd29ya2Zsb3dfc2hhXCI6XCI2MGJmNjdjMzQzZmZlZGI3Yjk5NzgwZjA5YmIxMmFiNDZlNGVjOTNmXCIsXCJydW5uZXJfZW52aXJvbm1lbnRcIjpcImdpdGh1Yi1ob3N0ZWRcIn0iLCJvaWRjX3N1YiI6InJlcG86ZmVlZG1lcG9zL3BheW1lbnQtc2VydmljZTpyZWY6cmVmcy9oZWFkcy9kZXYiLCJvcmNoaWQiOiJiMTI4ZmIzZC1hOTBjLTRkMjYtOTZlOS02OGVhNTUzOTdhZmUuZGVwbG95Ll9fZGVmYXVsdCIsImlzcyI6InZzdG9rZW4uYWN0aW9ucy5naXRodWJ1c2VyY29udGVudC5jb20iLCJhdWQiOiJ2c3Rva2VuLmFjdGlvbnMuZ2l0aHVidXNlcmNvbnRlbnQuY29tfHZzbzo3ZTY0NTJjNS1mYzJlLTRhZDUtYjY3My0yOWU5MGNmNzNkZDgiLCJuYmYiOjE3MzEwNDEzNzksImV4cCI6MTczMTA2NDE3OX0.LvYgORi2UAwH0xjQafuUDUqFroBM-VPVEOBv7Fls7gvrCj9Uoeh14UEZwmv4_99NxnksAX3ZAXfzhN_DZi6CLIoPYLdZrP9owl1OFyPhfhc99FiPoSCqUfnYb5ybbb4RrQu-h6_sPAoGnKiJvHmKPoxDBlYyJrEsYwt9k3UP6jvN8eZ0YwHXJEAQbcM1mUhhTrQNKgjQdMGtfdIOIDPKndkV00yLlIBqXlbV7f5BrkkzRAZxuWU2HQ2j3IB9dYakKFvzPYWBN8xTTpBdQEw7vultjN9kkAGufJbr3fccazOgw0wHurIPbOxDkbmB_d7d5Xlk-mztGk6ZA0P5sIsgMA", PERFLOG_LOCATION_SETTING: "RUNNER_PERFLOG", GITHUB_ACTION_REPOSITORY: "", npm_package_dependencies_axios: "^0.27.2", PATH: "/tmp/yarn--1731042027214-0.7916041927443087:/home/runner/work/payment-service/payment-service/mf-portal/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/opt/hostedtoolcache/node/22.10.0/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.10.0/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.10.0/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1731042027051-0.12853253967870515:/home/runner/work/payment-service/payment-service/mf-portal/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/opt/hostedtoolcache/node/22.10.0/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.10.0/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.10.0/x64/bin/node_modules/npm/bin/node-gyp-bin:/tmp/yarn--1731042026888-0.9734457085049841:/home/runner/work/payment-service/payment-service/mf-portal/node_modules/.bin:/home/runner/.config/yarn/link/node_modules/.bin:/opt/hostedtoolcache/node/22.10.0/x64/libexec/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.10.0/x64/lib/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.10.0/x64/bin/node_modules/npm/bin/node-gyp-bin:/opt/hostedtoolcache/node/22.10.0/x64/bin:/snap/bin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin", NODE: "/opt/hostedtoolcache/node/22.10.0/x64/bin/node", ANT_HOME: "/usr/share/ant", DOTNET_MULTILEVEL_LOOKUP: "0", RUNNER_TRACKING_ID: "github_c2ff117e-0f2f-47eb-824b-356b264c06d7", INVOCATION_ID: "1a21d748469f457cbe4052fbfa750718", NPM_CONFIG_USERCONFIG: "/home/runner/work/_temp/.npmrc", RUNNER_TOOL_CACHE: "/opt/hostedtoolcache", npm_package_devDependencies__types_qrcode: "^1.5.0", npm_package_devDependencies__types_jsurl: "^0.1.2", npm_package_dependencies_file_saver: "^2.0.5", npm_package_scripts_deploy_dev: "yarn build-only:dev && npm publish --@feedmepos:registry=https://registry.npmjs.org/ --access public --tag beta --no-git-checks .", npm_package_name: "@feedmepos/mf-payment", GITHUB_ACTION: "__run", GITHUB_RUN_NUMBER: "60", GITHUB_TRIGGERING_ACTOR: "Oskang09", RUNNER_ARCH: "X64", XDG_RUNTIME_DIR: "/run/user/1001", AGENT_TOOLSDIRECTORY: "/opt/hostedtoolcache", npm_package_dependencies_vue_country_flag_next: "^2.3.2", npm_package_scripts_deploy_prod: "yarn build-only:prod && npm publish --@feedmepos:registry=https://registry.npmjs.org/ --access public --tag beta --no-git-checks .", npm_package_dependencies_vue_advanced_cropper: "^2.8.6", LANG: "C.UTF-8", VCPKG_INSTALLATION_ROOT: "/usr/local/share/vcpkg", npm_package_devDependencies_eslint: "^8.17.0", npm_package_devDependencies__vue_test_utils: "^2.4.1", npm_package_devDependencies__vue_eslint_config_typescript: "^10.0.0", CONDA: "/usr/share/miniconda", RUNNER_NAME: "GitHub Actions 320", XDG_CONFIG_HOME: "/home/runner/.config", STATS_VMD: "true", GITHUB_REF_NAME: "dev", GITHUB_REPOSITORY: "feedmepos/payment-service", STATS_D_D: "false", npm_lifecycle_script: "vite build --mode fmmf:dev", npm_package_dependencies__feedmepos_core: "^2.6.0", npm_package_scripts_build_types: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir dist --composite false", npm_package_scripts_build_dts: "vue-tsc --declaration --emitDeclarationOnly -p tsconfig.app.json --outDir ./dist && mv ./dist/src/* dist", STATS_UE: "true", ANDROID_NDK_ROOT: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_ACTION_REF: "", DEBIAN_FRONTEND: "noninteractive", npm_package_dependencies_vue3_lottie: "^2.2.3", npm_package_scripts_test: "jest", npm_config_version_git_message: "v%s", GITHUB_REPOSITORY_ID: "690979260", GITHUB_ACTIONS: "true", npm_lifecycle_event: "build:mf:dev", npm_package_devDependencies_jest_transform_stub: "^2.0.0", npm_package_devDependencies_jest_environment_jsdom: "^29.4.1", npm_package_devDependencies__rushstack_eslint_patch: "^1.1.3", npm_package_dependencies_vuedraggable: "^4.1.0", npm_package_version: "0.0.0-beta.42", GITHUB_REF_PROTECTED: "false", npm_config_argv: '{"remain":[],"cooked":["run","deploy:dev"],"original":["deploy:dev"]}', npm_package_devDependencies__types_dinero_js: "^1.9.0", npm_package_dependencies_uuid: "^9.0.0", npm_package_dependencies_buffer: "^6.0.3", npm_config__feedmepos_registry: "https://npm.pkg.github.com/", GITHUB_WORKSPACE: "/home/runner/work/payment-service/payment-service", ACCEPT_EULA: "Y", GITHUB_JOB: "deploy", RUNNER_PERFLOG: "/home/runner/perflog", GITHUB_SHA: "60bf67c343ffedb7b99780f09bb12ab46e4ec93f", GITHUB_RUN_ATTEMPT: "1", npm_package_dependencies_vue_router: "^4.2.5", npm_package_exports___style: "./dist/style.css", npm_config_version_git_tag: "true", npm_config_version_git_sign: "", GITHUB_REF: "refs/heads/dev", GITHUB_ACTOR: "Oskang09", ANDROID_SDK_ROOT: "/usr/local/lib/android/sdk", npm_config_strict_ssl: "true", LEIN_HOME: "/usr/local/lib/lein", npm_package_devDependencies_path: "^0.12.7", npm_package_dependencies_qrcode: "^1.5.1", npm_package_dependencies_jszip: "^3.10.1", npm_package_dependencies_jsurl: "^0.1.5", npm_package_dependencies_firebase: "^10.14.0", GITHUB_PATH: "/home/runner/work/_temp/_runner_file_commands/add_path_73712f89-2951-4279-8568-d968360fbbd5", JAVA_HOME: "/usr/lib/jvm/temurin-11-jdk-amd64", PWD: "/home/runner/work/payment-service/payment-service/mf-portal", GITHUB_ACTOR_ID: "15674107", RUNNER_WORKSPACE: "/home/runner/work/payment-service", npm_execpath: "/usr/local/lib/node_modules/yarn/bin/yarn.js", HOMEBREW_CLEANUP_PERIODIC_FULL_DAYS: "3650", STATS_TIS: "mining", GITHUB_EVENT_NAME: "push", HOMEBREW_NO_AUTO_UPDATE: "1", ANDROID_HOME: "/usr/local/lib/android/sdk", GITHUB_SERVER_URL: "https://github.com", GECKOWEBDRIVER: "/usr/local/share/gecko_driver", ACTIONS_ID_TOKEN_REQUEST_URL: "https://pipelinesghubeus11.actions.githubusercontent.com/uhMzCspeMtZD05BczWutTDpLRkQb1I4q0fwG0tss4R7H4Wpw9s/00000000-0000-0000-0000-000000000000/_apis/distributedtask/hubs/Actions/plans/b128fb3d-a90c-4d26-96e9-68ea55397afe/jobs/e07742bd-189a-5079-918b-43f8b2f94b89/idtoken?api-version=2.0", LEIN_JAR: "/usr/local/lib/lein/self-installs/leiningen-2.11.2-standalone.jar", GHCUP_INSTALL_BASE_PREFIX: "/usr/local", GITHUB_OUTPUT: "/home/runner/work/_temp/_runner_file_commands/set_output_73712f89-2951-4279-8568-d968360fbbd5", npm_package_exports___types: "./dist/app.d.ts", EDGEWEBDRIVER: "/usr/local/share/edge_driver", STATS_EXT: "true", npm_package_devDependencies_postcss: "^8.4.47", npm_package_devDependencies_eslint_plugin_vue: "^9.1.0", npm_package_devDependencies__vue_vue3_jest: "^29.2.5", npm_package_devDependencies__pinia_testing: "^0.1.3", npm_config_save_prefix: "^", npm_config_ignore_optional: "", ANDROID_NDK: "/usr/local/lib/android/sdk/ndk/27.2.12479018", SGX_AESM_ADDR: "1", CHROME_BIN: "/usr/bin/google-chrome", npm_package_devDependencies_cd: "^0.3.3", npm_package_dependencies_rasterizehtml: "^1.3.1", npm_package_dependencies_i18next_http_backend: "^1.4.1", npm_package_scripts_preview: "vite preview", SELENIUM_JAR_PATH: "/usr/share/java/selenium-server.jar", STATS_EXTP: "https://provjobdprod.z13.web.core.windows.net/settings/provjobdsettings-latest/provjobd.data", INIT_CWD: "/home/runner/work/payment-service/payment-service/mf-portal", ANDROID_NDK_HOME: "/usr/local/lib/android/sdk/ndk/27.2.12479018", GITHUB_STEP_SUMMARY: "/home/runner/work/_temp/_runner_file_commands/step_summary_73712f89-2951-4279-8568-d968360fbbd5", npm_package_dependencies_libphonenumber_js: "^1.10.6", npm_package_dependencies__feedmepos_payment_entity: "^0.0.5-demo16", NODE_ENV: "production", ENVIRONMENT: "development", FIREBASE_API_KEY: "AIzaSyAj8JdCHtP0Vc5vZobCfgoLzWxPIn0WUG4", FIREBASE_AUTH_DOMAIN: "feedme-dev-4c3ef.firebaseapp.com", FIREBASE_DATABASE_URL: "https://feedme-dev-4c3ef.firebaseio.com", FIREBASE_PROJECT_ID: "feedme-dev-4c3ef", FIREBASE_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", FIREBASE_MESSAGING_SENDER_ID: "458797803788", FIREBASE_APP_ID: "1:458797803788:web:37f2af2926a84288f0c129", FIREBASE_MEASUREMENT_ID: "G-J2QG09D2Q7", ASSET_STORAGE_BUCKET: "feedme-dev-4c3ef.appspot.com", GOOGLE_MAP_API_KEY: "AIzaSyA_isPR1-9bX7UmRiJIhsIRNNwdn6DdmW4", AUTH_CLIENT_ID: "1a362d621873497b277ea55258cc82594ba148d235257f7bd44ea2acc132d8a4" };
3
- /**
4
- * @license
5
- * Copyright 2017 Google LLC
6
- *
7
- * Licensed under the Apache License, Version 2.0 (the "License");
8
- * you may not use this file except in compliance with the License.
9
- * You may obtain a copy of the License at
10
- *
11
- * http://www.apache.org/licenses/LICENSE-2.0
12
- *
13
- * Unless required by applicable law or agreed to in writing, software
14
- * distributed under the License is distributed on an "AS IS" BASIS,
15
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
- * See the License for the specific language governing permissions and
17
- * limitations under the License.
18
- */
19
- const pt = function(t) {
20
- const e = [];
21
- let n = 0;
22
- for (let r = 0; r < t.length; r++) {
23
- let s = t.charCodeAt(r);
24
- s < 128 ? e[n++] = s : s < 2048 ? (e[n++] = s >> 6 | 192, e[n++] = s & 63 | 128) : (s & 64512) === 55296 && r + 1 < t.length && (t.charCodeAt(r + 1) & 64512) === 56320 ? (s = 65536 + ((s & 1023) << 10) + (t.charCodeAt(++r) & 1023), e[n++] = s >> 18 | 240, e[n++] = s >> 12 & 63 | 128, e[n++] = s >> 6 & 63 | 128, e[n++] = s & 63 | 128) : (e[n++] = s >> 12 | 224, e[n++] = s >> 6 & 63 | 128, e[n++] = s & 63 | 128);
25
- }
26
- return e;
27
- }, Wt = function(t) {
28
- const e = [];
29
- let n = 0, r = 0;
30
- for (; n < t.length; ) {
31
- const s = t[n++];
32
- if (s < 128)
33
- e[r++] = String.fromCharCode(s);
34
- else if (s > 191 && s < 224) {
35
- const i = t[n++];
36
- e[r++] = String.fromCharCode((s & 31) << 6 | i & 63);
37
- } else if (s > 239 && s < 365) {
38
- const i = t[n++], o = t[n++], a = t[n++], u = ((s & 7) << 18 | (i & 63) << 12 | (o & 63) << 6 | a & 63) - 65536;
39
- e[r++] = String.fromCharCode(55296 + (u >> 10)), e[r++] = String.fromCharCode(56320 + (u & 1023));
40
- } else {
41
- const i = t[n++], o = t[n++];
42
- e[r++] = String.fromCharCode((s & 15) << 12 | (i & 63) << 6 | o & 63);
43
- }
44
- }
45
- return e.join("");
46
- }, _t = {
47
- /**
48
- * Maps bytes to characters.
49
- */
50
- byteToCharMap_: null,
51
- /**
52
- * Maps characters to bytes.
53
- */
54
- charToByteMap_: null,
55
- /**
56
- * Maps bytes to websafe characters.
57
- * @private
58
- */
59
- byteToCharMapWebSafe_: null,
60
- /**
61
- * Maps websafe characters to bytes.
62
- * @private
63
- */
64
- charToByteMapWebSafe_: null,
65
- /**
66
- * Our default alphabet, shared between
67
- * ENCODED_VALS and ENCODED_VALS_WEBSAFE
68
- */
69
- ENCODED_VALS_BASE: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",
70
- /**
71
- * Our default alphabet. Value 64 (=) is special; it means "nothing."
72
- */
73
- get ENCODED_VALS() {
74
- return this.ENCODED_VALS_BASE + "+/=";
75
- },
76
- /**
77
- * Our websafe alphabet.
78
- */
79
- get ENCODED_VALS_WEBSAFE() {
80
- return this.ENCODED_VALS_BASE + "-_.";
81
- },
82
- /**
83
- * Whether this browser supports the atob and btoa functions. This extension
84
- * started at Mozilla but is now implemented by many browsers. We use the
85
- * ASSUME_* variables to avoid pulling in the full useragent detection library
86
- * but still allowing the standard per-browser compilations.
87
- *
88
- */
89
- HAS_NATIVE_SUPPORT: typeof atob == "function",
90
- /**
91
- * Base64-encode an array of bytes.
92
- *
93
- * @param input An array of bytes (numbers with
94
- * value in [0, 255]) to encode.
95
- * @param webSafe Boolean indicating we should use the
96
- * alternative alphabet.
97
- * @return The base64 encoded string.
98
- */
99
- encodeByteArray(t, e) {
100
- if (!Array.isArray(t))
101
- throw Error("encodeByteArray takes an array as a parameter");
102
- this.init_();
103
- const n = e ? this.byteToCharMapWebSafe_ : this.byteToCharMap_, r = [];
104
- for (let s = 0; s < t.length; s += 3) {
105
- const i = t[s], o = s + 1 < t.length, a = o ? t[s + 1] : 0, u = s + 2 < t.length, h = u ? t[s + 2] : 0, I = i >> 2, g = (i & 3) << 4 | a >> 4;
106
- let y = (a & 15) << 2 | h >> 6, R = h & 63;
107
- u || (R = 64, o || (y = 64)), r.push(n[I], n[g], n[y], n[R]);
108
- }
109
- return r.join("");
110
- },
111
- /**
112
- * Base64-encode a string.
113
- *
114
- * @param input A string to encode.
115
- * @param webSafe If true, we should use the
116
- * alternative alphabet.
117
- * @return The base64 encoded string.
118
- */
119
- encodeString(t, e) {
120
- return this.HAS_NATIVE_SUPPORT && !e ? btoa(t) : this.encodeByteArray(pt(t), e);
121
- },
122
- /**
123
- * Base64-decode a string.
124
- *
125
- * @param input to decode.
126
- * @param webSafe True if we should use the
127
- * alternative alphabet.
128
- * @return string representing the decoded value.
129
- */
130
- decodeString(t, e) {
131
- return this.HAS_NATIVE_SUPPORT && !e ? atob(t) : Wt(this.decodeStringToByteArray(t, e));
132
- },
133
- /**
134
- * Base64-decode a string.
135
- *
136
- * In base-64 decoding, groups of four characters are converted into three
137
- * bytes. If the encoder did not apply padding, the input length may not
138
- * be a multiple of 4.
139
- *
140
- * In this case, the last group will have fewer than 4 characters, and
141
- * padding will be inferred. If the group has one or two characters, it decodes
142
- * to one byte. If the group has three characters, it decodes to two bytes.
143
- *
144
- * @param input Input to decode.
145
- * @param webSafe True if we should use the web-safe alphabet.
146
- * @return bytes representing the decoded value.
147
- */
148
- decodeStringToByteArray(t, e) {
149
- this.init_();
150
- const n = e ? this.charToByteMapWebSafe_ : this.charToByteMap_, r = [];
151
- for (let s = 0; s < t.length; ) {
152
- const i = n[t.charAt(s++)], a = s < t.length ? n[t.charAt(s)] : 0;
153
- ++s;
154
- const h = s < t.length ? n[t.charAt(s)] : 64;
155
- ++s;
156
- const g = s < t.length ? n[t.charAt(s)] : 64;
157
- if (++s, i == null || a == null || h == null || g == null)
158
- throw new Vt();
159
- const y = i << 2 | a >> 4;
160
- if (r.push(y), h !== 64) {
161
- const R = a << 4 & 240 | h >> 2;
162
- if (r.push(R), g !== 64) {
163
- const O = h << 6 & 192 | g;
164
- r.push(O);
165
- }
166
- }
167
- }
168
- return r;
169
- },
170
- /**
171
- * Lazy static initialization function. Called before
172
- * accessing any of the static map variables.
173
- * @private
174
- */
175
- init_() {
176
- if (!this.byteToCharMap_) {
177
- this.byteToCharMap_ = {}, this.charToByteMap_ = {}, this.byteToCharMapWebSafe_ = {}, this.charToByteMapWebSafe_ = {};
178
- for (let t = 0; t < this.ENCODED_VALS.length; t++)
179
- this.byteToCharMap_[t] = this.ENCODED_VALS.charAt(t), this.charToByteMap_[this.byteToCharMap_[t]] = t, this.byteToCharMapWebSafe_[t] = this.ENCODED_VALS_WEBSAFE.charAt(t), this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]] = t, t >= this.ENCODED_VALS_BASE.length && (this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)] = t, this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)] = t);
180
- }
181
- }
182
- };
183
- class Vt extends Error {
184
- constructor() {
185
- super(...arguments), this.name = "DecodeBase64StringError";
186
- }
187
- }
188
- const Zt = function(t) {
189
- const e = pt(t);
190
- return _t.encodeByteArray(e, !0);
191
- }, Ee = function(t) {
192
- return Zt(t).replace(/\./g, "");
193
- }, zt = function(t) {
194
- try {
195
- return _t.decodeString(t, !0);
196
- } catch (e) {
197
- console.error("base64Decode failed: ", e);
198
- }
199
- return null;
200
- };
201
- /**
202
- * @license
203
- * Copyright 2022 Google LLC
204
- *
205
- * Licensed under the Apache License, Version 2.0 (the "License");
206
- * you may not use this file except in compliance with the License.
207
- * You may obtain a copy of the License at
208
- *
209
- * http://www.apache.org/licenses/LICENSE-2.0
210
- *
211
- * Unless required by applicable law or agreed to in writing, software
212
- * distributed under the License is distributed on an "AS IS" BASIS,
213
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
214
- * See the License for the specific language governing permissions and
215
- * limitations under the License.
216
- */
217
- function Yt() {
218
- if (typeof self < "u")
219
- return self;
220
- if (typeof window < "u")
221
- return window;
222
- if (typeof global < "u")
223
- return global;
224
- throw new Error("Unable to locate global object.");
225
- }
226
- /**
227
- * @license
228
- * Copyright 2022 Google LLC
229
- *
230
- * Licensed under the Apache License, Version 2.0 (the "License");
231
- * you may not use this file except in compliance with the License.
232
- * You may obtain a copy of the License at
233
- *
234
- * http://www.apache.org/licenses/LICENSE-2.0
235
- *
236
- * Unless required by applicable law or agreed to in writing, software
237
- * distributed under the License is distributed on an "AS IS" BASIS,
238
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
239
- * See the License for the specific language governing permissions and
240
- * limitations under the License.
241
- */
242
- const Xt = () => Yt().__FIREBASE_DEFAULTS__, Jt = () => {
243
- if (typeof process > "u" || typeof Ye > "u")
244
- return;
245
- const t = Ye.__FIREBASE_DEFAULTS__;
246
- if (t)
247
- return JSON.parse(t);
248
- }, Kt = () => {
249
- if (typeof document > "u")
250
- return;
251
- let t;
252
- try {
253
- t = document.cookie.match(/__FIREBASE_DEFAULTS__=([^;]+)/);
254
- } catch {
255
- return;
256
- }
257
- const e = t && zt(t[1]);
258
- return e && JSON.parse(e);
259
- }, ft = () => {
260
- try {
261
- return Xt() || Jt() || Kt();
262
- } catch (t) {
263
- console.info(`Unable to get __FIREBASE_DEFAULTS__ due to: ${t}`);
264
- return;
265
- }
266
- }, Qt = (t) => {
267
- var e, n;
268
- return (n = (e = ft()) === null || e === void 0 ? void 0 : e.emulatorHosts) === null || n === void 0 ? void 0 : n[t];
269
- }, qt = (t) => {
270
- const e = Qt(t);
271
- if (!e)
272
- return;
273
- const n = e.lastIndexOf(":");
274
- if (n <= 0 || n + 1 === e.length)
275
- throw new Error(`Invalid host ${e} with no separate hostname and port!`);
276
- const r = parseInt(e.substring(n + 1), 10);
277
- return e[0] === "[" ? [e.substring(1, n - 1), r] : [e.substring(0, n), r];
278
- }, mt = () => {
279
- var t;
280
- return (t = ft()) === null || t === void 0 ? void 0 : t.config;
281
- };
282
- /**
283
- * @license
284
- * Copyright 2017 Google LLC
285
- *
286
- * Licensed under the Apache License, Version 2.0 (the "License");
287
- * you may not use this file except in compliance with the License.
288
- * You may obtain a copy of the License at
289
- *
290
- * http://www.apache.org/licenses/LICENSE-2.0
291
- *
292
- * Unless required by applicable law or agreed to in writing, software
293
- * distributed under the License is distributed on an "AS IS" BASIS,
294
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
295
- * See the License for the specific language governing permissions and
296
- * limitations under the License.
297
- */
298
- class en {
299
- constructor() {
300
- this.reject = () => {
301
- }, this.resolve = () => {
302
- }, this.promise = new Promise((e, n) => {
303
- this.resolve = e, this.reject = n;
304
- });
305
- }
306
- /**
307
- * Our API internals are not promisified and cannot because our callback APIs have subtle expectations around
308
- * invoking promises inline, which Promises are forbidden to do. This method accepts an optional node-style callback
309
- * and returns a node-style callback which will resolve or reject the Deferred's promise.
310
- */
311
- wrapCallback(e) {
312
- return (n, r) => {
313
- n ? this.reject(n) : this.resolve(r), typeof e == "function" && (this.promise.catch(() => {
314
- }), e.length === 1 ? e(n) : e(n, r));
315
- };
316
- }
317
- }
318
- /**
319
- * @license
320
- * Copyright 2021 Google LLC
321
- *
322
- * Licensed under the Apache License, Version 2.0 (the "License");
323
- * you may not use this file except in compliance with the License.
324
- * You may obtain a copy of the License at
325
- *
326
- * http://www.apache.org/licenses/LICENSE-2.0
327
- *
328
- * Unless required by applicable law or agreed to in writing, software
329
- * distributed under the License is distributed on an "AS IS" BASIS,
330
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
331
- * See the License for the specific language governing permissions and
332
- * limitations under the License.
333
- */
334
- function tn(t, e) {
335
- if (t.uid)
336
- throw new Error('The "uid" field is no longer supported by mockUserToken. Please use "sub" instead for Firebase Auth User ID.');
337
- const n = {
338
- alg: "none",
339
- type: "JWT"
340
- }, r = e || "demo-project", s = t.iat || 0, i = t.sub || t.user_id;
341
- if (!i)
342
- throw new Error("mockUserToken must contain 'sub' or 'user_id' field!");
343
- const o = Object.assign({
344
- // Set all required fields to decent defaults
345
- iss: `https://securetoken.google.com/${r}`,
346
- aud: r,
347
- iat: s,
348
- exp: s + 3600,
349
- auth_time: s,
350
- sub: i,
351
- user_id: i,
352
- firebase: {
353
- sign_in_provider: "custom",
354
- identities: {}
355
- }
356
- }, t);
357
- return [
358
- Ee(JSON.stringify(n)),
359
- Ee(JSON.stringify(o)),
360
- ""
361
- ].join(".");
362
- }
363
- function nn() {
364
- try {
365
- return typeof indexedDB == "object";
366
- } catch {
367
- return !1;
368
- }
369
- }
370
- function rn() {
371
- return new Promise((t, e) => {
372
- try {
373
- let n = !0;
374
- const r = "validate-browser-context-for-indexeddb-analytics-module", s = self.indexedDB.open(r);
375
- s.onsuccess = () => {
376
- s.result.close(), n || self.indexedDB.deleteDatabase(r), t(!0);
377
- }, s.onupgradeneeded = () => {
378
- n = !1;
379
- }, s.onerror = () => {
380
- var i;
381
- e(((i = s.error) === null || i === void 0 ? void 0 : i.message) || "");
382
- };
383
- } catch (n) {
384
- e(n);
385
- }
386
- });
387
- }
388
- /**
389
- * @license
390
- * Copyright 2017 Google LLC
391
- *
392
- * Licensed under the Apache License, Version 2.0 (the "License");
393
- * you may not use this file except in compliance with the License.
394
- * You may obtain a copy of the License at
395
- *
396
- * http://www.apache.org/licenses/LICENSE-2.0
397
- *
398
- * Unless required by applicable law or agreed to in writing, software
399
- * distributed under the License is distributed on an "AS IS" BASIS,
400
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
401
- * See the License for the specific language governing permissions and
402
- * limitations under the License.
403
- */
404
- const sn = "FirebaseError";
405
- class se extends Error {
406
- constructor(e, n, r) {
407
- super(n), this.code = e, this.customData = r, this.name = sn, Object.setPrototypeOf(this, se.prototype), Error.captureStackTrace && Error.captureStackTrace(this, gt.prototype.create);
408
- }
409
- }
410
- class gt {
411
- constructor(e, n, r) {
412
- this.service = e, this.serviceName = n, this.errors = r;
413
- }
414
- create(e, ...n) {
415
- const r = n[0] || {}, s = `${this.service}/${e}`, i = this.errors[e], o = i ? on(i, r) : "Error", a = `${this.serviceName}: ${o} (${s}).`;
416
- return new se(s, a, r);
417
- }
418
- }
419
- function on(t, e) {
420
- return t.replace(an, (n, r) => {
421
- const s = e[r];
422
- return s != null ? String(s) : `<${r}?>`;
423
- });
424
- }
425
- const an = /\{\$([^}]+)}/g;
426
- function Se(t, e) {
427
- if (t === e)
428
- return !0;
429
- const n = Object.keys(t), r = Object.keys(e);
430
- for (const s of n) {
431
- if (!r.includes(s))
432
- return !1;
433
- const i = t[s], o = e[s];
434
- if (Xe(i) && Xe(o)) {
435
- if (!Se(i, o))
436
- return !1;
437
- } else if (i !== o)
438
- return !1;
439
- }
440
- for (const s of r)
441
- if (!n.includes(s))
442
- return !1;
443
- return !0;
444
- }
445
- function Xe(t) {
446
- return t !== null && typeof t == "object";
447
- }
448
- /**
449
- * @license
450
- * Copyright 2021 Google LLC
451
- *
452
- * Licensed under the Apache License, Version 2.0 (the "License");
453
- * you may not use this file except in compliance with the License.
454
- * You may obtain a copy of the License at
455
- *
456
- * http://www.apache.org/licenses/LICENSE-2.0
457
- *
458
- * Unless required by applicable law or agreed to in writing, software
459
- * distributed under the License is distributed on an "AS IS" BASIS,
460
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
461
- * See the License for the specific language governing permissions and
462
- * limitations under the License.
463
- */
464
- function he(t) {
465
- return t && t._delegate ? t._delegate : t;
466
- }
467
- class ue {
468
- /**
469
- *
470
- * @param name The public service name, e.g. app, auth, firestore, database
471
- * @param instanceFactory Service factory responsible for creating the public interface
472
- * @param type whether the service provided by the component is public or private
473
- */
474
- constructor(e, n, r) {
475
- this.name = e, this.instanceFactory = n, this.type = r, this.multipleInstances = !1, this.serviceProps = {}, this.instantiationMode = "LAZY", this.onInstanceCreated = null;
476
- }
477
- setInstantiationMode(e) {
478
- return this.instantiationMode = e, this;
479
- }
480
- setMultipleInstances(e) {
481
- return this.multipleInstances = e, this;
482
- }
483
- setServiceProps(e) {
484
- return this.serviceProps = e, this;
485
- }
486
- setInstanceCreatedCallback(e) {
487
- return this.onInstanceCreated = e, this;
488
- }
489
- }
490
- /**
491
- * @license
492
- * Copyright 2019 Google LLC
493
- *
494
- * Licensed under the Apache License, Version 2.0 (the "License");
495
- * you may not use this file except in compliance with the License.
496
- * You may obtain a copy of the License at
497
- *
498
- * http://www.apache.org/licenses/LICENSE-2.0
499
- *
500
- * Unless required by applicable law or agreed to in writing, software
501
- * distributed under the License is distributed on an "AS IS" BASIS,
502
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
503
- * See the License for the specific language governing permissions and
504
- * limitations under the License.
505
- */
506
- const q = "[DEFAULT]";
507
- /**
508
- * @license
509
- * Copyright 2019 Google LLC
510
- *
511
- * Licensed under the Apache License, Version 2.0 (the "License");
512
- * you may not use this file except in compliance with the License.
513
- * You may obtain a copy of the License at
514
- *
515
- * http://www.apache.org/licenses/LICENSE-2.0
516
- *
517
- * Unless required by applicable law or agreed to in writing, software
518
- * distributed under the License is distributed on an "AS IS" BASIS,
519
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
520
- * See the License for the specific language governing permissions and
521
- * limitations under the License.
522
- */
523
- class cn {
524
- constructor(e, n) {
525
- this.name = e, this.container = n, this.component = null, this.instances = /* @__PURE__ */ new Map(), this.instancesDeferred = /* @__PURE__ */ new Map(), this.instancesOptions = /* @__PURE__ */ new Map(), this.onInitCallbacks = /* @__PURE__ */ new Map();
526
- }
527
- /**
528
- * @param identifier A provider can provide multiple instances of a service
529
- * if this.component.multipleInstances is true.
530
- */
531
- get(e) {
532
- const n = this.normalizeInstanceIdentifier(e);
533
- if (!this.instancesDeferred.has(n)) {
534
- const r = new en();
535
- if (this.instancesDeferred.set(n, r), this.isInitialized(n) || this.shouldAutoInitialize())
536
- try {
537
- const s = this.getOrInitializeService({
538
- instanceIdentifier: n
539
- });
540
- s && r.resolve(s);
541
- } catch {
542
- }
543
- }
544
- return this.instancesDeferred.get(n).promise;
545
- }
546
- getImmediate(e) {
547
- var n;
548
- const r = this.normalizeInstanceIdentifier(e == null ? void 0 : e.identifier), s = (n = e == null ? void 0 : e.optional) !== null && n !== void 0 ? n : !1;
549
- if (this.isInitialized(r) || this.shouldAutoInitialize())
550
- try {
551
- return this.getOrInitializeService({
552
- instanceIdentifier: r
553
- });
554
- } catch (i) {
555
- if (s)
556
- return null;
557
- throw i;
558
- }
559
- else {
560
- if (s)
561
- return null;
562
- throw Error(`Service ${this.name} is not available`);
563
- }
564
- }
565
- getComponent() {
566
- return this.component;
567
- }
568
- setComponent(e) {
569
- if (e.name !== this.name)
570
- throw Error(`Mismatching Component ${e.name} for Provider ${this.name}.`);
571
- if (this.component)
572
- throw Error(`Component for ${this.name} has already been provided`);
573
- if (this.component = e, !!this.shouldAutoInitialize()) {
574
- if (ln(e))
575
- try {
576
- this.getOrInitializeService({ instanceIdentifier: q });
577
- } catch {
578
- }
579
- for (const [n, r] of this.instancesDeferred.entries()) {
580
- const s = this.normalizeInstanceIdentifier(n);
581
- try {
582
- const i = this.getOrInitializeService({
583
- instanceIdentifier: s
584
- });
585
- r.resolve(i);
586
- } catch {
587
- }
588
- }
589
- }
590
- }
591
- clearInstance(e = q) {
592
- this.instancesDeferred.delete(e), this.instancesOptions.delete(e), this.instances.delete(e);
593
- }
594
- // app.delete() will call this method on every provider to delete the services
595
- // TODO: should we mark the provider as deleted?
596
- async delete() {
597
- const e = Array.from(this.instances.values());
598
- await Promise.all([
599
- ...e.filter((n) => "INTERNAL" in n).map((n) => n.INTERNAL.delete()),
600
- ...e.filter((n) => "_delete" in n).map((n) => n._delete())
601
- ]);
602
- }
603
- isComponentSet() {
604
- return this.component != null;
605
- }
606
- isInitialized(e = q) {
607
- return this.instances.has(e);
608
- }
609
- getOptions(e = q) {
610
- return this.instancesOptions.get(e) || {};
611
- }
612
- initialize(e = {}) {
613
- const { options: n = {} } = e, r = this.normalizeInstanceIdentifier(e.instanceIdentifier);
614
- if (this.isInitialized(r))
615
- throw Error(`${this.name}(${r}) has already been initialized`);
616
- if (!this.isComponentSet())
617
- throw Error(`Component ${this.name} has not been registered yet`);
618
- const s = this.getOrInitializeService({
619
- instanceIdentifier: r,
620
- options: n
621
- });
622
- for (const [i, o] of this.instancesDeferred.entries()) {
623
- const a = this.normalizeInstanceIdentifier(i);
624
- r === a && o.resolve(s);
625
- }
626
- return s;
627
- }
628
- /**
629
- *
630
- * @param callback - a function that will be invoked after the provider has been initialized by calling provider.initialize().
631
- * The function is invoked SYNCHRONOUSLY, so it should not execute any longrunning tasks in order to not block the program.
632
- *
633
- * @param identifier An optional instance identifier
634
- * @returns a function to unregister the callback
635
- */
636
- onInit(e, n) {
637
- var r;
638
- const s = this.normalizeInstanceIdentifier(n), i = (r = this.onInitCallbacks.get(s)) !== null && r !== void 0 ? r : /* @__PURE__ */ new Set();
639
- i.add(e), this.onInitCallbacks.set(s, i);
640
- const o = this.instances.get(s);
641
- return o && e(o, s), () => {
642
- i.delete(e);
643
- };
644
- }
645
- /**
646
- * Invoke onInit callbacks synchronously
647
- * @param instance the service instance`
648
- */
649
- invokeOnInitCallbacks(e, n) {
650
- const r = this.onInitCallbacks.get(n);
651
- if (r)
652
- for (const s of r)
653
- try {
654
- s(e, n);
655
- } catch {
656
- }
657
- }
658
- getOrInitializeService({ instanceIdentifier: e, options: n = {} }) {
659
- let r = this.instances.get(e);
660
- if (!r && this.component && (r = this.component.instanceFactory(this.container, {
661
- instanceIdentifier: un(e),
662
- options: n
663
- }), this.instances.set(e, r), this.instancesOptions.set(e, n), this.invokeOnInitCallbacks(r, e), this.component.onInstanceCreated))
664
- try {
665
- this.component.onInstanceCreated(this.container, e, r);
666
- } catch {
667
- }
668
- return r || null;
669
- }
670
- normalizeInstanceIdentifier(e = q) {
671
- return this.component ? this.component.multipleInstances ? e : q : e;
672
- }
673
- shouldAutoInitialize() {
674
- return !!this.component && this.component.instantiationMode !== "EXPLICIT";
675
- }
676
- }
677
- function un(t) {
678
- return t === q ? void 0 : t;
679
- }
680
- function ln(t) {
681
- return t.instantiationMode === "EAGER";
682
- }
683
- /**
684
- * @license
685
- * Copyright 2019 Google LLC
686
- *
687
- * Licensed under the Apache License, Version 2.0 (the "License");
688
- * you may not use this file except in compliance with the License.
689
- * You may obtain a copy of the License at
690
- *
691
- * http://www.apache.org/licenses/LICENSE-2.0
692
- *
693
- * Unless required by applicable law or agreed to in writing, software
694
- * distributed under the License is distributed on an "AS IS" BASIS,
695
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
696
- * See the License for the specific language governing permissions and
697
- * limitations under the License.
698
- */
699
- class dn {
700
- constructor(e) {
701
- this.name = e, this.providers = /* @__PURE__ */ new Map();
702
- }
703
- /**
704
- *
705
- * @param component Component being added
706
- * @param overwrite When a component with the same name has already been registered,
707
- * if overwrite is true: overwrite the existing component with the new component and create a new
708
- * provider with the new component. It can be useful in tests where you want to use different mocks
709
- * for different tests.
710
- * if overwrite is false: throw an exception
711
- */
712
- addComponent(e) {
713
- const n = this.getProvider(e.name);
714
- if (n.isComponentSet())
715
- throw new Error(`Component ${e.name} has already been registered with ${this.name}`);
716
- n.setComponent(e);
717
- }
718
- addOrOverwriteComponent(e) {
719
- this.getProvider(e.name).isComponentSet() && this.providers.delete(e.name), this.addComponent(e);
720
- }
721
- /**
722
- * getProvider provides a type safe interface where it can only be called with a field name
723
- * present in NameServiceMapping interface.
724
- *
725
- * Firebase SDKs providing services should extend NameServiceMapping interface to register
726
- * themselves.
727
- */
728
- getProvider(e) {
729
- if (this.providers.has(e))
730
- return this.providers.get(e);
731
- const n = new cn(e, this);
732
- return this.providers.set(e, n), n;
733
- }
734
- getProviders() {
735
- return Array.from(this.providers.values());
736
- }
737
- }
738
- /**
739
- * @license
740
- * Copyright 2017 Google LLC
741
- *
742
- * Licensed under the Apache License, Version 2.0 (the "License");
743
- * you may not use this file except in compliance with the License.
744
- * You may obtain a copy of the License at
745
- *
746
- * http://www.apache.org/licenses/LICENSE-2.0
747
- *
748
- * Unless required by applicable law or agreed to in writing, software
749
- * distributed under the License is distributed on an "AS IS" BASIS,
750
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
751
- * See the License for the specific language governing permissions and
752
- * limitations under the License.
753
- */
754
- var T;
755
- (function(t) {
756
- t[t.DEBUG = 0] = "DEBUG", t[t.VERBOSE = 1] = "VERBOSE", t[t.INFO = 2] = "INFO", t[t.WARN = 3] = "WARN", t[t.ERROR = 4] = "ERROR", t[t.SILENT = 5] = "SILENT";
757
- })(T || (T = {}));
758
- const hn = {
759
- debug: T.DEBUG,
760
- verbose: T.VERBOSE,
761
- info: T.INFO,
762
- warn: T.WARN,
763
- error: T.ERROR,
764
- silent: T.SILENT
765
- }, pn = T.INFO, _n = {
766
- [T.DEBUG]: "log",
767
- [T.VERBOSE]: "log",
768
- [T.INFO]: "info",
769
- [T.WARN]: "warn",
770
- [T.ERROR]: "error"
771
- }, fn = (t, e, ...n) => {
772
- if (e < t.logLevel)
773
- return;
774
- const r = (/* @__PURE__ */ new Date()).toISOString(), s = _n[e];
775
- if (s)
776
- console[s](`[${r}] ${t.name}:`, ...n);
777
- else
778
- throw new Error(`Attempted to log a message with an invalid logType (value: ${e})`);
779
- };
780
- class mn {
781
- /**
782
- * Gives you an instance of a Logger to capture messages according to
783
- * Firebase's logging scheme.
784
- *
785
- * @param name The name that the logs will be associated with
786
- */
787
- constructor(e) {
788
- this.name = e, this._logLevel = pn, this._logHandler = fn, this._userLogHandler = null;
789
- }
790
- get logLevel() {
791
- return this._logLevel;
792
- }
793
- set logLevel(e) {
794
- if (!(e in T))
795
- throw new TypeError(`Invalid value "${e}" assigned to \`logLevel\``);
796
- this._logLevel = e;
797
- }
798
- // Workaround for setter/getter having to be the same type.
799
- setLogLevel(e) {
800
- this._logLevel = typeof e == "string" ? hn[e] : e;
801
- }
802
- get logHandler() {
803
- return this._logHandler;
804
- }
805
- set logHandler(e) {
806
- if (typeof e != "function")
807
- throw new TypeError("Value assigned to `logHandler` must be a function");
808
- this._logHandler = e;
809
- }
810
- get userLogHandler() {
811
- return this._userLogHandler;
812
- }
813
- set userLogHandler(e) {
814
- this._userLogHandler = e;
815
- }
816
- /**
817
- * The functions below are all based on the `console` interface
818
- */
819
- debug(...e) {
820
- this._userLogHandler && this._userLogHandler(this, T.DEBUG, ...e), this._logHandler(this, T.DEBUG, ...e);
821
- }
822
- log(...e) {
823
- this._userLogHandler && this._userLogHandler(this, T.VERBOSE, ...e), this._logHandler(this, T.VERBOSE, ...e);
824
- }
825
- info(...e) {
826
- this._userLogHandler && this._userLogHandler(this, T.INFO, ...e), this._logHandler(this, T.INFO, ...e);
827
- }
828
- warn(...e) {
829
- this._userLogHandler && this._userLogHandler(this, T.WARN, ...e), this._logHandler(this, T.WARN, ...e);
830
- }
831
- error(...e) {
832
- this._userLogHandler && this._userLogHandler(this, T.ERROR, ...e), this._logHandler(this, T.ERROR, ...e);
833
- }
834
- }
835
- const gn = (t, e) => e.some((n) => t instanceof n);
836
- let Je, Ke;
837
- function bn() {
838
- return Je || (Je = [
839
- IDBDatabase,
840
- IDBObjectStore,
841
- IDBIndex,
842
- IDBCursor,
843
- IDBTransaction
844
- ]);
845
- }
846
- function En() {
847
- return Ke || (Ke = [
848
- IDBCursor.prototype.advance,
849
- IDBCursor.prototype.continue,
850
- IDBCursor.prototype.continuePrimaryKey
851
- ]);
852
- }
853
- const bt = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakMap(), He = /* @__PURE__ */ new WeakMap();
854
- function In(t) {
855
- const e = new Promise((n, r) => {
856
- const s = () => {
857
- t.removeEventListener("success", i), t.removeEventListener("error", o);
858
- }, i = () => {
859
- n(z(t.result)), s();
860
- }, o = () => {
861
- r(t.error), s();
862
- };
863
- t.addEventListener("success", i), t.addEventListener("error", o);
864
- });
865
- return e.then((n) => {
866
- n instanceof IDBCursor && bt.set(n, t);
867
- }).catch(() => {
868
- }), He.set(e, t), e;
869
- }
870
- function Tn(t) {
871
- if (Ce.has(t))
872
- return;
873
- const e = new Promise((n, r) => {
874
- const s = () => {
875
- t.removeEventListener("complete", i), t.removeEventListener("error", o), t.removeEventListener("abort", o);
876
- }, i = () => {
877
- n(), s();
878
- }, o = () => {
879
- r(t.error || new DOMException("AbortError", "AbortError")), s();
880
- };
881
- t.addEventListener("complete", i), t.addEventListener("error", o), t.addEventListener("abort", o);
882
- });
883
- Ce.set(t, e);
884
- }
885
- let Me = {
886
- get(t, e, n) {
887
- if (t instanceof IDBTransaction) {
888
- if (e === "done")
889
- return Ce.get(t);
890
- if (e === "objectStoreNames")
891
- return t.objectStoreNames || Et.get(t);
892
- if (e === "store")
893
- return n.objectStoreNames[1] ? void 0 : n.objectStore(n.objectStoreNames[0]);
894
- }
895
- return z(t[e]);
896
- },
897
- set(t, e, n) {
898
- return t[e] = n, !0;
899
- },
900
- has(t, e) {
901
- return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
902
- }
903
- };
904
- function yn(t) {
905
- Me = t(Me);
906
- }
907
- function Rn(t) {
908
- return t === IDBDatabase.prototype.transaction && !("objectStoreNames" in IDBTransaction.prototype) ? function(e, ...n) {
909
- const r = t.call(ve(this), e, ...n);
910
- return Et.set(r, e.sort ? e.sort() : [e]), z(r);
911
- } : En().includes(t) ? function(...e) {
912
- return t.apply(ve(this), e), z(bt.get(this));
913
- } : function(...e) {
914
- return z(t.apply(ve(this), e));
915
- };
916
- }
917
- function wn(t) {
918
- return typeof t == "function" ? Rn(t) : (t instanceof IDBTransaction && Tn(t), gn(t, bn()) ? new Proxy(t, Me) : t);
919
- }
920
- function z(t) {
921
- if (t instanceof IDBRequest)
922
- return In(t);
923
- if (we.has(t))
924
- return we.get(t);
925
- const e = wn(t);
926
- return e !== t && (we.set(t, e), He.set(e, t)), e;
927
- }
928
- const ve = (t) => He.get(t);
929
- function vn(t, e, { blocked: n, upgrade: r, blocking: s, terminated: i } = {}) {
930
- const o = indexedDB.open(t, e), a = z(o);
931
- return r && o.addEventListener("upgradeneeded", (u) => {
932
- r(z(o.result), u.oldVersion, u.newVersion, z(o.transaction), u);
933
- }), n && o.addEventListener("blocked", (u) => n(
934
- // Casting due to https://github.com/microsoft/TypeScript-DOM-lib-generator/pull/1405
935
- u.oldVersion,
936
- u.newVersion,
937
- u
938
- )), a.then((u) => {
939
- i && u.addEventListener("close", () => i()), s && u.addEventListener("versionchange", (h) => s(h.oldVersion, h.newVersion, h));
940
- }).catch(() => {
941
- }), a;
942
- }
943
- const An = ["get", "getKey", "getAll", "getAllKeys", "count"], On = ["put", "add", "delete", "clear"], Ae = /* @__PURE__ */ new Map();
944
- function Qe(t, e) {
945
- if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
946
- return;
947
- if (Ae.get(e))
948
- return Ae.get(e);
949
- const n = e.replace(/FromIndex$/, ""), r = e !== n, s = On.includes(n);
950
- if (
951
- // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
952
- !(n in (r ? IDBIndex : IDBObjectStore).prototype) || !(s || An.includes(n))
953
- )
954
- return;
955
- const i = async function(o, ...a) {
956
- const u = this.transaction(o, s ? "readwrite" : "readonly");
957
- let h = u.store;
958
- return r && (h = h.index(a.shift())), (await Promise.all([
959
- h[n](...a),
960
- s && u.done
961
- ]))[0];
962
- };
963
- return Ae.set(e, i), i;
964
- }
965
- yn((t) => ({
966
- ...t,
967
- get: (e, n, r) => Qe(e, n) || t.get(e, n, r),
968
- has: (e, n) => !!Qe(e, n) || t.has(e, n)
969
- }));
970
- /**
971
- * @license
972
- * Copyright 2019 Google LLC
973
- *
974
- * Licensed under the Apache License, Version 2.0 (the "License");
975
- * you may not use this file except in compliance with the License.
976
- * You may obtain a copy of the License at
977
- *
978
- * http://www.apache.org/licenses/LICENSE-2.0
979
- *
980
- * Unless required by applicable law or agreed to in writing, software
981
- * distributed under the License is distributed on an "AS IS" BASIS,
982
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
983
- * See the License for the specific language governing permissions and
984
- * limitations under the License.
985
- */
986
- class Dn {
987
- constructor(e) {
988
- this.container = e;
989
- }
990
- // In initial implementation, this will be called by installations on
991
- // auth token refresh, and installations will send this string.
992
- getPlatformInfoString() {
993
- return this.container.getProviders().map((n) => {
994
- if (kn(n)) {
995
- const r = n.getImmediate();
996
- return `${r.library}/${r.version}`;
997
- } else
998
- return null;
999
- }).filter((n) => n).join(" ");
1000
- }
1001
- }
1002
- function kn(t) {
1003
- const e = t.getComponent();
1004
- return (e == null ? void 0 : e.type) === "VERSION";
1005
- }
1006
- const Ue = "@firebase/app", qe = "0.10.12";
1007
- /**
1008
- * @license
1009
- * Copyright 2019 Google LLC
1010
- *
1011
- * Licensed under the Apache License, Version 2.0 (the "License");
1012
- * you may not use this file except in compliance with the License.
1013
- * You may obtain a copy of the License at
1014
- *
1015
- * http://www.apache.org/licenses/LICENSE-2.0
1016
- *
1017
- * Unless required by applicable law or agreed to in writing, software
1018
- * distributed under the License is distributed on an "AS IS" BASIS,
1019
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1020
- * See the License for the specific language governing permissions and
1021
- * limitations under the License.
1022
- */
1023
- const G = new mn("@firebase/app"), Nn = "@firebase/app-compat", Sn = "@firebase/analytics-compat", Cn = "@firebase/analytics", Mn = "@firebase/app-check-compat", Un = "@firebase/app-check", Bn = "@firebase/auth", Ln = "@firebase/auth-compat", Pn = "@firebase/database", xn = "@firebase/data-connect", $n = "@firebase/database-compat", Hn = "@firebase/functions", jn = "@firebase/functions-compat", Fn = "@firebase/installations", Gn = "@firebase/installations-compat", Wn = "@firebase/messaging", Vn = "@firebase/messaging-compat", Zn = "@firebase/performance", zn = "@firebase/performance-compat", Yn = "@firebase/remote-config", Xn = "@firebase/remote-config-compat", Jn = "@firebase/storage", Kn = "@firebase/storage-compat", Qn = "@firebase/firestore", qn = "@firebase/vertexai-preview", er = "@firebase/firestore-compat", tr = "firebase", nr = "10.14.0";
1024
- /**
1025
- * @license
1026
- * Copyright 2019 Google LLC
1027
- *
1028
- * Licensed under the Apache License, Version 2.0 (the "License");
1029
- * you may not use this file except in compliance with the License.
1030
- * You may obtain a copy of the License at
1031
- *
1032
- * http://www.apache.org/licenses/LICENSE-2.0
1033
- *
1034
- * Unless required by applicable law or agreed to in writing, software
1035
- * distributed under the License is distributed on an "AS IS" BASIS,
1036
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1037
- * See the License for the specific language governing permissions and
1038
- * limitations under the License.
1039
- */
1040
- const Be = "[DEFAULT]", rr = {
1041
- [Ue]: "fire-core",
1042
- [Nn]: "fire-core-compat",
1043
- [Cn]: "fire-analytics",
1044
- [Sn]: "fire-analytics-compat",
1045
- [Un]: "fire-app-check",
1046
- [Mn]: "fire-app-check-compat",
1047
- [Bn]: "fire-auth",
1048
- [Ln]: "fire-auth-compat",
1049
- [Pn]: "fire-rtdb",
1050
- [xn]: "fire-data-connect",
1051
- [$n]: "fire-rtdb-compat",
1052
- [Hn]: "fire-fn",
1053
- [jn]: "fire-fn-compat",
1054
- [Fn]: "fire-iid",
1055
- [Gn]: "fire-iid-compat",
1056
- [Wn]: "fire-fcm",
1057
- [Vn]: "fire-fcm-compat",
1058
- [Zn]: "fire-perf",
1059
- [zn]: "fire-perf-compat",
1060
- [Yn]: "fire-rc",
1061
- [Xn]: "fire-rc-compat",
1062
- [Jn]: "fire-gcs",
1063
- [Kn]: "fire-gcs-compat",
1064
- [Qn]: "fire-fst",
1065
- [er]: "fire-fst-compat",
1066
- [qn]: "fire-vertex",
1067
- "fire-js": "fire-js",
1068
- [tr]: "fire-js-all"
1069
- };
1070
- /**
1071
- * @license
1072
- * Copyright 2019 Google LLC
1073
- *
1074
- * Licensed under the Apache License, Version 2.0 (the "License");
1075
- * you may not use this file except in compliance with the License.
1076
- * You may obtain a copy of the License at
1077
- *
1078
- * http://www.apache.org/licenses/LICENSE-2.0
1079
- *
1080
- * Unless required by applicable law or agreed to in writing, software
1081
- * distributed under the License is distributed on an "AS IS" BASIS,
1082
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1083
- * See the License for the specific language governing permissions and
1084
- * limitations under the License.
1085
- */
1086
- const Ie = /* @__PURE__ */ new Map(), sr = /* @__PURE__ */ new Map(), Le = /* @__PURE__ */ new Map();
1087
- function et(t, e) {
1088
- try {
1089
- t.container.addComponent(e);
1090
- } catch (n) {
1091
- G.debug(`Component ${e.name} failed to register with FirebaseApp ${t.name}`, n);
1092
- }
1093
- }
1094
- function Te(t) {
1095
- const e = t.name;
1096
- if (Le.has(e))
1097
- return G.debug(`There were multiple attempts to register component ${e}.`), !1;
1098
- Le.set(e, t);
1099
- for (const n of Ie.values())
1100
- et(n, t);
1101
- for (const n of sr.values())
1102
- et(n, t);
1103
- return !0;
1104
- }
1105
- function ir(t, e) {
1106
- const n = t.container.getProvider("heartbeat").getImmediate({ optional: !0 });
1107
- return n && n.triggerHeartbeat(), t.container.getProvider(e);
1108
- }
1109
- /**
1110
- * @license
1111
- * Copyright 2019 Google LLC
1112
- *
1113
- * Licensed under the Apache License, Version 2.0 (the "License");
1114
- * you may not use this file except in compliance with the License.
1115
- * You may obtain a copy of the License at
1116
- *
1117
- * http://www.apache.org/licenses/LICENSE-2.0
1118
- *
1119
- * Unless required by applicable law or agreed to in writing, software
1120
- * distributed under the License is distributed on an "AS IS" BASIS,
1121
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1122
- * See the License for the specific language governing permissions and
1123
- * limitations under the License.
1124
- */
1125
- const or = {
1126
- "no-app": "No Firebase App '{$appName}' has been created - call initializeApp() first",
1127
- "bad-app-name": "Illegal App name: '{$appName}'",
1128
- "duplicate-app": "Firebase App named '{$appName}' already exists with different options or config",
1129
- "app-deleted": "Firebase App named '{$appName}' already deleted",
1130
- "server-app-deleted": "Firebase Server App has been deleted",
1131
- "no-options": "Need to provide options, when not being deployed to hosting via source.",
1132
- "invalid-app-argument": "firebase.{$appName}() takes either no argument or a Firebase App instance.",
1133
- "invalid-log-argument": "First argument to `onLog` must be null or a function.",
1134
- "idb-open": "Error thrown when opening IndexedDB. Original error: {$originalErrorMessage}.",
1135
- "idb-get": "Error thrown when reading from IndexedDB. Original error: {$originalErrorMessage}.",
1136
- "idb-set": "Error thrown when writing to IndexedDB. Original error: {$originalErrorMessage}.",
1137
- "idb-delete": "Error thrown when deleting from IndexedDB. Original error: {$originalErrorMessage}.",
1138
- "finalization-registry-not-supported": "FirebaseServerApp deleteOnDeref field defined but the JS runtime does not support FinalizationRegistry.",
1139
- "invalid-server-app-environment": "FirebaseServerApp is not for use in browser environments."
1140
- }, Y = new gt("app", "Firebase", or);
1141
- /**
1142
- * @license
1143
- * Copyright 2019 Google LLC
1144
- *
1145
- * Licensed under the Apache License, Version 2.0 (the "License");
1146
- * you may not use this file except in compliance with the License.
1147
- * You may obtain a copy of the License at
1148
- *
1149
- * http://www.apache.org/licenses/LICENSE-2.0
1150
- *
1151
- * Unless required by applicable law or agreed to in writing, software
1152
- * distributed under the License is distributed on an "AS IS" BASIS,
1153
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1154
- * See the License for the specific language governing permissions and
1155
- * limitations under the License.
1156
- */
1157
- class ar {
1158
- constructor(e, n, r) {
1159
- this._isDeleted = !1, this._options = Object.assign({}, e), this._config = Object.assign({}, n), this._name = n.name, this._automaticDataCollectionEnabled = n.automaticDataCollectionEnabled, this._container = r, this.container.addComponent(new ue(
1160
- "app",
1161
- () => this,
1162
- "PUBLIC"
1163
- /* ComponentType.PUBLIC */
1164
- ));
1165
- }
1166
- get automaticDataCollectionEnabled() {
1167
- return this.checkDestroyed(), this._automaticDataCollectionEnabled;
1168
- }
1169
- set automaticDataCollectionEnabled(e) {
1170
- this.checkDestroyed(), this._automaticDataCollectionEnabled = e;
1171
- }
1172
- get name() {
1173
- return this.checkDestroyed(), this._name;
1174
- }
1175
- get options() {
1176
- return this.checkDestroyed(), this._options;
1177
- }
1178
- get config() {
1179
- return this.checkDestroyed(), this._config;
1180
- }
1181
- get container() {
1182
- return this._container;
1183
- }
1184
- get isDeleted() {
1185
- return this._isDeleted;
1186
- }
1187
- set isDeleted(e) {
1188
- this._isDeleted = e;
1189
- }
1190
- /**
1191
- * This function will throw an Error if the App has already been deleted -
1192
- * use before performing API actions on the App.
1193
- */
1194
- checkDestroyed() {
1195
- if (this.isDeleted)
1196
- throw Y.create("app-deleted", { appName: this._name });
1197
- }
1198
- }
1199
- /**
1200
- * @license
1201
- * Copyright 2019 Google LLC
1202
- *
1203
- * Licensed under the Apache License, Version 2.0 (the "License");
1204
- * you may not use this file except in compliance with the License.
1205
- * You may obtain a copy of the License at
1206
- *
1207
- * http://www.apache.org/licenses/LICENSE-2.0
1208
- *
1209
- * Unless required by applicable law or agreed to in writing, software
1210
- * distributed under the License is distributed on an "AS IS" BASIS,
1211
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
- * See the License for the specific language governing permissions and
1213
- * limitations under the License.
1214
- */
1215
- const cr = nr;
1216
- function ur(t, e = {}) {
1217
- let n = t;
1218
- typeof e != "object" && (e = { name: e });
1219
- const r = Object.assign({ name: Be, automaticDataCollectionEnabled: !1 }, e), s = r.name;
1220
- if (typeof s != "string" || !s)
1221
- throw Y.create("bad-app-name", {
1222
- appName: String(s)
1223
- });
1224
- if (n || (n = mt()), !n)
1225
- throw Y.create(
1226
- "no-options"
1227
- /* AppError.NO_OPTIONS */
1228
- );
1229
- const i = Ie.get(s);
1230
- if (i) {
1231
- if (Se(n, i.options) && Se(r, i.config))
1232
- return i;
1233
- throw Y.create("duplicate-app", { appName: s });
1234
- }
1235
- const o = new dn(s);
1236
- for (const u of Le.values())
1237
- o.addComponent(u);
1238
- const a = new ar(n, r, o);
1239
- return Ie.set(s, a), a;
1240
- }
1241
- function Pe(t = Be) {
1242
- const e = Ie.get(t);
1243
- if (!e && t === Be && mt())
1244
- return ur();
1245
- if (!e)
1246
- throw Y.create("no-app", { appName: t });
1247
- return e;
1248
- }
1249
- function re(t, e, n) {
1250
- var r;
1251
- let s = (r = rr[t]) !== null && r !== void 0 ? r : t;
1252
- n && (s += `-${n}`);
1253
- const i = s.match(/\s|\//), o = e.match(/\s|\//);
1254
- if (i || o) {
1255
- const a = [
1256
- `Unable to register library "${s}" with version "${e}":`
1257
- ];
1258
- i && a.push(`library name "${s}" contains illegal characters (whitespace or "/")`), i && o && a.push("and"), o && a.push(`version name "${e}" contains illegal characters (whitespace or "/")`), G.warn(a.join(" "));
1259
- return;
1260
- }
1261
- Te(new ue(
1262
- `${s}-version`,
1263
- () => ({ library: s, version: e }),
1264
- "VERSION"
1265
- /* ComponentType.VERSION */
1266
- ));
1267
- }
1268
- /**
1269
- * @license
1270
- * Copyright 2021 Google LLC
1271
- *
1272
- * Licensed under the Apache License, Version 2.0 (the "License");
1273
- * you may not use this file except in compliance with the License.
1274
- * You may obtain a copy of the License at
1275
- *
1276
- * http://www.apache.org/licenses/LICENSE-2.0
1277
- *
1278
- * Unless required by applicable law or agreed to in writing, software
1279
- * distributed under the License is distributed on an "AS IS" BASIS,
1280
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1281
- * See the License for the specific language governing permissions and
1282
- * limitations under the License.
1283
- */
1284
- const lr = "firebase-heartbeat-database", dr = 1, le = "firebase-heartbeat-store";
1285
- let Oe = null;
1286
- function It() {
1287
- return Oe || (Oe = vn(lr, dr, {
1288
- upgrade: (t, e) => {
1289
- switch (e) {
1290
- case 0:
1291
- try {
1292
- t.createObjectStore(le);
1293
- } catch (n) {
1294
- console.warn(n);
1295
- }
1296
- }
1297
- }
1298
- }).catch((t) => {
1299
- throw Y.create("idb-open", {
1300
- originalErrorMessage: t.message
1301
- });
1302
- })), Oe;
1303
- }
1304
- async function hr(t) {
1305
- try {
1306
- const n = (await It()).transaction(le), r = await n.objectStore(le).get(Tt(t));
1307
- return await n.done, r;
1308
- } catch (e) {
1309
- if (e instanceof se)
1310
- G.warn(e.message);
1311
- else {
1312
- const n = Y.create("idb-get", {
1313
- originalErrorMessage: e == null ? void 0 : e.message
1314
- });
1315
- G.warn(n.message);
1316
- }
1317
- }
1318
- }
1319
- async function tt(t, e) {
1320
- try {
1321
- const r = (await It()).transaction(le, "readwrite");
1322
- await r.objectStore(le).put(e, Tt(t)), await r.done;
1323
- } catch (n) {
1324
- if (n instanceof se)
1325
- G.warn(n.message);
1326
- else {
1327
- const r = Y.create("idb-set", {
1328
- originalErrorMessage: n == null ? void 0 : n.message
1329
- });
1330
- G.warn(r.message);
1331
- }
1332
- }
1333
- }
1334
- function Tt(t) {
1335
- return `${t.name}!${t.options.appId}`;
1336
- }
1337
- /**
1338
- * @license
1339
- * Copyright 2021 Google LLC
1340
- *
1341
- * Licensed under the Apache License, Version 2.0 (the "License");
1342
- * you may not use this file except in compliance with the License.
1343
- * You may obtain a copy of the License at
1344
- *
1345
- * http://www.apache.org/licenses/LICENSE-2.0
1346
- *
1347
- * Unless required by applicable law or agreed to in writing, software
1348
- * distributed under the License is distributed on an "AS IS" BASIS,
1349
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1350
- * See the License for the specific language governing permissions and
1351
- * limitations under the License.
1352
- */
1353
- const pr = 1024, _r = 30 * 24 * 60 * 60 * 1e3;
1354
- class fr {
1355
- constructor(e) {
1356
- this.container = e, this._heartbeatsCache = null;
1357
- const n = this.container.getProvider("app").getImmediate();
1358
- this._storage = new gr(n), this._heartbeatsCachePromise = this._storage.read().then((r) => (this._heartbeatsCache = r, r));
1359
- }
1360
- /**
1361
- * Called to report a heartbeat. The function will generate
1362
- * a HeartbeatsByUserAgent object, update heartbeatsCache, and persist it
1363
- * to IndexedDB.
1364
- * Note that we only store one heartbeat per day. So if a heartbeat for today is
1365
- * already logged, subsequent calls to this function in the same day will be ignored.
1366
- */
1367
- async triggerHeartbeat() {
1368
- var e, n;
1369
- try {
1370
- const s = this.container.getProvider("platform-logger").getImmediate().getPlatformInfoString(), i = nt();
1371
- return ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null && (this._heartbeatsCache = await this._heartbeatsCachePromise, ((n = this._heartbeatsCache) === null || n === void 0 ? void 0 : n.heartbeats) == null) || this._heartbeatsCache.lastSentHeartbeatDate === i || this._heartbeatsCache.heartbeats.some((o) => o.date === i) ? void 0 : (this._heartbeatsCache.heartbeats.push({ date: i, agent: s }), this._heartbeatsCache.heartbeats = this._heartbeatsCache.heartbeats.filter((o) => {
1372
- const a = new Date(o.date).valueOf();
1373
- return Date.now() - a <= _r;
1374
- }), this._storage.overwrite(this._heartbeatsCache));
1375
- } catch (r) {
1376
- G.warn(r);
1377
- }
1378
- }
1379
- /**
1380
- * Returns a base64 encoded string which can be attached to the heartbeat-specific header directly.
1381
- * It also clears all heartbeats from memory as well as in IndexedDB.
1382
- *
1383
- * NOTE: Consuming product SDKs should not send the header if this method
1384
- * returns an empty string.
1385
- */
1386
- async getHeartbeatsHeader() {
1387
- var e;
1388
- try {
1389
- if (this._heartbeatsCache === null && await this._heartbeatsCachePromise, ((e = this._heartbeatsCache) === null || e === void 0 ? void 0 : e.heartbeats) == null || this._heartbeatsCache.heartbeats.length === 0)
1390
- return "";
1391
- const n = nt(), { heartbeatsToSend: r, unsentEntries: s } = mr(this._heartbeatsCache.heartbeats), i = Ee(JSON.stringify({ version: 2, heartbeats: r }));
1392
- return this._heartbeatsCache.lastSentHeartbeatDate = n, s.length > 0 ? (this._heartbeatsCache.heartbeats = s, await this._storage.overwrite(this._heartbeatsCache)) : (this._heartbeatsCache.heartbeats = [], this._storage.overwrite(this._heartbeatsCache)), i;
1393
- } catch (n) {
1394
- return G.warn(n), "";
1395
- }
1396
- }
1397
- }
1398
- function nt() {
1399
- return (/* @__PURE__ */ new Date()).toISOString().substring(0, 10);
1400
- }
1401
- function mr(t, e = pr) {
1402
- const n = [];
1403
- let r = t.slice();
1404
- for (const s of t) {
1405
- const i = n.find((o) => o.agent === s.agent);
1406
- if (i) {
1407
- if (i.dates.push(s.date), rt(n) > e) {
1408
- i.dates.pop();
1409
- break;
1410
- }
1411
- } else if (n.push({
1412
- agent: s.agent,
1413
- dates: [s.date]
1414
- }), rt(n) > e) {
1415
- n.pop();
1416
- break;
1417
- }
1418
- r = r.slice(1);
1419
- }
1420
- return {
1421
- heartbeatsToSend: n,
1422
- unsentEntries: r
1423
- };
1424
- }
1425
- class gr {
1426
- constructor(e) {
1427
- this.app = e, this._canUseIndexedDBPromise = this.runIndexedDBEnvironmentCheck();
1428
- }
1429
- async runIndexedDBEnvironmentCheck() {
1430
- return nn() ? rn().then(() => !0).catch(() => !1) : !1;
1431
- }
1432
- /**
1433
- * Read all heartbeats.
1434
- */
1435
- async read() {
1436
- if (await this._canUseIndexedDBPromise) {
1437
- const n = await hr(this.app);
1438
- return n != null && n.heartbeats ? n : { heartbeats: [] };
1439
- } else
1440
- return { heartbeats: [] };
1441
- }
1442
- // overwrite the storage with the provided heartbeats
1443
- async overwrite(e) {
1444
- var n;
1445
- if (await this._canUseIndexedDBPromise) {
1446
- const s = await this.read();
1447
- return tt(this.app, {
1448
- lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
1449
- heartbeats: e.heartbeats
1450
- });
1451
- } else
1452
- return;
1453
- }
1454
- // add heartbeats
1455
- async add(e) {
1456
- var n;
1457
- if (await this._canUseIndexedDBPromise) {
1458
- const s = await this.read();
1459
- return tt(this.app, {
1460
- lastSentHeartbeatDate: (n = e.lastSentHeartbeatDate) !== null && n !== void 0 ? n : s.lastSentHeartbeatDate,
1461
- heartbeats: [
1462
- ...s.heartbeats,
1463
- ...e.heartbeats
1464
- ]
1465
- });
1466
- } else
1467
- return;
1468
- }
1469
- }
1470
- function rt(t) {
1471
- return Ee(
1472
- // heartbeatsCache wrapper properties
1473
- JSON.stringify({ version: 2, heartbeats: t })
1474
- ).length;
1475
- }
1476
- /**
1477
- * @license
1478
- * Copyright 2019 Google LLC
1479
- *
1480
- * Licensed under the Apache License, Version 2.0 (the "License");
1481
- * you may not use this file except in compliance with the License.
1482
- * You may obtain a copy of the License at
1483
- *
1484
- * http://www.apache.org/licenses/LICENSE-2.0
1485
- *
1486
- * Unless required by applicable law or agreed to in writing, software
1487
- * distributed under the License is distributed on an "AS IS" BASIS,
1488
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1489
- * See the License for the specific language governing permissions and
1490
- * limitations under the License.
1491
- */
1492
- function br(t) {
1493
- Te(new ue(
1494
- "platform-logger",
1495
- (e) => new Dn(e),
1496
- "PRIVATE"
1497
- /* ComponentType.PRIVATE */
1498
- )), Te(new ue(
1499
- "heartbeat",
1500
- (e) => new fr(e),
1501
- "PRIVATE"
1502
- /* ComponentType.PRIVATE */
1503
- )), re(Ue, qe, t), re(Ue, qe, "esm2017"), re("fire-js", "");
1504
- }
1505
- br("");
1506
- var Er = "firebase", Ir = "10.14.0";
1507
- /**
1508
- * @license
1509
- * Copyright 2020 Google LLC
1510
- *
1511
- * Licensed under the Apache License, Version 2.0 (the "License");
1512
- * you may not use this file except in compliance with the License.
1513
- * You may obtain a copy of the License at
1514
- *
1515
- * http://www.apache.org/licenses/LICENSE-2.0
1516
- *
1517
- * Unless required by applicable law or agreed to in writing, software
1518
- * distributed under the License is distributed on an "AS IS" BASIS,
1519
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1520
- * See the License for the specific language governing permissions and
1521
- * limitations under the License.
1522
- */
1523
- re(Er, Ir, "app");
1524
- /**
1525
- * @license
1526
- * Copyright 2017 Google LLC
1527
- *
1528
- * Licensed under the Apache License, Version 2.0 (the "License");
1529
- * you may not use this file except in compliance with the License.
1530
- * You may obtain a copy of the License at
1531
- *
1532
- * http://www.apache.org/licenses/LICENSE-2.0
1533
- *
1534
- * Unless required by applicable law or agreed to in writing, software
1535
- * distributed under the License is distributed on an "AS IS" BASIS,
1536
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1537
- * See the License for the specific language governing permissions and
1538
- * limitations under the License.
1539
- */
1540
- const yt = "firebasestorage.googleapis.com", Rt = "storageBucket", Tr = 2 * 60 * 1e3, yr = 10 * 60 * 1e3;
1541
- /**
1542
- * @license
1543
- * Copyright 2017 Google LLC
1544
- *
1545
- * Licensed under the Apache License, Version 2.0 (the "License");
1546
- * you may not use this file except in compliance with the License.
1547
- * You may obtain a copy of the License at
1548
- *
1549
- * http://www.apache.org/licenses/LICENSE-2.0
1550
- *
1551
- * Unless required by applicable law or agreed to in writing, software
1552
- * distributed under the License is distributed on an "AS IS" BASIS,
1553
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1554
- * See the License for the specific language governing permissions and
1555
- * limitations under the License.
1556
- */
1557
- class v extends se {
1558
- /**
1559
- * @param code - A `StorageErrorCode` string to be prefixed with 'storage/' and
1560
- * added to the end of the message.
1561
- * @param message - Error message.
1562
- * @param status_ - Corresponding HTTP Status Code
1563
- */
1564
- constructor(e, n, r = 0) {
1565
- super(De(e), `Firebase Storage: ${n} (${De(e)})`), this.status_ = r, this.customData = { serverResponse: null }, this._baseMessage = this.message, Object.setPrototypeOf(this, v.prototype);
1566
- }
1567
- get status() {
1568
- return this.status_;
1569
- }
1570
- set status(e) {
1571
- this.status_ = e;
1572
- }
1573
- /**
1574
- * Compares a `StorageErrorCode` against this error's code, filtering out the prefix.
1575
- */
1576
- _codeEquals(e) {
1577
- return De(e) === this.code;
1578
- }
1579
- /**
1580
- * Optional response message that was added by the server.
1581
- */
1582
- get serverResponse() {
1583
- return this.customData.serverResponse;
1584
- }
1585
- set serverResponse(e) {
1586
- this.customData.serverResponse = e, this.customData.serverResponse ? this.message = `${this._baseMessage}
1587
- ${this.customData.serverResponse}` : this.message = this._baseMessage;
1588
- }
1589
- }
1590
- var w;
1591
- (function(t) {
1592
- t.UNKNOWN = "unknown", t.OBJECT_NOT_FOUND = "object-not-found", t.BUCKET_NOT_FOUND = "bucket-not-found", t.PROJECT_NOT_FOUND = "project-not-found", t.QUOTA_EXCEEDED = "quota-exceeded", t.UNAUTHENTICATED = "unauthenticated", t.UNAUTHORIZED = "unauthorized", t.UNAUTHORIZED_APP = "unauthorized-app", t.RETRY_LIMIT_EXCEEDED = "retry-limit-exceeded", t.INVALID_CHECKSUM = "invalid-checksum", t.CANCELED = "canceled", t.INVALID_EVENT_NAME = "invalid-event-name", t.INVALID_URL = "invalid-url", t.INVALID_DEFAULT_BUCKET = "invalid-default-bucket", t.NO_DEFAULT_BUCKET = "no-default-bucket", t.CANNOT_SLICE_BLOB = "cannot-slice-blob", t.SERVER_FILE_WRONG_SIZE = "server-file-wrong-size", t.NO_DOWNLOAD_URL = "no-download-url", t.INVALID_ARGUMENT = "invalid-argument", t.INVALID_ARGUMENT_COUNT = "invalid-argument-count", t.APP_DELETED = "app-deleted", t.INVALID_ROOT_OPERATION = "invalid-root-operation", t.INVALID_FORMAT = "invalid-format", t.INTERNAL_ERROR = "internal-error", t.UNSUPPORTED_ENVIRONMENT = "unsupported-environment";
1593
- })(w || (w = {}));
1594
- function De(t) {
1595
- return "storage/" + t;
1596
- }
1597
- function je() {
1598
- const t = "An unknown error occurred, please check the error payload for server response.";
1599
- return new v(w.UNKNOWN, t);
1600
- }
1601
- function Rr(t) {
1602
- return new v(w.OBJECT_NOT_FOUND, "Object '" + t + "' does not exist.");
1603
- }
1604
- function wr(t) {
1605
- return new v(w.QUOTA_EXCEEDED, "Quota for bucket '" + t + "' exceeded, please view quota on https://firebase.google.com/pricing/.");
1606
- }
1607
- function vr() {
1608
- const t = "User is not authenticated, please authenticate using Firebase Authentication and try again.";
1609
- return new v(w.UNAUTHENTICATED, t);
1610
- }
1611
- function Ar() {
1612
- return new v(w.UNAUTHORIZED_APP, "This app does not have permission to access Firebase Storage on this project.");
1613
- }
1614
- function Or(t) {
1615
- return new v(w.UNAUTHORIZED, "User does not have permission to access '" + t + "'.");
1616
- }
1617
- function Dr() {
1618
- return new v(w.RETRY_LIMIT_EXCEEDED, "Max retry time for operation exceeded, please try again.");
1619
- }
1620
- function kr() {
1621
- return new v(w.CANCELED, "User canceled the upload/download.");
1622
- }
1623
- function Nr(t) {
1624
- return new v(w.INVALID_URL, "Invalid URL '" + t + "'.");
1625
- }
1626
- function Sr(t) {
1627
- return new v(w.INVALID_DEFAULT_BUCKET, "Invalid default bucket '" + t + "'.");
1628
- }
1629
- function Cr() {
1630
- return new v(w.NO_DEFAULT_BUCKET, "No default bucket found. Did you set the '" + Rt + "' property when initializing the app?");
1631
- }
1632
- function Mr() {
1633
- return new v(w.CANNOT_SLICE_BLOB, "Cannot slice blob for upload. Please retry the upload.");
1634
- }
1635
- function Ur() {
1636
- return new v(w.NO_DOWNLOAD_URL, "The given file does not have any download URLs.");
1637
- }
1638
- function Br(t) {
1639
- return new v(w.UNSUPPORTED_ENVIRONMENT, `${t} is missing. Make sure to install the required polyfills. See https://firebase.google.com/docs/web/environments-js-sdk#polyfills for more information.`);
1640
- }
1641
- function xe(t) {
1642
- return new v(w.INVALID_ARGUMENT, t);
1643
- }
1644
- function wt() {
1645
- return new v(w.APP_DELETED, "The Firebase app was deleted.");
1646
- }
1647
- function Lr(t) {
1648
- return new v(w.INVALID_ROOT_OPERATION, "The operation '" + t + "' cannot be performed on a root reference, create a non-root reference using child, such as .child('file.png').");
1649
- }
1650
- function ce(t, e) {
1651
- return new v(w.INVALID_FORMAT, "String does not match format '" + t + "': " + e);
1652
- }
1653
- function ae(t) {
1654
- throw new v(w.INTERNAL_ERROR, "Internal error: " + t);
1655
- }
1656
- /**
1657
- * @license
1658
- * Copyright 2017 Google LLC
1659
- *
1660
- * Licensed under the Apache License, Version 2.0 (the "License");
1661
- * you may not use this file except in compliance with the License.
1662
- * You may obtain a copy of the License at
1663
- *
1664
- * http://www.apache.org/licenses/LICENSE-2.0
1665
- *
1666
- * Unless required by applicable law or agreed to in writing, software
1667
- * distributed under the License is distributed on an "AS IS" BASIS,
1668
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1669
- * See the License for the specific language governing permissions and
1670
- * limitations under the License.
1671
- */
1672
- class L {
1673
- constructor(e, n) {
1674
- this.bucket = e, this.path_ = n;
1675
- }
1676
- get path() {
1677
- return this.path_;
1678
- }
1679
- get isRoot() {
1680
- return this.path.length === 0;
1681
- }
1682
- fullServerUrl() {
1683
- const e = encodeURIComponent;
1684
- return "/b/" + e(this.bucket) + "/o/" + e(this.path);
1685
- }
1686
- bucketOnlyServerUrl() {
1687
- return "/b/" + encodeURIComponent(this.bucket) + "/o";
1688
- }
1689
- static makeFromBucketSpec(e, n) {
1690
- let r;
1691
- try {
1692
- r = L.makeFromUrl(e, n);
1693
- } catch {
1694
- return new L(e, "");
1695
- }
1696
- if (r.path === "")
1697
- return r;
1698
- throw Sr(e);
1699
- }
1700
- static makeFromUrl(e, n) {
1701
- let r = null;
1702
- const s = "([A-Za-z0-9.\\-_]+)";
1703
- function i(S) {
1704
- S.path.charAt(S.path.length - 1) === "/" && (S.path_ = S.path_.slice(0, -1));
1705
- }
1706
- const o = "(/(.*))?$", a = new RegExp("^gs://" + s + o, "i"), u = { bucket: 1, path: 3 };
1707
- function h(S) {
1708
- S.path_ = decodeURIComponent(S.path);
1709
- }
1710
- const I = "v[A-Za-z0-9_]+", g = n.replace(/[.]/g, "\\."), y = "(/([^?#]*).*)?$", R = new RegExp(`^https?://${g}/${I}/b/${s}/o${y}`, "i"), O = { bucket: 1, path: 3 }, j = n === yt ? "(?:storage.googleapis.com|storage.cloud.google.com)" : n, N = "([^?#]*)", W = new RegExp(`^https?://${j}/${s}/${N}`, "i"), U = [
1711
- { regex: a, indices: u, postModify: i },
1712
- {
1713
- regex: R,
1714
- indices: O,
1715
- postModify: h
1716
- },
1717
- {
1718
- regex: W,
1719
- indices: { bucket: 1, path: 2 },
1720
- postModify: h
1721
- }
1722
- ];
1723
- for (let S = 0; S < U.length; S++) {
1724
- const $ = U[S], x = $.regex.exec(e);
1725
- if (x) {
1726
- const pe = x[$.indices.bucket];
1727
- let J = x[$.indices.path];
1728
- J || (J = ""), r = new L(pe, J), $.postModify(r);
1729
- break;
1730
- }
1731
- }
1732
- if (r == null)
1733
- throw Nr(e);
1734
- return r;
1735
- }
1736
- }
1737
- class Pr {
1738
- constructor(e) {
1739
- this.promise_ = Promise.reject(e);
1740
- }
1741
- /** @inheritDoc */
1742
- getPromise() {
1743
- return this.promise_;
1744
- }
1745
- /** @inheritDoc */
1746
- cancel(e = !1) {
1747
- }
1748
- }
1749
- /**
1750
- * @license
1751
- * Copyright 2017 Google LLC
1752
- *
1753
- * Licensed under the Apache License, Version 2.0 (the "License");
1754
- * you may not use this file except in compliance with the License.
1755
- * You may obtain a copy of the License at
1756
- *
1757
- * http://www.apache.org/licenses/LICENSE-2.0
1758
- *
1759
- * Unless required by applicable law or agreed to in writing, software
1760
- * distributed under the License is distributed on an "AS IS" BASIS,
1761
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1762
- * See the License for the specific language governing permissions and
1763
- * limitations under the License.
1764
- */
1765
- function xr(t, e, n) {
1766
- let r = 1, s = null, i = null, o = !1, a = 0;
1767
- function u() {
1768
- return a === 2;
1769
- }
1770
- let h = !1;
1771
- function I(...N) {
1772
- h || (h = !0, e.apply(null, N));
1773
- }
1774
- function g(N) {
1775
- s = setTimeout(() => {
1776
- s = null, t(R, u());
1777
- }, N);
1778
- }
1779
- function y() {
1780
- i && clearTimeout(i);
1781
- }
1782
- function R(N, ...W) {
1783
- if (h) {
1784
- y();
1785
- return;
1786
- }
1787
- if (N) {
1788
- y(), I.call(null, N, ...W);
1789
- return;
1790
- }
1791
- if (u() || o) {
1792
- y(), I.call(null, N, ...W);
1793
- return;
1794
- }
1795
- r < 64 && (r *= 2);
1796
- let U;
1797
- a === 1 ? (a = 2, U = 0) : U = (r + Math.random()) * 1e3, g(U);
1798
- }
1799
- let O = !1;
1800
- function j(N) {
1801
- O || (O = !0, y(), !h && (s !== null ? (N || (a = 2), clearTimeout(s), g(0)) : N || (a = 1)));
1802
- }
1803
- return g(0), i = setTimeout(() => {
1804
- o = !0, j(!0);
1805
- }, n), j;
1806
- }
1807
- function $r(t) {
1808
- t(!1);
1809
- }
1810
- /**
1811
- * @license
1812
- * Copyright 2017 Google LLC
1813
- *
1814
- * Licensed under the Apache License, Version 2.0 (the "License");
1815
- * you may not use this file except in compliance with the License.
1816
- * You may obtain a copy of the License at
1817
- *
1818
- * http://www.apache.org/licenses/LICENSE-2.0
1819
- *
1820
- * Unless required by applicable law or agreed to in writing, software
1821
- * distributed under the License is distributed on an "AS IS" BASIS,
1822
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1823
- * See the License for the specific language governing permissions and
1824
- * limitations under the License.
1825
- */
1826
- function Hr(t) {
1827
- return t !== void 0;
1828
- }
1829
- function jr(t) {
1830
- return typeof t == "object" && !Array.isArray(t);
1831
- }
1832
- function Fe(t) {
1833
- return typeof t == "string" || t instanceof String;
1834
- }
1835
- function st(t) {
1836
- return Ge() && t instanceof Blob;
1837
- }
1838
- function Ge() {
1839
- return typeof Blob < "u";
1840
- }
1841
- function it(t, e, n, r) {
1842
- if (r < e)
1843
- throw xe(`Invalid value for '${t}'. Expected ${e} or greater.`);
1844
- if (r > n)
1845
- throw xe(`Invalid value for '${t}'. Expected ${n} or less.`);
1846
- }
1847
- /**
1848
- * @license
1849
- * Copyright 2017 Google LLC
1850
- *
1851
- * Licensed under the Apache License, Version 2.0 (the "License");
1852
- * you may not use this file except in compliance with the License.
1853
- * You may obtain a copy of the License at
1854
- *
1855
- * http://www.apache.org/licenses/LICENSE-2.0
1856
- *
1857
- * Unless required by applicable law or agreed to in writing, software
1858
- * distributed under the License is distributed on an "AS IS" BASIS,
1859
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1860
- * See the License for the specific language governing permissions and
1861
- * limitations under the License.
1862
- */
1863
- function ye(t, e, n) {
1864
- let r = e;
1865
- return n == null && (r = `https://${e}`), `${n}://${r}/v0${t}`;
1866
- }
1867
- function vt(t) {
1868
- const e = encodeURIComponent;
1869
- let n = "?";
1870
- for (const r in t)
1871
- if (t.hasOwnProperty(r)) {
1872
- const s = e(r) + "=" + e(t[r]);
1873
- n = n + s + "&";
1874
- }
1875
- return n = n.slice(0, -1), n;
1876
- }
1877
- var ee;
1878
- (function(t) {
1879
- t[t.NO_ERROR = 0] = "NO_ERROR", t[t.NETWORK_ERROR = 1] = "NETWORK_ERROR", t[t.ABORT = 2] = "ABORT";
1880
- })(ee || (ee = {}));
1881
- /**
1882
- * @license
1883
- * Copyright 2022 Google LLC
1884
- *
1885
- * Licensed under the Apache License, Version 2.0 (the "License");
1886
- * you may not use this file except in compliance with the License.
1887
- * You may obtain a copy of the License at
1888
- *
1889
- * http://www.apache.org/licenses/LICENSE-2.0
1890
- *
1891
- * Unless required by applicable law or agreed to in writing, software
1892
- * distributed under the License is distributed on an "AS IS" BASIS,
1893
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1894
- * See the License for the specific language governing permissions and
1895
- * limitations under the License.
1896
- */
1897
- function Fr(t, e) {
1898
- const n = t >= 500 && t < 600, s = [
1899
- // Request Timeout: web server didn't receive full request in time.
1900
- 408,
1901
- // Too Many Requests: you're getting rate-limited, basically.
1902
- 429
1903
- ].indexOf(t) !== -1, i = e.indexOf(t) !== -1;
1904
- return n || s || i;
1905
- }
1906
- /**
1907
- * @license
1908
- * Copyright 2017 Google LLC
1909
- *
1910
- * Licensed under the Apache License, Version 2.0 (the "License");
1911
- * you may not use this file except in compliance with the License.
1912
- * You may obtain a copy of the License at
1913
- *
1914
- * http://www.apache.org/licenses/LICENSE-2.0
1915
- *
1916
- * Unless required by applicable law or agreed to in writing, software
1917
- * distributed under the License is distributed on an "AS IS" BASIS,
1918
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1919
- * See the License for the specific language governing permissions and
1920
- * limitations under the License.
1921
- */
1922
- class Gr {
1923
- constructor(e, n, r, s, i, o, a, u, h, I, g, y = !0) {
1924
- this.url_ = e, this.method_ = n, this.headers_ = r, this.body_ = s, this.successCodes_ = i, this.additionalRetryCodes_ = o, this.callback_ = a, this.errorCallback_ = u, this.timeout_ = h, this.progressCallback_ = I, this.connectionFactory_ = g, this.retry = y, this.pendingConnection_ = null, this.backoffId_ = null, this.canceled_ = !1, this.appDelete_ = !1, this.promise_ = new Promise((R, O) => {
1925
- this.resolve_ = R, this.reject_ = O, this.start_();
1926
- });
1927
- }
1928
- /**
1929
- * Actually starts the retry loop.
1930
- */
1931
- start_() {
1932
- const e = (r, s) => {
1933
- if (s) {
1934
- r(!1, new ge(!1, null, !0));
1935
- return;
1936
- }
1937
- const i = this.connectionFactory_();
1938
- this.pendingConnection_ = i;
1939
- const o = (a) => {
1940
- const u = a.loaded, h = a.lengthComputable ? a.total : -1;
1941
- this.progressCallback_ !== null && this.progressCallback_(u, h);
1942
- };
1943
- this.progressCallback_ !== null && i.addUploadProgressListener(o), i.send(this.url_, this.method_, this.body_, this.headers_).then(() => {
1944
- this.progressCallback_ !== null && i.removeUploadProgressListener(o), this.pendingConnection_ = null;
1945
- const a = i.getErrorCode() === ee.NO_ERROR, u = i.getStatus();
1946
- if (!a || Fr(u, this.additionalRetryCodes_) && this.retry) {
1947
- const I = i.getErrorCode() === ee.ABORT;
1948
- r(!1, new ge(!1, null, I));
1949
- return;
1950
- }
1951
- const h = this.successCodes_.indexOf(u) !== -1;
1952
- r(!0, new ge(h, i));
1953
- });
1954
- }, n = (r, s) => {
1955
- const i = this.resolve_, o = this.reject_, a = s.connection;
1956
- if (s.wasSuccessCode)
1957
- try {
1958
- const u = this.callback_(a, a.getResponse());
1959
- Hr(u) ? i(u) : i();
1960
- } catch (u) {
1961
- o(u);
1962
- }
1963
- else if (a !== null) {
1964
- const u = je();
1965
- u.serverResponse = a.getErrorText(), this.errorCallback_ ? o(this.errorCallback_(a, u)) : o(u);
1966
- } else if (s.canceled) {
1967
- const u = this.appDelete_ ? wt() : kr();
1968
- o(u);
1969
- } else {
1970
- const u = Dr();
1971
- o(u);
1972
- }
1973
- };
1974
- this.canceled_ ? n(!1, new ge(!1, null, !0)) : this.backoffId_ = xr(e, n, this.timeout_);
1975
- }
1976
- /** @inheritDoc */
1977
- getPromise() {
1978
- return this.promise_;
1979
- }
1980
- /** @inheritDoc */
1981
- cancel(e) {
1982
- this.canceled_ = !0, this.appDelete_ = e || !1, this.backoffId_ !== null && $r(this.backoffId_), this.pendingConnection_ !== null && this.pendingConnection_.abort();
1983
- }
1984
- }
1985
- class ge {
1986
- constructor(e, n, r) {
1987
- this.wasSuccessCode = e, this.connection = n, this.canceled = !!r;
1988
- }
1989
- }
1990
- function Wr(t, e) {
1991
- e !== null && e.length > 0 && (t.Authorization = "Firebase " + e);
1992
- }
1993
- function Vr(t, e) {
1994
- t["X-Firebase-Storage-Version"] = "webjs/" + (e ?? "AppManager");
1995
- }
1996
- function Zr(t, e) {
1997
- e && (t["X-Firebase-GMPID"] = e);
1998
- }
1999
- function zr(t, e) {
2000
- e !== null && (t["X-Firebase-AppCheck"] = e);
2001
- }
2002
- function Yr(t, e, n, r, s, i, o = !0) {
2003
- const a = vt(t.urlParams), u = t.url + a, h = Object.assign({}, t.headers);
2004
- return Zr(h, e), Wr(h, n), Vr(h, i), zr(h, r), new Gr(u, t.method, h, t.body, t.successCodes, t.additionalRetryCodes, t.handler, t.errorHandler, t.timeout, t.progressCallback, s, o);
2005
- }
2006
- /**
2007
- * @license
2008
- * Copyright 2017 Google LLC
2009
- *
2010
- * Licensed under the Apache License, Version 2.0 (the "License");
2011
- * you may not use this file except in compliance with the License.
2012
- * You may obtain a copy of the License at
2013
- *
2014
- * http://www.apache.org/licenses/LICENSE-2.0
2015
- *
2016
- * Unless required by applicable law or agreed to in writing, software
2017
- * distributed under the License is distributed on an "AS IS" BASIS,
2018
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2019
- * See the License for the specific language governing permissions and
2020
- * limitations under the License.
2021
- */
2022
- function Xr() {
2023
- return typeof BlobBuilder < "u" ? BlobBuilder : typeof WebKitBlobBuilder < "u" ? WebKitBlobBuilder : void 0;
2024
- }
2025
- function Jr(...t) {
2026
- const e = Xr();
2027
- if (e !== void 0) {
2028
- const n = new e();
2029
- for (let r = 0; r < t.length; r++)
2030
- n.append(t[r]);
2031
- return n.getBlob();
2032
- } else {
2033
- if (Ge())
2034
- return new Blob(t);
2035
- throw new v(w.UNSUPPORTED_ENVIRONMENT, "This browser doesn't seem to support creating Blobs");
2036
- }
2037
- }
2038
- function Kr(t, e, n) {
2039
- return t.webkitSlice ? t.webkitSlice(e, n) : t.mozSlice ? t.mozSlice(e, n) : t.slice ? t.slice(e, n) : null;
2040
- }
2041
- /**
2042
- * @license
2043
- * Copyright 2021 Google LLC
2044
- *
2045
- * Licensed under the Apache License, Version 2.0 (the "License");
2046
- * you may not use this file except in compliance with the License.
2047
- * You may obtain a copy of the License at
2048
- *
2049
- * http://www.apache.org/licenses/LICENSE-2.0
2050
- *
2051
- * Unless required by applicable law or agreed to in writing, software
2052
- * distributed under the License is distributed on an "AS IS" BASIS,
2053
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2054
- * See the License for the specific language governing permissions and
2055
- * limitations under the License.
2056
- */
2057
- function Qr(t) {
2058
- if (typeof atob > "u")
2059
- throw Br("base-64");
2060
- return atob(t);
2061
- }
2062
- /**
2063
- * @license
2064
- * Copyright 2017 Google LLC
2065
- *
2066
- * Licensed under the Apache License, Version 2.0 (the "License");
2067
- * you may not use this file except in compliance with the License.
2068
- * You may obtain a copy of the License at
2069
- *
2070
- * http://www.apache.org/licenses/LICENSE-2.0
2071
- *
2072
- * Unless required by applicable law or agreed to in writing, software
2073
- * distributed under the License is distributed on an "AS IS" BASIS,
2074
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2075
- * See the License for the specific language governing permissions and
2076
- * limitations under the License.
2077
- */
2078
- const H = {
2079
- /**
2080
- * Indicates the string should be interpreted "raw", that is, as normal text.
2081
- * The string will be interpreted as UTF-16, then uploaded as a UTF-8 byte
2082
- * sequence.
2083
- * Example: The string 'Hello! \\ud83d\\ude0a' becomes the byte sequence
2084
- * 48 65 6c 6c 6f 21 20 f0 9f 98 8a
2085
- */
2086
- RAW: "raw",
2087
- /**
2088
- * Indicates the string should be interpreted as base64-encoded data.
2089
- * Padding characters (trailing '='s) are optional.
2090
- * Example: The string 'rWmO++E6t7/rlw==' becomes the byte sequence
2091
- * ad 69 8e fb e1 3a b7 bf eb 97
2092
- */
2093
- BASE64: "base64",
2094
- /**
2095
- * Indicates the string should be interpreted as base64url-encoded data.
2096
- * Padding characters (trailing '='s) are optional.
2097
- * Example: The string 'rWmO--E6t7_rlw==' becomes the byte sequence
2098
- * ad 69 8e fb e1 3a b7 bf eb 97
2099
- */
2100
- BASE64URL: "base64url",
2101
- /**
2102
- * Indicates the string is a data URL, such as one obtained from
2103
- * canvas.toDataURL().
2104
- * Example: the string 'data:application/octet-stream;base64,aaaa'
2105
- * becomes the byte sequence
2106
- * 69 a6 9a
2107
- * (the content-type "application/octet-stream" is also applied, but can
2108
- * be overridden in the metadata object).
2109
- */
2110
- DATA_URL: "data_url"
2111
- };
2112
- class ke {
2113
- constructor(e, n) {
2114
- this.data = e, this.contentType = n || null;
2115
- }
2116
- }
2117
- function qr(t, e) {
2118
- switch (t) {
2119
- case H.RAW:
2120
- return new ke(At(e));
2121
- case H.BASE64:
2122
- case H.BASE64URL:
2123
- return new ke(Ot(t, e));
2124
- case H.DATA_URL:
2125
- return new ke(ts(e), ns(e));
2126
- }
2127
- throw je();
2128
- }
2129
- function At(t) {
2130
- const e = [];
2131
- for (let n = 0; n < t.length; n++) {
2132
- let r = t.charCodeAt(n);
2133
- if (r <= 127)
2134
- e.push(r);
2135
- else if (r <= 2047)
2136
- e.push(192 | r >> 6, 128 | r & 63);
2137
- else if ((r & 64512) === 55296)
2138
- if (!(n < t.length - 1 && (t.charCodeAt(n + 1) & 64512) === 56320))
2139
- e.push(239, 191, 189);
2140
- else {
2141
- const i = r, o = t.charCodeAt(++n);
2142
- r = 65536 | (i & 1023) << 10 | o & 1023, e.push(240 | r >> 18, 128 | r >> 12 & 63, 128 | r >> 6 & 63, 128 | r & 63);
2143
- }
2144
- else
2145
- (r & 64512) === 56320 ? e.push(239, 191, 189) : e.push(224 | r >> 12, 128 | r >> 6 & 63, 128 | r & 63);
2146
- }
2147
- return new Uint8Array(e);
2148
- }
2149
- function es(t) {
2150
- let e;
2151
- try {
2152
- e = decodeURIComponent(t);
2153
- } catch {
2154
- throw ce(H.DATA_URL, "Malformed data URL.");
2155
- }
2156
- return At(e);
2157
- }
2158
- function Ot(t, e) {
2159
- switch (t) {
2160
- case H.BASE64: {
2161
- const s = e.indexOf("-") !== -1, i = e.indexOf("_") !== -1;
2162
- if (s || i)
2163
- throw ce(t, "Invalid character '" + (s ? "-" : "_") + "' found: is it base64url encoded?");
2164
- break;
2165
- }
2166
- case H.BASE64URL: {
2167
- const s = e.indexOf("+") !== -1, i = e.indexOf("/") !== -1;
2168
- if (s || i)
2169
- throw ce(t, "Invalid character '" + (s ? "+" : "/") + "' found: is it base64 encoded?");
2170
- e = e.replace(/-/g, "+").replace(/_/g, "/");
2171
- break;
2172
- }
2173
- }
2174
- let n;
2175
- try {
2176
- n = Qr(e);
2177
- } catch (s) {
2178
- throw s.message.includes("polyfill") ? s : ce(t, "Invalid character found");
2179
- }
2180
- const r = new Uint8Array(n.length);
2181
- for (let s = 0; s < n.length; s++)
2182
- r[s] = n.charCodeAt(s);
2183
- return r;
2184
- }
2185
- class Dt {
2186
- constructor(e) {
2187
- this.base64 = !1, this.contentType = null;
2188
- const n = e.match(/^data:([^,]+)?,/);
2189
- if (n === null)
2190
- throw ce(H.DATA_URL, "Must be formatted 'data:[<mediatype>][;base64],<data>");
2191
- const r = n[1] || null;
2192
- r != null && (this.base64 = rs(r, ";base64"), this.contentType = this.base64 ? r.substring(0, r.length - 7) : r), this.rest = e.substring(e.indexOf(",") + 1);
2193
- }
2194
- }
2195
- function ts(t) {
2196
- const e = new Dt(t);
2197
- return e.base64 ? Ot(H.BASE64, e.rest) : es(e.rest);
2198
- }
2199
- function ns(t) {
2200
- return new Dt(t).contentType;
2201
- }
2202
- function rs(t, e) {
2203
- return t.length >= e.length ? t.substring(t.length - e.length) === e : !1;
2204
- }
2205
- /**
2206
- * @license
2207
- * Copyright 2017 Google LLC
2208
- *
2209
- * Licensed under the Apache License, Version 2.0 (the "License");
2210
- * you may not use this file except in compliance with the License.
2211
- * You may obtain a copy of the License at
2212
- *
2213
- * http://www.apache.org/licenses/LICENSE-2.0
2214
- *
2215
- * Unless required by applicable law or agreed to in writing, software
2216
- * distributed under the License is distributed on an "AS IS" BASIS,
2217
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2218
- * See the License for the specific language governing permissions and
2219
- * limitations under the License.
2220
- */
2221
- class Z {
2222
- constructor(e, n) {
2223
- let r = 0, s = "";
2224
- st(e) ? (this.data_ = e, r = e.size, s = e.type) : e instanceof ArrayBuffer ? (n ? this.data_ = new Uint8Array(e) : (this.data_ = new Uint8Array(e.byteLength), this.data_.set(new Uint8Array(e))), r = this.data_.length) : e instanceof Uint8Array && (n ? this.data_ = e : (this.data_ = new Uint8Array(e.length), this.data_.set(e)), r = e.length), this.size_ = r, this.type_ = s;
2225
- }
2226
- size() {
2227
- return this.size_;
2228
- }
2229
- type() {
2230
- return this.type_;
2231
- }
2232
- slice(e, n) {
2233
- if (st(this.data_)) {
2234
- const r = this.data_, s = Kr(r, e, n);
2235
- return s === null ? null : new Z(s);
2236
- } else {
2237
- const r = new Uint8Array(this.data_.buffer, e, n - e);
2238
- return new Z(r, !0);
2239
- }
2240
- }
2241
- static getBlob(...e) {
2242
- if (Ge()) {
2243
- const n = e.map((r) => r instanceof Z ? r.data_ : r);
2244
- return new Z(Jr.apply(null, n));
2245
- } else {
2246
- const n = e.map((o) => Fe(o) ? qr(H.RAW, o).data : o.data_);
2247
- let r = 0;
2248
- n.forEach((o) => {
2249
- r += o.byteLength;
2250
- });
2251
- const s = new Uint8Array(r);
2252
- let i = 0;
2253
- return n.forEach((o) => {
2254
- for (let a = 0; a < o.length; a++)
2255
- s[i++] = o[a];
2256
- }), new Z(s, !0);
2257
- }
2258
- }
2259
- uploadData() {
2260
- return this.data_;
2261
- }
2262
- }
2263
- /**
2264
- * @license
2265
- * Copyright 2017 Google LLC
2266
- *
2267
- * Licensed under the Apache License, Version 2.0 (the "License");
2268
- * you may not use this file except in compliance with the License.
2269
- * You may obtain a copy of the License at
2270
- *
2271
- * http://www.apache.org/licenses/LICENSE-2.0
2272
- *
2273
- * Unless required by applicable law or agreed to in writing, software
2274
- * distributed under the License is distributed on an "AS IS" BASIS,
2275
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2276
- * See the License for the specific language governing permissions and
2277
- * limitations under the License.
2278
- */
2279
- function kt(t) {
2280
- let e;
2281
- try {
2282
- e = JSON.parse(t);
2283
- } catch {
2284
- return null;
2285
- }
2286
- return jr(e) ? e : null;
2287
- }
2288
- /**
2289
- * @license
2290
- * Copyright 2017 Google LLC
2291
- *
2292
- * Licensed under the Apache License, Version 2.0 (the "License");
2293
- * you may not use this file except in compliance with the License.
2294
- * You may obtain a copy of the License at
2295
- *
2296
- * http://www.apache.org/licenses/LICENSE-2.0
2297
- *
2298
- * Unless required by applicable law or agreed to in writing, software
2299
- * distributed under the License is distributed on an "AS IS" BASIS,
2300
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2301
- * See the License for the specific language governing permissions and
2302
- * limitations under the License.
2303
- */
2304
- function ss(t) {
2305
- if (t.length === 0)
2306
- return null;
2307
- const e = t.lastIndexOf("/");
2308
- return e === -1 ? "" : t.slice(0, e);
2309
- }
2310
- function is(t, e) {
2311
- const n = e.split("/").filter((r) => r.length > 0).join("/");
2312
- return t.length === 0 ? n : t + "/" + n;
2313
- }
2314
- function Nt(t) {
2315
- const e = t.lastIndexOf("/", t.length - 2);
2316
- return e === -1 ? t : t.slice(e + 1);
2317
- }
2318
- /**
2319
- * @license
2320
- * Copyright 2017 Google LLC
2321
- *
2322
- * Licensed under the Apache License, Version 2.0 (the "License");
2323
- * you may not use this file except in compliance with the License.
2324
- * You may obtain a copy of the License at
2325
- *
2326
- * http://www.apache.org/licenses/LICENSE-2.0
2327
- *
2328
- * Unless required by applicable law or agreed to in writing, software
2329
- * distributed under the License is distributed on an "AS IS" BASIS,
2330
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2331
- * See the License for the specific language governing permissions and
2332
- * limitations under the License.
2333
- */
2334
- function os(t, e) {
2335
- return e;
2336
- }
2337
- class M {
2338
- constructor(e, n, r, s) {
2339
- this.server = e, this.local = n || e, this.writable = !!r, this.xform = s || os;
2340
- }
2341
- }
2342
- let be = null;
2343
- function as(t) {
2344
- return !Fe(t) || t.length < 2 ? t : Nt(t);
2345
- }
2346
- function St() {
2347
- if (be)
2348
- return be;
2349
- const t = [];
2350
- t.push(new M("bucket")), t.push(new M("generation")), t.push(new M("metageneration")), t.push(new M("name", "fullPath", !0));
2351
- function e(i, o) {
2352
- return as(o);
2353
- }
2354
- const n = new M("name");
2355
- n.xform = e, t.push(n);
2356
- function r(i, o) {
2357
- return o !== void 0 ? Number(o) : o;
2358
- }
2359
- const s = new M("size");
2360
- return s.xform = r, t.push(s), t.push(new M("timeCreated")), t.push(new M("updated")), t.push(new M("md5Hash", null, !0)), t.push(new M("cacheControl", null, !0)), t.push(new M("contentDisposition", null, !0)), t.push(new M("contentEncoding", null, !0)), t.push(new M("contentLanguage", null, !0)), t.push(new M("contentType", null, !0)), t.push(new M("metadata", "customMetadata", !0)), be = t, be;
2361
- }
2362
- function cs(t, e) {
2363
- function n() {
2364
- const r = t.bucket, s = t.fullPath, i = new L(r, s);
2365
- return e._makeStorageReference(i);
2366
- }
2367
- Object.defineProperty(t, "ref", { get: n });
2368
- }
2369
- function us(t, e, n) {
2370
- const r = {};
2371
- r.type = "file";
2372
- const s = n.length;
2373
- for (let i = 0; i < s; i++) {
2374
- const o = n[i];
2375
- r[o.local] = o.xform(r, e[o.server]);
2376
- }
2377
- return cs(r, t), r;
2378
- }
2379
- function Ct(t, e, n) {
2380
- const r = kt(e);
2381
- return r === null ? null : us(t, r, n);
2382
- }
2383
- function ls(t, e, n, r) {
2384
- const s = kt(e);
2385
- if (s === null || !Fe(s.downloadTokens))
2386
- return null;
2387
- const i = s.downloadTokens;
2388
- if (i.length === 0)
2389
- return null;
2390
- const o = encodeURIComponent;
2391
- return i.split(",").map((h) => {
2392
- const I = t.bucket, g = t.fullPath, y = "/b/" + o(I) + "/o/" + o(g), R = ye(y, n, r), O = vt({
2393
- alt: "media",
2394
- token: h
2395
- });
2396
- return R + O;
2397
- })[0];
2398
- }
2399
- function ds(t, e) {
2400
- const n = {}, r = e.length;
2401
- for (let s = 0; s < r; s++) {
2402
- const i = e[s];
2403
- i.writable && (n[i.server] = t[i.local]);
2404
- }
2405
- return JSON.stringify(n);
2406
- }
2407
- class We {
2408
- constructor(e, n, r, s) {
2409
- this.url = e, this.method = n, this.handler = r, this.timeout = s, this.urlParams = {}, this.headers = {}, this.body = null, this.errorHandler = null, this.progressCallback = null, this.successCodes = [200], this.additionalRetryCodes = [];
2410
- }
2411
- }
2412
- /**
2413
- * @license
2414
- * Copyright 2017 Google LLC
2415
- *
2416
- * Licensed under the Apache License, Version 2.0 (the "License");
2417
- * you may not use this file except in compliance with the License.
2418
- * You may obtain a copy of the License at
2419
- *
2420
- * http://www.apache.org/licenses/LICENSE-2.0
2421
- *
2422
- * Unless required by applicable law or agreed to in writing, software
2423
- * distributed under the License is distributed on an "AS IS" BASIS,
2424
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2425
- * See the License for the specific language governing permissions and
2426
- * limitations under the License.
2427
- */
2428
- function Mt(t) {
2429
- if (!t)
2430
- throw je();
2431
- }
2432
- function hs(t, e) {
2433
- function n(r, s) {
2434
- const i = Ct(t, s, e);
2435
- return Mt(i !== null), i;
2436
- }
2437
- return n;
2438
- }
2439
- function ps(t, e) {
2440
- function n(r, s) {
2441
- const i = Ct(t, s, e);
2442
- return Mt(i !== null), ls(i, s, t.host, t._protocol);
2443
- }
2444
- return n;
2445
- }
2446
- function Ut(t) {
2447
- function e(n, r) {
2448
- let s;
2449
- return n.getStatus() === 401 ? /* This exact message string is the only consistent part of the */ /* server's error response that identifies it as an App Check error. */ n.getErrorText().includes("Firebase App Check token is invalid") ? s = Ar() : s = vr() : n.getStatus() === 402 ? s = wr(t.bucket) : n.getStatus() === 403 ? s = Or(t.path) : s = r, s.status = n.getStatus(), s.serverResponse = r.serverResponse, s;
2450
- }
2451
- return e;
2452
- }
2453
- function Bt(t) {
2454
- const e = Ut(t);
2455
- function n(r, s) {
2456
- let i = e(r, s);
2457
- return r.getStatus() === 404 && (i = Rr(t.path)), i.serverResponse = s.serverResponse, i;
2458
- }
2459
- return n;
2460
- }
2461
- function _s(t, e, n) {
2462
- const r = e.fullServerUrl(), s = ye(r, t.host, t._protocol), i = "GET", o = t.maxOperationRetryTime, a = new We(s, i, ps(t, n), o);
2463
- return a.errorHandler = Bt(e), a;
2464
- }
2465
- function fs(t, e) {
2466
- const n = e.fullServerUrl(), r = ye(n, t.host, t._protocol), s = "DELETE", i = t.maxOperationRetryTime;
2467
- function o(u, h) {
2468
- }
2469
- const a = new We(r, s, o, i);
2470
- return a.successCodes = [200, 204], a.errorHandler = Bt(e), a;
2471
- }
2472
- function ms(t, e) {
2473
- return t && t.contentType || e && e.type() || "application/octet-stream";
2474
- }
2475
- function gs(t, e, n) {
2476
- const r = Object.assign({}, n);
2477
- return r.fullPath = t.path, r.size = e.size(), r.contentType || (r.contentType = ms(null, e)), r;
2478
- }
2479
- function bs(t, e, n, r, s) {
2480
- const i = e.bucketOnlyServerUrl(), o = {
2481
- "X-Goog-Upload-Protocol": "multipart"
2482
- };
2483
- function a() {
2484
- let U = "";
2485
- for (let S = 0; S < 2; S++)
2486
- U = U + Math.random().toString().slice(2);
2487
- return U;
2488
- }
2489
- const u = a();
2490
- o["Content-Type"] = "multipart/related; boundary=" + u;
2491
- const h = gs(e, r, s), I = ds(h, n), g = "--" + u + `\r
2492
- Content-Type: application/json; charset=utf-8\r
2493
- \r
2494
- ` + I + `\r
2495
- --` + u + `\r
2496
- Content-Type: ` + h.contentType + `\r
2497
- \r
2498
- `, y = `\r
2499
- --` + u + "--", R = Z.getBlob(g, r, y);
2500
- if (R === null)
2501
- throw Mr();
2502
- const O = { name: h.fullPath }, j = ye(i, t.host, t._protocol), N = "POST", W = t.maxUploadRetryTime, F = new We(j, N, hs(t, n), W);
2503
- return F.urlParams = O, F.headers = o, F.body = R.uploadData(), F.errorHandler = Ut(e), F;
2504
- }
2505
- class Es {
2506
- constructor() {
2507
- this.sent_ = !1, this.xhr_ = new XMLHttpRequest(), this.initXhr(), this.errorCode_ = ee.NO_ERROR, this.sendPromise_ = new Promise((e) => {
2508
- this.xhr_.addEventListener("abort", () => {
2509
- this.errorCode_ = ee.ABORT, e();
2510
- }), this.xhr_.addEventListener("error", () => {
2511
- this.errorCode_ = ee.NETWORK_ERROR, e();
2512
- }), this.xhr_.addEventListener("load", () => {
2513
- e();
2514
- });
2515
- });
2516
- }
2517
- send(e, n, r, s) {
2518
- if (this.sent_)
2519
- throw ae("cannot .send() more than once");
2520
- if (this.sent_ = !0, this.xhr_.open(n, e, !0), s !== void 0)
2521
- for (const i in s)
2522
- s.hasOwnProperty(i) && this.xhr_.setRequestHeader(i, s[i].toString());
2523
- return r !== void 0 ? this.xhr_.send(r) : this.xhr_.send(), this.sendPromise_;
2524
- }
2525
- getErrorCode() {
2526
- if (!this.sent_)
2527
- throw ae("cannot .getErrorCode() before sending");
2528
- return this.errorCode_;
2529
- }
2530
- getStatus() {
2531
- if (!this.sent_)
2532
- throw ae("cannot .getStatus() before sending");
2533
- try {
2534
- return this.xhr_.status;
2535
- } catch {
2536
- return -1;
2537
- }
2538
- }
2539
- getResponse() {
2540
- if (!this.sent_)
2541
- throw ae("cannot .getResponse() before sending");
2542
- return this.xhr_.response;
2543
- }
2544
- getErrorText() {
2545
- if (!this.sent_)
2546
- throw ae("cannot .getErrorText() before sending");
2547
- return this.xhr_.statusText;
2548
- }
2549
- /** Aborts the request. */
2550
- abort() {
2551
- this.xhr_.abort();
2552
- }
2553
- getResponseHeader(e) {
2554
- return this.xhr_.getResponseHeader(e);
2555
- }
2556
- addUploadProgressListener(e) {
2557
- this.xhr_.upload != null && this.xhr_.upload.addEventListener("progress", e);
2558
- }
2559
- removeUploadProgressListener(e) {
2560
- this.xhr_.upload != null && this.xhr_.upload.removeEventListener("progress", e);
2561
- }
2562
- }
2563
- class Is extends Es {
2564
- initXhr() {
2565
- this.xhr_.responseType = "text";
2566
- }
2567
- }
2568
- function Ve() {
2569
- return new Is();
2570
- }
2571
- /**
2572
- * @license
2573
- * Copyright 2019 Google LLC
2574
- *
2575
- * Licensed under the Apache License, Version 2.0 (the "License");
2576
- * you may not use this file except in compliance with the License.
2577
- * You may obtain a copy of the License at
2578
- *
2579
- * http://www.apache.org/licenses/LICENSE-2.0
2580
- *
2581
- * Unless required by applicable law or agreed to in writing, software
2582
- * distributed under the License is distributed on an "AS IS" BASIS,
2583
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2584
- * See the License for the specific language governing permissions and
2585
- * limitations under the License.
2586
- */
2587
- class te {
2588
- constructor(e, n) {
2589
- this._service = e, n instanceof L ? this._location = n : this._location = L.makeFromUrl(n, e.host);
2590
- }
2591
- /**
2592
- * Returns the URL for the bucket and path this object references,
2593
- * in the form gs://<bucket>/<object-path>
2594
- * @override
2595
- */
2596
- toString() {
2597
- return "gs://" + this._location.bucket + "/" + this._location.path;
2598
- }
2599
- _newRef(e, n) {
2600
- return new te(e, n);
2601
- }
2602
- /**
2603
- * A reference to the root of this object's bucket.
2604
- */
2605
- get root() {
2606
- const e = new L(this._location.bucket, "");
2607
- return this._newRef(this._service, e);
2608
- }
2609
- /**
2610
- * The name of the bucket containing this reference's object.
2611
- */
2612
- get bucket() {
2613
- return this._location.bucket;
2614
- }
2615
- /**
2616
- * The full path of this object.
2617
- */
2618
- get fullPath() {
2619
- return this._location.path;
2620
- }
2621
- /**
2622
- * The short name of this object, which is the last component of the full path.
2623
- * For example, if fullPath is 'full/path/image.png', name is 'image.png'.
2624
- */
2625
- get name() {
2626
- return Nt(this._location.path);
2627
- }
2628
- /**
2629
- * The `StorageService` instance this `StorageReference` is associated with.
2630
- */
2631
- get storage() {
2632
- return this._service;
2633
- }
2634
- /**
2635
- * A `StorageReference` pointing to the parent location of this `StorageReference`, or null if
2636
- * this reference is the root.
2637
- */
2638
- get parent() {
2639
- const e = ss(this._location.path);
2640
- if (e === null)
2641
- return null;
2642
- const n = new L(this._location.bucket, e);
2643
- return new te(this._service, n);
2644
- }
2645
- /**
2646
- * Utility function to throw an error in methods that do not accept a root reference.
2647
- */
2648
- _throwIfRoot(e) {
2649
- if (this._location.path === "")
2650
- throw Lr(e);
2651
- }
2652
- }
2653
- function Ts(t, e, n) {
2654
- t._throwIfRoot("uploadBytes");
2655
- const r = bs(t.storage, t._location, St(), new Z(e, !0), n);
2656
- return t.storage.makeRequestWithTokens(r, Ve).then((s) => ({
2657
- metadata: s,
2658
- ref: t
2659
- }));
2660
- }
2661
- function ys(t) {
2662
- t._throwIfRoot("getDownloadURL");
2663
- const e = _s(t.storage, t._location, St());
2664
- return t.storage.makeRequestWithTokens(e, Ve).then((n) => {
2665
- if (n === null)
2666
- throw Ur();
2667
- return n;
2668
- });
2669
- }
2670
- function Rs(t) {
2671
- t._throwIfRoot("deleteObject");
2672
- const e = fs(t.storage, t._location);
2673
- return t.storage.makeRequestWithTokens(e, Ve);
2674
- }
2675
- function ws(t, e) {
2676
- const n = is(t._location.path, e), r = new L(t._location.bucket, n);
2677
- return new te(t.storage, r);
2678
- }
2679
- /**
2680
- * @license
2681
- * Copyright 2017 Google LLC
2682
- *
2683
- * Licensed under the Apache License, Version 2.0 (the "License");
2684
- * you may not use this file except in compliance with the License.
2685
- * You may obtain a copy of the License at
2686
- *
2687
- * http://www.apache.org/licenses/LICENSE-2.0
2688
- *
2689
- * Unless required by applicable law or agreed to in writing, software
2690
- * distributed under the License is distributed on an "AS IS" BASIS,
2691
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2692
- * See the License for the specific language governing permissions and
2693
- * limitations under the License.
2694
- */
2695
- function vs(t) {
2696
- return /^[A-Za-z]+:\/\//.test(t);
2697
- }
2698
- function As(t, e) {
2699
- return new te(t, e);
2700
- }
2701
- function Lt(t, e) {
2702
- if (t instanceof Ze) {
2703
- const n = t;
2704
- if (n._bucket == null)
2705
- throw Cr();
2706
- const r = new te(n, n._bucket);
2707
- return e != null ? Lt(r, e) : r;
2708
- } else
2709
- return e !== void 0 ? ws(t, e) : t;
2710
- }
2711
- function Os(t, e) {
2712
- if (e && vs(e)) {
2713
- if (t instanceof Ze)
2714
- return As(t, e);
2715
- throw xe("To use ref(service, url), the first argument must be a Storage instance.");
2716
- } else
2717
- return Lt(t, e);
2718
- }
2719
- function ot(t, e) {
2720
- const n = e == null ? void 0 : e[Rt];
2721
- return n == null ? null : L.makeFromBucketSpec(n, t);
2722
- }
2723
- function Ds(t, e, n, r = {}) {
2724
- t.host = `${e}:${n}`, t._protocol = "http";
2725
- const { mockUserToken: s } = r;
2726
- s && (t._overrideAuthToken = typeof s == "string" ? s : tn(s, t.app.options.projectId));
2727
- }
2728
- class Ze {
2729
- constructor(e, n, r, s, i) {
2730
- this.app = e, this._authProvider = n, this._appCheckProvider = r, this._url = s, this._firebaseVersion = i, this._bucket = null, this._host = yt, this._protocol = "https", this._appId = null, this._deleted = !1, this._maxOperationRetryTime = Tr, this._maxUploadRetryTime = yr, this._requests = /* @__PURE__ */ new Set(), s != null ? this._bucket = L.makeFromBucketSpec(s, this._host) : this._bucket = ot(this._host, this.app.options);
2731
- }
2732
- /**
2733
- * The host string for this service, in the form of `host` or
2734
- * `host:port`.
2735
- */
2736
- get host() {
2737
- return this._host;
2738
- }
2739
- set host(e) {
2740
- this._host = e, this._url != null ? this._bucket = L.makeFromBucketSpec(this._url, e) : this._bucket = ot(e, this.app.options);
2741
- }
2742
- /**
2743
- * The maximum time to retry uploads in milliseconds.
2744
- */
2745
- get maxUploadRetryTime() {
2746
- return this._maxUploadRetryTime;
2747
- }
2748
- set maxUploadRetryTime(e) {
2749
- it(
2750
- "time",
2751
- /* minValue=*/
2752
- 0,
2753
- /* maxValue= */
2754
- Number.POSITIVE_INFINITY,
2755
- e
2756
- ), this._maxUploadRetryTime = e;
2757
- }
2758
- /**
2759
- * The maximum time to retry operations other than uploads or downloads in
2760
- * milliseconds.
2761
- */
2762
- get maxOperationRetryTime() {
2763
- return this._maxOperationRetryTime;
2764
- }
2765
- set maxOperationRetryTime(e) {
2766
- it(
2767
- "time",
2768
- /* minValue=*/
2769
- 0,
2770
- /* maxValue= */
2771
- Number.POSITIVE_INFINITY,
2772
- e
2773
- ), this._maxOperationRetryTime = e;
2774
- }
2775
- async _getAuthToken() {
2776
- if (this._overrideAuthToken)
2777
- return this._overrideAuthToken;
2778
- const e = this._authProvider.getImmediate({ optional: !0 });
2779
- if (e) {
2780
- const n = await e.getToken();
2781
- if (n !== null)
2782
- return n.accessToken;
2783
- }
2784
- return null;
2785
- }
2786
- async _getAppCheckToken() {
2787
- const e = this._appCheckProvider.getImmediate({ optional: !0 });
2788
- return e ? (await e.getToken()).token : null;
2789
- }
2790
- /**
2791
- * Stop running requests and prevent more from being created.
2792
- */
2793
- _delete() {
2794
- return this._deleted || (this._deleted = !0, this._requests.forEach((e) => e.cancel()), this._requests.clear()), Promise.resolve();
2795
- }
2796
- /**
2797
- * Returns a new firebaseStorage.Reference object referencing this StorageService
2798
- * at the given Location.
2799
- */
2800
- _makeStorageReference(e) {
2801
- return new te(this, e);
2802
- }
2803
- /**
2804
- * @param requestInfo - HTTP RequestInfo object
2805
- * @param authToken - Firebase auth token
2806
- */
2807
- _makeRequest(e, n, r, s, i = !0) {
2808
- if (this._deleted)
2809
- return new Pr(wt());
2810
- {
2811
- const o = Yr(e, this._appId, r, s, n, this._firebaseVersion, i);
2812
- return this._requests.add(o), o.getPromise().then(() => this._requests.delete(o), () => this._requests.delete(o)), o;
2813
- }
2814
- }
2815
- async makeRequestWithTokens(e, n) {
2816
- const [r, s] = await Promise.all([
2817
- this._getAuthToken(),
2818
- this._getAppCheckToken()
2819
- ]);
2820
- return this._makeRequest(e, n, r, s).getPromise();
2821
- }
2822
- }
2823
- const at = "@firebase/storage", ct = "0.13.2";
2824
- /**
2825
- * @license
2826
- * Copyright 2020 Google LLC
2827
- *
2828
- * Licensed under the Apache License, Version 2.0 (the "License");
2829
- * you may not use this file except in compliance with the License.
2830
- * You may obtain a copy of the License at
2831
- *
2832
- * http://www.apache.org/licenses/LICENSE-2.0
2833
- *
2834
- * Unless required by applicable law or agreed to in writing, software
2835
- * distributed under the License is distributed on an "AS IS" BASIS,
2836
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
2837
- * See the License for the specific language governing permissions and
2838
- * limitations under the License.
2839
- */
2840
- const Pt = "storage";
2841
- function ks(t, e, n) {
2842
- return t = he(t), Ts(t, e, n);
2843
- }
2844
- function Ns(t) {
2845
- return t = he(t), ys(t);
2846
- }
2847
- function Ss(t) {
2848
- return t = he(t), Rs(t);
2849
- }
2850
- function ut(t, e) {
2851
- return t = he(t), Os(t, e);
2852
- }
2853
- function lt(t = Pe(), e) {
2854
- t = he(t);
2855
- const r = ir(t, Pt).getImmediate({
2856
- identifier: e
2857
- }), s = qt("storage");
2858
- return s && Cs(r, ...s), r;
2859
- }
2860
- function Cs(t, e, n, r = {}) {
2861
- Ds(t, e, n, r);
2862
- }
2863
- function Ms(t, { instanceIdentifier: e }) {
2864
- const n = t.getProvider("app").getImmediate(), r = t.getProvider("auth-internal"), s = t.getProvider("app-check-internal");
2865
- return new Ze(n, r, s, e, cr);
2866
- }
2867
- function Us() {
2868
- Te(new ue(
2869
- Pt,
2870
- Ms,
2871
- "PUBLIC"
2872
- /* ComponentType.PUBLIC */
2873
- ).setMultipleInstances(!0)), re(at, ct, ""), re(at, ct, "esm2017");
2874
- }
2875
- Us();
2876
- const de = {
2877
- async update(t, e, n) {
2878
- const r = lt(Pe(), n), s = ut(r, t);
2879
- return await ks(s, e), Ns(s);
2880
- },
2881
- async delete(t, e) {
2882
- const n = lt(Pe(), e), r = ut(n, t);
2883
- await Ss(r);
2884
- }
2885
- };
2886
- var xt = { exports: {} };
2887
- (function(t, e) {
2888
- (function(n, r) {
2889
- t.exports = r();
2890
- })(jt, function() {
2891
- var n = 1e3, r = 6e4, s = 36e5, i = "millisecond", o = "second", a = "minute", u = "hour", h = "day", I = "week", g = "month", y = "quarter", R = "year", O = "date", j = "Invalid Date", N = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, W = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, F = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(_) {
2892
- var d = ["th", "st", "nd", "rd"], c = _ % 100;
2893
- return "[" + _ + (d[(c - 20) % 10] || d[c] || d[0]) + "]";
2894
- } }, U = function(_, d, c) {
2895
- var p = String(_);
2896
- return !p || p.length >= d ? _ : "" + Array(d + 1 - p.length).join(c) + _;
2897
- }, S = { s: U, z: function(_) {
2898
- var d = -_.utcOffset(), c = Math.abs(d), p = Math.floor(c / 60), l = c % 60;
2899
- return (d <= 0 ? "+" : "-") + U(p, 2, "0") + ":" + U(l, 2, "0");
2900
- }, m: function _(d, c) {
2901
- if (d.date() < c.date()) return -_(c, d);
2902
- var p = 12 * (c.year() - d.year()) + (c.month() - d.month()), l = d.clone().add(p, g), f = c - l < 0, m = d.clone().add(p + (f ? -1 : 1), g);
2903
- return +(-(p + (c - l) / (f ? l - m : m - l)) || 0);
2904
- }, a: function(_) {
2905
- return _ < 0 ? Math.ceil(_) || 0 : Math.floor(_);
2906
- }, p: function(_) {
2907
- return { M: g, y: R, w: I, d: h, D: O, h: u, m: a, s: o, ms: i, Q: y }[_] || String(_ || "").toLowerCase().replace(/s$/, "");
2908
- }, u: function(_) {
2909
- return _ === void 0;
2910
- } }, $ = "en", x = {};
2911
- x[$] = F;
2912
- var pe = "$isDayjsObject", J = function(_) {
2913
- return _ instanceof fe || !(!_ || !_[pe]);
2914
- }, _e = function _(d, c, p) {
2915
- var l;
2916
- if (!d) return $;
2917
- if (typeof d == "string") {
2918
- var f = d.toLowerCase();
2919
- x[f] && (l = f), c && (x[f] = c, l = f);
2920
- var m = d.split("-");
2921
- if (!l && m.length > 1) return _(m[0]);
2922
- } else {
2923
- var E = d.name;
2924
- x[E] = d, l = E;
2925
- }
2926
- return !p && l && ($ = l), l || !p && $;
2927
- }, D = function(_, d) {
2928
- if (J(_)) return _.clone();
2929
- var c = typeof d == "object" ? d : {};
2930
- return c.date = _, c.args = arguments, new fe(c);
2931
- }, b = S;
2932
- b.l = _e, b.i = J, b.w = function(_, d) {
2933
- return D(_, { locale: d.$L, utc: d.$u, x: d.$x, $offset: d.$offset });
2934
- };
2935
- var fe = function() {
2936
- function _(c) {
2937
- this.$L = _e(c.locale, null, !0), this.parse(c), this.$x = this.$x || c.x || {}, this[pe] = !0;
2938
- }
2939
- var d = _.prototype;
2940
- return d.parse = function(c) {
2941
- this.$d = function(p) {
2942
- var l = p.date, f = p.utc;
2943
- if (l === null) return /* @__PURE__ */ new Date(NaN);
2944
- if (b.u(l)) return /* @__PURE__ */ new Date();
2945
- if (l instanceof Date) return new Date(l);
2946
- if (typeof l == "string" && !/Z$/i.test(l)) {
2947
- var m = l.match(N);
2948
- if (m) {
2949
- var E = m[2] - 1 || 0, A = (m[7] || "0").substring(0, 3);
2950
- return f ? new Date(Date.UTC(m[1], E, m[3] || 1, m[4] || 0, m[5] || 0, m[6] || 0, A)) : new Date(m[1], E, m[3] || 1, m[4] || 0, m[5] || 0, m[6] || 0, A);
2951
- }
2952
- }
2953
- return new Date(l);
2954
- }(c), this.init();
2955
- }, d.init = function() {
2956
- var c = this.$d;
2957
- this.$y = c.getFullYear(), this.$M = c.getMonth(), this.$D = c.getDate(), this.$W = c.getDay(), this.$H = c.getHours(), this.$m = c.getMinutes(), this.$s = c.getSeconds(), this.$ms = c.getMilliseconds();
2958
- }, d.$utils = function() {
2959
- return b;
2960
- }, d.isValid = function() {
2961
- return this.$d.toString() !== j;
2962
- }, d.isSame = function(c, p) {
2963
- var l = D(c);
2964
- return this.startOf(p) <= l && l <= this.endOf(p);
2965
- }, d.isAfter = function(c, p) {
2966
- return D(c) < this.startOf(p);
2967
- }, d.isBefore = function(c, p) {
2968
- return this.endOf(p) < D(c);
2969
- }, d.$g = function(c, p, l) {
2970
- return b.u(c) ? this[p] : this.set(l, c);
2971
- }, d.unix = function() {
2972
- return Math.floor(this.valueOf() / 1e3);
2973
- }, d.valueOf = function() {
2974
- return this.$d.getTime();
2975
- }, d.startOf = function(c, p) {
2976
- var l = this, f = !!b.u(p) || p, m = b.p(c), E = function(Q, B) {
2977
- var V = b.w(l.$u ? Date.UTC(l.$y, B, Q) : new Date(l.$y, B, Q), l);
2978
- return f ? V : V.endOf(h);
2979
- }, A = function(Q, B) {
2980
- return b.w(l.toDate()[Q].apply(l.toDate("s"), (f ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(B)), l);
2981
- }, k = this.$W, C = this.$M, P = this.$D, ne = "set" + (this.$u ? "UTC" : "");
2982
- switch (m) {
2983
- case R:
2984
- return f ? E(1, 0) : E(31, 11);
2985
- case g:
2986
- return f ? E(1, C) : E(0, C + 1);
2987
- case I:
2988
- var K = this.$locale().weekStart || 0, ie = (k < K ? k + 7 : k) - K;
2989
- return E(f ? P - ie : P + (6 - ie), C);
2990
- case h:
2991
- case O:
2992
- return A(ne + "Hours", 0);
2993
- case u:
2994
- return A(ne + "Minutes", 1);
2995
- case a:
2996
- return A(ne + "Seconds", 2);
2997
- case o:
2998
- return A(ne + "Milliseconds", 3);
2999
- default:
3000
- return this.clone();
3001
- }
3002
- }, d.endOf = function(c) {
3003
- return this.startOf(c, !1);
3004
- }, d.$set = function(c, p) {
3005
- var l, f = b.p(c), m = "set" + (this.$u ? "UTC" : ""), E = (l = {}, l[h] = m + "Date", l[O] = m + "Date", l[g] = m + "Month", l[R] = m + "FullYear", l[u] = m + "Hours", l[a] = m + "Minutes", l[o] = m + "Seconds", l[i] = m + "Milliseconds", l)[f], A = f === h ? this.$D + (p - this.$W) : p;
3006
- if (f === g || f === R) {
3007
- var k = this.clone().set(O, 1);
3008
- k.$d[E](A), k.init(), this.$d = k.set(O, Math.min(this.$D, k.daysInMonth())).$d;
3009
- } else E && this.$d[E](A);
3010
- return this.init(), this;
3011
- }, d.set = function(c, p) {
3012
- return this.clone().$set(c, p);
3013
- }, d.get = function(c) {
3014
- return this[b.p(c)]();
3015
- }, d.add = function(c, p) {
3016
- var l, f = this;
3017
- c = Number(c);
3018
- var m = b.p(p), E = function(C) {
3019
- var P = D(f);
3020
- return b.w(P.date(P.date() + Math.round(C * c)), f);
3021
- };
3022
- if (m === g) return this.set(g, this.$M + c);
3023
- if (m === R) return this.set(R, this.$y + c);
3024
- if (m === h) return E(1);
3025
- if (m === I) return E(7);
3026
- var A = (l = {}, l[a] = r, l[u] = s, l[o] = n, l)[m] || 1, k = this.$d.getTime() + c * A;
3027
- return b.w(k, this);
3028
- }, d.subtract = function(c, p) {
3029
- return this.add(-1 * c, p);
3030
- }, d.format = function(c) {
3031
- var p = this, l = this.$locale();
3032
- if (!this.isValid()) return l.invalidDate || j;
3033
- var f = c || "YYYY-MM-DDTHH:mm:ssZ", m = b.z(this), E = this.$H, A = this.$m, k = this.$M, C = l.weekdays, P = l.months, ne = l.meridiem, K = function(B, V, oe, me) {
3034
- return B && (B[V] || B(p, f)) || oe[V].slice(0, me);
3035
- }, ie = function(B) {
3036
- return b.s(E % 12 || 12, B, "0");
3037
- }, Q = ne || function(B, V, oe) {
3038
- var me = B < 12 ? "AM" : "PM";
3039
- return oe ? me.toLowerCase() : me;
3040
- };
3041
- return f.replace(W, function(B, V) {
3042
- return V || function(oe) {
3043
- switch (oe) {
3044
- case "YY":
3045
- return String(p.$y).slice(-2);
3046
- case "YYYY":
3047
- return b.s(p.$y, 4, "0");
3048
- case "M":
3049
- return k + 1;
3050
- case "MM":
3051
- return b.s(k + 1, 2, "0");
3052
- case "MMM":
3053
- return K(l.monthsShort, k, P, 3);
3054
- case "MMMM":
3055
- return K(P, k);
3056
- case "D":
3057
- return p.$D;
3058
- case "DD":
3059
- return b.s(p.$D, 2, "0");
3060
- case "d":
3061
- return String(p.$W);
3062
- case "dd":
3063
- return K(l.weekdaysMin, p.$W, C, 2);
3064
- case "ddd":
3065
- return K(l.weekdaysShort, p.$W, C, 3);
3066
- case "dddd":
3067
- return C[p.$W];
3068
- case "H":
3069
- return String(E);
3070
- case "HH":
3071
- return b.s(E, 2, "0");
3072
- case "h":
3073
- return ie(1);
3074
- case "hh":
3075
- return ie(2);
3076
- case "a":
3077
- return Q(E, A, !0);
3078
- case "A":
3079
- return Q(E, A, !1);
3080
- case "m":
3081
- return String(A);
3082
- case "mm":
3083
- return b.s(A, 2, "0");
3084
- case "s":
3085
- return String(p.$s);
3086
- case "ss":
3087
- return b.s(p.$s, 2, "0");
3088
- case "SSS":
3089
- return b.s(p.$ms, 3, "0");
3090
- case "Z":
3091
- return m;
3092
- }
3093
- return null;
3094
- }(B) || m.replace(":", "");
3095
- });
3096
- }, d.utcOffset = function() {
3097
- return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
3098
- }, d.diff = function(c, p, l) {
3099
- var f, m = this, E = b.p(p), A = D(c), k = (A.utcOffset() - this.utcOffset()) * r, C = this - A, P = function() {
3100
- return b.m(m, A);
3101
- };
3102
- switch (E) {
3103
- case R:
3104
- f = P() / 12;
3105
- break;
3106
- case g:
3107
- f = P();
3108
- break;
3109
- case y:
3110
- f = P() / 3;
3111
- break;
3112
- case I:
3113
- f = (C - k) / 6048e5;
3114
- break;
3115
- case h:
3116
- f = (C - k) / 864e5;
3117
- break;
3118
- case u:
3119
- f = C / s;
3120
- break;
3121
- case a:
3122
- f = C / r;
3123
- break;
3124
- case o:
3125
- f = C / n;
3126
- break;
3127
- default:
3128
- f = C;
3129
- }
3130
- return l ? f : b.a(f);
3131
- }, d.daysInMonth = function() {
3132
- return this.endOf(g).$D;
3133
- }, d.$locale = function() {
3134
- return x[this.$L];
3135
- }, d.locale = function(c, p) {
3136
- if (!c) return this.$L;
3137
- var l = this.clone(), f = _e(c, p, !0);
3138
- return f && (l.$L = f), l;
3139
- }, d.clone = function() {
3140
- return b.w(this.$d, this);
3141
- }, d.toDate = function() {
3142
- return new Date(this.valueOf());
3143
- }, d.toJSON = function() {
3144
- return this.isValid() ? this.toISOString() : null;
3145
- }, d.toISOString = function() {
3146
- return this.$d.toISOString();
3147
- }, d.toString = function() {
3148
- return this.$d.toUTCString();
3149
- }, _;
3150
- }(), ze = fe.prototype;
3151
- return D.prototype = ze, [["$ms", i], ["$s", o], ["$m", a], ["$H", u], ["$W", h], ["$M", g], ["$y", R], ["$D", O]].forEach(function(_) {
3152
- ze[_[1]] = function(d) {
3153
- return this.$g(d, _[0], _[1]);
3154
- };
3155
- }), D.extend = function(_, d) {
3156
- return _.$i || (_(d, fe, D), _.$i = !0), D;
3157
- }, D.locale = _e, D.isDayjs = J, D.unix = function(_) {
3158
- return D(1e3 * _);
3159
- }, D.en = x[$], D.Ls = x, D.p = {}, D;
3160
- });
3161
- })(xt);
3162
- var Bs = xt.exports;
3163
- const Ls = /* @__PURE__ */ Ft(Bs);
3164
- var $e = function() {
3165
- return $e = Object.assign || function(e) {
3166
- for (var n, r = 1, s = arguments.length; r < s; r++) {
3167
- n = arguments[r];
3168
- for (var i in n) Object.prototype.hasOwnProperty.call(n, i) && (e[i] = n[i]);
3169
- }
3170
- return e;
3171
- }, $e.apply(this, arguments);
3172
- };
3173
- function Ps(t) {
3174
- return t.toLowerCase();
3175
- }
3176
- var xs = [/([a-z0-9])([A-Z])/g, /([A-Z])([A-Z][a-z])/g], $s = /[^A-Z0-9]+/gi;
3177
- function Hs(t, e) {
3178
- e === void 0 && (e = {});
3179
- for (var n = e.splitRegexp, r = n === void 0 ? xs : n, s = e.stripRegexp, i = s === void 0 ? $s : s, o = e.transform, a = o === void 0 ? Ps : o, u = e.delimiter, h = u === void 0 ? " " : u, I = dt(dt(t, r, "$1\0$2"), i, "\0"), g = 0, y = I.length; I.charAt(g) === "\0"; )
3180
- g++;
3181
- for (; I.charAt(y - 1) === "\0"; )
3182
- y--;
3183
- return I.slice(g, y).split("\0").map(a).join(h);
3184
- }
3185
- function dt(t, e, n) {
3186
- return e instanceof RegExp ? t.replace(e, n) : e.reduce(function(r, s) {
3187
- return r.replace(s, n);
3188
- }, t);
3189
- }
3190
- function js(t) {
3191
- return t.charAt(0).toUpperCase() + t.substr(1);
3192
- }
3193
- function Fs(t, e) {
3194
- var n = t.toLowerCase();
3195
- return e === 0 ? js(n) : n;
3196
- }
3197
- function Re(t, e) {
3198
- return e === void 0 && (e = {}), Hs(t, $e({ delimiter: " ", transform: Fs }, e));
3199
- }
3200
- function Gs(t, e = []) {
3201
- const n = JSON.parse(JSON.stringify(t));
3202
- return e.length > 0 && e.forEach((r) => {
3203
- n[r] !== void 0 && delete n[r];
3204
- }), n;
3205
- }
3206
- function Ws(t, e) {
3207
- var r, s, i, o;
3208
- const n = e ? Gs(e) : void 0;
3209
- return {
3210
- _id: (n == null ? void 0 : n._id) ?? "",
3211
- notifyUrl: (n == null ? void 0 : n.notifyUrl) ?? "",
3212
- store: {
3213
- id: (n == null ? void 0 : n.store.id) ?? "",
3214
- event: (n == null ? void 0 : n.store.event) ?? X.F_PAYOUT_FOR.Enum.ORDERING,
3215
- bank: {
3216
- name: ((r = n == null ? void 0 : n.store.bank) == null ? void 0 : r.name) ?? $t[0].value,
3217
- type: ((s = n == null ? void 0 : n.store.bank) == null ? void 0 : s.type) ?? Ht[0].value,
3218
- holderName: ((i = n == null ? void 0 : n.store.bank) == null ? void 0 : i.holderName) ?? "",
3219
- accountNumber: ((o = n == null ? void 0 : n.store.bank) == null ? void 0 : o.accountNumber) ?? ""
3220
- },
3221
- keyPerson: (n == null ? void 0 : n.store.keyPerson) ?? {
3222
- name: "",
3223
- phone: "",
3224
- email: ""
3225
- },
3226
- ssm: (n == null ? void 0 : n.store.ssm) ?? "",
3227
- bankStatement: (n == null ? void 0 : n.store.bankStatement) ?? "",
3228
- exteriorPhoto: (n == null ? void 0 : n.store.exteriorPhoto) ?? ""
3229
- },
3230
- enable: (n == null ? void 0 : n.enable) ?? !1,
3231
- methods: (n == null ? void 0 : n.methods) ?? [],
3232
- status: (n == null ? void 0 : n.status) ?? X.F_PAYOUT_ACCOUNT_STATUS.Enum.NEW,
3233
- businessId: t
3234
- };
3235
- }
3236
- function Vs(t) {
3237
- return t.reduce(
3238
- (e, n) => ([X.F_PAYOUT_ACCOUNT_STATUS.Enum.NEW].some((r) => r == n.status) ? e.NEW.push({
3239
- ...n
3240
- }) : e.EXISTED.push({
3241
- ...n
3242
- }), e),
3243
- {
3244
- NEW: [],
3245
- EXISTED: []
3246
- }
3247
- );
3248
- }
3249
- async function Ne(t) {
3250
- await de.delete(t);
3251
- }
3252
- async function ht(t, e, n) {
3253
- const r = Ls().toISOString();
3254
- if (t.restaurantId)
3255
- return await de.update(
3256
- `restaurant/${t.restaurantId}/documents/${e}/${r}.pdf`,
3257
- n
3258
- );
3259
- if (t.businessId)
3260
- return await de.update(
3261
- `business/${t.businessId}/documents/${e}/${r}.pdf`,
3262
- n
3263
- );
3264
- throw "Not implemented";
3265
- }
3266
- async function Zs(t, e) {
3267
- if (t.restaurantId)
3268
- return await de.update(
3269
- `restaurant/${t.restaurantId}/exterior/photo`,
3270
- e
3271
- );
3272
- if (t.businessId)
3273
- return await de.update(
3274
- `business/${t.businessId}/exterior/photo`,
3275
- e
3276
- );
3277
- throw "Not implemented";
3278
- }
3279
- async function zs(t, e, n) {
3280
- e.store.ssm && n.newSSM && await Ne(e.store.ssm), e.store.bankStatement && n.newBankStatement && await Ne(e.store.bankStatement), e.store.exteriorPhoto && n.newExteriorPhoto && await Ne(e.store.exteriorPhoto);
3281
- let r = e.store.ssm || "";
3282
- n.newSSM && (r = await ht(t, "ssm", n.newSSM));
3283
- let s = e.store.bankStatement || "";
3284
- n.newBankStatement && (s = await ht(
3285
- t,
3286
- "bankStatement",
3287
- n.newBankStatement
3288
- ));
3289
- let i = e.store.exteriorPhoto || "";
3290
- return n.newExteriorPhoto && (i = await Zs(
3291
- t,
3292
- n.newExteriorPhoto
3293
- )), {
3294
- ...e,
3295
- store: {
3296
- ...e.store,
3297
- id: n.payoutSetting.store.id,
3298
- keyPerson: n.payoutSetting.store.keyPerson,
3299
- bank: n.payoutSetting.store.bank,
3300
- ssm: r,
3301
- bankStatement: s,
3302
- exteriorPhoto: i,
3303
- event: n.payoutSetting.store.event
3304
- },
3305
- status: X.F_PAYOUT_ACCOUNT_STATUS.Enum.PENDING,
3306
- notifyUrl: n.payoutSetting.store.event === X.F_PAYOUT_FOR.Enum.MARKETING ? "http://marketing-api-service:3000/customer/callback/store" : "http://order-backend:3000/backend/payment"
3307
- };
3308
- }
3309
- const $t = Object.values(Gt.F_BANK_NAME).map((t) => ({
3310
- label: Re(t),
3311
- value: t
3312
- })), Ht = Object.values(X.F_BANK_TYPE.Values).map((t) => ({
3313
- label: Re(t),
3314
- value: t
3315
- })), Ys = Object.values(X.F_PAYOUT_FOR.Values).map((t) => ({
3316
- label: Re(t),
3317
- value: t
3318
- })), Xs = Object.values(X.F_PAYOUT_ACCOUNT_STATUS.Values).map(
3319
- (t) => ({
3320
- label: Re(t),
3321
- value: t
3322
- })
3323
- ), Ks = {
3324
- mergeData: zs,
3325
- initPayoutAccount: Ws,
3326
- groupByStatus: Vs,
3327
- bankTypeOptions: Ht,
3328
- bankNameOptions: $t,
3329
- storeEventOptions: Ys,
3330
- statusOptions: Xs
3331
- };
3332
- export {
3333
- Ks as P,
3334
- Gs as c
3335
- };