@incodetech/welcome 1.85.0-20251216181218.0 → 1.85.0-20251216190848.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/incode-localization/src/createI18n.d.ts +0 -1
- package/dist/incode-utils/src/hooks.d.ts +0 -1
- package/dist/incode-utils/src/mobile.d.ts +0 -1
- package/dist/incode-utils/src/utils.d.ts +0 -1
- package/dist/incode-welcome/src/ContentWrapper/ContentWrapper.d.ts +0 -1
- package/dist/incode-welcome/src/DefaultComponent/DefaultComponent.d.ts +0 -1
- package/dist/incode-welcome/src/DefaultComponent/IncodeProvider.d.ts +0 -1
- package/dist/incode-welcome/src/Face/AuthFace.d.ts +0 -1
- package/dist/incode-welcome/src/Face/AuthFaceFlow.d.ts +0 -1
- package/dist/incode-welcome/src/Face/FaceCapture.d.ts +0 -1
- package/dist/incode-welcome/src/Face/FaceFlow.d.ts +0 -1
- package/dist/incode-welcome/src/Face/V1/FaceFlow.d.ts +0 -1
- package/dist/incode-welcome/src/Face/api/sendAuthFaceImage.d.ts +0 -1
- package/dist/incode-welcome/src/Face/api/sendFaceImage.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/FaceFlowPage.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/Tutorial.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/CameraButton.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/Capture.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/CaptureOverlay.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/ErrorModal.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/ErrorModalContent.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/FaceOutline.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/LoadingBorder.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/ManualCaptureButton.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/NoMoreAttempsModal.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/Notification.d.ts +0 -1
- package/dist/incode-welcome/src/Face/components/capture/RetryErrorModal.d.ts +0 -1
- package/dist/incode-welcome/src/Face/detection/DetectionManager.d.ts +0 -1
- package/dist/incode-welcome/src/Face/detection/useFaceDetection.d.ts +0 -1
- package/dist/incode-welcome/src/Face/hooks/useFaceCaptureAspectRatio.d.ts +0 -1
- package/dist/incode-welcome/src/Face/renderAuthFace.d.ts +0 -1
- package/dist/incode-welcome/src/Face/renderCaptureFace.d.ts +0 -1
- package/dist/incode-welcome/src/Face/state/FaceFlowManager.d.ts +0 -1
- package/dist/incode-welcome/src/Face/state/FaceFlowManager.types.d.ts +0 -1
- package/dist/incode-welcome/src/Face/utils/isSecondIdEnabled.d.ts +0 -1
- package/dist/incode-welcome/src/Face/utils/isTutorialEnabled.d.ts +0 -1
- package/dist/incode-welcome/src/FakePermissionsRequest/FakePermissionsRequest.d.ts +0 -1
- package/dist/incode-welcome/src/FakePermissionsRequest/components/AndroidNotification/AndroidNotification.d.ts +0 -1
- package/dist/incode-welcome/src/FakePermissionsRequest/components/AndroidNotification/types.d.ts +0 -1
- package/dist/incode-welcome/src/FakePermissionsRequest/components/IOSNotification/IOSNotification.d.ts +0 -1
- package/dist/incode-welcome/src/FakePermissionsRequest/components/IOSNotification/types.d.ts +0 -1
- package/dist/incode-welcome/src/FakePermissionsRequest/components/Message/Message.d.ts +0 -1
- package/dist/incode-welcome/src/FakePermissionsRequest/components/Message/types.d.ts +0 -1
- package/dist/incode-welcome/src/FakePermissionsRequest/types.d.ts +0 -1
- package/dist/incode-welcome/src/FlowManager/AbstractFlowManager.d.ts +0 -1
- package/dist/incode-welcome/src/ID/BaseCaptureCore.d.ts +0 -1
- package/dist/incode-welcome/src/ID/CaptureId.d.ts +0 -1
- package/dist/incode-welcome/src/ID/CaptureIdCore.d.ts +0 -1
- package/dist/incode-welcome/src/ID/CaptureIdV1.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/DigitalIdFlow.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/IdCaptureV2Manager.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/IdFlow.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/IdFlowPage.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/ManualIdUploadWrapper.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/Uploading.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/assets/AttachmentIcon.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/assets/DigitalIdIcon.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/assets/IdBackIcon.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/assets/IdFrontIcon.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/assets/UploadIDScreenImage.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/assets/UploadIcon.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/assets/UploadPassportIcon.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/Api.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/CaptureOverlay.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/CaptureTooltip.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/DocumentConfig.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/DocumentItem.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/ExpiredId.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/IdHint.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/Manager.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/ManualCaptureButton.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/TopText.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/UnacceptableId.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/components/IdAnalyzing.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/components/IdError.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/components/IdProcessingLayout.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/components/IdSuccess.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/components/StatusMessage.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/errorConfig.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/hooks/useProcessingLayout.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/capture/utils/getIdErrorAction.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/components/DigitalIdErrorState.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/components/DigitalIdFileReview.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/components/DigitalIdFileSelection.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/components/PdfPreview.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/hooks/useAspectRatio.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/hooks/useCaptureIdState.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/idFlowSteps.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/renderIdCapture.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/state/IdFlowManager.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/state/IdFlowManager.types.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/tutorials/AgeVerification.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/tutorials/IdTutorial.d.ts +0 -1
- package/dist/incode-welcome/src/ID/IDV2/tutorials/PassportTutorial.d.ts +0 -1
- package/dist/incode-welcome/src/ID/renderCaptureId.d.ts +0 -1
- package/dist/incode-welcome/src/NameCapture.d.ts +0 -1
- package/dist/incode-welcome/src/Phone/renderPhone.d.ts +0 -1
- package/dist/incode-welcome/src/RememberMe/DeclineSharingModal.d.ts +0 -1
- package/dist/incode-welcome/src/RememberMe/ErrorMessage.d.ts +0 -1
- package/dist/incode-welcome/src/RememberMe/InstantVerify.d.ts +0 -1
- package/dist/incode-welcome/src/RememberMe/InstantVerifyConsent.d.ts +0 -1
- package/dist/incode-welcome/src/RememberMe/PhoneOrEmail.d.ts +0 -1
- package/dist/incode-welcome/src/RememberMe/SuccessUniversalIdentity.d.ts +0 -1
- package/dist/incode-welcome/src/RememberMe/UniversalIdentity.d.ts +0 -1
- package/dist/incode-welcome/src/RememberMe/constants.d.ts +0 -1
- package/dist/incode-welcome/src/RememberMe/types.d.ts +0 -1
- package/dist/incode-welcome/src/addContract.d.ts +0 -1
- package/dist/incode-welcome/src/addCreditCardBack.d.ts +0 -1
- package/dist/incode-welcome/src/addCreditCardFront.d.ts +0 -1
- package/dist/incode-welcome/src/addDocument.d.ts +0 -1
- package/dist/incode-welcome/src/addFrontSecondId.d.ts +0 -1
- package/dist/incode-welcome/src/addQr.d.ts +0 -1
- package/dist/incode-welcome/src/app.d.ts +0 -1
- package/dist/incode-welcome/src/approve.d.ts +0 -1
- package/dist/incode-welcome/src/auth/Login.d.ts +0 -1
- package/dist/incode-welcome/src/auth/LoginDesktop.d.ts +0 -1
- package/dist/incode-welcome/src/auth/SecondFactor.d.ts +0 -1
- package/dist/incode-welcome/src/auth/identify.d.ts +0 -1
- package/dist/incode-welcome/src/auth/identifyInstantVerify.d.ts +0 -1
- package/dist/incode-welcome/src/auth/oneToOneIdentify.d.ts +0 -1
- package/dist/incode-welcome/src/auth/renderLogin.d.ts +0 -1
- package/dist/incode-welcome/src/auth/renderLoginIncodeID.d.ts +0 -1
- package/dist/incode-welcome/src/camera/BlockingErrorMessage.d.ts +0 -1
- package/dist/incode-welcome/src/camera/CaptureAcceptedDocuments.d.ts +0 -1
- package/dist/incode-welcome/src/camera/CaptureSelfie.d.ts +0 -1
- package/dist/incode-welcome/src/camera/ChooseCamera.d.ts +0 -1
- package/dist/incode-welcome/src/camera/Webcam.d.ts +0 -1
- package/dist/incode-welcome/src/camera/Webcam.types.d.ts +0 -1
- package/dist/incode-welcome/src/camera/documentCapture/DocumentCapture.d.ts +0 -1
- package/dist/incode-welcome/src/camera/documentCapture/V5CDocumentTutorial.d.ts +0 -1
- package/dist/incode-welcome/src/camera/documentCapture/types.d.ts +0 -1
- package/dist/incode-welcome/src/camera/permissionSteps/desktop/index.d.ts +0 -1
- package/dist/incode-welcome/src/camera/proofOfAddress/POA.d.ts +0 -1
- package/dist/incode-welcome/src/camera/proofOfAddress/types.d.ts +0 -1
- package/dist/incode-welcome/src/camera/useSelfie.d.ts +0 -1
- package/dist/incode-welcome/src/consents/MLConsent.d.ts +0 -1
- package/dist/incode-welcome/src/consents/PrivacyConsent.d.ts +0 -1
- package/dist/incode-welcome/src/consents/addConsent.d.ts +0 -1
- package/dist/incode-welcome/src/consents/biometricConsent/BiometricConsent.d.ts +0 -1
- package/dist/incode-welcome/src/consents/biometricConsent/renderBiometricConsent.d.ts +0 -1
- package/dist/incode-welcome/src/consents/combinedConsent/CombinedConsent.d.ts +0 -1
- package/dist/incode-welcome/src/consents/combinedConsent/renderCombinedConsent.d.ts +0 -1
- package/dist/incode-welcome/src/consents/getConsents.d.ts +0 -1
- package/dist/incode-welcome/src/consents/renderMlConsent.d.ts +0 -1
- package/dist/incode-welcome/src/consents/renderUserConsent.d.ts +0 -1
- package/dist/incode-welcome/src/consents/types.d.ts +0 -1
- package/dist/incode-welcome/src/create.d.ts +0 -1
- package/dist/incode-welcome/src/createNewSession.d.ts +0 -1
- package/dist/incode-welcome/src/createRedirectUrl.d.ts +0 -1
- package/dist/incode-welcome/src/curp/EnterCurp.d.ts +0 -1
- package/dist/incode-welcome/src/curp/GenerateCurp.d.ts +0 -1
- package/dist/incode-welcome/src/customFields/CustomFields.d.ts +0 -1
- package/dist/incode-welcome/src/detection/IdDetectionManager.d.ts +0 -1
- package/dist/incode-welcome/src/detection/detectFace.d.ts +0 -1
- package/dist/incode-welcome/src/detection/detectID.d.ts +0 -1
- package/dist/incode-welcome/src/detection/detectionSetup.d.ts +0 -1
- package/dist/incode-welcome/src/detection/onboardingAnalytics.d.ts +0 -1
- package/dist/incode-welcome/src/detection/useIdDetection.d.ts +0 -1
- package/dist/incode-welcome/src/documentSelector/DocumentSelector.d.ts +0 -1
- package/dist/incode-welcome/src/ekyb/EKYBCountrySelector/EKYBCountrySelector.d.ts +0 -1
- package/dist/incode-welcome/src/ekyb/Ekyb.d.ts +0 -1
- package/dist/incode-welcome/src/ekyb/components/FieldInput.d.ts +0 -1
- package/dist/incode-welcome/src/ekyb/components/UboInputs.d.ts +0 -1
- package/dist/incode-welcome/src/ekyb/utils/errorUtils.d.ts +0 -1
- package/dist/incode-welcome/src/ekyc/components/Input.d.ts +0 -1
- package/dist/incode-welcome/src/electronicSignatures/CertificateIssuance.d.ts +0 -1
- package/dist/incode-welcome/src/electronicSignatures/components/EndScreen.d.ts +0 -1
- package/dist/incode-welcome/src/faceMatch/FaceMatch.d.ts +0 -1
- package/dist/incode-welcome/src/faceMatch/useFaceMatchData.d.ts +0 -1
- package/dist/incode-welcome/src/fieldComparision/InputWithLabel.d.ts +0 -1
- package/dist/incode-welcome/src/fiscalQr/FiscalQr.d.ts +0 -1
- package/dist/incode-welcome/src/fiscalQr/postQrLink.d.ts +0 -1
- package/dist/incode-welcome/src/fiscalQr/renderFiscalQr.d.ts +0 -1
- package/dist/incode-welcome/src/flow/Flow.d.ts +0 -1
- package/dist/incode-welcome/src/flow/FlowDataContext.d.ts +0 -1
- package/dist/incode-welcome/src/flow/FlowLogger.d.ts +0 -1
- package/dist/incode-welcome/src/flow/defaultFlow.d.ts +0 -1
- package/dist/incode-welcome/src/flow/executeFlow.d.ts +0 -1
- package/dist/incode-welcome/src/flow/getFlow.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/AESignature.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Address.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Antifraud.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Authentication.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/BAV.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/CertificateIssuance.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/CombinedConsent.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Conference.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/CrossDocumentDataMatch.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Curp.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/CustomFields.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/DocumentCapture.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Ekyb.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Ekyc.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Email.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/FaceMatch.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/FieldComparison.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/FiscalQR.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Forms.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Geolocation.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/IDOCR.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Id.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/IneCheck.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/MLConsent.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/NFCScan.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/NameCapture.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Phone.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/QESignature.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/SecondId.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Selfie.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/ShowResults.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Signature.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Skip.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/ThirdId.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/TrustGraph.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/UserConsent.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/VideoSelfie.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/Watchlists.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/index.d.ts +0 -1
- package/dist/incode-welcome/src/flow/modules/types.d.ts +0 -1
- package/dist/incode-welcome/src/flow/services/defaultFlow.d.ts +0 -1
- package/dist/incode-welcome/src/flow/services/flowService.d.ts +0 -1
- package/dist/incode-welcome/src/flow/types.d.ts +0 -1
- package/dist/incode-welcome/src/flow/useFlow.d.ts +0 -1
- package/dist/incode-welcome/src/forms/Forms.d.ts +0 -1
- package/dist/incode-welcome/src/forms/Screen.d.ts +0 -1
- package/dist/incode-welcome/src/forms/renderForms.d.ts +0 -1
- package/dist/incode-welcome/src/geolocation/Geolocation.d.ts +0 -1
- package/dist/incode-welcome/src/geolocation/components/GeolocationPermissionAndroidSteps/GeolocationPermissionAndroidSteps.d.ts +0 -1
- package/dist/incode-welcome/src/geolocation/components/GeolocationPermissioniOSSteps/GeolocationPermissioniOSSteps.d.ts +0 -1
- package/dist/incode-welcome/src/geolocation/components/RenderSteps.d.ts +0 -1
- package/dist/incode-welcome/src/geolocation/types.d.ts +0 -1
- package/dist/incode-welcome/src/getOnboardingStatus.d.ts +0 -1
- package/dist/incode-welcome/src/getPhone.d.ts +0 -1
- package/dist/incode-welcome/src/getScore.d.ts +0 -1
- package/dist/incode-welcome/src/getTheme.d.ts +0 -1
- package/dist/incode-welcome/src/ine/IneCheck.d.ts +0 -1
- package/dist/incode-welcome/src/manualIdUpload/manuaIdUpload.d.ts +0 -1
- package/dist/incode-welcome/src/mdoc/mDoc.d.ts +0 -1
- package/dist/incode-welcome/src/mediaRecorder/DeepsightVideoRecorder.d.ts +0 -1
- package/dist/incode-welcome/src/mediaRecorder/uploadDeepsightVideo.d.ts +0 -1
- package/dist/incode-welcome/src/network/api.d.ts +0 -1
- package/dist/incode-welcome/src/network/createApi.d.ts +0 -1
- package/dist/incode-welcome/src/ocrData.d.ts +0 -1
- package/dist/incode-welcome/src/options.d.ts +0 -1
- package/dist/incode-welcome/src/permissions/Denied.d.ts +0 -1
- package/dist/incode-welcome/src/permissions/DeniedAndroid.d.ts +0 -1
- package/dist/incode-welcome/src/permissions/DeniedDesktop.d.ts +0 -1
- package/dist/incode-welcome/src/permissions/DeniedInstructions.d.ts +0 -1
- package/dist/incode-welcome/src/permissions/DeniediOS.d.ts +0 -1
- package/dist/incode-welcome/src/permissions/LearnMore.d.ts +0 -1
- package/dist/incode-welcome/src/permissions/NumberedStep.d.ts +0 -1
- package/dist/incode-welcome/src/permissions/Permissions.d.ts +0 -1
- package/dist/incode-welcome/src/permissions/Requesting.d.ts +0 -1
- package/dist/incode-welcome/src/qrScanner/QrScanner.d.ts +0 -1
- package/dist/incode-welcome/src/qrScanner/types.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/ConsentInstructions.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/IdCapture.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/OpenViduVideoSelfie.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/QuestionsMask.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/SelfieCapture.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/SelfieMask.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/SpeechMask.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/StepsHeader.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/addCapturingEvents.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/backCapture.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/faceCapture.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/frontCapture.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/imgs/LockIcon.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/logVideoSelfieEvent.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/openvidu.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/useDetectId.d.ts +0 -1
- package/dist/incode-welcome/src/recorder/useDetectSelfie.d.ts +0 -1
- package/dist/incode-welcome/src/redirect/FlowRedirect.d.ts +0 -1
- package/dist/incode-welcome/src/redirect/PhishingResistanceScreen.d.ts +0 -1
- package/dist/incode-welcome/src/redirect/Qr.d.ts +0 -1
- package/dist/incode-welcome/src/redirect/Redirect.d.ts +0 -1
- package/dist/incode-welcome/src/redirect/useFlowRedirect.d.ts +0 -1
- package/dist/incode-welcome/src/redirect/useQR.d.ts +0 -1
- package/dist/incode-welcome/src/renderCamera.d.ts +0 -1
- package/dist/incode-welcome/src/renderDocumentSelector.d.ts +0 -1
- package/dist/incode-welcome/src/renderEmail.d.ts +0 -1
- package/dist/incode-welcome/src/renderQr.d.ts +0 -1
- package/dist/incode-welcome/src/renderRedirectToMobile.d.ts +0 -1
- package/dist/incode-welcome/src/renderWatchList.d.ts +0 -1
- package/dist/incode-welcome/src/results/Results.d.ts +0 -1
- package/dist/incode-welcome/src/retries/RetrySteps.d.ts +0 -1
- package/dist/incode-welcome/src/retries/renderRetrySteps.d.ts +0 -1
- package/dist/incode-welcome/src/risk/enableDeviceRiskModule.d.ts +0 -1
- package/dist/incode-welcome/src/setup.d.ts +0 -1
- package/dist/incode-welcome/src/setupTests.d.ts +0 -1
- package/dist/incode-welcome/src/signature/Signature.d.ts +0 -1
- package/dist/incode-welcome/src/signature/renderSignature.d.ts +0 -1
- package/dist/incode-welcome/src/testUtils/setup.d.ts +0 -1
- package/dist/incode-welcome/src/theme.d.ts +0 -1
- package/dist/incode-welcome/src/tutorials/TutorialFront.d.ts +0 -1
- package/dist/incode-welcome/src/tutorials/TutorialPapperDL.d.ts +0 -1
- package/dist/incode-welcome/src/ui/BoldWithArrow.d.ts +0 -1
- package/dist/incode-welcome/src/ui/Button.d.ts +0 -1
- package/dist/incode-welcome/src/ui/Card.d.ts +0 -1
- package/dist/incode-welcome/src/ui/Container.d.ts +0 -1
- package/dist/incode-welcome/src/ui/ErrorIcon.d.ts +0 -1
- package/dist/incode-welcome/src/ui/FlowPage.d.ts +0 -1
- package/dist/incode-welcome/src/ui/H2.d.ts +0 -1
- package/dist/incode-welcome/src/ui/Modal.d.ts +0 -1
- package/dist/incode-welcome/src/ui/Title.d.ts +0 -1
- package/dist/incode-welcome/src/ui/assets/ArrowRightIcon.d.ts +0 -1
- package/dist/incode-welcome/src/ui/errors/assets/NoInternetIcon.d.ts +0 -1
- package/dist/incode-welcome/src/ui/index.d.ts +0 -1
- package/dist/incode-welcome/src/ui/tutorials/BaseTutorial.d.ts +0 -1
- package/dist/incode-welcome/src/ui/types.d.ts +0 -1
- package/dist/incode-welcome/src/ui/utils/mergeUiConfig.d.ts +0 -1
- package/dist/incode-welcome/src/updateSession.d.ts +0 -1
- package/dist/incode-welcome/src/userData/UserData.d.ts +0 -1
- package/dist/incode-welcome/src/utils/faceErrorMessages.d.ts +0 -1
- package/dist/incode-welcome/src/wasmUtils/config.d.ts +0 -1
- package/dist/incode-welcome/src/wasmUtils/mlWasmJSApi.d.ts +0 -1
- package/dist/incode-welcome/src/wasmUtils/pipelineProfile.d.ts +0 -1
- package/dist/incode-welcome/src/wasmUtils/pipelinesConfig.d.ts +0 -1
- package/dist/incode-welcome/src/watchList/CustomWatchList.d.ts +0 -1
- package/dist/incode-welcome/src/watchList/GlobalWatchList.d.ts +0 -1
- package/dist/incode-welcome/src/watchList/index.d.ts +0 -1
- package/dist/incode-welcome/src/watchList/loader/Loader.d.ts +0 -1
- package/dist/incode-welcome/src/watchList/types.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/Workflow.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/api/getCurrentNode.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/api/processCustomNode.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/components/ScrollWrapper.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/executeWorkflow.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/hooks/assets.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Address.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/AdvancedElectronicSignature.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/AsyncFinishScreen.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/BiometricConsent.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/CombinedConsent.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Curp.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/CustomModule.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/DocumentCapture.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Ekyb.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Ekyc.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Email.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/FaceAuthentication.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/FaceMatch.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/FinishScreen.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Forms.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Geolocation.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/GovernmentValidation.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/IDCapture.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/OcrData.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Phone.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/PrivacyConsent.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/ProcessID.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/QualifiedElectronicSignature.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Selfie.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/Signature.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/VideoSelfie.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/modules/WatchList.d.ts +0 -1
- package/dist/incode-welcome/src/workflows/types.d.ts +0 -1
- package/dist/incode-welcome/tests/integration/renderWatchlist.test.d.ts +0 -1
- package/dist/onBoarding.mjs +302 -158
- package/dist/onBoarding.umd.js +5 -5
- package/package.json +4 -5
package/dist/onBoarding.umd.js
CHANGED
|
@@ -63,7 +63,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[St]+=1);const breakpoints$3={
|
|
|
63
63
|
justify-content: center;
|
|
64
64
|
align-items: center;
|
|
65
65
|
flex-direction: column;
|
|
66
|
-
`;typeof Promise.withResolvers!="function"&&(Promise.withResolvers=()=>{let Be,Le;return{promise:new Promise((tt,nt)=>{Be=tt,Le=nt}),resolve:Be,reject:Le}});class InterruptionHandler{constructor(){this.boundVisibilityChange=this.handleVisibilityChange.bind(this),this.boundOnline=this.handleOnline.bind(this),this.boundOffline=this.handleOffline.bind(this),this.boundUnhandledRejection=this.handleUnhandledRejection.bind(this),this.boundError=this.handleError.bind(this),this.initialized=!1}registerEventListeners(){this.initialized||(document.addEventListener("visibilitychange",this.boundVisibilityChange),window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline),window.addEventListener("unhandledrejection",this.boundUnhandledRejection),window.addEventListener("error",this.boundError),this.initialized=!0)}removeEventListeners(){this.initialized&&(this.initialized=!1,document.removeEventListener("visibilitychange",this.boundVisibilityChange),window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),window.removeEventListener("unhandledrejection",this.boundUnhandledRejection),window.removeEventListener("error",this.boundError))}handleVisibilityChange(){document.hidden?this.onAppHidden():this.onAppVisible()}onAppHidden(){}onAppVisible(){}handleOnline(){}handleOffline(){}handleUnhandledRejection(Le){}handleError(Le){}}const regex$1={CURP_PATTERN:/^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/,EMAIL_PATTERN:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,SSN_PATTERN:/^\d{3}-?\d{2}-?\d{4}$/};function webgl(){let Be,Le,Ye=256,tt=128;Be=document.body.appendChild(document.createElement("canvas")),Be.width=Ye,Be.height=tt;try{Le=Be.getContext("webgl2")||Be.getContext("experimental-webgl2")||Be.getContext("webgl")||Be.getContext("experimental-webgl")||Be.getContext("moz-webgl");const nt="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",ft="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",ht=Le.createBuffer();Le.bindBuffer(Le.ARRAY_BUFFER,ht);const gt=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.7321,0]);Le.bufferData(Le.ARRAY_BUFFER,gt,Le.STATIC_DRAW),ht.itemSize=3,ht.numItems=3;const At=Le.createProgram(),xt=Le.createShader(Le.VERTEX_SHADER);Le.shaderSource(xt,nt),Le.compileShader(xt);const Et=Le.createShader(Le.FRAGMENT_SHADER);Le.shaderSource(Et,ft),Le.compileShader(Et),Le.attachShader(At,xt),Le.attachShader(At,Et),Le.linkProgram(At),Le.useProgram(At),At.vertexPosAttrib=Le.getAttribLocation(At,"attrVertex"),At.offsetUniform=Le.getUniformLocation(At,"uniformOffset"),Le.enableVertexAttribArray(At.vertexPosAttrib),Le.vertexAttribPointer(At.vertexPosAttrib,ht.itemSize,Le.FLOAT,!1,0,0),Le.uniform2f(At.offsetUniform,1,1),Le.drawArrays(Le.TRIANGLE_STRIP,0,ht.numItems);let yt="";const Ct=new Uint8Array(Ye*tt*4);return Le.readPixels(0,0,Ye,tt,Le.RGBA,Le.UNSIGNED_BYTE,Ct),yt=JSON.stringify(Ct).replace(/,?"[0-9]+":/g,""),document.body.removeChild(Be),sha256(yt)}catch{return""}}const sha256=(()=>{let Be=1,Le,Ye=[],tt=[];for(;++Be<18;)for(Le=Be*Be;Le<312;Le+=Be)Ye[Le]=1;function nt(gt,At){return Math.pow(gt,1/At)%1*4294967296|0}for(Be=1,Le=0;Be<313;)Ye[++Be]||(tt[Le]=nt(Be,2),Ye[Le++]=nt(Be,3));function ft(gt,At){return gt>>>At|gt<<32-At}function ht(gt){let At=tt.slice(Be=0),xt=unescape(encodeURI(gt)),Et=[],yt=xt.length,Ct=[],kt,vt,bt;for(;Be<yt;)Ct[Be>>2]|=(xt.charCodeAt(Be)&255)<<8*(3-Be++%4);for(yt*=8,Ct[yt>>5]|=128<<24-yt%32,Ct[bt=yt+64>>5|15]=yt,Be=0;Be<bt;Be+=16){for(kt=At.slice(Le=0,8);Le<64;kt[4]+=vt)Le<16?Et[Le]=Ct[Le+Be]:Et[Le]=(ft(vt=Et[Le-2],17)^ft(vt,19)^vt>>>10)+(Et[Le-7]|0)+(ft(vt=Et[Le-15],7)^ft(vt,18)^vt>>>3)+(Et[Le-16]|0),kt.unshift((vt=(kt.pop()+(ft(gt=kt[4],6)^ft(gt,11)^ft(gt,25))+((gt&kt[5]^~gt&kt[6])+Ye[Le])|0)+(Et[Le++]|0))+(ft(yt=kt[0],2)^ft(yt,13)^ft(yt,22))+(yt&kt[1]^kt[1]&kt[2]^kt[2]&yt));for(Le=8;Le--;)At[Le]=kt[Le]+At[Le]}for(xt="";Le<63;)xt+=(At[++Le>>3]>>4*(7-Le%8)&15).toString(16);return xt}return ht})();var store;function getGlobalConfig(Be){return{lang:store==null?void 0:store.lang,message:Be==null?void 0:Be.message,abortEarly:store==null?void 0:store.abortEarly,abortPipeEarly:store==null?void 0:store.abortPipeEarly}}var store2;function getGlobalMessage(Be){return store2==null?void 0:store2.get(Be)}var store3;function getSchemaMessage(Be){return store3==null?void 0:store3.get(Be)}var store4;function getSpecificMessage(Be,Le){var Ye;return(Ye=store4==null?void 0:store4.get(Be))==null?void 0:Ye.get(Le)}function _stringify$3(Be){var Ye,tt;const Le=typeof Be;return Le==="string"?`"${Be}"`:Le==="number"||Le==="bigint"||Le==="boolean"?`${Be}`:Le==="object"||Le==="function"?(Be&&((tt=(Ye=Object.getPrototypeOf(Be))==null?void 0:Ye.constructor)==null?void 0:tt.name))??"null":Le}function _addIssue(Be,Le,Ye,tt,nt){const ft=nt&&"input"in nt?nt.input:Ye.value,ht=(nt==null?void 0:nt.expected)??Be.expects??null,gt=(nt==null?void 0:nt.received)??_stringify$3(ft),At={kind:Be.kind,type:Be.type,input:ft,expected:ht,received:gt,message:`Invalid ${Le}: ${ht?`Expected ${ht} but r`:"R"}eceived ${gt}`,requirement:Be.requirement,path:nt==null?void 0:nt.path,issues:nt==null?void 0:nt.issues,lang:tt.lang,abortEarly:tt.abortEarly,abortPipeEarly:tt.abortPipeEarly},xt=Be.kind==="schema",Et=(nt==null?void 0:nt.message)??Be.message??getSpecificMessage(Be.reference,At.lang)??(xt?getSchemaMessage(At.lang):null)??tt.message??getGlobalMessage(At.lang);Et!==void 0&&(At.message=typeof Et=="function"?Et(At):Et),xt&&(Ye.typed=!1),Ye.issues?Ye.issues.push(At):Ye.issues=[At]}function _getStandardProps(Be){return{version:1,vendor:"valibot",validate(Le){return Be["~run"]({value:Le},getGlobalConfig())}}}function _isValidObjectKey(Be,Le){return Object.hasOwn(Be,Le)&&Le!=="__proto__"&&Le!=="prototype"&&Le!=="constructor"}function _joinExpects(Be,Le){const Ye=[...new Set(Be)];return Ye.length>1?`(${Ye.join(` ${Le} `)})`:Ye[0]??"never"}function isValiError(Be){return Be instanceof ValiError}var ValiError=class extends Error{constructor(Be){super(Be[0].message),this.name="ValiError",this.issues=Be}};function getFallback(Be,Le,Ye){return typeof Be.fallback=="function"?Be.fallback(Le,Ye):Be.fallback}function getDefault(Be,Le,Ye){return typeof Be.default=="function"?Be.default(Le,Ye):Be.default}function boolean$2(Be){return{kind:"schema",type:"boolean",reference:boolean$2,expects:"boolean",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="boolean"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function custom(Be,Le){return{kind:"schema",type:"custom",reference:custom,expects:"unknown",async:!1,check:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return this.check(Ye.value)?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function function_(Be){return{kind:"schema",type:"function",reference:function_,expects:"Function",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="function"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function literal(Be,Le){return{kind:"schema",type:"literal",reference:literal,expects:_stringify$3(Be),async:!1,literal:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===this.literal?Ye.typed=!0:_addIssue(this,"type",Ye,tt),Ye}}}function null_(Be){return{kind:"schema",type:"null",reference:null_,expects:"null",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return Le.value===null?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function number$3(Be){return{kind:"schema",type:"number",reference:number$3,expects:"number",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="number"&&!isNaN(Le.value)?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function object(Be,Le){return{kind:"schema",type:"object",reference:object,expects:"Object",async:!1,entries:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){var ft;const nt=Ye.value;if(nt&&typeof nt=="object"){Ye.typed=!0,Ye.value={};for(const ht in this.entries){const gt=this.entries[ht];if(ht in nt||(gt.type==="exact_optional"||gt.type==="optional"||gt.type==="nullish")&>.default!==void 0){const At=ht in nt?nt[ht]:getDefault(gt),xt=gt["~run"]({value:At},tt);if(xt.issues){const Et={type:"object",origin:"value",input:nt,key:ht,value:At};for(const yt of xt.issues)yt.path?yt.path.unshift(Et):yt.path=[Et],(ft=Ye.issues)==null||ft.push(yt);if(Ye.issues||(Ye.issues=xt.issues),tt.abortEarly){Ye.typed=!1;break}}xt.typed||(Ye.typed=!1),Ye.value[ht]=xt.value}else if(gt.fallback!==void 0)Ye.value[ht]=getFallback(gt);else if(gt.type!=="exact_optional"&>.type!=="optional"&>.type!=="nullish"&&(_addIssue(this,"key",Ye,tt,{input:void 0,expected:`"${ht}"`,path:[{type:"object",origin:"key",input:nt,key:ht,value:nt[ht]}]}),tt.abortEarly))break}}else _addIssue(this,"type",Ye,tt);return Ye}}}function optional(Be,Le){return{kind:"schema",type:"optional",reference:optional,expects:`(${Be.expects} | undefined)`,async:!1,wrapped:Be,default:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===void 0&&(this.default!==void 0&&(Ye.value=getDefault(this,Ye,tt)),Ye.value===void 0)?(Ye.typed=!0,Ye):this.wrapped["~run"](Ye,tt)}}}function record(Be,Le,Ye){return{kind:"schema",type:"record",reference:record,expects:"Object",async:!1,key:Be,value:Le,message:Ye,get"~standard"(){return _getStandardProps(this)},"~run"(tt,nt){var ht,gt;const ft=tt.value;if(ft&&typeof ft=="object"){tt.typed=!0,tt.value={};for(const At in ft)if(_isValidObjectKey(ft,At)){const xt=ft[At],Et=this.key["~run"]({value:At},nt);if(Et.issues){const Ct={type:"object",origin:"key",input:ft,key:At,value:xt};for(const kt of Et.issues)kt.path=[Ct],(ht=tt.issues)==null||ht.push(kt);if(tt.issues||(tt.issues=Et.issues),nt.abortEarly){tt.typed=!1;break}}const yt=this.value["~run"]({value:xt},nt);if(yt.issues){const Ct={type:"object",origin:"value",input:ft,key:At,value:xt};for(const kt of yt.issues)kt.path?kt.path.unshift(Ct):kt.path=[Ct],(gt=tt.issues)==null||gt.push(kt);if(tt.issues||(tt.issues=yt.issues),nt.abortEarly){tt.typed=!1;break}}(!Et.typed||!yt.typed)&&(tt.typed=!1),Et.typed&&(tt.value[Et.value]=yt.value)}}else _addIssue(this,"type",tt,nt);return tt}}}function string$2(Be){return{kind:"schema",type:"string",reference:string$2,expects:"string",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="string"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}function _subIssues(Be){let Le;if(Be)for(const Ye of Be)Le?Le.push(...Ye.issues):Le=Ye.issues;return Le}function union(Be,Le){return{kind:"schema",type:"union",reference:union,expects:_joinExpects(Be.map(Ye=>Ye.expects),"|"),async:!1,options:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){let nt,ft,ht;for(const gt of this.options){const At=gt["~run"]({value:Ye.value},tt);if(At.typed)if(At.issues)ft?ft.push(At):ft=[At];else{nt=At;break}else ht?ht.push(At):ht=[At]}if(nt)return nt;if(ft){if(ft.length===1)return ft[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ft)}),Ye.typed=!0}else{if((ht==null?void 0:ht.length)===1)return ht[0];_addIssue(this,"type",Ye,tt,{issues:_subIssues(ht)})}return Ye}}}function parse$8(Be,Le,Ye){const tt=Be["~run"]({value:Le},getGlobalConfig(Ye));if(tt.issues)throw new ValiError(tt.issues);return tt.value}function validate$2(...Be){try{Be.forEach(({schema:Le,value:Ye})=>parse$8(Le,Ye))}catch(Le){if(isValiError(Le)){const Ye=Le.issues.map(tt=>{var ft;return`${((ft=tt.path)==null?void 0:ft.map(ht=>ht.key).join("."))||"root"}: ${tt.message}`}).join(", ");throw new Error(`Validation failed: ${Ye}`)}throw Le}}exports.api=void 0;function setApi(Be){exports.api=Be}function setToken(Be){exports.api.defaults.headers["X-Incode-Hardware-Id"]=Be}const eventsQueue=[];function addEvent(Be){const{token:Le,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Be;if(!Le){eventsQueue.push(Be);return}return exports.api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Le}}).catch(()=>{})}function emptyQueue(Be){eventsQueue.forEach(Le=>{addEvent({...Le,token:Be})})}const state={token:null};var PipelineProfileName=(Be=>(Be[Be.IdCapture_2_01=0]="IdCapture_2_01",Be[Be.IdCapture_2_02=1]="IdCapture_2_02",Be[Be.IdCapture_3_02=2]="IdCapture_3_02",Be[Be.IdVideoSelfie_2_01=3]="IdVideoSelfie_2_01",Be[Be.SelfieWithAggregationMetrics=4]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=5]="SelfieWithQualityMetrics",Be[Be.SelfieVideoSelfie=6]="SelfieVideoSelfie",Be))(PipelineProfileName||{});class PipelineProfile{constructor(Le,Ye,tt,nt,ft,ht=null,gt=""){this.pipelineType=Le,this.name=Ye,this.detectionType=tt,this.modelNames=nt,this.parameters=ft,this.paramsConfigurator=ht,this.description=gt}reconfigureParams(Le,Ye){if(this.paramsConfigurator==null)throw new Error("PipelineProfile does not have a paramsConfigurator");this.paramsConfigurator(this.parameters,this.pipelineType,Le,Ye)}}var DetectionType=(Be=>(Be[Be.IDCapture=0]="IDCapture",Be[Be.Selfie=1]="Selfie",Be[Be.SelfieVideoSelfie=2]="SelfieVideoSelfie",Be[Be.IdVideoSelfie=3]="IdVideoSelfie",Be))(DetectionType||{}),WasmPipelineType=(Be=>(Be[Be.IdBlurGlarePipeline=0]="IdBlurGlarePipeline",Be[Be.IdBarcodeAndTextQualityPipeline=1]="IdBarcodeAndTextQualityPipeline",Be[Be.IdVideoSelfiePipeline=2]="IdVideoSelfiePipeline",Be[Be.SelfieWithAggregationMetrics=3]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=4]="SelfieWithQualityMetrics",Be[Be.IdFaceDetectionPipeline=5]="IdFaceDetectionPipeline",Be))(WasmPipelineType||{}),IdCaptureModelType=(Be=>(Be[Be.IdCaptureV1x=0]="IdCaptureV1x",Be[Be.IdCaptureV2x=1]="IdCaptureV2x",Be[Be.IdCaptureV3x=2]="IdCaptureV3x",Be))(IdCaptureModelType||{}),src$2={},src$1={},$_StatsigGlobal={},Log={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Log=Be.LogLevel=void 0;const Le=" DEBUG ",Ye=" INFO ",tt=" WARN ",nt=" ERROR ";function ft(gt){return gt.unshift("[Statsig]"),gt}Be.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class ht{static info(...At){ht.level>=Be.LogLevel.Info&&console.info(Ye,...ft(At))}static debug(...At){ht.level>=Be.LogLevel.Debug&&console.debug(Le,...ft(At))}static warn(...At){ht.level>=Be.LogLevel.Warn&&console.warn(tt,...ft(At))}static error(...At){ht.level>=Be.LogLevel.Error&&console.error(nt,...ft(At))}}Be.Log=ht,ht.level=Be.LogLevel.Warn})(Log),function(Be){var Le,Ye,tt;Object.defineProperty(Be,"__esModule",{value:!0}),Be._getInstance=Be._getStatsigGlobalFlag=Be._getStatsigGlobal=void 0;const nt=Log,ft=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:Ct}catch{return Ct}};Be._getStatsigGlobal=ft;const ht=kt=>(0,Be._getStatsigGlobal)()[kt];Be._getStatsigGlobalFlag=ht;const gt=kt=>{const vt=(0,Be._getStatsigGlobal)();return kt?vt.instances&&vt.instances[kt]:(vt.instances&&Object.keys(vt.instances).length>1&&nt.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),vt.firstInstance)};Be._getInstance=gt;const At="__STATSIG__",xt=typeof window<"u"?window:{},Et=typeof commonjsGlobal<"u"?commonjsGlobal:{},yt=typeof globalThis<"u"?globalThis:{},Ct=(tt=(Ye=(Le=xt[At])!==null&&Le!==void 0?Le:Et[At])!==null&&Ye!==void 0?Ye:yt[At])!==null&&tt!==void 0?tt:{instance:Be._getInstance};xt[At]=Ct,Et[At]=Ct,yt[At]=Ct}($_StatsigGlobal);var Diagnostics={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Diagnostics=void 0;const Le=new Map,Ye="start",tt="end",nt="statsig::diagnostics";Be.Diagnostics={_getMarkers:xt=>Le.get(xt),_markInitOverallStart:xt=>{gt(xt,ft({},Ye,"overall"))},_markInitOverallEnd:(xt,Et,yt)=>{gt(xt,ft({success:Et,error:Et?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:yt},tt,"overall"))},_markInitNetworkReqStart:(xt,Et)=>{gt(xt,ft(Et,Ye,"initialize","network_request"))},_markInitNetworkReqEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","network_request"))},_markInitProcessStart:xt=>{gt(xt,ft({},Ye,"initialize","process"))},_markInitProcessEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","process"))},_clearMarkers:xt=>{Le.delete(xt)},_formatError(xt){if(xt&&typeof xt=="object")return{code:At(xt,"code"),name:At(xt,"name"),message:At(xt,"message")}},_getDiagnosticsData(xt,Et,yt,Ct){var kt;return{success:(xt==null?void 0:xt.ok)===!0,statusCode:xt==null?void 0:xt.status,sdkRegion:(kt=xt==null?void 0:xt.headers)===null||kt===void 0?void 0:kt.get("x-statsig-region"),isDelta:yt.includes('"is_delta":true')===!0?!0:void 0,attempt:Et,error:Be.Diagnostics._formatError(Ct)}},_enqueueDiagnosticsEvent(xt,Et,yt,Ct){const kt=Be.Diagnostics._getMarkers(yt);if(kt==null||kt.length<=0)return-1;const vt=kt[kt.length-1].timestamp-kt[0].timestamp;Be.Diagnostics._clearMarkers(yt);const bt=ht(xt,{context:"initialize",markers:kt.slice(),statsigOptions:Ct});return Et.enqueue(bt),vt}};function ft(xt,Et,yt,Ct){return Object.assign({key:yt,action:Et,step:Ct,timestamp:Date.now()},xt)}function ht(xt,Et){return{eventName:nt,user:xt,value:null,metadata:Et,time:Date.now()}}function gt(xt,Et){var yt;const Ct=(yt=Le.get(xt))!==null&&yt!==void 0?yt:[];Ct.push(Et),Le.set(xt,Ct)}function At(xt,Et){if(Et in xt)return xt[Et]}})(Diagnostics);var EventLogger$1={},CacheKey={},Hashing={},TypingUtils={};Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0;function _typeOf(Be){return Array.isArray(Be)?"array":typeof Be}TypingUtils._typeOf=_typeOf;function _isTypeMatch(Be,Le){const Ye=tt=>Array.isArray(tt)?"array":tt===null?"null":typeof tt;return Ye(Be)===Ye(Le)}TypingUtils._isTypeMatch=_isTypeMatch,function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getSortedObject=Be._DJB2Object=Be._DJB2=void 0;const Le=TypingUtils,Ye=ft=>{let ht=0;for(let gt=0;gt<ft.length;gt++){const At=ft.charCodeAt(gt);ht=(ht<<5)-ht+At,ht=ht&ht}return String(ht>>>0)};Be._DJB2=Ye;const tt=(ft,ht)=>(0,Be._DJB2)(JSON.stringify((0,Be._getSortedObject)(ft,ht)));Be._DJB2Object=tt;const nt=(ft,ht)=>{if(ft==null)return null;const gt=Object.keys(ft).sort(),At={};return gt.forEach(xt=>{const Et=ft[xt];if(ht===0||(0,Le._typeOf)(Et)!=="object"){At[xt]=Et;return}At[xt]=(0,Be._getSortedObject)(Et,ht!=null?ht-1:ht)}),At};Be._getSortedObject=nt}(Hashing),Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const Hashing_1$4=Hashing;function _getUserStorageKey(Be,Le,Ye){var tt;if(Ye)return Ye(Be,Le);const nt=Le&&Le.customIDs?Le.customIDs:{},ft=[`uid:${(tt=Le==null?void 0:Le.userID)!==null&&tt!==void 0?tt:""}`,`cids:${Object.keys(nt).sort((ht,gt)=>ht.localeCompare(gt)).map(ht=>`${ht}-${nt[ht]}`).join(",")}`,`k:${Be}`];return(0,Hashing_1$4._DJB2)(ft.join("|"))}CacheKey._getUserStorageKey=_getUserStorageKey;function _getStorageKey(Be,Le,Ye){return Le?_getUserStorageKey(Be,Le,Ye):(0,Hashing_1$4._DJB2)(`k:${Be}`)}CacheKey._getStorageKey=_getStorageKey;var NetworkConfig={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.NetworkParam=Be.NetworkDefault=Be.Endpoint=void 0,Be.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},Be.NetworkDefault={[Be.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[Be.Endpoint._initialize]:"https://featureassets.org/v1",[Be.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},Be.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(NetworkConfig);var SafeJs={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getUnloadEvent=Be._getCurrentPageUrlSafe=Be._addDocumentEventListenerSafe=Be._addWindowEventListenerSafe=Be._isServerEnv=Be._getDocumentSafe=Be._getWindowSafe=void 0;const Le=()=>typeof window<"u"?window:null;Be._getWindowSafe=Le;const Ye=()=>{var At;const xt=(0,Be._getWindowSafe)();return(At=xt==null?void 0:xt.document)!==null&&At!==void 0?At:null};Be._getDocumentSafe=Ye;const tt=()=>{if((0,Be._getDocumentSafe)()!==null)return!1;const At=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||At};Be._isServerEnv=tt;const nt=(At,xt)=>{const Et=(0,Be._getWindowSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addWindowEventListenerSafe=nt;const ft=(At,xt)=>{const Et=(0,Be._getDocumentSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addDocumentEventListenerSafe=ft;const ht=()=>{var At;try{return(At=(0,Be._getWindowSafe)())===null||At===void 0?void 0:At.location.href.split(/[?#]/)[0]}catch{return}};Be._getCurrentPageUrlSafe=ht;const gt=()=>{const At=(0,Be._getWindowSafe)();return At&&"onpagehide"in At?"pagehide":"beforeunload"};Be._getUnloadEvent=gt})(SafeJs);var StatsigEvent={};Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const CONFIG_EXPOSURE_NAME="statsig::config_exposure",GATE_EXPOSURE_NAME="statsig::gate_exposure",LAYER_EXPOSURE_NAME="statsig::layer_exposure",_createExposure=(Be,Le,Ye,tt,nt)=>(Ye.bootstrapMetadata&&(tt.bootstrapMetadata=Ye.bootstrapMetadata),{eventName:Be,user:Le,value:null,metadata:_addEvaluationDetailsToMetadata(Ye,tt),secondaryExposures:nt,time:Date.now()}),_isExposureEvent=({eventName:Be})=>Be===GATE_EXPOSURE_NAME||Be===CONFIG_EXPOSURE_NAME||Be===LAYER_EXPOSURE_NAME;StatsigEvent._isExposureEvent=_isExposureEvent;const _createGateExposure=(Be,Le,Ye)=>{var tt,nt,ft;const ht={gate:Le.name,gateValue:String(Le.value),ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(ht.configVersion=Le.__evaluation.version),_createExposure(GATE_EXPOSURE_NAME,Be,Le.details,ht,_mapExposures((ft=(nt=Le.__evaluation)===null||nt===void 0?void 0:nt.secondary_exposures)!==null&&ft!==void 0?ft:[],Ye))};StatsigEvent._createGateExposure=_createGateExposure;function _mapExposures(Be,Le){return Be.map(Ye=>typeof Ye=="string"?(Le??{})[Ye]:Ye).filter(Ye=>Ye!=null)}StatsigEvent._mapExposures=_mapExposures;const _createConfigExposure=(Be,Le,Ye)=>{var tt,nt,ft,ht;const gt={config:Le.name,ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(gt.configVersion=Le.__evaluation.version),((nt=Le.__evaluation)===null||nt===void 0?void 0:nt.passed)!=null&&(gt.rulePassed=String(Le.__evaluation.passed)),_createExposure(CONFIG_EXPOSURE_NAME,Be,Le.details,gt,_mapExposures((ht=(ft=Le.__evaluation)===null||ft===void 0?void 0:ft.secondary_exposures)!==null&&ht!==void 0?ht:[],Ye))};StatsigEvent._createConfigExposure=_createConfigExposure;const _createLayerParameterExposure=(Be,Le,Ye,tt)=>{var nt,ft,ht,gt,At,xt,Et;const yt=Le.__evaluation,Ct=((nt=yt==null?void 0:yt.explicit_parameters)===null||nt===void 0?void 0:nt.includes(Ye))===!0;let kt="",vt=(ft=yt==null?void 0:yt.undelegated_secondary_exposures)!==null&&ft!==void 0?ft:[];Ct&&(kt=(ht=yt.allocated_experiment_name)!==null&&ht!==void 0?ht:"",vt=(gt=yt.secondary_exposures)!==null&>!==void 0?gt:[]);const bt=(At=Le.__evaluation)===null||At===void 0?void 0:At.parameter_rule_ids,It={config:Le.name,parameterName:Ye,ruleID:(xt=bt==null?void 0:bt[Ye])!==null&&xt!==void 0?xt:Le.ruleID,allocatedExperiment:kt,isExplicitParameter:String(Ct)};return((Et=Le.__evaluation)===null||Et===void 0?void 0:Et.version)!=null&&(It.configVersion=Le.__evaluation.version),_createExposure(LAYER_EXPOSURE_NAME,Be,Le.details,It,_mapExposures(vt,tt))};StatsigEvent._createLayerParameterExposure=_createLayerParameterExposure;const _addEvaluationDetailsToMetadata=(Be,Le)=>(Le.reason=Be.reason,Be.lcut&&(Le.lcut=String(Be.lcut)),Be.receivedAt&&(Le.receivedAt=String(Be.receivedAt)),Le);var StatsigOptionsCommon={};Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"};var StorageProvider={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._setObjectInStorage=Be._getObjectFromStorage=Be.Storage=void 0;const Le=Log,Ye=SafeJs,tt={},nt={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:yt=>tt[yt]?tt[yt]:null,setItem:(yt,Ct)=>{tt[yt]=Ct},removeItem:yt=>{delete tt[yt]},getAllKeys:()=>Object.keys(tt)};let ft=null;try{const yt=(0,Ye._getWindowSafe)();yt&&yt.localStorage&&typeof yt.localStorage.getItem=="function"&&(ft={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:Ct=>yt.localStorage.getItem(Ct),setItem:(Ct,kt)=>yt.localStorage.setItem(Ct,kt),removeItem:Ct=>yt.localStorage.removeItem(Ct),getAllKeys:()=>Object.keys(yt.localStorage)})}catch{Le.Log.warn("Failed to setup localStorageProvider.")}let ht=ft??nt,gt=ht;function At(yt){try{return yt()}catch(Ct){if(Ct instanceof Error&&Ct.name==="SecurityError")return Be.Storage._setProvider(nt),null;throw Ct}}Be.Storage={isReady:()=>gt.isReady(),isReadyResolver:()=>gt.isReadyResolver(),getProviderName:()=>gt.getProviderName(),getItem:yt=>At(()=>gt.getItem(yt)),setItem:(yt,Ct)=>At(()=>gt.setItem(yt,Ct)),removeItem:yt=>gt.removeItem(yt),getAllKeys:()=>gt.getAllKeys(),_setProvider:yt=>{ht=yt,gt=yt},_setDisabled:yt=>{yt?gt=nt:gt=ht}};function xt(yt){const Ct=Be.Storage.getItem(yt);return JSON.parse(Ct??"null")}Be._getObjectFromStorage=xt;function Et(yt,Ct){Be.Storage.setItem(yt,JSON.stringify(Ct))}Be._setObjectInStorage=Et})(StorageProvider);var UrlConfiguration$1={};Object.defineProperty(UrlConfiguration$1,"__esModule",{value:!0}),UrlConfiguration$1.UrlConfiguration=void 0;const Hashing_1$3=Hashing,NetworkConfig_1$2=NetworkConfig,ENDPOINT_DNS_KEY_MAP={[NetworkConfig_1$2.Endpoint._initialize]:"i",[NetworkConfig_1$2.Endpoint._rgstr]:"e",[NetworkConfig_1$2.Endpoint._download_config_specs]:"d"};class UrlConfiguration{constructor(Le,Ye,tt,nt){this.customUrl=null,this.fallbackUrls=null,this.endpoint=Le,this.endpointDnsKey=ENDPOINT_DNS_KEY_MAP[Le],Ye&&(this.customUrl=Ye),!Ye&&tt&&(this.customUrl=tt.endsWith("/")?`${tt}${Le}`:`${tt}/${Le}`),nt&&(this.fallbackUrls=nt);const ft=NetworkConfig_1$2.NetworkDefault[Le];this.defaultUrl=`${ft}/${Le}`}getUrl(){var Le;return(Le=this.customUrl)!==null&&Le!==void 0?Le:this.defaultUrl}getChecksum(){var Le;const Ye=((Le=this.fallbackUrls)!==null&&Le!==void 0?Le:[]).sort().join(",");return(0,Hashing_1$3._DJB2)(this.customUrl+Ye)}}UrlConfiguration$1.UrlConfiguration=UrlConfiguration;var VisibilityObserving={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._notifyVisibilityChanged=Be._subscribeToVisiblityChanged=Be._isUnloading=Be._isCurrentlyVisible=void 0;const Le=SafeJs,Ye="foreground",tt="background",nt=[];let ft=Ye,ht=!1;const gt=()=>ft===Ye;Be._isCurrentlyVisible=gt;const At=()=>ht;Be._isUnloading=At;const xt=yt=>{nt.unshift(yt)};Be._subscribeToVisiblityChanged=xt;const Et=yt=>{yt!==ft&&(ft=yt,nt.forEach(Ct=>Ct(yt)))};Be._notifyVisibilityChanged=Et,(0,Le._addWindowEventListenerSafe)("focus",()=>{ht=!1,(0,Be._notifyVisibilityChanged)(Ye)}),(0,Le._addWindowEventListenerSafe)("blur",()=>(0,Be._notifyVisibilityChanged)(tt)),(0,Le._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,Be._notifyVisibilityChanged)(document.visibilityState==="visible"?Ye:tt)}),(0,Le._addWindowEventListenerSafe)((0,Le._getUnloadEvent)(),()=>{ht=!0,(0,Be._notifyVisibilityChanged)(tt)})})(VisibilityObserving);var __awaiter$f=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(EventLogger$1,"__esModule",{value:!0}),EventLogger$1.EventLogger=void 0;const CacheKey_1$1=CacheKey,Hashing_1$2=Hashing,Log_1$8=Log,NetworkConfig_1$1=NetworkConfig,SafeJs_1$3=SafeJs,StatsigEvent_1=StatsigEvent,StatsigOptionsCommon_1$2=StatsigOptionsCommon,StorageProvider_1$4=StorageProvider,UrlConfiguration_1=UrlConfiguration$1,VisibilityObserving_1$1=VisibilityObserving,DEFAULT_QUEUE_SIZE=100,DEFAULT_FLUSH_INTERVAL_MS=1e4,MAX_DEDUPER_KEYS=1e3,DEDUPER_WINDOW_DURATION_MS=6e5,MAX_FAILED_LOGS=500,QUICK_FLUSH_WINDOW_MS=200,EVENT_LOGGER_MAP={},RetryFailedLogsTrigger={Startup:"startup",GainedFocus:"gained_focus"};class EventLogger{static _safeFlushAndForget(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye.flush().catch(()=>{})}static _safeRetryFailedLogs(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye._retryFailedLogs(RetryFailedLogsTrigger.GainedFocus)}constructor(Le,Ye,tt,nt){var ft,ht;this._sdkKey=Le,this._emitter=Ye,this._network=tt,this._options=nt,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(ft=nt==null?void 0:nt.loggingEnabled)!==null&&ft!==void 0?ft:(nt==null?void 0:nt.disableLogging)===!0?StatsigOptionsCommon_1$2.LoggingEnabledOption.disabled:StatsigOptionsCommon_1$2.LoggingEnabledOption.browserOnly,nt!=null&&nt.loggingEnabled&&nt.disableLogging!==void 0&&Log_1$8.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(ht=nt==null?void 0:nt.loggingBufferMaxSize)!==null&&ht!==void 0?ht:DEFAULT_QUEUE_SIZE;const gt=nt==null?void 0:nt.networkConfig;this._logEventUrlConfig=new UrlConfiguration_1.UrlConfiguration(NetworkConfig_1$1.Endpoint._rgstr,gt==null?void 0:gt.logEventUrl,gt==null?void 0:gt.api,gt==null?void 0:gt.logEventFallbackUrls)}setLogEventCompressionMode(Le){this._network.setLogEventCompressionMode(Le)}setLoggingEnabled(Le){if(this._loggingEnabled==="disabled"&&Le!=="disabled"){const Ye=this._getStorageKey(),tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);tt&&this._queue.push(...tt),StorageProvider_1$4.Storage.removeItem(Ye)}this._loggingEnabled=Le}enqueue(Le){this._shouldLogEvent(Le)&&(this._normalizeAndAppendEvent(Le),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&EventLogger._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(Le){var Ye;const tt=(Ye=this._nonExposedChecks[Le])!==null&&Ye!==void 0?Ye:0;this._nonExposedChecks[Le]=tt+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var Le;const Ye=(0,SafeJs_1$3._isServerEnv)();Ye&&((Le=this._options)===null||Le===void 0?void 0:Le.loggingEnabled)!=="always"||(EVENT_LOGGER_MAP[this._sdkKey]=this,Ye||(0,VisibilityObserving_1$1._subscribeToVisiblityChanged)(tt=>{tt==="background"?EventLogger._safeFlushAndForget(this._sdkKey):tt==="foreground"&&EventLogger._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(RetryFailedLogsTrigger.Startup),this._startBackgroundFlushInterval())}stop(){return __awaiter$f(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete EVENT_LOGGER_MAP[this._sdkKey],yield this.flush()})}flush(){return __awaiter$f(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const Le=this._queue;this._queue=[],yield this._sendEvents(Le)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>QUICK_FLUSH_WINDOW_MS)&&setTimeout(()=>EventLogger._safeFlushAndForget(this._sdkKey),QUICK_FLUSH_WINDOW_MS))}_shouldLogEvent(Le){var Ye;if(((Ye=this._options)===null||Ye===void 0?void 0:Ye.loggingEnabled)!=="always"&&(0,SafeJs_1$3._isServerEnv)())return!1;if(!(0,StatsigEvent_1._isExposureEvent)(Le))return!0;const tt=Le.user?Le.user:{statsigEnvironment:void 0},nt=(0,CacheKey_1$1._getUserStorageKey)(this._sdkKey,tt),ft=Le.metadata?Le.metadata:{},ht=[Le.eventName,nt,ft.gate,ft.config,ft.ruleID,ft.allocatedExperiment,ft.parameterName,String(ft.isExplicitParameter),ft.reason].join("|"),gt=this._lastExposureTimeMap[ht],At=Date.now();return gt&&At-gt<DEDUPER_WINDOW_DURATION_MS?!1:(Object.keys(this._lastExposureTimeMap).length>MAX_DEDUPER_KEYS&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[ht]=At,!0)}_sendEvents(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye,tt;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(Le),!1;try{const ft=(0,VisibilityObserving_1$1._isUnloading)()&&this._network.isBeaconSupported()&&((tt=(Ye=this._options)===null||Ye===void 0?void 0:Ye.networkConfig)===null||tt===void 0?void 0:tt.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:Le}),(ft?this._sendEventsViaBeacon(Le):yield this._sendEventsViaPost(Le)).success?(this._emitter({name:"logs_flushed",events:Le}),!0):(Log_1$8.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(Le),!1)}catch{return Log_1$8.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye;const tt=yield this._network.post(this._getRequestData(Le)),nt=(Ye=tt==null?void 0:tt.code)!==null&&Ye!==void 0?Ye:-1;return{success:nt>=200&&nt<300}})}_sendEventsViaBeacon(Le){return{success:this._network.beacon(this._getRequestData(Le))}}_getRequestData(Le){return{sdkKey:this._sdkKey,data:{events:Le},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[NetworkConfig_1$1.NetworkParam.EventCount]:String(Le.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(Le){for(;Le.length>MAX_FAILED_LOGS;)Le.shift();const Ye=this._getStorageKey();try{const tt=this._getFailedLogsFromStorage(Ye);(0,StorageProvider_1$4._setObjectInStorage)(Ye,[...tt,...Le])}catch{Log_1$8.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(Le){let Ye=[];try{const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Le);return Array.isArray(tt)&&(Ye=tt),Ye}catch{return[]}}_retryFailedLogs(Le){const Ye=this._getStorageKey();__awaiter$f(this,void 0,void 0,function*(){StorageProvider_1$4.Storage.isReady()||(yield StorageProvider_1$4.Storage.isReadyResolver());const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);if(!tt)return;Le===RetryFailedLogsTrigger.Startup&&StorageProvider_1$4.Storage.removeItem(Ye),(yield this._sendEvents(tt))&&Le===RetryFailedLogsTrigger.GainedFocus&&StorageProvider_1$4.Storage.removeItem(Ye)}).catch(()=>{Log_1$8.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,Hashing_1$2._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(Le){Le.user&&(Le.user=Object.assign({},Le.user),delete Le.user.privateAttributes);const Ye={},tt=this._getCurrentPageUrl();tt&&(Ye.statsigMetadata={currentPage:tt});const nt=Object.assign(Object.assign({},Le),Ye);Log_1$8.Log.debug("Enqueued Event:",nt),this._queue.push(nt)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var Le;if(((Le=this._options)===null||Le===void 0?void 0:Le.includeCurrentPageUrlWithEvents)!==!1)return(0,SafeJs_1$3._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var Le,Ye;const tt=(Ye=(Le=this._options)===null||Le===void 0?void 0:Le.loggingIntervalMs)!==null&&Ye!==void 0?Ye:DEFAULT_FLUSH_INTERVAL_MS,nt=setInterval(()=>{const ft=EVENT_LOGGER_MAP[this._sdkKey];!ft||ft._flushIntervalId!==nt?clearInterval(nt):EventLogger._safeFlushAndForget(this._sdkKey)},tt);this._flushIntervalId=nt}}EventLogger$1.EventLogger=EventLogger;var StatsigMetadata={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigMetadataProvider=Be.SDK_VERSION=void 0,Be.SDK_VERSION="3.28.1";let Le={sdkVersion:Be.SDK_VERSION,sdkType:"js-mono"};Be.StatsigMetadataProvider={get:()=>Le,add:Ye=>{Le=Object.assign(Object.assign({},Le),Ye)}}})(StatsigMetadata);var ClientInterfaces={};Object.defineProperty(ClientInterfaces,"__esModule",{value:!0});var DataAdapterCore$1={},StableID={},UUID={};Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0;function getUUID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let Be=new Date().getTime(),Le=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,tt=>{let nt=Math.random()*16;return Be>0?(nt=(Be+nt)%16|0,Be=Math.floor(Be/16)):(nt=(Le+nt)%16|0,Le=Math.floor(Le/16)),(tt==="x"?nt:nt&7|8).toString(16)})}UUID.getUUID=getUUID,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const CacheKey_1=CacheKey,Log_1$7=Log,SafeJs_1$2=SafeJs,StorageProvider_1$3=StorageProvider,UUID_1=UUID,PROMISE_MAP={},COOKIE_ENABLED_MAP={},DISABLED_MAP={};StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:Be=>{if(DISABLED_MAP[Be])return null;if(PROMISE_MAP[Be]!=null)return PROMISE_MAP[Be];let Le=null;return Le=_loadFromCookie(Be),Le!=null?(PROMISE_MAP[Be]=Le,_persistToStorage(Le,Be),Le):(Le=_loadFromStorage(Be),Le==null&&(Le=(0,UUID_1.getUUID)()),_persistToStorage(Le,Be),_persistToCookie(Le,Be),PROMISE_MAP[Be]=Le,Le)},setOverride:(Be,Le)=>{PROMISE_MAP[Le]=Be,_persistToStorage(Be,Le),_persistToCookie(Be,Le)},_setCookiesEnabled:(Be,Le)=>{COOKIE_ENABLED_MAP[Be]=Le},_setDisabled:(Be,Le)=>{DISABLED_MAP[Be]=Le}};function _getStableIDStorageKey(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}function _persistToStorage(Be,Le){const Ye=_getStableIDStorageKey(Le);try{(0,StorageProvider_1$3._setObjectInStorage)(Ye,Be)}catch{Log_1$7.Log.warn("Failed to save StableID to storage")}}function _loadFromStorage(Be){const Le=_getStableIDStorageKey(Be);return(0,StorageProvider_1$3._getObjectFromStorage)(Le)}function _loadFromCookie(Be){if(!COOKIE_ENABLED_MAP[Be]||(0,SafeJs_1$2._getDocumentSafe)()==null)return null;const Le=document.cookie.split(";");for(const Ye of Le){const[tt,nt]=Ye.trim().split("=");if(tt===getCookieName(Be))return decodeURIComponent(nt)}return null}function _persistToCookie(Be,Le){if(!COOKIE_ENABLED_MAP[Le]||(0,SafeJs_1$2._getDocumentSafe)()==null)return;const Ye=new Date;Ye.setFullYear(Ye.getFullYear()+1),document.cookie=`${getCookieName(Le)}=${encodeURIComponent(Be)}; expires=${Ye.toUTCString()}; path=/`}function getCookieName(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}StableID.getCookieName=getCookieName;var StatsigUser={};Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const Hashing_1$1=Hashing,Log_1$6=Log;function _normalizeUser(Be,Le,Ye){try{const tt=JSON.parse(JSON.stringify(Be));return Le!=null&&Le.environment!=null?tt.statsigEnvironment=Le.environment:Ye!=null&&(tt.statsigEnvironment={tier:Ye}),tt}catch{return Log_1$6.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}StatsigUser._normalizeUser=_normalizeUser;function _getFullUserHash(Be){return Be?(0,Hashing_1$1._DJB2Object)(Be):null}StatsigUser._getFullUserHash=_getFullUserHash;var TypedJsonParse={};Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const Log_1$5=Log;function _typedJsonParse(Be,Le,Ye){try{const tt=JSON.parse(Be);if(tt&&typeof tt=="object"&&Le in tt)return tt}catch{}return Log_1$5.Log.error(`Failed to parse ${Ye}`),null}TypedJsonParse._typedJsonParse=_typedJsonParse;var __awaiter$e=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DataAdapterCore$1,"__esModule",{value:!0}),DataAdapterCore$1._makeDataAdapterResult=DataAdapterCore$1.DataAdapterCore=void 0;const Log_1$4=Log,StableID_1$2=StableID,StatsigUser_1=StatsigUser,StorageProvider_1$2=StorageProvider,TypedJsonParse_1=TypedJsonParse,CACHE_LIMIT=10,MAX_CACHE_WRITE_ATTEMPTS=8;class DataAdapterCore{constructor(Le,Ye){this._adapterName=Le,this._cacheSuffix=Ye,this._options=null,this._sdkKey=null,this._cacheLimit=CACHE_LIMIT,this._lastModifiedStoreKey=`statsig.last_modified_time.${Ye}`,this._inMemoryCache=new InMemoryCache}attach(Le,Ye,tt){this._sdkKey=Le,this._options=Ye}getDataSync(Le){const Ye=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),tt=this._getCacheKey(Ye),nt=this._inMemoryCache.get(tt,Ye);if(nt&&this._getIsCacheValueValid(nt))return nt;const ft=this._loadFromCache(tt);return ft&&this._getIsCacheValueValid(ft)?(this._inMemoryCache.add(tt,ft,this._cacheLimit),this._inMemoryCache.get(tt,Ye)):null}setData(Le,Ye){const tt=Ye&&(0,StatsigUser_1._normalizeUser)(Ye,this._options),nt=this._getCacheKey(tt);this._inMemoryCache.add(nt,_makeDataAdapterResult("Bootstrap",Le,null,tt),this._cacheLimit)}_getIsCacheValueValid(Le){return Le.stableID==null||Le.stableID===StableID_1$2.StableID.get(this._getSdkKey())}_getDataAsyncImpl(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){StorageProvider_1$2.Storage.isReady()||(yield StorageProvider_1$2.Storage.isReadyResolver());const nt=Le??this.getDataSync(Ye),ft=[this._fetchAndPrepFromNetwork(nt,Ye,tt)];return tt!=null&&tt.timeoutMs&&ft.push(new Promise(ht=>setTimeout(ht,tt.timeoutMs)).then(()=>(Log_1$4.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(ft)})}_prefetchDataImpl(Le,Ye){return __awaiter$e(this,void 0,void 0,function*(){const tt=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),nt=this._getCacheKey(tt),ft=yield this._getDataAsyncImpl(null,tt,Ye);ft&&this._inMemoryCache.add(nt,Object.assign(Object.assign({},ft),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){var nt;const ft=(nt=Le==null?void 0:Le.data)!==null&&nt!==void 0?nt:null,ht=Le!=null&&this._isCachedResultValidFor204(Le,Ye),gt=yield this._fetchFromNetwork(ft,Ye,tt,ht);if(!gt)return Log_1$4.Log.debug("No response returned for latest value"),null;const At=(0,TypedJsonParse_1._typedJsonParse)(gt,"has_updates","Response"),xt=this._getSdkKey(),Et=StableID_1$2.StableID.get(xt);let yt=null;if((At==null?void 0:At.has_updates)===!0)yt=_makeDataAdapterResult("Network",gt,Et,Ye);else if(ft&&(At==null?void 0:At.has_updates)===!1)yt=_makeDataAdapterResult("NetworkNotModified",ft,Et,Ye);else return null;const Ct=this._getCacheKey(Ye);return this._inMemoryCache.add(Ct,yt,this._cacheLimit),this._writeToCache(Ct,yt),yt})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(Log_1$4.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(Le){var Ye;const tt=(Ye=StorageProvider_1$2.Storage.getItem)===null||Ye===void 0?void 0:Ye.call(StorageProvider_1$2.Storage,Le);if(tt==null)return null;const nt=(0,TypedJsonParse_1._typedJsonParse)(tt,"source","Cached Result");return nt?Object.assign(Object.assign({},nt),{source:"Cache"}):null}_writeToCache(Le,Ye){const tt=JSON.stringify(Ye);for(let nt=0;nt<MAX_CACHE_WRITE_ATTEMPTS;nt++)try{StorageProvider_1$2.Storage.setItem(Le,tt);break}catch(ft){if(!(ft instanceof Error)||!(ft.toString().includes("QuotaExceededError")||ft.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw ft;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(Le,this._cacheLimit-1)}this._runLocalStorageCacheEviction(Le)}_runLocalStorageCacheEviction(Le,Ye=this._cacheLimit){var tt;const nt=(tt=(0,StorageProvider_1$2._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&tt!==void 0?tt:{};nt[Le]=Date.now();const ft=_getEvictableKeys(nt,Ye);for(const ht of ft)delete nt[ht],StorageProvider_1$2.Storage.removeItem(ht);(0,StorageProvider_1$2._setObjectInStorage)(this._lastModifiedStoreKey,nt)}}DataAdapterCore$1.DataAdapterCore=DataAdapterCore;function _makeDataAdapterResult(Be,Le,Ye,tt){return{source:Be,data:Le,receivedAt:Date.now(),stableID:Ye,fullUserHash:(0,StatsigUser_1._getFullUserHash)(tt)}}DataAdapterCore$1._makeDataAdapterResult=_makeDataAdapterResult;class InMemoryCache{constructor(){this._data={}}get(Le,Ye){var tt;const nt=this._data[Le],ft=nt==null?void 0:nt.stableID,ht=(tt=Ye==null?void 0:Ye.customIDs)===null||tt===void 0?void 0:tt.stableID;return ht&&ft&&ht!==ft?(Log_1$4.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):nt}add(Le,Ye,tt){const nt=_getEvictableKeys(this._data,tt-1);for(const ft of nt)delete this._data[ft];this._data[Le]=Ye}merge(Le){this._data=Object.assign(Object.assign({},this._data),Le)}}function _getEvictableKeys(Be,Le){const Ye=Object.keys(Be);return Ye.length<=Le?[]:Le===0?Ye:Ye.sort((tt,nt)=>{const ft=Be[tt],ht=Be[nt];return typeof ft=="object"&&typeof ht=="object"?ft.receivedAt-ht.receivedAt:ft-ht}).slice(0,Ye.length-Le)}var DownloadConfigSpecsResponse={};Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0});var ErrorBoundary={},SDKType={};Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const SDK_CLIENT={};let suffix;SDKType.SDKType={_get:Be=>{var Le;return((Le=SDK_CLIENT[Be])!==null&&Le!==void 0?Le:"js-mono")+(suffix??"")},_setClientType(Be,Le){SDK_CLIENT[Be]=Le},_setBindingType(Be){(!suffix||suffix==="-react")&&(suffix="-"+Be)}},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__awaiter||function(yt,Ct,kt,vt){function bt(It){return It instanceof kt?It:new kt(function(wt){wt(It)})}return new(kt||(kt=Promise))(function(It,wt){function Rt(Dt){try{Bt(vt.next(Dt))}catch(Pt){wt(Pt)}}function Tt(Dt){try{Bt(vt.throw(Dt))}catch(Pt){wt(Pt)}}function Bt(Dt){Dt.done?It(Dt.value):bt(Dt.value).then(Rt,Tt)}Bt((vt=vt.apply(yt,Ct||[])).next())})};Object.defineProperty(Be,"__esModule",{value:!0}),Be.ErrorBoundary=Be.EXCEPTION_ENDPOINT=void 0;const Ye=Log,tt=SDKType,nt=StatsigMetadata;Be.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const ft="[Statsig] UnknownError";class ht{constructor(Ct,kt,vt,bt){this._sdkKey=Ct,this._options=kt,this._emitter=vt,this._lastSeenError=bt,this._seen=new Set}wrap(Ct,kt){try{const vt=Ct;xt(vt).forEach(bt=>{const It=vt[bt];"$EB"in It||(vt[bt]=(...wt)=>this._capture(kt?`${kt}:${bt}`:bt,()=>It.apply(Ct,wt)),vt[bt].$EB=!0)})}catch(vt){this._onError("eb:wrap",vt)}}logError(Ct,kt){this._onError(Ct,kt)}getLastSeenErrorAndReset(){const Ct=this._lastSeenError;return this._lastSeenError=void 0,Ct??null}attachErrorIfNoneExists(Ct){this._lastSeenError||(this._lastSeenError=gt(Ct))}_capture(Ct,kt){try{const vt=kt();return vt&&vt instanceof Promise?vt.catch(bt=>this._onError(Ct,bt)):vt}catch(vt){return this._onError(Ct,vt),null}}_onError(Ct,kt){try{Ye.Log.warn(`Caught error in ${Ct}`,{error:kt}),Le(this,void 0,void 0,function*(){var bt,It,wt,Rt,Tt,Bt,Dt;const Pt=kt||Error(ft),Nt=Pt instanceof Error,Lt=Nt?Pt.name:"No Name",Wt=gt(Pt);if(this._lastSeenError=Wt,this._seen.has(Lt))return;if(this._seen.add(Lt),!((It=(bt=this._options)===null||bt===void 0?void 0:bt.networkConfig)===null||It===void 0)&&It.preventAllNetworkTraffic){(wt=this._emitter)===null||wt===void 0||wt.call(this,{name:"error",error:kt,tag:Ct});return}const $t=tt.SDKType._get(this._sdkKey),Kt=nt.StatsigMetadataProvider.get(),Vt=Nt?Pt.stack:At(Pt),Ut=Object.assign({tag:Ct,exception:Lt,info:Vt,statsigOptions:Et(this._options)},Object.assign(Object.assign({},Kt),{sdkType:$t}));yield((Bt=(Tt=(Rt=this._options)===null||Rt===void 0?void 0:Rt.networkConfig)===null||Tt===void 0?void 0:Tt.networkOverrideFunc)!==null&&Bt!==void 0?Bt:fetch)(Be.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String($t),"STATSIG-SDK-VERSION":String(Kt.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(Ut)}),(Dt=this._emitter)===null||Dt===void 0||Dt.call(this,{name:"error",error:kt,tag:Ct})}).then(()=>{}).catch(()=>{})}catch{}}}Be.ErrorBoundary=ht;function gt(yt){return yt instanceof Error?yt:typeof yt=="string"?new Error(yt):new Error("An unknown error occurred.")}function At(yt){try{return JSON.stringify(yt)}catch{return ft}}function xt(yt){const Ct=new Set;let kt=Object.getPrototypeOf(yt);for(;kt&&kt!==Object.prototype;)Object.getOwnPropertyNames(kt).filter(vt=>typeof(kt==null?void 0:kt[vt])=="function").forEach(vt=>Ct.add(vt)),kt=Object.getPrototypeOf(kt);return Array.from(Ct)}function Et(yt){if(!yt)return{};const Ct={};return Object.keys(yt).forEach(kt=>{const vt=kt,bt=yt[vt];switch(typeof bt){case"number":case"bigint":case"boolean":Ct[String(vt)]=bt;break;case"string":bt.length<50?Ct[String(vt)]=bt:Ct[String(vt)]="set";break;case"object":vt==="environment"?Ct.environment=bt:vt==="networkConfig"?Ct.networkConfig=bt:Ct[String(vt)]=bt!=null?"set":"unset";break}}),Ct}}(ErrorBoundary);var EvaluationOptions={};Object.defineProperty(EvaluationOptions,"__esModule",{value:!0});var EvaluationTypes={};Object.defineProperty(EvaluationTypes,"__esModule",{value:!0});var InitializeResponse={};Object.defineProperty(InitializeResponse,"__esModule",{value:!0});var MemoKey={};Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const EXIST_KEYS=new Set([]),DO_NOT_MEMO_KEYS=new Set(["userPersistedValues"]);function createMemoKey(Be,Le,Ye){let tt=`${Be}|${Le}`;if(!Ye)return tt;for(const nt of Object.keys(Ye)){if(DO_NOT_MEMO_KEYS.has(nt))return;EXIST_KEYS.has(nt)?tt+=`|${nt}=true`:tt+=`|${nt}=${Ye[nt]}`}return tt}MemoKey.createMemoKey=createMemoKey;var NetworkCore$1={},NetworkFallbackResolver$1={},DnsTxtQuery={},__awaiter$d=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const FEATURE_ASSETS_DNS_QUERY=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),DNS_QUERY_ENDPOINT="https://cloudflare-dns.com/dns-query",DOMAIN_CHARS=["i","e","d"],MAX_START_LOOKUP=200;function _fetchTxtRecords(Be){return __awaiter$d(this,void 0,void 0,function*(){const Le=yield Be(DNS_QUERY_ENDPOINT,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:FEATURE_ASSETS_DNS_QUERY});if(!Le.ok){const nt=new Error("Failed to fetch TXT records from DNS");throw nt.name="DnsTxtFetchError",nt}const Ye=yield Le.arrayBuffer(),tt=new Uint8Array(Ye);return _parseDnsResponse(tt)})}DnsTxtQuery._fetchTxtRecords=_fetchTxtRecords;function _parseDnsResponse(Be){const Le=Be.findIndex((tt,nt)=>nt<MAX_START_LOOKUP&&String.fromCharCode(tt)==="="&&DOMAIN_CHARS.includes(String.fromCharCode(Be[nt-1])));if(Le===-1){const tt=new Error("Failed to parse TXT records from DNS");throw tt.name="DnsTxtParseError",tt}let Ye="";for(let tt=Le-1;tt<Be.length;tt++)Ye+=String.fromCharCode(Be[tt]);return Ye.split(",")}var __awaiter$c=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkFallbackResolver$1,"__esModule",{value:!0}),NetworkFallbackResolver$1._isDomainFailure=NetworkFallbackResolver$1.NetworkFallbackResolver=void 0;const DnsTxtQuery_1=DnsTxtQuery,Hashing_1=Hashing,Log_1$3=Log,StorageProvider_1$1=StorageProvider,DEFAULT_TTL_MS=7*24*60*60*1e3,COOLDOWN_TIME_MS=4*60*60*1e3;class NetworkFallbackResolver{constructor(Le){var Ye;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(Ye=Le.networkConfig)===null||Ye===void 0?void 0:Ye.networkOverrideFunc}setErrorBoundary(Le){this._errorBoundary=Le}tryBumpExpiryTime(Le,Ye){var tt;const nt=(tt=this._fallbackInfo)===null||tt===void 0?void 0:tt[Ye.endpoint];nt&&(nt.expiryTime=Date.now()+DEFAULT_TTL_MS,_tryWriteFallbackInfoToCache(Le,Object.assign(Object.assign({},this._fallbackInfo),{[Ye.endpoint]:nt})))}getActiveFallbackUrl(Le,Ye){var tt,nt;if(Ye.customUrl!=null&&Ye.fallbackUrls!=null)return null;let ft=this._fallbackInfo;ft==null&&(ft=(tt=_readFallbackInfoFromCache(Le))!==null&&tt!==void 0?tt:{},this._fallbackInfo=ft);const ht=ft[Ye.endpoint];return!ht||Date.now()>((nt=ht.expiryTime)!==null&&nt!==void 0?nt:0)||Ye.getChecksum()!==ht.urlConfigChecksum?(delete ft[Ye.endpoint],this._fallbackInfo=ft,_tryWriteFallbackInfoToCache(Le,this._fallbackInfo),null):ht.url?ht.url:null}tryFetchUpdatedFallbackInfo(Le,Ye,tt,nt){return __awaiter$c(this,void 0,void 0,function*(){var ft,ht;try{if(!_isDomainFailure(tt,nt))return!1;const At=Ye.customUrl==null&&Ye.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(Ye):Ye.fallbackUrls,xt=this._pickNewFallbackUrl((ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[Ye.endpoint],At);return xt?(this._updateFallbackInfoWithNewUrl(Le,Ye,xt),!0):!1}catch(gt){return(ht=this._errorBoundary)===null||ht===void 0||ht.logError("tryFetchUpdatedFallbackInfo",gt),!1}})}_updateFallbackInfoWithNewUrl(Le,Ye,tt){var nt,ft,ht;const gt={urlConfigChecksum:Ye.getChecksum(),url:tt,expiryTime:Date.now()+DEFAULT_TTL_MS,previous:[]},At=Ye.endpoint,xt=(nt=this._fallbackInfo)===null||nt===void 0?void 0:nt[At];xt&>.previous.push(...xt.previous),gt.previous.length>10&&(gt.previous=[]);const Et=(ht=(ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[At])===null||ht===void 0?void 0:ht.url;Et!=null&>.previous.push(Et),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[At]:gt}),_tryWriteFallbackInfoToCache(Le,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(Le){return __awaiter$c(this,void 0,void 0,function*(){var Ye;const tt=this._dnsQueryCooldowns[Le.endpoint];if(tt&&Date.now()<tt)return null;this._dnsQueryCooldowns[Le.endpoint]=Date.now()+COOLDOWN_TIME_MS;const nt=[],ft=yield(0,DnsTxtQuery_1._fetchTxtRecords)((Ye=this._networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch),ht=_extractPathFromUrl(Le.defaultUrl);for(const gt of ft){if(!gt.startsWith(Le.endpointDnsKey+"="))continue;const At=gt.split("=");if(At.length>1){let xt=At[1];xt.endsWith("/")&&(xt=xt.slice(0,-1)),nt.push(`https://${xt}${ht}`)}}return nt})}_pickNewFallbackUrl(Le,Ye){var tt;if(Ye==null)return null;const nt=new Set((tt=Le==null?void 0:Le.previous)!==null&&tt!==void 0?tt:[]),ft=Le==null?void 0:Le.url;let ht=null;for(const gt of Ye){const At=gt.endsWith("/")?gt.slice(0,-1):gt;if(!nt.has(gt)&&At!==ft){ht=At;break}}return ht}}NetworkFallbackResolver$1.NetworkFallbackResolver=NetworkFallbackResolver;function _isDomainFailure(Be,Le){var Ye;const tt=(Ye=Be==null?void 0:Be.toLowerCase())!==null&&Ye!==void 0?Ye:"";return Le||tt.includes("uncaught exception")||tt.includes("failed to fetch")||tt.includes("networkerror when attempting to fetch resource")}NetworkFallbackResolver$1._isDomainFailure=_isDomainFailure;function _getFallbackInfoStorageKey(Be){return`statsig.network_fallback.${(0,Hashing_1._DJB2)(Be)}`}function _tryWriteFallbackInfoToCache(Be,Le){const Ye=_getFallbackInfoStorageKey(Be);if(!Le||Object.keys(Le).length===0){StorageProvider_1$1.Storage.removeItem(Ye);return}StorageProvider_1$1.Storage.setItem(Ye,JSON.stringify(Le))}function _readFallbackInfoFromCache(Be){const Le=_getFallbackInfoStorageKey(Be),Ye=StorageProvider_1$1.Storage.getItem(Le);if(!Ye)return null;try{return JSON.parse(Ye)}catch{return Log_1$3.Log.error("Failed to parse FallbackInfo"),null}}function _extractPathFromUrl(Be){try{return new URL(Be).pathname}catch{return null}}var SDKFlags={};Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const FLAGMAP={};SDKFlags.SDKFlags={setFlags:(Be,Le)=>{FLAGMAP[Be]=Le},get:(Be,Le)=>{var Ye,tt;return(tt=(Ye=FLAGMAP[Be])===null||Ye===void 0?void 0:Ye[Le])!==null&&tt!==void 0?tt:!1}};var SessionID={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigSession=Be.SessionID=void 0;const Le=$_StatsigGlobal,Ye=CacheKey,tt=Log,nt=StorageProvider,ft=UUID,ht=30*60*1e3,gt=4*60*60*1e3,At={};Be.SessionID={get:Rt=>Be.StatsigSession.get(Rt).data.sessionID},Be.StatsigSession={get:Rt=>{At[Rt]==null&&(At[Rt]=xt(Rt));const Tt=At[Rt];return yt(Tt)},overrideInitialSessionID:(Rt,Tt)=>{At[Tt]=Et(Rt,Tt)}};function xt(Rt){let Tt=wt(Rt);const Bt=Date.now();return Tt||(Tt={sessionID:(0,ft.getUUID)(),startTime:Bt,lastUpdate:Bt}),{data:Tt,sdkKey:Rt}}function Et(Rt,Tt){const Bt=Date.now();return{data:{sessionID:Rt,startTime:Bt,lastUpdate:Bt},sdkKey:Tt}}function yt(Rt){const Tt=Date.now(),Bt=Rt.data,Dt=Rt.sdkKey;if(kt(Bt)||vt(Bt)){Bt.sessionID=(0,ft.getUUID)(),Bt.startTime=Tt;const Nt=__STATSIG__==null?void 0:__STATSIG__.instance(Dt);Nt&&Nt.$emt({name:"session_expired"})}Bt.lastUpdate=Tt,It(Bt,Rt.sdkKey),clearTimeout(Rt.idleTimeoutID),clearTimeout(Rt.ageTimeoutID);const Pt=Tt-Bt.startTime;return Rt.idleTimeoutID=Ct(Dt,ht),Rt.ageTimeoutID=Ct(Dt,gt-Pt),Rt}function Ct(Rt,Tt){return setTimeout(()=>{var Bt;const Dt=(Bt=(0,Le._getStatsigGlobal)())===null||Bt===void 0?void 0:Bt.instance(Rt);Dt&&Dt.$emt({name:"session_expired"})},Tt)}function kt({lastUpdate:Rt}){return Date.now()-Rt>ht}function vt({startTime:Rt}){return Date.now()-Rt>gt}function bt(Rt){return`statsig.session_id.${(0,Ye._getStorageKey)(Rt)}`}function It(Rt,Tt){const Bt=bt(Tt);try{(0,nt._setObjectInStorage)(Bt,Rt)}catch{tt.Log.warn("Failed to save SessionID")}}function wt(Rt){const Tt=bt(Rt);return(0,nt._getObjectFromStorage)(Tt)}})(SessionID);var StatsigClientEventEmitter={};Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"};var __awaiter$b=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkCore$1,"__esModule",{value:!0}),NetworkCore$1.NetworkCore=void 0;const __StatsigGlobal_1$1=$_StatsigGlobal,Diagnostics_1=Diagnostics,Log_1$2=Log,NetworkConfig_1=NetworkConfig,NetworkFallbackResolver_1=NetworkFallbackResolver$1,SDKFlags_1=SDKFlags,SDKType_1=SDKType,SafeJs_1$1=SafeJs,SessionID_1$1=SessionID,StableID_1$1=StableID,StatsigClientEventEmitter_1=StatsigClientEventEmitter,StatsigMetadata_1=StatsigMetadata,StatsigOptionsCommon_1$1=StatsigOptionsCommon,VisibilityObserving_1=VisibilityObserving,DEFAULT_TIMEOUT_MS=1e4,BACKOFF_BASE_MS=500,BACKOFF_MAX_MS=3e4,RATE_LIMIT_WINDOW_MS=1e3,RATE_LIMIT_MAX_REQ_COUNT=50,LEAK_RATE=RATE_LIMIT_MAX_REQ_COUNT/RATE_LIMIT_WINDOW_MS,RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);class NetworkCore{constructor(Le,Ye){this._emitter=Ye,this._errorBoundary=null,this._timeout=DEFAULT_TIMEOUT_MS,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,Le&&(this._options=Le),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new NetworkFallbackResolver_1.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(Le))}setLogEventCompressionMode(Le){this._options.logEventCompressionMode=Le}setErrorBoundary(Le){this._errorBoundary=Le,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(Le)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const Le=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,Le}beacon(Le){if(!_ensureValidSdkKey(Le))return!1;const Ye=this._getInternalRequestArgs("POST",Le),tt=this._getPopulatedURL(Ye),nt=navigator;return nt.sendBeacon.bind(nt)(tt,Ye.body)}post(Le){return __awaiter$b(this,void 0,void 0,function*(){const Ye=this._getInternalRequestArgs("POST",Le);return this._tryEncodeBody(Ye),yield this._tryToCompressBody(Ye),this._sendRequest(Ye)})}get(Le){const Ye=this._getInternalRequestArgs("GET",Le);return this._sendRequest(Ye)}_sendRequest(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye,tt,nt,ft;if(!_ensureValidSdkKey(Le)||this._netConfig.preventAllNetworkTraffic)return null;const{method:ht,body:gt,retries:At,attempt:xt}=Le,Et=Le.urlConfig.endpoint;if(this._isRateLimited(Et))return Log_1$2.Log.warn(`Request to ${Et} was blocked because you are making requests too frequently.`),null;const yt=xt??1;let Ct=!1;const kt=this._getPopulatedURL(Le);let vt=null;const bt=(0,VisibilityObserving_1._isUnloading)();try{const It={method:ht,body:gt,headers:Object.assign({},Le.headers),priority:Le.priority,keepalive:bt};_tryMarkInitStart(Le,yt);const wt=this._leakyBucket[Et];wt&&(wt.lastRequestTime=Date.now(),this._leakyBucket[Et]=wt);const Rt=(Ye=this._netConfig.networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch;let Tt;if(vt=yield Promise.race([Rt(kt,It).finally(()=>clearTimeout(Tt)),new Promise((Dt,Pt)=>{Tt=setTimeout(()=>{Ct=!0,Pt(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!vt.ok){const Dt=yield vt.text().catch(()=>"No Text"),Pt=new Error(`NetworkError: ${kt} ${Dt}`);throw Pt.name="NetworkError",Pt}const Bt=yield vt.text();return _tryMarkInitEnd(Le,vt,yt,Bt),this._fallbackResolver.tryBumpExpiryTime(Le.sdkKey,Le.urlConfig),{body:Bt,code:vt.status}}catch(It){const wt=_getErrorMessage(It),Rt=_didTimeout(wt??"",Ct);if(_tryMarkInitEnd(Le,vt,yt,"",It),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(Le.sdkKey,Le.urlConfig,wt,Rt))&&(Le.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(Le.sdkKey,Le.urlConfig)),!At||yt>At||!RETRYABLE_CODES.has((tt=vt==null?void 0:vt.status)!==null&&tt!==void 0?tt:500)){(nt=this._emitter)===null||nt===void 0||nt.call(this,{name:"error",error:It,tag:StatsigClientEventEmitter_1.ErrorTag.NetworkError,requestArgs:Le});const Bt=`A networking error occurred during ${ht} request to ${kt}.`;return Log_1$2.Log.error(Bt,wt,It),(ft=this._errorBoundary)===null||ft===void 0||ft.attachErrorIfNoneExists(Bt),null}return yield _exponentialBackoff(yt),this._sendRequest(Object.assign(Object.assign({},Le),{retries:At,attempt:yt+1}))}})}_getLogEventCompressionMode(Le){let Ye=Le==null?void 0:Le.logEventCompressionMode;return!Ye&&(Le==null?void 0:Le.disableCompression)===!0&&(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled),Ye||(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled),Ye}_isRateLimited(Le){var Ye;const tt=Date.now(),nt=(Ye=this._leakyBucket[Le])!==null&&Ye!==void 0?Ye:{count:0,lastRequestTime:tt},ft=tt-nt.lastRequestTime,ht=Math.floor(ft*LEAK_RATE);return nt.count=Math.max(0,nt.count-ht),nt.count>=RATE_LIMIT_MAX_REQ_COUNT?!0:(nt.count+=1,nt.lastRequestTime=tt,this._leakyBucket[Le]=nt,!1)}_getPopulatedURL(Le){var Ye;const tt=(Ye=Le.fallbackUrl)!==null&&Ye!==void 0?Ye:Le.urlConfig.getUrl();(Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize||Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=tt);const nt=Object.assign({[NetworkConfig_1.NetworkParam.SdkKey]:Le.sdkKey,[NetworkConfig_1.NetworkParam.SdkType]:SDKType_1.SDKType._get(Le.sdkKey),[NetworkConfig_1.NetworkParam.SdkVersion]:StatsigMetadata_1.SDK_VERSION,[NetworkConfig_1.NetworkParam.Time]:String(Date.now()),[NetworkConfig_1.NetworkParam.SessionID]:SessionID_1$1.SessionID.get(Le.sdkKey)},Le.params),ft=Object.keys(nt).map(ht=>`${encodeURIComponent(ht)}=${encodeURIComponent(nt[ht])}`).join("&");return`${tt}${ft?`?${ft}`:""}`}_tryEncodeBody(Le){var Ye;const tt=(0,SafeJs_1$1._getWindowSafe)(),nt=Le.body;if(!(!Le.isStatsigEncodable||this._options.disableStatsigEncoding||typeof nt!="string"||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-encode")!=null||!(tt!=null&&tt.btoa)))try{Le.body=tt.btoa(nt).split("").reverse().join(""),Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.StatsigEncoded]:"1"})}catch(ft){Log_1$2.Log.warn(`Request encoding failed for ${Le.urlConfig.getUrl()}`,ft)}}_tryToCompressBody(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye;const tt=Le.body;if(!(typeof tt!="string"||!_allowCompression(Le,this._options)))try{const nt=new TextEncoder().encode(tt),ft=new CompressionStream("gzip"),ht=ft.writable.getWriter();ht.write(nt).catch(Log_1$2.Log.error),ht.close().catch(Log_1$2.Log.error);const gt=ft.readable.getReader(),At=[];let xt;for(;!(xt=yield gt.read()).done;)At.push(xt.value);const Et=At.reduce((kt,vt)=>kt+vt.length,0),yt=new Uint8Array(Et);let Ct=0;for(const kt of At)yt.set(kt,Ct),Ct+=kt.length;Le.body=yt,Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.IsGzipped]:"1"})}catch(nt){Log_1$2.Log.warn(`Request compression failed for ${Le.urlConfig.getUrl()}`,nt)}})}_getInternalRequestArgs(Le,Ye){const tt=this._fallbackResolver.getActiveFallbackUrl(Ye.sdkKey,Ye.urlConfig),nt=Object.assign(Object.assign({},Ye),{method:Le,fallbackUrl:tt});return"data"in Ye&&_populateRequestBody(nt,Ye.data),nt}}NetworkCore$1.NetworkCore=NetworkCore;const _ensureValidSdkKey=Be=>Be.sdkKey?!0:(Log_1$2.Log.warn("Unable to make request without an SDK key"),!1),_populateRequestBody=(Be,Le)=>{const{sdkKey:Ye,fallbackUrl:tt}=Be,nt=StableID_1$1.StableID.get(Ye),ft=SessionID_1$1.SessionID.get(Ye),ht=SDKType_1.SDKType._get(Ye);Be.body=JSON.stringify(Object.assign(Object.assign({},Le),{statsigMetadata:Object.assign(Object.assign({},StatsigMetadata_1.StatsigMetadataProvider.get()),{stableID:nt,sessionID:ft,sdkType:ht,fallbackUrl:tt})}))};function _allowCompression(Be,Le){if(!Be.isCompressable||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const Ye=Be.urlConfig.customUrl!=null||Be.urlConfig.fallbackUrls!=null,tt=SDKFlags_1.SDKFlags.get(Be.sdkKey,"enable_log_event_compression")===!0;switch(Le.logEventCompressionMode){case StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled:return!1;case StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled:return!(Ye&&!tt);case StatsigOptionsCommon_1$1.LogEventCompressionMode.Forced:return!0;default:return!1}}function _getErrorMessage(Be){return typeof Be=="string"?Be:Be instanceof Error?`${Be.name}: ${Be.message}`:"Unknown Error"}function _didTimeout(Be,Le){return Be.includes("Timeout")||Le}function _tryMarkInitStart(Be,Le){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqStart(Be.sdkKey,{attempt:Le})}function _tryMarkInitEnd(Be,Le,Ye,tt,nt){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqEnd(Be.sdkKey,Diagnostics_1.Diagnostics._getDiagnosticsData(Le,Ye,tt,nt))}function _exponentialBackoff(Be){return __awaiter$b(this,void 0,void 0,function*(){yield new Promise(Le=>setTimeout(Le,Math.min(BACKOFF_BASE_MS*(Be*Be),BACKOFF_MAX_MS)))})}var OverrideAdapter={};Object.defineProperty(OverrideAdapter,"__esModule",{value:!0});var ParamStoreTypes={};Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0});var SizeOf={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._fastApproxSizeOf=void 0;const Le=2,Ye=1,tt=(nt,ft)=>{let ht=0;const gt=Object.keys(nt);for(let At=0;At<gt.length;At++){const xt=gt[At],Et=nt[xt];if(ht+=xt.length,typeof Et=="object"&&Et!==null?ht+=(0,Be._fastApproxSizeOf)(Et,ft)+Le:ht+=String(Et).length+Ye,ht>=ft)return ht}return ht};Be._fastApproxSizeOf=tt})(SizeOf);var StatsigClientBase$1={},__awaiter$a=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClientBase$1,"__esModule",{value:!0}),StatsigClientBase$1.StatsigClientBase=void 0;const __StatsigGlobal_1=$_StatsigGlobal,ErrorBoundary_1=ErrorBoundary,EventLogger_1=EventLogger$1,Log_1$1=Log,MemoKey_1=MemoKey,SafeJs_1=SafeJs,SessionID_1=SessionID,StableID_1=StableID,StatsigOptionsCommon_1=StatsigOptionsCommon,StorageProvider_1=StorageProvider,MAX_MEMO_CACHE_SIZE=3e3;class StatsigClientBase{constructor(Le,Ye,tt,nt){var ft,ht,gt,At;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const xt=this.$emt.bind(this);(nt==null?void 0:nt.logLevel)!=null&&(Log_1$1.Log.level=nt.logLevel),nt!=null&&nt.disableStorage&&StorageProvider_1.Storage._setDisabled(!0),nt!=null&&nt.initialSessionID&&SessionID_1.StatsigSession.overrideInitialSessionID(nt.initialSessionID,Le),nt!=null&&nt.storageProvider&&StorageProvider_1.Storage._setProvider(nt.storageProvider),nt!=null&&nt.enableCookies&&StableID_1.StableID._setCookiesEnabled(Le,nt.enableCookies),nt!=null&&nt.disableStableID&&StableID_1.StableID._setDisabled(Le,!0),this._sdkKey=Le,this._options=nt??{},this._memoCache={},this.overrideAdapter=(ft=nt==null?void 0:nt.overrideAdapter)!==null&&ft!==void 0?ft:null,this._logger=new EventLogger_1.EventLogger(Le,xt,tt,nt),this._errorBoundary=new ErrorBoundary_1.ErrorBoundary(Le,nt,xt),this._errorBoundary.wrap(this),this._errorBoundary.wrap(Ye),this._errorBoundary.wrap(this._logger),tt.setErrorBoundary(this._errorBoundary),this.dataAdapter=Ye,this.dataAdapter.attach(Le,nt,tt),this.storageProvider=StorageProvider_1.Storage,(At=(gt=(ht=this.overrideAdapter)===null||ht===void 0?void 0:ht.loadFromStorage)===null||gt===void 0?void 0:gt.call(ht))===null||At===void 0||At.catch(Et=>this._errorBoundary.logError("OA::loadFromStorage",Et)),this._primeReadyRipcord(),_assignGlobalInstance(Le,this)}updateRuntimeOptions(Le){Le.loggingEnabled?(this._options.loggingEnabled=Le.loggingEnabled,this._logger.setLoggingEnabled(Le.loggingEnabled)):Le.disableLogging!=null&&(this._options.disableLogging=Le.disableLogging,this._logger.setLoggingEnabled(Le.disableLogging?"disabled":"browser-only")),Le.disableStorage!=null&&(this._options.disableStorage=Le.disableStorage,StorageProvider_1.Storage._setDisabled(Le.disableStorage)),Le.enableCookies!=null&&(this._options.enableCookies=Le.enableCookies,StableID_1.StableID._setCookiesEnabled(this._sdkKey,Le.enableCookies)),Le.logEventCompressionMode?this._logger.setLogEventCompressionMode(Le.logEventCompressionMode):Le.disableCompression&&this._logger.setLogEventCompressionMode(StatsigOptionsCommon_1.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return __awaiter$a(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(Le,Ye){this._listeners[Le]||(this._listeners[Le]=[]),this._listeners[Le].push(Ye)}off(Le,Ye){if(this._listeners[Le]){const tt=this._listeners[Le].indexOf(Ye);tt!==-1&&this._listeners[Le].splice(tt,1)}}$on(Le,Ye){Ye.__isInternal=!0,this.on(Le,Ye)}$emt(Le){var Ye;const tt=nt=>{try{nt(Le)}catch(ft){if(nt.__isInternal===!0){this._errorBoundary.logError(`__emit:${Le.name}`,ft);return}Log_1$1.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",Le)}};this._listeners[Le.name]&&this._listeners[Le.name].forEach(nt=>tt(nt)),(Ye=this._listeners["*"])===null||Ye===void 0||Ye.forEach(tt)}_setStatus(Le,Ye){this.loadingStatus=Le,this._memoCache={},this.$emt({name:"values_updated",status:Le,values:Ye})}_enqueueExposure(Le,Ye,tt){if((tt==null?void 0:tt.disableExposureLog)===!0){this._logger.incrementNonExposureCount(Le);return}this._logger.enqueue(Ye)}_memoize(Le,Ye){return(tt,nt)=>{if(this._options.disableEvaluationMemoization)return Ye(tt,nt);const ft=(0,MemoKey_1.createMemoKey)(Le,tt,nt);return ft?(ft in this._memoCache||(Object.keys(this._memoCache).length>=MAX_MEMO_CACHE_SIZE&&(this._memoCache={}),this._memoCache[ft]=Ye(tt,nt)),this._memoCache[ft]):Ye(tt,nt)}}}StatsigClientBase$1.StatsigClientBase=StatsigClientBase;function _assignGlobalInstance(Be,Le){var Ye;if((0,SafeJs_1._isServerEnv)())return;const tt=(0,__StatsigGlobal_1._getStatsigGlobal)(),nt=(Ye=tt.instances)!==null&&Ye!==void 0?Ye:{},ft=Le;nt[Be]!=null&&Log_1$1.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),nt[Be]=ft,tt.firstInstance||(tt.firstInstance=ft),tt.instances=nt,__STATSIG__=tt}var StatsigDataAdapter={};Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached";var StatsigPlugin={};Object.defineProperty(StatsigPlugin,"__esModule",{value:!0});var StatsigTypeFactories={};Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const Log_1=Log,TypingUtils_1=TypingUtils;function _makeEvaluation(Be,Le,Ye,tt){var nt;return{name:Be,details:Le,ruleID:(nt=Ye==null?void 0:Ye.rule_id)!==null&&nt!==void 0?nt:"",__evaluation:Ye,value:tt}}function _makeFeatureGate(Be,Le,Ye){var tt;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,(Ye==null?void 0:Ye.value)===!0)),{idType:(tt=Ye==null?void 0:Ye.id_type)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeFeatureGate=_makeFeatureGate;function _makeDynamicConfig(Be,Le,Ye){var tt,nt;const ft=(tt=Ye==null?void 0:Ye.value)!==null&&tt!==void 0?tt:{};return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,ft)),{idType:(nt=Ye==null?void 0:Ye.id_type)!==null&&nt!==void 0?nt:null,get:_makeTypedGet(Be,Ye==null?void 0:Ye.value)})}StatsigTypeFactories._makeDynamicConfig=_makeDynamicConfig;function _makeExperiment(Be,Le,Ye){var tt;const nt=_makeDynamicConfig(Be,Le,Ye);return Object.assign(Object.assign({},nt),{groupName:(tt=Ye==null?void 0:Ye.group_name)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeExperiment=_makeExperiment;function _makeLayer(Be,Le,Ye,tt){var nt,ft;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,void 0)),{get:_makeTypedGet(Be,Ye==null?void 0:Ye.value,tt),groupName:(nt=Ye==null?void 0:Ye.group_name)!==null&&nt!==void 0?nt:null,__value:(ft=Ye==null?void 0:Ye.value)!==null&&ft!==void 0?ft:{}})}StatsigTypeFactories._makeLayer=_makeLayer;function _mergeOverride(Be,Le,Ye,tt){return Object.assign(Object.assign(Object.assign({},Be),Le),{get:_makeTypedGet(Be.name,Ye,tt)})}StatsigTypeFactories._mergeOverride=_mergeOverride;function _makeTypedGet(Be,Le,Ye){return(tt,nt)=>{var ft;const ht=(ft=Le==null?void 0:Le[tt])!==null&&ft!==void 0?ft:null;return ht==null?nt??null:nt!=null&&!(0,TypingUtils_1._isTypeMatch)(ht,nt)?(Log_1.Log.warn(`Parameter type mismatch. '${Be}.${tt}' was found to be type '${typeof ht}' but fallback/return type is '${typeof nt}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),nt??null):(Ye==null||Ye(tt),ht)}}StatsigTypeFactories._makeTypedGet=_makeTypedGet;var StatsigTypes={};Object.defineProperty(StatsigTypes,"__esModule",{value:!0});var StatsigUpdateDetails={};Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;const createUpdateDetails=(Be,Le,Ye,tt,nt,ft)=>({duration:Ye,source:Le,success:Be,error:tt,sourceUrl:nt,warnings:ft});StatsigUpdateDetails.createUpdateDetails=createUpdateDetails,StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt);var kt=Object.getOwnPropertyDescriptor(Et,yt);(!kt||("get"in kt?!Et.__esModule:kt.writable||kt.configurable))&&(kt={enumerable:!0,get:function(){return Et[yt]}}),Object.defineProperty(xt,Ct,kt)}:function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt),xt[Ct]=Et[yt]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Et){for(var yt in xt)yt!=="default"&&!Object.prototype.hasOwnProperty.call(Et,yt)&&Le(Et,xt,yt)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.Storage=Be.Log=Be.EventLogger=Be.Diagnostics=void 0;const tt=$_StatsigGlobal,nt=Diagnostics;Object.defineProperty(Be,"Diagnostics",{enumerable:!0,get:function(){return nt.Diagnostics}});const ft=EventLogger$1;Object.defineProperty(Be,"EventLogger",{enumerable:!0,get:function(){return ft.EventLogger}});const ht=Log;Object.defineProperty(Be,"Log",{enumerable:!0,get:function(){return ht.Log}});const gt=StatsigMetadata,At=StorageProvider;Object.defineProperty(Be,"Storage",{enumerable:!0,get:function(){return At.Storage}}),Ye($_StatsigGlobal,Be),Ye(CacheKey,Be),Ye(ClientInterfaces,Be),Ye(DataAdapterCore$1,Be),Ye(Diagnostics,Be),Ye(DownloadConfigSpecsResponse,Be),Ye(ErrorBoundary,Be),Ye(EvaluationOptions,Be),Ye(EvaluationTypes,Be),Ye(Hashing,Be),Ye(InitializeResponse,Be),Ye(Log,Be),Ye(MemoKey,Be),Ye(NetworkConfig,Be),Ye(NetworkCore$1,Be),Ye(OverrideAdapter,Be),Ye(ParamStoreTypes,Be),Ye(SafeJs,Be),Ye(SDKType,Be),Ye(SessionID,Be),Ye(SizeOf,Be),Ye(StableID,Be),Ye(StatsigClientBase$1,Be),Ye(StatsigClientEventEmitter,Be),Ye(StatsigDataAdapter,Be),Ye(StatsigEvent,Be),Ye(StatsigMetadata,Be),Ye(StatsigOptionsCommon,Be),Ye(StatsigPlugin,Be),Ye(StatsigTypeFactories,Be),Ye(StatsigTypes,Be),Ye(StatsigUser,Be),Ye(StorageProvider,Be),Ye(TypedJsonParse,Be),Ye(TypingUtils,Be),Ye(UrlConfiguration$1,Be),Ye(UUID,Be),Ye(VisibilityObserving,Be),Ye(StatsigUpdateDetails,Be),Ye(SDKFlags,Be),Object.assign((0,tt._getStatsigGlobal)(),{Log:ht.Log,SDK_VERSION:gt.SDK_VERSION})}(src$1);var StatsigClient$1={},EvaluationStore$1={},V1InitializeContainer$1={};Object.defineProperty(V1InitializeContainer$1,"__esModule",{value:!0}),V1InitializeContainer$1.V1InitializeContainer=void 0;const client_core_1$7=src$1;class V1InitializeContainer{constructor(Le){this._values=Le}getGate(Le){return this._getResultFromLookup(this._values.feature_gates,Le)}getConfig(Le){return this._getResultFromLookup(this._values.dynamic_configs,Le)}getLayer(Le){return this._getResultFromLookup(this._values.layer_configs,Le)}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$7._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V1InitializeContainer$1.V1InitializeContainer=V1InitializeContainer;var V2InitializeContainer$1={};Object.defineProperty(V2InitializeContainer$1,"__esModule",{value:!0}),V2InitializeContainer$1.V2InitializeContainer=void 0;const client_core_1$6=src$1;class V2InitializeContainer{constructor(Le){this._values=Le}getGate(Le){var Ye,tt,nt;const ft=this._getResultFromLookup(this._values.feature_gates,Le);return ft?{name:Le,value:ft.v===!0,rule_id:(Ye=ft.r)!==null&&Ye!==void 0?Ye:"default",secondary_exposures:(tt=ft.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ft.i)!==null&&nt!==void 0?nt:""}:null}getConfig(Le){var Ye,tt,nt,ft;const ht=this._getResultFromLookup(this._values.dynamic_configs,Le);return ht?{name:Le,value:(Ye=this._values.values[ht.v])!==null&&Ye!==void 0?Ye:{},rule_id:ht.r,secondary_exposures:(tt=ht.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ht.i)!==null&&nt!==void 0?nt:"",is_user_in_experiment:ht.ue===!0,passed:ht.p===!0,group_name:(ft=ht.gn)!==null&&ft!==void 0?ft:void 0,is_experiment_active:ht.ea===!0,group:ht.r,is_device_based:ht.i==="stableID"}:null}getLayer(Le){var Ye,tt,nt,ft,ht,gt;const At=this._getResultFromLookup(this._values.layer_configs,Le);return At?{name:Le,value:(Ye=this._values.values[At.v])!==null&&Ye!==void 0?Ye:{},rule_id:At.r,secondary_exposures:(tt=At.s)!==null&&tt!==void 0?tt:[],is_user_in_experiment:At.ue===!0,group_name:(nt=At.gn)!==null&&nt!==void 0?nt:void 0,is_experiment_active:At.ea===!0,group:At.r,is_device_based:At.i==="stableID",allocated_experiment_name:(ft=At.ae)!==null&&ft!==void 0?ft:"",explicit_parameters:(ht=At.ep)!==null&&ht!==void 0?ht:[],undelegated_secondary_exposures:(gt=At.us)!==null&>!==void 0?gt:[],parameter_rule_ids:At.pr}:null}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$6._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V2InitializeContainer$1.V2InitializeContainer=V2InitializeContainer,Object.defineProperty(EvaluationStore$1,"__esModule",{value:!0});const client_core_1$5=src$1,V1InitializeContainer_1=V1InitializeContainer$1,V2InitializeContainer_1=V2InitializeContainer$1;class EvaluationStore{constructor(Le){this._sdkKey=Le,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,client_core_1$5._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(Le,Ye){var tt,nt;if(!Le)return!1;const ft=(0,client_core_1$5._typedJsonParse)(Le.data,"has_updates","EvaluationResponse");return ft==null?!1:(this._source=Le.source,(ft==null?void 0:ft.has_updates)!==!0||((tt=ft.time)!==null&&tt!==void 0?tt:0)<this._lcut||(this._rawValues=Le.data,this._lcut=ft.time,this._receivedAt=Le.receivedAt,ft.response_format==="init-v2"?this._values=new V2InitializeContainer_1.V2InitializeContainer(ft):this._values=new V1InitializeContainer_1.V1InitializeContainer(ft),this._bootstrapMetadata=this._extractBootstrapMetadata(Le.source,ft),Le.source&&ft.user&&this._setWarningState(Ye,ft),client_core_1$5.SDKFlags.setFlags(this._sdkKey,(nt=ft.sdk_flags)!==null&&nt!==void 0?nt:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(Le){const Ye=this._values?this._values.getGate(Le):null;return this._getDetailedStoreResult(Ye)}getConfig(Le){const Ye=this._values?this._values.getConfig(Le):null;return this._getDetailedStoreResult(Ye)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(Le){const Ye=this._values?this._values.getLayer(Le):null;return this._getDetailedStoreResult(Ye)}getParamStore(Le){const Ye=this._values?this._values.getParamStore(Le):null;return this._getDetailedStoreResult(Ye)}getSource(){return this._source}getExposureMapping(){var Le;return(Le=this._values)===null||Le===void 0?void 0:Le.getExposureMapping()}_extractBootstrapMetadata(Le,Ye){if(Le!=="Bootstrap")return null;const tt={};return Ye.user&&(tt.user=Ye.user),Ye.sdkInfo&&(tt.generatorSDKInfo=Ye.sdkInfo),tt.lcut=Ye.time,tt}_getDetailedStoreResult(Le){return{result:Le,details:this._getDetails(Le==null)}}_setWarningState(Le,Ye){var tt,nt;const ft=client_core_1$5.StableID.get(this._sdkKey);if(((tt=Le.customIDs)===null||tt===void 0?void 0:tt.stableID)!==ft&&(!((nt=Le.customIDs)===null||nt===void 0)&&nt.stableID||ft)){this._warnings.add("StableIDMismatch");return}if("user"in Ye){const ht=Ye.user,gt=Object.assign(Object.assign({},Le),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,client_core_1$5._getFullUserHash)(gt)!==(0,client_core_1$5._getFullUserHash)(ht)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const Le={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(Le.warnings=Array.from(this._warnings)),Le}_getDetails(Le){var Ye,tt;const nt=this.getCurrentSourceDetails();let ft=nt.reason;const ht=(Ye=nt.warnings)!==null&&Ye!==void 0?Ye:[];this._source==="Bootstrap"&&ht.length>0&&(ft=ft+ht[0]),ft!=="Uninitialized"&&ft!=="NoValues"&&(ft=`${ft}:${Le?"Unrecognized":"Recognized"}`);const gt=this._source==="Bootstrap"&&(tt=this._bootstrapMetadata)!==null&&tt!==void 0?tt:void 0;return gt&&(nt.bootstrapMetadata=gt),Object.assign(Object.assign({},nt),{reason:ft})}}EvaluationStore$1.default=EvaluationStore;var Network={},EvaluationResponseDeltas={};Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const client_core_1$4=src$1,MAX_DELTAS_SORT_DEPTH=2;function _resolveDeltasResponse(Be,Le){const Ye=(0,client_core_1$4._typedJsonParse)(Le,"checksum","DeltasEvaluationResponse");if(!Ye)return{hadBadDeltaChecksum:!0};const tt=_mergeDeltasIntoCache(Be,Ye),nt=_handleDeletedEntries(tt),ft=(0,client_core_1$4._DJB2Object)({feature_gates:nt.feature_gates,dynamic_configs:nt.dynamic_configs,layer_configs:nt.layer_configs},MAX_DELTAS_SORT_DEPTH);return ft===Ye.checksumV2?JSON.stringify(nt):{hadBadDeltaChecksum:!0,badChecksum:ft,badMergedConfigs:nt,badFullResponse:Ye.deltas_full_response}}EvaluationResponseDeltas._resolveDeltasResponse=_resolveDeltasResponse;function _mergeDeltasIntoCache(Be,Le){return Object.assign(Object.assign(Object.assign({},Be),Le),{feature_gates:Object.assign(Object.assign({},Be.feature_gates),Le.feature_gates),layer_configs:Object.assign(Object.assign({},Be.layer_configs),Le.layer_configs),dynamic_configs:Object.assign(Object.assign({},Be.dynamic_configs),Le.dynamic_configs)})}function _handleDeletedEntries(Be){const Le=Be;return _deleteEntriesInRecord(Be.deleted_gates,Le.feature_gates),delete Le.deleted_gates,_deleteEntriesInRecord(Be.deleted_configs,Le.dynamic_configs),delete Le.deleted_configs,_deleteEntriesInRecord(Be.deleted_layers,Le.layer_configs),delete Le.deleted_layers,Le}function _deleteEntriesInRecord(Be,Le){Be==null||Be.forEach(Ye=>{delete Le[Ye]})}var __awaiter$9=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const client_core_1$3=src$1,EvaluationResponseDeltas_1=EvaluationResponseDeltas;class StatsigNetwork extends client_core_1$3.NetworkCore{constructor(Le,Ye){super(Le,Ye);const tt=Le==null?void 0:Le.networkConfig;this._option=Le,this._initializeUrlConfig=new client_core_1$3.UrlConfiguration(client_core_1$3.Endpoint._initialize,tt==null?void 0:tt.initializeUrl,tt==null?void 0:tt.api,tt==null?void 0:tt.initializeFallbackUrls)}fetchEvaluations(Le,Ye,tt,nt,ft){return __awaiter$9(this,void 0,void 0,function*(){var ht,gt,At,xt,Et,yt;const Ct=Ye?(0,client_core_1$3._typedJsonParse)(Ye,"has_updates","InitializeResponse"):null;let kt={user:nt,hash:(At=(gt=(ht=this._option)===null||ht===void 0?void 0:ht.networkConfig)===null||gt===void 0?void 0:gt.initializeHashAlgorithm)!==null&&At!==void 0?At:"djb2",deltasResponseRequested:!1,full_checksum:null};if(Ct!=null&&Ct.has_updates){const vt=(Ct==null?void 0:Ct.hash_used)!==((yt=(Et=(xt=this._option)===null||xt===void 0?void 0:xt.networkConfig)===null||Et===void 0?void 0:Et.initializeHashAlgorithm)!==null&&yt!==void 0?yt:"djb2");kt=Object.assign(Object.assign({},kt),{sinceTime:ft&&!vt?Ct.time:0,previousDerivedFields:"derived_fields"in Ct&&ft?Ct.derived_fields:{},deltasResponseRequested:!0,full_checksum:Ct.full_checksum,partialUserMatchSinceTime:vt?0:Ct.time})}return this._fetchEvaluations(Le,Ct,kt,tt)})}_fetchEvaluations(Le,Ye,tt,nt){return __awaiter$9(this,void 0,void 0,function*(){var ft,ht;const gt=yield this.post({sdkKey:Le,urlConfig:this._initializeUrlConfig,data:tt,retries:2,isStatsigEncodable:!0,priority:nt});if((gt==null?void 0:gt.code)===204)return'{"has_updates": false}';if((gt==null?void 0:gt.code)!==200)return(ft=gt==null?void 0:gt.body)!==null&&ft!==void 0?ft:null;if((Ye==null?void 0:Ye.has_updates)!==!0||((ht=gt.body)===null||ht===void 0?void 0:ht.includes('"is_delta":true'))!==!0||tt.deltasResponseRequested!==!0)return gt.body;const At=(0,EvaluationResponseDeltas_1._resolveDeltasResponse)(Ye,gt.body);return typeof At=="string"?At:this._fetchEvaluations(Le,Ye,Object.assign(Object.assign(Object.assign({},tt),At),{deltasResponseRequested:!1}),nt)})}}Network.default=StatsigNetwork;var ParamStoreGetterFactory={};Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const client_core_1$2=src$1,NO_EXPOSURE_OPT={disableExposureLog:!0};function _shouldLogExposure(Be){return Be==null||Be.disableExposureLog===!1}function _shouldReturnFallback(Be,Le){return Le!=null&&!(0,client_core_1$2._isTypeMatch)(Be,Le)}function _getMappedStaticValue(Be,Le){return Be.value}function _getMappedGateValue(Be,Le,Ye){return Be.getFeatureGate(Le.gate_name,_shouldLogExposure(Ye)?void 0:NO_EXPOSURE_OPT).value?Le.pass_value:Le.fail_value}function _getMappedDynamicConfigValue(Be,Le,Ye,tt){const ft=Be.getDynamicConfig(Le.config_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedExperimentValue(Be,Le,Ye,tt){const ft=Be.getExperiment(Le.experiment_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedLayerValue(Be,Le,Ye,tt){const ft=Be.getLayer(Le.layer_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _makeParamStoreGetter(Be,Le,Ye){return(tt,nt)=>{if(Le==null)return nt;const ft=Le[tt];if(ft==null||nt!=null&&(0,client_core_1$2._typeOf)(nt)!==ft.param_type)return nt;switch(ft.ref_type){case"static":return _getMappedStaticValue(ft);case"gate":return _getMappedGateValue(Be,ft,Ye);case"dynamic_config":return _getMappedDynamicConfigValue(Be,ft,nt,Ye);case"experiment":return _getMappedExperimentValue(Be,ft,nt,Ye);case"layer":return _getMappedLayerValue(Be,ft,nt,Ye);default:return nt}}}ParamStoreGetterFactory._makeParamStoreGetter=_makeParamStoreGetter;var StatsigEvaluationsDataAdapter$1={},__awaiter$8=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter$1,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=void 0;const client_core_1$1=src$1,Network_1$1=Network;class StatsigEvaluationsDataAdapter extends client_core_1$1.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(Le,Ye,tt){super.attach(Le,Ye,tt),tt!==null&&tt instanceof Network_1$1.default?this._network=tt:this._network=new Network_1$1.default(Ye??{})}getDataAsync(Le,Ye,tt){return this._getDataAsyncImpl(Le,(0,client_core_1$1._normalizeUser)(Ye,this._options),tt)}prefetchData(Le,Ye){return this._prefetchDataImpl(Le,Ye)}setData(Le){const Ye=(0,client_core_1$1._typedJsonParse)(Le,"has_updates","data");Ye&&"user"in Ye?super.setData(Le,Ye.user):client_core_1$1.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(Le,Ye){super.setData(Le,Ye)}_fetchFromNetwork(Le,Ye,tt,nt){return __awaiter$8(this,void 0,void 0,function*(){var ft;const ht=yield(ft=this._network)===null||ft===void 0?void 0:ft.fetchEvaluations(this._getSdkKey(),Le,tt==null?void 0:tt.priority,Ye,nt);return ht??null})}_getCacheKey(Le){var Ye;const tt=(0,client_core_1$1._getStorageKey)(this._getSdkKey(),Le,(Ye=this._options)===null||Ye===void 0?void 0:Ye.customUserCacheKeyFunc);return`${client_core_1$1.DataAdapterCachePrefix}.${this._cacheSuffix}.${tt}`}_isCachedResultValidFor204(Le,Ye){return Le.fullUserHash!=null&&Le.fullUserHash===(0,client_core_1$1._getFullUserHash)(Ye)}}StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=StatsigEvaluationsDataAdapter;var __awaiter$7=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClient$1,"__esModule",{value:!0});const client_core_1=src$1,EvaluationStore_1=EvaluationStore$1,Network_1=Network,ParamStoreGetterFactory_1=ParamStoreGetterFactory,StatsigEvaluationsDataAdapter_1=StatsigEvaluationsDataAdapter$1;class StatsigClient extends client_core_1.StatsigClientBase{static instance(Le){const Ye=(0,client_core_1._getStatsigGlobal)().instance(Le);return Ye instanceof StatsigClient?Ye:(client_core_1.Log.warn((0,client_core_1._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new StatsigClient(Le??"",{}))}constructor(Le,Ye,tt=null){var nt,ft;client_core_1.SDKType._setClientType(Le,"javascript-client");const ht=new Network_1.default(tt,At=>{this.$emt(At)});super(Le,(nt=tt==null?void 0:tt.dataAdapter)!==null&&nt!==void 0?nt:new StatsigEvaluationsDataAdapter_1.StatsigEvaluationsDataAdapter,ht,tt),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(client_core_1.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(client_core_1.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(client_core_1.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(client_core_1.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(client_core_1.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(client_core_1.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new EvaluationStore_1.default(Le),this._network=ht,this._user=this._configureUser(Ye,tt),this._sdkInstanceID=(0,client_core_1.getUUID)();const gt=(ft=tt==null?void 0:tt.plugins)!==null&&ft!==void 0?ft:[];for(const At of gt)At.bind(this)}initializeSync(Le){var Ye;return this.loadingStatus!=="Uninitialized"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(Ye=this._store.getWarnings())!==null&&Ye!==void 0?Ye:[]]):(this._logger.start(),this.updateUserSync(this._user,Le))}initializeAsync(Le){return __awaiter$7(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(Le),this._initializePromise)})}updateUserSync(Le,Ye){const tt=performance.now();try{return this._updateUserSyncImpl(Le,Ye,tt)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}}_updateUserSyncImpl(Le,Ye,tt){var nt;const ft=[...(nt=this._store.getWarnings())!==null&&nt!==void 0?nt:[]];this._resetForUser(Le);const ht=this.dataAdapter.getDataSync(this._user);ht==null&&ft.push("NoCachedValues"),this._store.setValues(ht,this._user),this._finalizeUpdate(ht);const gt=Ye==null?void 0:Ye.disableBackgroundCacheRefresh;return gt===!0||gt==null&&(ht==null?void 0:ht.source)==="Bootstrap"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft):(this._runPostUpdate(ht??null,this._user),(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft))}updateUserAsync(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){const tt=performance.now();try{return yield this._updateUserAsyncImpl(Le,Ye)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}})}_updateUserAsyncImpl(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){this._resetForUser(Le);const tt=this._user;client_core_1.Diagnostics._markInitOverallStart(this._sdkKey);let nt=this.dataAdapter.getDataSync(tt);if(this._store.setValues(nt,this._user),this._setStatus("Loading",nt),nt=yield this.dataAdapter.getDataAsync(nt,tt,Ye),tt!==this._user)return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let ft=!1;nt!=null&&(client_core_1.Diagnostics._markInitProcessStart(this._sdkKey),ft=this._store.setValues(nt,this._user),client_core_1.Diagnostics._markInitProcessEnd(this._sdkKey,{success:ft})),this._finalizeUpdate(nt),ft||(this._errorBoundary.attachErrorIfNoneExists(client_core_1.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),client_core_1.Diagnostics._markInitOverallEnd(this._sdkKey,ft,this._store.getCurrentSourceDetails());const ht=client_core_1.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,client_core_1.createUpdateDetails)(ft,this._store.getSource(),ht,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:client_core_1.StatsigSession.get(this._sdkKey),stableID:client_core_1.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(Le,Ye){return this.getFeatureGate(Le,Ye).value}logEvent(Le,Ye,tt){const nt=typeof Le=="string"?{eventName:Le,value:Ye,metadata:tt}:Le;this.$emt({name:"log_event_called",event:nt}),this._logger.enqueue(Object.assign(Object.assign({},nt),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(Le){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:Le}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(Le){return __awaiter$7(this,void 0,void 0,function*(){return client_core_1.Storage.isReady()||(yield client_core_1.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,Le)})}_createErrorUpdateDetails(Le,Ye){var tt;return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),performance.now()-Ye,Le,null,[...(tt=this._store.getWarnings())!==null&&tt!==void 0?tt:[]])}_finalizeUpdate(Le){this._store.finalize(),this._setStatus("Ready",Le)}_runPostUpdate(Le,Ye){this.dataAdapter.getDataAsync(Le,Ye,{priority:"low"}).catch(tt=>{client_core_1.Log.error("An error occurred after update.",tt)})}_resetForUser(Le){this._logger.reset(),this._store.reset(),this._user=this._configureUser(Le,this._options)}_configureUser(Le,Ye){var tt,nt,ft;const ht=(0,client_core_1._normalizeUser)(Le,Ye),gt=(tt=ht.customIDs)===null||tt===void 0?void 0:tt.stableID;if(gt){const At=(ft=(nt=this.storageProvider).isReadyResolver)===null||ft===void 0?void 0:ft.call(nt);At?At.then(()=>client_core_1.StableID.setOverride(gt,this._sdkKey),()=>client_core_1.StableID.setOverride(gt,this._sdkKey)):client_core_1.StableID.setOverride(gt,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(ht.analyticsOnlyMetadata=Object.assign(Object.assign({},ht.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),ht}_getFeatureGateImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getGate(Le),gt=(0,client_core_1._makeFeatureGate)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getGateOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createGateExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"gate_evaluation",gate:xt}),xt}_getDynamicConfigImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getConfig(Le),gt=(0,client_core_1._makeDynamicConfig)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getDynamicConfigOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:xt}),xt}_getExperimentImpl(Le,Ye){var tt,nt,ft,ht;const{result:gt,details:At}=this._store.getConfig(Le),xt=(0,client_core_1._makeExperiment)(Le,At,gt);xt.__evaluation!=null&&(xt.__evaluation.secondary_exposures=(0,client_core_1._mapExposures)((nt=(tt=xt.__evaluation)===null||tt===void 0?void 0:tt.secondary_exposures)!==null&&nt!==void 0?nt:[],this._store.getExposureMapping()));const Et=(ht=(ft=this.overrideAdapter)===null||ft===void 0?void 0:ft.getExperimentOverride)===null||ht===void 0?void 0:ht.call(ft,xt,this._user,Ye),yt=Et??xt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,yt,this._store.getExposureMapping()),Ye),this.$emt({name:"experiment_evaluation",experiment:yt}),yt}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(Le,Ye){var tt,nt,ft;const{result:ht,details:gt}=this._store.getLayer(Le),At=(0,client_core_1._makeLayer)(Le,gt,ht),xt=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getLayerOverride)===null||nt===void 0?void 0:nt.call(tt,At,this._user,Ye);Ye!=null&&Ye.disableExposureLog&&this._logger.incrementNonExposureCount(Le);const Et=(0,client_core_1._mergeOverride)(At,xt,(ft=xt==null?void 0:xt.__value)!==null&&ft!==void 0?ft:At.__value,yt=>{Ye!=null&&Ye.disableExposureLog||this._enqueueExposure(Le,(0,client_core_1._createLayerParameterExposure)(this._user,Et,yt,this._store.getExposureMapping()),Ye)});return this.$emt({name:"layer_evaluation",layer:Et}),Et}_getParameterStoreImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getParamStore(Le);this._logger.incrementNonExposureCount(Le);const gt={name:Le,details:ht,__configuration:ft,get:(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,ft,Ye)},At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getParamStoreOverride)===null||nt===void 0?void 0:nt.call(tt,gt,Ye);return At!=null&&(gt.__configuration=At.config,gt.details=At.details,gt.get=(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,At.config,Ye)),gt}}StatsigClient$1.default=StatsigClient,function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,gt,At,xt){xt===void 0&&(xt=At);var Et=Object.getOwnPropertyDescriptor(gt,At);(!Et||("get"in Et?!gt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return gt[At]}}),Object.defineProperty(ht,xt,Et)}:function(ht,gt,At,xt){xt===void 0&&(xt=At),ht[xt]=gt[At]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,gt){for(var At in ht)At!=="default"&&!Object.prototype.hasOwnProperty.call(gt,At)&&Le(gt,ht,At)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigClient=void 0;const tt=src$1,nt=StatsigClient$1;Be.StatsigClient=nt.default,Ye(src$1,Be);const ft=Object.assign((0,tt._getStatsigGlobal)(),{StatsigClient:nt.default});Be.default=ft}(src$2);const FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","new_id_capture_ux_least_risky_clients","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id"],GLOBAL_FLAGS=["new_fingerprint"],ID_MODULE_FLAGS=["id_face_readability","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web"];function getStatsigEnvironment(Be){return isStageK8sEnv(Be)?{tier:"development"}:isStageEnv(Be)||isDemoEnv(Be)?{tier:"staging"}:isSaasEnv(Be)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,new_id_capture_ux_least_risky_clients:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(initPromise)return initPromise;initPromise=(async()=>{var gt;const ft={customIDs:{client_api_key:Le,hashed_onboarding_id:Ye,flow_id:Be},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise},getFeatureFlag=Be=>featureFlagsValues[Be]??!1,getModuleFeatureFlags=async Be=>{const Le={};GLOBAL_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]});const Ye=Be.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}),Le};function IdCaptureParamsConfigurator(Be,Le,Ye,tt){Object.assign(Be,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:tt?3e3:2e3,minFaceIdQualityScore:.62})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:!1,faceOcclusionThreshold:.3}}const getProfiles=()=>[new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new PipelineProfile(WasmPipelineType.IdBarcodeAndTextQualityPipeline,PipelineProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new PipelineProfile(WasmPipelineType.IdVideoSelfiePipeline,PipelineProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new PipelineProfile(WasmPipelineType.SelfieWithQualityMetrics,PipelineProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile")];function getProfile(Be){const Le=getProfiles().find(Ye=>Ye.name===Be);if(!Le)throw new Error(`Profile not found for type: ${Be}`);return Le}const wasmVersion="v2.12.44";function generateBundle(){const Be=getFeatureFlag("id_text_barcode_readability")?PipelineProfileName.IdCapture_3_02:getFeatureFlag("id_model_hebrew_back_id")?PipelineProfileName.IdCapture_2_02:PipelineProfileName.IdCapture_2_01,Le=PipelineProfileName.SelfieWithQualityMetrics,Ye=PipelineProfileName.SelfieVideoSelfie,tt=PipelineProfileName.IdVideoSelfie_2_01;return[Be,tt,Le,Ye]}function getInitializationParams(){const Le=generateBundle(),Ye="https://d3vv997wtl2myz.cloudfront.net/webcamera/onnx-backend-wasm",tt=`${Ye}/${wasmVersion}/webLib.wasm`,nt=`${Ye}/${wasmVersion}/webLibSimd.wasm`,ft=`${Ye}/${wasmVersion}/webLib.js`,ht=`${Ye}/${wasmVersion}/versions.json`;let gt=new Map,At=new Map;for(const xt of Le){const Et=getProfile(xt);if(!Et)throw new Error(`Profile not found: ${xt}`);const yt=Et.modelNames;let Ct=[];for(const kt of yt)Ct.push(`${Ye}/${wasmVersion}/models/${kt}`);gt.set(Et.pipelineType,Ct),At.set(Et.detectionType,Et)}return{wasmModulePath:tt,wasmSimdModulePath:nt,glueCodePath:ft,versionsFilePath:ht,pipelineModels:gt,enableSIMD:!0,profiles:At,wasmVersion}}window.wasmArrayBuffer=null;class MlWasmJSApi{constructor(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.wasmModule=null,this.pipelineApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceDetectionWasmApi=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallMutex=new Mutex,this.Module=null,this.loadModule=async Le=>{this.Module=(await import(Le)).Module}}async initialize(Le,Ye,tt,nt,ft,ht){await this.freeResources(),this.pipelines_=ht,this.versionsFile=ft,await this.loadModule(tt);const gt=await this.loadWasm(nt,Le,Ye);return this.pipelineApiUtilities=new this.wasmModule.PipelineApiUtilities,this.utilityApi=new this.wasmModule.UtilityApi,this.idCaptureWasmApi=new this.wasmModule.IdCaptureApi,this.faceDetectionWasmApi=new this.wasmModule.FaceDetectionApi,this.isInitialized_=!0,gt}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}isInitialized(){return this.pipelineApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceDetectionWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Le,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Le&&Ye&&Le==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Le*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Le,this.imageHeight_=Ye,this.inputImageBuffer=this.pipelineApiUtilities.allocateInputImageBuffer(Le,Ye,4))}async handleDetectionCallAndUpdateState(Le){this.checkWasmInitialization("Unable to update pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.handleDetectionCallAndUpdateState(this.pipelineTypeToWasmEnum(Le))}encryptImage(Le){return this.checkWasmInitialization("Unable to encrypt the image, cpp API hasn't been initialized"),this.utilityApi.encryptImage(Le)}isVirtualCamera(Le){if(this.checkWasmInitialization("Unable to check if the camera is virtual, cpp API hasn't been initialized"),Le)return this.utilityApi.isVirtualCamera(Le)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Le){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Le.width,Le.height),this.inputImageBuffer.set(Le.data),this.utilityApi.analyzeFrame()}async freeResources(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,window.wasmArrayBuffer=null,this.pipelineApiUtilities&&typeof this.pipelineApiUtilities.delete=="function"&&(this.pipelineApiUtilities.delete(),this.pipelineApiUtilities=null),this.utilityApi&&typeof this.utilityApi.delete=="function"&&(this.utilityApi.delete(),this.utilityApi=null),this.idCaptureWasmApi&&typeof this.idCaptureWasmApi.delete=="function"&&(this.idCaptureWasmApi.delete(),this.idCaptureWasmApi=null),this.faceDetectionWasmApi&&typeof this.faceDetectionWasmApi.delete=="function"&&(this.faceDetectionWasmApi.delete(),this.faceDetectionWasmApi=null),this.wasmModule=null,this.isInitialized_=!1}resetPipeline(Le){this.checkWasmInitialization("Unable to reset pipeline, cpp API hasn't been initialized"),this.pipelineApiUtilities.resetPipeline(this.pipelineTypeToWasmEnum(Le))}resetAllPipelines(){this.checkWasmInitialization("Unable to reset pipelines, cpp API hasn't been initialized");for(const[Le,Ye]of this.pipelines_)this.resetPipeline(Le)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllPipelines(),this.resetOther()}async process(Le,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");switch(this.inputImageBuffer.set(Le.data),Ye){case WasmPipelineType.IdBlurGlarePipeline:case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.idCaptureWasmApi.runIdCapturePipeline(this.pipelineTypeToWasmEnum(Ye));case WasmPipelineType.IdFaceDetectionPipeline:return this.faceDetectionWasmApi.runIdFaceDetectionPipeline();case WasmPipelineType.IdVideoSelfiePipeline:return this.idCaptureWasmApi.runIdVideoSelfiePipeline();case WasmPipelineType.SelfieWithAggregationMetrics:case WasmPipelineType.SelfieWithQualityMetrics:return this.faceDetectionWasmApi.runSelfieFaceDetectionPipeline(this.pipelineTypeToWasmEnum(Ye));default:throw new Error("Unknown pipeline type")}}async runIdCapture(Le){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Le){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.faceDetectionWasmApi.runSelfieCapture()}async setFacePositionConstraints(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFacePositionConstraints(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceDetectionThresholds(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set face detection thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}async setFaceAttributesThresholds(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceAttributesThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceChecksEnabled(Le,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceChecksEnabled(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht)}async setFaceDetectionMode(Le,Ye){this.checkWasmInitialization("Unable to set face detection mode, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionMode(this.pipelineTypeToWasmEnum(Le),Ye)}async setFaceDetectionCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt){this.checkWasmInitialization("Unable to set face detection callbacks, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt)}async setIdCaptureThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt)}async setIdCaptureCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt)}async setIdCaptureGeometryParams(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt)}async setIdCaptureConfigParams(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}setIdCaptureModelType(Le,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.pipelineTypeToWasmEnum(Le),this.IdCaptureModelTypeToWasmEnum(Ye))}IdPerspectiveTransform(Le,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Le,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadWasm(Le,Ye,tt){const nt=Le?tt:Ye;try{window.wasmArrayBuffer=await fetch(nt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),this.wasmModule=await this.Module()}catch(ft){if(console.log(ft,Le,"useSmd"),Le)return await this.loadWasm(!1,Ye,tt);throw ft}return Le}async loadModels(){var nt;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Le=new this.wasmModule.PipelineTypeToIntMap,Ye=new Map,tt=new Map;for(let[ft,ht]of this.pipelines_){let gt=this.pipelineTypeToWasmEnum(ft),At=[],xt=new this.wasmModule.VectorInt;for(let Et of ht){if(!tt.has(Et)){let Ct=await fetch(Et).then(kt=>kt.arrayBuffer()).then(kt=>new Uint8Array(kt));tt.set(Et,Ct)}let yt=tt.get(Et);xt.push_back(yt.byteLength),At.push(yt)}Le.set(gt,xt),Ye.set(gt,At)}this.modelsBuffers=this.pipelineApiUtilities.allocateModelsBuffers(Le);for(let[ft,ht]of Ye){let gt=(nt=this.modelsBuffers)==null?void 0:nt.get(ft);for(let At=0;At<gt.size();At++){let xt=gt==null?void 0:gt.get(At);if(xt)xt.set(ht[At]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializePipelines(){this.checkWasmInitialization("Unable to initialize pipelines, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.pipelineApiUtilities.initializePipelines()}async setProductionMode(Le){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Le)}getPipelineState(){return this.checkWasmInitialization("Unable to get pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.getPipelineState()}getCurrentPipeline(){return this.checkWasmInitialization("Unable to get current pipeline, cpp API hasn't been initialized"),this.pipelineTypeFromWasmEnum(this.pipelineApiUtilities.getCurrentPipeline())}setSdkVersion(Le){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Le)}setSdkPlatform(Le){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Le)}setDeviceInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Le,Ye)}setBrowserInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Le,Ye)}setCameraInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Le,Ye)}setZc(Le){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Le)}setMotionStatus(Le){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Le)}setMetadataField(Le,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Le,Ye)}setInspectorOpened(Le){this.inspectorOpened_=Le}setBackgroundMode(Le){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Le)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(){return this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.prc.bind(this.utilityApi),[])}async poc(Le){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.poc.bind(this.utilityApi),[Le])}pipelineTypeToWasmEnum(Le){switch(Le){case WasmPipelineType.IdBlurGlarePipeline:return this.wasmModule.PipelineType.IdBlurGlarePipeline;case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.wasmModule.PipelineType.IdBarcodeAndTextQualityPipeline;case WasmPipelineType.IdFaceDetectionPipeline:return this.wasmModule.PipelineType.IdFaceDetectionPipeline;case WasmPipelineType.IdVideoSelfiePipeline:return this.wasmModule.PipelineType.IdVideoSelfiePipeline;case WasmPipelineType.SelfieWithAggregationMetrics:return this.wasmModule.PipelineType.SelfieWithAggregationMetrics;case WasmPipelineType.SelfieWithQualityMetrics:return this.wasmModule.PipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}pipelineTypeFromWasmEnum(Le){switch(Le){case this.wasmModule.PipelineType.IdBlurGlarePipeline:return WasmPipelineType.IdBlurGlarePipeline;case this.wasmModule.IdBarcodeAndTextQualityPipeline:return WasmPipelineType.IdBarcodeAndTextQualityPipeline;case this.wasmModule.PipelineType.IdFaceDetectionPipeline:return WasmPipelineType.IdFaceDetectionPipeline;case this.wasmModule.PipelineType.IdVideoSelfiePipeline:return WasmPipelineType.IdVideoSelfiePipeline;case this.wasmModule.PipelineType.SelfieWithAggregationMetrics:return WasmPipelineType.SelfieWithAggregationMetrics;case this.wasmModule.PipelineType.SelfieWithQualityMetrics:return WasmPipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}IdCaptureModelTypeToWasmEnum(Le){switch(Le){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Le){if(!this.isInitialized())throw new Error(Le)}async wasmCallWrapper(Le,Ye=[]){return await this.wasmCallMutex.withLock(async(...tt)=>{let nt=!1;try{for(;;){if(nt=Le(...tt),nt)return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){console.log("Error in wasmCallWrapper:",ft)}},...Ye)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),version$4="1.85.0-20251216181218.0";function e$2(Be,Le){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Be,Le)?Be[Le]:void 0}function t$2(Be,Le,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Be,location.href),{blockedURI:yt}=xt;yt!==Et.href&&yt!==Et.protocol.slice(0,-1)&&yt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Le).then(xt=>(At(),xt),xt=>new Promise(Et=>{const yt=new MessageChannel;yt.port1.onmessage=()=>Et(),yt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Be){let Le="";for(let Ye=0;Ye<Be.length;++Ye)if(Ye>0){const tt=Be[Ye].toLowerCase();tt!==Be[Ye]?Le+=` ${tt}`:Le+=Be[Ye]}else Le+=Be[Ye].toUpperCase();return Le}const r$4={default:"endpoint"},o$1={default:"tlsEndpoint"},i$5="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$e=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$d="API key required",m$2="API key not found",A$1="API key expired",w$e="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$d,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Be,Le){const Ye=[],[tt,nt]=function(gt){const At=function(yt){const Ct=[...yt];return{current:()=>Ct[0],postpone(){const kt=Ct.shift();kt!==void 0&&Ct.push(kt)},exclude(){Ct.shift()}}}(gt),xt=function(yt,Ct){let kt=0;return()=>Math.random()*Math.min(Ct,yt*Math.pow(2,kt++))}(100,3e3),Et=new Set;return[At.current(),(yt,Ct)=>{let kt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),kt=0;else if(vt===K)At.exclude();else if(vt===M$1){const It=Date.now()-yt.getTime()<50,wt=At.current();wt&&It&&!Et.has(wt)&&(Et.add(wt),kt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,kt??yt.getTime()+xt()-Date.now()]}]}(Be);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=yt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:yt}),Et=Le(gt);return Et.then(()=>xt(),xt),Et.catch(yt=>{if(ft!=null||(ft=yt),Ye.length>=5)throw ft;const Ct=nt(At,yt);if(!Ct)throw ft;const[kt,vt]=Ct;return(bt=vt,new Promise(It=>setTimeout(It,bt))).then(()=>ht(kt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Be){var Le,Ye;const{picked:tt,rest:nt}=function(Et,yt){const Ct={},kt={};for(const[vt,bt]of Object.entries(Et))yt.includes(vt)?Ct[vt]=bt:kt[vt]=bt;return{picked:Ct,rest:kt}}(Be,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Le=tt.apiKey)!==null&&Le!==void 0?Le:ft,gt=(Ye=e$2(Be,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],yt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(kt,vt,bt,It){return kt.addEventListener(vt,bt,It),()=>kt.removeEventListener(vt,bt,It)}(document,"visibilitychange",yt);return yt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$d);const Et=function(yt,Ct){return(Array.isArray(yt)?yt:[yt]).map(kt=>function(vt,bt){const It=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?It(bt):wt==="<loaderVersion>"?It(b$2):wt)}(String(kt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(yt){return yt instanceof Error&&yt.message===K?new Error(M$1):yt}(Et)}).then(([Et,yt])=>(xt(),Et.load({...nt,ldi:{attempts:yt,visibilityStates:At}})))}function F$1(Be){return t$2(Be,()=>function(Le){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Le))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Le,ht.appendChild(nt)})}(Be),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Be=window,Le="__fpjs_p_l_b",Ye=Be[Le];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Be,Le),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$d,ERROR_BAD_REQUEST_FORMAT:w$e,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$5,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$e,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$4,defaultTlsEndpoint:o$1};function e$1(Be,Le,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(yt){yt(Et)})).then(ht,gt)}At((tt=tt.apply(Be,[])).next())})}function n$1(Be,Le){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Le.call(Be,ht)}catch(yt){Et=[6,yt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$3={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$4=function(Be,Le){typeof window<"u"&&(o[Be]=Le)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Be){var Le,Ye=Be[0];return!(!((Le=r$3==null?void 0:r$3.exclude)===null||Le===void 0)&&Le.includes(Ye))}).filter(function(Be){var Le,Ye,tt,nt,ft=Be[0];return!((Le=r$3==null?void 0:r$3.include)===null||Le===void 0)&&Le.some(function(ht){return ht.includes(".")})?(Ye=r$3==null?void 0:r$3.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$3==null?void 0:r$3.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$3==null?void 0:r$3.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Be){return[Be[0],(0,Be[1])()]}))};function c$2(Be){return Be^=Be>>>16,Be=Math.imul(Be,2246822507),Be^=Be>>>13,Be=Math.imul(Be,3266489909),(Be^=Be>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Be,Le){return Be<<Le|Be>>>32-Le}function d(Be,Le){var Ye;if(Le===void 0&&(Le=0),Le=Le?0|Le:0,typeof Be=="string"&&(Ye=Be,Be=new TextEncoder().encode(Ye).buffer),!(Be instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Le,Le,Le,Le]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Be,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Be,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Be,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Be,Le){return new Promise(function(Ye){setTimeout(function(){return Ye(Le)},Be)})}function m$1(Be,Le,Ye){return Promise.all(Be.map(function(tt){return Promise.race([tt,f$1(Le,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Be,Le,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Be=u(),Le=Object.keys(Be),[4,m$1(Object.values(Be),(r$3==null?void 0:r$3.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Le[gt]]=ht}),[2,p(nt,r$3.exclude||[],r$3.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Be,Le,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var yt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Le.some(function(bt){return yt.startsWith(bt)}),kt=Ye.some(function(bt){return yt.startsWith(bt)});Ct&&!kt||(nt[xt]=Et)}else{var vt=p(Et,Le,Ye,yt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Be);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$d(Be){return e$1(this,void 0,void 0,function(){var Le,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Le=tt.sent(),Ye=d(JSON.stringify(Le)),Math.random()<1e-5&&r$3.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Le),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Be=navigator.userAgent,Le={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Be.match(nt);if(ft&&ft.groups)return{name:Le[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Be){for(var Le=0,Ye=0;Ye<Be.length;++Ye)Le+=Math.abs(Be[Ye]);return Le}var M=b$1();function E(Be,Le,Ye){for(var tt=[],nt=0;nt<Be[0].data.length;nt++){for(var ft=[],ht=0;ht<Be.length;ht++)ft.push(Be[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Le,Ye)}function P(Be){if(Be.length===0)return 0;for(var Le={},Ye=0,tt=Be;Ye<tt.length;Ye++)Le[ft=tt[Ye]]=(Le[ft]||0)+1;var nt=Be[0];for(var ft in Le)Le[ft]>Le[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$4("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Be){return[2,new Promise(function(Le,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Le({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$4("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Be){var Le=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Be({commonImageDataHash:d(E(Le,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Be,Le){if(!Be)throw new Error("Canvas context not supported");return Be.font,Be.font="72px ".concat(Le),Be.measureText("WwMmLli0Oo").width}function _$1(){var Be,Le=document.createElement("canvas"),Ye=(Be=Le.getContext("webgl"))!==null&&Be!==void 0?Be:Le.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Be=new Float32Array(1),Le=new Uint8Array(Be.buffer);return Be[0]=1/0,Be[0]=Be[0]-Be[0],Le[3]}function B(Be,Le){var Ye={};return Le.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Be.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Be=[],Le={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Le).forEach(function(Ye){Le[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Be.push("".concat(Ye,": ").concat(tt))})}),Be}b$1().name!="Firefox"&&i$4("fonts",function(){var Be=this;return new Promise(function(Le,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(yt){return setTimeout(yt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Be,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var yt=L(ht,Et);gt.includes(yt)||(At[Et]=yt)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$4("hardware",function(){return new Promise(function(Be,Le){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Be({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$4("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$4("permissions",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){return k=(r$3==null?void 0:r$3.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Be=Array.from({length:(r$3==null?void 0:r$3.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Be).then(function(Ye){return B(Ye,k)})]})})}),i$4("plugins",function(){var Be=[];if(navigator.plugins)for(var Le=0;Le<navigator.plugins.length;Le++){var Ye=navigator.plugins[Le];Be.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Be})})}),i$4("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$4("system",function(){return new Promise(function(Be){var Le=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Le.name,version:Le.version}};Le.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Be(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$4("webgl",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Be=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
66
|
+
`;typeof Promise.withResolvers!="function"&&(Promise.withResolvers=()=>{let Be,Le;return{promise:new Promise((tt,nt)=>{Be=tt,Le=nt}),resolve:Be,reject:Le}});class InterruptionHandler{constructor(){this.boundVisibilityChange=this.handleVisibilityChange.bind(this),this.boundOnline=this.handleOnline.bind(this),this.boundOffline=this.handleOffline.bind(this),this.boundUnhandledRejection=this.handleUnhandledRejection.bind(this),this.boundError=this.handleError.bind(this),this.initialized=!1}registerEventListeners(){this.initialized||(document.addEventListener("visibilitychange",this.boundVisibilityChange),window.addEventListener("online",this.boundOnline),window.addEventListener("offline",this.boundOffline),window.addEventListener("unhandledrejection",this.boundUnhandledRejection),window.addEventListener("error",this.boundError),this.initialized=!0)}removeEventListeners(){this.initialized&&(this.initialized=!1,document.removeEventListener("visibilitychange",this.boundVisibilityChange),window.removeEventListener("online",this.boundOnline),window.removeEventListener("offline",this.boundOffline),window.removeEventListener("unhandledrejection",this.boundUnhandledRejection),window.removeEventListener("error",this.boundError))}handleVisibilityChange(){document.hidden?this.onAppHidden():this.onAppVisible()}onAppHidden(){}onAppVisible(){}handleOnline(){}handleOffline(){}handleUnhandledRejection(Le){}handleError(Le){}}const regex$1={CURP_PATTERN:/^([A-Z][AEIOUX][A-Z]{2}\d{2}(?:0[1-9]|1[0-2])(?:0[1-9]|[12]\d|3[01])[HMX](?:AS|B[CS]|C[CLMSH]|D[FG]|G[TR]|HG|JC|M[CNS]|N[ETL]|OC|PL|Q[TR]|S[PLR]|T[CSL]|VZ|YN|ZS)[B-DF-HJ-NP-TV-Z]{3}[A-Z\d])(\d)$/,EMAIL_PATTERN:/^[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}$/i,SSN_PATTERN:/^\d{3}-?\d{2}-?\d{4}$/};function webgl(){let Be,Le,Ye=256,tt=128;Be=document.body.appendChild(document.createElement("canvas")),Be.width=Ye,Be.height=tt;try{Le=Be.getContext("webgl2")||Be.getContext("experimental-webgl2")||Be.getContext("webgl")||Be.getContext("experimental-webgl")||Be.getContext("moz-webgl");const nt="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",ft="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",ht=Le.createBuffer();Le.bindBuffer(Le.ARRAY_BUFFER,ht);const gt=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.7321,0]);Le.bufferData(Le.ARRAY_BUFFER,gt,Le.STATIC_DRAW),ht.itemSize=3,ht.numItems=3;const At=Le.createProgram(),xt=Le.createShader(Le.VERTEX_SHADER);Le.shaderSource(xt,nt),Le.compileShader(xt);const Et=Le.createShader(Le.FRAGMENT_SHADER);Le.shaderSource(Et,ft),Le.compileShader(Et),Le.attachShader(At,xt),Le.attachShader(At,Et),Le.linkProgram(At),Le.useProgram(At),At.vertexPosAttrib=Le.getAttribLocation(At,"attrVertex"),At.offsetUniform=Le.getUniformLocation(At,"uniformOffset"),Le.enableVertexAttribArray(At.vertexPosAttrib),Le.vertexAttribPointer(At.vertexPosAttrib,ht.itemSize,Le.FLOAT,!1,0,0),Le.uniform2f(At.offsetUniform,1,1),Le.drawArrays(Le.TRIANGLE_STRIP,0,ht.numItems);let yt="";const Ct=new Uint8Array(Ye*tt*4);return Le.readPixels(0,0,Ye,tt,Le.RGBA,Le.UNSIGNED_BYTE,Ct),yt=JSON.stringify(Ct).replace(/,?"[0-9]+":/g,""),document.body.removeChild(Be),sha256(yt)}catch{return""}}const sha256=(()=>{let Be=1,Le,Ye=[],tt=[];for(;++Be<18;)for(Le=Be*Be;Le<312;Le+=Be)Ye[Le]=1;function nt(gt,At){return Math.pow(gt,1/At)%1*4294967296|0}for(Be=1,Le=0;Be<313;)Ye[++Be]||(tt[Le]=nt(Be,2),Ye[Le++]=nt(Be,3));function ft(gt,At){return gt>>>At|gt<<32-At}function ht(gt){let At=tt.slice(Be=0),xt=unescape(encodeURI(gt)),Et=[],yt=xt.length,Ct=[],kt,vt,bt;for(;Be<yt;)Ct[Be>>2]|=(xt.charCodeAt(Be)&255)<<8*(3-Be++%4);for(yt*=8,Ct[yt>>5]|=128<<24-yt%32,Ct[bt=yt+64>>5|15]=yt,Be=0;Be<bt;Be+=16){for(kt=At.slice(Le=0,8);Le<64;kt[4]+=vt)Le<16?Et[Le]=Ct[Le+Be]:Et[Le]=(ft(vt=Et[Le-2],17)^ft(vt,19)^vt>>>10)+(Et[Le-7]|0)+(ft(vt=Et[Le-15],7)^ft(vt,18)^vt>>>3)+(Et[Le-16]|0),kt.unshift((vt=(kt.pop()+(ft(gt=kt[4],6)^ft(gt,11)^ft(gt,25))+((gt&kt[5]^~gt&kt[6])+Ye[Le])|0)+(Et[Le++]|0))+(ft(yt=kt[0],2)^ft(yt,13)^ft(yt,22))+(yt&kt[1]^kt[1]&kt[2]^kt[2]&yt));for(Le=8;Le--;)At[Le]=kt[Le]+At[Le]}for(xt="";Le<63;)xt+=(At[++Le>>3]>>4*(7-Le%8)&15).toString(16);return xt}return ht})();var store;function getGlobalConfig$1(Be){return{lang:store==null?void 0:store.lang,message:Be==null?void 0:Be.message,abortEarly:store==null?void 0:store.abortEarly,abortPipeEarly:store==null?void 0:store.abortPipeEarly}}var store2;function getGlobalMessage$1(Be){return store2==null?void 0:store2.get(Be)}var store3;function getSchemaMessage$1(Be){return store3==null?void 0:store3.get(Be)}var store4;function getSpecificMessage$1(Be,Le){var Ye;return(Ye=store4==null?void 0:store4.get(Be))==null?void 0:Ye.get(Le)}function _stringify$4(Be){var Ye,tt;const Le=typeof Be;return Le==="string"?`"${Be}"`:Le==="number"||Le==="bigint"||Le==="boolean"?`${Be}`:Le==="object"||Le==="function"?(Be&&((tt=(Ye=Object.getPrototypeOf(Be))==null?void 0:Ye.constructor)==null?void 0:tt.name))??"null":Le}function _addIssue$1(Be,Le,Ye,tt,nt){const ft=nt&&"input"in nt?nt.input:Ye.value,ht=(nt==null?void 0:nt.expected)??Be.expects??null,gt=(nt==null?void 0:nt.received)??_stringify$4(ft),At={kind:Be.kind,type:Be.type,input:ft,expected:ht,received:gt,message:`Invalid ${Le}: ${ht?`Expected ${ht} but r`:"R"}eceived ${gt}`,requirement:Be.requirement,path:nt==null?void 0:nt.path,issues:nt==null?void 0:nt.issues,lang:tt.lang,abortEarly:tt.abortEarly,abortPipeEarly:tt.abortPipeEarly},xt=Be.kind==="schema",Et=(nt==null?void 0:nt.message)??Be.message??getSpecificMessage$1(Be.reference,At.lang)??(xt?getSchemaMessage$1(At.lang):null)??tt.message??getGlobalMessage$1(At.lang);Et!==void 0&&(At.message=typeof Et=="function"?Et(At):Et),xt&&(Ye.typed=!1),Ye.issues?Ye.issues.push(At):Ye.issues=[At]}function _getStandardProps$1(Be){return{version:1,vendor:"valibot",validate(Le){return Be["~run"]({value:Le},getGlobalConfig$1())}}}function _joinExpects(Be,Le){const Ye=[...new Set(Be)];return Ye.length>1?`(${Ye.join(` ${Le} `)})`:Ye[0]??"never"}function isValiError(Be){return Be instanceof ValiError}var ValiError=class extends Error{constructor(Be){super(Be[0].message),this.name="ValiError",this.issues=Be}};function getFallback$1(Be,Le,Ye){return typeof Be.fallback=="function"?Be.fallback(Le,Ye):Be.fallback}function getDefault$1(Be,Le,Ye){return typeof Be.default=="function"?Be.default(Le,Ye):Be.default}function boolean$2(Be){return{kind:"schema",type:"boolean",reference:boolean$2,expects:"boolean",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="boolean"?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function custom(Be,Le){return{kind:"schema",type:"custom",reference:custom,expects:"unknown",async:!1,check:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){return this.check(Ye.value)?Ye.typed=!0:_addIssue$1(this,"type",Ye,tt),Ye}}}function function_(Be){return{kind:"schema",type:"function",reference:function_,expects:"Function",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="function"?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function literal(Be,Le){return{kind:"schema",type:"literal",reference:literal,expects:_stringify$4(Be),async:!1,literal:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){return Ye.value===this.literal?Ye.typed=!0:_addIssue$1(this,"type",Ye,tt),Ye}}}function null_(Be){return{kind:"schema",type:"null",reference:null_,expects:"null",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return Le.value===null?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function number$3(Be){return{kind:"schema",type:"number",reference:number$3,expects:"number",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="number"&&!isNaN(Le.value)?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function object$1(Be,Le){return{kind:"schema",type:"object",reference:object$1,expects:"Object",async:!1,entries:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){var ft;const nt=Ye.value;if(nt&&typeof nt=="object"){Ye.typed=!0,Ye.value={};for(const ht in this.entries){const gt=this.entries[ht];if(ht in nt||(gt.type==="exact_optional"||gt.type==="optional"||gt.type==="nullish")&>.default!==void 0){const At=ht in nt?nt[ht]:getDefault$1(gt),xt=gt["~run"]({value:At},tt);if(xt.issues){const Et={type:"object",origin:"value",input:nt,key:ht,value:At};for(const yt of xt.issues)yt.path?yt.path.unshift(Et):yt.path=[Et],(ft=Ye.issues)==null||ft.push(yt);if(Ye.issues||(Ye.issues=xt.issues),tt.abortEarly){Ye.typed=!1;break}}xt.typed||(Ye.typed=!1),Ye.value[ht]=xt.value}else if(gt.fallback!==void 0)Ye.value[ht]=getFallback$1(gt);else if(gt.type!=="exact_optional"&>.type!=="optional"&>.type!=="nullish"&&(_addIssue$1(this,"key",Ye,tt,{input:void 0,expected:`"${ht}"`,path:[{type:"object",origin:"key",input:nt,key:ht,value:nt[ht]}]}),tt.abortEarly))break}}else _addIssue$1(this,"type",Ye,tt);return Ye}}}function optional$1(Be,Le){return{kind:"schema",type:"optional",reference:optional$1,expects:`(${Be.expects} | undefined)`,async:!1,wrapped:Be,default:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){return Ye.value===void 0&&(this.default!==void 0&&(Ye.value=getDefault$1(this,Ye,tt)),Ye.value===void 0)?(Ye.typed=!0,Ye):this.wrapped["~run"](Ye,tt)}}}function string$3(Be){return{kind:"schema",type:"string",reference:string$3,expects:"string",async:!1,message:Be,get"~standard"(){return _getStandardProps$1(this)},"~run"(Le,Ye){return typeof Le.value=="string"?Le.typed=!0:_addIssue$1(this,"type",Le,Ye),Le}}}function _subIssues(Be){let Le;if(Be)for(const Ye of Be)Le?Le.push(...Ye.issues):Le=Ye.issues;return Le}function union(Be,Le){return{kind:"schema",type:"union",reference:union,expects:_joinExpects(Be.map(Ye=>Ye.expects),"|"),async:!1,options:Be,message:Le,get"~standard"(){return _getStandardProps$1(this)},"~run"(Ye,tt){let nt,ft,ht;for(const gt of this.options){const At=gt["~run"]({value:Ye.value},tt);if(At.typed)if(At.issues)ft?ft.push(At):ft=[At];else{nt=At;break}else ht?ht.push(At):ht=[At]}if(nt)return nt;if(ft){if(ft.length===1)return ft[0];_addIssue$1(this,"type",Ye,tt,{issues:_subIssues(ft)}),Ye.typed=!0}else{if((ht==null?void 0:ht.length)===1)return ht[0];_addIssue$1(this,"type",Ye,tt,{issues:_subIssues(ht)})}return Ye}}}function parse$8(Be,Le,Ye){const tt=Be["~run"]({value:Le},getGlobalConfig$1(Ye));if(tt.issues)throw new ValiError(tt.issues);return tt.value}function validate$2(...Be){try{Be.forEach(({schema:Le,value:Ye})=>parse$8(Le,Ye))}catch(Le){if(isValiError(Le)){const Ye=Le.issues.map(tt=>{var ft;return`${((ft=tt.path)==null?void 0:ft.map(ht=>ht.key).join("."))||"root"}: ${tt.message}`}).join(", ");throw new Error(`Validation failed: ${Ye}`)}throw Le}}exports.api=void 0;function setApi(Be){exports.api=Be}function setToken(Be){exports.api.defaults.headers["X-Incode-Hardware-Id"]=Be}const eventsQueue=[];function addEvent(Be){const{token:Le,code:Ye,module:tt,screen:nt,clientTimestamp:ft,payload:ht={}}=Be;if(!Le){eventsQueue.push(Be);return}return exports.api.post("/omni/interview-events",[{code:Ye,module:tt,screen:nt,clientTimestamp:ft??new Date().getTime(),payload:ht}],{headers:{"X-Incode-Hardware-Id":Le}}).catch(()=>{})}function emptyQueue(Be){eventsQueue.forEach(Le=>{addEvent({...Le,token:Be})})}const state={token:null};var PipelineProfileName=(Be=>(Be[Be.IdCapture_2_01=0]="IdCapture_2_01",Be[Be.IdCapture_2_02=1]="IdCapture_2_02",Be[Be.IdCapture_3_02=2]="IdCapture_3_02",Be[Be.IdVideoSelfie_2_01=3]="IdVideoSelfie_2_01",Be[Be.SelfieWithAggregationMetrics=4]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=5]="SelfieWithQualityMetrics",Be[Be.SelfieVideoSelfie=6]="SelfieVideoSelfie",Be))(PipelineProfileName||{});class PipelineProfile{constructor(Le,Ye,tt,nt,ft,ht=null,gt=""){this.pipelineType=Le,this.name=Ye,this.detectionType=tt,this.modelNames=nt,this.parameters=ft,this.paramsConfigurator=ht,this.description=gt}reconfigureParams(Le,Ye){if(this.paramsConfigurator==null)throw new Error("PipelineProfile does not have a paramsConfigurator");this.paramsConfigurator(this.parameters,this.pipelineType,Le,Ye)}}var DetectionType=(Be=>(Be[Be.IDCapture=0]="IDCapture",Be[Be.Selfie=1]="Selfie",Be[Be.SelfieVideoSelfie=2]="SelfieVideoSelfie",Be[Be.IdVideoSelfie=3]="IdVideoSelfie",Be))(DetectionType||{}),WasmPipelineType=(Be=>(Be[Be.IdBlurGlarePipeline=0]="IdBlurGlarePipeline",Be[Be.IdBarcodeAndTextQualityPipeline=1]="IdBarcodeAndTextQualityPipeline",Be[Be.IdVideoSelfiePipeline=2]="IdVideoSelfiePipeline",Be[Be.SelfieWithAggregationMetrics=3]="SelfieWithAggregationMetrics",Be[Be.SelfieWithQualityMetrics=4]="SelfieWithQualityMetrics",Be[Be.IdFaceDetectionPipeline=5]="IdFaceDetectionPipeline",Be))(WasmPipelineType||{}),IdCaptureModelType=(Be=>(Be[Be.IdCaptureV1x=0]="IdCaptureV1x",Be[Be.IdCaptureV2x=1]="IdCaptureV2x",Be[Be.IdCaptureV3x=2]="IdCaptureV3x",Be))(IdCaptureModelType||{}),src$2={},src$1={},$_StatsigGlobal={},Log={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Log=Be.LogLevel=void 0;const Le=" DEBUG ",Ye=" INFO ",tt=" WARN ",nt=" ERROR ";function ft(gt){return gt.unshift("[Statsig]"),gt}Be.LogLevel={None:0,Error:1,Warn:2,Info:3,Debug:4};class ht{static info(...At){ht.level>=Be.LogLevel.Info&&console.info(Ye,...ft(At))}static debug(...At){ht.level>=Be.LogLevel.Debug&&console.debug(Le,...ft(At))}static warn(...At){ht.level>=Be.LogLevel.Warn&&console.warn(tt,...ft(At))}static error(...At){ht.level>=Be.LogLevel.Error&&console.error(nt,...ft(At))}}Be.Log=ht,ht.level=Be.LogLevel.Warn})(Log),function(Be){var Le,Ye,tt;Object.defineProperty(Be,"__esModule",{value:!0}),Be._getInstance=Be._getStatsigGlobalFlag=Be._getStatsigGlobal=void 0;const nt=Log,ft=()=>{try{return typeof __STATSIG__<"u"?__STATSIG__:Ct}catch{return Ct}};Be._getStatsigGlobal=ft;const ht=kt=>(0,Be._getStatsigGlobal)()[kt];Be._getStatsigGlobalFlag=ht;const gt=kt=>{const vt=(0,Be._getStatsigGlobal)();return kt?vt.instances&&vt.instances[kt]:(vt.instances&&Object.keys(vt.instances).length>1&&nt.Log.warn("Call made to Statsig global instance without an SDK key but there is more than one client instance. If you are using mulitple clients, please specify the SDK key."),vt.firstInstance)};Be._getInstance=gt;const At="__STATSIG__",xt=typeof window<"u"?window:{},Et=typeof commonjsGlobal<"u"?commonjsGlobal:{},yt=typeof globalThis<"u"?globalThis:{},Ct=(tt=(Ye=(Le=xt[At])!==null&&Le!==void 0?Le:Et[At])!==null&&Ye!==void 0?Ye:yt[At])!==null&&tt!==void 0?tt:{instance:Be._getInstance};xt[At]=Ct,Et[At]=Ct,yt[At]=Ct}($_StatsigGlobal);var Diagnostics={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.Diagnostics=void 0;const Le=new Map,Ye="start",tt="end",nt="statsig::diagnostics";Be.Diagnostics={_getMarkers:xt=>Le.get(xt),_markInitOverallStart:xt=>{gt(xt,ft({},Ye,"overall"))},_markInitOverallEnd:(xt,Et,yt)=>{gt(xt,ft({success:Et,error:Et?void 0:{name:"InitializeError",message:"Failed to initialize"},evaluationDetails:yt},tt,"overall"))},_markInitNetworkReqStart:(xt,Et)=>{gt(xt,ft(Et,Ye,"initialize","network_request"))},_markInitNetworkReqEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","network_request"))},_markInitProcessStart:xt=>{gt(xt,ft({},Ye,"initialize","process"))},_markInitProcessEnd:(xt,Et)=>{gt(xt,ft(Et,tt,"initialize","process"))},_clearMarkers:xt=>{Le.delete(xt)},_formatError(xt){if(xt&&typeof xt=="object")return{code:At(xt,"code"),name:At(xt,"name"),message:At(xt,"message")}},_getDiagnosticsData(xt,Et,yt,Ct){var kt;return{success:(xt==null?void 0:xt.ok)===!0,statusCode:xt==null?void 0:xt.status,sdkRegion:(kt=xt==null?void 0:xt.headers)===null||kt===void 0?void 0:kt.get("x-statsig-region"),isDelta:yt.includes('"is_delta":true')===!0?!0:void 0,attempt:Et,error:Be.Diagnostics._formatError(Ct)}},_enqueueDiagnosticsEvent(xt,Et,yt,Ct){const kt=Be.Diagnostics._getMarkers(yt);if(kt==null||kt.length<=0)return-1;const vt=kt[kt.length-1].timestamp-kt[0].timestamp;Be.Diagnostics._clearMarkers(yt);const bt=ht(xt,{context:"initialize",markers:kt.slice(),statsigOptions:Ct});return Et.enqueue(bt),vt}};function ft(xt,Et,yt,Ct){return Object.assign({key:yt,action:Et,step:Ct,timestamp:Date.now()},xt)}function ht(xt,Et){return{eventName:nt,user:xt,value:null,metadata:Et,time:Date.now()}}function gt(xt,Et){var yt;const Ct=(yt=Le.get(xt))!==null&&yt!==void 0?yt:[];Ct.push(Et),Le.set(xt,Ct)}function At(xt,Et){if(Et in xt)return xt[Et]}})(Diagnostics);var EventLogger$1={},CacheKey={},Hashing={},TypingUtils={};Object.defineProperty(TypingUtils,"__esModule",{value:!0}),TypingUtils._isTypeMatch=TypingUtils._typeOf=void 0;function _typeOf(Be){return Array.isArray(Be)?"array":typeof Be}TypingUtils._typeOf=_typeOf;function _isTypeMatch(Be,Le){const Ye=tt=>Array.isArray(tt)?"array":tt===null?"null":typeof tt;return Ye(Be)===Ye(Le)}TypingUtils._isTypeMatch=_isTypeMatch,function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getSortedObject=Be._DJB2Object=Be._DJB2=void 0;const Le=TypingUtils,Ye=ft=>{let ht=0;for(let gt=0;gt<ft.length;gt++){const At=ft.charCodeAt(gt);ht=(ht<<5)-ht+At,ht=ht&ht}return String(ht>>>0)};Be._DJB2=Ye;const tt=(ft,ht)=>(0,Be._DJB2)(JSON.stringify((0,Be._getSortedObject)(ft,ht)));Be._DJB2Object=tt;const nt=(ft,ht)=>{if(ft==null)return null;const gt=Object.keys(ft).sort(),At={};return gt.forEach(xt=>{const Et=ft[xt];if(ht===0||(0,Le._typeOf)(Et)!=="object"){At[xt]=Et;return}At[xt]=(0,Be._getSortedObject)(Et,ht!=null?ht-1:ht)}),At};Be._getSortedObject=nt}(Hashing),Object.defineProperty(CacheKey,"__esModule",{value:!0}),CacheKey._getStorageKey=CacheKey._getUserStorageKey=void 0;const Hashing_1$4=Hashing;function _getUserStorageKey(Be,Le,Ye){var tt;if(Ye)return Ye(Be,Le);const nt=Le&&Le.customIDs?Le.customIDs:{},ft=[`uid:${(tt=Le==null?void 0:Le.userID)!==null&&tt!==void 0?tt:""}`,`cids:${Object.keys(nt).sort((ht,gt)=>ht.localeCompare(gt)).map(ht=>`${ht}-${nt[ht]}`).join(",")}`,`k:${Be}`];return(0,Hashing_1$4._DJB2)(ft.join("|"))}CacheKey._getUserStorageKey=_getUserStorageKey;function _getStorageKey(Be,Le,Ye){return Le?_getUserStorageKey(Be,Le,Ye):(0,Hashing_1$4._DJB2)(`k:${Be}`)}CacheKey._getStorageKey=_getStorageKey;var NetworkConfig={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.NetworkParam=Be.NetworkDefault=Be.Endpoint=void 0,Be.Endpoint={_initialize:"initialize",_rgstr:"rgstr",_download_config_specs:"download_config_specs"},Be.NetworkDefault={[Be.Endpoint._rgstr]:"https://prodregistryv2.org/v1",[Be.Endpoint._initialize]:"https://featureassets.org/v1",[Be.Endpoint._download_config_specs]:"https://api.statsigcdn.com/v1"},Be.NetworkParam={EventCount:"ec",SdkKey:"k",SdkType:"st",SdkVersion:"sv",Time:"t",SessionID:"sid",StatsigEncoded:"se",IsGzipped:"gz"}})(NetworkConfig);var SafeJs={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._getUnloadEvent=Be._getCurrentPageUrlSafe=Be._addDocumentEventListenerSafe=Be._addWindowEventListenerSafe=Be._isServerEnv=Be._getDocumentSafe=Be._getWindowSafe=void 0;const Le=()=>typeof window<"u"?window:null;Be._getWindowSafe=Le;const Ye=()=>{var At;const xt=(0,Be._getWindowSafe)();return(At=xt==null?void 0:xt.document)!==null&&At!==void 0?At:null};Be._getDocumentSafe=Ye;const tt=()=>{if((0,Be._getDocumentSafe)()!==null)return!1;const At=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;return typeof EdgeRuntime=="string"||At};Be._isServerEnv=tt;const nt=(At,xt)=>{const Et=(0,Be._getWindowSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addWindowEventListenerSafe=nt;const ft=(At,xt)=>{const Et=(0,Be._getDocumentSafe)();typeof(Et==null?void 0:Et.addEventListener)=="function"&&Et.addEventListener(At,xt)};Be._addDocumentEventListenerSafe=ft;const ht=()=>{var At;try{return(At=(0,Be._getWindowSafe)())===null||At===void 0?void 0:At.location.href.split(/[?#]/)[0]}catch{return}};Be._getCurrentPageUrlSafe=ht;const gt=()=>{const At=(0,Be._getWindowSafe)();return At&&"onpagehide"in At?"pagehide":"beforeunload"};Be._getUnloadEvent=gt})(SafeJs);var StatsigEvent={};Object.defineProperty(StatsigEvent,"__esModule",{value:!0}),StatsigEvent._createLayerParameterExposure=StatsigEvent._createConfigExposure=StatsigEvent._mapExposures=StatsigEvent._createGateExposure=StatsigEvent._isExposureEvent=void 0;const CONFIG_EXPOSURE_NAME="statsig::config_exposure",GATE_EXPOSURE_NAME="statsig::gate_exposure",LAYER_EXPOSURE_NAME="statsig::layer_exposure",_createExposure=(Be,Le,Ye,tt,nt)=>(Ye.bootstrapMetadata&&(tt.bootstrapMetadata=Ye.bootstrapMetadata),{eventName:Be,user:Le,value:null,metadata:_addEvaluationDetailsToMetadata(Ye,tt),secondaryExposures:nt,time:Date.now()}),_isExposureEvent=({eventName:Be})=>Be===GATE_EXPOSURE_NAME||Be===CONFIG_EXPOSURE_NAME||Be===LAYER_EXPOSURE_NAME;StatsigEvent._isExposureEvent=_isExposureEvent;const _createGateExposure=(Be,Le,Ye)=>{var tt,nt,ft;const ht={gate:Le.name,gateValue:String(Le.value),ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(ht.configVersion=Le.__evaluation.version),_createExposure(GATE_EXPOSURE_NAME,Be,Le.details,ht,_mapExposures((ft=(nt=Le.__evaluation)===null||nt===void 0?void 0:nt.secondary_exposures)!==null&&ft!==void 0?ft:[],Ye))};StatsigEvent._createGateExposure=_createGateExposure;function _mapExposures(Be,Le){return Be.map(Ye=>typeof Ye=="string"?(Le??{})[Ye]:Ye).filter(Ye=>Ye!=null)}StatsigEvent._mapExposures=_mapExposures;const _createConfigExposure=(Be,Le,Ye)=>{var tt,nt,ft,ht;const gt={config:Le.name,ruleID:Le.ruleID};return((tt=Le.__evaluation)===null||tt===void 0?void 0:tt.version)!=null&&(gt.configVersion=Le.__evaluation.version),((nt=Le.__evaluation)===null||nt===void 0?void 0:nt.passed)!=null&&(gt.rulePassed=String(Le.__evaluation.passed)),_createExposure(CONFIG_EXPOSURE_NAME,Be,Le.details,gt,_mapExposures((ht=(ft=Le.__evaluation)===null||ft===void 0?void 0:ft.secondary_exposures)!==null&&ht!==void 0?ht:[],Ye))};StatsigEvent._createConfigExposure=_createConfigExposure;const _createLayerParameterExposure=(Be,Le,Ye,tt)=>{var nt,ft,ht,gt,At,xt,Et;const yt=Le.__evaluation,Ct=((nt=yt==null?void 0:yt.explicit_parameters)===null||nt===void 0?void 0:nt.includes(Ye))===!0;let kt="",vt=(ft=yt==null?void 0:yt.undelegated_secondary_exposures)!==null&&ft!==void 0?ft:[];Ct&&(kt=(ht=yt.allocated_experiment_name)!==null&&ht!==void 0?ht:"",vt=(gt=yt.secondary_exposures)!==null&>!==void 0?gt:[]);const bt=(At=Le.__evaluation)===null||At===void 0?void 0:At.parameter_rule_ids,It={config:Le.name,parameterName:Ye,ruleID:(xt=bt==null?void 0:bt[Ye])!==null&&xt!==void 0?xt:Le.ruleID,allocatedExperiment:kt,isExplicitParameter:String(Ct)};return((Et=Le.__evaluation)===null||Et===void 0?void 0:Et.version)!=null&&(It.configVersion=Le.__evaluation.version),_createExposure(LAYER_EXPOSURE_NAME,Be,Le.details,It,_mapExposures(vt,tt))};StatsigEvent._createLayerParameterExposure=_createLayerParameterExposure;const _addEvaluationDetailsToMetadata=(Be,Le)=>(Le.reason=Be.reason,Be.lcut&&(Le.lcut=String(Be.lcut)),Be.receivedAt&&(Le.receivedAt=String(Be.receivedAt)),Le);var StatsigOptionsCommon={};Object.defineProperty(StatsigOptionsCommon,"__esModule",{value:!0}),StatsigOptionsCommon.LoggingEnabledOption=StatsigOptionsCommon.LogEventCompressionMode=void 0,StatsigOptionsCommon.LogEventCompressionMode={Disabled:"d",Enabled:"e",Forced:"f"},StatsigOptionsCommon.LoggingEnabledOption={disabled:"disabled",browserOnly:"browser-only",always:"always"};var StorageProvider={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._setObjectInStorage=Be._getObjectFromStorage=Be.Storage=void 0;const Le=Log,Ye=SafeJs,tt={},nt={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"InMemory",getItem:yt=>tt[yt]?tt[yt]:null,setItem:(yt,Ct)=>{tt[yt]=Ct},removeItem:yt=>{delete tt[yt]},getAllKeys:()=>Object.keys(tt)};let ft=null;try{const yt=(0,Ye._getWindowSafe)();yt&&yt.localStorage&&typeof yt.localStorage.getItem=="function"&&(ft={isReady:()=>!0,isReadyResolver:()=>null,getProviderName:()=>"LocalStorage",getItem:Ct=>yt.localStorage.getItem(Ct),setItem:(Ct,kt)=>yt.localStorage.setItem(Ct,kt),removeItem:Ct=>yt.localStorage.removeItem(Ct),getAllKeys:()=>Object.keys(yt.localStorage)})}catch{Le.Log.warn("Failed to setup localStorageProvider.")}let ht=ft??nt,gt=ht;function At(yt){try{return yt()}catch(Ct){if(Ct instanceof Error&&Ct.name==="SecurityError")return Be.Storage._setProvider(nt),null;throw Ct}}Be.Storage={isReady:()=>gt.isReady(),isReadyResolver:()=>gt.isReadyResolver(),getProviderName:()=>gt.getProviderName(),getItem:yt=>At(()=>gt.getItem(yt)),setItem:(yt,Ct)=>At(()=>gt.setItem(yt,Ct)),removeItem:yt=>gt.removeItem(yt),getAllKeys:()=>gt.getAllKeys(),_setProvider:yt=>{ht=yt,gt=yt},_setDisabled:yt=>{yt?gt=nt:gt=ht}};function xt(yt){const Ct=Be.Storage.getItem(yt);return JSON.parse(Ct??"null")}Be._getObjectFromStorage=xt;function Et(yt,Ct){Be.Storage.setItem(yt,JSON.stringify(Ct))}Be._setObjectInStorage=Et})(StorageProvider);var UrlConfiguration$1={};Object.defineProperty(UrlConfiguration$1,"__esModule",{value:!0}),UrlConfiguration$1.UrlConfiguration=void 0;const Hashing_1$3=Hashing,NetworkConfig_1$2=NetworkConfig,ENDPOINT_DNS_KEY_MAP={[NetworkConfig_1$2.Endpoint._initialize]:"i",[NetworkConfig_1$2.Endpoint._rgstr]:"e",[NetworkConfig_1$2.Endpoint._download_config_specs]:"d"};class UrlConfiguration{constructor(Le,Ye,tt,nt){this.customUrl=null,this.fallbackUrls=null,this.endpoint=Le,this.endpointDnsKey=ENDPOINT_DNS_KEY_MAP[Le],Ye&&(this.customUrl=Ye),!Ye&&tt&&(this.customUrl=tt.endsWith("/")?`${tt}${Le}`:`${tt}/${Le}`),nt&&(this.fallbackUrls=nt);const ft=NetworkConfig_1$2.NetworkDefault[Le];this.defaultUrl=`${ft}/${Le}`}getUrl(){var Le;return(Le=this.customUrl)!==null&&Le!==void 0?Le:this.defaultUrl}getChecksum(){var Le;const Ye=((Le=this.fallbackUrls)!==null&&Le!==void 0?Le:[]).sort().join(",");return(0,Hashing_1$3._DJB2)(this.customUrl+Ye)}}UrlConfiguration$1.UrlConfiguration=UrlConfiguration;var VisibilityObserving={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._notifyVisibilityChanged=Be._subscribeToVisiblityChanged=Be._isUnloading=Be._isCurrentlyVisible=void 0;const Le=SafeJs,Ye="foreground",tt="background",nt=[];let ft=Ye,ht=!1;const gt=()=>ft===Ye;Be._isCurrentlyVisible=gt;const At=()=>ht;Be._isUnloading=At;const xt=yt=>{nt.unshift(yt)};Be._subscribeToVisiblityChanged=xt;const Et=yt=>{yt!==ft&&(ft=yt,nt.forEach(Ct=>Ct(yt)))};Be._notifyVisibilityChanged=Et,(0,Le._addWindowEventListenerSafe)("focus",()=>{ht=!1,(0,Be._notifyVisibilityChanged)(Ye)}),(0,Le._addWindowEventListenerSafe)("blur",()=>(0,Be._notifyVisibilityChanged)(tt)),(0,Le._addDocumentEventListenerSafe)("visibilitychange",()=>{(0,Be._notifyVisibilityChanged)(document.visibilityState==="visible"?Ye:tt)}),(0,Le._addWindowEventListenerSafe)((0,Le._getUnloadEvent)(),()=>{ht=!0,(0,Be._notifyVisibilityChanged)(tt)})})(VisibilityObserving);var __awaiter$f=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(EventLogger$1,"__esModule",{value:!0}),EventLogger$1.EventLogger=void 0;const CacheKey_1$1=CacheKey,Hashing_1$2=Hashing,Log_1$8=Log,NetworkConfig_1$1=NetworkConfig,SafeJs_1$3=SafeJs,StatsigEvent_1=StatsigEvent,StatsigOptionsCommon_1$2=StatsigOptionsCommon,StorageProvider_1$4=StorageProvider,UrlConfiguration_1=UrlConfiguration$1,VisibilityObserving_1$1=VisibilityObserving,DEFAULT_QUEUE_SIZE=100,DEFAULT_FLUSH_INTERVAL_MS=1e4,MAX_DEDUPER_KEYS=1e3,DEDUPER_WINDOW_DURATION_MS=6e5,MAX_FAILED_LOGS=500,QUICK_FLUSH_WINDOW_MS=200,EVENT_LOGGER_MAP={},RetryFailedLogsTrigger={Startup:"startup",GainedFocus:"gained_focus"};class EventLogger{static _safeFlushAndForget(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye.flush().catch(()=>{})}static _safeRetryFailedLogs(Le){var Ye;(Ye=EVENT_LOGGER_MAP[Le])===null||Ye===void 0||Ye._retryFailedLogs(RetryFailedLogsTrigger.GainedFocus)}constructor(Le,Ye,tt,nt){var ft,ht;this._sdkKey=Le,this._emitter=Ye,this._network=tt,this._options=nt,this._queue=[],this._lastExposureTimeMap={},this._nonExposedChecks={},this._hasRunQuickFlush=!1,this._creationTime=Date.now(),this._loggingEnabled=(ft=nt==null?void 0:nt.loggingEnabled)!==null&&ft!==void 0?ft:(nt==null?void 0:nt.disableLogging)===!0?StatsigOptionsCommon_1$2.LoggingEnabledOption.disabled:StatsigOptionsCommon_1$2.LoggingEnabledOption.browserOnly,nt!=null&&nt.loggingEnabled&&nt.disableLogging!==void 0&&Log_1$8.Log.warn("Detected both loggingEnabled and disableLogging options. loggingEnabled takes precedence - please remove disableLogging."),this._maxQueueSize=(ht=nt==null?void 0:nt.loggingBufferMaxSize)!==null&&ht!==void 0?ht:DEFAULT_QUEUE_SIZE;const gt=nt==null?void 0:nt.networkConfig;this._logEventUrlConfig=new UrlConfiguration_1.UrlConfiguration(NetworkConfig_1$1.Endpoint._rgstr,gt==null?void 0:gt.logEventUrl,gt==null?void 0:gt.api,gt==null?void 0:gt.logEventFallbackUrls)}setLogEventCompressionMode(Le){this._network.setLogEventCompressionMode(Le)}setLoggingEnabled(Le){if(this._loggingEnabled==="disabled"&&Le!=="disabled"){const Ye=this._getStorageKey(),tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);tt&&this._queue.push(...tt),StorageProvider_1$4.Storage.removeItem(Ye)}this._loggingEnabled=Le}enqueue(Le){this._shouldLogEvent(Le)&&(this._normalizeAndAppendEvent(Le),this._quickFlushIfNeeded(),this._queue.length>this._maxQueueSize&&EventLogger._safeFlushAndForget(this._sdkKey))}incrementNonExposureCount(Le){var Ye;const tt=(Ye=this._nonExposedChecks[Le])!==null&&Ye!==void 0?Ye:0;this._nonExposedChecks[Le]=tt+1}reset(){this.flush().catch(()=>{}),this._lastExposureTimeMap={}}start(){var Le;const Ye=(0,SafeJs_1$3._isServerEnv)();Ye&&((Le=this._options)===null||Le===void 0?void 0:Le.loggingEnabled)!=="always"||(EVENT_LOGGER_MAP[this._sdkKey]=this,Ye||(0,VisibilityObserving_1$1._subscribeToVisiblityChanged)(tt=>{tt==="background"?EventLogger._safeFlushAndForget(this._sdkKey):tt==="foreground"&&EventLogger._safeRetryFailedLogs(this._sdkKey)}),this._retryFailedLogs(RetryFailedLogsTrigger.Startup),this._startBackgroundFlushInterval())}stop(){return __awaiter$f(this,void 0,void 0,function*(){this._flushIntervalId&&(clearInterval(this._flushIntervalId),this._flushIntervalId=null),delete EVENT_LOGGER_MAP[this._sdkKey],yield this.flush()})}flush(){return __awaiter$f(this,void 0,void 0,function*(){if(this._appendAndResetNonExposedChecks(),this._queue.length===0)return;const Le=this._queue;this._queue=[],yield this._sendEvents(Le)})}_quickFlushIfNeeded(){this._hasRunQuickFlush||(this._hasRunQuickFlush=!0,!(Date.now()-this._creationTime>QUICK_FLUSH_WINDOW_MS)&&setTimeout(()=>EventLogger._safeFlushAndForget(this._sdkKey),QUICK_FLUSH_WINDOW_MS))}_shouldLogEvent(Le){var Ye;if(((Ye=this._options)===null||Ye===void 0?void 0:Ye.loggingEnabled)!=="always"&&(0,SafeJs_1$3._isServerEnv)())return!1;if(!(0,StatsigEvent_1._isExposureEvent)(Le))return!0;const tt=Le.user?Le.user:{statsigEnvironment:void 0},nt=(0,CacheKey_1$1._getUserStorageKey)(this._sdkKey,tt),ft=Le.metadata?Le.metadata:{},ht=[Le.eventName,nt,ft.gate,ft.config,ft.ruleID,ft.allocatedExperiment,ft.parameterName,String(ft.isExplicitParameter),ft.reason].join("|"),gt=this._lastExposureTimeMap[ht],At=Date.now();return gt&&At-gt<DEDUPER_WINDOW_DURATION_MS?!1:(Object.keys(this._lastExposureTimeMap).length>MAX_DEDUPER_KEYS&&(this._lastExposureTimeMap={}),this._lastExposureTimeMap[ht]=At,!0)}_sendEvents(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye,tt;if(this._loggingEnabled==="disabled")return this._saveFailedLogsToStorage(Le),!1;try{const ft=(0,VisibilityObserving_1$1._isUnloading)()&&this._network.isBeaconSupported()&&((tt=(Ye=this._options)===null||Ye===void 0?void 0:Ye.networkConfig)===null||tt===void 0?void 0:tt.networkOverrideFunc)==null;return this._emitter({name:"pre_logs_flushed",events:Le}),(ft?this._sendEventsViaBeacon(Le):yield this._sendEventsViaPost(Le)).success?(this._emitter({name:"logs_flushed",events:Le}),!0):(Log_1$8.Log.warn("Failed to flush events."),this._saveFailedLogsToStorage(Le),!1)}catch{return Log_1$8.Log.warn("Failed to flush events."),!1}})}_sendEventsViaPost(Le){return __awaiter$f(this,void 0,void 0,function*(){var Ye;const tt=yield this._network.post(this._getRequestData(Le)),nt=(Ye=tt==null?void 0:tt.code)!==null&&Ye!==void 0?Ye:-1;return{success:nt>=200&&nt<300}})}_sendEventsViaBeacon(Le){return{success:this._network.beacon(this._getRequestData(Le))}}_getRequestData(Le){return{sdkKey:this._sdkKey,data:{events:Le},urlConfig:this._logEventUrlConfig,retries:3,isCompressable:!0,params:{[NetworkConfig_1$1.NetworkParam.EventCount]:String(Le.length)},credentials:"same-origin"}}_saveFailedLogsToStorage(Le){for(;Le.length>MAX_FAILED_LOGS;)Le.shift();const Ye=this._getStorageKey();try{const tt=this._getFailedLogsFromStorage(Ye);(0,StorageProvider_1$4._setObjectInStorage)(Ye,[...tt,...Le])}catch{Log_1$8.Log.warn("Unable to save failed logs to storage")}}_getFailedLogsFromStorage(Le){let Ye=[];try{const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Le);return Array.isArray(tt)&&(Ye=tt),Ye}catch{return[]}}_retryFailedLogs(Le){const Ye=this._getStorageKey();__awaiter$f(this,void 0,void 0,function*(){StorageProvider_1$4.Storage.isReady()||(yield StorageProvider_1$4.Storage.isReadyResolver());const tt=(0,StorageProvider_1$4._getObjectFromStorage)(Ye);if(!tt)return;Le===RetryFailedLogsTrigger.Startup&&StorageProvider_1$4.Storage.removeItem(Ye),(yield this._sendEvents(tt))&&Le===RetryFailedLogsTrigger.GainedFocus&&StorageProvider_1$4.Storage.removeItem(Ye)}).catch(()=>{Log_1$8.Log.warn("Failed to flush stored logs")})}_getStorageKey(){return`statsig.failed_logs.${(0,Hashing_1$2._DJB2)(this._sdkKey)}`}_normalizeAndAppendEvent(Le){Le.user&&(Le.user=Object.assign({},Le.user),delete Le.user.privateAttributes);const Ye={},tt=this._getCurrentPageUrl();tt&&(Ye.statsigMetadata={currentPage:tt});const nt=Object.assign(Object.assign({},Le),Ye);Log_1$8.Log.debug("Enqueued Event:",nt),this._queue.push(nt)}_appendAndResetNonExposedChecks(){Object.keys(this._nonExposedChecks).length!==0&&(this._normalizeAndAppendEvent({eventName:"statsig::non_exposed_checks",user:null,time:Date.now(),metadata:{checks:Object.assign({},this._nonExposedChecks)}}),this._nonExposedChecks={})}_getCurrentPageUrl(){var Le;if(((Le=this._options)===null||Le===void 0?void 0:Le.includeCurrentPageUrlWithEvents)!==!1)return(0,SafeJs_1$3._getCurrentPageUrlSafe)()}_startBackgroundFlushInterval(){var Le,Ye;const tt=(Ye=(Le=this._options)===null||Le===void 0?void 0:Le.loggingIntervalMs)!==null&&Ye!==void 0?Ye:DEFAULT_FLUSH_INTERVAL_MS,nt=setInterval(()=>{const ft=EVENT_LOGGER_MAP[this._sdkKey];!ft||ft._flushIntervalId!==nt?clearInterval(nt):EventLogger._safeFlushAndForget(this._sdkKey)},tt);this._flushIntervalId=nt}}EventLogger$1.EventLogger=EventLogger;var StatsigMetadata={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigMetadataProvider=Be.SDK_VERSION=void 0,Be.SDK_VERSION="3.28.1";let Le={sdkVersion:Be.SDK_VERSION,sdkType:"js-mono"};Be.StatsigMetadataProvider={get:()=>Le,add:Ye=>{Le=Object.assign(Object.assign({},Le),Ye)}}})(StatsigMetadata);var ClientInterfaces={};Object.defineProperty(ClientInterfaces,"__esModule",{value:!0});var DataAdapterCore$1={},StableID={},UUID={};Object.defineProperty(UUID,"__esModule",{value:!0}),UUID.getUUID=void 0;function getUUID(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();let Be=new Date().getTime(),Le=typeof performance<"u"&&performance.now&&performance.now()*1e3||0;return`xxxxxxxx-xxxx-4xxx-${"89ab"[Math.floor(Math.random()*4)]}xxx-xxxxxxxxxxxx`.replace(/[xy]/g,tt=>{let nt=Math.random()*16;return Be>0?(nt=(Be+nt)%16|0,Be=Math.floor(Be/16)):(nt=(Le+nt)%16|0,Le=Math.floor(Le/16)),(tt==="x"?nt:nt&7|8).toString(16)})}UUID.getUUID=getUUID,Object.defineProperty(StableID,"__esModule",{value:!0}),StableID.getCookieName=StableID.StableID=void 0;const CacheKey_1=CacheKey,Log_1$7=Log,SafeJs_1$2=SafeJs,StorageProvider_1$3=StorageProvider,UUID_1=UUID,PROMISE_MAP={},COOKIE_ENABLED_MAP={},DISABLED_MAP={};StableID.StableID={cookiesEnabled:!1,randomID:Math.random().toString(36),get:Be=>{if(DISABLED_MAP[Be])return null;if(PROMISE_MAP[Be]!=null)return PROMISE_MAP[Be];let Le=null;return Le=_loadFromCookie(Be),Le!=null?(PROMISE_MAP[Be]=Le,_persistToStorage(Le,Be),Le):(Le=_loadFromStorage(Be),Le==null&&(Le=(0,UUID_1.getUUID)()),_persistToStorage(Le,Be),_persistToCookie(Le,Be),PROMISE_MAP[Be]=Le,Le)},setOverride:(Be,Le)=>{PROMISE_MAP[Le]=Be,_persistToStorage(Be,Le),_persistToCookie(Be,Le)},_setCookiesEnabled:(Be,Le)=>{COOKIE_ENABLED_MAP[Be]=Le},_setDisabled:(Be,Le)=>{DISABLED_MAP[Be]=Le}};function _getStableIDStorageKey(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}function _persistToStorage(Be,Le){const Ye=_getStableIDStorageKey(Le);try{(0,StorageProvider_1$3._setObjectInStorage)(Ye,Be)}catch{Log_1$7.Log.warn("Failed to save StableID to storage")}}function _loadFromStorage(Be){const Le=_getStableIDStorageKey(Be);return(0,StorageProvider_1$3._getObjectFromStorage)(Le)}function _loadFromCookie(Be){if(!COOKIE_ENABLED_MAP[Be]||(0,SafeJs_1$2._getDocumentSafe)()==null)return null;const Le=document.cookie.split(";");for(const Ye of Le){const[tt,nt]=Ye.trim().split("=");if(tt===getCookieName(Be))return decodeURIComponent(nt)}return null}function _persistToCookie(Be,Le){if(!COOKIE_ENABLED_MAP[Le]||(0,SafeJs_1$2._getDocumentSafe)()==null)return;const Ye=new Date;Ye.setFullYear(Ye.getFullYear()+1),document.cookie=`${getCookieName(Le)}=${encodeURIComponent(Be)}; expires=${Ye.toUTCString()}; path=/`}function getCookieName(Be){return`statsig.stable_id.${(0,CacheKey_1._getStorageKey)(Be)}`}StableID.getCookieName=getCookieName;var StatsigUser={};Object.defineProperty(StatsigUser,"__esModule",{value:!0}),StatsigUser._getFullUserHash=StatsigUser._normalizeUser=void 0;const Hashing_1$1=Hashing,Log_1$6=Log;function _normalizeUser(Be,Le,Ye){try{const tt=JSON.parse(JSON.stringify(Be));return Le!=null&&Le.environment!=null?tt.statsigEnvironment=Le.environment:Ye!=null&&(tt.statsigEnvironment={tier:Ye}),tt}catch{return Log_1$6.Log.error("Failed to JSON.stringify user"),{statsigEnvironment:void 0}}}StatsigUser._normalizeUser=_normalizeUser;function _getFullUserHash(Be){return Be?(0,Hashing_1$1._DJB2Object)(Be):null}StatsigUser._getFullUserHash=_getFullUserHash;var TypedJsonParse={};Object.defineProperty(TypedJsonParse,"__esModule",{value:!0}),TypedJsonParse._typedJsonParse=void 0;const Log_1$5=Log;function _typedJsonParse(Be,Le,Ye){try{const tt=JSON.parse(Be);if(tt&&typeof tt=="object"&&Le in tt)return tt}catch{}return Log_1$5.Log.error(`Failed to parse ${Ye}`),null}TypedJsonParse._typedJsonParse=_typedJsonParse;var __awaiter$e=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DataAdapterCore$1,"__esModule",{value:!0}),DataAdapterCore$1._makeDataAdapterResult=DataAdapterCore$1.DataAdapterCore=void 0;const Log_1$4=Log,StableID_1$2=StableID,StatsigUser_1=StatsigUser,StorageProvider_1$2=StorageProvider,TypedJsonParse_1=TypedJsonParse,CACHE_LIMIT=10,MAX_CACHE_WRITE_ATTEMPTS=8;class DataAdapterCore{constructor(Le,Ye){this._adapterName=Le,this._cacheSuffix=Ye,this._options=null,this._sdkKey=null,this._cacheLimit=CACHE_LIMIT,this._lastModifiedStoreKey=`statsig.last_modified_time.${Ye}`,this._inMemoryCache=new InMemoryCache}attach(Le,Ye,tt){this._sdkKey=Le,this._options=Ye}getDataSync(Le){const Ye=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),tt=this._getCacheKey(Ye),nt=this._inMemoryCache.get(tt,Ye);if(nt&&this._getIsCacheValueValid(nt))return nt;const ft=this._loadFromCache(tt);return ft&&this._getIsCacheValueValid(ft)?(this._inMemoryCache.add(tt,ft,this._cacheLimit),this._inMemoryCache.get(tt,Ye)):null}setData(Le,Ye){const tt=Ye&&(0,StatsigUser_1._normalizeUser)(Ye,this._options),nt=this._getCacheKey(tt);this._inMemoryCache.add(nt,_makeDataAdapterResult("Bootstrap",Le,null,tt),this._cacheLimit)}_getIsCacheValueValid(Le){return Le.stableID==null||Le.stableID===StableID_1$2.StableID.get(this._getSdkKey())}_getDataAsyncImpl(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){StorageProvider_1$2.Storage.isReady()||(yield StorageProvider_1$2.Storage.isReadyResolver());const nt=Le??this.getDataSync(Ye),ft=[this._fetchAndPrepFromNetwork(nt,Ye,tt)];return tt!=null&&tt.timeoutMs&&ft.push(new Promise(ht=>setTimeout(ht,tt.timeoutMs)).then(()=>(Log_1$4.Log.debug("Fetching latest value timed out"),null))),yield Promise.race(ft)})}_prefetchDataImpl(Le,Ye){return __awaiter$e(this,void 0,void 0,function*(){const tt=Le&&(0,StatsigUser_1._normalizeUser)(Le,this._options),nt=this._getCacheKey(tt),ft=yield this._getDataAsyncImpl(null,tt,Ye);ft&&this._inMemoryCache.add(nt,Object.assign(Object.assign({},ft),{source:"Prefetch"}),this._cacheLimit)})}_fetchAndPrepFromNetwork(Le,Ye,tt){return __awaiter$e(this,void 0,void 0,function*(){var nt;const ft=(nt=Le==null?void 0:Le.data)!==null&&nt!==void 0?nt:null,ht=Le!=null&&this._isCachedResultValidFor204(Le,Ye),gt=yield this._fetchFromNetwork(ft,Ye,tt,ht);if(!gt)return Log_1$4.Log.debug("No response returned for latest value"),null;const At=(0,TypedJsonParse_1._typedJsonParse)(gt,"has_updates","Response"),xt=this._getSdkKey(),Et=StableID_1$2.StableID.get(xt);let yt=null;if((At==null?void 0:At.has_updates)===!0)yt=_makeDataAdapterResult("Network",gt,Et,Ye);else if(ft&&(At==null?void 0:At.has_updates)===!1)yt=_makeDataAdapterResult("NetworkNotModified",ft,Et,Ye);else return null;const Ct=this._getCacheKey(Ye);return this._inMemoryCache.add(Ct,yt,this._cacheLimit),this._writeToCache(Ct,yt),yt})}_getSdkKey(){return this._sdkKey!=null?this._sdkKey:(Log_1$4.Log.error(`${this._adapterName} is not attached to a Client`),"")}_loadFromCache(Le){var Ye;const tt=(Ye=StorageProvider_1$2.Storage.getItem)===null||Ye===void 0?void 0:Ye.call(StorageProvider_1$2.Storage,Le);if(tt==null)return null;const nt=(0,TypedJsonParse_1._typedJsonParse)(tt,"source","Cached Result");return nt?Object.assign(Object.assign({},nt),{source:"Cache"}):null}_writeToCache(Le,Ye){const tt=JSON.stringify(Ye);for(let nt=0;nt<MAX_CACHE_WRITE_ATTEMPTS;nt++)try{StorageProvider_1$2.Storage.setItem(Le,tt);break}catch(ft){if(!(ft instanceof Error)||!(ft.toString().includes("QuotaExceededError")||ft.toString().includes("QUOTA_EXCEEDED_ERR"))||this._cacheLimit<=1)throw ft;this._cacheLimit=Math.ceil(this._cacheLimit/2),this._runLocalStorageCacheEviction(Le,this._cacheLimit-1)}this._runLocalStorageCacheEviction(Le)}_runLocalStorageCacheEviction(Le,Ye=this._cacheLimit){var tt;const nt=(tt=(0,StorageProvider_1$2._getObjectFromStorage)(this._lastModifiedStoreKey))!==null&&tt!==void 0?tt:{};nt[Le]=Date.now();const ft=_getEvictableKeys(nt,Ye);for(const ht of ft)delete nt[ht],StorageProvider_1$2.Storage.removeItem(ht);(0,StorageProvider_1$2._setObjectInStorage)(this._lastModifiedStoreKey,nt)}}DataAdapterCore$1.DataAdapterCore=DataAdapterCore;function _makeDataAdapterResult(Be,Le,Ye,tt){return{source:Be,data:Le,receivedAt:Date.now(),stableID:Ye,fullUserHash:(0,StatsigUser_1._getFullUserHash)(tt)}}DataAdapterCore$1._makeDataAdapterResult=_makeDataAdapterResult;class InMemoryCache{constructor(){this._data={}}get(Le,Ye){var tt;const nt=this._data[Le],ft=nt==null?void 0:nt.stableID,ht=(tt=Ye==null?void 0:Ye.customIDs)===null||tt===void 0?void 0:tt.stableID;return ht&&ft&&ht!==ft?(Log_1$4.Log.warn("'StatsigUser.customIDs.stableID' mismatch"),null):nt}add(Le,Ye,tt){const nt=_getEvictableKeys(this._data,tt-1);for(const ft of nt)delete this._data[ft];this._data[Le]=Ye}merge(Le){this._data=Object.assign(Object.assign({},this._data),Le)}}function _getEvictableKeys(Be,Le){const Ye=Object.keys(Be);return Ye.length<=Le?[]:Le===0?Ye:Ye.sort((tt,nt)=>{const ft=Be[tt],ht=Be[nt];return typeof ft=="object"&&typeof ht=="object"?ft.receivedAt-ht.receivedAt:ft-ht}).slice(0,Ye.length-Le)}var DownloadConfigSpecsResponse={};Object.defineProperty(DownloadConfigSpecsResponse,"__esModule",{value:!0});var ErrorBoundary={},SDKType={};Object.defineProperty(SDKType,"__esModule",{value:!0}),SDKType.SDKType=void 0;const SDK_CLIENT={};let suffix;SDKType.SDKType={_get:Be=>{var Le;return((Le=SDK_CLIENT[Be])!==null&&Le!==void 0?Le:"js-mono")+(suffix??"")},_setClientType(Be,Le){SDK_CLIENT[Be]=Le},_setBindingType(Be){(!suffix||suffix==="-react")&&(suffix="-"+Be)}},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__awaiter||function(yt,Ct,kt,vt){function bt(It){return It instanceof kt?It:new kt(function(wt){wt(It)})}return new(kt||(kt=Promise))(function(It,wt){function Rt(Dt){try{Bt(vt.next(Dt))}catch(Pt){wt(Pt)}}function Tt(Dt){try{Bt(vt.throw(Dt))}catch(Pt){wt(Pt)}}function Bt(Dt){Dt.done?It(Dt.value):bt(Dt.value).then(Rt,Tt)}Bt((vt=vt.apply(yt,Ct||[])).next())})};Object.defineProperty(Be,"__esModule",{value:!0}),Be.ErrorBoundary=Be.EXCEPTION_ENDPOINT=void 0;const Ye=Log,tt=SDKType,nt=StatsigMetadata;Be.EXCEPTION_ENDPOINT="https://statsigapi.net/v1/sdk_exception";const ft="[Statsig] UnknownError";class ht{constructor(Ct,kt,vt,bt){this._sdkKey=Ct,this._options=kt,this._emitter=vt,this._lastSeenError=bt,this._seen=new Set}wrap(Ct,kt){try{const vt=Ct;xt(vt).forEach(bt=>{const It=vt[bt];"$EB"in It||(vt[bt]=(...wt)=>this._capture(kt?`${kt}:${bt}`:bt,()=>It.apply(Ct,wt)),vt[bt].$EB=!0)})}catch(vt){this._onError("eb:wrap",vt)}}logError(Ct,kt){this._onError(Ct,kt)}getLastSeenErrorAndReset(){const Ct=this._lastSeenError;return this._lastSeenError=void 0,Ct??null}attachErrorIfNoneExists(Ct){this._lastSeenError||(this._lastSeenError=gt(Ct))}_capture(Ct,kt){try{const vt=kt();return vt&&vt instanceof Promise?vt.catch(bt=>this._onError(Ct,bt)):vt}catch(vt){return this._onError(Ct,vt),null}}_onError(Ct,kt){try{Ye.Log.warn(`Caught error in ${Ct}`,{error:kt}),Le(this,void 0,void 0,function*(){var bt,It,wt,Rt,Tt,Bt,Dt;const Pt=kt||Error(ft),Nt=Pt instanceof Error,Lt=Nt?Pt.name:"No Name",Wt=gt(Pt);if(this._lastSeenError=Wt,this._seen.has(Lt))return;if(this._seen.add(Lt),!((It=(bt=this._options)===null||bt===void 0?void 0:bt.networkConfig)===null||It===void 0)&&It.preventAllNetworkTraffic){(wt=this._emitter)===null||wt===void 0||wt.call(this,{name:"error",error:kt,tag:Ct});return}const $t=tt.SDKType._get(this._sdkKey),Kt=nt.StatsigMetadataProvider.get(),Vt=Nt?Pt.stack:At(Pt),Ut=Object.assign({tag:Ct,exception:Lt,info:Vt,statsigOptions:Et(this._options)},Object.assign(Object.assign({},Kt),{sdkType:$t}));yield((Bt=(Tt=(Rt=this._options)===null||Rt===void 0?void 0:Rt.networkConfig)===null||Tt===void 0?void 0:Tt.networkOverrideFunc)!==null&&Bt!==void 0?Bt:fetch)(Be.EXCEPTION_ENDPOINT,{method:"POST",headers:{"STATSIG-API-KEY":this._sdkKey,"STATSIG-SDK-TYPE":String($t),"STATSIG-SDK-VERSION":String(Kt.sdkVersion),"Content-Type":"application/json"},body:JSON.stringify(Ut)}),(Dt=this._emitter)===null||Dt===void 0||Dt.call(this,{name:"error",error:kt,tag:Ct})}).then(()=>{}).catch(()=>{})}catch{}}}Be.ErrorBoundary=ht;function gt(yt){return yt instanceof Error?yt:typeof yt=="string"?new Error(yt):new Error("An unknown error occurred.")}function At(yt){try{return JSON.stringify(yt)}catch{return ft}}function xt(yt){const Ct=new Set;let kt=Object.getPrototypeOf(yt);for(;kt&&kt!==Object.prototype;)Object.getOwnPropertyNames(kt).filter(vt=>typeof(kt==null?void 0:kt[vt])=="function").forEach(vt=>Ct.add(vt)),kt=Object.getPrototypeOf(kt);return Array.from(Ct)}function Et(yt){if(!yt)return{};const Ct={};return Object.keys(yt).forEach(kt=>{const vt=kt,bt=yt[vt];switch(typeof bt){case"number":case"bigint":case"boolean":Ct[String(vt)]=bt;break;case"string":bt.length<50?Ct[String(vt)]=bt:Ct[String(vt)]="set";break;case"object":vt==="environment"?Ct.environment=bt:vt==="networkConfig"?Ct.networkConfig=bt:Ct[String(vt)]=bt!=null?"set":"unset";break}}),Ct}}(ErrorBoundary);var EvaluationOptions={};Object.defineProperty(EvaluationOptions,"__esModule",{value:!0});var EvaluationTypes={};Object.defineProperty(EvaluationTypes,"__esModule",{value:!0});var InitializeResponse={};Object.defineProperty(InitializeResponse,"__esModule",{value:!0});var MemoKey={};Object.defineProperty(MemoKey,"__esModule",{value:!0}),MemoKey.createMemoKey=MemoKey.MemoPrefix=void 0,MemoKey.MemoPrefix={_gate:"g",_dynamicConfig:"c",_experiment:"e",_configList:"cl",_layer:"l",_paramStore:"p"};const EXIST_KEYS=new Set([]),DO_NOT_MEMO_KEYS=new Set(["userPersistedValues"]);function createMemoKey(Be,Le,Ye){let tt=`${Be}|${Le}`;if(!Ye)return tt;for(const nt of Object.keys(Ye)){if(DO_NOT_MEMO_KEYS.has(nt))return;EXIST_KEYS.has(nt)?tt+=`|${nt}=true`:tt+=`|${nt}=${Ye[nt]}`}return tt}MemoKey.createMemoKey=createMemoKey;var NetworkCore$1={},NetworkFallbackResolver$1={},DnsTxtQuery={},__awaiter$d=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(DnsTxtQuery,"__esModule",{value:!0}),DnsTxtQuery._fetchTxtRecords=void 0;const FEATURE_ASSETS_DNS_QUERY=new Uint8Array([0,0,1,0,0,1,0,0,0,0,0,0,13,102,101,97,116,117,114,101,97,115,115,101,116,115,3,111,114,103,0,0,16,0,1]),DNS_QUERY_ENDPOINT="https://cloudflare-dns.com/dns-query",DOMAIN_CHARS=["i","e","d"],MAX_START_LOOKUP=200;function _fetchTxtRecords(Be){return __awaiter$d(this,void 0,void 0,function*(){const Le=yield Be(DNS_QUERY_ENDPOINT,{method:"POST",headers:{"Content-Type":"application/dns-message",Accept:"application/dns-message"},body:FEATURE_ASSETS_DNS_QUERY});if(!Le.ok){const nt=new Error("Failed to fetch TXT records from DNS");throw nt.name="DnsTxtFetchError",nt}const Ye=yield Le.arrayBuffer(),tt=new Uint8Array(Ye);return _parseDnsResponse(tt)})}DnsTxtQuery._fetchTxtRecords=_fetchTxtRecords;function _parseDnsResponse(Be){const Le=Be.findIndex((tt,nt)=>nt<MAX_START_LOOKUP&&String.fromCharCode(tt)==="="&&DOMAIN_CHARS.includes(String.fromCharCode(Be[nt-1])));if(Le===-1){const tt=new Error("Failed to parse TXT records from DNS");throw tt.name="DnsTxtParseError",tt}let Ye="";for(let tt=Le-1;tt<Be.length;tt++)Ye+=String.fromCharCode(Be[tt]);return Ye.split(",")}var __awaiter$c=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkFallbackResolver$1,"__esModule",{value:!0}),NetworkFallbackResolver$1._isDomainFailure=NetworkFallbackResolver$1.NetworkFallbackResolver=void 0;const DnsTxtQuery_1=DnsTxtQuery,Hashing_1=Hashing,Log_1$3=Log,StorageProvider_1$1=StorageProvider,DEFAULT_TTL_MS=7*24*60*60*1e3,COOLDOWN_TIME_MS=4*60*60*1e3;class NetworkFallbackResolver{constructor(Le){var Ye;this._fallbackInfo=null,this._errorBoundary=null,this._dnsQueryCooldowns={},this._networkOverrideFunc=(Ye=Le.networkConfig)===null||Ye===void 0?void 0:Ye.networkOverrideFunc}setErrorBoundary(Le){this._errorBoundary=Le}tryBumpExpiryTime(Le,Ye){var tt;const nt=(tt=this._fallbackInfo)===null||tt===void 0?void 0:tt[Ye.endpoint];nt&&(nt.expiryTime=Date.now()+DEFAULT_TTL_MS,_tryWriteFallbackInfoToCache(Le,Object.assign(Object.assign({},this._fallbackInfo),{[Ye.endpoint]:nt})))}getActiveFallbackUrl(Le,Ye){var tt,nt;if(Ye.customUrl!=null&&Ye.fallbackUrls!=null)return null;let ft=this._fallbackInfo;ft==null&&(ft=(tt=_readFallbackInfoFromCache(Le))!==null&&tt!==void 0?tt:{},this._fallbackInfo=ft);const ht=ft[Ye.endpoint];return!ht||Date.now()>((nt=ht.expiryTime)!==null&&nt!==void 0?nt:0)||Ye.getChecksum()!==ht.urlConfigChecksum?(delete ft[Ye.endpoint],this._fallbackInfo=ft,_tryWriteFallbackInfoToCache(Le,this._fallbackInfo),null):ht.url?ht.url:null}tryFetchUpdatedFallbackInfo(Le,Ye,tt,nt){return __awaiter$c(this,void 0,void 0,function*(){var ft,ht;try{if(!_isDomainFailure(tt,nt))return!1;const At=Ye.customUrl==null&&Ye.fallbackUrls==null?yield this._tryFetchFallbackUrlsFromNetwork(Ye):Ye.fallbackUrls,xt=this._pickNewFallbackUrl((ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[Ye.endpoint],At);return xt?(this._updateFallbackInfoWithNewUrl(Le,Ye,xt),!0):!1}catch(gt){return(ht=this._errorBoundary)===null||ht===void 0||ht.logError("tryFetchUpdatedFallbackInfo",gt),!1}})}_updateFallbackInfoWithNewUrl(Le,Ye,tt){var nt,ft,ht;const gt={urlConfigChecksum:Ye.getChecksum(),url:tt,expiryTime:Date.now()+DEFAULT_TTL_MS,previous:[]},At=Ye.endpoint,xt=(nt=this._fallbackInfo)===null||nt===void 0?void 0:nt[At];xt&>.previous.push(...xt.previous),gt.previous.length>10&&(gt.previous=[]);const Et=(ht=(ft=this._fallbackInfo)===null||ft===void 0?void 0:ft[At])===null||ht===void 0?void 0:ht.url;Et!=null&>.previous.push(Et),this._fallbackInfo=Object.assign(Object.assign({},this._fallbackInfo),{[At]:gt}),_tryWriteFallbackInfoToCache(Le,this._fallbackInfo)}_tryFetchFallbackUrlsFromNetwork(Le){return __awaiter$c(this,void 0,void 0,function*(){var Ye;const tt=this._dnsQueryCooldowns[Le.endpoint];if(tt&&Date.now()<tt)return null;this._dnsQueryCooldowns[Le.endpoint]=Date.now()+COOLDOWN_TIME_MS;const nt=[],ft=yield(0,DnsTxtQuery_1._fetchTxtRecords)((Ye=this._networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch),ht=_extractPathFromUrl(Le.defaultUrl);for(const gt of ft){if(!gt.startsWith(Le.endpointDnsKey+"="))continue;const At=gt.split("=");if(At.length>1){let xt=At[1];xt.endsWith("/")&&(xt=xt.slice(0,-1)),nt.push(`https://${xt}${ht}`)}}return nt})}_pickNewFallbackUrl(Le,Ye){var tt;if(Ye==null)return null;const nt=new Set((tt=Le==null?void 0:Le.previous)!==null&&tt!==void 0?tt:[]),ft=Le==null?void 0:Le.url;let ht=null;for(const gt of Ye){const At=gt.endsWith("/")?gt.slice(0,-1):gt;if(!nt.has(gt)&&At!==ft){ht=At;break}}return ht}}NetworkFallbackResolver$1.NetworkFallbackResolver=NetworkFallbackResolver;function _isDomainFailure(Be,Le){var Ye;const tt=(Ye=Be==null?void 0:Be.toLowerCase())!==null&&Ye!==void 0?Ye:"";return Le||tt.includes("uncaught exception")||tt.includes("failed to fetch")||tt.includes("networkerror when attempting to fetch resource")}NetworkFallbackResolver$1._isDomainFailure=_isDomainFailure;function _getFallbackInfoStorageKey(Be){return`statsig.network_fallback.${(0,Hashing_1._DJB2)(Be)}`}function _tryWriteFallbackInfoToCache(Be,Le){const Ye=_getFallbackInfoStorageKey(Be);if(!Le||Object.keys(Le).length===0){StorageProvider_1$1.Storage.removeItem(Ye);return}StorageProvider_1$1.Storage.setItem(Ye,JSON.stringify(Le))}function _readFallbackInfoFromCache(Be){const Le=_getFallbackInfoStorageKey(Be),Ye=StorageProvider_1$1.Storage.getItem(Le);if(!Ye)return null;try{return JSON.parse(Ye)}catch{return Log_1$3.Log.error("Failed to parse FallbackInfo"),null}}function _extractPathFromUrl(Be){try{return new URL(Be).pathname}catch{return null}}var SDKFlags={};Object.defineProperty(SDKFlags,"__esModule",{value:!0}),SDKFlags.SDKFlags=void 0;const FLAGMAP={};SDKFlags.SDKFlags={setFlags:(Be,Le)=>{FLAGMAP[Be]=Le},get:(Be,Le)=>{var Ye,tt;return(tt=(Ye=FLAGMAP[Be])===null||Ye===void 0?void 0:Ye[Le])!==null&&tt!==void 0?tt:!1}};var SessionID={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigSession=Be.SessionID=void 0;const Le=$_StatsigGlobal,Ye=CacheKey,tt=Log,nt=StorageProvider,ft=UUID,ht=30*60*1e3,gt=4*60*60*1e3,At={};Be.SessionID={get:Rt=>Be.StatsigSession.get(Rt).data.sessionID},Be.StatsigSession={get:Rt=>{At[Rt]==null&&(At[Rt]=xt(Rt));const Tt=At[Rt];return yt(Tt)},overrideInitialSessionID:(Rt,Tt)=>{At[Tt]=Et(Rt,Tt)}};function xt(Rt){let Tt=wt(Rt);const Bt=Date.now();return Tt||(Tt={sessionID:(0,ft.getUUID)(),startTime:Bt,lastUpdate:Bt}),{data:Tt,sdkKey:Rt}}function Et(Rt,Tt){const Bt=Date.now();return{data:{sessionID:Rt,startTime:Bt,lastUpdate:Bt},sdkKey:Tt}}function yt(Rt){const Tt=Date.now(),Bt=Rt.data,Dt=Rt.sdkKey;if(kt(Bt)||vt(Bt)){Bt.sessionID=(0,ft.getUUID)(),Bt.startTime=Tt;const Nt=__STATSIG__==null?void 0:__STATSIG__.instance(Dt);Nt&&Nt.$emt({name:"session_expired"})}Bt.lastUpdate=Tt,It(Bt,Rt.sdkKey),clearTimeout(Rt.idleTimeoutID),clearTimeout(Rt.ageTimeoutID);const Pt=Tt-Bt.startTime;return Rt.idleTimeoutID=Ct(Dt,ht),Rt.ageTimeoutID=Ct(Dt,gt-Pt),Rt}function Ct(Rt,Tt){return setTimeout(()=>{var Bt;const Dt=(Bt=(0,Le._getStatsigGlobal)())===null||Bt===void 0?void 0:Bt.instance(Rt);Dt&&Dt.$emt({name:"session_expired"})},Tt)}function kt({lastUpdate:Rt}){return Date.now()-Rt>ht}function vt({startTime:Rt}){return Date.now()-Rt>gt}function bt(Rt){return`statsig.session_id.${(0,Ye._getStorageKey)(Rt)}`}function It(Rt,Tt){const Bt=bt(Tt);try{(0,nt._setObjectInStorage)(Bt,Rt)}catch{tt.Log.warn("Failed to save SessionID")}}function wt(Rt){const Tt=bt(Rt);return(0,nt._getObjectFromStorage)(Tt)}})(SessionID);var StatsigClientEventEmitter={};Object.defineProperty(StatsigClientEventEmitter,"__esModule",{value:!0}),StatsigClientEventEmitter.ErrorTag=void 0,StatsigClientEventEmitter.ErrorTag={NetworkError:"NetworkError"};var __awaiter$b=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(NetworkCore$1,"__esModule",{value:!0}),NetworkCore$1.NetworkCore=void 0;const __StatsigGlobal_1$1=$_StatsigGlobal,Diagnostics_1=Diagnostics,Log_1$2=Log,NetworkConfig_1=NetworkConfig,NetworkFallbackResolver_1=NetworkFallbackResolver$1,SDKFlags_1=SDKFlags,SDKType_1=SDKType,SafeJs_1$1=SafeJs,SessionID_1$1=SessionID,StableID_1$1=StableID,StatsigClientEventEmitter_1=StatsigClientEventEmitter,StatsigMetadata_1=StatsigMetadata,StatsigOptionsCommon_1$1=StatsigOptionsCommon,VisibilityObserving_1=VisibilityObserving,DEFAULT_TIMEOUT_MS=1e4,BACKOFF_BASE_MS=500,BACKOFF_MAX_MS=3e4,RATE_LIMIT_WINDOW_MS=1e3,RATE_LIMIT_MAX_REQ_COUNT=50,LEAK_RATE=RATE_LIMIT_MAX_REQ_COUNT/RATE_LIMIT_WINDOW_MS,RETRYABLE_CODES=new Set([408,500,502,503,504,522,524,599]);class NetworkCore{constructor(Le,Ye){this._emitter=Ye,this._errorBoundary=null,this._timeout=DEFAULT_TIMEOUT_MS,this._netConfig={},this._options={},this._leakyBucket={},this._lastUsedInitUrl=null,Le&&(this._options=Le),this._options.networkConfig&&(this._netConfig=this._options.networkConfig),this._netConfig.networkTimeoutMs&&(this._timeout=this._netConfig.networkTimeoutMs),this._fallbackResolver=new NetworkFallbackResolver_1.NetworkFallbackResolver(this._options),this.setLogEventCompressionMode(this._getLogEventCompressionMode(Le))}setLogEventCompressionMode(Le){this._options.logEventCompressionMode=Le}setErrorBoundary(Le){this._errorBoundary=Le,this._errorBoundary.wrap(this),this._errorBoundary.wrap(this._fallbackResolver),this._fallbackResolver.setErrorBoundary(Le)}isBeaconSupported(){return typeof navigator<"u"&&typeof navigator.sendBeacon=="function"}getLastUsedInitUrlAndReset(){const Le=this._lastUsedInitUrl;return this._lastUsedInitUrl=null,Le}beacon(Le){if(!_ensureValidSdkKey(Le))return!1;const Ye=this._getInternalRequestArgs("POST",Le),tt=this._getPopulatedURL(Ye),nt=navigator;return nt.sendBeacon.bind(nt)(tt,Ye.body)}post(Le){return __awaiter$b(this,void 0,void 0,function*(){const Ye=this._getInternalRequestArgs("POST",Le);return this._tryEncodeBody(Ye),yield this._tryToCompressBody(Ye),this._sendRequest(Ye)})}get(Le){const Ye=this._getInternalRequestArgs("GET",Le);return this._sendRequest(Ye)}_sendRequest(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye,tt,nt,ft;if(!_ensureValidSdkKey(Le)||this._netConfig.preventAllNetworkTraffic)return null;const{method:ht,body:gt,retries:At,attempt:xt}=Le,Et=Le.urlConfig.endpoint;if(this._isRateLimited(Et))return Log_1$2.Log.warn(`Request to ${Et} was blocked because you are making requests too frequently.`),null;const yt=xt??1;let Ct=!1;const kt=this._getPopulatedURL(Le);let vt=null;const bt=(0,VisibilityObserving_1._isUnloading)();try{const It={method:ht,body:gt,headers:Object.assign({},Le.headers),priority:Le.priority,keepalive:bt};_tryMarkInitStart(Le,yt);const wt=this._leakyBucket[Et];wt&&(wt.lastRequestTime=Date.now(),this._leakyBucket[Et]=wt);const Rt=(Ye=this._netConfig.networkOverrideFunc)!==null&&Ye!==void 0?Ye:fetch;let Tt;if(vt=yield Promise.race([Rt(kt,It).finally(()=>clearTimeout(Tt)),new Promise((Dt,Pt)=>{Tt=setTimeout(()=>{Ct=!0,Pt(new Error(`Timeout of ${this._timeout}ms expired.`))},this._timeout)})]),!vt.ok){const Dt=yield vt.text().catch(()=>"No Text"),Pt=new Error(`NetworkError: ${kt} ${Dt}`);throw Pt.name="NetworkError",Pt}const Bt=yield vt.text();return _tryMarkInitEnd(Le,vt,yt,Bt),this._fallbackResolver.tryBumpExpiryTime(Le.sdkKey,Le.urlConfig),{body:Bt,code:vt.status}}catch(It){const wt=_getErrorMessage(It),Rt=_didTimeout(wt??"",Ct);if(_tryMarkInitEnd(Le,vt,yt,"",It),(yield this._fallbackResolver.tryFetchUpdatedFallbackInfo(Le.sdkKey,Le.urlConfig,wt,Rt))&&(Le.fallbackUrl=this._fallbackResolver.getActiveFallbackUrl(Le.sdkKey,Le.urlConfig)),!At||yt>At||!RETRYABLE_CODES.has((tt=vt==null?void 0:vt.status)!==null&&tt!==void 0?tt:500)){(nt=this._emitter)===null||nt===void 0||nt.call(this,{name:"error",error:It,tag:StatsigClientEventEmitter_1.ErrorTag.NetworkError,requestArgs:Le});const Bt=`A networking error occurred during ${ht} request to ${kt}.`;return Log_1$2.Log.error(Bt,wt,It),(ft=this._errorBoundary)===null||ft===void 0||ft.attachErrorIfNoneExists(Bt),null}return yield _exponentialBackoff(yt),this._sendRequest(Object.assign(Object.assign({},Le),{retries:At,attempt:yt+1}))}})}_getLogEventCompressionMode(Le){let Ye=Le==null?void 0:Le.logEventCompressionMode;return!Ye&&(Le==null?void 0:Le.disableCompression)===!0&&(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled),Ye||(Ye=StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled),Ye}_isRateLimited(Le){var Ye;const tt=Date.now(),nt=(Ye=this._leakyBucket[Le])!==null&&Ye!==void 0?Ye:{count:0,lastRequestTime:tt},ft=tt-nt.lastRequestTime,ht=Math.floor(ft*LEAK_RATE);return nt.count=Math.max(0,nt.count-ht),nt.count>=RATE_LIMIT_MAX_REQ_COUNT?!0:(nt.count+=1,nt.lastRequestTime=tt,this._leakyBucket[Le]=nt,!1)}_getPopulatedURL(Le){var Ye;const tt=(Ye=Le.fallbackUrl)!==null&&Ye!==void 0?Ye:Le.urlConfig.getUrl();(Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize||Le.urlConfig.endpoint===NetworkConfig_1.Endpoint._download_config_specs)&&(this._lastUsedInitUrl=tt);const nt=Object.assign({[NetworkConfig_1.NetworkParam.SdkKey]:Le.sdkKey,[NetworkConfig_1.NetworkParam.SdkType]:SDKType_1.SDKType._get(Le.sdkKey),[NetworkConfig_1.NetworkParam.SdkVersion]:StatsigMetadata_1.SDK_VERSION,[NetworkConfig_1.NetworkParam.Time]:String(Date.now()),[NetworkConfig_1.NetworkParam.SessionID]:SessionID_1$1.SessionID.get(Le.sdkKey)},Le.params),ft=Object.keys(nt).map(ht=>`${encodeURIComponent(ht)}=${encodeURIComponent(nt[ht])}`).join("&");return`${tt}${ft?`?${ft}`:""}`}_tryEncodeBody(Le){var Ye;const tt=(0,SafeJs_1$1._getWindowSafe)(),nt=Le.body;if(!(!Le.isStatsigEncodable||this._options.disableStatsigEncoding||typeof nt!="string"||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-encode")!=null||!(tt!=null&&tt.btoa)))try{Le.body=tt.btoa(nt).split("").reverse().join(""),Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.StatsigEncoded]:"1"})}catch(ft){Log_1$2.Log.warn(`Request encoding failed for ${Le.urlConfig.getUrl()}`,ft)}}_tryToCompressBody(Le){return __awaiter$b(this,void 0,void 0,function*(){var Ye;const tt=Le.body;if(!(typeof tt!="string"||!_allowCompression(Le,this._options)))try{const nt=new TextEncoder().encode(tt),ft=new CompressionStream("gzip"),ht=ft.writable.getWriter();ht.write(nt).catch(Log_1$2.Log.error),ht.close().catch(Log_1$2.Log.error);const gt=ft.readable.getReader(),At=[];let xt;for(;!(xt=yield gt.read()).done;)At.push(xt.value);const Et=At.reduce((kt,vt)=>kt+vt.length,0),yt=new Uint8Array(Et);let Ct=0;for(const kt of At)yt.set(kt,Ct),Ct+=kt.length;Le.body=yt,Le.params=Object.assign(Object.assign({},(Ye=Le.params)!==null&&Ye!==void 0?Ye:{}),{[NetworkConfig_1.NetworkParam.IsGzipped]:"1"})}catch(nt){Log_1$2.Log.warn(`Request compression failed for ${Le.urlConfig.getUrl()}`,nt)}})}_getInternalRequestArgs(Le,Ye){const tt=this._fallbackResolver.getActiveFallbackUrl(Ye.sdkKey,Ye.urlConfig),nt=Object.assign(Object.assign({},Ye),{method:Le,fallbackUrl:tt});return"data"in Ye&&_populateRequestBody(nt,Ye.data),nt}}NetworkCore$1.NetworkCore=NetworkCore;const _ensureValidSdkKey=Be=>Be.sdkKey?!0:(Log_1$2.Log.warn("Unable to make request without an SDK key"),!1),_populateRequestBody=(Be,Le)=>{const{sdkKey:Ye,fallbackUrl:tt}=Be,nt=StableID_1$1.StableID.get(Ye),ft=SessionID_1$1.SessionID.get(Ye),ht=SDKType_1.SDKType._get(Ye);Be.body=JSON.stringify(Object.assign(Object.assign({},Le),{statsigMetadata:Object.assign(Object.assign({},StatsigMetadata_1.StatsigMetadataProvider.get()),{stableID:nt,sessionID:ft,sdkType:ht,fallbackUrl:tt})}))};function _allowCompression(Be,Le){if(!Be.isCompressable||(0,__StatsigGlobal_1$1._getStatsigGlobalFlag)("no-compress")!=null||typeof CompressionStream>"u"||typeof TextEncoder>"u")return!1;const Ye=Be.urlConfig.customUrl!=null||Be.urlConfig.fallbackUrls!=null,tt=SDKFlags_1.SDKFlags.get(Be.sdkKey,"enable_log_event_compression")===!0;switch(Le.logEventCompressionMode){case StatsigOptionsCommon_1$1.LogEventCompressionMode.Disabled:return!1;case StatsigOptionsCommon_1$1.LogEventCompressionMode.Enabled:return!(Ye&&!tt);case StatsigOptionsCommon_1$1.LogEventCompressionMode.Forced:return!0;default:return!1}}function _getErrorMessage(Be){return typeof Be=="string"?Be:Be instanceof Error?`${Be.name}: ${Be.message}`:"Unknown Error"}function _didTimeout(Be,Le){return Be.includes("Timeout")||Le}function _tryMarkInitStart(Be,Le){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqStart(Be.sdkKey,{attempt:Le})}function _tryMarkInitEnd(Be,Le,Ye,tt,nt){Be.urlConfig.endpoint===NetworkConfig_1.Endpoint._initialize&&Diagnostics_1.Diagnostics._markInitNetworkReqEnd(Be.sdkKey,Diagnostics_1.Diagnostics._getDiagnosticsData(Le,Ye,tt,nt))}function _exponentialBackoff(Be){return __awaiter$b(this,void 0,void 0,function*(){yield new Promise(Le=>setTimeout(Le,Math.min(BACKOFF_BASE_MS*(Be*Be),BACKOFF_MAX_MS)))})}var OverrideAdapter={};Object.defineProperty(OverrideAdapter,"__esModule",{value:!0});var ParamStoreTypes={};Object.defineProperty(ParamStoreTypes,"__esModule",{value:!0});var SizeOf={};(function(Be){Object.defineProperty(Be,"__esModule",{value:!0}),Be._fastApproxSizeOf=void 0;const Le=2,Ye=1,tt=(nt,ft)=>{let ht=0;const gt=Object.keys(nt);for(let At=0;At<gt.length;At++){const xt=gt[At],Et=nt[xt];if(ht+=xt.length,typeof Et=="object"&&Et!==null?ht+=(0,Be._fastApproxSizeOf)(Et,ft)+Le:ht+=String(Et).length+Ye,ht>=ft)return ht}return ht};Be._fastApproxSizeOf=tt})(SizeOf);var StatsigClientBase$1={},__awaiter$a=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClientBase$1,"__esModule",{value:!0}),StatsigClientBase$1.StatsigClientBase=void 0;const __StatsigGlobal_1=$_StatsigGlobal,ErrorBoundary_1=ErrorBoundary,EventLogger_1=EventLogger$1,Log_1$1=Log,MemoKey_1=MemoKey,SafeJs_1=SafeJs,SessionID_1=SessionID,StableID_1=StableID,StatsigOptionsCommon_1=StatsigOptionsCommon,StorageProvider_1=StorageProvider,MAX_MEMO_CACHE_SIZE=3e3;class StatsigClientBase{constructor(Le,Ye,tt,nt){var ft,ht,gt,At;this.loadingStatus="Uninitialized",this._initializePromise=null,this._listeners={};const xt=this.$emt.bind(this);(nt==null?void 0:nt.logLevel)!=null&&(Log_1$1.Log.level=nt.logLevel),nt!=null&&nt.disableStorage&&StorageProvider_1.Storage._setDisabled(!0),nt!=null&&nt.initialSessionID&&SessionID_1.StatsigSession.overrideInitialSessionID(nt.initialSessionID,Le),nt!=null&&nt.storageProvider&&StorageProvider_1.Storage._setProvider(nt.storageProvider),nt!=null&&nt.enableCookies&&StableID_1.StableID._setCookiesEnabled(Le,nt.enableCookies),nt!=null&&nt.disableStableID&&StableID_1.StableID._setDisabled(Le,!0),this._sdkKey=Le,this._options=nt??{},this._memoCache={},this.overrideAdapter=(ft=nt==null?void 0:nt.overrideAdapter)!==null&&ft!==void 0?ft:null,this._logger=new EventLogger_1.EventLogger(Le,xt,tt,nt),this._errorBoundary=new ErrorBoundary_1.ErrorBoundary(Le,nt,xt),this._errorBoundary.wrap(this),this._errorBoundary.wrap(Ye),this._errorBoundary.wrap(this._logger),tt.setErrorBoundary(this._errorBoundary),this.dataAdapter=Ye,this.dataAdapter.attach(Le,nt,tt),this.storageProvider=StorageProvider_1.Storage,(At=(gt=(ht=this.overrideAdapter)===null||ht===void 0?void 0:ht.loadFromStorage)===null||gt===void 0?void 0:gt.call(ht))===null||At===void 0||At.catch(Et=>this._errorBoundary.logError("OA::loadFromStorage",Et)),this._primeReadyRipcord(),_assignGlobalInstance(Le,this)}updateRuntimeOptions(Le){Le.loggingEnabled?(this._options.loggingEnabled=Le.loggingEnabled,this._logger.setLoggingEnabled(Le.loggingEnabled)):Le.disableLogging!=null&&(this._options.disableLogging=Le.disableLogging,this._logger.setLoggingEnabled(Le.disableLogging?"disabled":"browser-only")),Le.disableStorage!=null&&(this._options.disableStorage=Le.disableStorage,StorageProvider_1.Storage._setDisabled(Le.disableStorage)),Le.enableCookies!=null&&(this._options.enableCookies=Le.enableCookies,StableID_1.StableID._setCookiesEnabled(this._sdkKey,Le.enableCookies)),Le.logEventCompressionMode?this._logger.setLogEventCompressionMode(Le.logEventCompressionMode):Le.disableCompression&&this._logger.setLogEventCompressionMode(StatsigOptionsCommon_1.LogEventCompressionMode.Disabled)}flush(){return this._logger.flush()}shutdown(){return __awaiter$a(this,void 0,void 0,function*(){this.$emt({name:"pre_shutdown"}),this._setStatus("Uninitialized",null),this._initializePromise=null,yield this._logger.stop()})}on(Le,Ye){this._listeners[Le]||(this._listeners[Le]=[]),this._listeners[Le].push(Ye)}off(Le,Ye){if(this._listeners[Le]){const tt=this._listeners[Le].indexOf(Ye);tt!==-1&&this._listeners[Le].splice(tt,1)}}$on(Le,Ye){Ye.__isInternal=!0,this.on(Le,Ye)}$emt(Le){var Ye;const tt=nt=>{try{nt(Le)}catch(ft){if(nt.__isInternal===!0){this._errorBoundary.logError(`__emit:${Le.name}`,ft);return}Log_1$1.Log.error("An error occurred in a StatsigClientEvent listener. This is not an issue with Statsig.",Le)}};this._listeners[Le.name]&&this._listeners[Le.name].forEach(nt=>tt(nt)),(Ye=this._listeners["*"])===null||Ye===void 0||Ye.forEach(tt)}_setStatus(Le,Ye){this.loadingStatus=Le,this._memoCache={},this.$emt({name:"values_updated",status:Le,values:Ye})}_enqueueExposure(Le,Ye,tt){if((tt==null?void 0:tt.disableExposureLog)===!0){this._logger.incrementNonExposureCount(Le);return}this._logger.enqueue(Ye)}_memoize(Le,Ye){return(tt,nt)=>{if(this._options.disableEvaluationMemoization)return Ye(tt,nt);const ft=(0,MemoKey_1.createMemoKey)(Le,tt,nt);return ft?(ft in this._memoCache||(Object.keys(this._memoCache).length>=MAX_MEMO_CACHE_SIZE&&(this._memoCache={}),this._memoCache[ft]=Ye(tt,nt)),this._memoCache[ft]):Ye(tt,nt)}}}StatsigClientBase$1.StatsigClientBase=StatsigClientBase;function _assignGlobalInstance(Be,Le){var Ye;if((0,SafeJs_1._isServerEnv)())return;const tt=(0,__StatsigGlobal_1._getStatsigGlobal)(),nt=(Ye=tt.instances)!==null&&Ye!==void 0?Ye:{},ft=Le;nt[Be]!=null&&Log_1$1.Log.warn("Creating multiple Statsig clients with the same SDK key can lead to unexpected behavior. Multi-instance support requires different SDK keys."),nt[Be]=ft,tt.firstInstance||(tt.firstInstance=ft),tt.instances=nt,__STATSIG__=tt}var StatsigDataAdapter={};Object.defineProperty(StatsigDataAdapter,"__esModule",{value:!0}),StatsigDataAdapter.DataAdapterCachePrefix=void 0,StatsigDataAdapter.DataAdapterCachePrefix="statsig.cached";var StatsigPlugin={};Object.defineProperty(StatsigPlugin,"__esModule",{value:!0});var StatsigTypeFactories={};Object.defineProperty(StatsigTypeFactories,"__esModule",{value:!0}),StatsigTypeFactories._makeTypedGet=StatsigTypeFactories._mergeOverride=StatsigTypeFactories._makeLayer=StatsigTypeFactories._makeExperiment=StatsigTypeFactories._makeDynamicConfig=StatsigTypeFactories._makeFeatureGate=void 0;const Log_1=Log,TypingUtils_1=TypingUtils;function _makeEvaluation(Be,Le,Ye,tt){var nt;return{name:Be,details:Le,ruleID:(nt=Ye==null?void 0:Ye.rule_id)!==null&&nt!==void 0?nt:"",__evaluation:Ye,value:tt}}function _makeFeatureGate(Be,Le,Ye){var tt;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,(Ye==null?void 0:Ye.value)===!0)),{idType:(tt=Ye==null?void 0:Ye.id_type)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeFeatureGate=_makeFeatureGate;function _makeDynamicConfig(Be,Le,Ye){var tt,nt;const ft=(tt=Ye==null?void 0:Ye.value)!==null&&tt!==void 0?tt:{};return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,ft)),{idType:(nt=Ye==null?void 0:Ye.id_type)!==null&&nt!==void 0?nt:null,get:_makeTypedGet(Be,Ye==null?void 0:Ye.value)})}StatsigTypeFactories._makeDynamicConfig=_makeDynamicConfig;function _makeExperiment(Be,Le,Ye){var tt;const nt=_makeDynamicConfig(Be,Le,Ye);return Object.assign(Object.assign({},nt),{groupName:(tt=Ye==null?void 0:Ye.group_name)!==null&&tt!==void 0?tt:null})}StatsigTypeFactories._makeExperiment=_makeExperiment;function _makeLayer(Be,Le,Ye,tt){var nt,ft;return Object.assign(Object.assign({},_makeEvaluation(Be,Le,Ye,void 0)),{get:_makeTypedGet(Be,Ye==null?void 0:Ye.value,tt),groupName:(nt=Ye==null?void 0:Ye.group_name)!==null&&nt!==void 0?nt:null,__value:(ft=Ye==null?void 0:Ye.value)!==null&&ft!==void 0?ft:{}})}StatsigTypeFactories._makeLayer=_makeLayer;function _mergeOverride(Be,Le,Ye,tt){return Object.assign(Object.assign(Object.assign({},Be),Le),{get:_makeTypedGet(Be.name,Ye,tt)})}StatsigTypeFactories._mergeOverride=_mergeOverride;function _makeTypedGet(Be,Le,Ye){return(tt,nt)=>{var ft;const ht=(ft=Le==null?void 0:Le[tt])!==null&&ft!==void 0?ft:null;return ht==null?nt??null:nt!=null&&!(0,TypingUtils_1._isTypeMatch)(ht,nt)?(Log_1.Log.warn(`Parameter type mismatch. '${Be}.${tt}' was found to be type '${typeof ht}' but fallback/return type is '${typeof nt}'. See https://docs.statsig.com/client/javascript-sdk/#typed-getters`),nt??null):(Ye==null||Ye(tt),ht)}}StatsigTypeFactories._makeTypedGet=_makeTypedGet;var StatsigTypes={};Object.defineProperty(StatsigTypes,"__esModule",{value:!0});var StatsigUpdateDetails={};Object.defineProperty(StatsigUpdateDetails,"__esModule",{value:!0}),StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES=StatsigUpdateDetails.createUpdateDetails=void 0;const createUpdateDetails=(Be,Le,Ye,tt,nt,ft)=>({duration:Ye,source:Le,success:Be,error:tt,sourceUrl:nt,warnings:ft});StatsigUpdateDetails.createUpdateDetails=createUpdateDetails,StatsigUpdateDetails.UPDATE_DETAIL_ERROR_MESSAGES={NO_NETWORK_DATA:"No data was returned from the network. This may be due to a network timeout if a timeout value was specified in the options or ad blocker error."},function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt);var kt=Object.getOwnPropertyDescriptor(Et,yt);(!kt||("get"in kt?!Et.__esModule:kt.writable||kt.configurable))&&(kt={enumerable:!0,get:function(){return Et[yt]}}),Object.defineProperty(xt,Ct,kt)}:function(xt,Et,yt,Ct){Ct===void 0&&(Ct=yt),xt[Ct]=Et[yt]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(xt,Et){for(var yt in xt)yt!=="default"&&!Object.prototype.hasOwnProperty.call(Et,yt)&&Le(Et,xt,yt)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.Storage=Be.Log=Be.EventLogger=Be.Diagnostics=void 0;const tt=$_StatsigGlobal,nt=Diagnostics;Object.defineProperty(Be,"Diagnostics",{enumerable:!0,get:function(){return nt.Diagnostics}});const ft=EventLogger$1;Object.defineProperty(Be,"EventLogger",{enumerable:!0,get:function(){return ft.EventLogger}});const ht=Log;Object.defineProperty(Be,"Log",{enumerable:!0,get:function(){return ht.Log}});const gt=StatsigMetadata,At=StorageProvider;Object.defineProperty(Be,"Storage",{enumerable:!0,get:function(){return At.Storage}}),Ye($_StatsigGlobal,Be),Ye(CacheKey,Be),Ye(ClientInterfaces,Be),Ye(DataAdapterCore$1,Be),Ye(Diagnostics,Be),Ye(DownloadConfigSpecsResponse,Be),Ye(ErrorBoundary,Be),Ye(EvaluationOptions,Be),Ye(EvaluationTypes,Be),Ye(Hashing,Be),Ye(InitializeResponse,Be),Ye(Log,Be),Ye(MemoKey,Be),Ye(NetworkConfig,Be),Ye(NetworkCore$1,Be),Ye(OverrideAdapter,Be),Ye(ParamStoreTypes,Be),Ye(SafeJs,Be),Ye(SDKType,Be),Ye(SessionID,Be),Ye(SizeOf,Be),Ye(StableID,Be),Ye(StatsigClientBase$1,Be),Ye(StatsigClientEventEmitter,Be),Ye(StatsigDataAdapter,Be),Ye(StatsigEvent,Be),Ye(StatsigMetadata,Be),Ye(StatsigOptionsCommon,Be),Ye(StatsigPlugin,Be),Ye(StatsigTypeFactories,Be),Ye(StatsigTypes,Be),Ye(StatsigUser,Be),Ye(StorageProvider,Be),Ye(TypedJsonParse,Be),Ye(TypingUtils,Be),Ye(UrlConfiguration$1,Be),Ye(UUID,Be),Ye(VisibilityObserving,Be),Ye(StatsigUpdateDetails,Be),Ye(SDKFlags,Be),Object.assign((0,tt._getStatsigGlobal)(),{Log:ht.Log,SDK_VERSION:gt.SDK_VERSION})}(src$1);var StatsigClient$1={},EvaluationStore$1={},V1InitializeContainer$1={};Object.defineProperty(V1InitializeContainer$1,"__esModule",{value:!0}),V1InitializeContainer$1.V1InitializeContainer=void 0;const client_core_1$7=src$1;class V1InitializeContainer{constructor(Le){this._values=Le}getGate(Le){return this._getResultFromLookup(this._values.feature_gates,Le)}getConfig(Le){return this._getResultFromLookup(this._values.dynamic_configs,Le)}getLayer(Le){return this._getResultFromLookup(this._values.layer_configs,Le)}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$7._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V1InitializeContainer$1.V1InitializeContainer=V1InitializeContainer;var V2InitializeContainer$1={};Object.defineProperty(V2InitializeContainer$1,"__esModule",{value:!0}),V2InitializeContainer$1.V2InitializeContainer=void 0;const client_core_1$6=src$1;class V2InitializeContainer{constructor(Le){this._values=Le}getGate(Le){var Ye,tt,nt;const ft=this._getResultFromLookup(this._values.feature_gates,Le);return ft?{name:Le,value:ft.v===!0,rule_id:(Ye=ft.r)!==null&&Ye!==void 0?Ye:"default",secondary_exposures:(tt=ft.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ft.i)!==null&&nt!==void 0?nt:""}:null}getConfig(Le){var Ye,tt,nt,ft;const ht=this._getResultFromLookup(this._values.dynamic_configs,Le);return ht?{name:Le,value:(Ye=this._values.values[ht.v])!==null&&Ye!==void 0?Ye:{},rule_id:ht.r,secondary_exposures:(tt=ht.s)!==null&&tt!==void 0?tt:[],id_type:(nt=ht.i)!==null&&nt!==void 0?nt:"",is_user_in_experiment:ht.ue===!0,passed:ht.p===!0,group_name:(ft=ht.gn)!==null&&ft!==void 0?ft:void 0,is_experiment_active:ht.ea===!0,group:ht.r,is_device_based:ht.i==="stableID"}:null}getLayer(Le){var Ye,tt,nt,ft,ht,gt;const At=this._getResultFromLookup(this._values.layer_configs,Le);return At?{name:Le,value:(Ye=this._values.values[At.v])!==null&&Ye!==void 0?Ye:{},rule_id:At.r,secondary_exposures:(tt=At.s)!==null&&tt!==void 0?tt:[],is_user_in_experiment:At.ue===!0,group_name:(nt=At.gn)!==null&&nt!==void 0?nt:void 0,is_experiment_active:At.ea===!0,group:At.r,is_device_based:At.i==="stableID",allocated_experiment_name:(ft=At.ae)!==null&&ft!==void 0?ft:"",explicit_parameters:(ht=At.ep)!==null&&ht!==void 0?ht:[],undelegated_secondary_exposures:(gt=At.us)!==null&>!==void 0?gt:[],parameter_rule_ids:At.pr}:null}getParamStore(Le){return this._getResultFromLookup(this._values.param_stores,Le)}getConfigList(){return Object.keys(this._values.dynamic_configs)}getExposureMapping(){return this._values.exposures}_getResultFromLookup(Le,Ye){var tt,nt;return Le&&(nt=(tt=Le[Ye])!==null&&tt!==void 0?tt:Le[(0,client_core_1$6._DJB2)(Ye)])!==null&&nt!==void 0?nt:null}}V2InitializeContainer$1.V2InitializeContainer=V2InitializeContainer,Object.defineProperty(EvaluationStore$1,"__esModule",{value:!0});const client_core_1$5=src$1,V1InitializeContainer_1=V1InitializeContainer$1,V2InitializeContainer_1=V2InitializeContainer$1;class EvaluationStore{constructor(Le){this._sdkKey=Le,this._rawValues=null,this._values=null,this._source="Uninitialized",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings=new Set}reset(){this._values=null,this._rawValues=null,this._source="Loading",this._lcut=0,this._receivedAt=0,this._bootstrapMetadata=null,this._warnings.clear()}finalize(){this._values||(this._source="NoValues")}getValues(){return this._rawValues?(0,client_core_1$5._typedJsonParse)(this._rawValues,"has_updates","EvaluationStoreValues"):null}setValues(Le,Ye){var tt,nt;if(!Le)return!1;const ft=(0,client_core_1$5._typedJsonParse)(Le.data,"has_updates","EvaluationResponse");return ft==null?!1:(this._source=Le.source,(ft==null?void 0:ft.has_updates)!==!0||((tt=ft.time)!==null&&tt!==void 0?tt:0)<this._lcut||(this._rawValues=Le.data,this._lcut=ft.time,this._receivedAt=Le.receivedAt,ft.response_format==="init-v2"?this._values=new V2InitializeContainer_1.V2InitializeContainer(ft):this._values=new V1InitializeContainer_1.V1InitializeContainer(ft),this._bootstrapMetadata=this._extractBootstrapMetadata(Le.source,ft),Le.source&&ft.user&&this._setWarningState(Ye,ft),client_core_1$5.SDKFlags.setFlags(this._sdkKey,(nt=ft.sdk_flags)!==null&&nt!==void 0?nt:{})),!0)}getWarnings(){if(this._warnings.size!==0)return Array.from(this._warnings)}getGate(Le){const Ye=this._values?this._values.getGate(Le):null;return this._getDetailedStoreResult(Ye)}getConfig(Le){const Ye=this._values?this._values.getConfig(Le):null;return this._getDetailedStoreResult(Ye)}getConfigList(){return this._values?this._values.getConfigList():[]}getLayer(Le){const Ye=this._values?this._values.getLayer(Le):null;return this._getDetailedStoreResult(Ye)}getParamStore(Le){const Ye=this._values?this._values.getParamStore(Le):null;return this._getDetailedStoreResult(Ye)}getSource(){return this._source}getExposureMapping(){var Le;return(Le=this._values)===null||Le===void 0?void 0:Le.getExposureMapping()}_extractBootstrapMetadata(Le,Ye){if(Le!=="Bootstrap")return null;const tt={};return Ye.user&&(tt.user=Ye.user),Ye.sdkInfo&&(tt.generatorSDKInfo=Ye.sdkInfo),tt.lcut=Ye.time,tt}_getDetailedStoreResult(Le){return{result:Le,details:this._getDetails(Le==null)}}_setWarningState(Le,Ye){var tt,nt;const ft=client_core_1$5.StableID.get(this._sdkKey);if(((tt=Le.customIDs)===null||tt===void 0?void 0:tt.stableID)!==ft&&(!((nt=Le.customIDs)===null||nt===void 0)&&nt.stableID||ft)){this._warnings.add("StableIDMismatch");return}if("user"in Ye){const ht=Ye.user,gt=Object.assign(Object.assign({},Le),{analyticsOnlyMetadata:void 0,privateAttributes:void 0});(0,client_core_1$5._getFullUserHash)(gt)!==(0,client_core_1$5._getFullUserHash)(ht)&&this._warnings.add("PartialUserMatch")}}getCurrentSourceDetails(){if(this._source==="Uninitialized"||this._source==="NoValues")return{reason:this._source};const Le={reason:this._source,lcut:this._lcut,receivedAt:this._receivedAt};return this._warnings.size>0&&(Le.warnings=Array.from(this._warnings)),Le}_getDetails(Le){var Ye,tt;const nt=this.getCurrentSourceDetails();let ft=nt.reason;const ht=(Ye=nt.warnings)!==null&&Ye!==void 0?Ye:[];this._source==="Bootstrap"&&ht.length>0&&(ft=ft+ht[0]),ft!=="Uninitialized"&&ft!=="NoValues"&&(ft=`${ft}:${Le?"Unrecognized":"Recognized"}`);const gt=this._source==="Bootstrap"&&(tt=this._bootstrapMetadata)!==null&&tt!==void 0?tt:void 0;return gt&&(nt.bootstrapMetadata=gt),Object.assign(Object.assign({},nt),{reason:ft})}}EvaluationStore$1.default=EvaluationStore;var Network={},EvaluationResponseDeltas={};Object.defineProperty(EvaluationResponseDeltas,"__esModule",{value:!0}),EvaluationResponseDeltas._resolveDeltasResponse=void 0;const client_core_1$4=src$1,MAX_DELTAS_SORT_DEPTH=2;function _resolveDeltasResponse(Be,Le){const Ye=(0,client_core_1$4._typedJsonParse)(Le,"checksum","DeltasEvaluationResponse");if(!Ye)return{hadBadDeltaChecksum:!0};const tt=_mergeDeltasIntoCache(Be,Ye),nt=_handleDeletedEntries(tt),ft=(0,client_core_1$4._DJB2Object)({feature_gates:nt.feature_gates,dynamic_configs:nt.dynamic_configs,layer_configs:nt.layer_configs},MAX_DELTAS_SORT_DEPTH);return ft===Ye.checksumV2?JSON.stringify(nt):{hadBadDeltaChecksum:!0,badChecksum:ft,badMergedConfigs:nt,badFullResponse:Ye.deltas_full_response}}EvaluationResponseDeltas._resolveDeltasResponse=_resolveDeltasResponse;function _mergeDeltasIntoCache(Be,Le){return Object.assign(Object.assign(Object.assign({},Be),Le),{feature_gates:Object.assign(Object.assign({},Be.feature_gates),Le.feature_gates),layer_configs:Object.assign(Object.assign({},Be.layer_configs),Le.layer_configs),dynamic_configs:Object.assign(Object.assign({},Be.dynamic_configs),Le.dynamic_configs)})}function _handleDeletedEntries(Be){const Le=Be;return _deleteEntriesInRecord(Be.deleted_gates,Le.feature_gates),delete Le.deleted_gates,_deleteEntriesInRecord(Be.deleted_configs,Le.dynamic_configs),delete Le.deleted_configs,_deleteEntriesInRecord(Be.deleted_layers,Le.layer_configs),delete Le.deleted_layers,Le}function _deleteEntriesInRecord(Be,Le){Be==null||Be.forEach(Ye=>{delete Le[Ye]})}var __awaiter$9=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(Network,"__esModule",{value:!0});const client_core_1$3=src$1,EvaluationResponseDeltas_1=EvaluationResponseDeltas;class StatsigNetwork extends client_core_1$3.NetworkCore{constructor(Le,Ye){super(Le,Ye);const tt=Le==null?void 0:Le.networkConfig;this._option=Le,this._initializeUrlConfig=new client_core_1$3.UrlConfiguration(client_core_1$3.Endpoint._initialize,tt==null?void 0:tt.initializeUrl,tt==null?void 0:tt.api,tt==null?void 0:tt.initializeFallbackUrls)}fetchEvaluations(Le,Ye,tt,nt,ft){return __awaiter$9(this,void 0,void 0,function*(){var ht,gt,At,xt,Et,yt;const Ct=Ye?(0,client_core_1$3._typedJsonParse)(Ye,"has_updates","InitializeResponse"):null;let kt={user:nt,hash:(At=(gt=(ht=this._option)===null||ht===void 0?void 0:ht.networkConfig)===null||gt===void 0?void 0:gt.initializeHashAlgorithm)!==null&&At!==void 0?At:"djb2",deltasResponseRequested:!1,full_checksum:null};if(Ct!=null&&Ct.has_updates){const vt=(Ct==null?void 0:Ct.hash_used)!==((yt=(Et=(xt=this._option)===null||xt===void 0?void 0:xt.networkConfig)===null||Et===void 0?void 0:Et.initializeHashAlgorithm)!==null&&yt!==void 0?yt:"djb2");kt=Object.assign(Object.assign({},kt),{sinceTime:ft&&!vt?Ct.time:0,previousDerivedFields:"derived_fields"in Ct&&ft?Ct.derived_fields:{},deltasResponseRequested:!0,full_checksum:Ct.full_checksum,partialUserMatchSinceTime:vt?0:Ct.time})}return this._fetchEvaluations(Le,Ct,kt,tt)})}_fetchEvaluations(Le,Ye,tt,nt){return __awaiter$9(this,void 0,void 0,function*(){var ft,ht;const gt=yield this.post({sdkKey:Le,urlConfig:this._initializeUrlConfig,data:tt,retries:2,isStatsigEncodable:!0,priority:nt});if((gt==null?void 0:gt.code)===204)return'{"has_updates": false}';if((gt==null?void 0:gt.code)!==200)return(ft=gt==null?void 0:gt.body)!==null&&ft!==void 0?ft:null;if((Ye==null?void 0:Ye.has_updates)!==!0||((ht=gt.body)===null||ht===void 0?void 0:ht.includes('"is_delta":true'))!==!0||tt.deltasResponseRequested!==!0)return gt.body;const At=(0,EvaluationResponseDeltas_1._resolveDeltasResponse)(Ye,gt.body);return typeof At=="string"?At:this._fetchEvaluations(Le,Ye,Object.assign(Object.assign(Object.assign({},tt),At),{deltasResponseRequested:!1}),nt)})}}Network.default=StatsigNetwork;var ParamStoreGetterFactory={};Object.defineProperty(ParamStoreGetterFactory,"__esModule",{value:!0}),ParamStoreGetterFactory._makeParamStoreGetter=void 0;const client_core_1$2=src$1,NO_EXPOSURE_OPT={disableExposureLog:!0};function _shouldLogExposure(Be){return Be==null||Be.disableExposureLog===!1}function _shouldReturnFallback(Be,Le){return Le!=null&&!(0,client_core_1$2._isTypeMatch)(Be,Le)}function _getMappedStaticValue(Be,Le){return Be.value}function _getMappedGateValue(Be,Le,Ye){return Be.getFeatureGate(Le.gate_name,_shouldLogExposure(Ye)?void 0:NO_EXPOSURE_OPT).value?Le.pass_value:Le.fail_value}function _getMappedDynamicConfigValue(Be,Le,Ye,tt){const ft=Be.getDynamicConfig(Le.config_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedExperimentValue(Be,Le,Ye,tt){const ft=Be.getExperiment(Le.experiment_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _getMappedLayerValue(Be,Le,Ye,tt){const ft=Be.getLayer(Le.layer_name,_shouldLogExposure(tt)?void 0:NO_EXPOSURE_OPT).get(Le.param_name);return _shouldReturnFallback(ft,Ye)?Ye:ft}function _makeParamStoreGetter(Be,Le,Ye){return(tt,nt)=>{if(Le==null)return nt;const ft=Le[tt];if(ft==null||nt!=null&&(0,client_core_1$2._typeOf)(nt)!==ft.param_type)return nt;switch(ft.ref_type){case"static":return _getMappedStaticValue(ft);case"gate":return _getMappedGateValue(Be,ft,Ye);case"dynamic_config":return _getMappedDynamicConfigValue(Be,ft,nt,Ye);case"experiment":return _getMappedExperimentValue(Be,ft,nt,Ye);case"layer":return _getMappedLayerValue(Be,ft,nt,Ye);default:return nt}}}ParamStoreGetterFactory._makeParamStoreGetter=_makeParamStoreGetter;var StatsigEvaluationsDataAdapter$1={},__awaiter$8=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigEvaluationsDataAdapter$1,"__esModule",{value:!0}),StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=void 0;const client_core_1$1=src$1,Network_1$1=Network;class StatsigEvaluationsDataAdapter extends client_core_1$1.DataAdapterCore{constructor(){super("EvaluationsDataAdapter","evaluations"),this._network=null,this._options=null}attach(Le,Ye,tt){super.attach(Le,Ye,tt),tt!==null&&tt instanceof Network_1$1.default?this._network=tt:this._network=new Network_1$1.default(Ye??{})}getDataAsync(Le,Ye,tt){return this._getDataAsyncImpl(Le,(0,client_core_1$1._normalizeUser)(Ye,this._options),tt)}prefetchData(Le,Ye){return this._prefetchDataImpl(Le,Ye)}setData(Le){const Ye=(0,client_core_1$1._typedJsonParse)(Le,"has_updates","data");Ye&&"user"in Ye?super.setData(Le,Ye.user):client_core_1$1.Log.error("StatsigUser not found. You may be using an older server SDK version. Please upgrade your SDK or use setDataLegacy.")}setDataLegacy(Le,Ye){super.setData(Le,Ye)}_fetchFromNetwork(Le,Ye,tt,nt){return __awaiter$8(this,void 0,void 0,function*(){var ft;const ht=yield(ft=this._network)===null||ft===void 0?void 0:ft.fetchEvaluations(this._getSdkKey(),Le,tt==null?void 0:tt.priority,Ye,nt);return ht??null})}_getCacheKey(Le){var Ye;const tt=(0,client_core_1$1._getStorageKey)(this._getSdkKey(),Le,(Ye=this._options)===null||Ye===void 0?void 0:Ye.customUserCacheKeyFunc);return`${client_core_1$1.DataAdapterCachePrefix}.${this._cacheSuffix}.${tt}`}_isCachedResultValidFor204(Le,Ye){return Le.fullUserHash!=null&&Le.fullUserHash===(0,client_core_1$1._getFullUserHash)(Ye)}}StatsigEvaluationsDataAdapter$1.StatsigEvaluationsDataAdapter=StatsigEvaluationsDataAdapter;var __awaiter$7=commonjsGlobal&&commonjsGlobal.__awaiter||function(Be,Le,Ye,tt){function nt(ft){return ft instanceof Ye?ft:new Ye(function(ht){ht(ft)})}return new(Ye||(Ye=Promise))(function(ft,ht){function gt(Et){try{xt(tt.next(Et))}catch(yt){ht(yt)}}function At(Et){try{xt(tt.throw(Et))}catch(yt){ht(yt)}}function xt(Et){Et.done?ft(Et.value):nt(Et.value).then(gt,At)}xt((tt=tt.apply(Be,Le||[])).next())})};Object.defineProperty(StatsigClient$1,"__esModule",{value:!0});const client_core_1=src$1,EvaluationStore_1=EvaluationStore$1,Network_1=Network,ParamStoreGetterFactory_1=ParamStoreGetterFactory,StatsigEvaluationsDataAdapter_1=StatsigEvaluationsDataAdapter$1;class StatsigClient extends client_core_1.StatsigClientBase{static instance(Le){const Ye=(0,client_core_1._getStatsigGlobal)().instance(Le);return Ye instanceof StatsigClient?Ye:(client_core_1.Log.warn((0,client_core_1._isServerEnv)()?"StatsigClient.instance is not supported in server environments":"Unable to find StatsigClient instance"),new StatsigClient(Le??"",{}))}constructor(Le,Ye,tt=null){var nt,ft;client_core_1.SDKType._setClientType(Le,"javascript-client");const ht=new Network_1.default(tt,At=>{this.$emt(At)});super(Le,(nt=tt==null?void 0:tt.dataAdapter)!==null&&nt!==void 0?nt:new StatsigEvaluationsDataAdapter_1.StatsigEvaluationsDataAdapter,ht,tt),this._possibleFirstTouchMetadata={},this.getFeatureGate=this._memoize(client_core_1.MemoPrefix._gate,this._getFeatureGateImpl.bind(this)),this.getDynamicConfig=this._memoize(client_core_1.MemoPrefix._dynamicConfig,this._getDynamicConfigImpl.bind(this)),this.getExperiment=this._memoize(client_core_1.MemoPrefix._experiment,this._getExperimentImpl.bind(this)),this.getConfigList=this._memoize(client_core_1.MemoPrefix._configList,this._getConfigListImpl.bind(this)),this.getLayer=this._memoize(client_core_1.MemoPrefix._layer,this._getLayerImpl.bind(this)),this.getParameterStore=this._memoize(client_core_1.MemoPrefix._paramStore,this._getParameterStoreImpl.bind(this)),this._store=new EvaluationStore_1.default(Le),this._network=ht,this._user=this._configureUser(Ye,tt),this._sdkInstanceID=(0,client_core_1.getUUID)();const gt=(ft=tt==null?void 0:tt.plugins)!==null&&ft!==void 0?ft:[];for(const At of gt)At.bind(this)}initializeSync(Le){var Ye;return this.loadingStatus!=="Uninitialized"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),-1,null,null,["MultipleInitializations",...(Ye=this._store.getWarnings())!==null&&Ye!==void 0?Ye:[]]):(this._logger.start(),this.updateUserSync(this._user,Le))}initializeAsync(Le){return __awaiter$7(this,void 0,void 0,function*(){return this._initializePromise?this._initializePromise:(this._initializePromise=this._initializeAsyncImpl(Le),this._initializePromise)})}updateUserSync(Le,Ye){const tt=performance.now();try{return this._updateUserSyncImpl(Le,Ye,tt)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}}_updateUserSyncImpl(Le,Ye,tt){var nt;const ft=[...(nt=this._store.getWarnings())!==null&&nt!==void 0?nt:[]];this._resetForUser(Le);const ht=this.dataAdapter.getDataSync(this._user);ht==null&&ft.push("NoCachedValues"),this._store.setValues(ht,this._user),this._finalizeUpdate(ht);const gt=Ye==null?void 0:Ye.disableBackgroundCacheRefresh;return gt===!0||gt==null&&(ht==null?void 0:ht.source)==="Bootstrap"?(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft):(this._runPostUpdate(ht??null,this._user),(0,client_core_1.createUpdateDetails)(!0,this._store.getSource(),performance.now()-tt,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),ft))}updateUserAsync(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){const tt=performance.now();try{return yield this._updateUserAsyncImpl(Le,Ye)}catch(nt){const ft=nt instanceof Error?nt:new Error(String(nt));return this._createErrorUpdateDetails(ft,tt)}})}_updateUserAsyncImpl(Le,Ye){return __awaiter$7(this,void 0,void 0,function*(){this._resetForUser(Le);const tt=this._user;client_core_1.Diagnostics._markInitOverallStart(this._sdkKey);let nt=this.dataAdapter.getDataSync(tt);if(this._store.setValues(nt,this._user),this._setStatus("Loading",nt),nt=yield this.dataAdapter.getDataAsync(nt,tt,Ye),tt!==this._user)return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),-1,new Error("User changed during update"),this._network.getLastUsedInitUrlAndReset());let ft=!1;nt!=null&&(client_core_1.Diagnostics._markInitProcessStart(this._sdkKey),ft=this._store.setValues(nt,this._user),client_core_1.Diagnostics._markInitProcessEnd(this._sdkKey,{success:ft})),this._finalizeUpdate(nt),ft||(this._errorBoundary.attachErrorIfNoneExists(client_core_1.UPDATE_DETAIL_ERROR_MESSAGES.NO_NETWORK_DATA),this.$emt({name:"initialization_failure"})),client_core_1.Diagnostics._markInitOverallEnd(this._sdkKey,ft,this._store.getCurrentSourceDetails());const ht=client_core_1.Diagnostics._enqueueDiagnosticsEvent(this._user,this._logger,this._sdkKey,this._options);return(0,client_core_1.createUpdateDetails)(ft,this._store.getSource(),ht,this._errorBoundary.getLastSeenErrorAndReset(),this._network.getLastUsedInitUrlAndReset(),this._store.getWarnings())})}getContext(){return{sdkKey:this._sdkKey,options:this._options,values:this._store.getValues(),user:JSON.parse(JSON.stringify(this._user)),errorBoundary:this._errorBoundary,session:client_core_1.StatsigSession.get(this._sdkKey),stableID:client_core_1.StableID.get(this._sdkKey),sdkInstanceID:this._sdkInstanceID}}checkGate(Le,Ye){return this.getFeatureGate(Le,Ye).value}logEvent(Le,Ye,tt){const nt=typeof Le=="string"?{eventName:Le,value:Ye,metadata:tt}:Le;this.$emt({name:"log_event_called",event:nt}),this._logger.enqueue(Object.assign(Object.assign({},nt),{user:this._user,time:Date.now()}))}updateUserWithAnalyticsOnlyMetadata(Le){this._user=this._configureUser(Object.assign(Object.assign({},this._user),{analyticsOnlyMetadata:Le}),this._options)}_primeReadyRipcord(){this.$on("error",()=>{this.loadingStatus==="Loading"&&this._finalizeUpdate(null)})}_initializeAsyncImpl(Le){return __awaiter$7(this,void 0,void 0,function*(){return client_core_1.Storage.isReady()||(yield client_core_1.Storage.isReadyResolver()),this._logger.start(),this.updateUserAsync(this._user,Le)})}_createErrorUpdateDetails(Le,Ye){var tt;return(0,client_core_1.createUpdateDetails)(!1,this._store.getSource(),performance.now()-Ye,Le,null,[...(tt=this._store.getWarnings())!==null&&tt!==void 0?tt:[]])}_finalizeUpdate(Le){this._store.finalize(),this._setStatus("Ready",Le)}_runPostUpdate(Le,Ye){this.dataAdapter.getDataAsync(Le,Ye,{priority:"low"}).catch(tt=>{client_core_1.Log.error("An error occurred after update.",tt)})}_resetForUser(Le){this._logger.reset(),this._store.reset(),this._user=this._configureUser(Le,this._options)}_configureUser(Le,Ye){var tt,nt,ft;const ht=(0,client_core_1._normalizeUser)(Le,Ye),gt=(tt=ht.customIDs)===null||tt===void 0?void 0:tt.stableID;if(gt){const At=(ft=(nt=this.storageProvider).isReadyResolver)===null||ft===void 0?void 0:ft.call(nt);At?At.then(()=>client_core_1.StableID.setOverride(gt,this._sdkKey),()=>client_core_1.StableID.setOverride(gt,this._sdkKey)):client_core_1.StableID.setOverride(gt,this._sdkKey)}return Object.keys(this._possibleFirstTouchMetadata).length>0&&(ht.analyticsOnlyMetadata=Object.assign(Object.assign({},ht.analyticsOnlyMetadata),this._possibleFirstTouchMetadata)),ht}_getFeatureGateImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getGate(Le),gt=(0,client_core_1._makeFeatureGate)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getGateOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createGateExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"gate_evaluation",gate:xt}),xt}_getDynamicConfigImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getConfig(Le),gt=(0,client_core_1._makeDynamicConfig)(Le,ht,ft),At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getDynamicConfigOverride)===null||nt===void 0?void 0:nt.call(tt,gt,this._user,Ye),xt=At??gt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,xt,this._store.getExposureMapping()),Ye),this.$emt({name:"dynamic_config_evaluation",dynamicConfig:xt}),xt}_getExperimentImpl(Le,Ye){var tt,nt,ft,ht;const{result:gt,details:At}=this._store.getConfig(Le),xt=(0,client_core_1._makeExperiment)(Le,At,gt);xt.__evaluation!=null&&(xt.__evaluation.secondary_exposures=(0,client_core_1._mapExposures)((nt=(tt=xt.__evaluation)===null||tt===void 0?void 0:tt.secondary_exposures)!==null&&nt!==void 0?nt:[],this._store.getExposureMapping()));const Et=(ht=(ft=this.overrideAdapter)===null||ft===void 0?void 0:ft.getExperimentOverride)===null||ht===void 0?void 0:ht.call(ft,xt,this._user,Ye),yt=Et??xt;return this._enqueueExposure(Le,(0,client_core_1._createConfigExposure)(this._user,yt,this._store.getExposureMapping()),Ye),this.$emt({name:"experiment_evaluation",experiment:yt}),yt}_getConfigListImpl(){return this._store.getConfigList()}_getLayerImpl(Le,Ye){var tt,nt,ft;const{result:ht,details:gt}=this._store.getLayer(Le),At=(0,client_core_1._makeLayer)(Le,gt,ht),xt=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getLayerOverride)===null||nt===void 0?void 0:nt.call(tt,At,this._user,Ye);Ye!=null&&Ye.disableExposureLog&&this._logger.incrementNonExposureCount(Le);const Et=(0,client_core_1._mergeOverride)(At,xt,(ft=xt==null?void 0:xt.__value)!==null&&ft!==void 0?ft:At.__value,yt=>{Ye!=null&&Ye.disableExposureLog||this._enqueueExposure(Le,(0,client_core_1._createLayerParameterExposure)(this._user,Et,yt,this._store.getExposureMapping()),Ye)});return this.$emt({name:"layer_evaluation",layer:Et}),Et}_getParameterStoreImpl(Le,Ye){var tt,nt;const{result:ft,details:ht}=this._store.getParamStore(Le);this._logger.incrementNonExposureCount(Le);const gt={name:Le,details:ht,__configuration:ft,get:(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,ft,Ye)},At=(nt=(tt=this.overrideAdapter)===null||tt===void 0?void 0:tt.getParamStoreOverride)===null||nt===void 0?void 0:nt.call(tt,gt,Ye);return At!=null&&(gt.__configuration=At.config,gt.details=At.details,gt.get=(0,ParamStoreGetterFactory_1._makeParamStoreGetter)(this,At.config,Ye)),gt}}StatsigClient$1.default=StatsigClient,function(Be){var Le=commonjsGlobal&&commonjsGlobal.__createBinding||(Object.create?function(ht,gt,At,xt){xt===void 0&&(xt=At);var Et=Object.getOwnPropertyDescriptor(gt,At);(!Et||("get"in Et?!gt.__esModule:Et.writable||Et.configurable))&&(Et={enumerable:!0,get:function(){return gt[At]}}),Object.defineProperty(ht,xt,Et)}:function(ht,gt,At,xt){xt===void 0&&(xt=At),ht[xt]=gt[At]}),Ye=commonjsGlobal&&commonjsGlobal.__exportStar||function(ht,gt){for(var At in ht)At!=="default"&&!Object.prototype.hasOwnProperty.call(gt,At)&&Le(gt,ht,At)};Object.defineProperty(Be,"__esModule",{value:!0}),Be.StatsigClient=void 0;const tt=src$1,nt=StatsigClient$1;Be.StatsigClient=nt.default,Ye(src$1,Be);const ft=Object.assign((0,tt._getStatsigGlobal)(),{StatsigClient:nt.default});Be.default=ft}(src$2);const FEATURE_FLAGS=["id_text_barcode_readability","selfie_local_lenses_check_web","id_model_hebrew_back_id","id_face_readability","new_id_capture_ux_least_risky_clients","id_test_aa","id_iou_check","iad_checks","iad_c_checks","new_fingerprint","mp_test_hashed_id"],GLOBAL_FLAGS=["new_fingerprint"],ID_MODULE_FLAGS=["id_face_readability","id_test_aa","iad_c_checks","mp_test_hashed_id","id_model_hebrew_back_id","id_iou_check","iad_checks","new_id_capture_ux_least_risky_clients","id_text_barcode_readability"],SELFIE_MODULE_FLAGS=["selfie_local_lenses_check_web"];function getStatsigEnvironment(Be){return isStageK8sEnv(Be)?{tier:"development"}:isStageEnv(Be)||isDemoEnv(Be)?{tier:"staging"}:isSaasEnv(Be)?{tier:"production"}:{tier:"development"}}const clientApiKey="client-GBTzsiJ99rvyZQdNXDFkftx3ZoMF1TED2rsB3m3IUqc",featureFlagsValues={id_text_barcode_readability:!1,selfie_local_lenses_check_web:!1,id_model_hebrew_back_id:!1,id_face_readability:!1,new_id_capture_ux_least_risky_clients:!1,id_test_aa:!1,iad_checks:!1,iad_c_checks:!1,id_iou_check:!0,new_fingerprint:!1,mp_test_hashed_id:!1},clientExperimentIds={new_id_capture_ux_least_risky_clients:"experimentV2"};let initPromise=null;const initialize=async({flowId:Be,apiKey:Le,sessionIdentifier:Ye,apiURL:tt,clientExperimentId:nt})=>{if(initPromise)return initPromise;initPromise=(async()=>{var gt;const ft={customIDs:{client_api_key:Le,hashed_onboarding_id:Ye,flow_id:Be},custom:{landing_page:(gt=window==null?void 0:window.location)==null?void 0:gt.href}},ht=new src$2.StatsigClient(clientApiKey,ft,{environment:getStatsigEnvironment(tt)});await ht.initializeAsync(),FEATURE_FLAGS.forEach(At=>{if(nt&&clientExperimentIds[At]===nt){featureFlagsValues[At]=!0;return}featureFlagsValues[At]=ht.checkGate(At)})})(),await initPromise},getFeatureFlag=Be=>featureFlagsValues[Be]??!1,getModuleFeatureFlags=async Be=>{const Le={};GLOBAL_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]});const Ye=Be.toLowerCase();return Ye.includes("id")||Ye==="government-validation"?ID_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}):(Ye.includes("selfie")||Ye==="face")&&SELFIE_MODULE_FLAGS.forEach(tt=>{Le[tt]=featureFlagsValues[tt]}),Le};function IdCaptureParamsConfigurator(Be,Le,Ye,tt){Object.assign(Be,{areaDown:25e3,areaUp:55e3,areaIOSPassportUp:3e4,areaIOSPassportDown:2e4,widthIOSUp:160,widthIOSDown:85,widthDown:tt?110:135,widthUp:205,framesAggregationInterval:tt?3e3:2e3,minFaceIdQualityScore:.62})}function getSelfieFaceDetectionPipelineParams(){return{frameMinX:0,frameMinY:0,frameMaxX:1,frameMaxY:1,brightnessThreshold:50,blurrinessThreshold:50,tiltRotationAngleThreshold:15,minMagicCropSize:200,headwearThreshold:.86,lensesThreshold:.95,closedEyesThreshold:.9,maskThreshold:.85,minFaceQualityScore:.63,isOcclusionCheckEnabled:!1,faceOcclusionThreshold:.3}}const getProfiles=()=>[new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_01,DetectionType.IDCapture,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Current Prod - Id Capture Profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.IdBlurGlarePipeline,PipelineProfileName.IdCapture_2_02,DetectionType.IDCapture,["id_capture_2_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:getFeatureFlag("id_face_readability"),isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"https://www.notion.so/ML-Update-ID-processing-model-to-accept-more-back-ID-types-18c4c3caef49801e95b4fd6bf9b92883?pvs=4"),new PipelineProfile(WasmPipelineType.IdBarcodeAndTextQualityPipeline,PipelineProfileName.IdCapture_3_02,DetectionType.IDCapture,["id_capture_3_02_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV3x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:getFeatureFlag("id_iou_check")},IdCaptureParamsConfigurator,"Pipeline with text and barcode quality: https://www.notion.so/Web-Use-Text-Barcode-model-2nd-iteration-1bc4c3caef49805aa9e6d308db9fc6dd?pvs=4"),new PipelineProfile(WasmPipelineType.IdVideoSelfiePipeline,PipelineProfileName.IdVideoSelfie_2_01,DetectionType.IdVideoSelfie,["id_capture_2_01_fp16.ortmodelv2","id_fiqa_19a81a0b9bf6492eb03b4667f6db4c85_fp16.ortmodelv2"],{glareThreshold:.3,classificationThreshold:.98,sideThreshold:.8,iouThreshold:.8,sharpnessThreshold:.2,sharpnessChangeThreshold:.2,modelType:IdCaptureModelType.IdCaptureV2x,isIdFaceQualityCheckEnabled:!1,isIouCheckEnabled:!0},IdCaptureParamsConfigurator,"Current Prod - Id Videoselfie profile with model https://www.notion.so/ID-cropping-web-2-01-d011d878c6f4406394609cbfbf03c259?pvs=4"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieWithAggregationMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Selfie face detection profile with aggregation metrics"),new PipelineProfile(WasmPipelineType.SelfieWithQualityMetrics,PipelineProfileName.SelfieWithQualityMetrics,DetectionType.Selfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"Current Prod - Selfie face detection profile with quality metrics"),new PipelineProfile(WasmPipelineType.SelfieWithAggregationMetrics,PipelineProfileName.SelfieVideoSelfie,DetectionType.SelfieVideoSelfie,["selfie_bf_angles_192x192_opset9_fp16.ortmodelv2","face_attributes_v1_3_fp16.ortmodelv2","mls_regressor_4773007c657b4f05a460321456740d0f_fp16.ortmodelv2","face_occlusion_v0_1_fp16.ortmodelv2"],getSelfieFaceDetectionPipelineParams(),null,"VideoSelfie face detection profile")];function getProfile(Be){const Le=getProfiles().find(Ye=>Ye.name===Be);if(!Le)throw new Error(`Profile not found for type: ${Be}`);return Le}const wasmVersion="v2.12.44";function generateBundle(){const Be=getFeatureFlag("id_text_barcode_readability")?PipelineProfileName.IdCapture_3_02:getFeatureFlag("id_model_hebrew_back_id")?PipelineProfileName.IdCapture_2_02:PipelineProfileName.IdCapture_2_01,Le=PipelineProfileName.SelfieWithQualityMetrics,Ye=PipelineProfileName.SelfieVideoSelfie,tt=PipelineProfileName.IdVideoSelfie_2_01;return[Be,tt,Le,Ye]}function getInitializationParams(){const Le=generateBundle(),Ye="https://d3vv997wtl2myz.cloudfront.net/webcamera/onnx-backend-wasm",tt=`${Ye}/${wasmVersion}/webLib.wasm`,nt=`${Ye}/${wasmVersion}/webLibSimd.wasm`,ft=`${Ye}/${wasmVersion}/webLib.js`,ht=`${Ye}/${wasmVersion}/versions.json`;let gt=new Map,At=new Map;for(const xt of Le){const Et=getProfile(xt);if(!Et)throw new Error(`Profile not found: ${xt}`);const yt=Et.modelNames;let Ct=[];for(const kt of yt)Ct.push(`${Ye}/${wasmVersion}/models/${kt}`);gt.set(Et.pipelineType,Ct),At.set(Et.detectionType,Et)}return{wasmModulePath:tt,wasmSimdModulePath:nt,glueCodePath:ft,versionsFilePath:ht,pipelineModels:gt,enableSIMD:!0,profiles:At,wasmVersion}}window.wasmArrayBuffer=null;class MlWasmJSApi{constructor(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.wasmModule=null,this.pipelineApiUtilities=null,this.utilityApi=null,this.idCaptureWasmApi=null,this.faceDetectionWasmApi=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,this.isInitialized_=!1,this.inspectorOpened_=!1,this.wasmCallMutex=new Mutex,this.Module=null,this.loadModule=async Le=>{this.Module=(await import(Le)).Module}}async initialize(Le,Ye,tt,nt,ft,ht){await this.freeResources(),this.pipelines_=ht,this.versionsFile=ft,await this.loadModule(tt);const gt=await this.loadWasm(nt,Le,Ye);return this.pipelineApiUtilities=new this.wasmModule.PipelineApiUtilities,this.utilityApi=new this.wasmModule.UtilityApi,this.idCaptureWasmApi=new this.wasmModule.IdCaptureApi,this.faceDetectionWasmApi=new this.wasmModule.FaceDetectionApi,this.isInitialized_=!0,gt}static getInstance(){return MlWasmJSApi.instance||(MlWasmJSApi.instance=new MlWasmJSApi),MlWasmJSApi.instance}isInitialized(){return this.pipelineApiUtilities!=null&&this.utilityApi!=null&&this.idCaptureWasmApi!=null&&this.faceDetectionWasmApi!=null&&this.isInitialized_}async allocateImageBuffers(Le,Ye){this.checkWasmInitialization("Unable to allocate image buffers, cpp API hasn't been initialized"),!(Le&&Ye&&Le==this.imageWidth_&&Ye==this.imageHeight_&&this.inputImageBuffer&&Le*Ye*4===this.inputImageBuffer.length)&&(this.imageWidth_=Le,this.imageHeight_=Ye,this.inputImageBuffer=this.pipelineApiUtilities.allocateInputImageBuffer(Le,Ye,4))}async handleDetectionCallAndUpdateState(Le){this.checkWasmInitialization("Unable to update pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.handleDetectionCallAndUpdateState(this.pipelineTypeToWasmEnum(Le))}encryptImage(Le){return this.checkWasmInitialization("Unable to encrypt the image, cpp API hasn't been initialized"),this.utilityApi.encryptImage(Le)}isVirtualCamera(Le){if(this.checkWasmInitialization("Unable to check if the camera is virtual, cpp API hasn't been initialized"),Le)return this.utilityApi.isVirtualCamera(Le)}estimatePerformance(){return this.checkWasmInitialization("Unable to estimate performance, cpp API hasn't been initialized"),this.utilityApi.estimatePerformance()}async analyzeFrame(Le){this.checkWasmInitialization("Unable to analyze the frame, cpp API hasn't been initialized"),await this.allocateImageBuffers(Le.width,Le.height),this.inputImageBuffer.set(Le.data),this.utilityApi.analyzeFrame()}async freeResources(){this.versionsFile=null,this.modelsBuffers=null,this.inputImageBuffer=null,this.imageWidth_=null,this.imageHeight_=null,this.pipelines_=null,window.wasmArrayBuffer=null,this.pipelineApiUtilities&&typeof this.pipelineApiUtilities.delete=="function"&&(this.pipelineApiUtilities.delete(),this.pipelineApiUtilities=null),this.utilityApi&&typeof this.utilityApi.delete=="function"&&(this.utilityApi.delete(),this.utilityApi=null),this.idCaptureWasmApi&&typeof this.idCaptureWasmApi.delete=="function"&&(this.idCaptureWasmApi.delete(),this.idCaptureWasmApi=null),this.faceDetectionWasmApi&&typeof this.faceDetectionWasmApi.delete=="function"&&(this.faceDetectionWasmApi.delete(),this.faceDetectionWasmApi=null),this.wasmModule=null,this.isInitialized_=!1}resetPipeline(Le){this.checkWasmInitialization("Unable to reset pipeline, cpp API hasn't been initialized"),this.pipelineApiUtilities.resetPipeline(this.pipelineTypeToWasmEnum(Le))}resetAllPipelines(){this.checkWasmInitialization("Unable to reset pipelines, cpp API hasn't been initialized");for(const[Le,Ye]of this.pipelines_)this.resetPipeline(Le)}resetOther(){this.checkWasmInitialization("Unable to reset other states, cpp API hasn't been initialized"),this.utilityApi.resetOther()}reset(){this.resetAllPipelines(),this.resetOther()}async process(Le,Ye){if(this.checkWasmInitialization("Unable to process the image, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");switch(this.inputImageBuffer.set(Le.data),Ye){case WasmPipelineType.IdBlurGlarePipeline:case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.idCaptureWasmApi.runIdCapturePipeline(this.pipelineTypeToWasmEnum(Ye));case WasmPipelineType.IdFaceDetectionPipeline:return this.faceDetectionWasmApi.runIdFaceDetectionPipeline();case WasmPipelineType.IdVideoSelfiePipeline:return this.idCaptureWasmApi.runIdVideoSelfiePipeline();case WasmPipelineType.SelfieWithAggregationMetrics:case WasmPipelineType.SelfieWithQualityMetrics:return this.faceDetectionWasmApi.runSelfieFaceDetectionPipeline(this.pipelineTypeToWasmEnum(Ye));default:throw new Error("Unknown pipeline type")}}async runIdCapture(Le){if(this.checkWasmInitialization("Unable to run Id Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.idCaptureWasmApi.runIdCapture()}async runSelfieCapture(Le){if(this.checkWasmInitialization("Unable to run Selfie Capture, cpp API hasn't been initialized"),this.inputImageBuffer===null)throw new Error("Unable to process the image, buffers haven't been allocated!");return this.inputImageBuffer.set(Le.data),this.faceDetectionWasmApi.runSelfieCapture()}async setFacePositionConstraints(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face position constraints, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFacePositionConstraints(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceDetectionThresholds(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set face detection thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}async setFaceAttributesThresholds(Le,Ye,tt,nt,ft){this.checkWasmInitialization("Unable to set face attributes thresholds, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceAttributesThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft)}async setFaceChecksEnabled(Le,Ye,tt,nt,ft,ht){this.checkWasmInitialization("Unable to set face checks enabled flags, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceChecksEnabled(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht)}async setFaceDetectionMode(Le,Ye){this.checkWasmInitialization("Unable to set face detection mode, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionMode(this.pipelineTypeToWasmEnum(Le),Ye)}async setFaceDetectionCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt){this.checkWasmInitialization("Unable to set face detection callbacks, cpp API hasn't been initialized"),this.faceDetectionWasmApi.setFaceDetectionCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt,bt,It,wt,Rt,Tt)}async setIdCaptureThresholds(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt){this.checkWasmInitialization("Unable to set thresholds, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureThresholds(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt)}async setIdCaptureCallbacks(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt){this.checkWasmInitialization("Unable to set callbacks, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureCallbacks(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt,vt)}async setIdCaptureGeometryParams(Le,Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt){this.checkWasmInitialization("Unable to set geometry params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureGeometryParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At,xt,Et,yt,Ct,kt)}async setIdCaptureConfigParams(Le,Ye,tt,nt,ft,ht,gt,At){this.checkWasmInitialization("Unable to set config params, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureConfigParams(this.pipelineTypeToWasmEnum(Le),Ye,tt,nt,ft,ht,gt,At)}setIdCaptureModelType(Le,Ye){this.checkWasmInitialization("Unable to set model type, cpp API hasn't been initialized"),this.idCaptureWasmApi.setIdCaptureModelType(this.pipelineTypeToWasmEnum(Le),this.IdCaptureModelTypeToWasmEnum(Ye))}IdPerspectiveTransform(Le,Ye){return this.checkWasmInitialization("Unable to perform perspective transform, cpp API hasn't been initialized"),this.idCaptureWasmApi.IdPerspectiveTransform(Le,Ye)}async getVersions(){const Ye=await(await fetch(this.versionsFile)).text();return JSON.parse(Ye)}async loadWasm(Le,Ye,tt){const nt=Le?tt:Ye;try{window.wasmArrayBuffer=await fetch(nt).then(ft=>ft.arrayBuffer()).then(ft=>new Uint8Array(ft)),this.wasmModule=await this.Module()}catch(ft){if(console.log(ft,Le,"useSmd"),Le)return await this.loadWasm(!1,Ye,tt);throw ft}return Le}async loadModels(){var nt;this.checkWasmInitialization("Unable load the models, cpp API hasn't been initialized");let Le=new this.wasmModule.PipelineTypeToIntMap,Ye=new Map,tt=new Map;for(let[ft,ht]of this.pipelines_){let gt=this.pipelineTypeToWasmEnum(ft),At=[],xt=new this.wasmModule.VectorInt;for(let Et of ht){if(!tt.has(Et)){let Ct=await fetch(Et).then(kt=>kt.arrayBuffer()).then(kt=>new Uint8Array(kt));tt.set(Et,Ct)}let yt=tt.get(Et);xt.push_back(yt.byteLength),At.push(yt)}Le.set(gt,xt),Ye.set(gt,At)}this.modelsBuffers=this.pipelineApiUtilities.allocateModelsBuffers(Le);for(let[ft,ht]of Ye){let gt=(nt=this.modelsBuffers)==null?void 0:nt.get(ft);for(let At=0;At<gt.size();At++){let xt=gt==null?void 0:gt.get(At);if(xt)xt.set(ht[At]);else throw new Error("Unable to get model buffer from shared memory!")}}}async initializePipelines(){this.checkWasmInitialization("Unable to initialize pipelines, cpp API hasn't been initialized"),this.modelsBuffers||await this.loadModels(),this.pipelineApiUtilities.initializePipelines()}async setProductionMode(Le){this.checkWasmInitialization("Unable to set production mode, cpp API hasn't been initialized"),this.utilityApi.setProductionMode(Le)}getPipelineState(){return this.checkWasmInitialization("Unable to get pipeline state, cpp API hasn't been initialized"),this.pipelineApiUtilities.getPipelineState()}getCurrentPipeline(){return this.checkWasmInitialization("Unable to get current pipeline, cpp API hasn't been initialized"),this.pipelineTypeFromWasmEnum(this.pipelineApiUtilities.getCurrentPipeline())}setSdkVersion(Le){this.checkWasmInitialization("Unable to set sdk version, cpp API hasn't been initialized"),this.utilityApi.setSdkVersion(Le)}setSdkPlatform(Le){this.checkWasmInitialization("Unable to set device type, cpp API hasn't been initialized"),this.utilityApi.setSdkPlatform(Le)}setDeviceInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set device info, cpp API hasn't been initialized"),this.utilityApi.setDeviceInfo(Le,Ye)}setBrowserInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set browser info, cpp API hasn't been initialized"),this.utilityApi.setBrowserInfo(Le,Ye)}setCameraInfo(Le,Ye=!0){this.checkWasmInitialization("Unable to set camera info, cpp API hasn't been initialized"),this.utilityApi.setCameraInfo(Le,Ye)}setZc(Le){this.checkWasmInitialization("Unable to set zc, cpp API hasn't been initialized"),this.utilityApi.setZc(Le)}setMotionStatus(Le){this.checkWasmInitialization("Unable to set motion status, cpp API hasn't been initialized"),this.utilityApi.setMotionStatus(Le)}setMetadataField(Le,Ye){this.checkWasmInitialization("Unable to set metadata field, cpp API hasn't been initialized"),this.utilityApi.setMetadataField(Le,Ye)}setInspectorOpened(Le){this.inspectorOpened_=Le}setBackgroundMode(Le){this.checkWasmInitialization("Unable to set background mode, cpp API hasn't been initialized"),this.utilityApi.setBackgroundMode(Le)}getCheck(){return this.checkWasmInitialization("Unable to get check, cpp API hasn't been initialized"),this.utilityApi.getCheck()}getMetadata(){return this.checkWasmInitialization("Unable to get metadata, cpp API hasn't been initialized"),this.utilityApi.setInspectorOpened(this.inspectorOpened_),this.utilityApi.getMetadata()}async prc(){return this.checkWasmInitialization("Unable to prc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.prc.bind(this.utilityApi),[])}async poc(Le){this.checkWasmInitialization("Unable to poc, cpp API hasn't been initialized"),await this.wasmCallWrapper(this.utilityApi.poc.bind(this.utilityApi),[Le])}pipelineTypeToWasmEnum(Le){switch(Le){case WasmPipelineType.IdBlurGlarePipeline:return this.wasmModule.PipelineType.IdBlurGlarePipeline;case WasmPipelineType.IdBarcodeAndTextQualityPipeline:return this.wasmModule.PipelineType.IdBarcodeAndTextQualityPipeline;case WasmPipelineType.IdFaceDetectionPipeline:return this.wasmModule.PipelineType.IdFaceDetectionPipeline;case WasmPipelineType.IdVideoSelfiePipeline:return this.wasmModule.PipelineType.IdVideoSelfiePipeline;case WasmPipelineType.SelfieWithAggregationMetrics:return this.wasmModule.PipelineType.SelfieWithAggregationMetrics;case WasmPipelineType.SelfieWithQualityMetrics:return this.wasmModule.PipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}pipelineTypeFromWasmEnum(Le){switch(Le){case this.wasmModule.PipelineType.IdBlurGlarePipeline:return WasmPipelineType.IdBlurGlarePipeline;case this.wasmModule.IdBarcodeAndTextQualityPipeline:return WasmPipelineType.IdBarcodeAndTextQualityPipeline;case this.wasmModule.PipelineType.IdFaceDetectionPipeline:return WasmPipelineType.IdFaceDetectionPipeline;case this.wasmModule.PipelineType.IdVideoSelfiePipeline:return WasmPipelineType.IdVideoSelfiePipeline;case this.wasmModule.PipelineType.SelfieWithAggregationMetrics:return WasmPipelineType.SelfieWithAggregationMetrics;case this.wasmModule.PipelineType.SelfieWithQualityMetrics:return WasmPipelineType.SelfieWithQualityMetrics;default:throw new Error("Unknown pipeline type")}}IdCaptureModelTypeToWasmEnum(Le){switch(Le){case IdCaptureModelType.IdCaptureV1x:return this.wasmModule.IdCaptureModelType.IdCaptureV1x;case IdCaptureModelType.IdCaptureV2x:return this.wasmModule.IdCaptureModelType.IdCaptureV2x;case IdCaptureModelType.IdCaptureV3x:return this.wasmModule.IdCaptureModelType.IdCaptureV3x;default:throw new Error("Unknown Id Capture model type")}}checkWasmInitialization(Le){if(!this.isInitialized())throw new Error(Le)}async wasmCallWrapper(Le,Ye=[]){return await this.wasmCallMutex.withLock(async(...tt)=>{let nt=!1;try{for(;;){if(nt=Le(...tt),nt)return;await new Promise(ft=>setTimeout(ft,0))}}catch(ft){console.log("Error in wasmCallWrapper:",ft)}},...Ye)}}const MlWasmJSApi$1=MlWasmJSApi.getInstance(),version$4="1.85.0-20251216190848.0";function e$2(Be,Le){return function(Ye,tt){return Object.prototype.hasOwnProperty.call(Ye,tt)}(Be,Le)?Be[Le]:void 0}function t$2(Be,Le,Ye,tt){const nt=document,ft="securitypolicyviolation";let ht;const gt=xt=>{const Et=new URL(Be,location.href),{blockedURI:yt}=xt;yt!==Et.href&&yt!==Et.protocol.slice(0,-1)&&yt!==Et.origin||(ht=xt,At())};nt.addEventListener(ft,gt);const At=()=>nt.removeEventListener(ft,gt);return Promise.resolve().then(Le).then(xt=>(At(),xt),xt=>new Promise(Et=>{const yt=new MessageChannel;yt.port1.onmessage=()=>Et(),yt.port2.postMessage(null)}).then(()=>{if(At(),ht)return Ye(ht);throw xt}))}function n$2(Be){let Le="";for(let Ye=0;Ye<Be.length;++Ye)if(Ye>0){const tt=Be[Ye].toLowerCase();tt!==Be[Ye]?Le+=` ${tt}`:Le+=Be[Ye]}else Le+=Be[Ye].toUpperCase();return Le}const r$4={default:"endpoint"},o$1={default:"tlsEndpoint"},i$5="Client timeout",R$2="Network connection error",s$3="Network request aborted",a$3="Response cannot be parsed",c$3="Blocked by CSP",E$1="The endpoint parameter is not a valid URL",l$1="Handle on demand agent data error",u$1=n$2("WrongRegion"),d$1=n$2("SubscriptionNotActive"),_$2=n$2("UnsupportedVersion"),O$1=n$2("InstallationMethodRestricted"),p$1=n$2("HostnameRestricted"),I$1=n$2("IntegrationFailed"),f$2=n$2("NetworkRestricted"),N$1=n$2("InvalidProxyIntegrationSecret"),T$1=n$2("InvalidProxyIntegrationHeaders"),h$e=n$2("ProxyIntegrationSecretEnvironmentMismatch"),v$d="API key required",m$2="API key not found",A$1="API key expired",w$e="Request cannot be parsed",P$1="Request failed",D$1="Request failed to process",S$1="Too many requests, rate limit exceeded",y="Not available for this origin",g$1="Not available with restricted header",L$1=v$d,C$1=m$2,U$1=A$1;var b$2="3.12.3";const M$1="Failed to load the JS script of the agent",K="9319";function V(Be,Le){const Ye=[],[tt,nt]=function(gt){const At=function(yt){const Ct=[...yt];return{current:()=>Ct[0],postpone(){const kt=Ct.shift();kt!==void 0&&Ct.push(kt)},exclude(){Ct.shift()}}}(gt),xt=function(yt,Ct){let kt=0;return()=>Math.random()*Math.min(Ct,yt*Math.pow(2,kt++))}(100,3e3),Et=new Set;return[At.current(),(yt,Ct)=>{let kt;const vt=Ct instanceof Error?Ct.message:"";if(vt===c$3||vt===E$1)At.exclude(),kt=0;else if(vt===K)At.exclude();else if(vt===M$1){const It=Date.now()-yt.getTime()<50,wt=At.current();wt&&It&&!Et.has(wt)&&(Et.add(wt),kt=0),At.postpone()}else At.postpone();const bt=At.current();return bt===void 0?void 0:[bt,kt??yt.getTime()+xt()-Date.now()]}]}(Be);let ft;if(tt===void 0)return Promise.reject(new TypeError("The list of script URL patterns is empty"));const ht=gt=>{const At=new Date,xt=yt=>Ye.push({url:gt,startedAt:At,finishedAt:new Date,error:yt}),Et=Le(gt);return Et.then(()=>xt(),xt),Et.catch(yt=>{if(ft!=null||(ft=yt),Ye.length>=5)throw ft;const Ct=nt(At,yt);if(!Ct)throw ft;const[kt,vt]=Ct;return(bt=vt,new Promise(It=>setTimeout(It,bt))).then(()=>ht(kt));var bt})};return ht(tt).then(gt=>[gt,Ye])}const k$1="https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js",G=k$1;function B$1(Be){var Le,Ye;const{picked:tt,rest:nt}=function(Et,yt){const Ct={},kt={};for(const[vt,bt]of Object.entries(Et))yt.includes(vt)?Ct[vt]=bt:kt[vt]=bt;return{picked:Ct,rest:kt}}(Be,["scriptUrlPattern","token","apiKey"]),ft=tt.token,ht=(Le=tt.apiKey)!==null&&Le!==void 0?Le:ft,gt=(Ye=e$2(Be,"scriptUrlPattern"))!==null&&Ye!==void 0?Ye:k$1,[At,xt]=function(){const Et=[],yt=()=>{Et.push({time:new Date,state:document.visibilityState})},Ct=function(kt,vt,bt,It){return kt.addEventListener(vt,bt,It),()=>kt.removeEventListener(vt,bt,It)}(document,"visibilitychange",yt);return yt(),[Et,Ct]}();return Promise.resolve().then(()=>{if(!ht||typeof ht!="string")throw new Error(v$d);const Et=function(yt,Ct){return(Array.isArray(yt)?yt:[yt]).map(kt=>function(vt,bt){const It=encodeURIComponent;return vt.replace(/<[^<>]+>/g,wt=>wt==="<version>"?"3":wt==="<apiKey>"?It(bt):wt==="<loaderVersion>"?It(b$2):wt)}(String(kt),Ct))}(gt,ht);return V(Et,F$1)}).catch(Et=>{throw xt(),function(yt){return yt instanceof Error&&yt.message===K?new Error(M$1):yt}(Et)}).then(([Et,yt])=>(xt(),Et.load({...nt,ldi:{attempts:yt,visibilityStates:At}})))}function F$1(Be){return t$2(Be,()=>function(Le){return new Promise((Ye,tt)=>{if(function(gt){if(URL.prototype)try{return new URL(gt,location.href),!1}catch(At){if(At instanceof Error&&At.name==="TypeError")return!0;throw At}}(Le))throw new Error(E$1);const nt=document.createElement("script"),ft=()=>{var gt;return(gt=nt.parentNode)===null||gt===void 0?void 0:gt.removeChild(nt)},ht=document.head||document.getElementsByTagName("head")[0];nt.onload=()=>{ft(),Ye()},nt.onerror=()=>{ft(),tt(new Error(M$1))},nt.async=!0,nt.src=Le,ht.appendChild(nt)})}(Be),()=>{throw new Error(c$3)}).then(x$1)}function x$1(){const Be=window,Le="__fpjs_p_l_b",Ye=Be[Le];if(function(tt,nt){var ft;const ht=(ft=Object.getOwnPropertyDescriptor)===null||ft===void 0?void 0:ft.call(Object,tt,nt);ht!=null&&ht.configurable?delete tt[nt]:ht&&!ht.writable||(tt[nt]=void 0)}(Be,Le),typeof(Ye==null?void 0:Ye.load)!="function")throw new Error(K);return Ye}var H={load:B$1,defaultScriptUrlPattern:G,ERROR_SCRIPT_LOAD_FAIL:M$1,ERROR_API_KEY_EXPIRED:A$1,ERROR_API_KEY_INVALID:m$2,ERROR_API_KEY_MISSING:v$d,ERROR_BAD_REQUEST_FORMAT:w$e,ERROR_BAD_RESPONSE_FORMAT:a$3,ERROR_CLIENT_TIMEOUT:i$5,ERROR_CSP_BLOCK:c$3,ERROR_FORBIDDEN_ENDPOINT:p$1,ERROR_FORBIDDEN_HEADER:g$1,ERROR_FORBIDDEN_ORIGIN:y,ERROR_GENERAL_SERVER_FAILURE:P$1,ERROR_HANDLE_AGENT_DATA:l$1,ERROR_INSTALLATION_METHOD_RESTRICTED:O$1,ERROR_INTEGRATION_FAILURE:I$1,ERROR_INVALID_ENDPOINT:E$1,ERROR_INVALID_PROXY_INTEGRATION_HEADERS:T$1,ERROR_INVALID_PROXY_INTEGRATION_SECRET:N$1,ERROR_NETWORK_ABORT:s$3,ERROR_NETWORK_CONNECTION:R$2,ERROR_NETWORK_RESTRICTED:f$2,ERROR_PROXY_INTEGRATION_SECRET_ENVIRONMENT_MISMATCH:h$e,ERROR_RATE_LIMIT:S$1,ERROR_SERVER_TIMEOUT:D$1,ERROR_SUBSCRIPTION_NOT_ACTIVE:d$1,ERROR_TOKEN_EXPIRED:U$1,ERROR_TOKEN_INVALID:C$1,ERROR_TOKEN_MISSING:L$1,ERROR_UNSUPPORTED_VERSION:_$2,ERROR_WRONG_REGION:u$1,defaultEndpoint:r$4,defaultTlsEndpoint:o$1};function e$1(Be,Le,Ye,tt){return new(Ye||(Ye=Promise))(function(nt,ft){function ht(xt){try{At(tt.next(xt))}catch(Et){ft(Et)}}function gt(xt){try{At(tt.throw(xt))}catch(Et){ft(Et)}}function At(xt){var Et;xt.done?nt(xt.value):(Et=xt.value,Et instanceof Ye?Et:new Ye(function(yt){yt(Et)})).then(ht,gt)}At((tt=tt.apply(Be,[])).next())})}function n$1(Be,Le){var Ye,tt,nt,ft,ht={label:0,sent:function(){if(1&nt[0])throw nt[1];return nt[1]},trys:[],ops:[]};return ft={next:gt(0),throw:gt(1),return:gt(2)},typeof Symbol=="function"&&(ft[Symbol.iterator]=function(){return this}),ft;function gt(At){return function(xt){return function(Et){if(Ye)throw new TypeError("Generator is already executing.");for(;ft&&(ft=0,Et[0]&&(ht=0)),ht;)try{if(Ye=1,tt&&(nt=2&Et[0]?tt.return:Et[0]?tt.throw||((nt=tt.return)&&nt.call(tt),0):tt.next)&&!(nt=nt.call(tt,Et[1])).done)return nt;switch(tt=0,nt&&(Et=[2&Et[0],nt.value]),Et[0]){case 0:case 1:nt=Et;break;case 4:return ht.label++,{value:Et[1],done:!1};case 5:ht.label++,tt=Et[1],Et=[0];continue;case 7:Et=ht.ops.pop(),ht.trys.pop();continue;default:if(nt=ht.trys,!((nt=nt.length>0&&nt[nt.length-1])||Et[0]!==6&&Et[0]!==2)){ht=0;continue}if(Et[0]===3&&(!nt||Et[1]>nt[0]&&Et[1]<nt[3])){ht.label=Et[1];break}if(Et[0]===6&&ht.label<nt[1]){ht.label=nt[1],nt=Et;break}if(nt&&ht.label<nt[2]){ht.label=nt[2],ht.ops.push(Et);break}nt[2]&&ht.ops.pop(),ht.trys.pop();continue}Et=Le.call(Be,ht)}catch(yt){Et=[6,yt],tt=0}finally{Ye=nt=0}if(5&Et[0])throw Et[1];return{value:Et[0]?Et[1]:void 0,done:!0}}([At,xt])}}}typeof SuppressedError=="function"&&SuppressedError;var r$3={exclude:[],include:[],logging:!0,timeout:1e3},o={},a$2={timeout:"true"},i$4=function(Be,Le){typeof window<"u"&&(o[Be]=Le)},u=function(){return Object.fromEntries(Object.entries(o).filter(function(Be){var Le,Ye=Be[0];return!(!((Le=r$3==null?void 0:r$3.exclude)===null||Le===void 0)&&Le.includes(Ye))}).filter(function(Be){var Le,Ye,tt,nt,ft=Be[0];return!((Le=r$3==null?void 0:r$3.include)===null||Le===void 0)&&Le.some(function(ht){return ht.includes(".")})?(Ye=r$3==null?void 0:r$3.include)===null||Ye===void 0?void 0:Ye.some(function(ht){return ht.startsWith(ft)}):((tt=r$3==null?void 0:r$3.include)===null||tt===void 0?void 0:tt.length)===0||((nt=r$3==null?void 0:r$3.include)===null||nt===void 0?void 0:nt.includes(ft))}).map(function(Be){return[Be[0],(0,Be[1])()]}))};function c$2(Be){return Be^=Be>>>16,Be=Math.imul(Be,2246822507),Be^=Be>>>13,Be=Math.imul(Be,3266489909),(Be^=Be>>>16)>>>0}var s$2=new Uint32Array([597399067,2869860233,951274213,2716044179]);function l(Be,Le){return Be<<Le|Be>>>32-Le}function d(Be,Le){var Ye;if(Le===void 0&&(Le=0),Le=Le?0|Le:0,typeof Be=="string"&&(Ye=Be,Be=new TextEncoder().encode(Ye).buffer),!(Be instanceof ArrayBuffer))throw new TypeError("Expected key to be ArrayBuffer or string");var tt=new Uint32Array([Le,Le,Le,Le]);(function(ft,ht){for(var gt=ft.byteLength/16|0,At=new Uint32Array(ft,0,4*gt),xt=0;xt<gt;xt++){var Et=At.subarray(4*xt,4*(xt+1));Et[0]=Math.imul(Et[0],s$2[0]),Et[0]=l(Et[0],15),Et[0]=Math.imul(Et[0],s$2[1]),ht[0]=ht[0]^Et[0],ht[0]=l(ht[0],19),ht[0]=ht[0]+ht[1],ht[0]=Math.imul(ht[0],5)+1444728091,Et[1]=Math.imul(Et[1],s$2[1]),Et[1]=l(Et[1],16),Et[1]=Math.imul(Et[1],s$2[2]),ht[1]=ht[1]^Et[1],ht[1]=l(ht[1],17),ht[1]=ht[1]+ht[2],ht[1]=Math.imul(ht[1],5)+197830471,Et[2]=Math.imul(Et[2],s$2[2]),Et[2]=l(Et[2],17),Et[2]=Math.imul(Et[2],s$2[3]),ht[2]=ht[2]^Et[2],ht[2]=l(ht[2],15),ht[2]=ht[2]+ht[3],ht[2]=Math.imul(ht[2],5)+2530024501,Et[3]=Math.imul(Et[3],s$2[3]),Et[3]=l(Et[3],18),Et[3]=Math.imul(Et[3],s$2[0]),ht[3]=ht[3]^Et[3],ht[3]=l(ht[3],13),ht[3]=ht[3]+ht[0],ht[3]=Math.imul(ht[3],5)+850148119}})(Be,tt),function(ft,ht){var gt=ft.byteLength/16|0,At=ft.byteLength%16,xt=new Uint32Array(4),Et=new Uint8Array(ft,16*gt,At);switch(At){case 15:xt[3]=xt[3]^Et[14]<<16;case 14:xt[3]=xt[3]^Et[13]<<8;case 13:xt[3]=xt[3]^Et[12],xt[3]=Math.imul(xt[3],s$2[3]),xt[3]=l(xt[3],18),xt[3]=Math.imul(xt[3],s$2[0]),ht[3]=ht[3]^xt[3];case 12:xt[2]=xt[2]^Et[11]<<24;case 11:xt[2]=xt[2]^Et[10]<<16;case 10:xt[2]=xt[2]^Et[9]<<8;case 9:xt[2]=xt[2]^Et[8],xt[2]=Math.imul(xt[2],s$2[2]),xt[2]=l(xt[2],17),xt[2]=Math.imul(xt[2],s$2[3]),ht[2]=ht[2]^xt[2];case 8:xt[1]=xt[1]^Et[7]<<24;case 7:xt[1]=xt[1]^Et[6]<<16;case 6:xt[1]=xt[1]^Et[5]<<8;case 5:xt[1]=xt[1]^Et[4],xt[1]=Math.imul(xt[1],s$2[1]),xt[1]=l(xt[1],16),xt[1]=Math.imul(xt[1],s$2[2]),ht[1]=ht[1]^xt[1];case 4:xt[0]=xt[0]^Et[3]<<24;case 3:xt[0]=xt[0]^Et[2]<<16;case 2:xt[0]=xt[0]^Et[1]<<8;case 1:xt[0]=xt[0]^Et[0],xt[0]=Math.imul(xt[0],s$2[0]),xt[0]=l(xt[0],15),xt[0]=Math.imul(xt[0],s$2[1]),ht[0]=ht[0]^xt[0]}}(Be,tt),function(ft,ht){ht[0]=ht[0]^ft.byteLength,ht[1]=ht[1]^ft.byteLength,ht[2]=ht[2]^ft.byteLength,ht[3]=ht[3]^ft.byteLength,ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0,ht[0]=c$2(ht[0]),ht[1]=c$2(ht[1]),ht[2]=c$2(ht[2]),ht[3]=c$2(ht[3]),ht[0]=ht[0]+ht[1]|0,ht[0]=ht[0]+ht[2]|0,ht[0]=ht[0]+ht[3]|0,ht[1]=ht[1]+ht[0]|0,ht[2]=ht[2]+ht[0]|0,ht[3]=ht[3]+ht[0]|0}(Be,tt);var nt=new Uint8Array(tt.buffer);return Array.from(nt).map(function(ft){return ft.toString(16).padStart(2,"0")}).join("")}function f$1(Be,Le){return new Promise(function(Ye){setTimeout(function(){return Ye(Le)},Be)})}function m$1(Be,Le,Ye){return Promise.all(Be.map(function(tt){return Promise.race([tt,f$1(Le,Ye)])}))}function g(){return e$1(this,void 0,void 0,function(){var Be,Le,Ye,tt,nt;return n$1(this,function(ft){switch(ft.label){case 0:return ft.trys.push([0,2,,3]),Be=u(),Le=Object.keys(Be),[4,m$1(Object.values(Be),(r$3==null?void 0:r$3.timeout)||1e3,a$2)];case 1:return Ye=ft.sent(),tt=Ye.filter(function(ht){return ht!==void 0}),nt={},tt.forEach(function(ht,gt){nt[Le[gt]]=ht}),[2,p(nt,r$3.exclude||[],r$3.include||[],"")];case 2:throw ft.sent();case 3:return[2]}})})}function p(Be,Le,Ye,tt){tt===void 0&&(tt="");for(var nt={},ft=function(xt,Et){var yt=tt+xt+".";if(typeof Et!="object"||Array.isArray(Et)){var Ct=Le.some(function(bt){return yt.startsWith(bt)}),kt=Ye.some(function(bt){return yt.startsWith(bt)});Ct&&!kt||(nt[xt]=Et)}else{var vt=p(Et,Le,Ye,yt);Object.keys(vt).length>0&&(nt[xt]=vt)}},ht=0,gt=Object.entries(Be);ht<gt.length;ht++){var At=gt[ht];ft(At[0],At[1])}return nt}function w$d(Be){return e$1(this,void 0,void 0,function(){var Le,Ye;return n$1(this,function(tt){switch(tt.label){case 0:return tt.trys.push([0,2,,3]),[4,g()];case 1:return Le=tt.sent(),Ye=d(JSON.stringify(Le)),Math.random()<1e-5&&r$3.logging&&function(nt,ft){e$1(this,void 0,void 0,function(){var ht,gt;return n$1(this,function(At){switch(At.label){case 0:if(ht="https://logging.thumbmarkjs.com/v1/log",gt={thumbmark:nt,components:ft,version:"0.20.6"},sessionStorage.getItem("_tmjs_l"))return[3,4];sessionStorage.setItem("_tmjs_l","1"),At.label=1;case 1:return At.trys.push([1,3,,4]),[4,fetch(ht,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(gt)})];case 2:case 3:return At.sent(),[3,4];case 4:return[2]}})})}(Ye,Le),[2,Ye.toString()];case 2:throw tt.sent();case 3:return[2]}})})}function b$1(){if(typeof navigator>"u")return{name:"unknown",version:"unknown"};for(var Be=navigator.userAgent,Le={edg:"Edge",opr:"Opera",samsung:"SamsungBrowser"},Ye=0,tt=[/(?<name>SamsungBrowser)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Edge|Edg)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Chrome|Chromium|OPR|Opera|Vivaldi|Brave))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>(?:Firefox|Waterfox|Iceweasel|IceCat))\/(?<version>\d+(?:\.\d+)?)/,/(?<name>Safari)\/(?<version>\d+(?:\.\d+)?)/,/(?<name>MSIE|Trident|IEMobile).+?(?<version>\d+(?:\.\d+)?)/,/(?<name>samsung).*Version\/(?<version>\d+(?:\.\d+)?)/i,/(?<name>[A-Za-z]+)\/(?<version>\d+(?:\.\d+)?)/];Ye<tt.length;Ye++){var nt=tt[Ye],ft=Be.match(nt);if(ft&&ft.groups)return{name:Le[ft.groups.name.toLowerCase()]||ft.groups.name,version:ft.groups.version}}return{name:"unknown",version:"unknown"}}function S(Be){for(var Le=0,Ye=0;Ye<Be.length;++Ye)Le+=Math.abs(Be[Ye]);return Le}var M=b$1();function E(Be,Le,Ye){for(var tt=[],nt=0;nt<Be[0].data.length;nt++){for(var ft=[],ht=0;ht<Be.length;ht++)ft.push(Be[ht].data[nt]);tt.push(P(ft))}var gt=new Uint8ClampedArray(tt);return new ImageData(gt,Le,Ye)}function P(Be){if(Be.length===0)return 0;for(var Le={},Ye=0,tt=Be;Ye<tt.length;Ye++)Le[ft=tt[Ye]]=(Le[ft]||0)+1;var nt=Be[0];for(var ft in Le)Le[ft]>Le[nt]&&(nt=parseInt(ft,10));return nt}["SamsungBrowser","Safari"].includes(M.name)||i$4("audio",function(){return e$1(this,void 0,void 0,function(){return n$1(this,function(Be){return[2,new Promise(function(Le,Ye){try{var tt=new(window.OfflineAudioContext||window.webkitOfflineAudioContext)(1,5e3,44100),nt=tt.createBufferSource(),ft=tt.createOscillator();ft.frequency.value=1e3;var ht,gt=tt.createDynamicsCompressor();gt.threshold.value=-50,gt.knee.value=40,gt.ratio.value=12,gt.attack.value=0,gt.release.value=.2,ft.connect(gt),gt.connect(tt.destination),ft.start(),tt.oncomplete=function(At){ht=At.renderedBuffer.getChannelData(0),Le({sampleHash:S(ht),oscillator:ft.type,maxChannels:tt.destination.maxChannelCount,channelCountMode:nt.channelCountMode})},tt.startRendering()}catch(At){console.error("Error creating audio fingerprint:",At),Ye(At)}})]})})});var A=b$1(),C=A.name.toLowerCase(),x=A.version.split(".")[0]||"0",T=parseInt(x,10);C==="firefox"||C==="safari"&&T===17||i$4("canvas",function(){return document.createElement("canvas").getContext("2d"),new Promise(function(Be){var Le=Array.from({length:3},function(){return function(){var Ye=document.createElement("canvas"),tt=Ye.getContext("2d");if(!tt)return new ImageData(1,1);Ye.width=280,Ye.height=20;var nt=tt.createLinearGradient(0,0,Ye.width,Ye.height);nt.addColorStop(0,"red"),nt.addColorStop(.16666666666666666,"orange"),nt.addColorStop(.3333333333333333,"yellow"),nt.addColorStop(.5,"green"),nt.addColorStop(.6666666666666666,"blue"),nt.addColorStop(.8333333333333334,"indigo"),nt.addColorStop(1,"violet"),tt.fillStyle=nt,tt.fillRect(0,0,Ye.width,Ye.height);var ft="Random Text WMwmil10Oo";return tt.font="23.123px Arial",tt.fillStyle="black",tt.fillText(ft,-5,15),tt.fillStyle="rgba(0, 0, 255, 0.5)",tt.fillText(ft,-3.3,17.7),tt.beginPath(),tt.moveTo(0,0),tt.lineTo(2*Ye.width/7,Ye.height),tt.strokeStyle="white",tt.lineWidth=2,tt.stroke(),tt.getImageData(0,0,Ye.width,Ye.height)}()});Be({commonImageDataHash:d(E(Le,280,20).data.toString()).toString()})})});var k,I=["Arial","Arial Black","Arial Narrow","Arial Rounded MT","Arimo","Archivo","Barlow","Bebas Neue","Bitter","Bookman","Calibri","Cabin","Candara","Century","Century Gothic","Comic Sans MS","Constantia","Courier","Courier New","Crimson Text","DM Mono","DM Sans","DM Serif Display","DM Serif Text","Dosis","Droid Sans","Exo","Fira Code","Fira Sans","Franklin Gothic Medium","Garamond","Geneva","Georgia","Gill Sans","Helvetica","Impact","Inconsolata","Indie Flower","Inter","Josefin Sans","Karla","Lato","Lexend","Lucida Bright","Lucida Console","Lucida Sans Unicode","Manrope","Merriweather","Merriweather Sans","Montserrat","Myriad","Noto Sans","Nunito","Nunito Sans","Open Sans","Optima","Orbitron","Oswald","Pacifico","Palatino","Perpetua","PT Sans","PT Serif","Poppins","Prompt","Public Sans","Quicksand","Rajdhani","Recursive","Roboto","Roboto Condensed","Rockwell","Rubik","Segoe Print","Segoe Script","Segoe UI","Sora","Source Sans Pro","Space Mono","Tahoma","Taviraj","Times","Times New Roman","Titillium Web","Trebuchet MS","Ubuntu","Varela Round","Verdana","Work Sans"],R$1=["monospace","sans-serif","serif"];function L(Be,Le){if(!Be)throw new Error("Canvas context not supported");return Be.font,Be.font="72px ".concat(Le),Be.measureText("WwMmLli0Oo").width}function _$1(){var Be,Le=document.createElement("canvas"),Ye=(Be=Le.getContext("webgl"))!==null&&Be!==void 0?Be:Le.getContext("experimental-webgl");if(Ye&&"getParameter"in Ye)try{var tt=(Ye.getParameter(Ye.VENDOR)||"").toString(),nt=(Ye.getParameter(Ye.RENDERER)||"").toString(),ft={vendor:tt,renderer:nt,version:(Ye.getParameter(Ye.VERSION)||"").toString(),shadingLanguageVersion:(Ye.getParameter(Ye.SHADING_LANGUAGE_VERSION)||"").toString()};if(!nt.length||!tt.length){var ht=Ye.getExtension("WEBGL_debug_renderer_info");if(ht){var gt=(Ye.getParameter(ht.UNMASKED_VENDOR_WEBGL)||"").toString(),At=(Ye.getParameter(ht.UNMASKED_RENDERER_WEBGL)||"").toString();gt&&(ft.vendorUnmasked=gt),At&&(ft.rendererUnmasked=At)}}return ft}catch{}return"undefined"}function O(){var Be=new Float32Array(1),Le=new Uint8Array(Be.buffer);return Be[0]=1/0,Be[0]=Be[0]-Be[0],Le[3]}function B(Be,Le){var Ye={};return Le.forEach(function(tt){var nt=function(ft){if(ft.length===0)return null;var ht={};ft.forEach(function(xt){var Et=String(xt);ht[Et]=(ht[Et]||0)+1});var gt=ft[0],At=1;return Object.keys(ht).forEach(function(xt){ht[xt]>At&&(gt=xt,At=ht[xt])}),gt}(Be.map(function(ft){return tt in ft?ft[tt]:void 0}).filter(function(ft){return ft!==void 0}));nt&&(Ye[tt]=nt)}),Ye}function D(){var Be=[],Le={"prefers-contrast":["high","more","low","less","forced","no-preference"],"any-hover":["hover","none"],"any-pointer":["none","coarse","fine"],pointer:["none","coarse","fine"],hover:["hover","none"],update:["fast","slow"],"inverted-colors":["inverted","none"],"prefers-reduced-motion":["reduce","no-preference"],"prefers-reduced-transparency":["reduce","no-preference"],scripting:["none","initial-only","enabled"],"forced-colors":["active","none"]};return Object.keys(Le).forEach(function(Ye){Le[Ye].forEach(function(tt){matchMedia("(".concat(Ye,": ").concat(tt,")")).matches&&Be.push("".concat(Ye,": ").concat(tt))})}),Be}b$1().name!="Firefox"&&i$4("fonts",function(){var Be=this;return new Promise(function(Le,Ye){try{(function(tt){var nt;e$1(this,void 0,void 0,function(){var ft,ht,gt;return n$1(this,function(At){switch(At.label){case 0:return document.body?[3,2]:[4,(xt=50,new Promise(function(yt){return setTimeout(yt,xt,Et)}))];case 1:return At.sent(),[3,0];case 2:if((ft=document.createElement("iframe")).setAttribute("frameBorder","0"),(ht=ft.style).setProperty("position","fixed"),ht.setProperty("display","block","important"),ht.setProperty("visibility","visible"),ht.setProperty("border","0"),ht.setProperty("opacity","0"),ft.src="about:blank",document.body.appendChild(ft),!(gt=ft.contentDocument||((nt=ft.contentWindow)===null||nt===void 0?void 0:nt.document)))throw new Error("Iframe document is not accessible");return tt({iframe:gt}),setTimeout(function(){document.body.removeChild(ft)},0),[2]}var xt,Et})})})(function(tt){var nt=tt.iframe;return e$1(Be,void 0,void 0,function(){var ft,ht,gt,At;return n$1(this,function(xt){return ft=nt.createElement("canvas"),ht=ft.getContext("2d"),gt=R$1.map(function(Et){return L(ht,Et)}),At={},I.forEach(function(Et){var yt=L(ht,Et);gt.includes(yt)||(At[Et]=yt)}),Le(At),[2]})})})}catch{Ye({error:"unsupported"})}})}),i$4("hardware",function(){return new Promise(function(Be,Le){var Ye=navigator.deviceMemory!==void 0?navigator.deviceMemory:0,tt=window.performance&&window.performance.memory?window.performance.memory:0;Be({videocard:_$1(),architecture:O(),deviceMemory:Ye.toString()||"undefined",jsHeapSizeLimit:tt.jsHeapSizeLimit||0})})}),i$4("locales",function(){return new Promise(function(Be){Be({languages:navigator.language,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone})})}),i$4("permissions",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){return k=(r$3==null?void 0:r$3.permissions_to_check)||["accelerometer","accessibility","accessibility-events","ambient-light-sensor","background-fetch","background-sync","bluetooth","camera","clipboard-read","clipboard-write","device-info","display-capture","gyroscope","geolocation","local-fonts","magnetometer","microphone","midi","nfc","notifications","payment-handler","persistent-storage","push","speaker","storage-access","top-level-storage-access","window-management","query"],b$1().name.toLowerCase()==="safari"&&(k=k.filter(function(Ye){return!["camera","geolocation","microphone"].includes(Ye)})),Be=Array.from({length:(r$3==null?void 0:r$3.retries)||3},function(){return function(){return e$1(this,void 0,void 0,function(){var Ye,tt,nt,ft,ht;return n$1(this,function(gt){switch(gt.label){case 0:Ye={},tt=0,nt=k,gt.label=1;case 1:if(!(tt<nt.length))return[3,6];ft=nt[tt],gt.label=2;case 2:return gt.trys.push([2,4,,5]),[4,navigator.permissions.query({name:ft})];case 3:return ht=gt.sent(),Ye[ft]=ht.state.toString(),[3,5];case 4:return gt.sent(),[3,5];case 5:return tt++,[3,1];case 6:return[2,Ye]}})})}()}),[2,Promise.all(Be).then(function(Ye){return B(Ye,k)})]})})}),i$4("plugins",function(){var Be=[];if(navigator.plugins)for(var Le=0;Le<navigator.plugins.length;Le++){var Ye=navigator.plugins[Le];Be.push([Ye.name,Ye.filename,Ye.description].join("|"))}return new Promise(function(tt){tt({plugins:Be})})}),i$4("screen",function(){return new Promise(function(Be){Be({is_touchscreen:navigator.maxTouchPoints>0,maxTouchPoints:navigator.maxTouchPoints,colorDepth:screen.colorDepth,mediaMatches:D()})})}),i$4("system",function(){return new Promise(function(Be){var Le=b$1(),Ye={platform:window.navigator.platform,productSub:navigator.productSub,product:navigator.product,useragent:navigator.userAgent,hardwareConcurrency:navigator.hardwareConcurrency,browser:{name:Le.name,version:Le.version}};Le.name.toLowerCase()!=="safari"&&(Ye.applePayVersion=function(){if(window.location.protocol==="https:"&&typeof window.ApplePaySession=="function")try{for(var tt=window.ApplePaySession.supportsVersion,nt=15;nt>0;nt--)if(tt(nt))return nt}catch{return 0}return 0}(),Ye.cookieEnabled=window.navigator.cookieEnabled),Be(Ye)})});var U,N=b$1().name!=="SamsungBrowser"?1:3,F=null;i$4("webgl",function(){return e$1(this,void 0,void 0,function(){var Be;return n$1(this,function(Le){typeof document<"u"&&((U=document.createElement("canvas")).width=200,U.height=100,F=U.getContext("webgl"));try{if(!F)throw new Error("WebGL not supported");return Be=Array.from({length:N},function(){return function(){try{if(!F)throw new Error("WebGL not supported");var Ye=`
|
|
67
67
|
attribute vec2 position;
|
|
68
68
|
void main() {
|
|
69
69
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
@@ -2370,7 +2370,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2370
2370
|
border: 2px solid ${({theme:Be})=>Be==null?void 0:Be.input.primary.border.active} !important;
|
|
2371
2371
|
background-color: ${({theme:Be})=>Be==null?void 0:Be.input.primary.surface.active} !important;
|
|
2372
2372
|
}
|
|
2373
|
-
`,IndividualCharacterInputBoxes=({amount:Be,autoFocus:Le,onChange:Ye,password:tt=!1,value:nt,isNumeric:ft=!1,maxLength:ht,hasError:gt=!1,disabled:At=!1,inputMode:xt=void 0})=>{const{t:Et}=useTranslation(),[yt,Ct]=React.useState(()=>{const Dt=nt.split("").slice(0,Be);return Dt.length<Be?[...Dt,...Array(Be-Dt.length).fill("")]:Dt}),kt=React.useRef([]),vt=React.useRef(""),bt=useTokens();React.useEffect(()=>{const Dt=nt.split("").slice(0,Be);Dt.length<Be&&Dt.push(...Array(Be-Dt.length).fill("")),Ct(Dt)},[nt,Be]),React.useEffect(()=>{Le&&kt.current[0]&&kt.current[0].focus()},[Le]),React.useEffect(()=>{const Dt=tt?yt.join(""):yt.join("").toUpperCase();Dt!==vt.current&&(vt.current=Dt,Ye(Dt))},[yt,Ye,tt]);const It=(Dt,Pt)=>{var Wt;let Nt=Pt.target.value;Nt.length>1&&(Nt=Nt.charAt(0));const Lt=[...yt];Lt[Dt]=Nt,Ct(Lt),Nt&&Dt<Be-1&&((Wt=kt.current[Dt+1])==null||Wt.focus())},wt=(Dt,Pt)=>{var Lt,Wt,$t;const{key:Nt}=Pt;Nt==="Backspace"?!yt[Dt]&&Dt>0&&((Lt=kt.current[Dt-1])==null||Lt.focus()):Nt==="ArrowLeft"&&Dt>0?(Wt=kt.current[Dt-1])==null||Wt.focus():Nt==="ArrowRight"&&Dt<Be-1&&(($t=kt.current[Dt+1])==null||$t.focus())},Rt=Dt=>{Dt.target.select()},Tt=(Dt,Pt)=>{var Kt;const Lt=Pt.clipboardData.getData("text").split("");if(!Lt.length)return;const Wt=[...yt];for(let Vt=0;Vt<Lt.length&&Dt+Vt<Be;Vt++)Wt[Dt+Vt]=Lt[Vt];Ct(Wt);const $t=Math.min(Dt+Lt.length,Be-1);(Kt=kt.current[$t])==null||Kt.focus(),Pt.preventDefault()},Bt=()=>yt.map((Dt,Pt)=>{const Nt=Et("otp.input",{number:Pt+1,charLength:Be}),Lt=tt?"password":ft?"number":"text";return jsx$1(InputBox,{error:gt,id:`OTPInput-${Pt}`,type:Lt,inputMode:xt,onChange:Wt=>It(Pt,Wt),onKeyDown:Wt=>wt(Pt,Wt),onPaste:Wt=>Tt(Pt,Wt),onFocus:Rt,name:`input${Pt}`,"aria-label":Nt,ref:Wt=>{kt.current[Pt]=Wt},value:Dt,disabled:At,maxLength:ft?void 0:ht},`input-${Pt}`)});return jsx$1(Flex,{hFull:!0,mt:bt.spacing[8],children:jsxs(Box,{children:[jsx$1(SynchronizedInputGroup,{children:jsx$1(Flex,{gap:bt.spacing[3],children:Bt()})}),gt&&jsxs(Flex,{mt:bt.spacing[2],align:"center",children:[jsx$1(Box,{display:"inline-block",mr:bt.spacing[2],children:jsx$1(ErrorIcon$1,{size:"17"})}),jsx$1(Text$7,{display:"inline-block",as:"p",my:"auto",color:bt.input.primary.text.helper.negative,children:Et("otp.errorv2")})]})]})})},useCountryItems=()=>{const{t:Be}=useTranslation(),Le=React.useMemo(()=>{const tt=new Map;return Object.entries(countries$1).forEach(([nt,ft])=>{const ht=nt,gt=`+${getCountryCallingCode(ht)}`;tt.set(ht,{...ft,name:Be(`countries.${ht}`),id:ht,code:gt})}),tt},[Be]);return{countryItems:Le,getCountryByISOCode:tt=>Le.get(tt)}},PhoneInput=React.forwardRef(({countryISOCode:Be,label:Le,helper:Ye,showHelperIcon:tt,onChange:nt,...ft},ht)=>{const{disabled:gt=!1}=ft,{countryItems:At}=useCountryItems(),{state:xt,actions:{off:Et,on:yt}}=useToggle(!1),[Ct,kt]=React.useState(),[vt,bt]=React.useState("");React.useEffect(()=>{const Tt=At.get(Be)??At.get("MX");kt(Tt)},[Be,At]);const It=useTokens(),wt=Tt=>{const Bt=`${(Tt==null?void 0:Tt.code)||""}${vt}`;Et(),kt(Tt);const Dt=parsePhoneNumber(Bt);nt==null||nt(Bt,(Dt==null?void 0:Dt.isValid())||!1)},Rt=({target:{value:Tt}})=>{const Bt=`${(Ct==null?void 0:Ct.code)||""}${Tt}`;if(Ct){const Dt=parsePhoneNumber(Bt),Nt=new AsYouType(Ct.id).input(Bt).replace(Ct.code,"");bt(Nt),nt==null||nt(Bt,(Dt==null?void 0:Dt.isValid())||!1)}};return jsx$1(Box,{children:jsxs(Flex,{direction:"column",gap:It.spacing[2],position:"relative",children:[Le&&jsx$1(Text$7,{w:"auto",fontWeight:700,as:"label",color:It.input.primary.text.label.default,mb:It.spacing[2],display:"inline-block",children:Le}),jsxs(Flex,{gap:It.spacing[2],justify:"center",children:[jsx$1(Flex,{children:jsxs(Flex,{w:"124px",justify:"center",p:It.spacing[2],pl:It.spacing[4],align:"center",onClick:()=>xt?Et():yt(),borderWidth:"1px",borderColor:xt?It.input.primary.border.active:It.input.primary.border.default,backgroundColor:gt?It.input.primary.surface.disabled:It.input.primary.surface.default,borderRadius:It.spacing[2],children:[jsx$1(Text$7,{as:"span","aria-hidden":"true",children:Ct==null?void 0:Ct.emoji}),jsx$1(Text$7,{as:"span","aria-hidden":"true",ml:It.spacing[1],color:gt?It.input.primary.text.field.disabled:It.color.text.body.primary,fontWeight:It.typography.fontWeight.medium,fontSize:It.typography.fontSize.lg,children:Ct==null?void 0:Ct.code}),jsx$1(Flex,{ml:It.spacing[2],children:xt?jsx$1(UpArrow,{color:gt?It.color.icon.disabled:It.color.icon.primary}):jsx$1(DownArrow,{color:gt?It.color.icon.disabled:It.color.icon.primary})})]})}),jsx$1(Input$b,{ref:ht,p:It.spacing[4],placeholder:"(123) 123-45-67",type:"tel",onChange:Rt,value:vt,...ft})]}),xt&&jsx$1(Flex,{as:"ul",position:"absolute",borderWidth:"1px",borderColor:It.input.primary.border.default,backgroundColor:It.input.primary.surface.default,borderRadius:It.spacing[2],px:It.spacing[1],py:It.spacing[3],wFull:!0,top:"100%",maxH:"320px",zIndex:2,direction:"column",overflow:"scroll",children:At&&Array.from(At.entries()).map(([Tt,Bt])=>jsx$1(Flex,{as:"li",p:It.spacing[4],onClick:()=>wt(Bt),children:jsxs(Text$7,{color:It.color.text.body.primary,fontWeight:It.typography.fontWeight.medium,fontSize:It.typography.fontSize.lg,children:[Bt.emoji," ",Bt.code," ",Bt.name]})},Tt))})]})})}),CalendarIcon=()=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":"calendarIconTitle",children:[jsx$1("title",{id:"calendarIconTitle",children:"Calendar icon"}),jsx$1("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.50244 10.1563C7.50244 9.74204 7.83823 9.40625 8.25244 9.40625H16.7485C17.1627 9.40625 17.4985 9.74204 17.4985 10.1563C17.4985 10.5705 17.1627 10.9063 16.7485 10.9063H8.25244C7.83823 10.9063 7.50244 10.5705 7.50244 10.1563Z",fill:"#60667C"}),jsx$1("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.1406 2.25C16.5548 2.25 16.8906 2.58579 16.8906 3V5.96174C16.8906 6.37595 16.5548 6.71174 16.1406 6.71174C15.7264 6.71174 15.3906 6.37595 15.3906 5.96174V3C15.3906 2.58579 15.7264 2.25 16.1406 2.25Z",fill:"#60667C"}),jsx$1("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.86816 2.25C9.28238 2.25 9.61816 2.58579 9.61816 3V5.96174C9.61816 6.37595 9.28238 6.71174 8.86816 6.71174C8.45395 6.71174 8.11816 6.37595 8.11816 5.96174V3C8.11816 2.58579 8.45395 2.25 8.86816 2.25Z",fill:"#60667C"}),jsx$1("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.0392 4.95256C5.95822 4.07897 7.23731 3.67188 8.69414 3.67188H16.3145C17.7746 3.67188 19.0544 4.07865 19.9721 4.95323C20.8955 5.83327 21.3546 7.094 21.3504 8.60132C21.3504 8.6011 21.3504 8.60154 21.3504 8.60132V16.8137C21.3504 18.3212 20.8891 19.5831 19.9657 20.4646C19.0476 21.341 17.768 21.7504 16.3067 21.7504H8.69414C7.23281 21.7504 5.95209 21.3322 5.03394 20.4423C4.11207 19.5488 3.65039 18.2716 3.65039 16.7456V8.59984C3.65039 7.09167 4.11438 5.83167 5.0392 4.95256ZM6.07265 6.03976C5.51149 6.57317 5.15039 7.40215 5.15039 8.59984V16.7456C5.15039 17.9683 5.5138 18.8185 6.0779 19.3652C6.64573 19.9156 7.51189 20.2504 8.69414 20.2504H16.3067C17.4968 20.2504 18.364 19.9198 18.93 19.3796C19.4906 18.8445 19.8504 18.013 19.8504 16.8137V8.59984V8.59768C19.8539 7.39945 19.4958 6.57144 18.9372 6.03908C18.3728 5.50115 17.5058 5.17187 16.3145 5.17187H8.69414C7.50739 5.17187 6.6396 5.50083 6.07265 6.03976Z",fill:"#60667C"})]}),DateInput=React.forwardRef(({id:Be,value:Le,onChange:Ye,label:tt,...nt},ft)=>{const ht=React.useRef(null),gt=At=>{At.preventDefault(),At.stopPropagation();const xt=ht.current;if(xt)if(xt.focus(),"showPicker"in HTMLInputElement.prototype)try{xt.showPicker()}catch{xt.click()}else xt.click()};return jsxs(Box,{position:"relative",wFull:!0,maxW:"420px",children:[jsx$1(InputComposed,{id:Be,ref:At=>{ht.current=At,typeof ft=="function"?ft(At):ft&&(ft.current=At)},label:tt,type:"date",value:Le,onChange:Ye,"data-has-value":!!Le,...nt}),jsx$1(Box,{as:"button",type:"button",position:"absolute",right:"16px",top:"65%",transform:"translateY(-50%)",onClick:gt,onTouchEnd:gt,style:{cursor:"pointer",zIndex:1,background:"none",border:"none",padding:0},children:jsx$1(CalendarIcon,{})})]})}),getTokensFromDashboardTheme=Be=>({colors:{brand:getBrandColors(Be.main)},button:{primary:{text:{default:Be.buttonColor||"#fff"}}}}),CustomPrimitivesSchema=object({colors:optional(object({neutral:optional(object({light:optional(string$2()),dark:optional(string$2())})),brand:optional(record(string$2(),string$2())),gray:optional(record(string$2(),string$2())),brandSecondary:optional(record(string$2(),string$2())),positive:optional(record(string$2(),string$2())),warn:optional(record(string$2(),string$2())),negative:optional(record(string$2(),string$2()))})),button:optional(object({primary:optional(object({surface:optional(object({default:optional(string$2()),hover:optional(string$2()),pressed:optional(string$2()),disabled:optional(string$2())})),text:optional(object({default:optional(string$2()),disabled:optional(string$2())})),border:optional(object({default:optional(string$2()),hover:optional(string$2()),pressed:optional(string$2()),disabled:optional(string$2())}))})),secondary:optional(object({surface:optional(object({default:optional(string$2()),hover:optional(string$2()),pressed:optional(string$2()),disabled:optional(string$2())})),text:optional(object({default:optional(string$2()),disabled:optional(string$2())})),border:optional(object({default:optional(string$2()),hover:optional(string$2()),pressed:optional(string$2()),disabled:optional(string$2())}))}))}))});var lib$2={exports:{}},Modal$2={},propTypes$2={exports:{}};/*
|
|
2373
|
+
`,IndividualCharacterInputBoxes=({amount:Be,autoFocus:Le,onChange:Ye,password:tt=!1,value:nt,isNumeric:ft=!1,maxLength:ht,hasError:gt=!1,disabled:At=!1,inputMode:xt=void 0})=>{const{t:Et}=useTranslation(),[yt,Ct]=React.useState(()=>{const Dt=nt.split("").slice(0,Be);return Dt.length<Be?[...Dt,...Array(Be-Dt.length).fill("")]:Dt}),kt=React.useRef([]),vt=React.useRef(""),bt=useTokens();React.useEffect(()=>{const Dt=nt.split("").slice(0,Be);Dt.length<Be&&Dt.push(...Array(Be-Dt.length).fill("")),Ct(Dt)},[nt,Be]),React.useEffect(()=>{Le&&kt.current[0]&&kt.current[0].focus()},[Le]),React.useEffect(()=>{const Dt=tt?yt.join(""):yt.join("").toUpperCase();Dt!==vt.current&&(vt.current=Dt,Ye(Dt))},[yt,Ye,tt]);const It=(Dt,Pt)=>{var Wt;let Nt=Pt.target.value;Nt.length>1&&(Nt=Nt.charAt(0));const Lt=[...yt];Lt[Dt]=Nt,Ct(Lt),Nt&&Dt<Be-1&&((Wt=kt.current[Dt+1])==null||Wt.focus())},wt=(Dt,Pt)=>{var Lt,Wt,$t;const{key:Nt}=Pt;Nt==="Backspace"?!yt[Dt]&&Dt>0&&((Lt=kt.current[Dt-1])==null||Lt.focus()):Nt==="ArrowLeft"&&Dt>0?(Wt=kt.current[Dt-1])==null||Wt.focus():Nt==="ArrowRight"&&Dt<Be-1&&(($t=kt.current[Dt+1])==null||$t.focus())},Rt=Dt=>{Dt.target.select()},Tt=(Dt,Pt)=>{var Kt;const Lt=Pt.clipboardData.getData("text").split("");if(!Lt.length)return;const Wt=[...yt];for(let Vt=0;Vt<Lt.length&&Dt+Vt<Be;Vt++)Wt[Dt+Vt]=Lt[Vt];Ct(Wt);const $t=Math.min(Dt+Lt.length,Be-1);(Kt=kt.current[$t])==null||Kt.focus(),Pt.preventDefault()},Bt=()=>yt.map((Dt,Pt)=>{const Nt=Et("otp.input",{number:Pt+1,charLength:Be}),Lt=tt?"password":ft?"number":"text";return jsx$1(InputBox,{error:gt,id:`OTPInput-${Pt}`,type:Lt,inputMode:xt,onChange:Wt=>It(Pt,Wt),onKeyDown:Wt=>wt(Pt,Wt),onPaste:Wt=>Tt(Pt,Wt),onFocus:Rt,name:`input${Pt}`,"aria-label":Nt,ref:Wt=>{kt.current[Pt]=Wt},value:Dt,disabled:At,maxLength:ft?void 0:ht},`input-${Pt}`)});return jsx$1(Flex,{hFull:!0,mt:bt.spacing[8],children:jsxs(Box,{children:[jsx$1(SynchronizedInputGroup,{children:jsx$1(Flex,{gap:bt.spacing[3],children:Bt()})}),gt&&jsxs(Flex,{mt:bt.spacing[2],align:"center",children:[jsx$1(Box,{display:"inline-block",mr:bt.spacing[2],children:jsx$1(ErrorIcon$1,{size:"17"})}),jsx$1(Text$7,{display:"inline-block",as:"p",my:"auto",color:bt.input.primary.text.helper.negative,children:Et("otp.errorv2")})]})]})})},useCountryItems=()=>{const{t:Be}=useTranslation(),Le=React.useMemo(()=>{const tt=new Map;return Object.entries(countries$1).forEach(([nt,ft])=>{const ht=nt,gt=`+${getCountryCallingCode(ht)}`;tt.set(ht,{...ft,name:Be(`countries.${ht}`),id:ht,code:gt})}),tt},[Be]);return{countryItems:Le,getCountryByISOCode:tt=>Le.get(tt)}},PhoneInput=React.forwardRef(({countryISOCode:Be,label:Le,helper:Ye,showHelperIcon:tt,onChange:nt,...ft},ht)=>{const{disabled:gt=!1}=ft,{countryItems:At}=useCountryItems(),{state:xt,actions:{off:Et,on:yt}}=useToggle(!1),[Ct,kt]=React.useState(),[vt,bt]=React.useState("");React.useEffect(()=>{const Tt=At.get(Be)??At.get("MX");kt(Tt)},[Be,At]);const It=useTokens(),wt=Tt=>{const Bt=`${(Tt==null?void 0:Tt.code)||""}${vt}`;Et(),kt(Tt);const Dt=parsePhoneNumber(Bt);nt==null||nt(Bt,(Dt==null?void 0:Dt.isValid())||!1)},Rt=({target:{value:Tt}})=>{const Bt=`${(Ct==null?void 0:Ct.code)||""}${Tt}`;if(Ct){const Dt=parsePhoneNumber(Bt),Nt=new AsYouType(Ct.id).input(Bt).replace(Ct.code,"");bt(Nt),nt==null||nt(Bt,(Dt==null?void 0:Dt.isValid())||!1)}};return jsx$1(Box,{children:jsxs(Flex,{direction:"column",gap:It.spacing[2],position:"relative",children:[Le&&jsx$1(Text$7,{w:"auto",fontWeight:700,as:"label",color:It.input.primary.text.label.default,mb:It.spacing[2],display:"inline-block",children:Le}),jsxs(Flex,{gap:It.spacing[2],justify:"center",children:[jsx$1(Flex,{children:jsxs(Flex,{w:"124px",justify:"center",p:It.spacing[2],pl:It.spacing[4],align:"center",onClick:()=>xt?Et():yt(),borderWidth:"1px",borderColor:xt?It.input.primary.border.active:It.input.primary.border.default,backgroundColor:gt?It.input.primary.surface.disabled:It.input.primary.surface.default,borderRadius:It.spacing[2],children:[jsx$1(Text$7,{as:"span","aria-hidden":"true",children:Ct==null?void 0:Ct.emoji}),jsx$1(Text$7,{as:"span","aria-hidden":"true",ml:It.spacing[1],color:gt?It.input.primary.text.field.disabled:It.color.text.body.primary,fontWeight:It.typography.fontWeight.medium,fontSize:It.typography.fontSize.lg,children:Ct==null?void 0:Ct.code}),jsx$1(Flex,{ml:It.spacing[2],children:xt?jsx$1(UpArrow,{color:gt?It.color.icon.disabled:It.color.icon.primary}):jsx$1(DownArrow,{color:gt?It.color.icon.disabled:It.color.icon.primary})})]})}),jsx$1(Input$b,{ref:ht,p:It.spacing[4],placeholder:"(123) 123-45-67",type:"tel",onChange:Rt,value:vt,...ft})]}),xt&&jsx$1(Flex,{as:"ul",position:"absolute",borderWidth:"1px",borderColor:It.input.primary.border.default,backgroundColor:It.input.primary.surface.default,borderRadius:It.spacing[2],px:It.spacing[1],py:It.spacing[3],wFull:!0,top:"100%",maxH:"320px",zIndex:2,direction:"column",overflow:"scroll",children:At&&Array.from(At.entries()).map(([Tt,Bt])=>jsx$1(Flex,{as:"li",p:It.spacing[4],onClick:()=>wt(Bt),children:jsxs(Text$7,{color:It.color.text.body.primary,fontWeight:It.typography.fontWeight.medium,fontSize:It.typography.fontSize.lg,children:[Bt.emoji," ",Bt.code," ",Bt.name]})},Tt))})]})})}),CalendarIcon=()=>jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-labelledby":"calendarIconTitle",children:[jsx$1("title",{id:"calendarIconTitle",children:"Calendar icon"}),jsx$1("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M7.50244 10.1563C7.50244 9.74204 7.83823 9.40625 8.25244 9.40625H16.7485C17.1627 9.40625 17.4985 9.74204 17.4985 10.1563C17.4985 10.5705 17.1627 10.9063 16.7485 10.9063H8.25244C7.83823 10.9063 7.50244 10.5705 7.50244 10.1563Z",fill:"#60667C"}),jsx$1("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.1406 2.25C16.5548 2.25 16.8906 2.58579 16.8906 3V5.96174C16.8906 6.37595 16.5548 6.71174 16.1406 6.71174C15.7264 6.71174 15.3906 6.37595 15.3906 5.96174V3C15.3906 2.58579 15.7264 2.25 16.1406 2.25Z",fill:"#60667C"}),jsx$1("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.86816 2.25C9.28238 2.25 9.61816 2.58579 9.61816 3V5.96174C9.61816 6.37595 9.28238 6.71174 8.86816 6.71174C8.45395 6.71174 8.11816 6.37595 8.11816 5.96174V3C8.11816 2.58579 8.45395 2.25 8.86816 2.25Z",fill:"#60667C"}),jsx$1("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.0392 4.95256C5.95822 4.07897 7.23731 3.67188 8.69414 3.67188H16.3145C17.7746 3.67188 19.0544 4.07865 19.9721 4.95323C20.8955 5.83327 21.3546 7.094 21.3504 8.60132C21.3504 8.6011 21.3504 8.60154 21.3504 8.60132V16.8137C21.3504 18.3212 20.8891 19.5831 19.9657 20.4646C19.0476 21.341 17.768 21.7504 16.3067 21.7504H8.69414C7.23281 21.7504 5.95209 21.3322 5.03394 20.4423C4.11207 19.5488 3.65039 18.2716 3.65039 16.7456V8.59984C3.65039 7.09167 4.11438 5.83167 5.0392 4.95256ZM6.07265 6.03976C5.51149 6.57317 5.15039 7.40215 5.15039 8.59984V16.7456C5.15039 17.9683 5.5138 18.8185 6.0779 19.3652C6.64573 19.9156 7.51189 20.2504 8.69414 20.2504H16.3067C17.4968 20.2504 18.364 19.9198 18.93 19.3796C19.4906 18.8445 19.8504 18.013 19.8504 16.8137V8.59984V8.59768C19.8539 7.39945 19.4958 6.57144 18.9372 6.03908C18.3728 5.50115 17.5058 5.17187 16.3145 5.17187H8.69414C7.50739 5.17187 6.6396 5.50083 6.07265 6.03976Z",fill:"#60667C"})]}),DateInput=React.forwardRef(({id:Be,value:Le,onChange:Ye,label:tt,...nt},ft)=>{const ht=React.useRef(null),gt=At=>{At.preventDefault(),At.stopPropagation();const xt=ht.current;if(xt)if(xt.focus(),"showPicker"in HTMLInputElement.prototype)try{xt.showPicker()}catch{xt.click()}else xt.click()};return jsxs(Box,{position:"relative",wFull:!0,maxW:"420px",children:[jsx$1(InputComposed,{id:Be,ref:At=>{ht.current=At,typeof ft=="function"?ft(At):ft&&(ft.current=At)},label:tt,type:"date",value:Le,onChange:Ye,"data-has-value":!!Le,...nt}),jsx$1(Box,{as:"button",type:"button",position:"absolute",right:"16px",top:"65%",transform:"translateY(-50%)",onClick:gt,onTouchEnd:gt,style:{cursor:"pointer",zIndex:1,background:"none",border:"none",padding:0},children:jsx$1(CalendarIcon,{})})]})}),getTokensFromDashboardTheme=Be=>({colors:{brand:getBrandColors(Be.main)},button:{primary:{text:{default:Be.buttonColor||"#fff"}}}});let store$4;function getGlobalConfig(Be){return{lang:(Be==null?void 0:Be.lang)??(store$4==null?void 0:store$4.lang),message:Be==null?void 0:Be.message,abortEarly:(Be==null?void 0:Be.abortEarly)??(store$4==null?void 0:store$4.abortEarly),abortPipeEarly:(Be==null?void 0:Be.abortPipeEarly)??(store$4==null?void 0:store$4.abortPipeEarly)}}let store$3;function getGlobalMessage(Be){return store$3==null?void 0:store$3.get(Be)}let store$2;function getSchemaMessage(Be){return store$2==null?void 0:store$2.get(Be)}let store$1;function getSpecificMessage(Be,Le){var Ye;return(Ye=store$1==null?void 0:store$1.get(Be))==null?void 0:Ye.get(Le)}function _stringify$3(Be){var Ye,tt;const Le=typeof Be;return Le==="string"?`"${Be}"`:Le==="number"||Le==="bigint"||Le==="boolean"?`${Be}`:Le==="object"||Le==="function"?(Be&&((tt=(Ye=Object.getPrototypeOf(Be))==null?void 0:Ye.constructor)==null?void 0:tt.name))??"null":Le}function _addIssue(Be,Le,Ye,tt,nt){const ft=nt&&"input"in nt?nt.input:Ye.value,ht=(nt==null?void 0:nt.expected)??Be.expects??null,gt=(nt==null?void 0:nt.received)??_stringify$3(ft),At={kind:Be.kind,type:Be.type,input:ft,expected:ht,received:gt,message:`Invalid ${Le}: ${ht?`Expected ${ht} but r`:"R"}eceived ${gt}`,requirement:Be.requirement,path:nt==null?void 0:nt.path,issues:nt==null?void 0:nt.issues,lang:tt.lang,abortEarly:tt.abortEarly,abortPipeEarly:tt.abortPipeEarly},xt=Be.kind==="schema",Et=(nt==null?void 0:nt.message)??Be.message??getSpecificMessage(Be.reference,At.lang)??(xt?getSchemaMessage(At.lang):null)??tt.message??getGlobalMessage(At.lang);Et!==void 0&&(At.message=typeof Et=="function"?Et(At):Et),xt&&(Ye.typed=!1),Ye.issues?Ye.issues.push(At):Ye.issues=[At]}function _getStandardProps(Be){return{version:1,vendor:"valibot",validate(Le){return Be["~run"]({value:Le},getGlobalConfig())}}}function _isValidObjectKey(Be,Le){return Object.hasOwn(Be,Le)&&Le!=="__proto__"&&Le!=="prototype"&&Le!=="constructor"}function getFallback(Be,Le,Ye){return typeof Be.fallback=="function"?Be.fallback(Le,Ye):Be.fallback}function getDefault(Be,Le,Ye){return typeof Be.default=="function"?Be.default(Le,Ye):Be.default}function object(Be,Le){return{kind:"schema",type:"object",reference:object,expects:"Object",async:!1,entries:Be,message:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){var ft;const nt=Ye.value;if(nt&&typeof nt=="object"){Ye.typed=!0,Ye.value={};for(const ht in this.entries){const gt=this.entries[ht];if(ht in nt||(gt.type==="exact_optional"||gt.type==="optional"||gt.type==="nullish")&>.default!==void 0){const At=ht in nt?nt[ht]:getDefault(gt),xt=gt["~run"]({value:At},tt);if(xt.issues){const Et={type:"object",origin:"value",input:nt,key:ht,value:At};for(const yt of xt.issues)yt.path?yt.path.unshift(Et):yt.path=[Et],(ft=Ye.issues)==null||ft.push(yt);if(Ye.issues||(Ye.issues=xt.issues),tt.abortEarly){Ye.typed=!1;break}}xt.typed||(Ye.typed=!1),Ye.value[ht]=xt.value}else if(gt.fallback!==void 0)Ye.value[ht]=getFallback(gt);else if(gt.type!=="exact_optional"&>.type!=="optional"&>.type!=="nullish"&&(_addIssue(this,"key",Ye,tt,{input:void 0,expected:`"${ht}"`,path:[{type:"object",origin:"key",input:nt,key:ht,value:nt[ht]}]}),tt.abortEarly))break}}else _addIssue(this,"type",Ye,tt);return Ye}}}function optional(Be,Le){return{kind:"schema",type:"optional",reference:optional,expects:`(${Be.expects} | undefined)`,async:!1,wrapped:Be,default:Le,get"~standard"(){return _getStandardProps(this)},"~run"(Ye,tt){return Ye.value===void 0&&(this.default!==void 0&&(Ye.value=getDefault(this,Ye,tt)),Ye.value===void 0)?(Ye.typed=!0,Ye):this.wrapped["~run"](Ye,tt)}}}function record(Be,Le,Ye){return{kind:"schema",type:"record",reference:record,expects:"Object",async:!1,key:Be,value:Le,message:Ye,get"~standard"(){return _getStandardProps(this)},"~run"(tt,nt){var ht,gt;const ft=tt.value;if(ft&&typeof ft=="object"){tt.typed=!0,tt.value={};for(const At in ft)if(_isValidObjectKey(ft,At)){const xt=ft[At],Et=this.key["~run"]({value:At},nt);if(Et.issues){const Ct={type:"object",origin:"key",input:ft,key:At,value:xt};for(const kt of Et.issues)kt.path=[Ct],(ht=tt.issues)==null||ht.push(kt);if(tt.issues||(tt.issues=Et.issues),nt.abortEarly){tt.typed=!1;break}}const yt=this.value["~run"]({value:xt},nt);if(yt.issues){const Ct={type:"object",origin:"value",input:ft,key:At,value:xt};for(const kt of yt.issues)kt.path?kt.path.unshift(Ct):kt.path=[Ct],(gt=tt.issues)==null||gt.push(kt);if(tt.issues||(tt.issues=yt.issues),nt.abortEarly){tt.typed=!1;break}}(!Et.typed||!yt.typed)&&(tt.typed=!1),Et.typed&&(tt.value[Et.value]=yt.value)}}else _addIssue(this,"type",tt,nt);return tt}}}function string$2(Be){return{kind:"schema",type:"string",reference:string$2,expects:"string",async:!1,message:Be,get"~standard"(){return _getStandardProps(this)},"~run"(Le,Ye){return typeof Le.value=="string"?Le.typed=!0:_addIssue(this,"type",Le,Ye),Le}}}const CustomPrimitivesSchema=object({colors:optional(object({neutral:optional(object({light:optional(string$2()),dark:optional(string$2())})),brand:optional(record(string$2(),string$2())),gray:optional(record(string$2(),string$2())),brandSecondary:optional(record(string$2(),string$2())),positive:optional(record(string$2(),string$2())),warn:optional(record(string$2(),string$2())),negative:optional(record(string$2(),string$2()))})),button:optional(object({primary:optional(object({surface:optional(object({default:optional(string$2()),hover:optional(string$2()),pressed:optional(string$2()),disabled:optional(string$2())})),text:optional(object({default:optional(string$2()),disabled:optional(string$2())})),border:optional(object({default:optional(string$2()),hover:optional(string$2()),pressed:optional(string$2()),disabled:optional(string$2())}))})),secondary:optional(object({surface:optional(object({default:optional(string$2()),hover:optional(string$2()),pressed:optional(string$2()),disabled:optional(string$2())})),text:optional(object({default:optional(string$2()),disabled:optional(string$2())})),border:optional(object({default:optional(string$2()),hover:optional(string$2()),pressed:optional(string$2()),disabled:optional(string$2())}))}))}))});var lib$2={exports:{}},Modal$2={},propTypes$2={exports:{}};/*
|
|
2374
2374
|
object-assign
|
|
2375
2375
|
(c) Sindre Sorhus
|
|
2376
2376
|
@license MIT
|
|
@@ -3131,7 +3131,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
3131
3131
|
.hidden {
|
|
3132
3132
|
display: none;
|
|
3133
3133
|
}
|
|
3134
|
-
`,App$1=({disableFullScreen:Be=!1,isKiosk:Le=!1,children:Ye,token:tt,style:nt,disableUnsupportedBrowserScreen:ft=!1})=>{const{isRotated:ht}=useOrientation(),{ready:gt}=useTranslation$1(),{shouldShow:At,onContinue:xt}=useBrowserNotSupported();return useResize(),React.useEffect(()=>{tt&&initialize(tt)},[tt]),gt?options.redirectFromUnsupportedBrowsers&&At&&!ft?jsxRuntimeExports.jsx(BrowserNotSupported,{onContinue:xt,token:tt}):jsxRuntimeExports.jsx(AppProvider,{children:jsxRuntimeExports.jsx(NotificationProvider,{initialValue:{isOpen:!1},children:jsxRuntimeExports.jsxs(Container$h,{className:cx("IncodeDefaultComponentContainer",{"disable-full-screen":Be,"is-desktop":mobile.isDesktop(),kiosk:Le}),style:nt,children:[!!mobile.any()&&!mobile.isIpad()&&ht&&jsxRuntimeExports.jsx(LandscapeNotSupported,{}),Ye]})})}):null},UiConfigSchema=object({branding:optional(object({logo:optional(object({src:optional(string$
|
|
3134
|
+
`,App$1=({disableFullScreen:Be=!1,isKiosk:Le=!1,children:Ye,token:tt,style:nt,disableUnsupportedBrowserScreen:ft=!1})=>{const{isRotated:ht}=useOrientation(),{ready:gt}=useTranslation$1(),{shouldShow:At,onContinue:xt}=useBrowserNotSupported();return useResize(),React.useEffect(()=>{tt&&initialize(tt)},[tt]),gt?options.redirectFromUnsupportedBrowsers&&At&&!ft?jsxRuntimeExports.jsx(BrowserNotSupported,{onContinue:xt,token:tt}):jsxRuntimeExports.jsx(AppProvider,{children:jsxRuntimeExports.jsx(NotificationProvider,{initialValue:{isOpen:!1},children:jsxRuntimeExports.jsxs(Container$h,{className:cx("IncodeDefaultComponentContainer",{"disable-full-screen":Be,"is-desktop":mobile.isDesktop(),kiosk:Le}),style:nt,children:[!!mobile.any()&&!mobile.isIpad()&&ht&&jsxRuntimeExports.jsx(LandscapeNotSupported,{}),Ye]})})}):null},UiConfigSchema=object$1({branding:optional$1(object$1({logo:optional$1(object$1({src:optional$1(string$3()),height:optional$1(string$3())})),hideFooterBranding:optional$1(boolean$2()),hideHeaderBranding:optional$1(boolean$2())})),closeButton:optional$1(object$1({show:optional$1(boolean$2()),position:optional$1(union([literal("left"),literal("right")])),offset:optional$1(union([number$3(),string$3()]))})),theming:optional$1(object$1({designTokens:optional$1(CustomPrimitivesSchema),shirtColor:optional$1(string$3())})),notifications:optional$1(object$1({minimal:optional$1(boolean$2())}))}),Container$g=dt.div`
|
|
3135
3135
|
height: ${Be=>Be.$height?`${Be.$height}px`:`${window.innerHeight}px`};
|
|
3136
3136
|
width: ${Be=>Be.$width?`${Be.$width}px`:`${window.innerWidth}px`};
|
|
3137
3137
|
min-height: 100%;
|
|
@@ -3732,7 +3732,7 @@ linearGradient:first-of-type {
|
|
|
3732
3732
|
animation: ${fadeOut} 0.3s ease-out 0.3s forwards;
|
|
3733
3733
|
`,FadeInContainer=dt(Flex)`
|
|
3734
3734
|
animation: ${fadeIn$2} 0.3s ease-out forwards;
|
|
3735
|
-
`,getCapturingText=(Be,Le,Ye)=>Be(Ye?"idv2.capture.processing.verifying":Le?"idv2.capture.processing.processing":"idv2.capture.processing.uploading"),Capture=({isAuth:Be})=>{var jt,Gt,qt,zt,e0,s0;const Le=React.useRef(null),{sessionToken:Ye,completeFlow:tt,completeWithError:nt,reset:ft,mediaRecorder:ht,deepsightVideoRecorder:gt,captureConfiguration:At,shouldShowTutorialInCapture:xt,captureOnly:Et,completeCaptureOnlyFlow:yt}=useFaceFlowState(),Ct=useTokens(),{t:kt}=useTranslation$1(),[vt,bt]=React.useState(null),[It,wt]=React.useState(!1),[Rt,Tt]=React.useState(xt?"tutorial":"loading"),Bt=React.useRef(null),{height:Dt}=useFaceCaptureAspectRatio(Bt),{uiConfig:Pt}=useFaceFlowState(),Nt=async t0=>{ht==null||ht.stopRecording(),tt(t0)},Lt=async t0=>{const l0=t0.getBase64Image();await onboardingAnalytics.analyzeFrame(l0),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const d0=onboardingAnalytics.getMetadata();await yt(t0,d0)},Wt=()=>{var l0;const t0=(l0=Le.current)==null?void 0:l0.video;setTimeout(()=>{t0==null||t0.play()},1)},{detectionState:$t,borderState:Kt,startDetection:Vt,capture:Ut,capturedImage:_t}=useFaceDetection({getCanvas:()=>{var t0;return(t0=Le.current)==null?void 0:t0.getCanvas()},onCapture:async(t0,l0)=>Et?(await Lt(t0),null):Be?await sendAuthFaceImage({canvas:t0,faceCoordinates:l0,sessionToken:Ye}):await sendFaceImage({canvas:t0,faceCoordinates:l0,sessionToken:Ye}),onFinish:t0=>{Et||Nt(t0)},onError:t0=>{bt(t0.message)}});async function Xt(){var l0;const t0=(l0=Le.current)==null?void 0:l0.getCanvas();t0&&await Ut(t0)}const Qt=async t0=>{Tt("ready"),At.isDeepsightEnabled?gt==null||gt.setStreamAndStartRecording(t0):await(ht==null?void 0:ht.startRecording(t0))};return $t==="offline"?jsxRuntimeExports.jsx(NoInternetError,{isV2:!0}):$t==="capturing"&&!At.showPreview?jsxRuntimeExports.jsx(FaceFlowPage,{bg:Ct.primitives.color.neutral.light,hideHeaderBranding:(jt=Pt==null?void 0:Pt.branding)==null?void 0:jt.hideHeaderBranding,children:jsxRuntimeExports.jsxs(FadeOutContainer,{justify:"center",align:"center",direction:"column",children:[jsxRuntimeExports.jsx(Spacer,{size:Ct.spacing[40]}),jsxRuntimeExports.jsx(Loader$2,{primaryColor:Ct.spinner.surface.primary,secondaryColor:Ct.spinner.surface.secondary,size:64}),jsxRuntimeExports.jsx(Spacer,{size:4}),jsxRuntimeExports.jsx(Title$o,{children:getCapturingText(kt,Et,At.ageAssurance)})]})}):$t==="success"?jsxRuntimeExports.jsx(FaceFlowPage,{bg:Ct.primitives.color.neutral.light,hideHeaderBranding:(Gt=Pt==null?void 0:Pt.branding)==null?void 0:Gt.hideHeaderBranding,children:jsxRuntimeExports.jsxs(FadeInContainer,{justify:"center",align:"center",direction:"column",children:[jsxRuntimeExports.jsx(Spacer,{size:Ct.spacing[40]}),jsxRuntimeExports.jsx(SuccessIcon$1,{size:64}),jsxRuntimeExports.jsx(Spacer,{size:4}),jsxRuntimeExports.jsx(Title$o,{children:kt("idv2.capture.processing.success")})]})}):jsxRuntimeExports.jsxs(FaceFlowPage,{"data-testid":"capture-container",closeButtonOnCancel:Wt,bg:Ct.primitives.color.neutral.light,hideHeaderBranding:(qt=Pt==null?void 0:Pt.branding)==null?void 0:qt.hideHeaderBranding,children:[jsxRuntimeExports.jsx(Modal$3,{open:xt&&Rt!=="ready",children:jsxRuntimeExports.jsx(Tutorial$2,{onContinue:()=>Tt("loading"),isLoading:Rt==="loading",onClose:()=>faceFlowManager.onClose()})}),jsxRuntimeExports.jsx(Spacer,{size:(zt=Pt==null?void 0:Pt.branding)!=null&&zt.hideHeaderBranding?20:12,smSize:(e0=Pt==null?void 0:Pt.branding)!=null&&e0.hideHeaderBranding?16:4,xsSize:(s0=Pt==null?void 0:Pt.branding)!=null&&s0.hideHeaderBranding?8:0}),jsxRuntimeExports.jsxs(Flex,{direction:"column",align:"center",justify:"flex-start",h:"100%",position:"relative",overflow:"hidden",flex:1,children:[jsxRuntimeExports.jsx(LoadingBorder,{color:Ct.primitives.color.positive[600],borderState:It?"capturing":Kt}),jsxRuntimeExports.jsx(Box,{w:"100%",xsW:"80%",maxW:"335px",borderRadius:"50%",aspectRatio:1,ref:Bt,style:{height:Dt?`${Dt}px`:void 0},position:"relative",border:"12px solid transparent",children:jsxRuntimeExports.jsxs(Flex,{w:"calc(100% - 24px)",h:"calc(100% - 24px)",borderRadius:"50%",overflow:"hidden",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(CaptureOverlay$1,{capturedImage:_t,detectionState:$t}),Rt==="ready"&&jsxRuntimeExports.jsx(FaceOutline,{height:"100%"}),Rt!=="tutorial"&&jsxRuntimeExports.jsx(Webcam,{ref:Le,videoSource:At.assistedOnboarding?"environment":"user",isSelfie:!0,type:"selfie",onError:t0=>nt({code:"WEBCAM_ERROR",message:typeof t0=="string"?t0:t0.message,error:typeof t0=="string"?new Error(t0):t0}),onStreamReady:Qt,token:Ye,showDoublePermissionsRequest:!1,assistedOnboarding:At.assistedOnboarding,isDeepsightEnabled:At.isDeepsightEnabled,isV2:!0,showLoading:!xt})]})}),jsxRuntimeExports.jsx(Spacer,{size:12,smSize:4}),jsxRuntimeExports.jsx(Notification,{detectionState:$t}),$t==="manualCapture"&&jsxRuntimeExports.jsx(CameraButtonComponent,{onClick:()=>Xt(),disabled:It})]}),jsxRuntimeExports.jsx(ErrorModal,{error:vt,onContinue:()=>{ft(),nt({code:"NO_MORE_ATTEMPTS",message:"No more attempts"})},onTryAgain:()=>{bt(null),Vt(),gt==null||gt.startRecording(),wt(!1)},onCloseCancel:Wt})]})},AuthFaceFlow=({onSuccess:Be,onError:Le,session:Ye,workflowConfig:tt,uiConfig:nt,parentSize:ft,authHint:ht})=>{const gt=React.useRef(!1);return React.useEffect(()=>{var xt,Et,yt,Ct;if(gt.current)return;gt.current=!0;const At=getFeatureFlag("new_id_capture_ux_least_risky_clients");faceFlowManager.initialize({sessionToken:Ye.token,captureConfig:tt,parentSize:ft,isAuth:!0,authHint:ht,uiConfig:{...nt,branding:{...nt==null?void 0:nt.branding,hideFooterBranding:((xt=nt==null?void 0:nt.branding)==null?void 0:xt.hideFooterBranding)!==void 0?(Et=nt==null?void 0:nt.branding)==null?void 0:Et.hideFooterBranding:!At,hideHeaderBranding:((yt=nt==null?void 0:nt.branding)==null?void 0:yt.hideHeaderBranding)!==void 0?(Ct=nt==null?void 0:nt.branding)==null?void 0:Ct.hideHeaderBranding:!At}}}).catch(kt=>{Le(kt)})},[Ye,Le,tt,ft,ht,nt]),jsxRuntimeExports.jsx(IncodeProvider,{token:Ye.token,uiConfig:nt,children:jsxRuntimeExports.jsx(AuthFaceFlowContent,{onSuccess:Be,onError:Le,uiConfig:nt})})},AuthFaceFlowContent=({onSuccess:Be,onError:Le,uiConfig:Ye})=>{var xt;const{currentStep:tt,flowOutcome:nt,successData:ft,errorDetails:ht,goToCapture:gt,goToPermissions:At}=useFaceFlowState();return React.useEffect(()=>{nt&&(nt==="success"&&Be(ft),nt==="error"&&Le(ht))},[nt,ft,ht,Be,Le]),tt==="tutorial"?jsxRuntimeExports.jsx(Tutorial$2,{onContinue:At,onClose:()=>faceFlowManager.onClose()}):tt==="permissions"?jsxRuntimeExports.jsx(Permissions,{onContinue:gt,emitError:Le,uiConfig:Ye,onClose:()=>faceFlowManager.onClose(),isDeepsightEnabled:(xt=faceFlowManager.getCaptureConfiguration())==null?void 0:xt.isDeepsightEnabled}):tt==="capture"?jsxRuntimeExports.jsx(Capture,{isAuth:!0}):null},AuthFaceInside=({onSuccess:Be,onError:Le,session:Ye,workflowConfig:tt,uiConfig:nt,parentSize:ft,authHint:ht})=>{const{width:gt,height:At}=ft||useViewportSize();return jsxRuntimeExports.jsx(ContentWrapper$2,{height:At,width:gt,children:jsxRuntimeExports.jsx(AuthFaceFlow,{session:Ye,onSuccess:Be,onError:Le,workflowConfig:tt,uiConfig:nt,parentSize:{width:gt,height:At},authHint:ht})})},AuthFace=Be=>{var Le;return jsxRuntimeExports.jsx(IncodeProvider,{token:(Le=Be.session)==null?void 0:Le.token,uiConfig:Be.uiConfig,children:jsxRuntimeExports.jsx(AuthFaceInside,{...Be})})},AuthFacePropsSchema=object({session:object({token:string$
|
|
3735
|
+
`,getCapturingText=(Be,Le,Ye)=>Be(Ye?"idv2.capture.processing.verifying":Le?"idv2.capture.processing.processing":"idv2.capture.processing.uploading"),Capture=({isAuth:Be})=>{var jt,Gt,qt,zt,e0,s0;const Le=React.useRef(null),{sessionToken:Ye,completeFlow:tt,completeWithError:nt,reset:ft,mediaRecorder:ht,deepsightVideoRecorder:gt,captureConfiguration:At,shouldShowTutorialInCapture:xt,captureOnly:Et,completeCaptureOnlyFlow:yt}=useFaceFlowState(),Ct=useTokens(),{t:kt}=useTranslation$1(),[vt,bt]=React.useState(null),[It,wt]=React.useState(!1),[Rt,Tt]=React.useState(xt?"tutorial":"loading"),Bt=React.useRef(null),{height:Dt}=useFaceCaptureAspectRatio(Bt),{uiConfig:Pt}=useFaceFlowState(),Nt=async t0=>{ht==null||ht.stopRecording(),tt(t0)},Lt=async t0=>{const l0=t0.getBase64Image();await onboardingAnalytics.analyzeFrame(l0),onboardingAnalytics.update(),MlWasmJSApi$1.reset();const d0=onboardingAnalytics.getMetadata();await yt(t0,d0)},Wt=()=>{var l0;const t0=(l0=Le.current)==null?void 0:l0.video;setTimeout(()=>{t0==null||t0.play()},1)},{detectionState:$t,borderState:Kt,startDetection:Vt,capture:Ut,capturedImage:_t}=useFaceDetection({getCanvas:()=>{var t0;return(t0=Le.current)==null?void 0:t0.getCanvas()},onCapture:async(t0,l0)=>Et?(await Lt(t0),null):Be?await sendAuthFaceImage({canvas:t0,faceCoordinates:l0,sessionToken:Ye}):await sendFaceImage({canvas:t0,faceCoordinates:l0,sessionToken:Ye}),onFinish:t0=>{Et||Nt(t0)},onError:t0=>{bt(t0.message)}});async function Xt(){var l0;const t0=(l0=Le.current)==null?void 0:l0.getCanvas();t0&&await Ut(t0)}const Qt=async t0=>{Tt("ready"),At.isDeepsightEnabled?gt==null||gt.setStreamAndStartRecording(t0):await(ht==null?void 0:ht.startRecording(t0))};return $t==="offline"?jsxRuntimeExports.jsx(NoInternetError,{isV2:!0}):$t==="capturing"&&!At.showPreview?jsxRuntimeExports.jsx(FaceFlowPage,{bg:Ct.primitives.color.neutral.light,hideHeaderBranding:(jt=Pt==null?void 0:Pt.branding)==null?void 0:jt.hideHeaderBranding,children:jsxRuntimeExports.jsxs(FadeOutContainer,{justify:"center",align:"center",direction:"column",children:[jsxRuntimeExports.jsx(Spacer,{size:Ct.spacing[40]}),jsxRuntimeExports.jsx(Loader$2,{primaryColor:Ct.spinner.surface.primary,secondaryColor:Ct.spinner.surface.secondary,size:64}),jsxRuntimeExports.jsx(Spacer,{size:4}),jsxRuntimeExports.jsx(Title$o,{children:getCapturingText(kt,Et,At.ageAssurance)})]})}):$t==="success"?jsxRuntimeExports.jsx(FaceFlowPage,{bg:Ct.primitives.color.neutral.light,hideHeaderBranding:(Gt=Pt==null?void 0:Pt.branding)==null?void 0:Gt.hideHeaderBranding,children:jsxRuntimeExports.jsxs(FadeInContainer,{justify:"center",align:"center",direction:"column",children:[jsxRuntimeExports.jsx(Spacer,{size:Ct.spacing[40]}),jsxRuntimeExports.jsx(SuccessIcon$1,{size:64}),jsxRuntimeExports.jsx(Spacer,{size:4}),jsxRuntimeExports.jsx(Title$o,{children:kt("idv2.capture.processing.success")})]})}):jsxRuntimeExports.jsxs(FaceFlowPage,{"data-testid":"capture-container",closeButtonOnCancel:Wt,bg:Ct.primitives.color.neutral.light,hideHeaderBranding:(qt=Pt==null?void 0:Pt.branding)==null?void 0:qt.hideHeaderBranding,children:[jsxRuntimeExports.jsx(Modal$3,{open:xt&&Rt!=="ready",children:jsxRuntimeExports.jsx(Tutorial$2,{onContinue:()=>Tt("loading"),isLoading:Rt==="loading",onClose:()=>faceFlowManager.onClose()})}),jsxRuntimeExports.jsx(Spacer,{size:(zt=Pt==null?void 0:Pt.branding)!=null&&zt.hideHeaderBranding?20:12,smSize:(e0=Pt==null?void 0:Pt.branding)!=null&&e0.hideHeaderBranding?16:4,xsSize:(s0=Pt==null?void 0:Pt.branding)!=null&&s0.hideHeaderBranding?8:0}),jsxRuntimeExports.jsxs(Flex,{direction:"column",align:"center",justify:"flex-start",h:"100%",position:"relative",overflow:"hidden",flex:1,children:[jsxRuntimeExports.jsx(LoadingBorder,{color:Ct.primitives.color.positive[600],borderState:It?"capturing":Kt}),jsxRuntimeExports.jsx(Box,{w:"100%",xsW:"80%",maxW:"335px",borderRadius:"50%",aspectRatio:1,ref:Bt,style:{height:Dt?`${Dt}px`:void 0},position:"relative",border:"12px solid transparent",children:jsxRuntimeExports.jsxs(Flex,{w:"calc(100% - 24px)",h:"calc(100% - 24px)",borderRadius:"50%",overflow:"hidden",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",justify:"center",align:"center",children:[jsxRuntimeExports.jsx(CaptureOverlay$1,{capturedImage:_t,detectionState:$t}),Rt==="ready"&&jsxRuntimeExports.jsx(FaceOutline,{height:"100%"}),Rt!=="tutorial"&&jsxRuntimeExports.jsx(Webcam,{ref:Le,videoSource:At.assistedOnboarding?"environment":"user",isSelfie:!0,type:"selfie",onError:t0=>nt({code:"WEBCAM_ERROR",message:typeof t0=="string"?t0:t0.message,error:typeof t0=="string"?new Error(t0):t0}),onStreamReady:Qt,token:Ye,showDoublePermissionsRequest:!1,assistedOnboarding:At.assistedOnboarding,isDeepsightEnabled:At.isDeepsightEnabled,isV2:!0,showLoading:!xt})]})}),jsxRuntimeExports.jsx(Spacer,{size:12,smSize:4}),jsxRuntimeExports.jsx(Notification,{detectionState:$t}),$t==="manualCapture"&&jsxRuntimeExports.jsx(CameraButtonComponent,{onClick:()=>Xt(),disabled:It})]}),jsxRuntimeExports.jsx(ErrorModal,{error:vt,onContinue:()=>{ft(),nt({code:"NO_MORE_ATTEMPTS",message:"No more attempts"})},onTryAgain:()=>{bt(null),Vt(),gt==null||gt.startRecording(),wt(!1)},onCloseCancel:Wt})]})},AuthFaceFlow=({onSuccess:Be,onError:Le,session:Ye,workflowConfig:tt,uiConfig:nt,parentSize:ft,authHint:ht})=>{const gt=React.useRef(!1);return React.useEffect(()=>{var xt,Et,yt,Ct;if(gt.current)return;gt.current=!0;const At=getFeatureFlag("new_id_capture_ux_least_risky_clients");faceFlowManager.initialize({sessionToken:Ye.token,captureConfig:tt,parentSize:ft,isAuth:!0,authHint:ht,uiConfig:{...nt,branding:{...nt==null?void 0:nt.branding,hideFooterBranding:((xt=nt==null?void 0:nt.branding)==null?void 0:xt.hideFooterBranding)!==void 0?(Et=nt==null?void 0:nt.branding)==null?void 0:Et.hideFooterBranding:!At,hideHeaderBranding:((yt=nt==null?void 0:nt.branding)==null?void 0:yt.hideHeaderBranding)!==void 0?(Ct=nt==null?void 0:nt.branding)==null?void 0:Ct.hideHeaderBranding:!At}}}).catch(kt=>{Le(kt)})},[Ye,Le,tt,ft,ht,nt]),jsxRuntimeExports.jsx(IncodeProvider,{token:Ye.token,uiConfig:nt,children:jsxRuntimeExports.jsx(AuthFaceFlowContent,{onSuccess:Be,onError:Le,uiConfig:nt})})},AuthFaceFlowContent=({onSuccess:Be,onError:Le,uiConfig:Ye})=>{var xt;const{currentStep:tt,flowOutcome:nt,successData:ft,errorDetails:ht,goToCapture:gt,goToPermissions:At}=useFaceFlowState();return React.useEffect(()=>{nt&&(nt==="success"&&Be(ft),nt==="error"&&Le(ht))},[nt,ft,ht,Be,Le]),tt==="tutorial"?jsxRuntimeExports.jsx(Tutorial$2,{onContinue:At,onClose:()=>faceFlowManager.onClose()}):tt==="permissions"?jsxRuntimeExports.jsx(Permissions,{onContinue:gt,emitError:Le,uiConfig:Ye,onClose:()=>faceFlowManager.onClose(),isDeepsightEnabled:(xt=faceFlowManager.getCaptureConfiguration())==null?void 0:xt.isDeepsightEnabled}):tt==="capture"?jsxRuntimeExports.jsx(Capture,{isAuth:!0}):null},AuthFaceInside=({onSuccess:Be,onError:Le,session:Ye,workflowConfig:tt,uiConfig:nt,parentSize:ft,authHint:ht})=>{const{width:gt,height:At}=ft||useViewportSize();return jsxRuntimeExports.jsx(ContentWrapper$2,{height:At,width:gt,children:jsxRuntimeExports.jsx(AuthFaceFlow,{session:Ye,onSuccess:Be,onError:Le,workflowConfig:tt,uiConfig:nt,parentSize:{width:gt,height:At},authHint:ht})})},AuthFace=Be=>{var Le;return jsxRuntimeExports.jsx(IncodeProvider,{token:(Le=Be.session)==null?void 0:Le.token,uiConfig:Be.uiConfig,children:jsxRuntimeExports.jsx(AuthFaceInside,{...Be})})},AuthFacePropsSchema=object$1({session:object$1({token:string$3()}),authHint:optional$1(union([string$3(),null_()])),onSuccess:optional$1(function_()),onError:optional$1(function_()),uiConfig:optional$1(UiConfigSchema),forceV2:optional$1(boolean$2()),parentSize:optional$1(object$1({width:number$3(),height:number$3()}))}),HTMLElementSchema=custom(Be=>Be instanceof HTMLElement,"Expected HTMLElement");function renderAuthFace(Be,Le){var tt;validate$2({schema:HTMLElementSchema,value:Be},{schema:AuthFacePropsSchema,value:Le});const Ye=createRoot(Be);return customRender(jsxRuntimeExports.jsx(App$1,{token:(tt=Le.session)==null?void 0:tt.token,children:jsxRuntimeExports.jsx(AuthFace,{onSuccess:handleUnmountRoot(Le.onSuccess,Ye,Be),onError:handleUnmountRoot(Le.onError,Ye,Be),session:Le.session,uiConfig:Le.uiConfig,parentSize:Le.parentSize,authHint:Le.authHint})}),Be,Ye),{close:handleUnmountRoot(emptyFunc,Ye,Be)}}const FaceFlow$1=({onSuccess:Be,onError:Le,session:Ye,captureConfig:tt,uiConfig:nt,parentSize:ft,captureOnly:ht,onCapture:gt})=>{const At=React.useRef(!1);return React.useEffect(()=>{At.current||(At.current=!0,faceFlowManager.initialize({sessionToken:Ye==null?void 0:Ye.token,captureConfig:tt,parentSize:ft,uiConfig:nt,captureOnly:ht,onCapture:gt}).catch(xt=>{Le(xt)}))},[Ye,Le,nt,ft,tt,ht,gt]),jsxRuntimeExports.jsx(IncodeProvider,{token:Ye==null?void 0:Ye.token,uiConfig:nt,children:jsxRuntimeExports.jsx(FaceFlowContent$1,{onSuccess:Be,onError:Le,uiConfig:nt})})},FaceFlowContent$1=({onSuccess:Be,onError:Le,uiConfig:Ye})=>{var Et;const{currentStep:tt,flowOutcome:nt,successData:ft,errorDetails:ht,goToCapture:gt,goToPermissions:At,completeWithError:xt}=useFaceFlowState();return React.useEffect(()=>{nt&&(nt==="success"&&Be(ft),nt==="error"&&Le(ht))},[nt,ft,ht,Be,Le]),tt==="tutorial"?jsxRuntimeExports.jsx(Tutorial$2,{onContinue:At,onClose:()=>faceFlowManager.onClose()}):tt==="permissions"?jsxRuntimeExports.jsx(Permissions,{onContinue:gt,emitError:yt=>{xt({code:yt,message:"Error in permissions",error:new Error(yt)})},uiConfig:Ye,onClose:()=>faceFlowManager.onClose(),isDeepsightEnabled:(Et=faceFlowManager.getCaptureConfiguration())==null?void 0:Et.isDeepsightEnabled}):tt==="capture"?jsxRuntimeExports.jsx(Capture,{}):null},StyledButton$c=dt(Button$c)`
|
|
3736
3736
|
height: 58px;
|
|
3737
3737
|
text-transform: uppercase;
|
|
3738
3738
|
&.button-hidden {
|
|
@@ -6208,7 +6208,7 @@ path {
|
|
|
6208
6208
|
`});++tt<Be.length;)tt&&Ye.push({type:"text",value:`
|
|
6209
6209
|
`}),Ye.push(Be[tt]);return Le&&Be.length>0&&Ye.push({type:"text",value:`
|
|
6210
6210
|
`}),Ye}function trimMarkdownSpaceStart(Be){let Le=0,Ye=Be.charCodeAt(Le);for(;Ye===9||Ye===32;)Le++,Ye=Be.charCodeAt(Le);return Be.slice(Le)}function toHast(Be,Le){const Ye=createState(Be,Le),tt=Ye.one(Be,void 0),nt=footer(Ye),ft=Array.isArray(tt)?{type:"root",children:tt}:tt||{type:"root",children:[]};return nt&&ft.children.push({type:"text",value:`
|
|
6211
|
-
`},nt),ft}function remarkRehype(Be,Le){return Be&&"run"in Be?async function(Ye,tt){const nt=toHast(Ye,{file:tt,...Le});await Be.run(nt,tt)}:function(Ye,tt){return toHast(Ye,{file:tt,...Be||Le})}}function bail(Be){if(Be)throw Be}var hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(Le){return typeof Array.isArray=="function"?Array.isArray(Le):toStr.call(Le)==="[object Array]"},isPlainObject$2=function(Le){if(!Le||toStr.call(Le)!=="[object Object]")return!1;var Ye=hasOwn.call(Le,"constructor"),tt=Le.constructor&&Le.constructor.prototype&&hasOwn.call(Le.constructor.prototype,"isPrototypeOf");if(Le.constructor&&!Ye&&!tt)return!1;var nt;for(nt in Le);return typeof nt>"u"||hasOwn.call(Le,nt)},setProperty=function(Le,Ye){defineProperty&&Ye.name==="__proto__"?defineProperty(Le,Ye.name,{enumerable:!0,configurable:!0,value:Ye.newValue,writable:!0}):Le[Ye.name]=Ye.newValue},getProperty=function(Le,Ye){if(Ye==="__proto__")if(hasOwn.call(Le,Ye)){if(gOPD)return gOPD(Le,Ye).value}else return;return Le[Ye]},extend=function Be(){var Le,Ye,tt,nt,ft,ht,gt=arguments[0],At=1,xt=arguments.length,Et=!1;for(typeof gt=="boolean"&&(Et=gt,gt=arguments[1]||{},At=2),(gt==null||typeof gt!="object"&&typeof gt!="function")&&(gt={});At<xt;++At)if(Le=arguments[At],Le!=null)for(Ye in Le)tt=getProperty(gt,Ye),nt=getProperty(Le,Ye),gt!==nt&&(Et&&nt&&(isPlainObject$2(nt)||(ft=isArray(nt)))?(ft?(ft=!1,ht=tt&&isArray(tt)?tt:[]):ht=tt&&isPlainObject$2(tt)?tt:{},setProperty(gt,{name:Ye,newValue:Be(Et,ht,nt)})):typeof nt<"u"&&setProperty(gt,{name:Ye,newValue:nt}));return gt};const extend$1=getDefaultExportFromCjs(extend);function isPlainObject$1(Be){if(typeof Be!="object"||Be===null)return!1;const Le=Object.getPrototypeOf(Be);return(Le===null||Le===Object.prototype||Object.getPrototypeOf(Le)===null)&&!(Symbol.toStringTag in Be)&&!(Symbol.iterator in Be)}function trough(){const Be=[],Le={run:Ye,use:tt};return Le;function Ye(...nt){let ft=-1;const ht=nt.pop();if(typeof ht!="function")throw new TypeError("Expected function as last argument, not "+ht);gt(null,...nt);function gt(At,...xt){const Et=Be[++ft];let yt=-1;if(At){ht(At);return}for(;++yt<nt.length;)(xt[yt]===null||xt[yt]===void 0)&&(xt[yt]=nt[yt]);nt=xt,Et?wrap$1(Et,gt)(...xt):ht(null,...xt)}}function tt(nt){if(typeof nt!="function")throw new TypeError("Expected `middelware` to be a function, not "+nt);return Be.push(nt),Le}}function wrap$1(Be,Le){let Ye;return tt;function tt(...ht){const gt=Be.length>ht.length;let At;gt&&ht.push(nt);try{At=Be.apply(this,ht)}catch(xt){const Et=xt;if(gt&&Ye)throw Et;return nt(Et)}gt||(At&&At.then&&typeof At.then=="function"?At.then(ft,nt):At instanceof Error?nt(At):ft(At))}function nt(ht,...gt){Ye||(Ye=!0,Le(ht,...gt))}function ft(ht){nt(null,ht)}}const minpath={basename,dirname,extname,join,sep:"/"};function basename(Be,Le){if(Le!==void 0&&typeof Le!="string")throw new TypeError('"ext" argument must be a string');assertPath$1(Be);let Ye=0,tt=-1,nt=Be.length,ft;if(Le===void 0||Le.length===0||Le.length>Be.length){for(;nt--;)if(Be.codePointAt(nt)===47){if(ft){Ye=nt+1;break}}else tt<0&&(ft=!0,tt=nt+1);return tt<0?"":Be.slice(Ye,tt)}if(Le===Be)return"";let ht=-1,gt=Le.length-1;for(;nt--;)if(Be.codePointAt(nt)===47){if(ft){Ye=nt+1;break}}else ht<0&&(ft=!0,ht=nt+1),gt>-1&&(Be.codePointAt(nt)===Le.codePointAt(gt--)?gt<0&&(tt=nt):(gt=-1,tt=ht));return Ye===tt?tt=ht:tt<0&&(tt=Be.length),Be.slice(Ye,tt)}function dirname(Be){if(assertPath$1(Be),Be.length===0)return".";let Le=-1,Ye=Be.length,tt;for(;--Ye;)if(Be.codePointAt(Ye)===47){if(tt){Le=Ye;break}}else tt||(tt=!0);return Le<0?Be.codePointAt(0)===47?"/":".":Le===1&&Be.codePointAt(0)===47?"//":Be.slice(0,Le)}function extname(Be){assertPath$1(Be);let Le=Be.length,Ye=-1,tt=0,nt=-1,ft=0,ht;for(;Le--;){const gt=Be.codePointAt(Le);if(gt===47){if(ht){tt=Le+1;break}continue}Ye<0&&(ht=!0,Ye=Le+1),gt===46?nt<0?nt=Le:ft!==1&&(ft=1):nt>-1&&(ft=-1)}return nt<0||Ye<0||ft===0||ft===1&&nt===Ye-1&&nt===tt+1?"":Be.slice(nt,Ye)}function join(...Be){let Le=-1,Ye;for(;++Le<Be.length;)assertPath$1(Be[Le]),Be[Le]&&(Ye=Ye===void 0?Be[Le]:Ye+"/"+Be[Le]);return Ye===void 0?".":normalize$2(Ye)}function normalize$2(Be){assertPath$1(Be);const Le=Be.codePointAt(0)===47;let Ye=normalizeString(Be,!Le);return Ye.length===0&&!Le&&(Ye="."),Ye.length>0&&Be.codePointAt(Be.length-1)===47&&(Ye+="/"),Le?"/"+Ye:Ye}function normalizeString(Be,Le){let Ye="",tt=0,nt=-1,ft=0,ht=-1,gt,At;for(;++ht<=Be.length;){if(ht<Be.length)gt=Be.codePointAt(ht);else{if(gt===47)break;gt=47}if(gt===47){if(!(nt===ht-1||ft===1))if(nt!==ht-1&&ft===2){if(Ye.length<2||tt!==2||Ye.codePointAt(Ye.length-1)!==46||Ye.codePointAt(Ye.length-2)!==46){if(Ye.length>2){if(At=Ye.lastIndexOf("/"),At!==Ye.length-1){At<0?(Ye="",tt=0):(Ye=Ye.slice(0,At),tt=Ye.length-1-Ye.lastIndexOf("/")),nt=ht,ft=0;continue}}else if(Ye.length>0){Ye="",tt=0,nt=ht,ft=0;continue}}Le&&(Ye=Ye.length>0?Ye+"/..":"..",tt=2)}else Ye.length>0?Ye+="/"+Be.slice(nt+1,ht):Ye=Be.slice(nt+1,ht),tt=ht-nt-1;nt=ht,ft=0}else gt===46&&ft>-1?ft++:ft=-1}return Ye}function assertPath$1(Be){if(typeof Be!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Be))}const minproc={cwd};function cwd(){return"/"}function isUrl(Be){return!!(Be!==null&&typeof Be=="object"&&"href"in Be&&Be.href&&"protocol"in Be&&Be.protocol&&Be.auth===void 0)}function urlToPath(Be){if(typeof Be=="string")Be=new URL(Be);else if(!isUrl(Be)){const Le=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+Be+"`");throw Le.code="ERR_INVALID_ARG_TYPE",Le}if(Be.protocol!=="file:"){const Le=new TypeError("The URL must be of scheme file");throw Le.code="ERR_INVALID_URL_SCHEME",Le}return getPathFromURLPosix(Be)}function getPathFromURLPosix(Be){if(Be.hostname!==""){const tt=new TypeError('File URL host must be "localhost" or empty on darwin');throw tt.code="ERR_INVALID_FILE_URL_HOST",tt}const Le=Be.pathname;let Ye=-1;for(;++Ye<Le.length;)if(Le.codePointAt(Ye)===37&&Le.codePointAt(Ye+1)===50){const tt=Le.codePointAt(Ye+2);if(tt===70||tt===102){const nt=new TypeError("File URL path must not include encoded / characters");throw nt.code="ERR_INVALID_FILE_URL_PATH",nt}}return decodeURIComponent(Le)}const order=["history","path","basename","stem","extname","dirname"];class VFile{constructor(Le){let Ye;Le?isUrl(Le)?Ye={path:Le}:typeof Le=="string"||isUint8Array$1(Le)?Ye={value:Le}:Ye=Le:Ye={},this.cwd="cwd"in Ye?"":minproc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let tt=-1;for(;++tt<order.length;){const ft=order[tt];ft in Ye&&Ye[ft]!==void 0&&Ye[ft]!==null&&(this[ft]=ft==="history"?[...Ye[ft]]:Ye[ft])}let nt;for(nt in Ye)order.includes(nt)||(this[nt]=Ye[nt])}get basename(){return typeof this.path=="string"?minpath.basename(this.path):void 0}set basename(Le){assertNonEmpty(Le,"basename"),assertPart(Le,"basename"),this.path=minpath.join(this.dirname||"",Le)}get dirname(){return typeof this.path=="string"?minpath.dirname(this.path):void 0}set dirname(Le){assertPath(this.basename,"dirname"),this.path=minpath.join(Le||"",this.basename)}get extname(){return typeof this.path=="string"?minpath.extname(this.path):void 0}set extname(Le){if(assertPart(Le,"extname"),assertPath(this.dirname,"extname"),Le){if(Le.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(Le.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=minpath.join(this.dirname,this.stem+(Le||""))}get path(){return this.history[this.history.length-1]}set path(Le){isUrl(Le)&&(Le=urlToPath(Le)),assertNonEmpty(Le,"path"),this.path!==Le&&this.history.push(Le)}get stem(){return typeof this.path=="string"?minpath.basename(this.path,this.extname):void 0}set stem(Le){assertNonEmpty(Le,"stem"),assertPart(Le,"stem"),this.path=minpath.join(this.dirname||"",Le+(this.extname||""))}fail(Le,Ye,tt){const nt=this.message(Le,Ye,tt);throw nt.fatal=!0,nt}info(Le,Ye,tt){const nt=this.message(Le,Ye,tt);return nt.fatal=void 0,nt}message(Le,Ye,tt){const nt=new VFileMessage(Le,Ye,tt);return this.path&&(nt.name=this.path+":"+nt.name,nt.file=this.path),nt.fatal=!1,this.messages.push(nt),nt}toString(Le){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(Le||void 0).decode(this.value)}}function assertPart(Be,Le){if(Be&&Be.includes(minpath.sep))throw new Error("`"+Le+"` cannot be a path: did not expect `"+minpath.sep+"`")}function assertNonEmpty(Be,Le){if(!Be)throw new Error("`"+Le+"` cannot be empty")}function assertPath(Be,Le){if(!Be)throw new Error("Setting `"+Le+"` requires `path` to be set too")}function isUint8Array$1(Be){return!!(Be&&typeof Be=="object"&&"byteLength"in Be&&"byteOffset"in Be)}const CallableInstance=function(Be){const tt=this.constructor.prototype,nt=tt[Be],ft=function(){return nt.apply(ft,arguments)};return Object.setPrototypeOf(ft,tt),ft},own$4={}.hasOwnProperty;class Processor extends CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){const Le=new Processor;let Ye=-1;for(;++Ye<this.attachers.length;){const tt=this.attachers[Ye];Le.use(...tt)}return Le.data(extend$1(!0,{},this.namespace)),Le}data(Le,Ye){return typeof Le=="string"?arguments.length===2?(assertUnfrozen("data",this.frozen),this.namespace[Le]=Ye,this):own$4.call(this.namespace,Le)&&this.namespace[Le]||void 0:Le?(assertUnfrozen("data",this.frozen),this.namespace=Le,this):this.namespace}freeze(){if(this.frozen)return this;const Le=this;for(;++this.freezeIndex<this.attachers.length;){const[Ye,...tt]=this.attachers[this.freezeIndex];if(tt[0]===!1)continue;tt[0]===!0&&(tt[0]=void 0);const nt=Ye.call(Le,...tt);typeof nt=="function"&&this.transformers.use(nt)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(Le){this.freeze();const Ye=vfile(Le),tt=this.parser||this.Parser;return assertParser("parse",tt),tt(String(Ye),Ye)}process(Le,Ye){const tt=this;return this.freeze(),assertParser("process",this.parser||this.Parser),assertCompiler("process",this.compiler||this.Compiler),Ye?nt(void 0,Ye):new Promise(nt);function nt(ft,ht){const gt=vfile(Le),At=tt.parse(gt);tt.run(At,gt,function(Et,yt,Ct){if(Et||!yt||!Ct)return xt(Et);const kt=yt,vt=tt.stringify(kt,Ct);looksLikeAValue(vt)?Ct.value=vt:Ct.result=vt,xt(Et,Ct)});function xt(Et,yt){Et||!yt?ht(Et):ft?ft(yt):Ye(void 0,yt)}}}processSync(Le){let Ye=!1,tt;return this.freeze(),assertParser("processSync",this.parser||this.Parser),assertCompiler("processSync",this.compiler||this.Compiler),this.process(Le,nt),assertDone("processSync","process",Ye),tt;function nt(ft,ht){Ye=!0,bail(ft),tt=ht}}run(Le,Ye,tt){assertNode(Le),this.freeze();const nt=this.transformers;return!tt&&typeof Ye=="function"&&(tt=Ye,Ye=void 0),tt?ft(void 0,tt):new Promise(ft);function ft(ht,gt){const At=vfile(Ye);nt.run(Le,At,xt);function xt(Et,yt,Ct){const kt=yt||Le;Et?gt(Et):ht?ht(kt):tt(void 0,kt,Ct)}}}runSync(Le,Ye){let tt=!1,nt;return this.run(Le,Ye,ft),assertDone("runSync","run",tt),nt;function ft(ht,gt){bail(ht),nt=gt,tt=!0}}stringify(Le,Ye){this.freeze();const tt=vfile(Ye),nt=this.compiler||this.Compiler;return assertCompiler("stringify",nt),assertNode(Le),nt(Le,tt)}use(Le,...Ye){const tt=this.attachers,nt=this.namespace;if(assertUnfrozen("use",this.frozen),Le!=null)if(typeof Le=="function")At(Le,Ye);else if(typeof Le=="object")Array.isArray(Le)?gt(Le):ht(Le);else throw new TypeError("Expected usable value, not `"+Le+"`");return this;function ft(xt){if(typeof xt=="function")At(xt,[]);else if(typeof xt=="object")if(Array.isArray(xt)){const[Et,...yt]=xt;At(Et,yt)}else ht(xt);else throw new TypeError("Expected usable value, not `"+xt+"`")}function ht(xt){if(!("plugins"in xt)&&!("settings"in xt))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");gt(xt.plugins),xt.settings&&(nt.settings=extend$1(!0,nt.settings,xt.settings))}function gt(xt){let Et=-1;if(xt!=null)if(Array.isArray(xt))for(;++Et<xt.length;){const yt=xt[Et];ft(yt)}else throw new TypeError("Expected a list of plugins, not `"+xt+"`")}function At(xt,Et){let yt=-1,Ct=-1;for(;++yt<tt.length;)if(tt[yt][0]===xt){Ct=yt;break}if(Ct===-1)tt.push([xt,...Et]);else if(Et.length>0){let[kt,...vt]=Et;const bt=tt[Ct][1];isPlainObject$1(bt)&&isPlainObject$1(kt)&&(kt=extend$1(!0,bt,kt)),tt[Ct]=[xt,kt,...vt]}}}}const unified=new Processor().freeze();function assertParser(Be,Le){if(typeof Le!="function")throw new TypeError("Cannot `"+Be+"` without `parser`")}function assertCompiler(Be,Le){if(typeof Le!="function")throw new TypeError("Cannot `"+Be+"` without `compiler`")}function assertUnfrozen(Be,Le){if(Le)throw new Error("Cannot call `"+Be+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(Be){if(!isPlainObject$1(Be)||typeof Be.type!="string")throw new TypeError("Expected node, got `"+Be+"`")}function assertDone(Be,Le,Ye){if(!Ye)throw new Error("`"+Be+"` finished async. Use `"+Le+"` instead")}function vfile(Be){return looksLikeAVFile(Be)?Be:new VFile(Be)}function looksLikeAVFile(Be){return!!(Be&&typeof Be=="object"&&"message"in Be&&"messages"in Be)}function looksLikeAValue(Be){return typeof Be=="string"||isUint8Array(Be)}function isUint8Array(Be){return!!(Be&&typeof Be=="object"&&"byteLength"in Be&&"byteOffset"in Be)}const changelog="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",emptyPlugins=[],emptyRemarkRehypeOptions={allowDangerousHtml:!0},safeProtocol=/^(https?|ircs?|mailto|xmpp)$/i,deprecations=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Markdown$1(Be){const Le=createProcessor(Be),Ye=createFile(Be);return post(Le.runSync(Le.parse(Ye),Ye),Be)}function createProcessor(Be){const Le=Be.rehypePlugins||emptyPlugins,Ye=Be.remarkPlugins||emptyPlugins,tt=Be.remarkRehypeOptions?{...Be.remarkRehypeOptions,...emptyRemarkRehypeOptions}:emptyRemarkRehypeOptions;return unified().use(remarkParse).use(Ye).use(remarkRehype,tt).use(Le)}function createFile(Be){const Le=Be.children||"",Ye=new VFile;return typeof Le=="string"&&(Ye.value=Le),Ye}function post(Be,Le){const Ye=Le.allowedElements,tt=Le.allowElement,nt=Le.components,ft=Le.disallowedElements,ht=Le.skipHtml,gt=Le.unwrapDisallowed,At=Le.urlTransform||defaultUrlTransform;for(const Et of deprecations)Object.hasOwn(Le,Et.from)&&(""+Et.from+(Et.to?"use `"+Et.to+"` instead":"remove it")+changelog+Et.id,void 0);return Le.className&&(Be={type:"element",tagName:"div",properties:{className:Le.className},children:Be.type==="root"?Be.children:[Be]}),visit$1(Be,xt),toJsxRuntime(Be,{Fragment:jsxRuntimeExports.Fragment,components:nt,ignoreInvalidStyle:!0,jsx:jsxRuntimeExports.jsx,jsxs:jsxRuntimeExports.jsxs,passKeys:!0,passNode:!0});function xt(Et,yt,Ct){if(Et.type==="raw"&&Ct&&typeof yt=="number")return ht?Ct.children.splice(yt,1):Ct.children[yt]={type:"text",value:Et.value},yt;if(Et.type==="element"){let kt;for(kt in urlAttributes)if(Object.hasOwn(urlAttributes,kt)&&Object.hasOwn(Et.properties,kt)){const vt=Et.properties[kt],bt=urlAttributes[kt];(bt===null||bt.includes(Et.tagName))&&(Et.properties[kt]=At(String(vt||""),kt,Et))}}if(Et.type==="element"){let kt=Ye?!Ye.includes(Et.tagName):ft?ft.includes(Et.tagName):!1;if(!kt&&tt&&typeof yt=="number"&&(kt=!tt(Et,yt,Ct)),kt&&Ct&&typeof yt=="number")return gt&&Et.children?Ct.children.splice(yt,1,...Et.children):Ct.children.splice(yt,1),yt}}}function defaultUrlTransform(Be){const Le=Be.indexOf(":"),Ye=Be.indexOf("?"),tt=Be.indexOf("#"),nt=Be.indexOf("/");return Le===-1||nt!==-1&&Le>nt||Ye!==-1&&Le>Ye||tt!==-1&&Le>tt||safeProtocol.test(Be.slice(0,Le))?Be:""}const search=/[#.]/g;function parseSelector(Be,Le){const Ye=Be||"",tt={};let nt=0,ft,ht;for(;nt<Ye.length;){search.lastIndex=nt;const gt=search.exec(Ye),At=Ye.slice(nt,gt?gt.index:Ye.length);At&&(ft?ft==="#"?tt.id=At:Array.isArray(tt.className)?tt.className.push(At):tt.className=[At]:ht=At,nt+=At.length),gt&&(ft=gt[0],nt++)}return{type:"element",tagName:ht||Le||"div",properties:tt,children:[]}}function createH(Be,Le,Ye){const tt=Ye?createAdjustMap(Ye):void 0;function nt(ft,ht,...gt){let At;if(ft==null){At={type:"root",children:[]};const xt=ht;gt.unshift(xt)}else{At=parseSelector(ft,Le);const xt=At.tagName.toLowerCase(),Et=tt?tt.get(xt):void 0;if(At.tagName=Et||xt,isChild(ht))gt.unshift(ht);else for(const[yt,Ct]of Object.entries(ht))addProperty(Be,At.properties,yt,Ct)}for(const xt of gt)addChild(At.children,xt);return At.type==="element"&&At.tagName==="template"&&(At.content={type:"root",children:At.children},At.children=[]),At}return nt}function isChild(Be){if(Be===null||typeof Be!="object"||Array.isArray(Be))return!0;if(typeof Be.type!="string")return!1;const Le=Be,Ye=Object.keys(Be);for(const tt of Ye){const nt=Le[tt];if(nt&&typeof nt=="object"){if(!Array.isArray(nt))return!0;const ft=nt;for(const ht of ft)if(typeof ht!="number"&&typeof ht!="string")return!0}}return!!("children"in Be&&Array.isArray(Be.children))}function addProperty(Be,Le,Ye,tt){const nt=find$1(Be,Ye);let ft;if(tt!=null){if(typeof tt=="number"){if(Number.isNaN(tt))return;ft=tt}else typeof tt=="boolean"?ft=tt:typeof tt=="string"?nt.spaceSeparated?ft=parse$1(tt):nt.commaSeparated?ft=parse$2(tt):nt.commaOrSpaceSeparated?ft=parse$1(parse$2(tt).join(" ")):ft=parsePrimitive(nt,nt.property,tt):Array.isArray(tt)?ft=[...tt]:ft=nt.property==="style"?style(tt):String(tt);if(Array.isArray(ft)){const ht=[];for(const gt of ft)ht.push(parsePrimitive(nt,nt.property,gt));ft=ht}nt.property==="className"&&Array.isArray(Le.className)&&(ft=Le.className.concat(ft)),Le[nt.property]=ft}}function addChild(Be,Le){if(Le!=null)if(typeof Le=="number"||typeof Le=="string")Be.push({type:"text",value:String(Le)});else if(Array.isArray(Le))for(const Ye of Le)addChild(Be,Ye);else if(typeof Le=="object"&&"type"in Le)Le.type==="root"?addChild(Be,Le.children):Be.push(Le);else throw new Error("Expected node, nodes, or string, got `"+Le+"`")}function parsePrimitive(Be,Le,Ye){if(typeof Ye=="string"){if(Be.number&&Ye&&!Number.isNaN(Number(Ye)))return Number(Ye);if((Be.boolean||Be.overloadedBoolean)&&(Ye===""||normalize$3(Ye)===normalize$3(Le)))return!0}return Ye}function style(Be){const Le=[];for(const[Ye,tt]of Object.entries(Be))Le.push([Ye,tt].join(": "));return Le.join("; ")}function createAdjustMap(Be){const Le=new Map;for(const Ye of Be)Le.set(Ye.toLowerCase(),Ye);return Le}const svgCaseSensitiveTagNames=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],h$2=createH(html$3,"div"),s=createH(svg$2,"g",svgCaseSensitiveTagNames);function location$1(Be){const Le=String(Be),Ye=[];return{toOffset:nt,toPoint:tt};function tt(ft){if(typeof ft=="number"&&ft>-1&&ft<=Le.length){let ht=0;for(;;){let gt=Ye[ht];if(gt===void 0){const At=next(Le,Ye[ht-1]);gt=At===-1?Le.length+1:At+1,Ye[ht]=gt}if(gt>ft)return{line:ht+1,column:ft-(ht>0?Ye[ht-1]:0)+1,offset:ft};ht++}}}function nt(ft){if(ft&&typeof ft.line=="number"&&typeof ft.column=="number"&&!Number.isNaN(ft.line)&&!Number.isNaN(ft.column)){for(;Ye.length<ft.line;){const gt=Ye[Ye.length-1],At=next(Le,gt),xt=At===-1?Le.length+1:At+1;if(gt===xt)break;Ye.push(xt)}const ht=(ft.line>1?Ye[ft.line-2]:0)+ft.column-1;if(ht<Ye[ft.line-1])return ht}}}function next(Be,Le){const Ye=Be.indexOf("\r",Le),tt=Be.indexOf(`
|
|
6211
|
+
`},nt),ft}function remarkRehype(Be,Le){return Be&&"run"in Be?async function(Ye,tt){const nt=toHast(Ye,{file:tt,...Le});await Be.run(nt,tt)}:function(Ye,tt){return toHast(Ye,{file:tt,...Be||Le})}}function bail(Be){if(Be)throw Be}var hasOwn=Object.prototype.hasOwnProperty,toStr=Object.prototype.toString,defineProperty=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(Le){return typeof Array.isArray=="function"?Array.isArray(Le):toStr.call(Le)==="[object Array]"},isPlainObject$2=function(Le){if(!Le||toStr.call(Le)!=="[object Object]")return!1;var Ye=hasOwn.call(Le,"constructor"),tt=Le.constructor&&Le.constructor.prototype&&hasOwn.call(Le.constructor.prototype,"isPrototypeOf");if(Le.constructor&&!Ye&&!tt)return!1;var nt;for(nt in Le);return typeof nt>"u"||hasOwn.call(Le,nt)},setProperty=function(Le,Ye){defineProperty&&Ye.name==="__proto__"?defineProperty(Le,Ye.name,{enumerable:!0,configurable:!0,value:Ye.newValue,writable:!0}):Le[Ye.name]=Ye.newValue},getProperty=function(Le,Ye){if(Ye==="__proto__")if(hasOwn.call(Le,Ye)){if(gOPD)return gOPD(Le,Ye).value}else return;return Le[Ye]},extend=function Be(){var Le,Ye,tt,nt,ft,ht,gt=arguments[0],At=1,xt=arguments.length,Et=!1;for(typeof gt=="boolean"&&(Et=gt,gt=arguments[1]||{},At=2),(gt==null||typeof gt!="object"&&typeof gt!="function")&&(gt={});At<xt;++At)if(Le=arguments[At],Le!=null)for(Ye in Le)tt=getProperty(gt,Ye),nt=getProperty(Le,Ye),gt!==nt&&(Et&&nt&&(isPlainObject$2(nt)||(ft=isArray(nt)))?(ft?(ft=!1,ht=tt&&isArray(tt)?tt:[]):ht=tt&&isPlainObject$2(tt)?tt:{},setProperty(gt,{name:Ye,newValue:Be(Et,ht,nt)})):typeof nt<"u"&&setProperty(gt,{name:Ye,newValue:nt}));return gt};const extend$1=getDefaultExportFromCjs(extend);function isPlainObject$1(Be){if(typeof Be!="object"||Be===null)return!1;const Le=Object.getPrototypeOf(Be);return(Le===null||Le===Object.prototype||Object.getPrototypeOf(Le)===null)&&!(Symbol.toStringTag in Be)&&!(Symbol.iterator in Be)}function trough(){const Be=[],Le={run:Ye,use:tt};return Le;function Ye(...nt){let ft=-1;const ht=nt.pop();if(typeof ht!="function")throw new TypeError("Expected function as last argument, not "+ht);gt(null,...nt);function gt(At,...xt){const Et=Be[++ft];let yt=-1;if(At){ht(At);return}for(;++yt<nt.length;)(xt[yt]===null||xt[yt]===void 0)&&(xt[yt]=nt[yt]);nt=xt,Et?wrap$1(Et,gt)(...xt):ht(null,...xt)}}function tt(nt){if(typeof nt!="function")throw new TypeError("Expected `middelware` to be a function, not "+nt);return Be.push(nt),Le}}function wrap$1(Be,Le){let Ye;return tt;function tt(...ht){const gt=Be.length>ht.length;let At;gt&&ht.push(nt);try{At=Be.apply(this,ht)}catch(xt){const Et=xt;if(gt&&Ye)throw Et;return nt(Et)}gt||(At&&At.then&&typeof At.then=="function"?At.then(ft,nt):At instanceof Error?nt(At):ft(At))}function nt(ht,...gt){Ye||(Ye=!0,Le(ht,...gt))}function ft(ht){nt(null,ht)}}const minpath={basename,dirname,extname,join,sep:"/"};function basename(Be,Le){if(Le!==void 0&&typeof Le!="string")throw new TypeError('"ext" argument must be a string');assertPath$1(Be);let Ye=0,tt=-1,nt=Be.length,ft;if(Le===void 0||Le.length===0||Le.length>Be.length){for(;nt--;)if(Be.codePointAt(nt)===47){if(ft){Ye=nt+1;break}}else tt<0&&(ft=!0,tt=nt+1);return tt<0?"":Be.slice(Ye,tt)}if(Le===Be)return"";let ht=-1,gt=Le.length-1;for(;nt--;)if(Be.codePointAt(nt)===47){if(ft){Ye=nt+1;break}}else ht<0&&(ft=!0,ht=nt+1),gt>-1&&(Be.codePointAt(nt)===Le.codePointAt(gt--)?gt<0&&(tt=nt):(gt=-1,tt=ht));return Ye===tt?tt=ht:tt<0&&(tt=Be.length),Be.slice(Ye,tt)}function dirname(Be){if(assertPath$1(Be),Be.length===0)return".";let Le=-1,Ye=Be.length,tt;for(;--Ye;)if(Be.codePointAt(Ye)===47){if(tt){Le=Ye;break}}else tt||(tt=!0);return Le<0?Be.codePointAt(0)===47?"/":".":Le===1&&Be.codePointAt(0)===47?"//":Be.slice(0,Le)}function extname(Be){assertPath$1(Be);let Le=Be.length,Ye=-1,tt=0,nt=-1,ft=0,ht;for(;Le--;){const gt=Be.codePointAt(Le);if(gt===47){if(ht){tt=Le+1;break}continue}Ye<0&&(ht=!0,Ye=Le+1),gt===46?nt<0?nt=Le:ft!==1&&(ft=1):nt>-1&&(ft=-1)}return nt<0||Ye<0||ft===0||ft===1&&nt===Ye-1&&nt===tt+1?"":Be.slice(nt,Ye)}function join(...Be){let Le=-1,Ye;for(;++Le<Be.length;)assertPath$1(Be[Le]),Be[Le]&&(Ye=Ye===void 0?Be[Le]:Ye+"/"+Be[Le]);return Ye===void 0?".":normalize$2(Ye)}function normalize$2(Be){assertPath$1(Be);const Le=Be.codePointAt(0)===47;let Ye=normalizeString(Be,!Le);return Ye.length===0&&!Le&&(Ye="."),Ye.length>0&&Be.codePointAt(Be.length-1)===47&&(Ye+="/"),Le?"/"+Ye:Ye}function normalizeString(Be,Le){let Ye="",tt=0,nt=-1,ft=0,ht=-1,gt,At;for(;++ht<=Be.length;){if(ht<Be.length)gt=Be.codePointAt(ht);else{if(gt===47)break;gt=47}if(gt===47){if(!(nt===ht-1||ft===1))if(nt!==ht-1&&ft===2){if(Ye.length<2||tt!==2||Ye.codePointAt(Ye.length-1)!==46||Ye.codePointAt(Ye.length-2)!==46){if(Ye.length>2){if(At=Ye.lastIndexOf("/"),At!==Ye.length-1){At<0?(Ye="",tt=0):(Ye=Ye.slice(0,At),tt=Ye.length-1-Ye.lastIndexOf("/")),nt=ht,ft=0;continue}}else if(Ye.length>0){Ye="",tt=0,nt=ht,ft=0;continue}}Le&&(Ye=Ye.length>0?Ye+"/..":"..",tt=2)}else Ye.length>0?Ye+="/"+Be.slice(nt+1,ht):Ye=Be.slice(nt+1,ht),tt=ht-nt-1;nt=ht,ft=0}else gt===46&&ft>-1?ft++:ft=-1}return Ye}function assertPath$1(Be){if(typeof Be!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(Be))}const minproc={cwd};function cwd(){return"/"}function isUrl(Be){return!!(Be!==null&&typeof Be=="object"&&"href"in Be&&Be.href&&"protocol"in Be&&Be.protocol&&Be.auth===void 0)}function urlToPath(Be){if(typeof Be=="string")Be=new URL(Be);else if(!isUrl(Be)){const Le=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+Be+"`");throw Le.code="ERR_INVALID_ARG_TYPE",Le}if(Be.protocol!=="file:"){const Le=new TypeError("The URL must be of scheme file");throw Le.code="ERR_INVALID_URL_SCHEME",Le}return getPathFromURLPosix(Be)}function getPathFromURLPosix(Be){if(Be.hostname!==""){const tt=new TypeError('File URL host must be "localhost" or empty on darwin');throw tt.code="ERR_INVALID_FILE_URL_HOST",tt}const Le=Be.pathname;let Ye=-1;for(;++Ye<Le.length;)if(Le.codePointAt(Ye)===37&&Le.codePointAt(Ye+1)===50){const tt=Le.codePointAt(Ye+2);if(tt===70||tt===102){const nt=new TypeError("File URL path must not include encoded / characters");throw nt.code="ERR_INVALID_FILE_URL_PATH",nt}}return decodeURIComponent(Le)}const order=["history","path","basename","stem","extname","dirname"];class VFile{constructor(Le){let Ye;Le?isUrl(Le)?Ye={path:Le}:typeof Le=="string"||isUint8Array$1(Le)?Ye={value:Le}:Ye=Le:Ye={},this.cwd="cwd"in Ye?"":minproc.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let tt=-1;for(;++tt<order.length;){const ft=order[tt];ft in Ye&&Ye[ft]!==void 0&&Ye[ft]!==null&&(this[ft]=ft==="history"?[...Ye[ft]]:Ye[ft])}let nt;for(nt in Ye)order.includes(nt)||(this[nt]=Ye[nt])}get basename(){return typeof this.path=="string"?minpath.basename(this.path):void 0}set basename(Le){assertNonEmpty(Le,"basename"),assertPart(Le,"basename"),this.path=minpath.join(this.dirname||"",Le)}get dirname(){return typeof this.path=="string"?minpath.dirname(this.path):void 0}set dirname(Le){assertPath(this.basename,"dirname"),this.path=minpath.join(Le||"",this.basename)}get extname(){return typeof this.path=="string"?minpath.extname(this.path):void 0}set extname(Le){if(assertPart(Le,"extname"),assertPath(this.dirname,"extname"),Le){if(Le.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(Le.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=minpath.join(this.dirname,this.stem+(Le||""))}get path(){return this.history[this.history.length-1]}set path(Le){isUrl(Le)&&(Le=urlToPath(Le)),assertNonEmpty(Le,"path"),this.path!==Le&&this.history.push(Le)}get stem(){return typeof this.path=="string"?minpath.basename(this.path,this.extname):void 0}set stem(Le){assertNonEmpty(Le,"stem"),assertPart(Le,"stem"),this.path=minpath.join(this.dirname||"",Le+(this.extname||""))}fail(Le,Ye,tt){const nt=this.message(Le,Ye,tt);throw nt.fatal=!0,nt}info(Le,Ye,tt){const nt=this.message(Le,Ye,tt);return nt.fatal=void 0,nt}message(Le,Ye,tt){const nt=new VFileMessage(Le,Ye,tt);return this.path&&(nt.name=this.path+":"+nt.name,nt.file=this.path),nt.fatal=!1,this.messages.push(nt),nt}toString(Le){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(Le||void 0).decode(this.value)}}function assertPart(Be,Le){if(Be&&Be.includes(minpath.sep))throw new Error("`"+Le+"` cannot be a path: did not expect `"+minpath.sep+"`")}function assertNonEmpty(Be,Le){if(!Be)throw new Error("`"+Le+"` cannot be empty")}function assertPath(Be,Le){if(!Be)throw new Error("Setting `"+Le+"` requires `path` to be set too")}function isUint8Array$1(Be){return!!(Be&&typeof Be=="object"&&"byteLength"in Be&&"byteOffset"in Be)}const CallableInstance=function(Be){const tt=this.constructor.prototype,nt=tt[Be],ft=function(){return nt.apply(ft,arguments)};return Object.setPrototypeOf(ft,tt),ft},own$4={}.hasOwnProperty;class Processor extends CallableInstance{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){const Le=new Processor;let Ye=-1;for(;++Ye<this.attachers.length;){const tt=this.attachers[Ye];Le.use(...tt)}return Le.data(extend$1(!0,{},this.namespace)),Le}data(Le,Ye){return typeof Le=="string"?arguments.length===2?(assertUnfrozen("data",this.frozen),this.namespace[Le]=Ye,this):own$4.call(this.namespace,Le)&&this.namespace[Le]||void 0:Le?(assertUnfrozen("data",this.frozen),this.namespace=Le,this):this.namespace}freeze(){if(this.frozen)return this;const Le=this;for(;++this.freezeIndex<this.attachers.length;){const[Ye,...tt]=this.attachers[this.freezeIndex];if(tt[0]===!1)continue;tt[0]===!0&&(tt[0]=void 0);const nt=Ye.call(Le,...tt);typeof nt=="function"&&this.transformers.use(nt)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(Le){this.freeze();const Ye=vfile(Le),tt=this.parser||this.Parser;return assertParser("parse",tt),tt(String(Ye),Ye)}process(Le,Ye){const tt=this;return this.freeze(),assertParser("process",this.parser||this.Parser),assertCompiler("process",this.compiler||this.Compiler),Ye?nt(void 0,Ye):new Promise(nt);function nt(ft,ht){const gt=vfile(Le),At=tt.parse(gt);tt.run(At,gt,function(Et,yt,Ct){if(Et||!yt||!Ct)return xt(Et);const kt=yt,vt=tt.stringify(kt,Ct);looksLikeAValue(vt)?Ct.value=vt:Ct.result=vt,xt(Et,Ct)});function xt(Et,yt){Et||!yt?ht(Et):ft?ft(yt):Ye(void 0,yt)}}}processSync(Le){let Ye=!1,tt;return this.freeze(),assertParser("processSync",this.parser||this.Parser),assertCompiler("processSync",this.compiler||this.Compiler),this.process(Le,nt),assertDone("processSync","process",Ye),tt;function nt(ft,ht){Ye=!0,bail(ft),tt=ht}}run(Le,Ye,tt){assertNode(Le),this.freeze();const nt=this.transformers;return!tt&&typeof Ye=="function"&&(tt=Ye,Ye=void 0),tt?ft(void 0,tt):new Promise(ft);function ft(ht,gt){const At=vfile(Ye);nt.run(Le,At,xt);function xt(Et,yt,Ct){const kt=yt||Le;Et?gt(Et):ht?ht(kt):tt(void 0,kt,Ct)}}}runSync(Le,Ye){let tt=!1,nt;return this.run(Le,Ye,ft),assertDone("runSync","run",tt),nt;function ft(ht,gt){bail(ht),nt=gt,tt=!0}}stringify(Le,Ye){this.freeze();const tt=vfile(Ye),nt=this.compiler||this.Compiler;return assertCompiler("stringify",nt),assertNode(Le),nt(Le,tt)}use(Le,...Ye){const tt=this.attachers,nt=this.namespace;if(assertUnfrozen("use",this.frozen),Le!=null)if(typeof Le=="function")At(Le,Ye);else if(typeof Le=="object")Array.isArray(Le)?gt(Le):ht(Le);else throw new TypeError("Expected usable value, not `"+Le+"`");return this;function ft(xt){if(typeof xt=="function")At(xt,[]);else if(typeof xt=="object")if(Array.isArray(xt)){const[Et,...yt]=xt;At(Et,yt)}else ht(xt);else throw new TypeError("Expected usable value, not `"+xt+"`")}function ht(xt){if(!("plugins"in xt)&&!("settings"in xt))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");gt(xt.plugins),xt.settings&&(nt.settings=extend$1(!0,nt.settings,xt.settings))}function gt(xt){let Et=-1;if(xt!=null)if(Array.isArray(xt))for(;++Et<xt.length;){const yt=xt[Et];ft(yt)}else throw new TypeError("Expected a list of plugins, not `"+xt+"`")}function At(xt,Et){let yt=-1,Ct=-1;for(;++yt<tt.length;)if(tt[yt][0]===xt){Ct=yt;break}if(Ct===-1)tt.push([xt,...Et]);else if(Et.length>0){let[kt,...vt]=Et;const bt=tt[Ct][1];isPlainObject$1(bt)&&isPlainObject$1(kt)&&(kt=extend$1(!0,bt,kt)),tt[Ct]=[xt,kt,...vt]}}}}const unified=new Processor().freeze();function assertParser(Be,Le){if(typeof Le!="function")throw new TypeError("Cannot `"+Be+"` without `parser`")}function assertCompiler(Be,Le){if(typeof Le!="function")throw new TypeError("Cannot `"+Be+"` without `compiler`")}function assertUnfrozen(Be,Le){if(Le)throw new Error("Cannot call `"+Be+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(Be){if(!isPlainObject$1(Be)||typeof Be.type!="string")throw new TypeError("Expected node, got `"+Be+"`")}function assertDone(Be,Le,Ye){if(!Ye)throw new Error("`"+Be+"` finished async. Use `"+Le+"` instead")}function vfile(Be){return looksLikeAVFile(Be)?Be:new VFile(Be)}function looksLikeAVFile(Be){return!!(Be&&typeof Be=="object"&&"message"in Be&&"messages"in Be)}function looksLikeAValue(Be){return typeof Be=="string"||isUint8Array(Be)}function isUint8Array(Be){return!!(Be&&typeof Be=="object"&&"byteLength"in Be&&"byteOffset"in Be)}const changelog="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",emptyPlugins=[],emptyRemarkRehypeOptions={allowDangerousHtml:!0},safeProtocol=/^(https?|ircs?|mailto|xmpp)$/i,deprecations=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function Markdown$1(Be){const Le=createProcessor(Be),Ye=createFile(Be);return post(Le.runSync(Le.parse(Ye),Ye),Be)}function createProcessor(Be){const Le=Be.rehypePlugins||emptyPlugins,Ye=Be.remarkPlugins||emptyPlugins,tt=Be.remarkRehypeOptions?{...Be.remarkRehypeOptions,...emptyRemarkRehypeOptions}:emptyRemarkRehypeOptions;return unified().use(remarkParse).use(Ye).use(remarkRehype,tt).use(Le)}function createFile(Be){const Le=Be.children||"",Ye=new VFile;return typeof Le=="string"&&(Ye.value=Le),Ye}function post(Be,Le){const Ye=Le.allowedElements,tt=Le.allowElement,nt=Le.components,ft=Le.disallowedElements,ht=Le.skipHtml,gt=Le.unwrapDisallowed,At=Le.urlTransform||defaultUrlTransform;for(const Et of deprecations)Object.hasOwn(Le,Et.from)&&(""+Et.from+(Et.to?"use `"+Et.to+"` instead":"remove it")+changelog+Et.id,void 0);return visit$1(Be,xt),toJsxRuntime(Be,{Fragment:jsxRuntimeExports.Fragment,components:nt,ignoreInvalidStyle:!0,jsx:jsxRuntimeExports.jsx,jsxs:jsxRuntimeExports.jsxs,passKeys:!0,passNode:!0});function xt(Et,yt,Ct){if(Et.type==="raw"&&Ct&&typeof yt=="number")return ht?Ct.children.splice(yt,1):Ct.children[yt]={type:"text",value:Et.value},yt;if(Et.type==="element"){let kt;for(kt in urlAttributes)if(Object.hasOwn(urlAttributes,kt)&&Object.hasOwn(Et.properties,kt)){const vt=Et.properties[kt],bt=urlAttributes[kt];(bt===null||bt.includes(Et.tagName))&&(Et.properties[kt]=At(String(vt||""),kt,Et))}}if(Et.type==="element"){let kt=Ye?!Ye.includes(Et.tagName):ft?ft.includes(Et.tagName):!1;if(!kt&&tt&&typeof yt=="number"&&(kt=!tt(Et,yt,Ct)),kt&&Ct&&typeof yt=="number")return gt&&Et.children?Ct.children.splice(yt,1,...Et.children):Ct.children.splice(yt,1),yt}}}function defaultUrlTransform(Be){const Le=Be.indexOf(":"),Ye=Be.indexOf("?"),tt=Be.indexOf("#"),nt=Be.indexOf("/");return Le===-1||nt!==-1&&Le>nt||Ye!==-1&&Le>Ye||tt!==-1&&Le>tt||safeProtocol.test(Be.slice(0,Le))?Be:""}const search=/[#.]/g;function parseSelector(Be,Le){const Ye=Be||"",tt={};let nt=0,ft,ht;for(;nt<Ye.length;){search.lastIndex=nt;const gt=search.exec(Ye),At=Ye.slice(nt,gt?gt.index:Ye.length);At&&(ft?ft==="#"?tt.id=At:Array.isArray(tt.className)?tt.className.push(At):tt.className=[At]:ht=At,nt+=At.length),gt&&(ft=gt[0],nt++)}return{type:"element",tagName:ht||Le||"div",properties:tt,children:[]}}function createH(Be,Le,Ye){const tt=Ye?createAdjustMap(Ye):void 0;function nt(ft,ht,...gt){let At;if(ft==null){At={type:"root",children:[]};const xt=ht;gt.unshift(xt)}else{At=parseSelector(ft,Le);const xt=At.tagName.toLowerCase(),Et=tt?tt.get(xt):void 0;if(At.tagName=Et||xt,isChild(ht))gt.unshift(ht);else for(const[yt,Ct]of Object.entries(ht))addProperty(Be,At.properties,yt,Ct)}for(const xt of gt)addChild(At.children,xt);return At.type==="element"&&At.tagName==="template"&&(At.content={type:"root",children:At.children},At.children=[]),At}return nt}function isChild(Be){if(Be===null||typeof Be!="object"||Array.isArray(Be))return!0;if(typeof Be.type!="string")return!1;const Le=Be,Ye=Object.keys(Be);for(const tt of Ye){const nt=Le[tt];if(nt&&typeof nt=="object"){if(!Array.isArray(nt))return!0;const ft=nt;for(const ht of ft)if(typeof ht!="number"&&typeof ht!="string")return!0}}return!!("children"in Be&&Array.isArray(Be.children))}function addProperty(Be,Le,Ye,tt){const nt=find$1(Be,Ye);let ft;if(tt!=null){if(typeof tt=="number"){if(Number.isNaN(tt))return;ft=tt}else typeof tt=="boolean"?ft=tt:typeof tt=="string"?nt.spaceSeparated?ft=parse$1(tt):nt.commaSeparated?ft=parse$2(tt):nt.commaOrSpaceSeparated?ft=parse$1(parse$2(tt).join(" ")):ft=parsePrimitive(nt,nt.property,tt):Array.isArray(tt)?ft=[...tt]:ft=nt.property==="style"?style(tt):String(tt);if(Array.isArray(ft)){const ht=[];for(const gt of ft)ht.push(parsePrimitive(nt,nt.property,gt));ft=ht}nt.property==="className"&&Array.isArray(Le.className)&&(ft=Le.className.concat(ft)),Le[nt.property]=ft}}function addChild(Be,Le){if(Le!=null)if(typeof Le=="number"||typeof Le=="string")Be.push({type:"text",value:String(Le)});else if(Array.isArray(Le))for(const Ye of Le)addChild(Be,Ye);else if(typeof Le=="object"&&"type"in Le)Le.type==="root"?addChild(Be,Le.children):Be.push(Le);else throw new Error("Expected node, nodes, or string, got `"+Le+"`")}function parsePrimitive(Be,Le,Ye){if(typeof Ye=="string"){if(Be.number&&Ye&&!Number.isNaN(Number(Ye)))return Number(Ye);if((Be.boolean||Be.overloadedBoolean)&&(Ye===""||normalize$3(Ye)===normalize$3(Le)))return!0}return Ye}function style(Be){const Le=[];for(const[Ye,tt]of Object.entries(Be))Le.push([Ye,tt].join(": "));return Le.join("; ")}function createAdjustMap(Be){const Le=new Map;for(const Ye of Be)Le.set(Ye.toLowerCase(),Ye);return Le}const svgCaseSensitiveTagNames=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],h$2=createH(html$3,"div"),s=createH(svg$2,"g",svgCaseSensitiveTagNames);function location$1(Be){const Le=String(Be),Ye=[];return{toOffset:nt,toPoint:tt};function tt(ft){if(typeof ft=="number"&&ft>-1&&ft<=Le.length){let ht=0;for(;;){let gt=Ye[ht];if(gt===void 0){const At=next(Le,Ye[ht-1]);gt=At===-1?Le.length+1:At+1,Ye[ht]=gt}if(gt>ft)return{line:ht+1,column:ft-(ht>0?Ye[ht-1]:0)+1,offset:ft};ht++}}}function nt(ft){if(ft&&typeof ft.line=="number"&&typeof ft.column=="number"&&!Number.isNaN(ft.line)&&!Number.isNaN(ft.column)){for(;Ye.length<ft.line;){const gt=Ye[Ye.length-1],At=next(Le,gt),xt=At===-1?Le.length+1:At+1;if(gt===xt)break;Ye.push(xt)}const ht=(ft.line>1?Ye[ft.line-2]:0)+ft.column-1;if(ht<Ye[ft.line-1])return ht}}}function next(Be,Le){const Ye=Be.indexOf("\r",Le),tt=Be.indexOf(`
|
|
6212
6212
|
`,Le);return tt===-1?Ye:Ye===-1||Ye+1===tt?tt:Ye<tt?Ye:tt}const webNamespaces={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},own$3={}.hasOwnProperty,proto$1=Object.prototype;function fromParse5(Be,Le){const Ye=Le||{};return one$1({file:Ye.file||void 0,location:!1,schema:Ye.space==="svg"?svg$2:html$3,verbose:Ye.verbose||!1},Be)}function one$1(Be,Le){let Ye;switch(Le.nodeName){case"#comment":{const tt=Le;return Ye={type:"comment",value:tt.data},patch$1(Be,tt,Ye),Ye}case"#document":case"#document-fragment":{const tt=Le,nt="mode"in tt?tt.mode==="quirks"||tt.mode==="limited-quirks":!1;if(Ye={type:"root",children:all$2(Be,Le.childNodes),data:{quirksMode:nt}},Be.file&&Be.location){const ft=String(Be.file),ht=location$1(ft),gt=ht.toPoint(0),At=ht.toPoint(ft.length);Ye.position={start:gt,end:At}}return Ye}case"#documentType":{const tt=Le;return Ye={type:"doctype"},patch$1(Be,tt,Ye),Ye}case"#text":{const tt=Le;return Ye={type:"text",value:tt.value},patch$1(Be,tt,Ye),Ye}default:return Ye=element$2(Be,Le),Ye}}function all$2(Be,Le){let Ye=-1;const tt=[];for(;++Ye<Le.length;){const nt=one$1(Be,Le[Ye]);tt.push(nt)}return tt}function element$2(Be,Le){const Ye=Be.schema;Be.schema=Le.namespaceURI===webNamespaces.svg?svg$2:html$3;let tt=-1;const nt={};for(;++tt<Le.attrs.length;){const gt=Le.attrs[tt],At=(gt.prefix?gt.prefix+":":"")+gt.name;own$3.call(proto$1,At)||(nt[At]=gt.value)}const ht=(Be.schema.space==="svg"?s:h$2)(Le.tagName,nt,all$2(Be,Le.childNodes));if(patch$1(Be,Le,ht),ht.tagName==="template"){const gt=Le,At=gt.sourceCodeLocation,xt=At&&At.startTag&&position(At.startTag),Et=At&&At.endTag&&position(At.endTag),yt=one$1(Be,gt.content);xt&&Et&&Be.file&&(yt.position={start:xt.end,end:Et.start}),ht.content=yt}return Be.schema=Ye,ht}function patch$1(Be,Le,Ye){if("sourceCodeLocation"in Le&&Le.sourceCodeLocation&&Be.file){const tt=createLocation(Be,Ye,Le.sourceCodeLocation);tt&&(Be.location=!0,Ye.position=tt)}}function createLocation(Be,Le,Ye){const tt=position(Ye);if(Le.type==="element"){const nt=Le.children[Le.children.length-1];if(tt&&!Ye.endTag&&nt&&nt.position&&nt.position.end&&(tt.end=Object.assign({},nt.position.end)),Be.verbose){const ft={};let ht;if(Ye.attrs)for(ht in Ye.attrs)own$3.call(Ye.attrs,ht)&&(ft[find$1(Be.schema,ht).property]=position(Ye.attrs[ht]));Ye.startTag;const gt=position(Ye.startTag),At=Ye.endTag?position(Ye.endTag):void 0,xt={opening:gt};At&&(xt.closing=At),xt.properties=ft,Le.data={position:xt}}}return tt}function position(Be){const Le=point({line:Be.startLine,column:Be.startCol,offset:Be.startOffset}),Ye=point({line:Be.endLine,column:Be.endCol,offset:Be.endOffset});return Le||Ye?{start:Le,end:Ye}:void 0}function point(Be){return Be.line&&Be.column?Be:void 0}class Schema{constructor(Le,Ye,tt){this.property=Le,this.normal=Ye,tt&&(this.space=tt)}}Schema.prototype.property={},Schema.prototype.normal={},Schema.prototype.space=null;function merge$1(Be,Le){const Ye={},tt={};let nt=-1;for(;++nt<Be.length;)Object.assign(Ye,Be[nt].property),Object.assign(tt,Be[nt].normal);return new Schema(Ye,tt,Le)}function normalize$1(Be){return Be.toLowerCase()}class Info{constructor(Le,Ye){this.property=Le,this.attribute=Ye}}Info.prototype.space=null,Info.prototype.boolean=!1,Info.prototype.booleanish=!1,Info.prototype.overloadedBoolean=!1,Info.prototype.number=!1,Info.prototype.commaSeparated=!1,Info.prototype.spaceSeparated=!1,Info.prototype.commaOrSpaceSeparated=!1,Info.prototype.mustUseProperty=!1,Info.prototype.defined=!1;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const types=Object.freeze(Object.defineProperty({__proto__:null,boolean,booleanish,commaOrSpaceSeparated,commaSeparated,number,overloadedBoolean,spaceSeparated},Symbol.toStringTag,{value:"Module"})),checks=Object.keys(types);class DefinedInfo extends Info{constructor(Le,Ye,tt,nt){let ft=-1;if(super(Le,Ye),mark(this,"space",nt),typeof tt=="number")for(;++ft<checks.length;){const ht=checks[ft];mark(this,checks[ft],(tt&types[ht])===types[ht])}}}DefinedInfo.prototype.defined=!0;function mark(Be,Le,Ye){Ye&&(Be[Le]=Ye)}const own$2={}.hasOwnProperty;function create$1(Be){const Le={},Ye={};let tt;for(tt in Be.properties)if(own$2.call(Be.properties,tt)){const nt=Be.properties[tt],ft=new DefinedInfo(tt,Be.transform(Be.attributes||{},tt),nt,Be.space);Be.mustUseProperty&&Be.mustUseProperty.includes(tt)&&(ft.mustUseProperty=!0),Le[tt]=ft,Ye[normalize$1(tt)]=tt,Ye[normalize$1(ft.attribute)]=tt}return new Schema(Le,Ye,Be.space)}const xlink=create$1({space:"xlink",transform(Be,Le){return"xlink:"+Le.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),xml=create$1({space:"xml",transform(Be,Le){return"xml:"+Le.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function caseSensitiveTransform(Be,Le){return Le in Be?Be[Le]:Le}function caseInsensitiveTransform(Be,Le){return caseSensitiveTransform(Be,Le.toLowerCase())}const xmlns=create$1({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:caseInsensitiveTransform,properties:{xmlns:null,xmlnsXLink:null}}),aria=create$1({transform(Be,Le){return Le==="role"?Le:"aria-"+Le.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null}}),html$1=create$1({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:caseInsensitiveTransform,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,blocking:spaceSeparated,capture:null,charSet:null,checked:boolean,cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,height:number,hidden:boolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:boolean,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInline:boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shadowRootClonable:boolean,shadowRootDelegatesFocus:boolean,shadowRootMode:null,shape:null,size:number,sizes:null,slot:null,span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null}}),svg$1=create$1({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:caseSensitiveTransform,properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),valid=/^data[-\w.:]+$/i,dash=/-[a-z]/g,cap=/[A-Z]/g;function find(Be,Le){const Ye=normalize$1(Le);let tt=Le,nt=Info;if(Ye in Be.normal)return Be.property[Be.normal[Ye]];if(Ye.length>4&&Ye.slice(0,4)==="data"&&valid.test(Le)){if(Le.charAt(4)==="-"){const ft=Le.slice(5).replace(dash,camelcase);tt="data"+ft.charAt(0).toUpperCase()+ft.slice(1)}else{const ft=Le.slice(4);if(!dash.test(ft)){let ht=ft.replace(cap,kebab);ht.charAt(0)!=="-"&&(ht="-"+ht),Le="data"+ht}}nt=DefinedInfo}return new nt(tt,Le)}function kebab(Be){return"-"+Be.toLowerCase()}function camelcase(Be){return Be.charAt(1).toUpperCase()}const html=merge$1([xml,xlink,xmlns,aria,html$1],"html"),svg=merge$1([xml,xlink,xmlns,aria,svg$1],"svg"),own$1={}.hasOwnProperty;function zwitch(Be,Le){const Ye=Le||{};function tt(nt,...ft){let ht=tt.invalid;const gt=tt.handlers;if(nt&&own$1.call(nt,Be)){const At=String(nt[Be]);ht=own$1.call(gt,At)?gt[At]:tt.unknown}if(ht)return ht.call(this,nt,...ft)}return tt.handlers=Ye.handlers||{},tt.invalid=Ye.invalid,tt.unknown=Ye.unknown,tt}const emptyOptions={},own={}.hasOwnProperty,one=zwitch("type",{handlers:{root:root$1,element:element$1,text:text$1,comment:comment$1,doctype:doctype$1}});function toParse5(Be,Le){const tt=(Le||emptyOptions).space;return one(Be,tt==="svg"?svg:html)}function root$1(Be,Le){const Ye={nodeName:"#document",mode:(Be.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return Ye.childNodes=all$1(Be.children,Ye,Le),patch(Be,Ye),Ye}function fragment(Be,Le){const Ye={nodeName:"#document-fragment",childNodes:[]};return Ye.childNodes=all$1(Be.children,Ye,Le),patch(Be,Ye),Ye}function doctype$1(Be){const Le={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return patch(Be,Le),Le}function text$1(Be){const Le={nodeName:"#text",value:Be.value,parentNode:null};return patch(Be,Le),Le}function comment$1(Be){const Le={nodeName:"#comment",data:Be.value,parentNode:null};return patch(Be,Le),Le}function element$1(Be,Le){const Ye=Le;let tt=Ye;Be.type==="element"&&Be.tagName.toLowerCase()==="svg"&&Ye.space==="html"&&(tt=svg);const nt=[];let ft;if(Be.properties){for(ft in Be.properties)if(ft!=="children"&&own.call(Be.properties,ft)){const At=createProperty(tt,ft,Be.properties[ft]);At&&nt.push(At)}}const ht=tt.space,gt={nodeName:Be.tagName,tagName:Be.tagName,attrs:nt,namespaceURI:webNamespaces[ht],childNodes:[],parentNode:null};return gt.childNodes=all$1(Be.children,gt,tt),patch(Be,gt),Be.tagName==="template"&&Be.content&&(gt.content=fragment(Be.content,tt)),gt}function createProperty(Be,Le,Ye){const tt=find(Be,Le);if(Ye===!1||Ye===null||Ye===void 0||typeof Ye=="number"&&Number.isNaN(Ye)||!Ye&&tt.boolean)return;Array.isArray(Ye)&&(Ye=tt.commaSeparated?stringify$1(Ye):stringify(Ye));const nt={name:tt.attribute,value:Ye===!0?"":String(Ye)};if(tt.space&&tt.space!=="html"&&tt.space!=="svg"){const ft=nt.name.indexOf(":");ft<0?nt.prefix="":(nt.name=nt.name.slice(ft+1),nt.prefix=tt.attribute.slice(0,ft)),nt.namespace=webNamespaces[tt.space]}return nt}function all$1(Be,Le,Ye){let tt=-1;const nt=[];if(Be)for(;++tt<Be.length;){const ft=one(Be[tt],Ye);ft.parentNode=Le,nt.push(ft)}return nt}function patch(Be,Le){const Ye=Be.position;Ye&&Ye.start&&Ye.end&&(Ye.start.offset,Ye.end.offset,Le.sourceCodeLocation={startLine:Ye.start.line,startCol:Ye.start.column,startOffset:Ye.start.offset,endLine:Ye.end.line,endCol:Ye.end.column,endOffset:Ye.end.offset})}const htmlVoidElements=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],UNDEFINED_CODE_POINTS=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),REPLACEMENT_CHARACTER="�";var CODE_POINTS;(function(Be){Be[Be.EOF=-1]="EOF",Be[Be.NULL=0]="NULL",Be[Be.TABULATION=9]="TABULATION",Be[Be.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",Be[Be.LINE_FEED=10]="LINE_FEED",Be[Be.FORM_FEED=12]="FORM_FEED",Be[Be.SPACE=32]="SPACE",Be[Be.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",Be[Be.QUOTATION_MARK=34]="QUOTATION_MARK",Be[Be.AMPERSAND=38]="AMPERSAND",Be[Be.APOSTROPHE=39]="APOSTROPHE",Be[Be.HYPHEN_MINUS=45]="HYPHEN_MINUS",Be[Be.SOLIDUS=47]="SOLIDUS",Be[Be.DIGIT_0=48]="DIGIT_0",Be[Be.DIGIT_9=57]="DIGIT_9",Be[Be.SEMICOLON=59]="SEMICOLON",Be[Be.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",Be[Be.EQUALS_SIGN=61]="EQUALS_SIGN",Be[Be.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",Be[Be.QUESTION_MARK=63]="QUESTION_MARK",Be[Be.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",Be[Be.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",Be[Be.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",Be[Be.GRAVE_ACCENT=96]="GRAVE_ACCENT",Be[Be.LATIN_SMALL_A=97]="LATIN_SMALL_A",Be[Be.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(CODE_POINTS||(CODE_POINTS={}));const SEQUENCES={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function isSurrogate(Be){return Be>=55296&&Be<=57343}function isSurrogatePair(Be){return Be>=56320&&Be<=57343}function getSurrogatePairCodePoint(Be,Le){return(Be-55296)*1024+9216+Le}function isControlCodePoint(Be){return Be!==32&&Be!==10&&Be!==13&&Be!==9&&Be!==12&&Be>=1&&Be<=31||Be>=127&&Be<=159}function isUndefinedCodePoint(Be){return Be>=64976&&Be<=65007||UNDEFINED_CODE_POINTS.has(Be)}var ERR;(function(Be){Be.controlCharacterInInputStream="control-character-in-input-stream",Be.noncharacterInInputStream="noncharacter-in-input-stream",Be.surrogateInInputStream="surrogate-in-input-stream",Be.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",Be.endTagWithAttributes="end-tag-with-attributes",Be.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",Be.unexpectedSolidusInTag="unexpected-solidus-in-tag",Be.unexpectedNullCharacter="unexpected-null-character",Be.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",Be.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",Be.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",Be.missingEndTagName="missing-end-tag-name",Be.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",Be.unknownNamedCharacterReference="unknown-named-character-reference",Be.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",Be.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",Be.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",Be.eofBeforeTagName="eof-before-tag-name",Be.eofInTag="eof-in-tag",Be.missingAttributeValue="missing-attribute-value",Be.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",Be.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",Be.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",Be.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",Be.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",Be.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",Be.missingDoctypePublicIdentifier="missing-doctype-public-identifier",Be.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",Be.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",Be.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",Be.cdataInHtmlContent="cdata-in-html-content",Be.incorrectlyOpenedComment="incorrectly-opened-comment",Be.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",Be.eofInDoctype="eof-in-doctype",Be.nestedComment="nested-comment",Be.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",Be.eofInComment="eof-in-comment",Be.incorrectlyClosedComment="incorrectly-closed-comment",Be.eofInCdata="eof-in-cdata",Be.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",Be.nullCharacterReference="null-character-reference",Be.surrogateCharacterReference="surrogate-character-reference",Be.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",Be.controlCharacterReference="control-character-reference",Be.noncharacterCharacterReference="noncharacter-character-reference",Be.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",Be.missingDoctypeName="missing-doctype-name",Be.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",Be.duplicateAttribute="duplicate-attribute",Be.nonConformingDoctype="non-conforming-doctype",Be.missingDoctype="missing-doctype",Be.misplacedDoctype="misplaced-doctype",Be.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",Be.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",Be.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",Be.openElementsLeftAfterEof="open-elements-left-after-eof",Be.abandonedHeadElementChild="abandoned-head-element-child",Be.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",Be.nestedNoscriptInHead="nested-noscript-in-head",Be.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ERR||(ERR={}));const DEFAULT_BUFFER_WATERLINE=65536;class Preprocessor{constructor(Le){this.handler=Le,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=DEFAULT_BUFFER_WATERLINE,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(Le,Ye){const{line:tt,col:nt,offset:ft}=this,ht=nt+Ye,gt=ft+Ye;return{code:Le,startLine:tt,endLine:tt,startCol:ht,endCol:ht,startOffset:gt,endOffset:gt}}_err(Le){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(Le,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(Le){if(this.pos!==this.html.length-1){const Ye=this.html.charCodeAt(this.pos+1);if(isSurrogatePair(Ye))return this.pos++,this._addGap(),getSurrogatePairCodePoint(Le,Ye)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,CODE_POINTS.EOF;return this._err(ERR.surrogateInInputStream),Le}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(Le,Ye){this.html.length>0?this.html+=Le:this.html=Le,this.endOfChunkHit=!1,this.lastChunkWritten=Ye}insertHtmlAtCurrentPos(Le){this.html=this.html.substring(0,this.pos+1)+Le+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(Le,Ye){if(this.pos+Le.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(Ye)return this.html.startsWith(Le,this.pos);for(let tt=0;tt<Le.length;tt++)if((this.html.charCodeAt(this.pos+tt)|32)!==Le.charCodeAt(tt))return!1;return!0}peek(Le){const Ye=this.pos+Le;if(Ye>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,CODE_POINTS.EOF;const tt=this.html.charCodeAt(Ye);return tt===CODE_POINTS.CARRIAGE_RETURN?CODE_POINTS.LINE_FEED:tt}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,CODE_POINTS.EOF;let Le=this.html.charCodeAt(this.pos);return Le===CODE_POINTS.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,CODE_POINTS.LINE_FEED):Le===CODE_POINTS.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,isSurrogate(Le)&&(Le=this._processSurrogate(Le)),this.handler.onParseError===null||Le>31&&Le<127||Le===CODE_POINTS.LINE_FEED||Le===CODE_POINTS.CARRIAGE_RETURN||Le>159&&Le<64976||this._checkForProblematicCharacters(Le),Le)}_checkForProblematicCharacters(Le){isControlCodePoint(Le)?this._err(ERR.controlCharacterInInputStream):isUndefinedCodePoint(Le)&&this._err(ERR.noncharacterInInputStream)}retreat(Le){for(this.pos-=Le;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var TokenType;(function(Be){Be[Be.CHARACTER=0]="CHARACTER",Be[Be.NULL_CHARACTER=1]="NULL_CHARACTER",Be[Be.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",Be[Be.START_TAG=3]="START_TAG",Be[Be.END_TAG=4]="END_TAG",Be[Be.COMMENT=5]="COMMENT",Be[Be.DOCTYPE=6]="DOCTYPE",Be[Be.EOF=7]="EOF",Be[Be.HIBERNATION=8]="HIBERNATION"})(TokenType||(TokenType={}));function getTokenAttr(Be,Le){for(let Ye=Be.attrs.length-1;Ye>=0;Ye--)if(Be.attrs[Ye].name===Le)return Be.attrs[Ye].value;return null}const htmlDecodeTree=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(Be=>Be.charCodeAt(0))),decodeMap=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function replaceCodePoint(Be){var Le;return Be>=55296&&Be<=57343||Be>1114111?65533:(Le=decodeMap.get(Be))!==null&&Le!==void 0?Le:Be}var CharCodes;(function(Be){Be[Be.NUM=35]="NUM",Be[Be.SEMI=59]="SEMI",Be[Be.EQUALS=61]="EQUALS",Be[Be.ZERO=48]="ZERO",Be[Be.NINE=57]="NINE",Be[Be.LOWER_A=97]="LOWER_A",Be[Be.LOWER_F=102]="LOWER_F",Be[Be.LOWER_X=120]="LOWER_X",Be[Be.LOWER_Z=122]="LOWER_Z",Be[Be.UPPER_A=65]="UPPER_A",Be[Be.UPPER_F=70]="UPPER_F",Be[Be.UPPER_Z=90]="UPPER_Z"})(CharCodes||(CharCodes={}));const TO_LOWER_BIT=32;var BinTrieFlags;(function(Be){Be[Be.VALUE_LENGTH=49152]="VALUE_LENGTH",Be[Be.BRANCH_LENGTH=16256]="BRANCH_LENGTH",Be[Be.JUMP_TABLE=127]="JUMP_TABLE"})(BinTrieFlags||(BinTrieFlags={}));function isNumber(Be){return Be>=CharCodes.ZERO&&Be<=CharCodes.NINE}function isHexadecimalCharacter(Be){return Be>=CharCodes.UPPER_A&&Be<=CharCodes.UPPER_F||Be>=CharCodes.LOWER_A&&Be<=CharCodes.LOWER_F}function isAsciiAlphaNumeric$1(Be){return Be>=CharCodes.UPPER_A&&Be<=CharCodes.UPPER_Z||Be>=CharCodes.LOWER_A&&Be<=CharCodes.LOWER_Z||isNumber(Be)}function isEntityInAttributeInvalidEnd(Be){return Be===CharCodes.EQUALS||isAsciiAlphaNumeric$1(Be)}var EntityDecoderState;(function(Be){Be[Be.EntityStart=0]="EntityStart",Be[Be.NumericStart=1]="NumericStart",Be[Be.NumericDecimal=2]="NumericDecimal",Be[Be.NumericHex=3]="NumericHex",Be[Be.NamedEntity=4]="NamedEntity"})(EntityDecoderState||(EntityDecoderState={}));var DecodingMode;(function(Be){Be[Be.Legacy=0]="Legacy",Be[Be.Strict=1]="Strict",Be[Be.Attribute=2]="Attribute"})(DecodingMode||(DecodingMode={}));class EntityDecoder{constructor(Le,Ye,tt){this.decodeTree=Le,this.emitCodePoint=Ye,this.errors=tt,this.state=EntityDecoderState.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=DecodingMode.Strict}startEntity(Le){this.decodeMode=Le,this.state=EntityDecoderState.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(Le,Ye){switch(this.state){case EntityDecoderState.EntityStart:return Le.charCodeAt(Ye)===CharCodes.NUM?(this.state=EntityDecoderState.NumericStart,this.consumed+=1,this.stateNumericStart(Le,Ye+1)):(this.state=EntityDecoderState.NamedEntity,this.stateNamedEntity(Le,Ye));case EntityDecoderState.NumericStart:return this.stateNumericStart(Le,Ye);case EntityDecoderState.NumericDecimal:return this.stateNumericDecimal(Le,Ye);case EntityDecoderState.NumericHex:return this.stateNumericHex(Le,Ye);case EntityDecoderState.NamedEntity:return this.stateNamedEntity(Le,Ye)}}stateNumericStart(Le,Ye){return Ye>=Le.length?-1:(Le.charCodeAt(Ye)|TO_LOWER_BIT)===CharCodes.LOWER_X?(this.state=EntityDecoderState.NumericHex,this.consumed+=1,this.stateNumericHex(Le,Ye+1)):(this.state=EntityDecoderState.NumericDecimal,this.stateNumericDecimal(Le,Ye))}addToNumericResult(Le,Ye,tt,nt){if(Ye!==tt){const ft=tt-Ye;this.result=this.result*Math.pow(nt,ft)+Number.parseInt(Le.substr(Ye,ft),nt),this.consumed+=ft}}stateNumericHex(Le,Ye){const tt=Ye;for(;Ye<Le.length;){const nt=Le.charCodeAt(Ye);if(isNumber(nt)||isHexadecimalCharacter(nt))Ye+=1;else return this.addToNumericResult(Le,tt,Ye,16),this.emitNumericEntity(nt,3)}return this.addToNumericResult(Le,tt,Ye,16),-1}stateNumericDecimal(Le,Ye){const tt=Ye;for(;Ye<Le.length;){const nt=Le.charCodeAt(Ye);if(isNumber(nt))Ye+=1;else return this.addToNumericResult(Le,tt,Ye,10),this.emitNumericEntity(nt,2)}return this.addToNumericResult(Le,tt,Ye,10),-1}emitNumericEntity(Le,Ye){var tt;if(this.consumed<=Ye)return(tt=this.errors)===null||tt===void 0||tt.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(Le===CharCodes.SEMI)this.consumed+=1;else if(this.decodeMode===DecodingMode.Strict)return 0;return this.emitCodePoint(replaceCodePoint(this.result),this.consumed),this.errors&&(Le!==CharCodes.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(Le,Ye){const{decodeTree:tt}=this;let nt=tt[this.treeIndex],ft=(nt&BinTrieFlags.VALUE_LENGTH)>>14;for(;Ye<Le.length;Ye++,this.excess++){const ht=Le.charCodeAt(Ye);if(this.treeIndex=determineBranch(tt,nt,this.treeIndex+Math.max(1,ft),ht),this.treeIndex<0)return this.result===0||this.decodeMode===DecodingMode.Attribute&&(ft===0||isEntityInAttributeInvalidEnd(ht))?0:this.emitNotTerminatedNamedEntity();if(nt=tt[this.treeIndex],ft=(nt&BinTrieFlags.VALUE_LENGTH)>>14,ft!==0){if(ht===CharCodes.SEMI)return this.emitNamedEntityData(this.treeIndex,ft,this.consumed+this.excess);this.decodeMode!==DecodingMode.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var Le;const{result:Ye,decodeTree:tt}=this,nt=(tt[Ye]&BinTrieFlags.VALUE_LENGTH)>>14;return this.emitNamedEntityData(Ye,nt,this.consumed),(Le=this.errors)===null||Le===void 0||Le.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(Le,Ye,tt){const{decodeTree:nt}=this;return this.emitCodePoint(Ye===1?nt[Le]&~BinTrieFlags.VALUE_LENGTH:nt[Le+1],tt),Ye===3&&this.emitCodePoint(nt[Le+2],tt),tt}end(){var Le;switch(this.state){case EntityDecoderState.NamedEntity:return this.result!==0&&(this.decodeMode!==DecodingMode.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case EntityDecoderState.NumericDecimal:return this.emitNumericEntity(0,2);case EntityDecoderState.NumericHex:return this.emitNumericEntity(0,3);case EntityDecoderState.NumericStart:return(Le=this.errors)===null||Le===void 0||Le.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case EntityDecoderState.EntityStart:return 0}}}function determineBranch(Be,Le,Ye,tt){const nt=(Le&BinTrieFlags.BRANCH_LENGTH)>>7,ft=Le&BinTrieFlags.JUMP_TABLE;if(nt===0)return ft!==0&&tt===ft?Ye:-1;if(ft){const At=tt-ft;return At<0||At>=nt?-1:Be[Ye+At]-1}let ht=Ye,gt=ht+nt-1;for(;ht<=gt;){const At=ht+gt>>>1,xt=Be[At];if(xt<tt)ht=At+1;else if(xt>tt)gt=At-1;else return Be[At+nt]}return-1}var NS;(function(Be){Be.HTML="http://www.w3.org/1999/xhtml",Be.MATHML="http://www.w3.org/1998/Math/MathML",Be.SVG="http://www.w3.org/2000/svg",Be.XLINK="http://www.w3.org/1999/xlink",Be.XML="http://www.w3.org/XML/1998/namespace",Be.XMLNS="http://www.w3.org/2000/xmlns/"})(NS||(NS={}));var ATTRS;(function(Be){Be.TYPE="type",Be.ACTION="action",Be.ENCODING="encoding",Be.PROMPT="prompt",Be.NAME="name",Be.COLOR="color",Be.FACE="face",Be.SIZE="size"})(ATTRS||(ATTRS={}));var DOCUMENT_MODE;(function(Be){Be.NO_QUIRKS="no-quirks",Be.QUIRKS="quirks",Be.LIMITED_QUIRKS="limited-quirks"})(DOCUMENT_MODE||(DOCUMENT_MODE={}));var TAG_NAMES;(function(Be){Be.A="a",Be.ADDRESS="address",Be.ANNOTATION_XML="annotation-xml",Be.APPLET="applet",Be.AREA="area",Be.ARTICLE="article",Be.ASIDE="aside",Be.B="b",Be.BASE="base",Be.BASEFONT="basefont",Be.BGSOUND="bgsound",Be.BIG="big",Be.BLOCKQUOTE="blockquote",Be.BODY="body",Be.BR="br",Be.BUTTON="button",Be.CAPTION="caption",Be.CENTER="center",Be.CODE="code",Be.COL="col",Be.COLGROUP="colgroup",Be.DD="dd",Be.DESC="desc",Be.DETAILS="details",Be.DIALOG="dialog",Be.DIR="dir",Be.DIV="div",Be.DL="dl",Be.DT="dt",Be.EM="em",Be.EMBED="embed",Be.FIELDSET="fieldset",Be.FIGCAPTION="figcaption",Be.FIGURE="figure",Be.FONT="font",Be.FOOTER="footer",Be.FOREIGN_OBJECT="foreignObject",Be.FORM="form",Be.FRAME="frame",Be.FRAMESET="frameset",Be.H1="h1",Be.H2="h2",Be.H3="h3",Be.H4="h4",Be.H5="h5",Be.H6="h6",Be.HEAD="head",Be.HEADER="header",Be.HGROUP="hgroup",Be.HR="hr",Be.HTML="html",Be.I="i",Be.IMG="img",Be.IMAGE="image",Be.INPUT="input",Be.IFRAME="iframe",Be.KEYGEN="keygen",Be.LABEL="label",Be.LI="li",Be.LINK="link",Be.LISTING="listing",Be.MAIN="main",Be.MALIGNMARK="malignmark",Be.MARQUEE="marquee",Be.MATH="math",Be.MENU="menu",Be.META="meta",Be.MGLYPH="mglyph",Be.MI="mi",Be.MO="mo",Be.MN="mn",Be.MS="ms",Be.MTEXT="mtext",Be.NAV="nav",Be.NOBR="nobr",Be.NOFRAMES="noframes",Be.NOEMBED="noembed",Be.NOSCRIPT="noscript",Be.OBJECT="object",Be.OL="ol",Be.OPTGROUP="optgroup",Be.OPTION="option",Be.P="p",Be.PARAM="param",Be.PLAINTEXT="plaintext",Be.PRE="pre",Be.RB="rb",Be.RP="rp",Be.RT="rt",Be.RTC="rtc",Be.RUBY="ruby",Be.S="s",Be.SCRIPT="script",Be.SEARCH="search",Be.SECTION="section",Be.SELECT="select",Be.SOURCE="source",Be.SMALL="small",Be.SPAN="span",Be.STRIKE="strike",Be.STRONG="strong",Be.STYLE="style",Be.SUB="sub",Be.SUMMARY="summary",Be.SUP="sup",Be.TABLE="table",Be.TBODY="tbody",Be.TEMPLATE="template",Be.TEXTAREA="textarea",Be.TFOOT="tfoot",Be.TD="td",Be.TH="th",Be.THEAD="thead",Be.TITLE="title",Be.TR="tr",Be.TRACK="track",Be.TT="tt",Be.U="u",Be.UL="ul",Be.SVG="svg",Be.VAR="var",Be.WBR="wbr",Be.XMP="xmp"})(TAG_NAMES||(TAG_NAMES={}));var TAG_ID;(function(Be){Be[Be.UNKNOWN=0]="UNKNOWN",Be[Be.A=1]="A",Be[Be.ADDRESS=2]="ADDRESS",Be[Be.ANNOTATION_XML=3]="ANNOTATION_XML",Be[Be.APPLET=4]="APPLET",Be[Be.AREA=5]="AREA",Be[Be.ARTICLE=6]="ARTICLE",Be[Be.ASIDE=7]="ASIDE",Be[Be.B=8]="B",Be[Be.BASE=9]="BASE",Be[Be.BASEFONT=10]="BASEFONT",Be[Be.BGSOUND=11]="BGSOUND",Be[Be.BIG=12]="BIG",Be[Be.BLOCKQUOTE=13]="BLOCKQUOTE",Be[Be.BODY=14]="BODY",Be[Be.BR=15]="BR",Be[Be.BUTTON=16]="BUTTON",Be[Be.CAPTION=17]="CAPTION",Be[Be.CENTER=18]="CENTER",Be[Be.CODE=19]="CODE",Be[Be.COL=20]="COL",Be[Be.COLGROUP=21]="COLGROUP",Be[Be.DD=22]="DD",Be[Be.DESC=23]="DESC",Be[Be.DETAILS=24]="DETAILS",Be[Be.DIALOG=25]="DIALOG",Be[Be.DIR=26]="DIR",Be[Be.DIV=27]="DIV",Be[Be.DL=28]="DL",Be[Be.DT=29]="DT",Be[Be.EM=30]="EM",Be[Be.EMBED=31]="EMBED",Be[Be.FIELDSET=32]="FIELDSET",Be[Be.FIGCAPTION=33]="FIGCAPTION",Be[Be.FIGURE=34]="FIGURE",Be[Be.FONT=35]="FONT",Be[Be.FOOTER=36]="FOOTER",Be[Be.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",Be[Be.FORM=38]="FORM",Be[Be.FRAME=39]="FRAME",Be[Be.FRAMESET=40]="FRAMESET",Be[Be.H1=41]="H1",Be[Be.H2=42]="H2",Be[Be.H3=43]="H3",Be[Be.H4=44]="H4",Be[Be.H5=45]="H5",Be[Be.H6=46]="H6",Be[Be.HEAD=47]="HEAD",Be[Be.HEADER=48]="HEADER",Be[Be.HGROUP=49]="HGROUP",Be[Be.HR=50]="HR",Be[Be.HTML=51]="HTML",Be[Be.I=52]="I",Be[Be.IMG=53]="IMG",Be[Be.IMAGE=54]="IMAGE",Be[Be.INPUT=55]="INPUT",Be[Be.IFRAME=56]="IFRAME",Be[Be.KEYGEN=57]="KEYGEN",Be[Be.LABEL=58]="LABEL",Be[Be.LI=59]="LI",Be[Be.LINK=60]="LINK",Be[Be.LISTING=61]="LISTING",Be[Be.MAIN=62]="MAIN",Be[Be.MALIGNMARK=63]="MALIGNMARK",Be[Be.MARQUEE=64]="MARQUEE",Be[Be.MATH=65]="MATH",Be[Be.MENU=66]="MENU",Be[Be.META=67]="META",Be[Be.MGLYPH=68]="MGLYPH",Be[Be.MI=69]="MI",Be[Be.MO=70]="MO",Be[Be.MN=71]="MN",Be[Be.MS=72]="MS",Be[Be.MTEXT=73]="MTEXT",Be[Be.NAV=74]="NAV",Be[Be.NOBR=75]="NOBR",Be[Be.NOFRAMES=76]="NOFRAMES",Be[Be.NOEMBED=77]="NOEMBED",Be[Be.NOSCRIPT=78]="NOSCRIPT",Be[Be.OBJECT=79]="OBJECT",Be[Be.OL=80]="OL",Be[Be.OPTGROUP=81]="OPTGROUP",Be[Be.OPTION=82]="OPTION",Be[Be.P=83]="P",Be[Be.PARAM=84]="PARAM",Be[Be.PLAINTEXT=85]="PLAINTEXT",Be[Be.PRE=86]="PRE",Be[Be.RB=87]="RB",Be[Be.RP=88]="RP",Be[Be.RT=89]="RT",Be[Be.RTC=90]="RTC",Be[Be.RUBY=91]="RUBY",Be[Be.S=92]="S",Be[Be.SCRIPT=93]="SCRIPT",Be[Be.SEARCH=94]="SEARCH",Be[Be.SECTION=95]="SECTION",Be[Be.SELECT=96]="SELECT",Be[Be.SOURCE=97]="SOURCE",Be[Be.SMALL=98]="SMALL",Be[Be.SPAN=99]="SPAN",Be[Be.STRIKE=100]="STRIKE",Be[Be.STRONG=101]="STRONG",Be[Be.STYLE=102]="STYLE",Be[Be.SUB=103]="SUB",Be[Be.SUMMARY=104]="SUMMARY",Be[Be.SUP=105]="SUP",Be[Be.TABLE=106]="TABLE",Be[Be.TBODY=107]="TBODY",Be[Be.TEMPLATE=108]="TEMPLATE",Be[Be.TEXTAREA=109]="TEXTAREA",Be[Be.TFOOT=110]="TFOOT",Be[Be.TD=111]="TD",Be[Be.TH=112]="TH",Be[Be.THEAD=113]="THEAD",Be[Be.TITLE=114]="TITLE",Be[Be.TR=115]="TR",Be[Be.TRACK=116]="TRACK",Be[Be.TT=117]="TT",Be[Be.U=118]="U",Be[Be.UL=119]="UL",Be[Be.SVG=120]="SVG",Be[Be.VAR=121]="VAR",Be[Be.WBR=122]="WBR",Be[Be.XMP=123]="XMP"})(TAG_ID||(TAG_ID={}));const TAG_NAME_TO_ID=new Map([[TAG_NAMES.A,TAG_ID.A],[TAG_NAMES.ADDRESS,TAG_ID.ADDRESS],[TAG_NAMES.ANNOTATION_XML,TAG_ID.ANNOTATION_XML],[TAG_NAMES.APPLET,TAG_ID.APPLET],[TAG_NAMES.AREA,TAG_ID.AREA],[TAG_NAMES.ARTICLE,TAG_ID.ARTICLE],[TAG_NAMES.ASIDE,TAG_ID.ASIDE],[TAG_NAMES.B,TAG_ID.B],[TAG_NAMES.BASE,TAG_ID.BASE],[TAG_NAMES.BASEFONT,TAG_ID.BASEFONT],[TAG_NAMES.BGSOUND,TAG_ID.BGSOUND],[TAG_NAMES.BIG,TAG_ID.BIG],[TAG_NAMES.BLOCKQUOTE,TAG_ID.BLOCKQUOTE],[TAG_NAMES.BODY,TAG_ID.BODY],[TAG_NAMES.BR,TAG_ID.BR],[TAG_NAMES.BUTTON,TAG_ID.BUTTON],[TAG_NAMES.CAPTION,TAG_ID.CAPTION],[TAG_NAMES.CENTER,TAG_ID.CENTER],[TAG_NAMES.CODE,TAG_ID.CODE],[TAG_NAMES.COL,TAG_ID.COL],[TAG_NAMES.COLGROUP,TAG_ID.COLGROUP],[TAG_NAMES.DD,TAG_ID.DD],[TAG_NAMES.DESC,TAG_ID.DESC],[TAG_NAMES.DETAILS,TAG_ID.DETAILS],[TAG_NAMES.DIALOG,TAG_ID.DIALOG],[TAG_NAMES.DIR,TAG_ID.DIR],[TAG_NAMES.DIV,TAG_ID.DIV],[TAG_NAMES.DL,TAG_ID.DL],[TAG_NAMES.DT,TAG_ID.DT],[TAG_NAMES.EM,TAG_ID.EM],[TAG_NAMES.EMBED,TAG_ID.EMBED],[TAG_NAMES.FIELDSET,TAG_ID.FIELDSET],[TAG_NAMES.FIGCAPTION,TAG_ID.FIGCAPTION],[TAG_NAMES.FIGURE,TAG_ID.FIGURE],[TAG_NAMES.FONT,TAG_ID.FONT],[TAG_NAMES.FOOTER,TAG_ID.FOOTER],[TAG_NAMES.FOREIGN_OBJECT,TAG_ID.FOREIGN_OBJECT],[TAG_NAMES.FORM,TAG_ID.FORM],[TAG_NAMES.FRAME,TAG_ID.FRAME],[TAG_NAMES.FRAMESET,TAG_ID.FRAMESET],[TAG_NAMES.H1,TAG_ID.H1],[TAG_NAMES.H2,TAG_ID.H2],[TAG_NAMES.H3,TAG_ID.H3],[TAG_NAMES.H4,TAG_ID.H4],[TAG_NAMES.H5,TAG_ID.H5],[TAG_NAMES.H6,TAG_ID.H6],[TAG_NAMES.HEAD,TAG_ID.HEAD],[TAG_NAMES.HEADER,TAG_ID.HEADER],[TAG_NAMES.HGROUP,TAG_ID.HGROUP],[TAG_NAMES.HR,TAG_ID.HR],[TAG_NAMES.HTML,TAG_ID.HTML],[TAG_NAMES.I,TAG_ID.I],[TAG_NAMES.IMG,TAG_ID.IMG],[TAG_NAMES.IMAGE,TAG_ID.IMAGE],[TAG_NAMES.INPUT,TAG_ID.INPUT],[TAG_NAMES.IFRAME,TAG_ID.IFRAME],[TAG_NAMES.KEYGEN,TAG_ID.KEYGEN],[TAG_NAMES.LABEL,TAG_ID.LABEL],[TAG_NAMES.LI,TAG_ID.LI],[TAG_NAMES.LINK,TAG_ID.LINK],[TAG_NAMES.LISTING,TAG_ID.LISTING],[TAG_NAMES.MAIN,TAG_ID.MAIN],[TAG_NAMES.MALIGNMARK,TAG_ID.MALIGNMARK],[TAG_NAMES.MARQUEE,TAG_ID.MARQUEE],[TAG_NAMES.MATH,TAG_ID.MATH],[TAG_NAMES.MENU,TAG_ID.MENU],[TAG_NAMES.META,TAG_ID.META],[TAG_NAMES.MGLYPH,TAG_ID.MGLYPH],[TAG_NAMES.MI,TAG_ID.MI],[TAG_NAMES.MO,TAG_ID.MO],[TAG_NAMES.MN,TAG_ID.MN],[TAG_NAMES.MS,TAG_ID.MS],[TAG_NAMES.MTEXT,TAG_ID.MTEXT],[TAG_NAMES.NAV,TAG_ID.NAV],[TAG_NAMES.NOBR,TAG_ID.NOBR],[TAG_NAMES.NOFRAMES,TAG_ID.NOFRAMES],[TAG_NAMES.NOEMBED,TAG_ID.NOEMBED],[TAG_NAMES.NOSCRIPT,TAG_ID.NOSCRIPT],[TAG_NAMES.OBJECT,TAG_ID.OBJECT],[TAG_NAMES.OL,TAG_ID.OL],[TAG_NAMES.OPTGROUP,TAG_ID.OPTGROUP],[TAG_NAMES.OPTION,TAG_ID.OPTION],[TAG_NAMES.P,TAG_ID.P],[TAG_NAMES.PARAM,TAG_ID.PARAM],[TAG_NAMES.PLAINTEXT,TAG_ID.PLAINTEXT],[TAG_NAMES.PRE,TAG_ID.PRE],[TAG_NAMES.RB,TAG_ID.RB],[TAG_NAMES.RP,TAG_ID.RP],[TAG_NAMES.RT,TAG_ID.RT],[TAG_NAMES.RTC,TAG_ID.RTC],[TAG_NAMES.RUBY,TAG_ID.RUBY],[TAG_NAMES.S,TAG_ID.S],[TAG_NAMES.SCRIPT,TAG_ID.SCRIPT],[TAG_NAMES.SEARCH,TAG_ID.SEARCH],[TAG_NAMES.SECTION,TAG_ID.SECTION],[TAG_NAMES.SELECT,TAG_ID.SELECT],[TAG_NAMES.SOURCE,TAG_ID.SOURCE],[TAG_NAMES.SMALL,TAG_ID.SMALL],[TAG_NAMES.SPAN,TAG_ID.SPAN],[TAG_NAMES.STRIKE,TAG_ID.STRIKE],[TAG_NAMES.STRONG,TAG_ID.STRONG],[TAG_NAMES.STYLE,TAG_ID.STYLE],[TAG_NAMES.SUB,TAG_ID.SUB],[TAG_NAMES.SUMMARY,TAG_ID.SUMMARY],[TAG_NAMES.SUP,TAG_ID.SUP],[TAG_NAMES.TABLE,TAG_ID.TABLE],[TAG_NAMES.TBODY,TAG_ID.TBODY],[TAG_NAMES.TEMPLATE,TAG_ID.TEMPLATE],[TAG_NAMES.TEXTAREA,TAG_ID.TEXTAREA],[TAG_NAMES.TFOOT,TAG_ID.TFOOT],[TAG_NAMES.TD,TAG_ID.TD],[TAG_NAMES.TH,TAG_ID.TH],[TAG_NAMES.THEAD,TAG_ID.THEAD],[TAG_NAMES.TITLE,TAG_ID.TITLE],[TAG_NAMES.TR,TAG_ID.TR],[TAG_NAMES.TRACK,TAG_ID.TRACK],[TAG_NAMES.TT,TAG_ID.TT],[TAG_NAMES.U,TAG_ID.U],[TAG_NAMES.UL,TAG_ID.UL],[TAG_NAMES.SVG,TAG_ID.SVG],[TAG_NAMES.VAR,TAG_ID.VAR],[TAG_NAMES.WBR,TAG_ID.WBR],[TAG_NAMES.XMP,TAG_ID.XMP]]);function getTagID(Be){var Le;return(Le=TAG_NAME_TO_ID.get(Be))!==null&&Le!==void 0?Le:TAG_ID.UNKNOWN}const $=TAG_ID,SPECIAL_ELEMENTS={[NS.HTML]:new Set([$.ADDRESS,$.APPLET,$.AREA,$.ARTICLE,$.ASIDE,$.BASE,$.BASEFONT,$.BGSOUND,$.BLOCKQUOTE,$.BODY,$.BR,$.BUTTON,$.CAPTION,$.CENTER,$.COL,$.COLGROUP,$.DD,$.DETAILS,$.DIR,$.DIV,$.DL,$.DT,$.EMBED,$.FIELDSET,$.FIGCAPTION,$.FIGURE,$.FOOTER,$.FORM,$.FRAME,$.FRAMESET,$.H1,$.H2,$.H3,$.H4,$.H5,$.H6,$.HEAD,$.HEADER,$.HGROUP,$.HR,$.HTML,$.IFRAME,$.IMG,$.INPUT,$.LI,$.LINK,$.LISTING,$.MAIN,$.MARQUEE,$.MENU,$.META,$.NAV,$.NOEMBED,$.NOFRAMES,$.NOSCRIPT,$.OBJECT,$.OL,$.P,$.PARAM,$.PLAINTEXT,$.PRE,$.SCRIPT,$.SECTION,$.SELECT,$.SOURCE,$.STYLE,$.SUMMARY,$.TABLE,$.TBODY,$.TD,$.TEMPLATE,$.TEXTAREA,$.TFOOT,$.TH,$.THEAD,$.TITLE,$.TR,$.TRACK,$.UL,$.WBR,$.XMP]),[NS.MATHML]:new Set([$.MI,$.MO,$.MN,$.MS,$.MTEXT,$.ANNOTATION_XML]),[NS.SVG]:new Set([$.TITLE,$.FOREIGN_OBJECT,$.DESC]),[NS.XLINK]:new Set,[NS.XML]:new Set,[NS.XMLNS]:new Set},NUMBERED_HEADERS=new Set([$.H1,$.H2,$.H3,$.H4,$.H5,$.H6]);TAG_NAMES.STYLE,TAG_NAMES.SCRIPT,TAG_NAMES.XMP,TAG_NAMES.IFRAME,TAG_NAMES.NOEMBED,TAG_NAMES.NOFRAMES,TAG_NAMES.PLAINTEXT;var State$1;(function(Be){Be[Be.DATA=0]="DATA",Be[Be.RCDATA=1]="RCDATA",Be[Be.RAWTEXT=2]="RAWTEXT",Be[Be.SCRIPT_DATA=3]="SCRIPT_DATA",Be[Be.PLAINTEXT=4]="PLAINTEXT",Be[Be.TAG_OPEN=5]="TAG_OPEN",Be[Be.END_TAG_OPEN=6]="END_TAG_OPEN",Be[Be.TAG_NAME=7]="TAG_NAME",Be[Be.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",Be[Be.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",Be[Be.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",Be[Be.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",Be[Be.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",Be[Be.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",Be[Be.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",Be[Be.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",Be[Be.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",Be[Be.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",Be[Be.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",Be[Be.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",Be[Be.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",Be[Be.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",Be[Be.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",Be[Be.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",Be[Be.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",Be[Be.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",Be[Be.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",Be[Be.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",Be[Be.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",Be[Be.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",Be[Be.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",Be[Be.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",Be[Be.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",Be[Be.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",Be[Be.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",Be[Be.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",Be[Be.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",Be[Be.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",Be[Be.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",Be[Be.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",Be[Be.BOGUS_COMMENT=40]="BOGUS_COMMENT",Be[Be.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",Be[Be.COMMENT_START=42]="COMMENT_START",Be[Be.COMMENT_START_DASH=43]="COMMENT_START_DASH",Be[Be.COMMENT=44]="COMMENT",Be[Be.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",Be[Be.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",Be[Be.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",Be[Be.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",Be[Be.COMMENT_END_DASH=49]="COMMENT_END_DASH",Be[Be.COMMENT_END=50]="COMMENT_END",Be[Be.COMMENT_END_BANG=51]="COMMENT_END_BANG",Be[Be.DOCTYPE=52]="DOCTYPE",Be[Be.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",Be[Be.DOCTYPE_NAME=54]="DOCTYPE_NAME",Be[Be.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",Be[Be.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",Be[Be.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",Be[Be.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",Be[Be.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",Be[Be.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",Be[Be.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",Be[Be.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",Be[Be.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",Be[Be.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",Be[Be.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",Be[Be.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",Be[Be.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",Be[Be.CDATA_SECTION=68]="CDATA_SECTION",Be[Be.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",Be[Be.CDATA_SECTION_END=70]="CDATA_SECTION_END",Be[Be.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",Be[Be.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(State$1||(State$1={}));const TokenizerMode={DATA:State$1.DATA,RCDATA:State$1.RCDATA,RAWTEXT:State$1.RAWTEXT,SCRIPT_DATA:State$1.SCRIPT_DATA,PLAINTEXT:State$1.PLAINTEXT,CDATA_SECTION:State$1.CDATA_SECTION};function isAsciiDigit(Be){return Be>=CODE_POINTS.DIGIT_0&&Be<=CODE_POINTS.DIGIT_9}function isAsciiUpper(Be){return Be>=CODE_POINTS.LATIN_CAPITAL_A&&Be<=CODE_POINTS.LATIN_CAPITAL_Z}function isAsciiLower(Be){return Be>=CODE_POINTS.LATIN_SMALL_A&&Be<=CODE_POINTS.LATIN_SMALL_Z}function isAsciiLetter(Be){return isAsciiLower(Be)||isAsciiUpper(Be)}function isAsciiAlphaNumeric(Be){return isAsciiLetter(Be)||isAsciiDigit(Be)}function toAsciiLower(Be){return Be+32}function isWhitespace(Be){return Be===CODE_POINTS.SPACE||Be===CODE_POINTS.LINE_FEED||Be===CODE_POINTS.TABULATION||Be===CODE_POINTS.FORM_FEED}function isScriptDataDoubleEscapeSequenceEnd(Be){return isWhitespace(Be)||Be===CODE_POINTS.SOLIDUS||Be===CODE_POINTS.GREATER_THAN_SIGN}function getErrorForNumericCharacterReference(Be){return Be===CODE_POINTS.NULL?ERR.nullCharacterReference:Be>1114111?ERR.characterReferenceOutsideUnicodeRange:isSurrogate(Be)?ERR.surrogateCharacterReference:isUndefinedCodePoint(Be)?ERR.noncharacterCharacterReference:isControlCodePoint(Be)||Be===CODE_POINTS.CARRIAGE_RETURN?ERR.controlCharacterReference:null}class Tokenizer{constructor(Le,Ye){this.options=Le,this.handler=Ye,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=State$1.DATA,this.returnState=State$1.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new Preprocessor(Ye),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new EntityDecoder(htmlDecodeTree,(tt,nt)=>{this.preprocessor.pos=this.entityStartPos+nt-1,this._flushCodePointConsumedAsCharacterReference(tt)},Ye.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ERR.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:tt=>{this._err(ERR.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+tt)},validateNumericCharacterReference:tt=>{const nt=getErrorForNumericCharacterReference(tt);nt&&this._err(nt,1)}}:void 0)}_err(Le,Ye=0){var tt,nt;(nt=(tt=this.handler).onParseError)===null||nt===void 0||nt.call(tt,this.preprocessor.getError(Le,Ye))}getCurrentLocation(Le){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-Le,startOffset:this.preprocessor.offset-Le,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const Le=this._consume();this._ensureHibernation()||this._callState(Le)}this.inLoop=!1}}pause(){this.paused=!0}resume(Le){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||Le==null||Le())}write(Le,Ye,tt){this.active=!0,this.preprocessor.write(Le,Ye),this._runParsingLoop(),this.paused||tt==null||tt()}insertHtmlAtCurrentPos(Le){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(Le),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(Le){this.consumedAfterSnapshot+=Le;for(let Ye=0;Ye<Le;Ye++)this.preprocessor.advance()}_consumeSequenceIfMatch(Le,Ye){return this.preprocessor.startsWith(Le,Ye)?(this._advanceBy(Le.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:TokenType.START_TAG,tagName:"",tagID:TAG_ID.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:TokenType.END_TAG,tagName:"",tagID:TAG_ID.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(Le){this.currentToken={type:TokenType.COMMENT,data:"",location:this.getCurrentLocation(Le)}}_createDoctypeToken(Le){this.currentToken={type:TokenType.DOCTYPE,name:Le,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(Le,Ye){this.currentCharacterToken={type:Le,chars:Ye,location:this.currentLocation}}_createAttr(Le){this.currentAttr={name:Le,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var Le,Ye;const tt=this.currentToken;if(getTokenAttr(tt,this.currentAttr.name)===null){if(tt.attrs.push(this.currentAttr),tt.location&&this.currentLocation){const nt=(Le=(Ye=tt.location).attrs)!==null&&Le!==void 0?Le:Ye.attrs=Object.create(null);nt[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ERR.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(Le){this._emitCurrentCharacterToken(Le.location),this.currentToken=null,Le.location&&(Le.location.endLine=this.preprocessor.line,Le.location.endCol=this.preprocessor.col+1,Le.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const Le=this.currentToken;this.prepareToken(Le),Le.tagID=getTagID(Le.tagName),Le.type===TokenType.START_TAG?(this.lastStartTagName=Le.tagName,this.handler.onStartTag(Le)):(Le.attrs.length>0&&this._err(ERR.endTagWithAttributes),Le.selfClosing&&this._err(ERR.endTagWithTrailingSolidus),this.handler.onEndTag(Le)),this.preprocessor.dropParsedChunk()}emitCurrentComment(Le){this.prepareToken(Le),this.handler.onComment(Le),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(Le){this.prepareToken(Le),this.handler.onDoctype(Le),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(Le){if(this.currentCharacterToken){switch(Le&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=Le.startLine,this.currentCharacterToken.location.endCol=Le.startCol,this.currentCharacterToken.location.endOffset=Le.startOffset),this.currentCharacterToken.type){case TokenType.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case TokenType.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case TokenType.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const Le=this.getCurrentLocation(0);Le&&(Le.endLine=Le.startLine,Le.endCol=Le.startCol,Le.endOffset=Le.startOffset),this._emitCurrentCharacterToken(Le),this.handler.onEof({type:TokenType.EOF,location:Le}),this.active=!1}_appendCharToCurrentCharacterToken(Le,Ye){if(this.currentCharacterToken)if(this.currentCharacterToken.type===Le){this.currentCharacterToken.chars+=Ye;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(Le,Ye)}_emitCodePoint(Le){const Ye=isWhitespace(Le)?TokenType.WHITESPACE_CHARACTER:Le===CODE_POINTS.NULL?TokenType.NULL_CHARACTER:TokenType.CHARACTER;this._appendCharToCurrentCharacterToken(Ye,String.fromCodePoint(Le))}_emitChars(Le){this._appendCharToCurrentCharacterToken(TokenType.CHARACTER,Le)}_startCharacterReference(){this.returnState=this.state,this.state=State$1.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?DecodingMode.Attribute:DecodingMode.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===State$1.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(Le){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(Le):this._emitCodePoint(Le)}_callState(Le){switch(this.state){case State$1.DATA:{this._stateData(Le);break}case State$1.RCDATA:{this._stateRcdata(Le);break}case State$1.RAWTEXT:{this._stateRawtext(Le);break}case State$1.SCRIPT_DATA:{this._stateScriptData(Le);break}case State$1.PLAINTEXT:{this._statePlaintext(Le);break}case State$1.TAG_OPEN:{this._stateTagOpen(Le);break}case State$1.END_TAG_OPEN:{this._stateEndTagOpen(Le);break}case State$1.TAG_NAME:{this._stateTagName(Le);break}case State$1.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(Le);break}case State$1.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(Le);break}case State$1.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(Le);break}case State$1.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(Le);break}case State$1.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(Le);break}case State$1.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(Le);break}case State$1.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(Le);break}case State$1.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(Le);break}case State$1.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(Le);break}case State$1.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(Le);break}case State$1.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(Le);break}case State$1.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(Le);break}case State$1.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(Le);break}case State$1.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(Le);break}case State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(Le);break}case State$1.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(Le);break}case State$1.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(Le);break}case State$1.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(Le);break}case State$1.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(Le);break}case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(Le);break}case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(Le);break}case State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(Le);break}case State$1.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(Le);break}case State$1.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(Le);break}case State$1.ATTRIBUTE_NAME:{this._stateAttributeName(Le);break}case State$1.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(Le);break}case State$1.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(Le);break}case State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(Le);break}case State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(Le);break}case State$1.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(Le);break}case State$1.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(Le);break}case State$1.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(Le);break}case State$1.BOGUS_COMMENT:{this._stateBogusComment(Le);break}case State$1.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(Le);break}case State$1.COMMENT_START:{this._stateCommentStart(Le);break}case State$1.COMMENT_START_DASH:{this._stateCommentStartDash(Le);break}case State$1.COMMENT:{this._stateComment(Le);break}case State$1.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(Le);break}case State$1.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(Le);break}case State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(Le);break}case State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(Le);break}case State$1.COMMENT_END_DASH:{this._stateCommentEndDash(Le);break}case State$1.COMMENT_END:{this._stateCommentEnd(Le);break}case State$1.COMMENT_END_BANG:{this._stateCommentEndBang(Le);break}case State$1.DOCTYPE:{this._stateDoctype(Le);break}case State$1.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(Le);break}case State$1.DOCTYPE_NAME:{this._stateDoctypeName(Le);break}case State$1.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(Le);break}case State$1.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(Le);break}case State$1.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(Le);break}case State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(Le);break}case State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(Le);break}case State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(Le);break}case State$1.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(Le);break}case State$1.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(Le);break}case State$1.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(Le);break}case State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(Le);break}case State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(Le);break}case State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(Le);break}case State$1.BOGUS_DOCTYPE:{this._stateBogusDoctype(Le);break}case State$1.CDATA_SECTION:{this._stateCdataSection(Le);break}case State$1.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(Le);break}case State$1.CDATA_SECTION_END:{this._stateCdataSectionEnd(Le);break}case State$1.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case State$1.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(Le);break}default:throw new Error("Unknown state")}}_stateData(Le){switch(Le){case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.TAG_OPEN;break}case CODE_POINTS.AMPERSAND:{this._startCharacterReference();break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitCodePoint(Le);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(Le)}}_stateRcdata(Le){switch(Le){case CODE_POINTS.AMPERSAND:{this._startCharacterReference();break}case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.RCDATA_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(Le)}}_stateRawtext(Le){switch(Le){case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.RAWTEXT_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(Le)}}_stateScriptData(Le){switch(Le){case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.SCRIPT_DATA_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(Le)}}_statePlaintext(Le){switch(Le){case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(Le)}}_stateTagOpen(Le){if(isAsciiLetter(Le))this._createStartTagToken(),this.state=State$1.TAG_NAME,this._stateTagName(Le);else switch(Le){case CODE_POINTS.EXCLAMATION_MARK:{this.state=State$1.MARKUP_DECLARATION_OPEN;break}case CODE_POINTS.SOLIDUS:{this.state=State$1.END_TAG_OPEN;break}case CODE_POINTS.QUESTION_MARK:{this._err(ERR.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=State$1.BOGUS_COMMENT,this._stateBogusComment(Le);break}case CODE_POINTS.EOF:{this._err(ERR.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ERR.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=State$1.DATA,this._stateData(Le)}}_stateEndTagOpen(Le){if(isAsciiLetter(Le))this._createEndTagToken(),this.state=State$1.TAG_NAME,this._stateTagName(Le);else switch(Le){case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingEndTagName),this.state=State$1.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ERR.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=State$1.BOGUS_COMMENT,this._stateBogusComment(Le)}}_stateTagName(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:{this.state=State$1.BEFORE_ATTRIBUTE_NAME;break}case CODE_POINTS.SOLIDUS:{this.state=State$1.SELF_CLOSING_START_TAG;break}case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.DATA,this.emitCurrentTagToken();break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),Ye.tagName+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.EOF:{this._err(ERR.eofInTag),this._emitEOFToken();break}default:Ye.tagName+=String.fromCodePoint(isAsciiUpper(Le)?toAsciiLower(Le):Le)}}_stateRcdataLessThanSign(Le){Le===CODE_POINTS.SOLIDUS?this.state=State$1.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=State$1.RCDATA,this._stateRcdata(Le))}_stateRcdataEndTagOpen(Le){isAsciiLetter(Le)?(this.state=State$1.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(Le)):(this._emitChars("</"),this.state=State$1.RCDATA,this._stateRcdata(Le))}handleSpecialEndTag(Le){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const Ye=this.currentToken;switch(Ye.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=State$1.BEFORE_ATTRIBUTE_NAME,!1;case CODE_POINTS.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=State$1.SELF_CLOSING_START_TAG,!1;case CODE_POINTS.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=State$1.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(Le){this.handleSpecialEndTag(Le)&&(this._emitChars("</"),this.state=State$1.RCDATA,this._stateRcdata(Le))}_stateRawtextLessThanSign(Le){Le===CODE_POINTS.SOLIDUS?this.state=State$1.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=State$1.RAWTEXT,this._stateRawtext(Le))}_stateRawtextEndTagOpen(Le){isAsciiLetter(Le)?(this.state=State$1.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(Le)):(this._emitChars("</"),this.state=State$1.RAWTEXT,this._stateRawtext(Le))}_stateRawtextEndTagName(Le){this.handleSpecialEndTag(Le)&&(this._emitChars("</"),this.state=State$1.RAWTEXT,this._stateRawtext(Le))}_stateScriptDataLessThanSign(Le){switch(Le){case CODE_POINTS.SOLIDUS:{this.state=State$1.SCRIPT_DATA_END_TAG_OPEN;break}case CODE_POINTS.EXCLAMATION_MARK:{this.state=State$1.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=State$1.SCRIPT_DATA,this._stateScriptData(Le)}}_stateScriptDataEndTagOpen(Le){isAsciiLetter(Le)?(this.state=State$1.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(Le)):(this._emitChars("</"),this.state=State$1.SCRIPT_DATA,this._stateScriptData(Le))}_stateScriptDataEndTagName(Le){this.handleSpecialEndTag(Le)&&(this._emitChars("</"),this.state=State$1.SCRIPT_DATA,this._stateScriptData(Le))}_stateScriptDataEscapeStart(Le){Le===CODE_POINTS.HYPHEN_MINUS?(this.state=State$1.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=State$1.SCRIPT_DATA,this._stateScriptData(Le))}_stateScriptDataEscapeStartDash(Le){Le===CODE_POINTS.HYPHEN_MINUS?(this.state=State$1.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=State$1.SCRIPT_DATA,this._stateScriptData(Le))}_stateScriptDataEscaped(Le){switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this.state=State$1.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(Le)}}_stateScriptDataEscapedDash(Le){switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this.state=State$1.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.state=State$1.SCRIPT_DATA_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=State$1.SCRIPT_DATA_ESCAPED,this._emitCodePoint(Le)}}_stateScriptDataEscapedDashDash(Le){switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this._emitChars("-");break}case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.SCRIPT_DATA,this._emitChars(">");break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.state=State$1.SCRIPT_DATA_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=State$1.SCRIPT_DATA_ESCAPED,this._emitCodePoint(Le)}}_stateScriptDataEscapedLessThanSign(Le){Le===CODE_POINTS.SOLIDUS?this.state=State$1.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:isAsciiLetter(Le)?(this._emitChars("<"),this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(Le)):(this._emitChars("<"),this.state=State$1.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(Le))}_stateScriptDataEscapedEndTagOpen(Le){isAsciiLetter(Le)?(this.state=State$1.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(Le)):(this._emitChars("</"),this.state=State$1.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(Le))}_stateScriptDataEscapedEndTagName(Le){this.handleSpecialEndTag(Le)&&(this._emitChars("</"),this.state=State$1.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(Le))}_stateScriptDataDoubleEscapeStart(Le){if(this.preprocessor.startsWith(SEQUENCES.SCRIPT,!1)&&isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))){this._emitCodePoint(Le);for(let Ye=0;Ye<SEQUENCES.SCRIPT.length;Ye++)this._emitCodePoint(this._consume());this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=State$1.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(Le))}_stateScriptDataDoubleEscaped(Le){switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(Le)}}_stateScriptDataDoubleEscapedDash(Le){switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(Le)}}_stateScriptDataDoubleEscapedDashDash(Le){switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this._emitChars("-");break}case CODE_POINTS.LESS_THAN_SIGN:{this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.SCRIPT_DATA,this._emitChars(">");break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(REPLACEMENT_CHARACTER);break}case CODE_POINTS.EOF:{this._err(ERR.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(Le)}}_stateScriptDataDoubleEscapedLessThanSign(Le){Le===CODE_POINTS.SOLIDUS?(this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(Le))}_stateScriptDataDoubleEscapeEnd(Le){if(this.preprocessor.startsWith(SEQUENCES.SCRIPT,!1)&&isScriptDataDoubleEscapeSequenceEnd(this.preprocessor.peek(SEQUENCES.SCRIPT.length))){this._emitCodePoint(Le);for(let Ye=0;Ye<SEQUENCES.SCRIPT.length;Ye++)this._emitCodePoint(this._consume());this.state=State$1.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=State$1.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(Le))}_stateBeforeAttributeName(Le){switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.SOLIDUS:case CODE_POINTS.GREATER_THAN_SIGN:case CODE_POINTS.EOF:{this.state=State$1.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(Le);break}case CODE_POINTS.EQUALS_SIGN:{this._err(ERR.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=State$1.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=State$1.ATTRIBUTE_NAME,this._stateAttributeName(Le)}}_stateAttributeName(Le){switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:case CODE_POINTS.SOLIDUS:case CODE_POINTS.GREATER_THAN_SIGN:case CODE_POINTS.EOF:{this._leaveAttrName(),this.state=State$1.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(Le);break}case CODE_POINTS.EQUALS_SIGN:{this._leaveAttrName(),this.state=State$1.BEFORE_ATTRIBUTE_VALUE;break}case CODE_POINTS.QUOTATION_MARK:case CODE_POINTS.APOSTROPHE:case CODE_POINTS.LESS_THAN_SIGN:{this._err(ERR.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(Le);break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.currentAttr.name+=REPLACEMENT_CHARACTER;break}default:this.currentAttr.name+=String.fromCodePoint(isAsciiUpper(Le)?toAsciiLower(Le):Le)}}_stateAfterAttributeName(Le){switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.SOLIDUS:{this.state=State$1.SELF_CLOSING_START_TAG;break}case CODE_POINTS.EQUALS_SIGN:{this.state=State$1.BEFORE_ATTRIBUTE_VALUE;break}case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.DATA,this.emitCurrentTagToken();break}case CODE_POINTS.EOF:{this._err(ERR.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=State$1.ATTRIBUTE_NAME,this._stateAttributeName(Le)}}_stateBeforeAttributeValue(Le){switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.QUOTATION_MARK:{this.state=State$1.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case CODE_POINTS.APOSTROPHE:{this.state=State$1.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingAttributeValue),this.state=State$1.DATA,this.emitCurrentTagToken();break}default:this.state=State$1.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(Le)}}_stateAttributeValueDoubleQuoted(Le){switch(Le){case CODE_POINTS.QUOTATION_MARK:{this.state=State$1.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case CODE_POINTS.AMPERSAND:{this._startCharacterReference();break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.currentAttr.value+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.EOF:{this._err(ERR.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(Le)}}_stateAttributeValueSingleQuoted(Le){switch(Le){case CODE_POINTS.APOSTROPHE:{this.state=State$1.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case CODE_POINTS.AMPERSAND:{this._startCharacterReference();break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.currentAttr.value+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.EOF:{this._err(ERR.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(Le)}}_stateAttributeValueUnquoted(Le){switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:{this._leaveAttrValue(),this.state=State$1.BEFORE_ATTRIBUTE_NAME;break}case CODE_POINTS.AMPERSAND:{this._startCharacterReference();break}case CODE_POINTS.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=State$1.DATA,this.emitCurrentTagToken();break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this.currentAttr.value+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.QUOTATION_MARK:case CODE_POINTS.APOSTROPHE:case CODE_POINTS.LESS_THAN_SIGN:case CODE_POINTS.EQUALS_SIGN:case CODE_POINTS.GRAVE_ACCENT:{this._err(ERR.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(Le);break}case CODE_POINTS.EOF:{this._err(ERR.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(Le)}}_stateAfterAttributeValueQuoted(Le){switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:{this._leaveAttrValue(),this.state=State$1.BEFORE_ATTRIBUTE_NAME;break}case CODE_POINTS.SOLIDUS:{this._leaveAttrValue(),this.state=State$1.SELF_CLOSING_START_TAG;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=State$1.DATA,this.emitCurrentTagToken();break}case CODE_POINTS.EOF:{this._err(ERR.eofInTag),this._emitEOFToken();break}default:this._err(ERR.missingWhitespaceBetweenAttributes),this.state=State$1.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(Le)}}_stateSelfClosingStartTag(Le){switch(Le){case CODE_POINTS.GREATER_THAN_SIGN:{const Ye=this.currentToken;Ye.selfClosing=!0,this.state=State$1.DATA,this.emitCurrentTagToken();break}case CODE_POINTS.EOF:{this._err(ERR.eofInTag),this._emitEOFToken();break}default:this._err(ERR.unexpectedSolidusInTag),this.state=State$1.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(Le)}}_stateBogusComment(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.DATA,this.emitCurrentComment(Ye);break}case CODE_POINTS.EOF:{this.emitCurrentComment(Ye),this._emitEOFToken();break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),Ye.data+=REPLACEMENT_CHARACTER;break}default:Ye.data+=String.fromCodePoint(Le)}}_stateMarkupDeclarationOpen(Le){this._consumeSequenceIfMatch(SEQUENCES.DASH_DASH,!0)?(this._createCommentToken(SEQUENCES.DASH_DASH.length+1),this.state=State$1.COMMENT_START):this._consumeSequenceIfMatch(SEQUENCES.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(SEQUENCES.DOCTYPE.length+1),this.state=State$1.DOCTYPE):this._consumeSequenceIfMatch(SEQUENCES.CDATA_START,!0)?this.inForeignNode?this.state=State$1.CDATA_SECTION:(this._err(ERR.cdataInHtmlContent),this._createCommentToken(SEQUENCES.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=State$1.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ERR.incorrectlyOpenedComment),this._createCommentToken(2),this.state=State$1.BOGUS_COMMENT,this._stateBogusComment(Le))}_stateCommentStart(Le){switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this.state=State$1.COMMENT_START_DASH;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.abruptClosingOfEmptyComment),this.state=State$1.DATA;const Ye=this.currentToken;this.emitCurrentComment(Ye);break}default:this.state=State$1.COMMENT,this._stateComment(Le)}}_stateCommentStartDash(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this.state=State$1.COMMENT_END;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.abruptClosingOfEmptyComment),this.state=State$1.DATA,this.emitCurrentComment(Ye);break}case CODE_POINTS.EOF:{this._err(ERR.eofInComment),this.emitCurrentComment(Ye),this._emitEOFToken();break}default:Ye.data+="-",this.state=State$1.COMMENT,this._stateComment(Le)}}_stateComment(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this.state=State$1.COMMENT_END_DASH;break}case CODE_POINTS.LESS_THAN_SIGN:{Ye.data+="<",this.state=State$1.COMMENT_LESS_THAN_SIGN;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),Ye.data+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.EOF:{this._err(ERR.eofInComment),this.emitCurrentComment(Ye),this._emitEOFToken();break}default:Ye.data+=String.fromCodePoint(Le)}}_stateCommentLessThanSign(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.EXCLAMATION_MARK:{Ye.data+="!",this.state=State$1.COMMENT_LESS_THAN_SIGN_BANG;break}case CODE_POINTS.LESS_THAN_SIGN:{Ye.data+="<";break}default:this.state=State$1.COMMENT,this._stateComment(Le)}}_stateCommentLessThanSignBang(Le){Le===CODE_POINTS.HYPHEN_MINUS?this.state=State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=State$1.COMMENT,this._stateComment(Le))}_stateCommentLessThanSignBangDash(Le){Le===CODE_POINTS.HYPHEN_MINUS?this.state=State$1.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=State$1.COMMENT_END_DASH,this._stateCommentEndDash(Le))}_stateCommentLessThanSignBangDashDash(Le){Le!==CODE_POINTS.GREATER_THAN_SIGN&&Le!==CODE_POINTS.EOF&&this._err(ERR.nestedComment),this.state=State$1.COMMENT_END,this._stateCommentEnd(Le)}_stateCommentEndDash(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.HYPHEN_MINUS:{this.state=State$1.COMMENT_END;break}case CODE_POINTS.EOF:{this._err(ERR.eofInComment),this.emitCurrentComment(Ye),this._emitEOFToken();break}default:Ye.data+="-",this.state=State$1.COMMENT,this._stateComment(Le)}}_stateCommentEnd(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.DATA,this.emitCurrentComment(Ye);break}case CODE_POINTS.EXCLAMATION_MARK:{this.state=State$1.COMMENT_END_BANG;break}case CODE_POINTS.HYPHEN_MINUS:{Ye.data+="-";break}case CODE_POINTS.EOF:{this._err(ERR.eofInComment),this.emitCurrentComment(Ye),this._emitEOFToken();break}default:Ye.data+="--",this.state=State$1.COMMENT,this._stateComment(Le)}}_stateCommentEndBang(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.HYPHEN_MINUS:{Ye.data+="--!",this.state=State$1.COMMENT_END_DASH;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.incorrectlyClosedComment),this.state=State$1.DATA,this.emitCurrentComment(Ye);break}case CODE_POINTS.EOF:{this._err(ERR.eofInComment),this.emitCurrentComment(Ye),this._emitEOFToken();break}default:Ye.data+="--!",this.state=State$1.COMMENT,this._stateComment(Le)}}_stateDoctype(Le){switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:{this.state=State$1.BEFORE_DOCTYPE_NAME;break}case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(Le);break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),this._createDoctypeToken(null);const Ye=this.currentToken;Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._err(ERR.missingWhitespaceBeforeDoctypeName),this.state=State$1.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(Le)}}_stateBeforeDoctypeName(Le){if(isAsciiUpper(Le))this._createDoctypeToken(String.fromCharCode(toAsciiLower(Le))),this.state=State$1.DOCTYPE_NAME;else switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),this._createDoctypeToken(REPLACEMENT_CHARACTER),this.state=State$1.DOCTYPE_NAME;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingDoctypeName),this._createDoctypeToken(null);const Ye=this.currentToken;Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this.state=State$1.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),this._createDoctypeToken(null);const Ye=this.currentToken;Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(Le)),this.state=State$1.DOCTYPE_NAME}}_stateDoctypeName(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:{this.state=State$1.AFTER_DOCTYPE_NAME;break}case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.DATA,this.emitCurrentDoctype(Ye);break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),Ye.name+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:Ye.name+=String.fromCodePoint(isAsciiUpper(Le)?toAsciiLower(Le):Le)}}_stateAfterDoctypeName(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.DATA,this.emitCurrentDoctype(Ye);break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(SEQUENCES.PUBLIC,!1)?this.state=State$1.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(SEQUENCES.SYSTEM,!1)?this.state=State$1.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ERR.invalidCharacterSequenceAfterDoctypeName),Ye.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(Le))}}_stateAfterDoctypePublicKeyword(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:{this.state=State$1.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case CODE_POINTS.QUOTATION_MARK:{this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword),Ye.publicId="",this.state=State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case CODE_POINTS.APOSTROPHE:{this._err(ERR.missingWhitespaceAfterDoctypePublicKeyword),Ye.publicId="",this.state=State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingDoctypePublicIdentifier),Ye.forceQuirks=!0,this.state=State$1.DATA,this.emitCurrentDoctype(Ye);break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier),Ye.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(Le)}}_stateBeforeDoctypePublicIdentifier(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.QUOTATION_MARK:{Ye.publicId="",this.state=State$1.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case CODE_POINTS.APOSTROPHE:{Ye.publicId="",this.state=State$1.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingDoctypePublicIdentifier),Ye.forceQuirks=!0,this.state=State$1.DATA,this.emitCurrentDoctype(Ye);break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._err(ERR.missingQuoteBeforeDoctypePublicIdentifier),Ye.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(Le)}}_stateDoctypePublicIdentifierDoubleQuoted(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.QUOTATION_MARK:{this.state=State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),Ye.publicId+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.abruptDoctypePublicIdentifier),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this.state=State$1.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:Ye.publicId+=String.fromCodePoint(Le)}}_stateDoctypePublicIdentifierSingleQuoted(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.APOSTROPHE:{this.state=State$1.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),Ye.publicId+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.abruptDoctypePublicIdentifier),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this.state=State$1.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:Ye.publicId+=String.fromCodePoint(Le)}}_stateAfterDoctypePublicIdentifier(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:{this.state=State$1.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.DATA,this.emitCurrentDoctype(Ye);break}case CODE_POINTS.QUOTATION_MARK:{this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),Ye.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case CODE_POINTS.APOSTROPHE:{this._err(ERR.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),Ye.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier),Ye.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(Le)}}_stateBetweenDoctypePublicAndSystemIdentifiers(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.GREATER_THAN_SIGN:{this.emitCurrentDoctype(Ye),this.state=State$1.DATA;break}case CODE_POINTS.QUOTATION_MARK:{Ye.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case CODE_POINTS.APOSTROPHE:{Ye.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier),Ye.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(Le)}}_stateAfterDoctypeSystemKeyword(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:{this.state=State$1.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case CODE_POINTS.QUOTATION_MARK:{this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword),Ye.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case CODE_POINTS.APOSTROPHE:{this._err(ERR.missingWhitespaceAfterDoctypeSystemKeyword),Ye.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingDoctypeSystemIdentifier),Ye.forceQuirks=!0,this.state=State$1.DATA,this.emitCurrentDoctype(Ye);break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier),Ye.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(Le)}}_stateBeforeDoctypeSystemIdentifier(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.QUOTATION_MARK:{Ye.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case CODE_POINTS.APOSTROPHE:{Ye.systemId="",this.state=State$1.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.missingDoctypeSystemIdentifier),Ye.forceQuirks=!0,this.state=State$1.DATA,this.emitCurrentDoctype(Ye);break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._err(ERR.missingQuoteBeforeDoctypeSystemIdentifier),Ye.forceQuirks=!0,this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(Le)}}_stateDoctypeSystemIdentifierDoubleQuoted(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.QUOTATION_MARK:{this.state=State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),Ye.systemId+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.abruptDoctypeSystemIdentifier),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this.state=State$1.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:Ye.systemId+=String.fromCodePoint(Le)}}_stateDoctypeSystemIdentifierSingleQuoted(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.APOSTROPHE:{this.state=State$1.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter),Ye.systemId+=REPLACEMENT_CHARACTER;break}case CODE_POINTS.GREATER_THAN_SIGN:{this._err(ERR.abruptDoctypeSystemIdentifier),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this.state=State$1.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:Ye.systemId+=String.fromCodePoint(Le)}}_stateAfterDoctypeSystemIdentifier(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.SPACE:case CODE_POINTS.LINE_FEED:case CODE_POINTS.TABULATION:case CODE_POINTS.FORM_FEED:break;case CODE_POINTS.GREATER_THAN_SIGN:{this.emitCurrentDoctype(Ye),this.state=State$1.DATA;break}case CODE_POINTS.EOF:{this._err(ERR.eofInDoctype),Ye.forceQuirks=!0,this.emitCurrentDoctype(Ye),this._emitEOFToken();break}default:this._err(ERR.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=State$1.BOGUS_DOCTYPE,this._stateBogusDoctype(Le)}}_stateBogusDoctype(Le){const Ye=this.currentToken;switch(Le){case CODE_POINTS.GREATER_THAN_SIGN:{this.emitCurrentDoctype(Ye),this.state=State$1.DATA;break}case CODE_POINTS.NULL:{this._err(ERR.unexpectedNullCharacter);break}case CODE_POINTS.EOF:{this.emitCurrentDoctype(Ye),this._emitEOFToken();break}}}_stateCdataSection(Le){switch(Le){case CODE_POINTS.RIGHT_SQUARE_BRACKET:{this.state=State$1.CDATA_SECTION_BRACKET;break}case CODE_POINTS.EOF:{this._err(ERR.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(Le)}}_stateCdataSectionBracket(Le){Le===CODE_POINTS.RIGHT_SQUARE_BRACKET?this.state=State$1.CDATA_SECTION_END:(this._emitChars("]"),this.state=State$1.CDATA_SECTION,this._stateCdataSection(Le))}_stateCdataSectionEnd(Le){switch(Le){case CODE_POINTS.GREATER_THAN_SIGN:{this.state=State$1.DATA;break}case CODE_POINTS.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=State$1.CDATA_SECTION,this._stateCdataSection(Le)}}_stateCharacterReference(){let Le=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(Le<0)if(this.preprocessor.lastChunkWritten)Le=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}Le===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(CODE_POINTS.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&isAsciiAlphaNumeric(this.preprocessor.peek(1))?State$1.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(Le){isAsciiAlphaNumeric(Le)?this._flushCodePointConsumedAsCharacterReference(Le):(Le===CODE_POINTS.SEMICOLON&&this._err(ERR.unknownNamedCharacterReference),this.state=this.returnState,this._callState(Le))}}const IMPLICIT_END_TAG_REQUIRED=new Set([TAG_ID.DD,TAG_ID.DT,TAG_ID.LI,TAG_ID.OPTGROUP,TAG_ID.OPTION,TAG_ID.P,TAG_ID.RB,TAG_ID.RP,TAG_ID.RT,TAG_ID.RTC]),IMPLICIT_END_TAG_REQUIRED_THOROUGHLY=new Set([...IMPLICIT_END_TAG_REQUIRED,TAG_ID.CAPTION,TAG_ID.COLGROUP,TAG_ID.TBODY,TAG_ID.TD,TAG_ID.TFOOT,TAG_ID.TH,TAG_ID.THEAD,TAG_ID.TR]),SCOPING_ELEMENTS_HTML=new Set([TAG_ID.APPLET,TAG_ID.CAPTION,TAG_ID.HTML,TAG_ID.MARQUEE,TAG_ID.OBJECT,TAG_ID.TABLE,TAG_ID.TD,TAG_ID.TEMPLATE,TAG_ID.TH]),SCOPING_ELEMENTS_HTML_LIST=new Set([...SCOPING_ELEMENTS_HTML,TAG_ID.OL,TAG_ID.UL]),SCOPING_ELEMENTS_HTML_BUTTON=new Set([...SCOPING_ELEMENTS_HTML,TAG_ID.BUTTON]),SCOPING_ELEMENTS_MATHML=new Set([TAG_ID.ANNOTATION_XML,TAG_ID.MI,TAG_ID.MN,TAG_ID.MO,TAG_ID.MS,TAG_ID.MTEXT]),SCOPING_ELEMENTS_SVG=new Set([TAG_ID.DESC,TAG_ID.FOREIGN_OBJECT,TAG_ID.TITLE]),TABLE_ROW_CONTEXT=new Set([TAG_ID.TR,TAG_ID.TEMPLATE,TAG_ID.HTML]),TABLE_BODY_CONTEXT=new Set([TAG_ID.TBODY,TAG_ID.TFOOT,TAG_ID.THEAD,TAG_ID.TEMPLATE,TAG_ID.HTML]),TABLE_CONTEXT=new Set([TAG_ID.TABLE,TAG_ID.TEMPLATE,TAG_ID.HTML]),TABLE_CELLS=new Set([TAG_ID.TD,TAG_ID.TH]);class OpenElementStack{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(Le,Ye,tt){this.treeAdapter=Ye,this.handler=tt,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=TAG_ID.UNKNOWN,this.current=Le}_indexOf(Le){return this.items.lastIndexOf(Le,this.stackTop)}_isInTemplate(){return this.currentTagId===TAG_ID.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===NS.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(Le,Ye){this.stackTop++,this.items[this.stackTop]=Le,this.current=Le,this.tagIDs[this.stackTop]=Ye,this.currentTagId=Ye,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(Le,Ye,!0)}pop(){const Le=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(Le,!0)}replace(Le,Ye){const tt=this._indexOf(Le);this.items[tt]=Ye,tt===this.stackTop&&(this.current=Ye)}insertAfter(Le,Ye,tt){const nt=this._indexOf(Le)+1;this.items.splice(nt,0,Ye),this.tagIDs.splice(nt,0,tt),this.stackTop++,nt===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,nt===this.stackTop)}popUntilTagNamePopped(Le){let Ye=this.stackTop+1;do Ye=this.tagIDs.lastIndexOf(Le,Ye-1);while(Ye>0&&this.treeAdapter.getNamespaceURI(this.items[Ye])!==NS.HTML);this.shortenToLength(Math.max(Ye,0))}shortenToLength(Le){for(;this.stackTop>=Le;){const Ye=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(Ye,this.stackTop<Le)}}popUntilElementPopped(Le){const Ye=this._indexOf(Le);this.shortenToLength(Math.max(Ye,0))}popUntilPopped(Le,Ye){const tt=this._indexOfTagNames(Le,Ye);this.shortenToLength(Math.max(tt,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(NUMBERED_HEADERS,NS.HTML)}popUntilTableCellPopped(){this.popUntilPopped(TABLE_CELLS,NS.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(Le,Ye){for(let tt=this.stackTop;tt>=0;tt--)if(Le.has(this.tagIDs[tt])&&this.treeAdapter.getNamespaceURI(this.items[tt])===Ye)return tt;return-1}clearBackTo(Le,Ye){const tt=this._indexOfTagNames(Le,Ye);this.shortenToLength(tt+1)}clearBackToTableContext(){this.clearBackTo(TABLE_CONTEXT,NS.HTML)}clearBackToTableBodyContext(){this.clearBackTo(TABLE_BODY_CONTEXT,NS.HTML)}clearBackToTableRowContext(){this.clearBackTo(TABLE_ROW_CONTEXT,NS.HTML)}remove(Le){const Ye=this._indexOf(Le);Ye>=0&&(Ye===this.stackTop?this.pop():(this.items.splice(Ye,1),this.tagIDs.splice(Ye,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(Le,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===TAG_ID.BODY?this.items[1]:null}contains(Le){return this._indexOf(Le)>-1}getCommonAncestor(Le){const Ye=this._indexOf(Le)-1;return Ye>=0?this.items[Ye]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===TAG_ID.HTML}hasInDynamicScope(Le,Ye){for(let tt=this.stackTop;tt>=0;tt--){const nt=this.tagIDs[tt];switch(this.treeAdapter.getNamespaceURI(this.items[tt])){case NS.HTML:{if(nt===Le)return!0;if(Ye.has(nt))return!1;break}case NS.SVG:{if(SCOPING_ELEMENTS_SVG.has(nt))return!1;break}case NS.MATHML:{if(SCOPING_ELEMENTS_MATHML.has(nt))return!1;break}}}return!0}hasInScope(Le){return this.hasInDynamicScope(Le,SCOPING_ELEMENTS_HTML)}hasInListItemScope(Le){return this.hasInDynamicScope(Le,SCOPING_ELEMENTS_HTML_LIST)}hasInButtonScope(Le){return this.hasInDynamicScope(Le,SCOPING_ELEMENTS_HTML_BUTTON)}hasNumberedHeaderInScope(){for(let Le=this.stackTop;Le>=0;Le--){const Ye=this.tagIDs[Le];switch(this.treeAdapter.getNamespaceURI(this.items[Le])){case NS.HTML:{if(NUMBERED_HEADERS.has(Ye))return!0;if(SCOPING_ELEMENTS_HTML.has(Ye))return!1;break}case NS.SVG:{if(SCOPING_ELEMENTS_SVG.has(Ye))return!1;break}case NS.MATHML:{if(SCOPING_ELEMENTS_MATHML.has(Ye))return!1;break}}}return!0}hasInTableScope(Le){for(let Ye=this.stackTop;Ye>=0;Ye--)if(this.treeAdapter.getNamespaceURI(this.items[Ye])===NS.HTML)switch(this.tagIDs[Ye]){case Le:return!0;case TAG_ID.TABLE:case TAG_ID.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let Le=this.stackTop;Le>=0;Le--)if(this.treeAdapter.getNamespaceURI(this.items[Le])===NS.HTML)switch(this.tagIDs[Le]){case TAG_ID.TBODY:case TAG_ID.THEAD:case TAG_ID.TFOOT:return!0;case TAG_ID.TABLE:case TAG_ID.HTML:return!1}return!0}hasInSelectScope(Le){for(let Ye=this.stackTop;Ye>=0;Ye--)if(this.treeAdapter.getNamespaceURI(this.items[Ye])===NS.HTML)switch(this.tagIDs[Ye]){case Le:return!0;case TAG_ID.OPTION:case TAG_ID.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&IMPLICIT_END_TAG_REQUIRED.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(Le){for(;this.currentTagId!==void 0&&this.currentTagId!==Le&&IMPLICIT_END_TAG_REQUIRED_THOROUGHLY.has(this.currentTagId);)this.pop()}}const NOAH_ARK_CAPACITY=3;var EntryType;(function(Be){Be[Be.Marker=0]="Marker",Be[Be.Element=1]="Element"})(EntryType||(EntryType={}));const MARKER={type:EntryType.Marker};class FormattingElementList{constructor(Le){this.treeAdapter=Le,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(Le,Ye){const tt=[],nt=Ye.length,ft=this.treeAdapter.getTagName(Le),ht=this.treeAdapter.getNamespaceURI(Le);for(let gt=0;gt<this.entries.length;gt++){const At=this.entries[gt];if(At.type===EntryType.Marker)break;const{element:xt}=At;if(this.treeAdapter.getTagName(xt)===ft&&this.treeAdapter.getNamespaceURI(xt)===ht){const Et=this.treeAdapter.getAttrList(xt);Et.length===nt&&tt.push({idx:gt,attrs:Et})}}return tt}_ensureNoahArkCondition(Le){if(this.entries.length<NOAH_ARK_CAPACITY)return;const Ye=this.treeAdapter.getAttrList(Le),tt=this._getNoahArkConditionCandidates(Le,Ye);if(tt.length<NOAH_ARK_CAPACITY)return;const nt=new Map(Ye.map(ht=>[ht.name,ht.value]));let ft=0;for(let ht=0;ht<tt.length;ht++){const gt=tt[ht];gt.attrs.every(At=>nt.get(At.name)===At.value)&&(ft+=1,ft>=NOAH_ARK_CAPACITY&&this.entries.splice(gt.idx,1))}}insertMarker(){this.entries.unshift(MARKER)}pushElement(Le,Ye){this._ensureNoahArkCondition(Le),this.entries.unshift({type:EntryType.Element,element:Le,token:Ye})}insertElementAfterBookmark(Le,Ye){const tt=this.entries.indexOf(this.bookmark);this.entries.splice(tt,0,{type:EntryType.Element,element:Le,token:Ye})}removeEntry(Le){const Ye=this.entries.indexOf(Le);Ye!==-1&&this.entries.splice(Ye,1)}clearToLastMarker(){const Le=this.entries.indexOf(MARKER);Le===-1?this.entries.length=0:this.entries.splice(0,Le+1)}getElementEntryInScopeWithTagName(Le){const Ye=this.entries.find(tt=>tt.type===EntryType.Marker||this.treeAdapter.getTagName(tt.element)===Le);return Ye&&Ye.type===EntryType.Element?Ye:null}getElementEntry(Le){return this.entries.find(Ye=>Ye.type===EntryType.Element&&Ye.element===Le)}}const defaultTreeAdapter={createDocument(){return{nodeName:"#document",mode:DOCUMENT_MODE.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(Be,Le,Ye){return{nodeName:Be,tagName:Be,attrs:Ye,namespaceURI:Le,childNodes:[],parentNode:null}},createCommentNode(Be){return{nodeName:"#comment",data:Be,parentNode:null}},createTextNode(Be){return{nodeName:"#text",value:Be,parentNode:null}},appendChild(Be,Le){Be.childNodes.push(Le),Le.parentNode=Be},insertBefore(Be,Le,Ye){const tt=Be.childNodes.indexOf(Ye);Be.childNodes.splice(tt,0,Le),Le.parentNode=Be},setTemplateContent(Be,Le){Be.content=Le},getTemplateContent(Be){return Be.content},setDocumentType(Be,Le,Ye,tt){const nt=Be.childNodes.find(ft=>ft.nodeName==="#documentType");if(nt)nt.name=Le,nt.publicId=Ye,nt.systemId=tt;else{const ft={nodeName:"#documentType",name:Le,publicId:Ye,systemId:tt,parentNode:null};defaultTreeAdapter.appendChild(Be,ft)}},setDocumentMode(Be,Le){Be.mode=Le},getDocumentMode(Be){return Be.mode},detachNode(Be){if(Be.parentNode){const Le=Be.parentNode.childNodes.indexOf(Be);Be.parentNode.childNodes.splice(Le,1),Be.parentNode=null}},insertText(Be,Le){if(Be.childNodes.length>0){const Ye=Be.childNodes[Be.childNodes.length-1];if(defaultTreeAdapter.isTextNode(Ye)){Ye.value+=Le;return}}defaultTreeAdapter.appendChild(Be,defaultTreeAdapter.createTextNode(Le))},insertTextBefore(Be,Le,Ye){const tt=Be.childNodes[Be.childNodes.indexOf(Ye)-1];tt&&defaultTreeAdapter.isTextNode(tt)?tt.value+=Le:defaultTreeAdapter.insertBefore(Be,defaultTreeAdapter.createTextNode(Le),Ye)},adoptAttributes(Be,Le){const Ye=new Set(Be.attrs.map(tt=>tt.name));for(let tt=0;tt<Le.length;tt++)Ye.has(Le[tt].name)||Be.attrs.push(Le[tt])},getFirstChild(Be){return Be.childNodes[0]},getChildNodes(Be){return Be.childNodes},getParentNode(Be){return Be.parentNode},getAttrList(Be){return Be.attrs},getTagName(Be){return Be.tagName},getNamespaceURI(Be){return Be.namespaceURI},getTextNodeContent(Be){return Be.value},getCommentNodeContent(Be){return Be.data},getDocumentTypeNodeName(Be){return Be.name},getDocumentTypeNodePublicId(Be){return Be.publicId},getDocumentTypeNodeSystemId(Be){return Be.systemId},isTextNode(Be){return Be.nodeName==="#text"},isCommentNode(Be){return Be.nodeName==="#comment"},isDocumentTypeNode(Be){return Be.nodeName==="#documentType"},isElementNode(Be){return Object.prototype.hasOwnProperty.call(Be,"tagName")},setNodeSourceCodeLocation(Be,Le){Be.sourceCodeLocation=Le},getNodeSourceCodeLocation(Be){return Be.sourceCodeLocation},updateNodeSourceCodeLocation(Be,Le){Be.sourceCodeLocation={...Be.sourceCodeLocation,...Le}}},VALID_DOCTYPE_NAME="html",VALID_SYSTEM_ID="about:legacy-compat",QUIRKS_MODE_SYSTEM_ID="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",QUIRKS_MODE_PUBLIC_ID_PREFIXES=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES=[...QUIRKS_MODE_PUBLIC_ID_PREFIXES,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],QUIRKS_MODE_PUBLIC_IDS=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),LIMITED_QUIRKS_PUBLIC_ID_PREFIXES=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES=[...LIMITED_QUIRKS_PUBLIC_ID_PREFIXES,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function hasPrefix(Be,Le){return Le.some(Ye=>Be.startsWith(Ye))}function isConforming(Be){return Be.name===VALID_DOCTYPE_NAME&&Be.publicId===null&&(Be.systemId===null||Be.systemId===VALID_SYSTEM_ID)}function getDocumentMode(Be){if(Be.name!==VALID_DOCTYPE_NAME)return DOCUMENT_MODE.QUIRKS;const{systemId:Le}=Be;if(Le&&Le.toLowerCase()===QUIRKS_MODE_SYSTEM_ID)return DOCUMENT_MODE.QUIRKS;let{publicId:Ye}=Be;if(Ye!==null){if(Ye=Ye.toLowerCase(),QUIRKS_MODE_PUBLIC_IDS.has(Ye))return DOCUMENT_MODE.QUIRKS;let tt=Le===null?QUIRKS_MODE_NO_SYSTEM_ID_PUBLIC_ID_PREFIXES:QUIRKS_MODE_PUBLIC_ID_PREFIXES;if(hasPrefix(Ye,tt))return DOCUMENT_MODE.QUIRKS;if(tt=Le===null?LIMITED_QUIRKS_PUBLIC_ID_PREFIXES:LIMITED_QUIRKS_WITH_SYSTEM_ID_PUBLIC_ID_PREFIXES,hasPrefix(Ye,tt))return DOCUMENT_MODE.LIMITED_QUIRKS}return DOCUMENT_MODE.NO_QUIRKS}const MIME_TYPES={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},DEFINITION_URL_ATTR="definitionurl",ADJUSTED_DEFINITION_URL_ATTR="definitionURL",SVG_ATTRS_ADJUSTMENT_MAP=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(Be=>[Be.toLowerCase(),Be])),XML_ATTRS_ADJUSTMENT_MAP=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:NS.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:NS.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:NS.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:NS.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:NS.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:NS.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:NS.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:NS.XML}],["xml:space",{prefix:"xml",name:"space",namespace:NS.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:NS.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:NS.XMLNS}]]),SVG_TAG_NAMES_ADJUSTMENT_MAP=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(Be=>[Be.toLowerCase(),Be])),EXITS_FOREIGN_CONTENT=new Set([TAG_ID.B,TAG_ID.BIG,TAG_ID.BLOCKQUOTE,TAG_ID.BODY,TAG_ID.BR,TAG_ID.CENTER,TAG_ID.CODE,TAG_ID.DD,TAG_ID.DIV,TAG_ID.DL,TAG_ID.DT,TAG_ID.EM,TAG_ID.EMBED,TAG_ID.H1,TAG_ID.H2,TAG_ID.H3,TAG_ID.H4,TAG_ID.H5,TAG_ID.H6,TAG_ID.HEAD,TAG_ID.HR,TAG_ID.I,TAG_ID.IMG,TAG_ID.LI,TAG_ID.LISTING,TAG_ID.MENU,TAG_ID.META,TAG_ID.NOBR,TAG_ID.OL,TAG_ID.P,TAG_ID.PRE,TAG_ID.RUBY,TAG_ID.S,TAG_ID.SMALL,TAG_ID.SPAN,TAG_ID.STRONG,TAG_ID.STRIKE,TAG_ID.SUB,TAG_ID.SUP,TAG_ID.TABLE,TAG_ID.TT,TAG_ID.U,TAG_ID.UL,TAG_ID.VAR]);function causesExit(Be){const Le=Be.tagID;return Le===TAG_ID.FONT&&Be.attrs.some(({name:tt})=>tt===ATTRS.COLOR||tt===ATTRS.SIZE||tt===ATTRS.FACE)||EXITS_FOREIGN_CONTENT.has(Le)}function adjustTokenMathMLAttrs(Be){for(let Le=0;Le<Be.attrs.length;Le++)if(Be.attrs[Le].name===DEFINITION_URL_ATTR){Be.attrs[Le].name=ADJUSTED_DEFINITION_URL_ATTR;break}}function adjustTokenSVGAttrs(Be){for(let Le=0;Le<Be.attrs.length;Le++){const Ye=SVG_ATTRS_ADJUSTMENT_MAP.get(Be.attrs[Le].name);Ye!=null&&(Be.attrs[Le].name=Ye)}}function adjustTokenXMLAttrs(Be){for(let Le=0;Le<Be.attrs.length;Le++){const Ye=XML_ATTRS_ADJUSTMENT_MAP.get(Be.attrs[Le].name);Ye&&(Be.attrs[Le].prefix=Ye.prefix,Be.attrs[Le].name=Ye.name,Be.attrs[Le].namespace=Ye.namespace)}}function adjustTokenSVGTagName(Be){const Le=SVG_TAG_NAMES_ADJUSTMENT_MAP.get(Be.tagName);Le!=null&&(Be.tagName=Le,Be.tagID=getTagID(Be.tagName))}function isMathMLTextIntegrationPoint(Be,Le){return Le===NS.MATHML&&(Be===TAG_ID.MI||Be===TAG_ID.MO||Be===TAG_ID.MN||Be===TAG_ID.MS||Be===TAG_ID.MTEXT)}function isHtmlIntegrationPoint(Be,Le,Ye){if(Le===NS.MATHML&&Be===TAG_ID.ANNOTATION_XML){for(let tt=0;tt<Ye.length;tt++)if(Ye[tt].name===ATTRS.ENCODING){const nt=Ye[tt].value.toLowerCase();return nt===MIME_TYPES.TEXT_HTML||nt===MIME_TYPES.APPLICATION_XML}}return Le===NS.SVG&&(Be===TAG_ID.FOREIGN_OBJECT||Be===TAG_ID.DESC||Be===TAG_ID.TITLE)}function isIntegrationPoint(Be,Le,Ye,tt){return(!tt||tt===NS.HTML)&&isHtmlIntegrationPoint(Be,Le,Ye)||(!tt||tt===NS.MATHML)&&isMathMLTextIntegrationPoint(Be,Le)}const HIDDEN_INPUT_TYPE="hidden",AA_OUTER_LOOP_ITER=8,AA_INNER_LOOP_ITER=3;var InsertionMode;(function(Be){Be[Be.INITIAL=0]="INITIAL",Be[Be.BEFORE_HTML=1]="BEFORE_HTML",Be[Be.BEFORE_HEAD=2]="BEFORE_HEAD",Be[Be.IN_HEAD=3]="IN_HEAD",Be[Be.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",Be[Be.AFTER_HEAD=5]="AFTER_HEAD",Be[Be.IN_BODY=6]="IN_BODY",Be[Be.TEXT=7]="TEXT",Be[Be.IN_TABLE=8]="IN_TABLE",Be[Be.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",Be[Be.IN_CAPTION=10]="IN_CAPTION",Be[Be.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",Be[Be.IN_TABLE_BODY=12]="IN_TABLE_BODY",Be[Be.IN_ROW=13]="IN_ROW",Be[Be.IN_CELL=14]="IN_CELL",Be[Be.IN_SELECT=15]="IN_SELECT",Be[Be.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",Be[Be.IN_TEMPLATE=17]="IN_TEMPLATE",Be[Be.AFTER_BODY=18]="AFTER_BODY",Be[Be.IN_FRAMESET=19]="IN_FRAMESET",Be[Be.AFTER_FRAMESET=20]="AFTER_FRAMESET",Be[Be.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",Be[Be.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(InsertionMode||(InsertionMode={}));const BASE_LOC={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},TABLE_STRUCTURE_TAGS=new Set([TAG_ID.TABLE,TAG_ID.TBODY,TAG_ID.TFOOT,TAG_ID.THEAD,TAG_ID.TR]),defaultParserOptions={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:defaultTreeAdapter,onParseError:null};class Parser{constructor(Le,Ye,tt=null,nt=null){this.fragmentContext=tt,this.scriptHandler=nt,this.currentToken=null,this.stopped=!1,this.insertionMode=InsertionMode.INITIAL,this.originalInsertionMode=InsertionMode.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options={...defaultParserOptions,...Le},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=Ye??this.treeAdapter.createDocument(),this.tokenizer=new Tokenizer(this.options,this),this.activeFormattingElements=new FormattingElementList(this.treeAdapter),this.fragmentContextID=tt?getTagID(this.treeAdapter.getTagName(tt)):TAG_ID.UNKNOWN,this._setContextModes(tt??this.document,this.fragmentContextID),this.openElements=new OpenElementStack(this.document,this.treeAdapter,this)}static parse(Le,Ye){const tt=new this(Ye);return tt.tokenizer.write(Le,!0),tt.document}static getFragmentParser(Le,Ye){const tt={...defaultParserOptions,...Ye};Le??(Le=tt.treeAdapter.createElement(TAG_NAMES.TEMPLATE,NS.HTML,[]));const nt=tt.treeAdapter.createElement("documentmock",NS.HTML,[]),ft=new this(tt,nt,Le);return ft.fragmentContextID===TAG_ID.TEMPLATE&&ft.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE),ft._initTokenizerForFragmentParsing(),ft._insertFakeRootElement(),ft._resetInsertionMode(),ft._findFormInFragmentContext(),ft}getFragment(){const Le=this.treeAdapter.getFirstChild(this.document),Ye=this.treeAdapter.createDocumentFragment();return this._adoptNodes(Le,Ye),Ye}_err(Le,Ye,tt){var nt;if(!this.onParseError)return;const ft=(nt=Le.location)!==null&&nt!==void 0?nt:BASE_LOC,ht={code:Ye,startLine:ft.startLine,startCol:ft.startCol,startOffset:ft.startOffset,endLine:tt?ft.startLine:ft.endLine,endCol:tt?ft.startCol:ft.endCol,endOffset:tt?ft.startOffset:ft.endOffset};this.onParseError(ht)}onItemPush(Le,Ye,tt){var nt,ft;(ft=(nt=this.treeAdapter).onItemPush)===null||ft===void 0||ft.call(nt,Le),tt&&this.openElements.stackTop>0&&this._setContextModes(Le,Ye)}onItemPop(Le,Ye){var tt,nt;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(Le,this.currentToken),(nt=(tt=this.treeAdapter).onItemPop)===null||nt===void 0||nt.call(tt,Le,this.openElements.current),Ye){let ft,ht;this.openElements.stackTop===0&&this.fragmentContext?(ft=this.fragmentContext,ht=this.fragmentContextID):{current:ft,currentTagId:ht}=this.openElements,this._setContextModes(ft,ht)}}_setContextModes(Le,Ye){const tt=Le===this.document||Le&&this.treeAdapter.getNamespaceURI(Le)===NS.HTML;this.currentNotInHTML=!tt,this.tokenizer.inForeignNode=!tt&&Le!==void 0&&Ye!==void 0&&!this._isIntegrationPoint(Ye,Le)}_switchToTextParsing(Le,Ye){this._insertElement(Le,NS.HTML),this.tokenizer.state=Ye,this.originalInsertionMode=this.insertionMode,this.insertionMode=InsertionMode.TEXT}switchToPlaintextParsing(){this.insertionMode=InsertionMode.TEXT,this.originalInsertionMode=InsertionMode.IN_BODY,this.tokenizer.state=TokenizerMode.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let Le=this.fragmentContext;for(;Le;){if(this.treeAdapter.getTagName(Le)===TAG_NAMES.FORM){this.formElement=Le;break}Le=this.treeAdapter.getParentNode(Le)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==NS.HTML))switch(this.fragmentContextID){case TAG_ID.TITLE:case TAG_ID.TEXTAREA:{this.tokenizer.state=TokenizerMode.RCDATA;break}case TAG_ID.STYLE:case TAG_ID.XMP:case TAG_ID.IFRAME:case TAG_ID.NOEMBED:case TAG_ID.NOFRAMES:case TAG_ID.NOSCRIPT:{this.tokenizer.state=TokenizerMode.RAWTEXT;break}case TAG_ID.SCRIPT:{this.tokenizer.state=TokenizerMode.SCRIPT_DATA;break}case TAG_ID.PLAINTEXT:{this.tokenizer.state=TokenizerMode.PLAINTEXT;break}}}_setDocumentType(Le){const Ye=Le.name||"",tt=Le.publicId||"",nt=Le.systemId||"";if(this.treeAdapter.setDocumentType(this.document,Ye,tt,nt),Le.location){const ht=this.treeAdapter.getChildNodes(this.document).find(gt=>this.treeAdapter.isDocumentTypeNode(gt));ht&&this.treeAdapter.setNodeSourceCodeLocation(ht,Le.location)}}_attachElementToTree(Le,Ye){if(this.options.sourceCodeLocationInfo){const tt=Ye&&{...Ye,startTag:Ye};this.treeAdapter.setNodeSourceCodeLocation(Le,tt)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(Le);else{const tt=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(tt??this.document,Le)}}_appendElement(Le,Ye){const tt=this.treeAdapter.createElement(Le.tagName,Ye,Le.attrs);this._attachElementToTree(tt,Le.location)}_insertElement(Le,Ye){const tt=this.treeAdapter.createElement(Le.tagName,Ye,Le.attrs);this._attachElementToTree(tt,Le.location),this.openElements.push(tt,Le.tagID)}_insertFakeElement(Le,Ye){const tt=this.treeAdapter.createElement(Le,NS.HTML,[]);this._attachElementToTree(tt,null),this.openElements.push(tt,Ye)}_insertTemplate(Le){const Ye=this.treeAdapter.createElement(Le.tagName,NS.HTML,Le.attrs),tt=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(Ye,tt),this._attachElementToTree(Ye,Le.location),this.openElements.push(Ye,Le.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(tt,null)}_insertFakeRootElement(){const Le=this.treeAdapter.createElement(TAG_NAMES.HTML,NS.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(Le,null),this.treeAdapter.appendChild(this.openElements.current,Le),this.openElements.push(Le,TAG_ID.HTML)}_appendCommentNode(Le,Ye){const tt=this.treeAdapter.createCommentNode(Le.data);this.treeAdapter.appendChild(Ye,tt),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(tt,Le.location)}_insertCharacters(Le){let Ye,tt;if(this._shouldFosterParentOnInsertion()?({parent:Ye,beforeElement:tt}=this._findFosterParentingLocation(),tt?this.treeAdapter.insertTextBefore(Ye,Le.chars,tt):this.treeAdapter.insertText(Ye,Le.chars)):(Ye=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(Ye,Le.chars)),!Le.location)return;const nt=this.treeAdapter.getChildNodes(Ye),ft=tt?nt.lastIndexOf(tt):nt.length,ht=nt[ft-1];if(this.treeAdapter.getNodeSourceCodeLocation(ht)){const{endLine:At,endCol:xt,endOffset:Et}=Le.location;this.treeAdapter.updateNodeSourceCodeLocation(ht,{endLine:At,endCol:xt,endOffset:Et})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(ht,Le.location)}_adoptNodes(Le,Ye){for(let tt=this.treeAdapter.getFirstChild(Le);tt;tt=this.treeAdapter.getFirstChild(Le))this.treeAdapter.detachNode(tt),this.treeAdapter.appendChild(Ye,tt)}_setEndLocation(Le,Ye){if(this.treeAdapter.getNodeSourceCodeLocation(Le)&&Ye.location){const tt=Ye.location,nt=this.treeAdapter.getTagName(Le),ft=Ye.type===TokenType.END_TAG&&nt===Ye.tagName?{endTag:{...tt},endLine:tt.endLine,endCol:tt.endCol,endOffset:tt.endOffset}:{endLine:tt.startLine,endCol:tt.startCol,endOffset:tt.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(Le,ft)}}shouldProcessStartTagTokenInForeignContent(Le){if(!this.currentNotInHTML)return!1;let Ye,tt;return this.openElements.stackTop===0&&this.fragmentContext?(Ye=this.fragmentContext,tt=this.fragmentContextID):{current:Ye,currentTagId:tt}=this.openElements,Le.tagID===TAG_ID.SVG&&this.treeAdapter.getTagName(Ye)===TAG_NAMES.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(Ye)===NS.MATHML?!1:this.tokenizer.inForeignNode||(Le.tagID===TAG_ID.MGLYPH||Le.tagID===TAG_ID.MALIGNMARK)&&tt!==void 0&&!this._isIntegrationPoint(tt,Ye,NS.HTML)}_processToken(Le){switch(Le.type){case TokenType.CHARACTER:{this.onCharacter(Le);break}case TokenType.NULL_CHARACTER:{this.onNullCharacter(Le);break}case TokenType.COMMENT:{this.onComment(Le);break}case TokenType.DOCTYPE:{this.onDoctype(Le);break}case TokenType.START_TAG:{this._processStartTag(Le);break}case TokenType.END_TAG:{this.onEndTag(Le);break}case TokenType.EOF:{this.onEof(Le);break}case TokenType.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(Le);break}}}_isIntegrationPoint(Le,Ye,tt){const nt=this.treeAdapter.getNamespaceURI(Ye),ft=this.treeAdapter.getAttrList(Ye);return isIntegrationPoint(Le,nt,ft,tt)}_reconstructActiveFormattingElements(){const Le=this.activeFormattingElements.entries.length;if(Le){const Ye=this.activeFormattingElements.entries.findIndex(nt=>nt.type===EntryType.Marker||this.openElements.contains(nt.element)),tt=Ye===-1?Le-1:Ye-1;for(let nt=tt;nt>=0;nt--){const ft=this.activeFormattingElements.entries[nt];this._insertElement(ft.token,this.treeAdapter.getNamespaceURI(ft.element)),ft.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=InsertionMode.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.P),this.openElements.popUntilTagNamePopped(TAG_ID.P)}_resetInsertionMode(){for(let Le=this.openElements.stackTop;Le>=0;Le--)switch(Le===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[Le]){case TAG_ID.TR:{this.insertionMode=InsertionMode.IN_ROW;return}case TAG_ID.TBODY:case TAG_ID.THEAD:case TAG_ID.TFOOT:{this.insertionMode=InsertionMode.IN_TABLE_BODY;return}case TAG_ID.CAPTION:{this.insertionMode=InsertionMode.IN_CAPTION;return}case TAG_ID.COLGROUP:{this.insertionMode=InsertionMode.IN_COLUMN_GROUP;return}case TAG_ID.TABLE:{this.insertionMode=InsertionMode.IN_TABLE;return}case TAG_ID.BODY:{this.insertionMode=InsertionMode.IN_BODY;return}case TAG_ID.FRAMESET:{this.insertionMode=InsertionMode.IN_FRAMESET;return}case TAG_ID.SELECT:{this._resetInsertionModeForSelect(Le);return}case TAG_ID.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case TAG_ID.HTML:{this.insertionMode=this.headElement?InsertionMode.AFTER_HEAD:InsertionMode.BEFORE_HEAD;return}case TAG_ID.TD:case TAG_ID.TH:{if(Le>0){this.insertionMode=InsertionMode.IN_CELL;return}break}case TAG_ID.HEAD:{if(Le>0){this.insertionMode=InsertionMode.IN_HEAD;return}break}}this.insertionMode=InsertionMode.IN_BODY}_resetInsertionModeForSelect(Le){if(Le>0)for(let Ye=Le-1;Ye>0;Ye--){const tt=this.openElements.tagIDs[Ye];if(tt===TAG_ID.TEMPLATE)break;if(tt===TAG_ID.TABLE){this.insertionMode=InsertionMode.IN_SELECT_IN_TABLE;return}}this.insertionMode=InsertionMode.IN_SELECT}_isElementCausesFosterParenting(Le){return TABLE_STRUCTURE_TAGS.has(Le)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let Le=this.openElements.stackTop;Le>=0;Le--){const Ye=this.openElements.items[Le];switch(this.openElements.tagIDs[Le]){case TAG_ID.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(Ye)===NS.HTML)return{parent:this.treeAdapter.getTemplateContent(Ye),beforeElement:null};break}case TAG_ID.TABLE:{const tt=this.treeAdapter.getParentNode(Ye);return tt?{parent:tt,beforeElement:Ye}:{parent:this.openElements.items[Le-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(Le){const Ye=this._findFosterParentingLocation();Ye.beforeElement?this.treeAdapter.insertBefore(Ye.parent,Le,Ye.beforeElement):this.treeAdapter.appendChild(Ye.parent,Le)}_isSpecialElement(Le,Ye){const tt=this.treeAdapter.getNamespaceURI(Le);return SPECIAL_ELEMENTS[tt].has(Ye)}onCharacter(Le){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){characterInForeignContent(this,Le);return}switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,Le);break}case InsertionMode.BEFORE_HTML:{tokenBeforeHtml(this,Le);break}case InsertionMode.BEFORE_HEAD:{tokenBeforeHead(this,Le);break}case InsertionMode.IN_HEAD:{tokenInHead(this,Le);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{tokenInHeadNoScript(this,Le);break}case InsertionMode.AFTER_HEAD:{tokenAfterHead(this,Le);break}case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:{characterInBody(this,Le);break}case InsertionMode.TEXT:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:{this._insertCharacters(Le);break}case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:{characterInTable(this,Le);break}case InsertionMode.IN_TABLE_TEXT:{characterInTableText(this,Le);break}case InsertionMode.IN_COLUMN_GROUP:{tokenInColumnGroup(this,Le);break}case InsertionMode.AFTER_BODY:{tokenAfterBody(this,Le);break}case InsertionMode.AFTER_AFTER_BODY:{tokenAfterAfterBody(this,Le);break}}}onNullCharacter(Le){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){nullCharacterInForeignContent(this,Le);return}switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,Le);break}case InsertionMode.BEFORE_HTML:{tokenBeforeHtml(this,Le);break}case InsertionMode.BEFORE_HEAD:{tokenBeforeHead(this,Le);break}case InsertionMode.IN_HEAD:{tokenInHead(this,Le);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{tokenInHeadNoScript(this,Le);break}case InsertionMode.AFTER_HEAD:{tokenAfterHead(this,Le);break}case InsertionMode.TEXT:{this._insertCharacters(Le);break}case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:{characterInTable(this,Le);break}case InsertionMode.IN_COLUMN_GROUP:{tokenInColumnGroup(this,Le);break}case InsertionMode.AFTER_BODY:{tokenAfterBody(this,Le);break}case InsertionMode.AFTER_AFTER_BODY:{tokenAfterAfterBody(this,Le);break}}}onComment(Le){if(this.skipNextNewLine=!1,this.currentNotInHTML){appendComment(this,Le);return}switch(this.insertionMode){case InsertionMode.INITIAL:case InsertionMode.BEFORE_HTML:case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_TEMPLATE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:{appendComment(this,Le);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,Le);break}case InsertionMode.AFTER_BODY:{appendCommentToRootHtmlElement(this,Le);break}case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:{appendCommentToDocument(this,Le);break}}}onDoctype(Le){switch(this.skipNextNewLine=!1,this.insertionMode){case InsertionMode.INITIAL:{doctypeInInitialMode(this,Le);break}case InsertionMode.BEFORE_HEAD:case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:{this._err(Le,ERR.misplacedDoctype);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,Le);break}}}onStartTag(Le){this.skipNextNewLine=!1,this.currentToken=Le,this._processStartTag(Le),Le.selfClosing&&!Le.ackSelfClosing&&this._err(Le,ERR.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(Le){this.shouldProcessStartTagTokenInForeignContent(Le)?startTagInForeignContent(this,Le):this._startTagOutsideForeignContent(Le)}_startTagOutsideForeignContent(Le){switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,Le);break}case InsertionMode.BEFORE_HTML:{startTagBeforeHtml(this,Le);break}case InsertionMode.BEFORE_HEAD:{startTagBeforeHead(this,Le);break}case InsertionMode.IN_HEAD:{startTagInHead(this,Le);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{startTagInHeadNoScript(this,Le);break}case InsertionMode.AFTER_HEAD:{startTagAfterHead(this,Le);break}case InsertionMode.IN_BODY:{startTagInBody(this,Le);break}case InsertionMode.IN_TABLE:{startTagInTable(this,Le);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,Le);break}case InsertionMode.IN_CAPTION:{startTagInCaption(this,Le);break}case InsertionMode.IN_COLUMN_GROUP:{startTagInColumnGroup(this,Le);break}case InsertionMode.IN_TABLE_BODY:{startTagInTableBody(this,Le);break}case InsertionMode.IN_ROW:{startTagInRow(this,Le);break}case InsertionMode.IN_CELL:{startTagInCell(this,Le);break}case InsertionMode.IN_SELECT:{startTagInSelect(this,Le);break}case InsertionMode.IN_SELECT_IN_TABLE:{startTagInSelectInTable(this,Le);break}case InsertionMode.IN_TEMPLATE:{startTagInTemplate(this,Le);break}case InsertionMode.AFTER_BODY:{startTagAfterBody(this,Le);break}case InsertionMode.IN_FRAMESET:{startTagInFrameset(this,Le);break}case InsertionMode.AFTER_FRAMESET:{startTagAfterFrameset(this,Le);break}case InsertionMode.AFTER_AFTER_BODY:{startTagAfterAfterBody(this,Le);break}case InsertionMode.AFTER_AFTER_FRAMESET:{startTagAfterAfterFrameset(this,Le);break}}}onEndTag(Le){this.skipNextNewLine=!1,this.currentToken=Le,this.currentNotInHTML?endTagInForeignContent(this,Le):this._endTagOutsideForeignContent(Le)}_endTagOutsideForeignContent(Le){switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,Le);break}case InsertionMode.BEFORE_HTML:{endTagBeforeHtml(this,Le);break}case InsertionMode.BEFORE_HEAD:{endTagBeforeHead(this,Le);break}case InsertionMode.IN_HEAD:{endTagInHead(this,Le);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{endTagInHeadNoScript(this,Le);break}case InsertionMode.AFTER_HEAD:{endTagAfterHead(this,Le);break}case InsertionMode.IN_BODY:{endTagInBody(this,Le);break}case InsertionMode.TEXT:{endTagInText(this,Le);break}case InsertionMode.IN_TABLE:{endTagInTable(this,Le);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,Le);break}case InsertionMode.IN_CAPTION:{endTagInCaption(this,Le);break}case InsertionMode.IN_COLUMN_GROUP:{endTagInColumnGroup(this,Le);break}case InsertionMode.IN_TABLE_BODY:{endTagInTableBody(this,Le);break}case InsertionMode.IN_ROW:{endTagInRow(this,Le);break}case InsertionMode.IN_CELL:{endTagInCell(this,Le);break}case InsertionMode.IN_SELECT:{endTagInSelect(this,Le);break}case InsertionMode.IN_SELECT_IN_TABLE:{endTagInSelectInTable(this,Le);break}case InsertionMode.IN_TEMPLATE:{endTagInTemplate(this,Le);break}case InsertionMode.AFTER_BODY:{endTagAfterBody(this,Le);break}case InsertionMode.IN_FRAMESET:{endTagInFrameset(this,Le);break}case InsertionMode.AFTER_FRAMESET:{endTagAfterFrameset(this,Le);break}case InsertionMode.AFTER_AFTER_BODY:{tokenAfterAfterBody(this,Le);break}}}onEof(Le){switch(this.insertionMode){case InsertionMode.INITIAL:{tokenInInitialMode(this,Le);break}case InsertionMode.BEFORE_HTML:{tokenBeforeHtml(this,Le);break}case InsertionMode.BEFORE_HEAD:{tokenBeforeHead(this,Le);break}case InsertionMode.IN_HEAD:{tokenInHead(this,Le);break}case InsertionMode.IN_HEAD_NO_SCRIPT:{tokenInHeadNoScript(this,Le);break}case InsertionMode.AFTER_HEAD:{tokenAfterHead(this,Le);break}case InsertionMode.IN_BODY:case InsertionMode.IN_TABLE:case InsertionMode.IN_CAPTION:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:case InsertionMode.IN_CELL:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:{eofInBody(this,Le);break}case InsertionMode.TEXT:{eofInText(this,Le);break}case InsertionMode.IN_TABLE_TEXT:{tokenInTableText(this,Le);break}case InsertionMode.IN_TEMPLATE:{eofInTemplate(this,Le);break}case InsertionMode.AFTER_BODY:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:{stopParsing(this,Le);break}}}onWhitespaceCharacter(Le){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,Le.chars.charCodeAt(0)===CODE_POINTS.LINE_FEED)){if(Le.chars.length===1)return;Le.chars=Le.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(Le);return}switch(this.insertionMode){case InsertionMode.IN_HEAD:case InsertionMode.IN_HEAD_NO_SCRIPT:case InsertionMode.AFTER_HEAD:case InsertionMode.TEXT:case InsertionMode.IN_COLUMN_GROUP:case InsertionMode.IN_SELECT:case InsertionMode.IN_SELECT_IN_TABLE:case InsertionMode.IN_FRAMESET:case InsertionMode.AFTER_FRAMESET:{this._insertCharacters(Le);break}case InsertionMode.IN_BODY:case InsertionMode.IN_CAPTION:case InsertionMode.IN_CELL:case InsertionMode.IN_TEMPLATE:case InsertionMode.AFTER_BODY:case InsertionMode.AFTER_AFTER_BODY:case InsertionMode.AFTER_AFTER_FRAMESET:{whitespaceCharacterInBody(this,Le);break}case InsertionMode.IN_TABLE:case InsertionMode.IN_TABLE_BODY:case InsertionMode.IN_ROW:{characterInTable(this,Le);break}case InsertionMode.IN_TABLE_TEXT:{whitespaceCharacterInTableText(this,Le);break}}}}function aaObtainFormattingElementEntry(Be,Le){let Ye=Be.activeFormattingElements.getElementEntryInScopeWithTagName(Le.tagName);return Ye?Be.openElements.contains(Ye.element)?Be.openElements.hasInScope(Le.tagID)||(Ye=null):(Be.activeFormattingElements.removeEntry(Ye),Ye=null):genericEndTagInBody(Be,Le),Ye}function aaObtainFurthestBlock(Be,Le){let Ye=null,tt=Be.openElements.stackTop;for(;tt>=0;tt--){const nt=Be.openElements.items[tt];if(nt===Le.element)break;Be._isSpecialElement(nt,Be.openElements.tagIDs[tt])&&(Ye=nt)}return Ye||(Be.openElements.shortenToLength(Math.max(tt,0)),Be.activeFormattingElements.removeEntry(Le)),Ye}function aaInnerLoop(Be,Le,Ye){let tt=Le,nt=Be.openElements.getCommonAncestor(Le);for(let ft=0,ht=nt;ht!==Ye;ft++,ht=nt){nt=Be.openElements.getCommonAncestor(ht);const gt=Be.activeFormattingElements.getElementEntry(ht),At=gt&&ft>=AA_INNER_LOOP_ITER;!gt||At?(At&&Be.activeFormattingElements.removeEntry(gt),Be.openElements.remove(ht)):(ht=aaRecreateElementFromEntry(Be,gt),tt===Le&&(Be.activeFormattingElements.bookmark=gt),Be.treeAdapter.detachNode(tt),Be.treeAdapter.appendChild(ht,tt),tt=ht)}return tt}function aaRecreateElementFromEntry(Be,Le){const Ye=Be.treeAdapter.getNamespaceURI(Le.element),tt=Be.treeAdapter.createElement(Le.token.tagName,Ye,Le.token.attrs);return Be.openElements.replace(Le.element,tt),Le.element=tt,tt}function aaInsertLastNodeInCommonAncestor(Be,Le,Ye){const tt=Be.treeAdapter.getTagName(Le),nt=getTagID(tt);if(Be._isElementCausesFosterParenting(nt))Be._fosterParentElement(Ye);else{const ft=Be.treeAdapter.getNamespaceURI(Le);nt===TAG_ID.TEMPLATE&&ft===NS.HTML&&(Le=Be.treeAdapter.getTemplateContent(Le)),Be.treeAdapter.appendChild(Le,Ye)}}function aaReplaceFormattingElement(Be,Le,Ye){const tt=Be.treeAdapter.getNamespaceURI(Ye.element),{token:nt}=Ye,ft=Be.treeAdapter.createElement(nt.tagName,tt,nt.attrs);Be._adoptNodes(Le,ft),Be.treeAdapter.appendChild(Le,ft),Be.activeFormattingElements.insertElementAfterBookmark(ft,nt),Be.activeFormattingElements.removeEntry(Ye),Be.openElements.remove(Ye.element),Be.openElements.insertAfter(Le,ft,nt.tagID)}function callAdoptionAgency(Be,Le){for(let Ye=0;Ye<AA_OUTER_LOOP_ITER;Ye++){const tt=aaObtainFormattingElementEntry(Be,Le);if(!tt)break;const nt=aaObtainFurthestBlock(Be,tt);if(!nt)break;Be.activeFormattingElements.bookmark=tt;const ft=aaInnerLoop(Be,nt,tt.element),ht=Be.openElements.getCommonAncestor(tt.element);Be.treeAdapter.detachNode(ft),ht&&aaInsertLastNodeInCommonAncestor(Be,ht,ft),aaReplaceFormattingElement(Be,nt,tt)}}function appendComment(Be,Le){Be._appendCommentNode(Le,Be.openElements.currentTmplContentOrNode)}function appendCommentToRootHtmlElement(Be,Le){Be._appendCommentNode(Le,Be.openElements.items[0])}function appendCommentToDocument(Be,Le){Be._appendCommentNode(Le,Be.document)}function stopParsing(Be,Le){if(Be.stopped=!0,Le.location){const Ye=Be.fragmentContext?0:2;for(let tt=Be.openElements.stackTop;tt>=Ye;tt--)Be._setEndLocation(Be.openElements.items[tt],Le);if(!Be.fragmentContext&&Be.openElements.stackTop>=0){const tt=Be.openElements.items[0],nt=Be.treeAdapter.getNodeSourceCodeLocation(tt);if(nt&&!nt.endTag&&(Be._setEndLocation(tt,Le),Be.openElements.stackTop>=1)){const ft=Be.openElements.items[1],ht=Be.treeAdapter.getNodeSourceCodeLocation(ft);ht&&!ht.endTag&&Be._setEndLocation(ft,Le)}}}}function doctypeInInitialMode(Be,Le){Be._setDocumentType(Le);const Ye=Le.forceQuirks?DOCUMENT_MODE.QUIRKS:getDocumentMode(Le);isConforming(Le)||Be._err(Le,ERR.nonConformingDoctype),Be.treeAdapter.setDocumentMode(Be.document,Ye),Be.insertionMode=InsertionMode.BEFORE_HTML}function tokenInInitialMode(Be,Le){Be._err(Le,ERR.missingDoctype,!0),Be.treeAdapter.setDocumentMode(Be.document,DOCUMENT_MODE.QUIRKS),Be.insertionMode=InsertionMode.BEFORE_HTML,Be._processToken(Le)}function startTagBeforeHtml(Be,Le){Le.tagID===TAG_ID.HTML?(Be._insertElement(Le,NS.HTML),Be.insertionMode=InsertionMode.BEFORE_HEAD):tokenBeforeHtml(Be,Le)}function endTagBeforeHtml(Be,Le){const Ye=Le.tagID;(Ye===TAG_ID.HTML||Ye===TAG_ID.HEAD||Ye===TAG_ID.BODY||Ye===TAG_ID.BR)&&tokenBeforeHtml(Be,Le)}function tokenBeforeHtml(Be,Le){Be._insertFakeRootElement(),Be.insertionMode=InsertionMode.BEFORE_HEAD,Be._processToken(Le)}function startTagBeforeHead(Be,Le){switch(Le.tagID){case TAG_ID.HTML:{startTagInBody(Be,Le);break}case TAG_ID.HEAD:{Be._insertElement(Le,NS.HTML),Be.headElement=Be.openElements.current,Be.insertionMode=InsertionMode.IN_HEAD;break}default:tokenBeforeHead(Be,Le)}}function endTagBeforeHead(Be,Le){const Ye=Le.tagID;Ye===TAG_ID.HEAD||Ye===TAG_ID.BODY||Ye===TAG_ID.HTML||Ye===TAG_ID.BR?tokenBeforeHead(Be,Le):Be._err(Le,ERR.endTagWithoutMatchingOpenElement)}function tokenBeforeHead(Be,Le){Be._insertFakeElement(TAG_NAMES.HEAD,TAG_ID.HEAD),Be.headElement=Be.openElements.current,Be.insertionMode=InsertionMode.IN_HEAD,Be._processToken(Le)}function startTagInHead(Be,Le){switch(Le.tagID){case TAG_ID.HTML:{startTagInBody(Be,Le);break}case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:{Be._appendElement(Le,NS.HTML),Le.ackSelfClosing=!0;break}case TAG_ID.TITLE:{Be._switchToTextParsing(Le,TokenizerMode.RCDATA);break}case TAG_ID.NOSCRIPT:{Be.options.scriptingEnabled?Be._switchToTextParsing(Le,TokenizerMode.RAWTEXT):(Be._insertElement(Le,NS.HTML),Be.insertionMode=InsertionMode.IN_HEAD_NO_SCRIPT);break}case TAG_ID.NOFRAMES:case TAG_ID.STYLE:{Be._switchToTextParsing(Le,TokenizerMode.RAWTEXT);break}case TAG_ID.SCRIPT:{Be._switchToTextParsing(Le,TokenizerMode.SCRIPT_DATA);break}case TAG_ID.TEMPLATE:{Be._insertTemplate(Le),Be.activeFormattingElements.insertMarker(),Be.framesetOk=!1,Be.insertionMode=InsertionMode.IN_TEMPLATE,Be.tmplInsertionModeStack.unshift(InsertionMode.IN_TEMPLATE);break}case TAG_ID.HEAD:{Be._err(Le,ERR.misplacedStartTagForHeadElement);break}default:tokenInHead(Be,Le)}}function endTagInHead(Be,Le){switch(Le.tagID){case TAG_ID.HEAD:{Be.openElements.pop(),Be.insertionMode=InsertionMode.AFTER_HEAD;break}case TAG_ID.BODY:case TAG_ID.BR:case TAG_ID.HTML:{tokenInHead(Be,Le);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Be,Le);break}default:Be._err(Le,ERR.endTagWithoutMatchingOpenElement)}}function templateEndTagInHead(Be,Le){Be.openElements.tmplCount>0?(Be.openElements.generateImpliedEndTagsThoroughly(),Be.openElements.currentTagId!==TAG_ID.TEMPLATE&&Be._err(Le,ERR.closingOfElementWithOpenChildElements),Be.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE),Be.activeFormattingElements.clearToLastMarker(),Be.tmplInsertionModeStack.shift(),Be._resetInsertionMode()):Be._err(Le,ERR.endTagWithoutMatchingOpenElement)}function tokenInHead(Be,Le){Be.openElements.pop(),Be.insertionMode=InsertionMode.AFTER_HEAD,Be._processToken(Le)}function startTagInHeadNoScript(Be,Le){switch(Le.tagID){case TAG_ID.HTML:{startTagInBody(Be,Le);break}case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.HEAD:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.STYLE:{startTagInHead(Be,Le);break}case TAG_ID.NOSCRIPT:{Be._err(Le,ERR.nestedNoscriptInHead);break}default:tokenInHeadNoScript(Be,Le)}}function endTagInHeadNoScript(Be,Le){switch(Le.tagID){case TAG_ID.NOSCRIPT:{Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_HEAD;break}case TAG_ID.BR:{tokenInHeadNoScript(Be,Le);break}default:Be._err(Le,ERR.endTagWithoutMatchingOpenElement)}}function tokenInHeadNoScript(Be,Le){const Ye=Le.type===TokenType.EOF?ERR.openElementsLeftAfterEof:ERR.disallowedContentInNoscriptInHead;Be._err(Le,Ye),Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_HEAD,Be._processToken(Le)}function startTagAfterHead(Be,Le){switch(Le.tagID){case TAG_ID.HTML:{startTagInBody(Be,Le);break}case TAG_ID.BODY:{Be._insertElement(Le,NS.HTML),Be.framesetOk=!1,Be.insertionMode=InsertionMode.IN_BODY;break}case TAG_ID.FRAMESET:{Be._insertElement(Le,NS.HTML),Be.insertionMode=InsertionMode.IN_FRAMESET;break}case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.SCRIPT:case TAG_ID.STYLE:case TAG_ID.TEMPLATE:case TAG_ID.TITLE:{Be._err(Le,ERR.abandonedHeadElementChild),Be.openElements.push(Be.headElement,TAG_ID.HEAD),startTagInHead(Be,Le),Be.openElements.remove(Be.headElement);break}case TAG_ID.HEAD:{Be._err(Le,ERR.misplacedStartTagForHeadElement);break}default:tokenAfterHead(Be,Le)}}function endTagAfterHead(Be,Le){switch(Le.tagID){case TAG_ID.BODY:case TAG_ID.HTML:case TAG_ID.BR:{tokenAfterHead(Be,Le);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Be,Le);break}default:Be._err(Le,ERR.endTagWithoutMatchingOpenElement)}}function tokenAfterHead(Be,Le){Be._insertFakeElement(TAG_NAMES.BODY,TAG_ID.BODY),Be.insertionMode=InsertionMode.IN_BODY,modeInBody(Be,Le)}function modeInBody(Be,Le){switch(Le.type){case TokenType.CHARACTER:{characterInBody(Be,Le);break}case TokenType.WHITESPACE_CHARACTER:{whitespaceCharacterInBody(Be,Le);break}case TokenType.COMMENT:{appendComment(Be,Le);break}case TokenType.START_TAG:{startTagInBody(Be,Le);break}case TokenType.END_TAG:{endTagInBody(Be,Le);break}case TokenType.EOF:{eofInBody(Be,Le);break}}}function whitespaceCharacterInBody(Be,Le){Be._reconstructActiveFormattingElements(),Be._insertCharacters(Le)}function characterInBody(Be,Le){Be._reconstructActiveFormattingElements(),Be._insertCharacters(Le),Be.framesetOk=!1}function htmlStartTagInBody(Be,Le){Be.openElements.tmplCount===0&&Be.treeAdapter.adoptAttributes(Be.openElements.items[0],Le.attrs)}function bodyStartTagInBody(Be,Le){const Ye=Be.openElements.tryPeekProperlyNestedBodyElement();Ye&&Be.openElements.tmplCount===0&&(Be.framesetOk=!1,Be.treeAdapter.adoptAttributes(Ye,Le.attrs))}function framesetStartTagInBody(Be,Le){const Ye=Be.openElements.tryPeekProperlyNestedBodyElement();Be.framesetOk&&Ye&&(Be.treeAdapter.detachNode(Ye),Be.openElements.popAllUpToHtmlElement(),Be._insertElement(Le,NS.HTML),Be.insertionMode=InsertionMode.IN_FRAMESET)}function addressStartTagInBody(Be,Le){Be.openElements.hasInButtonScope(TAG_ID.P)&&Be._closePElement(),Be._insertElement(Le,NS.HTML)}function numberedHeaderStartTagInBody(Be,Le){Be.openElements.hasInButtonScope(TAG_ID.P)&&Be._closePElement(),Be.openElements.currentTagId!==void 0&&NUMBERED_HEADERS.has(Be.openElements.currentTagId)&&Be.openElements.pop(),Be._insertElement(Le,NS.HTML)}function preStartTagInBody(Be,Le){Be.openElements.hasInButtonScope(TAG_ID.P)&&Be._closePElement(),Be._insertElement(Le,NS.HTML),Be.skipNextNewLine=!0,Be.framesetOk=!1}function formStartTagInBody(Be,Le){const Ye=Be.openElements.tmplCount>0;(!Be.formElement||Ye)&&(Be.openElements.hasInButtonScope(TAG_ID.P)&&Be._closePElement(),Be._insertElement(Le,NS.HTML),Ye||(Be.formElement=Be.openElements.current))}function listItemStartTagInBody(Be,Le){Be.framesetOk=!1;const Ye=Le.tagID;for(let tt=Be.openElements.stackTop;tt>=0;tt--){const nt=Be.openElements.tagIDs[tt];if(Ye===TAG_ID.LI&&nt===TAG_ID.LI||(Ye===TAG_ID.DD||Ye===TAG_ID.DT)&&(nt===TAG_ID.DD||nt===TAG_ID.DT)){Be.openElements.generateImpliedEndTagsWithExclusion(nt),Be.openElements.popUntilTagNamePopped(nt);break}if(nt!==TAG_ID.ADDRESS&&nt!==TAG_ID.DIV&&nt!==TAG_ID.P&&Be._isSpecialElement(Be.openElements.items[tt],nt))break}Be.openElements.hasInButtonScope(TAG_ID.P)&&Be._closePElement(),Be._insertElement(Le,NS.HTML)}function plaintextStartTagInBody(Be,Le){Be.openElements.hasInButtonScope(TAG_ID.P)&&Be._closePElement(),Be._insertElement(Le,NS.HTML),Be.tokenizer.state=TokenizerMode.PLAINTEXT}function buttonStartTagInBody(Be,Le){Be.openElements.hasInScope(TAG_ID.BUTTON)&&(Be.openElements.generateImpliedEndTags(),Be.openElements.popUntilTagNamePopped(TAG_ID.BUTTON)),Be._reconstructActiveFormattingElements(),Be._insertElement(Le,NS.HTML),Be.framesetOk=!1}function aStartTagInBody(Be,Le){const Ye=Be.activeFormattingElements.getElementEntryInScopeWithTagName(TAG_NAMES.A);Ye&&(callAdoptionAgency(Be,Le),Be.openElements.remove(Ye.element),Be.activeFormattingElements.removeEntry(Ye)),Be._reconstructActiveFormattingElements(),Be._insertElement(Le,NS.HTML),Be.activeFormattingElements.pushElement(Be.openElements.current,Le)}function bStartTagInBody(Be,Le){Be._reconstructActiveFormattingElements(),Be._insertElement(Le,NS.HTML),Be.activeFormattingElements.pushElement(Be.openElements.current,Le)}function nobrStartTagInBody(Be,Le){Be._reconstructActiveFormattingElements(),Be.openElements.hasInScope(TAG_ID.NOBR)&&(callAdoptionAgency(Be,Le),Be._reconstructActiveFormattingElements()),Be._insertElement(Le,NS.HTML),Be.activeFormattingElements.pushElement(Be.openElements.current,Le)}function appletStartTagInBody(Be,Le){Be._reconstructActiveFormattingElements(),Be._insertElement(Le,NS.HTML),Be.activeFormattingElements.insertMarker(),Be.framesetOk=!1}function tableStartTagInBody(Be,Le){Be.treeAdapter.getDocumentMode(Be.document)!==DOCUMENT_MODE.QUIRKS&&Be.openElements.hasInButtonScope(TAG_ID.P)&&Be._closePElement(),Be._insertElement(Le,NS.HTML),Be.framesetOk=!1,Be.insertionMode=InsertionMode.IN_TABLE}function areaStartTagInBody(Be,Le){Be._reconstructActiveFormattingElements(),Be._appendElement(Le,NS.HTML),Be.framesetOk=!1,Le.ackSelfClosing=!0}function isHiddenInput(Be){const Le=getTokenAttr(Be,ATTRS.TYPE);return Le!=null&&Le.toLowerCase()===HIDDEN_INPUT_TYPE}function inputStartTagInBody(Be,Le){Be._reconstructActiveFormattingElements(),Be._appendElement(Le,NS.HTML),isHiddenInput(Le)||(Be.framesetOk=!1),Le.ackSelfClosing=!0}function paramStartTagInBody(Be,Le){Be._appendElement(Le,NS.HTML),Le.ackSelfClosing=!0}function hrStartTagInBody(Be,Le){Be.openElements.hasInButtonScope(TAG_ID.P)&&Be._closePElement(),Be._appendElement(Le,NS.HTML),Be.framesetOk=!1,Le.ackSelfClosing=!0}function imageStartTagInBody(Be,Le){Le.tagName=TAG_NAMES.IMG,Le.tagID=TAG_ID.IMG,areaStartTagInBody(Be,Le)}function textareaStartTagInBody(Be,Le){Be._insertElement(Le,NS.HTML),Be.skipNextNewLine=!0,Be.tokenizer.state=TokenizerMode.RCDATA,Be.originalInsertionMode=Be.insertionMode,Be.framesetOk=!1,Be.insertionMode=InsertionMode.TEXT}function xmpStartTagInBody(Be,Le){Be.openElements.hasInButtonScope(TAG_ID.P)&&Be._closePElement(),Be._reconstructActiveFormattingElements(),Be.framesetOk=!1,Be._switchToTextParsing(Le,TokenizerMode.RAWTEXT)}function iframeStartTagInBody(Be,Le){Be.framesetOk=!1,Be._switchToTextParsing(Le,TokenizerMode.RAWTEXT)}function rawTextStartTagInBody(Be,Le){Be._switchToTextParsing(Le,TokenizerMode.RAWTEXT)}function selectStartTagInBody(Be,Le){Be._reconstructActiveFormattingElements(),Be._insertElement(Le,NS.HTML),Be.framesetOk=!1,Be.insertionMode=Be.insertionMode===InsertionMode.IN_TABLE||Be.insertionMode===InsertionMode.IN_CAPTION||Be.insertionMode===InsertionMode.IN_TABLE_BODY||Be.insertionMode===InsertionMode.IN_ROW||Be.insertionMode===InsertionMode.IN_CELL?InsertionMode.IN_SELECT_IN_TABLE:InsertionMode.IN_SELECT}function optgroupStartTagInBody(Be,Le){Be.openElements.currentTagId===TAG_ID.OPTION&&Be.openElements.pop(),Be._reconstructActiveFormattingElements(),Be._insertElement(Le,NS.HTML)}function rbStartTagInBody(Be,Le){Be.openElements.hasInScope(TAG_ID.RUBY)&&Be.openElements.generateImpliedEndTags(),Be._insertElement(Le,NS.HTML)}function rtStartTagInBody(Be,Le){Be.openElements.hasInScope(TAG_ID.RUBY)&&Be.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.RTC),Be._insertElement(Le,NS.HTML)}function mathStartTagInBody(Be,Le){Be._reconstructActiveFormattingElements(),adjustTokenMathMLAttrs(Le),adjustTokenXMLAttrs(Le),Le.selfClosing?Be._appendElement(Le,NS.MATHML):Be._insertElement(Le,NS.MATHML),Le.ackSelfClosing=!0}function svgStartTagInBody(Be,Le){Be._reconstructActiveFormattingElements(),adjustTokenSVGAttrs(Le),adjustTokenXMLAttrs(Le),Le.selfClosing?Be._appendElement(Le,NS.SVG):Be._insertElement(Le,NS.SVG),Le.ackSelfClosing=!0}function genericStartTagInBody(Be,Le){Be._reconstructActiveFormattingElements(),Be._insertElement(Le,NS.HTML)}function startTagInBody(Be,Le){switch(Le.tagID){case TAG_ID.I:case TAG_ID.S:case TAG_ID.B:case TAG_ID.U:case TAG_ID.EM:case TAG_ID.TT:case TAG_ID.BIG:case TAG_ID.CODE:case TAG_ID.FONT:case TAG_ID.SMALL:case TAG_ID.STRIKE:case TAG_ID.STRONG:{bStartTagInBody(Be,Le);break}case TAG_ID.A:{aStartTagInBody(Be,Le);break}case TAG_ID.H1:case TAG_ID.H2:case TAG_ID.H3:case TAG_ID.H4:case TAG_ID.H5:case TAG_ID.H6:{numberedHeaderStartTagInBody(Be,Le);break}case TAG_ID.P:case TAG_ID.DL:case TAG_ID.OL:case TAG_ID.UL:case TAG_ID.DIV:case TAG_ID.DIR:case TAG_ID.NAV:case TAG_ID.MAIN:case TAG_ID.MENU:case TAG_ID.ASIDE:case TAG_ID.CENTER:case TAG_ID.FIGURE:case TAG_ID.FOOTER:case TAG_ID.HEADER:case TAG_ID.HGROUP:case TAG_ID.DIALOG:case TAG_ID.DETAILS:case TAG_ID.ADDRESS:case TAG_ID.ARTICLE:case TAG_ID.SEARCH:case TAG_ID.SECTION:case TAG_ID.SUMMARY:case TAG_ID.FIELDSET:case TAG_ID.BLOCKQUOTE:case TAG_ID.FIGCAPTION:{addressStartTagInBody(Be,Le);break}case TAG_ID.LI:case TAG_ID.DD:case TAG_ID.DT:{listItemStartTagInBody(Be,Le);break}case TAG_ID.BR:case TAG_ID.IMG:case TAG_ID.WBR:case TAG_ID.AREA:case TAG_ID.EMBED:case TAG_ID.KEYGEN:{areaStartTagInBody(Be,Le);break}case TAG_ID.HR:{hrStartTagInBody(Be,Le);break}case TAG_ID.RB:case TAG_ID.RTC:{rbStartTagInBody(Be,Le);break}case TAG_ID.RT:case TAG_ID.RP:{rtStartTagInBody(Be,Le);break}case TAG_ID.PRE:case TAG_ID.LISTING:{preStartTagInBody(Be,Le);break}case TAG_ID.XMP:{xmpStartTagInBody(Be,Le);break}case TAG_ID.SVG:{svgStartTagInBody(Be,Le);break}case TAG_ID.HTML:{htmlStartTagInBody(Be,Le);break}case TAG_ID.BASE:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.STYLE:case TAG_ID.TITLE:case TAG_ID.SCRIPT:case TAG_ID.BGSOUND:case TAG_ID.BASEFONT:case TAG_ID.TEMPLATE:{startTagInHead(Be,Le);break}case TAG_ID.BODY:{bodyStartTagInBody(Be,Le);break}case TAG_ID.FORM:{formStartTagInBody(Be,Le);break}case TAG_ID.NOBR:{nobrStartTagInBody(Be,Le);break}case TAG_ID.MATH:{mathStartTagInBody(Be,Le);break}case TAG_ID.TABLE:{tableStartTagInBody(Be,Le);break}case TAG_ID.INPUT:{inputStartTagInBody(Be,Le);break}case TAG_ID.PARAM:case TAG_ID.TRACK:case TAG_ID.SOURCE:{paramStartTagInBody(Be,Le);break}case TAG_ID.IMAGE:{imageStartTagInBody(Be,Le);break}case TAG_ID.BUTTON:{buttonStartTagInBody(Be,Le);break}case TAG_ID.APPLET:case TAG_ID.OBJECT:case TAG_ID.MARQUEE:{appletStartTagInBody(Be,Le);break}case TAG_ID.IFRAME:{iframeStartTagInBody(Be,Le);break}case TAG_ID.SELECT:{selectStartTagInBody(Be,Le);break}case TAG_ID.OPTION:case TAG_ID.OPTGROUP:{optgroupStartTagInBody(Be,Le);break}case TAG_ID.NOEMBED:case TAG_ID.NOFRAMES:{rawTextStartTagInBody(Be,Le);break}case TAG_ID.FRAMESET:{framesetStartTagInBody(Be,Le);break}case TAG_ID.TEXTAREA:{textareaStartTagInBody(Be,Le);break}case TAG_ID.NOSCRIPT:{Be.options.scriptingEnabled?rawTextStartTagInBody(Be,Le):genericStartTagInBody(Be,Le);break}case TAG_ID.PLAINTEXT:{plaintextStartTagInBody(Be,Le);break}case TAG_ID.COL:case TAG_ID.TH:case TAG_ID.TD:case TAG_ID.TR:case TAG_ID.HEAD:case TAG_ID.FRAME:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:case TAG_ID.CAPTION:case TAG_ID.COLGROUP:break;default:genericStartTagInBody(Be,Le)}}function bodyEndTagInBody(Be,Le){if(Be.openElements.hasInScope(TAG_ID.BODY)&&(Be.insertionMode=InsertionMode.AFTER_BODY,Be.options.sourceCodeLocationInfo)){const Ye=Be.openElements.tryPeekProperlyNestedBodyElement();Ye&&Be._setEndLocation(Ye,Le)}}function htmlEndTagInBody(Be,Le){Be.openElements.hasInScope(TAG_ID.BODY)&&(Be.insertionMode=InsertionMode.AFTER_BODY,endTagAfterBody(Be,Le))}function addressEndTagInBody(Be,Le){const Ye=Le.tagID;Be.openElements.hasInScope(Ye)&&(Be.openElements.generateImpliedEndTags(),Be.openElements.popUntilTagNamePopped(Ye))}function formEndTagInBody(Be){const Le=Be.openElements.tmplCount>0,{formElement:Ye}=Be;Le||(Be.formElement=null),(Ye||Le)&&Be.openElements.hasInScope(TAG_ID.FORM)&&(Be.openElements.generateImpliedEndTags(),Le?Be.openElements.popUntilTagNamePopped(TAG_ID.FORM):Ye&&Be.openElements.remove(Ye))}function pEndTagInBody(Be){Be.openElements.hasInButtonScope(TAG_ID.P)||Be._insertFakeElement(TAG_NAMES.P,TAG_ID.P),Be._closePElement()}function liEndTagInBody(Be){Be.openElements.hasInListItemScope(TAG_ID.LI)&&(Be.openElements.generateImpliedEndTagsWithExclusion(TAG_ID.LI),Be.openElements.popUntilTagNamePopped(TAG_ID.LI))}function ddEndTagInBody(Be,Le){const Ye=Le.tagID;Be.openElements.hasInScope(Ye)&&(Be.openElements.generateImpliedEndTagsWithExclusion(Ye),Be.openElements.popUntilTagNamePopped(Ye))}function numberedHeaderEndTagInBody(Be){Be.openElements.hasNumberedHeaderInScope()&&(Be.openElements.generateImpliedEndTags(),Be.openElements.popUntilNumberedHeaderPopped())}function appletEndTagInBody(Be,Le){const Ye=Le.tagID;Be.openElements.hasInScope(Ye)&&(Be.openElements.generateImpliedEndTags(),Be.openElements.popUntilTagNamePopped(Ye),Be.activeFormattingElements.clearToLastMarker())}function brEndTagInBody(Be){Be._reconstructActiveFormattingElements(),Be._insertFakeElement(TAG_NAMES.BR,TAG_ID.BR),Be.openElements.pop(),Be.framesetOk=!1}function genericEndTagInBody(Be,Le){const Ye=Le.tagName,tt=Le.tagID;for(let nt=Be.openElements.stackTop;nt>0;nt--){const ft=Be.openElements.items[nt],ht=Be.openElements.tagIDs[nt];if(tt===ht&&(tt!==TAG_ID.UNKNOWN||Be.treeAdapter.getTagName(ft)===Ye)){Be.openElements.generateImpliedEndTagsWithExclusion(tt),Be.openElements.stackTop>=nt&&Be.openElements.shortenToLength(nt);break}if(Be._isSpecialElement(ft,ht))break}}function endTagInBody(Be,Le){switch(Le.tagID){case TAG_ID.A:case TAG_ID.B:case TAG_ID.I:case TAG_ID.S:case TAG_ID.U:case TAG_ID.EM:case TAG_ID.TT:case TAG_ID.BIG:case TAG_ID.CODE:case TAG_ID.FONT:case TAG_ID.NOBR:case TAG_ID.SMALL:case TAG_ID.STRIKE:case TAG_ID.STRONG:{callAdoptionAgency(Be,Le);break}case TAG_ID.P:{pEndTagInBody(Be);break}case TAG_ID.DL:case TAG_ID.UL:case TAG_ID.OL:case TAG_ID.DIR:case TAG_ID.DIV:case TAG_ID.NAV:case TAG_ID.PRE:case TAG_ID.MAIN:case TAG_ID.MENU:case TAG_ID.ASIDE:case TAG_ID.BUTTON:case TAG_ID.CENTER:case TAG_ID.FIGURE:case TAG_ID.FOOTER:case TAG_ID.HEADER:case TAG_ID.HGROUP:case TAG_ID.DIALOG:case TAG_ID.ADDRESS:case TAG_ID.ARTICLE:case TAG_ID.DETAILS:case TAG_ID.SEARCH:case TAG_ID.SECTION:case TAG_ID.SUMMARY:case TAG_ID.LISTING:case TAG_ID.FIELDSET:case TAG_ID.BLOCKQUOTE:case TAG_ID.FIGCAPTION:{addressEndTagInBody(Be,Le);break}case TAG_ID.LI:{liEndTagInBody(Be);break}case TAG_ID.DD:case TAG_ID.DT:{ddEndTagInBody(Be,Le);break}case TAG_ID.H1:case TAG_ID.H2:case TAG_ID.H3:case TAG_ID.H4:case TAG_ID.H5:case TAG_ID.H6:{numberedHeaderEndTagInBody(Be);break}case TAG_ID.BR:{brEndTagInBody(Be);break}case TAG_ID.BODY:{bodyEndTagInBody(Be,Le);break}case TAG_ID.HTML:{htmlEndTagInBody(Be,Le);break}case TAG_ID.FORM:{formEndTagInBody(Be);break}case TAG_ID.APPLET:case TAG_ID.OBJECT:case TAG_ID.MARQUEE:{appletEndTagInBody(Be,Le);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Be,Le);break}default:genericEndTagInBody(Be,Le)}}function eofInBody(Be,Le){Be.tmplInsertionModeStack.length>0?eofInTemplate(Be,Le):stopParsing(Be,Le)}function endTagInText(Be,Le){var Ye;Le.tagID===TAG_ID.SCRIPT&&((Ye=Be.scriptHandler)===null||Ye===void 0||Ye.call(Be,Be.openElements.current)),Be.openElements.pop(),Be.insertionMode=Be.originalInsertionMode}function eofInText(Be,Le){Be._err(Le,ERR.eofInElementThatCanContainOnlyText),Be.openElements.pop(),Be.insertionMode=Be.originalInsertionMode,Be.onEof(Le)}function characterInTable(Be,Le){if(Be.openElements.currentTagId!==void 0&&TABLE_STRUCTURE_TAGS.has(Be.openElements.currentTagId))switch(Be.pendingCharacterTokens.length=0,Be.hasNonWhitespacePendingCharacterToken=!1,Be.originalInsertionMode=Be.insertionMode,Be.insertionMode=InsertionMode.IN_TABLE_TEXT,Le.type){case TokenType.CHARACTER:{characterInTableText(Be,Le);break}case TokenType.WHITESPACE_CHARACTER:{whitespaceCharacterInTableText(Be,Le);break}}else tokenInTable(Be,Le)}function captionStartTagInTable(Be,Le){Be.openElements.clearBackToTableContext(),Be.activeFormattingElements.insertMarker(),Be._insertElement(Le,NS.HTML),Be.insertionMode=InsertionMode.IN_CAPTION}function colgroupStartTagInTable(Be,Le){Be.openElements.clearBackToTableContext(),Be._insertElement(Le,NS.HTML),Be.insertionMode=InsertionMode.IN_COLUMN_GROUP}function colStartTagInTable(Be,Le){Be.openElements.clearBackToTableContext(),Be._insertFakeElement(TAG_NAMES.COLGROUP,TAG_ID.COLGROUP),Be.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(Be,Le)}function tbodyStartTagInTable(Be,Le){Be.openElements.clearBackToTableContext(),Be._insertElement(Le,NS.HTML),Be.insertionMode=InsertionMode.IN_TABLE_BODY}function tdStartTagInTable(Be,Le){Be.openElements.clearBackToTableContext(),Be._insertFakeElement(TAG_NAMES.TBODY,TAG_ID.TBODY),Be.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(Be,Le)}function tableStartTagInTable(Be,Le){Be.openElements.hasInTableScope(TAG_ID.TABLE)&&(Be.openElements.popUntilTagNamePopped(TAG_ID.TABLE),Be._resetInsertionMode(),Be._processStartTag(Le))}function inputStartTagInTable(Be,Le){isHiddenInput(Le)?Be._appendElement(Le,NS.HTML):tokenInTable(Be,Le),Le.ackSelfClosing=!0}function formStartTagInTable(Be,Le){!Be.formElement&&Be.openElements.tmplCount===0&&(Be._insertElement(Le,NS.HTML),Be.formElement=Be.openElements.current,Be.openElements.pop())}function startTagInTable(Be,Le){switch(Le.tagID){case TAG_ID.TD:case TAG_ID.TH:case TAG_ID.TR:{tdStartTagInTable(Be,Le);break}case TAG_ID.STYLE:case TAG_ID.SCRIPT:case TAG_ID.TEMPLATE:{startTagInHead(Be,Le);break}case TAG_ID.COL:{colStartTagInTable(Be,Le);break}case TAG_ID.FORM:{formStartTagInTable(Be,Le);break}case TAG_ID.TABLE:{tableStartTagInTable(Be,Le);break}case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:{tbodyStartTagInTable(Be,Le);break}case TAG_ID.INPUT:{inputStartTagInTable(Be,Le);break}case TAG_ID.CAPTION:{captionStartTagInTable(Be,Le);break}case TAG_ID.COLGROUP:{colgroupStartTagInTable(Be,Le);break}default:tokenInTable(Be,Le)}}function endTagInTable(Be,Le){switch(Le.tagID){case TAG_ID.TABLE:{Be.openElements.hasInTableScope(TAG_ID.TABLE)&&(Be.openElements.popUntilTagNamePopped(TAG_ID.TABLE),Be._resetInsertionMode());break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Be,Le);break}case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TBODY:case TAG_ID.TD:case TAG_ID.TFOOT:case TAG_ID.TH:case TAG_ID.THEAD:case TAG_ID.TR:break;default:tokenInTable(Be,Le)}}function tokenInTable(Be,Le){const Ye=Be.fosterParentingEnabled;Be.fosterParentingEnabled=!0,modeInBody(Be,Le),Be.fosterParentingEnabled=Ye}function whitespaceCharacterInTableText(Be,Le){Be.pendingCharacterTokens.push(Le)}function characterInTableText(Be,Le){Be.pendingCharacterTokens.push(Le),Be.hasNonWhitespacePendingCharacterToken=!0}function tokenInTableText(Be,Le){let Ye=0;if(Be.hasNonWhitespacePendingCharacterToken)for(;Ye<Be.pendingCharacterTokens.length;Ye++)tokenInTable(Be,Be.pendingCharacterTokens[Ye]);else for(;Ye<Be.pendingCharacterTokens.length;Ye++)Be._insertCharacters(Be.pendingCharacterTokens[Ye]);Be.insertionMode=Be.originalInsertionMode,Be._processToken(Le)}const TABLE_VOID_ELEMENTS=new Set([TAG_ID.CAPTION,TAG_ID.COL,TAG_ID.COLGROUP,TAG_ID.TBODY,TAG_ID.TD,TAG_ID.TFOOT,TAG_ID.TH,TAG_ID.THEAD,TAG_ID.TR]);function startTagInCaption(Be,Le){const Ye=Le.tagID;TABLE_VOID_ELEMENTS.has(Ye)?Be.openElements.hasInTableScope(TAG_ID.CAPTION)&&(Be.openElements.generateImpliedEndTags(),Be.openElements.popUntilTagNamePopped(TAG_ID.CAPTION),Be.activeFormattingElements.clearToLastMarker(),Be.insertionMode=InsertionMode.IN_TABLE,startTagInTable(Be,Le)):startTagInBody(Be,Le)}function endTagInCaption(Be,Le){const Ye=Le.tagID;switch(Ye){case TAG_ID.CAPTION:case TAG_ID.TABLE:{Be.openElements.hasInTableScope(TAG_ID.CAPTION)&&(Be.openElements.generateImpliedEndTags(),Be.openElements.popUntilTagNamePopped(TAG_ID.CAPTION),Be.activeFormattingElements.clearToLastMarker(),Be.insertionMode=InsertionMode.IN_TABLE,Ye===TAG_ID.TABLE&&endTagInTable(Be,Le));break}case TAG_ID.BODY:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TBODY:case TAG_ID.TD:case TAG_ID.TFOOT:case TAG_ID.TH:case TAG_ID.THEAD:case TAG_ID.TR:break;default:endTagInBody(Be,Le)}}function startTagInColumnGroup(Be,Le){switch(Le.tagID){case TAG_ID.HTML:{startTagInBody(Be,Le);break}case TAG_ID.COL:{Be._appendElement(Le,NS.HTML),Le.ackSelfClosing=!0;break}case TAG_ID.TEMPLATE:{startTagInHead(Be,Le);break}default:tokenInColumnGroup(Be,Le)}}function endTagInColumnGroup(Be,Le){switch(Le.tagID){case TAG_ID.COLGROUP:{Be.openElements.currentTagId===TAG_ID.COLGROUP&&(Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_TABLE);break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Be,Le);break}case TAG_ID.COL:break;default:tokenInColumnGroup(Be,Le)}}function tokenInColumnGroup(Be,Le){Be.openElements.currentTagId===TAG_ID.COLGROUP&&(Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_TABLE,Be._processToken(Le))}function startTagInTableBody(Be,Le){switch(Le.tagID){case TAG_ID.TR:{Be.openElements.clearBackToTableBodyContext(),Be._insertElement(Le,NS.HTML),Be.insertionMode=InsertionMode.IN_ROW;break}case TAG_ID.TH:case TAG_ID.TD:{Be.openElements.clearBackToTableBodyContext(),Be._insertFakeElement(TAG_NAMES.TR,TAG_ID.TR),Be.insertionMode=InsertionMode.IN_ROW,startTagInRow(Be,Le);break}case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:{Be.openElements.hasTableBodyContextInTableScope()&&(Be.openElements.clearBackToTableBodyContext(),Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_TABLE,startTagInTable(Be,Le));break}default:startTagInTable(Be,Le)}}function endTagInTableBody(Be,Le){const Ye=Le.tagID;switch(Le.tagID){case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:{Be.openElements.hasInTableScope(Ye)&&(Be.openElements.clearBackToTableBodyContext(),Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_TABLE);break}case TAG_ID.TABLE:{Be.openElements.hasTableBodyContextInTableScope()&&(Be.openElements.clearBackToTableBodyContext(),Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_TABLE,endTagInTable(Be,Le));break}case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TD:case TAG_ID.TH:case TAG_ID.TR:break;default:endTagInTable(Be,Le)}}function startTagInRow(Be,Le){switch(Le.tagID){case TAG_ID.TH:case TAG_ID.TD:{Be.openElements.clearBackToTableRowContext(),Be._insertElement(Le,NS.HTML),Be.insertionMode=InsertionMode.IN_CELL,Be.activeFormattingElements.insertMarker();break}case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:case TAG_ID.TR:{Be.openElements.hasInTableScope(TAG_ID.TR)&&(Be.openElements.clearBackToTableRowContext(),Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(Be,Le));break}default:startTagInTable(Be,Le)}}function endTagInRow(Be,Le){switch(Le.tagID){case TAG_ID.TR:{Be.openElements.hasInTableScope(TAG_ID.TR)&&(Be.openElements.clearBackToTableRowContext(),Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_TABLE_BODY);break}case TAG_ID.TABLE:{Be.openElements.hasInTableScope(TAG_ID.TR)&&(Be.openElements.clearBackToTableRowContext(),Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_TABLE_BODY,endTagInTableBody(Be,Le));break}case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:{(Be.openElements.hasInTableScope(Le.tagID)||Be.openElements.hasInTableScope(TAG_ID.TR))&&(Be.openElements.clearBackToTableRowContext(),Be.openElements.pop(),Be.insertionMode=InsertionMode.IN_TABLE_BODY,endTagInTableBody(Be,Le));break}case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:case TAG_ID.TD:case TAG_ID.TH:break;default:endTagInTable(Be,Le)}}function startTagInCell(Be,Le){const Ye=Le.tagID;TABLE_VOID_ELEMENTS.has(Ye)?(Be.openElements.hasInTableScope(TAG_ID.TD)||Be.openElements.hasInTableScope(TAG_ID.TH))&&(Be._closeTableCell(),startTagInRow(Be,Le)):startTagInBody(Be,Le)}function endTagInCell(Be,Le){const Ye=Le.tagID;switch(Ye){case TAG_ID.TD:case TAG_ID.TH:{Be.openElements.hasInTableScope(Ye)&&(Be.openElements.generateImpliedEndTags(),Be.openElements.popUntilTagNamePopped(Ye),Be.activeFormattingElements.clearToLastMarker(),Be.insertionMode=InsertionMode.IN_ROW);break}case TAG_ID.TABLE:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:case TAG_ID.TR:{Be.openElements.hasInTableScope(Ye)&&(Be._closeTableCell(),endTagInRow(Be,Le));break}case TAG_ID.BODY:case TAG_ID.CAPTION:case TAG_ID.COL:case TAG_ID.COLGROUP:case TAG_ID.HTML:break;default:endTagInBody(Be,Le)}}function startTagInSelect(Be,Le){switch(Le.tagID){case TAG_ID.HTML:{startTagInBody(Be,Le);break}case TAG_ID.OPTION:{Be.openElements.currentTagId===TAG_ID.OPTION&&Be.openElements.pop(),Be._insertElement(Le,NS.HTML);break}case TAG_ID.OPTGROUP:{Be.openElements.currentTagId===TAG_ID.OPTION&&Be.openElements.pop(),Be.openElements.currentTagId===TAG_ID.OPTGROUP&&Be.openElements.pop(),Be._insertElement(Le,NS.HTML);break}case TAG_ID.HR:{Be.openElements.currentTagId===TAG_ID.OPTION&&Be.openElements.pop(),Be.openElements.currentTagId===TAG_ID.OPTGROUP&&Be.openElements.pop(),Be._appendElement(Le,NS.HTML),Le.ackSelfClosing=!0;break}case TAG_ID.INPUT:case TAG_ID.KEYGEN:case TAG_ID.TEXTAREA:case TAG_ID.SELECT:{Be.openElements.hasInSelectScope(TAG_ID.SELECT)&&(Be.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Be._resetInsertionMode(),Le.tagID!==TAG_ID.SELECT&&Be._processStartTag(Le));break}case TAG_ID.SCRIPT:case TAG_ID.TEMPLATE:{startTagInHead(Be,Le);break}}}function endTagInSelect(Be,Le){switch(Le.tagID){case TAG_ID.OPTGROUP:{Be.openElements.stackTop>0&&Be.openElements.currentTagId===TAG_ID.OPTION&&Be.openElements.tagIDs[Be.openElements.stackTop-1]===TAG_ID.OPTGROUP&&Be.openElements.pop(),Be.openElements.currentTagId===TAG_ID.OPTGROUP&&Be.openElements.pop();break}case TAG_ID.OPTION:{Be.openElements.currentTagId===TAG_ID.OPTION&&Be.openElements.pop();break}case TAG_ID.SELECT:{Be.openElements.hasInSelectScope(TAG_ID.SELECT)&&(Be.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Be._resetInsertionMode());break}case TAG_ID.TEMPLATE:{templateEndTagInHead(Be,Le);break}}}function startTagInSelectInTable(Be,Le){const Ye=Le.tagID;Ye===TAG_ID.CAPTION||Ye===TAG_ID.TABLE||Ye===TAG_ID.TBODY||Ye===TAG_ID.TFOOT||Ye===TAG_ID.THEAD||Ye===TAG_ID.TR||Ye===TAG_ID.TD||Ye===TAG_ID.TH?(Be.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Be._resetInsertionMode(),Be._processStartTag(Le)):startTagInSelect(Be,Le)}function endTagInSelectInTable(Be,Le){const Ye=Le.tagID;Ye===TAG_ID.CAPTION||Ye===TAG_ID.TABLE||Ye===TAG_ID.TBODY||Ye===TAG_ID.TFOOT||Ye===TAG_ID.THEAD||Ye===TAG_ID.TR||Ye===TAG_ID.TD||Ye===TAG_ID.TH?Be.openElements.hasInTableScope(Ye)&&(Be.openElements.popUntilTagNamePopped(TAG_ID.SELECT),Be._resetInsertionMode(),Be.onEndTag(Le)):endTagInSelect(Be,Le)}function startTagInTemplate(Be,Le){switch(Le.tagID){case TAG_ID.BASE:case TAG_ID.BASEFONT:case TAG_ID.BGSOUND:case TAG_ID.LINK:case TAG_ID.META:case TAG_ID.NOFRAMES:case TAG_ID.SCRIPT:case TAG_ID.STYLE:case TAG_ID.TEMPLATE:case TAG_ID.TITLE:{startTagInHead(Be,Le);break}case TAG_ID.CAPTION:case TAG_ID.COLGROUP:case TAG_ID.TBODY:case TAG_ID.TFOOT:case TAG_ID.THEAD:{Be.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE,Be.insertionMode=InsertionMode.IN_TABLE,startTagInTable(Be,Le);break}case TAG_ID.COL:{Be.tmplInsertionModeStack[0]=InsertionMode.IN_COLUMN_GROUP,Be.insertionMode=InsertionMode.IN_COLUMN_GROUP,startTagInColumnGroup(Be,Le);break}case TAG_ID.TR:{Be.tmplInsertionModeStack[0]=InsertionMode.IN_TABLE_BODY,Be.insertionMode=InsertionMode.IN_TABLE_BODY,startTagInTableBody(Be,Le);break}case TAG_ID.TD:case TAG_ID.TH:{Be.tmplInsertionModeStack[0]=InsertionMode.IN_ROW,Be.insertionMode=InsertionMode.IN_ROW,startTagInRow(Be,Le);break}default:Be.tmplInsertionModeStack[0]=InsertionMode.IN_BODY,Be.insertionMode=InsertionMode.IN_BODY,startTagInBody(Be,Le)}}function endTagInTemplate(Be,Le){Le.tagID===TAG_ID.TEMPLATE&&templateEndTagInHead(Be,Le)}function eofInTemplate(Be,Le){Be.openElements.tmplCount>0?(Be.openElements.popUntilTagNamePopped(TAG_ID.TEMPLATE),Be.activeFormattingElements.clearToLastMarker(),Be.tmplInsertionModeStack.shift(),Be._resetInsertionMode(),Be.onEof(Le)):stopParsing(Be,Le)}function startTagAfterBody(Be,Le){Le.tagID===TAG_ID.HTML?startTagInBody(Be,Le):tokenAfterBody(Be,Le)}function endTagAfterBody(Be,Le){var Ye;if(Le.tagID===TAG_ID.HTML){if(Be.fragmentContext||(Be.insertionMode=InsertionMode.AFTER_AFTER_BODY),Be.options.sourceCodeLocationInfo&&Be.openElements.tagIDs[0]===TAG_ID.HTML){Be._setEndLocation(Be.openElements.items[0],Le);const tt=Be.openElements.items[1];tt&&!(!((Ye=Be.treeAdapter.getNodeSourceCodeLocation(tt))===null||Ye===void 0)&&Ye.endTag)&&Be._setEndLocation(tt,Le)}}else tokenAfterBody(Be,Le)}function tokenAfterBody(Be,Le){Be.insertionMode=InsertionMode.IN_BODY,modeInBody(Be,Le)}function startTagInFrameset(Be,Le){switch(Le.tagID){case TAG_ID.HTML:{startTagInBody(Be,Le);break}case TAG_ID.FRAMESET:{Be._insertElement(Le,NS.HTML);break}case TAG_ID.FRAME:{Be._appendElement(Le,NS.HTML),Le.ackSelfClosing=!0;break}case TAG_ID.NOFRAMES:{startTagInHead(Be,Le);break}}}function endTagInFrameset(Be,Le){Le.tagID===TAG_ID.FRAMESET&&!Be.openElements.isRootHtmlElementCurrent()&&(Be.openElements.pop(),!Be.fragmentContext&&Be.openElements.currentTagId!==TAG_ID.FRAMESET&&(Be.insertionMode=InsertionMode.AFTER_FRAMESET))}function startTagAfterFrameset(Be,Le){switch(Le.tagID){case TAG_ID.HTML:{startTagInBody(Be,Le);break}case TAG_ID.NOFRAMES:{startTagInHead(Be,Le);break}}}function endTagAfterFrameset(Be,Le){Le.tagID===TAG_ID.HTML&&(Be.insertionMode=InsertionMode.AFTER_AFTER_FRAMESET)}function startTagAfterAfterBody(Be,Le){Le.tagID===TAG_ID.HTML?startTagInBody(Be,Le):tokenAfterAfterBody(Be,Le)}function tokenAfterAfterBody(Be,Le){Be.insertionMode=InsertionMode.IN_BODY,modeInBody(Be,Le)}function startTagAfterAfterFrameset(Be,Le){switch(Le.tagID){case TAG_ID.HTML:{startTagInBody(Be,Le);break}case TAG_ID.NOFRAMES:{startTagInHead(Be,Le);break}}}function nullCharacterInForeignContent(Be,Le){Le.chars=REPLACEMENT_CHARACTER,Be._insertCharacters(Le)}function characterInForeignContent(Be,Le){Be._insertCharacters(Le),Be.framesetOk=!1}function popUntilHtmlOrIntegrationPoint(Be){for(;Be.treeAdapter.getNamespaceURI(Be.openElements.current)!==NS.HTML&&Be.openElements.currentTagId!==void 0&&!Be._isIntegrationPoint(Be.openElements.currentTagId,Be.openElements.current);)Be.openElements.pop()}function startTagInForeignContent(Be,Le){if(causesExit(Le))popUntilHtmlOrIntegrationPoint(Be),Be._startTagOutsideForeignContent(Le);else{const Ye=Be._getAdjustedCurrentElement(),tt=Be.treeAdapter.getNamespaceURI(Ye);tt===NS.MATHML?adjustTokenMathMLAttrs(Le):tt===NS.SVG&&(adjustTokenSVGTagName(Le),adjustTokenSVGAttrs(Le)),adjustTokenXMLAttrs(Le),Le.selfClosing?Be._appendElement(Le,tt):Be._insertElement(Le,tt),Le.ackSelfClosing=!0}}function endTagInForeignContent(Be,Le){if(Le.tagID===TAG_ID.P||Le.tagID===TAG_ID.BR){popUntilHtmlOrIntegrationPoint(Be),Be._endTagOutsideForeignContent(Le);return}for(let Ye=Be.openElements.stackTop;Ye>0;Ye--){const tt=Be.openElements.items[Ye];if(Be.treeAdapter.getNamespaceURI(tt)===NS.HTML){Be._endTagOutsideForeignContent(Le);break}const nt=Be.treeAdapter.getTagName(tt);if(nt.toLowerCase()===Le.tagName){Le.tagName=nt,Be.openElements.shortenToLength(Ye);break}}}TAG_NAMES.AREA,TAG_NAMES.BASE,TAG_NAMES.BASEFONT,TAG_NAMES.BGSOUND,TAG_NAMES.BR,TAG_NAMES.COL,TAG_NAMES.EMBED,TAG_NAMES.FRAME,TAG_NAMES.HR,TAG_NAMES.IMG,TAG_NAMES.INPUT,TAG_NAMES.KEYGEN,TAG_NAMES.LINK,TAG_NAMES.META,TAG_NAMES.PARAM,TAG_NAMES.SOURCE,TAG_NAMES.TRACK,TAG_NAMES.WBR;const gfmTagfilterExpression=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,knownMdxNames=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),parseOptions={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function raw(Be,Le){const Ye=documentMode(Be),tt=zwitch("type",{handlers:{root,element,text,comment,doctype,raw:handleRaw},unknown}),nt={parser:Ye?new Parser(parseOptions):Parser.getFragmentParser(void 0,parseOptions),handle(gt){tt(gt,nt)},stitches:!1,options:Le||{}};tt(Be,nt),resetTokenizer(nt,pointStart());const ft=Ye?nt.parser.document:nt.parser.getFragment(),ht=fromParse5(ft,{file:nt.options.file});return nt.stitches&&visit$1(ht,"comment",function(gt,At,xt){const Et=gt;if(Et.value.stitch&&xt&&At!==void 0){const yt=xt.children;return yt[At]=Et.value.stitch,At}}),ht.type==="root"&&ht.children.length===1&&ht.children[0].type===Be.type?ht.children[0]:ht}function all(Be,Le){let Ye=-1;if(Be)for(;++Ye<Be.length;)Le.handle(Be[Ye])}function root(Be,Le){all(Be.children,Le)}function element(Be,Le){startTag(Be,Le),all(Be.children,Le),endTag(Be,Le)}function text(Be,Le){Le.parser.tokenizer.state>4&&(Le.parser.tokenizer.state=0);const Ye={type:TokenType.CHARACTER,chars:Be.value,location:createParse5Location(Be)};resetTokenizer(Le,pointStart(Be)),Le.parser.currentToken=Ye,Le.parser._processToken(Le.parser.currentToken)}function doctype(Be,Le){const Ye={type:TokenType.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:createParse5Location(Be)};resetTokenizer(Le,pointStart(Be)),Le.parser.currentToken=Ye,Le.parser._processToken(Le.parser.currentToken)}function stitch(Be,Le){Le.stitches=!0;const Ye=cloneWithoutChildren(Be);if("children"in Be&&"children"in Ye){const tt=raw({type:"root",children:Be.children},Le.options);Ye.children=tt.children}comment({type:"comment",value:{stitch:Ye}},Le)}function comment(Be,Le){const Ye=Be.value,tt={type:TokenType.COMMENT,data:Ye,location:createParse5Location(Be)};resetTokenizer(Le,pointStart(Be)),Le.parser.currentToken=tt,Le.parser._processToken(Le.parser.currentToken)}function handleRaw(Be,Le){if(Le.parser.tokenizer.preprocessor.html="",Le.parser.tokenizer.preprocessor.pos=-1,Le.parser.tokenizer.preprocessor.lastGapPos=-2,Le.parser.tokenizer.preprocessor.gapStack=[],Le.parser.tokenizer.preprocessor.skipNextNewLine=!1,Le.parser.tokenizer.preprocessor.lastChunkWritten=!1,Le.parser.tokenizer.preprocessor.endOfChunkHit=!1,Le.parser.tokenizer.preprocessor.isEol=!1,setPoint(Le,pointStart(Be)),Le.parser.tokenizer.write(Le.options.tagfilter?Be.value.replace(gfmTagfilterExpression,"<$1$2"):Be.value,!1),Le.parser.tokenizer._runParsingLoop(),Le.parser.tokenizer.state===72||Le.parser.tokenizer.state===78){Le.parser.tokenizer.preprocessor.lastChunkWritten=!0;const Ye=Le.parser.tokenizer._consume();Le.parser.tokenizer._callState(Ye)}}function unknown(Be,Le){const Ye=Be;if(Le.options.passThrough&&Le.options.passThrough.includes(Ye.type))stitch(Ye,Le);else{let tt="";throw knownMdxNames.has(Ye.type)&&(tt=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+Ye.type+"` node"+tt)}}function resetTokenizer(Be,Le){setPoint(Be,Le);const Ye=Be.parser.tokenizer.currentCharacterToken;Ye&&Ye.location&&(Ye.location.endLine=Be.parser.tokenizer.preprocessor.line,Ye.location.endCol=Be.parser.tokenizer.preprocessor.col+1,Ye.location.endOffset=Be.parser.tokenizer.preprocessor.offset+1,Be.parser.currentToken=Ye,Be.parser._processToken(Be.parser.currentToken)),Be.parser.tokenizer.paused=!1,Be.parser.tokenizer.inLoop=!1,Be.parser.tokenizer.active=!1,Be.parser.tokenizer.returnState=TokenizerMode.DATA,Be.parser.tokenizer.charRefCode=-1,Be.parser.tokenizer.consumedAfterSnapshot=-1,Be.parser.tokenizer.currentLocation=null,Be.parser.tokenizer.currentCharacterToken=null,Be.parser.tokenizer.currentToken=null,Be.parser.tokenizer.currentAttr={name:"",value:""}}function setPoint(Be,Le){if(Le&&Le.offset!==void 0){const Ye={startLine:Le.line,startCol:Le.column,startOffset:Le.offset,endLine:-1,endCol:-1,endOffset:-1};Be.parser.tokenizer.preprocessor.lineStartPos=-Le.column+1,Be.parser.tokenizer.preprocessor.droppedBufferSize=Le.offset,Be.parser.tokenizer.preprocessor.line=Le.line,Be.parser.tokenizer.currentLocation=Ye}}function startTag(Be,Le){const Ye=Be.tagName.toLowerCase();if(Le.parser.tokenizer.state===TokenizerMode.PLAINTEXT)return;resetTokenizer(Le,pointStart(Be));const tt=Le.parser.openElements.current;let nt="namespaceURI"in tt?tt.namespaceURI:webNamespaces.html;nt===webNamespaces.html&&Ye==="svg"&&(nt=webNamespaces.svg);const ft=toParse5({...Be,children:[]},{space:nt===webNamespaces.svg?"svg":"html"}),ht={type:TokenType.START_TAG,tagName:Ye,tagID:getTagID(Ye),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in ft?ft.attrs:[],location:createParse5Location(Be)};Le.parser.currentToken=ht,Le.parser._processToken(Le.parser.currentToken),Le.parser.tokenizer.lastStartTagName=Ye}function endTag(Be,Le){const Ye=Be.tagName.toLowerCase();if(!Le.parser.tokenizer.inForeignNode&&htmlVoidElements.includes(Ye)||Le.parser.tokenizer.state===TokenizerMode.PLAINTEXT)return;resetTokenizer(Le,pointEnd(Be));const tt={type:TokenType.END_TAG,tagName:Ye,tagID:getTagID(Ye),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:createParse5Location(Be)};Le.parser.currentToken=tt,Le.parser._processToken(Le.parser.currentToken),Ye===Le.parser.tokenizer.lastStartTagName&&(Le.parser.tokenizer.state===TokenizerMode.RCDATA||Le.parser.tokenizer.state===TokenizerMode.RAWTEXT||Le.parser.tokenizer.state===TokenizerMode.SCRIPT_DATA)&&(Le.parser.tokenizer.state=TokenizerMode.DATA)}function documentMode(Be){const Le=Be.type==="root"?Be.children[0]:Be;return!!(Le&&(Le.type==="doctype"||Le.type==="element"&&Le.tagName.toLowerCase()==="html"))}function createParse5Location(Be){const Le=pointStart(Be)||{line:void 0,column:void 0,offset:void 0},Ye=pointEnd(Be)||{line:void 0,column:void 0,offset:void 0};return{startLine:Le.line,startCol:Le.column,startOffset:Le.offset,endLine:Ye.line,endCol:Ye.column,endOffset:Ye.offset}}function cloneWithoutChildren(Be){return"children"in Be?structuredClone$1({...Be,children:[]}):structuredClone$1(Be)}function rehypeRaw(Be){return function(Le,Ye){return raw(Le,{...Be,file:Ye})}}const Wrapper$2=dt.div`
|
|
6213
6213
|
display: flex;
|
|
6214
6214
|
flex-direction: column;
|