@qualified-salesforce/web 0.0.1-oidc-bootstrap
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/41842993ec71d6628e4949e9a22b146b.svg +3 -0
- package/7271f3433ed82fc7f56adcd9e30275f4.svg +17 -0
- package/LICENSE.txt +82 -0
- package/components/helpers/entriesStringValidations.js +69 -0
- package/components/helpers/languages.js +32 -0
- package/components/shared/assertUnreachable.js +5 -0
- package/components/shared/controls/imageCropperHelpers.js +43 -0
- package/components/shared/meetingLoadingProgressSpec.js +116 -0
- package/constants.generated.js +9883 -0
- package/css/widget/multimodal_v2/host.split-css.css +162 -0
- package/css/widget/multimodal_v2/index.split-css.panda.css +5240 -0
- package/css/widget/widget.split-css.css +100 -0
- package/fonts/inter/Inter-Black.woff +0 -0
- package/fonts/inter/Inter-Black.woff2 +0 -0
- package/fonts/inter/Inter-BlackItalic.woff +0 -0
- package/fonts/inter/Inter-BlackItalic.woff2 +0 -0
- package/fonts/inter/Inter-Bold.woff +0 -0
- package/fonts/inter/Inter-Bold.woff2 +0 -0
- package/fonts/inter/Inter-BoldItalic.woff +0 -0
- package/fonts/inter/Inter-BoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-ExtraBold.woff +0 -0
- package/fonts/inter/Inter-ExtraBold.woff2 +0 -0
- package/fonts/inter/Inter-ExtraBoldItalic.woff +0 -0
- package/fonts/inter/Inter-ExtraBoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-ExtraLight.woff +0 -0
- package/fonts/inter/Inter-ExtraLight.woff2 +0 -0
- package/fonts/inter/Inter-ExtraLightItalic.woff +0 -0
- package/fonts/inter/Inter-ExtraLightItalic.woff2 +0 -0
- package/fonts/inter/Inter-Italic.woff +0 -0
- package/fonts/inter/Inter-Italic.woff2 +0 -0
- package/fonts/inter/Inter-Light.woff +0 -0
- package/fonts/inter/Inter-Light.woff2 +0 -0
- package/fonts/inter/Inter-LightItalic.woff +0 -0
- package/fonts/inter/Inter-LightItalic.woff2 +0 -0
- package/fonts/inter/Inter-Medium.woff +0 -0
- package/fonts/inter/Inter-Medium.woff2 +0 -0
- package/fonts/inter/Inter-MediumItalic.woff +0 -0
- package/fonts/inter/Inter-MediumItalic.woff2 +0 -0
- package/fonts/inter/Inter-Regular.woff +0 -0
- package/fonts/inter/Inter-Regular.woff2 +0 -0
- package/fonts/inter/Inter-SemiBold.woff +0 -0
- package/fonts/inter/Inter-SemiBold.woff2 +0 -0
- package/fonts/inter/Inter-SemiBoldItalic.woff +0 -0
- package/fonts/inter/Inter-SemiBoldItalic.woff2 +0 -0
- package/fonts/inter/Inter-Thin.woff +0 -0
- package/fonts/inter/Inter-Thin.woff2 +0 -0
- package/fonts/inter/Inter-ThinItalic.woff +0 -0
- package/fonts/inter/Inter-ThinItalic.woff2 +0 -0
- package/fonts/inter/Inter-italic.var.woff2 +0 -0
- package/fonts/inter/Inter-roman.var.woff2 +0 -0
- package/images/close.js +63 -0
- package/images/logo.js +22 -0
- package/js/4101.js +19721 -0
- package/js/daily-esm.js +9948 -0
- package/js/date-fns.js +427 -0
- package/js/multimodal_v2.js +1653 -0
- package/js/runtime.js +109 -0
- package/media/Inter-Black.796be8d8bf.woff2 +0 -0
- package/media/Inter-Black.b254104c56.woff +0 -0
- package/media/Inter-BlackItalic.70306b0eae.woff +0 -0
- package/media/Inter-BlackItalic.752f1e0aaa.woff2 +0 -0
- package/media/Inter-Bold.579e0f95ca.woff2 +0 -0
- package/media/Inter-Bold.b1234477a5.woff +0 -0
- package/media/Inter-BoldItalic.3d0d804323.woff +0 -0
- package/media/Inter-BoldItalic.828a494e04.woff2 +0 -0
- package/media/Inter-ExtraBold.208a9e6c99.woff +0 -0
- package/media/Inter-ExtraBold.d65f028165.woff2 +0 -0
- package/media/Inter-ExtraBoldItalic.30429962ec.woff +0 -0
- package/media/Inter-ExtraBoldItalic.8c7eac5ce3.woff2 +0 -0
- package/media/Inter-ExtraLight.15c082a57d.woff +0 -0
- package/media/Inter-ExtraLight.6824177d1e.woff2 +0 -0
- package/media/Inter-ExtraLightItalic.05138dddf3.woff2 +0 -0
- package/media/Inter-ExtraLightItalic.3beee54f59.woff +0 -0
- package/media/Inter-Italic.9beab78452.woff +0 -0
- package/media/Inter-Italic.d593a8df79.woff2 +0 -0
- package/media/Inter-Light.27083fa637.woff2 +0 -0
- package/media/Inter-Light.91dfddd842.woff +0 -0
- package/media/Inter-LightItalic.0a783b89b3.woff2 +0 -0
- package/media/Inter-LightItalic.f8ccf2813f.woff +0 -0
- package/media/Inter-Medium.dc792b508e.woff2 +0 -0
- package/media/Inter-Medium.ec7dd2d9d8.woff +0 -0
- package/media/Inter-MediumItalic.17301e5b40.woff +0 -0
- package/media/Inter-MediumItalic.84d3493a9f.woff2 +0 -0
- package/media/Inter-Regular.f1f0c35b32.woff2 +0 -0
- package/media/Inter-Regular.f356e84aa0.woff +0 -0
- package/media/Inter-SemiBold.55027e4724.woff +0 -0
- package/media/Inter-SemiBold.fcb100c760.woff2 +0 -0
- package/media/Inter-SemiBoldItalic.ab9105ed3b.woff +0 -0
- package/media/Inter-SemiBoldItalic.d90f295d0c.woff2 +0 -0
- package/media/Inter-Thin.16325d9b0f.woff +0 -0
- package/media/Inter-Thin.dafaa44d99.woff2 +0 -0
- package/media/Inter-ThinItalic.4fc662b3cf.woff2 +0 -0
- package/media/Inter-ThinItalic.d3d8994788.woff +0 -0
- package/media/Inter-italic.var.958a0b9742.woff2 +0 -0
- package/media/Inter-roman.var.b2129c009c.woff2 +0 -0
- package/package.json +20 -0
- package/packs/widget/api/docking/docking_host.js +97 -0
- package/packs/widget/api/docking/index.js +294 -0
- package/packs/widget/api/docking/shared.js +164 -0
- package/packs/widget/api/docking/viewport_lock.js +488 -0
- package/packs/widget/api/docking/viewport_resize.js +1203 -0
- package/packs/widget/esm/fonts/Inter-Black.796be8d8bf.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Black.b254104c56.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BlackItalic.70306b0eae.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BlackItalic.752f1e0aaa.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Bold.579e0f95ca.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Bold.b1234477a5.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BoldItalic.3d0d804323.woff +0 -0
- package/packs/widget/esm/fonts/Inter-BoldItalic.828a494e04.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBold.208a9e6c99.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBold.d65f028165.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBoldItalic.30429962ec.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraBoldItalic.8c7eac5ce3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLight.15c082a57d.woff +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLight.6824177d1e.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLightItalic.05138dddf3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ExtraLightItalic.3beee54f59.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Italic.9beab78452.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Italic.d593a8df79.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Light.27083fa637.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Light.91dfddd842.woff +0 -0
- package/packs/widget/esm/fonts/Inter-LightItalic.0a783b89b3.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-LightItalic.f8ccf2813f.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Medium.dc792b508e.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Medium.ec7dd2d9d8.woff +0 -0
- package/packs/widget/esm/fonts/Inter-MediumItalic.17301e5b40.woff +0 -0
- package/packs/widget/esm/fonts/Inter-MediumItalic.84d3493a9f.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Regular.f1f0c35b32.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Regular.f356e84aa0.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBold.55027e4724.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBold.fcb100c760.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBoldItalic.ab9105ed3b.woff +0 -0
- package/packs/widget/esm/fonts/Inter-SemiBoldItalic.d90f295d0c.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-Thin.16325d9b0f.woff +0 -0
- package/packs/widget/esm/fonts/Inter-Thin.dafaa44d99.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ThinItalic.4fc662b3cf.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-ThinItalic.d3d8994788.woff +0 -0
- package/packs/widget/esm/fonts/Inter-italic.var.958a0b9742.woff2 +0 -0
- package/packs/widget/esm/fonts/Inter-roman.var.b2129c009c.woff2 +0 -0
- package/packs/widget/esm/index.js +183 -0
- package/packs/widget/esm/qualified.css +5502 -0
- package/routes/app/offers/scripts/OfferMainScript.js +154 -0
- package/routes/app/offers/scripts/constants.js +71 -0
- package/routes/app/offers/scripts/main/ButtonManager.js +65 -0
- package/routes/app/offers/scripts/main/FormManager.js +325 -0
- package/routes/app/offers/scripts/main/MainContext.js +19 -0
- package/routes/app/offers/scripts/main/OfferManager.js +91 -0
- package/routes/app/offers/scripts/main/TriggerManager.js +125 -0
- package/routes/app/offers/scripts/rendering/ContentManager.js +53 -0
- package/routes/app/offers/scripts/rendering/LocationManager.js +83 -0
- package/routes/app/offers/scripts/rendering/RenderedOffer.js +188 -0
- package/routes/app/offers/scripts/rendering/Renderer.js +69 -0
- package/routes/app/offers/scripts/rendering/RenderingInitializer.js +62 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManager.js +31 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerFooter.js +81 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerHeader.js +81 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerModal.js +117 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationManagerSidebar.js +75 -0
- package/routes/app/offers/scripts/rendering/animations/AnimationResult.js +43 -0
- package/routes/app/offers/scripts/rendering/animations/Animator.js +78 -0
- package/routes/app/offers/scripts/rendering/animations/BaseAnimationManager.js +25 -0
- package/routes/app/offers/scripts/rendering/lib/BaseComponent.js +106 -0
- package/routes/app/offers/scripts/rendering/lib/FormComponent.js +134 -0
- package/routes/app/offers/scripts/rendering/lib/OfferComponent.js +144 -0
- package/routes/app/offers/scripts/rendering/lib/ScrollbarWidth.js +27 -0
- package/routes/app/offers/scripts/rendering/lib/decorators.js +20 -0
- package/routes/app/offers/scripts/rendering/locations/CSSVarsManager.js +66 -0
- package/routes/app/offers/scripts/rendering/locations/ElementResizeObserver.js +49 -0
- package/routes/app/offers/scripts/rendering/locations/footer.js +53 -0
- package/routes/app/offers/scripts/rendering/locations/header/AsyncBatchProcessor.js +70 -0
- package/routes/app/offers/scripts/rendering/locations/header/CSSTransitionObserver.js +182 -0
- package/routes/app/offers/scripts/rendering/locations/header/ElementStyleChangeObserver.js +138 -0
- package/routes/app/offers/scripts/rendering/locations/header/ExternalStyleManager.js +110 -0
- package/routes/app/offers/scripts/rendering/locations/header/Header.js +353 -0
- package/routes/app/offers/scripts/rendering/locations/header/InlineStyleManager.js +105 -0
- package/routes/app/offers/scripts/rendering/locations/header/MatchingElementsObserver.js +107 -0
- package/routes/app/offers/scripts/rendering/locations/header/NewElementsObserver.js +129 -0
- package/routes/app/offers/scripts/rendering/locations/header/RuleWrapper.js +46 -0
- package/routes/app/offers/scripts/rendering/locations/header/SelectorObservable.js +23 -0
- package/routes/app/offers/scripts/rendering/locations/header/SelectorObserver.js +61 -0
- package/routes/app/offers/scripts/rendering/locations/header/ShiftedElementsManager.js +45 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleElementManager.js +37 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleElementWrapper.js +62 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/ObservedSelectorValue.js +45 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/ObservedSelectors.js +62 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/StyleSelectorObserver.js +294 -0
- package/routes/app/offers/scripts/rendering/locations/header/StyleSelectorObserver/constants.js +21 -0
- package/routes/app/offers/scripts/rendering/locations/header/WindowResizeObserver.js +43 -0
- package/routes/app/offers/scripts/rendering/locations/header/utils.js +25 -0
- package/routes/app/offers/scripts/rendering/locations/popup.js +66 -0
- package/routes/app/offers/scripts/rendering/locations/sidebar.js +21 -0
- package/routes/app/offers/scripts/rendering/variations/ButtonBanner.js +105 -0
- package/routes/app/offers/scripts/rendering/variations/ButtonModal.js +114 -0
- package/routes/app/offers/scripts/rendering/variations/FormBanner.js +214 -0
- package/routes/app/offers/scripts/rendering/variations/FormModal.js +325 -0
- package/routes/app/offers/scripts/rendering/variations/LinkBanner.js +105 -0
- package/routes/app/offers/scripts/rendering/variations/components/Body.js +29 -0
- package/routes/app/offers/scripts/rendering/variations/components/Button.js +128 -0
- package/routes/app/offers/scripts/rendering/variations/components/DismissButton.js +39 -0
- package/routes/app/offers/scripts/rendering/variations/components/ForegroundImageBanner.js +110 -0
- package/routes/app/offers/scripts/rendering/variations/components/ForegroundImageModal.js +128 -0
- package/routes/app/offers/scripts/rendering/variations/components/Headline.js +94 -0
- package/routes/app/offers/scripts/rendering/variations/components/MultiFieldForm.js +302 -0
- package/routes/app/offers/scripts/rendering/variations/components/Tooltip.js +74 -0
- package/routes/app/offers/scripts/rendering/variations/icons.js +15 -0
- package/routes/app/offers/scripts/utils.js +115 -0
- package/routes/app/offers/utils/HTMLUtils.js +10 -0
- package/routes/app/offers/utils/createTypeGuard.js +32 -0
- package/routes/app/offers/utils/promise-utils.js +22 -0
- package/routes/app/websiteBuilder/stores/storeHelpers.js +18 -0
- package/sounds/message-initial.mp3 +0 -0
- package/sounds/message-received.mp3 +0 -0
- package/sounds/message-sent.mp3 +0 -0
- package/src/arrays.js +15 -0
- package/src/audio.js +106 -0
- package/src/bounded-set.js +16 -0
- package/src/bounding_box_observer.js +129 -0
- package/src/decorators.js +29 -0
- package/src/dom.js +128 -0
- package/src/dom_roots.js +26 -0
- package/src/embedded_forms/EmbeddedForm.js +638 -0
- package/src/embedded_forms/QualifiedEmbeddedForm.js +51 -0
- package/src/embedded_forms/QualifiedFormField.js +137 -0
- package/src/embedded_forms/utils.js +17 -0
- package/src/graphql-types.js +1686 -0
- package/src/iframes.js +86 -0
- package/src/localstorage.js +43 -0
- package/src/mirror/Shipper.js +133 -0
- package/src/mirror/constants.generated.js +13 -0
- package/src/mirror/constants.js +238 -0
- package/src/mirror/shipper/ChangeQueue.js +155 -0
- package/src/mirror/shipper/DOMSerializer.js +392 -0
- package/src/mirror/shipper/observers.js +441 -0
- package/src/mirror/shipper/utils.js +98 -0
- package/src/mixins/disposable.js +125 -0
- package/src/mixins/injectable.js +37 -0
- package/src/personalizations/personalization-manager.js +110 -0
- package/src/personalizations/strategies/node-freezing-strategy.js +174 -0
- package/src/personalizations/utils.js +187 -0
- package/src/promises.js +107 -0
- package/src/proxy.js +144 -0
- package/src/qualified_root.js +35 -0
- package/src/query_params.js +55 -0
- package/src/shadow-dom-helper.js +63 -0
- package/src/singleton_host.js +39 -0
- package/src/smart_website/trigger.js +49 -0
- package/src/smart_website/utils.js +149 -0
- package/src/string.js +53 -0
- package/src/timezone.js +57 -0
- package/src/timing.js +49 -0
- package/src/type-utils.js +76 -0
- package/src/url-utils.js +102 -0
- package/src/url.js +50 -0
- package/src/utils.js +72 -0
- package/src/validation.js.js +29 -0
- package/src/validation_ts.js +6 -0
- package/vendor/actioncable/adapters.js +6 -0
- package/vendor/actioncable/connection.js +204 -0
- package/vendor/actioncable/connection_monitor.js +129 -0
- package/vendor/actioncable/consumer.js +91 -0
- package/vendor/actioncable/index.js +34 -0
- package/vendor/actioncable/internal.js +22 -0
- package/vendor/actioncable/logger.js +28 -0
- package/vendor/actioncable/subscription.js +93 -0
- package/vendor/actioncable/subscriptions.js +89 -0
- package/vendor/open-telemetry-idgenerator.js +43 -0
- package/widget/analytics/facebook_tracker.js +8 -0
- package/widget/analytics/google_analytics_tracker.js +83 -0
- package/widget/analytics/google_tag_manager_tracker.js +22 -0
- package/widget/analytics.js +58 -0
- package/widget/api_handler/api_handler.js +730 -0
- package/widget/api_handler/base_api_handler.js +249 -0
- package/widget/booker_intent_tracker.js +391 -0
- package/widget/booker_outcome_tracker.js +329 -0
- package/widget/capture_widget_exceptions.js +150 -0
- package/widget/channel.js +282 -0
- package/widget/composite_experience_adapter.js +101 -0
- package/widget/constants.generated.js +350 -0
- package/widget/constants.js +21 -0
- package/widget/container.js +193 -0
- package/widget/content_activity_emitter.js +36 -0
- package/widget/data360_visitor.js +67 -0
- package/widget/date_provider.js +11 -0
- package/widget/debug_mode_state.js +175 -0
- package/widget/dummy_module.js +9 -0
- package/widget/eloqua_visitor.js +17 -0
- package/widget/form_cta_booker_intent.js +246 -0
- package/widget/hubspot_visitor.js +39 -0
- package/widget/inline_meeting_booker_page.js +90 -0
- package/widget/local_state/abstract_local_state.js +38 -0
- package/widget/local_state/debug_state/abstract_debug_flow.js +29 -0
- package/widget/local_state/debug_state/custom_form_flow.js +14 -0
- package/widget/local_state/debug_state/hubspot_form_flow.js +19 -0
- package/widget/local_state/debug_state/hubspot_v4_form_flow.js +19 -0
- package/widget/local_state/debug_state/marketo_form_flow.js +20 -0
- package/widget/local_state/debug_state/pardot_form_flow.js +18 -0
- package/widget/local_state/debug_state.js +362 -0
- package/widget/local_state/trace_state.js +20 -0
- package/widget/location_provider.js +9 -0
- package/widget/marketo_visitor.js +39 -0
- package/widget/meetings/tracing/buttons_forms_triggering_tracer.js +124 -0
- package/widget/meetings/tracing/spans/button_spans.js +18 -0
- package/widget/meetings/tracing/spans/form_spans.js +11 -0
- package/widget/multimodal_v2/assets_preloader.js +97 -0
- package/widget/multimodal_v2/components/AppLayout.js +93 -0
- package/widget/multimodal_v2/components/CursorOverlay.js +93 -0
- package/widget/multimodal_v2/components/PointerRectOverlay.js +74 -0
- package/widget/multimodal_v2/components/app/Artifact.js +109 -0
- package/widget/multimodal_v2/components/app/Background.js +27 -0
- package/widget/multimodal_v2/components/app/CalendarLoadingContent.js +255 -0
- package/widget/multimodal_v2/components/app/Chat.js +39 -0
- package/widget/multimodal_v2/components/app/CookieConsentModal.js +149 -0
- package/widget/multimodal_v2/components/app/Foreground.js +48 -0
- package/widget/multimodal_v2/components/app/HiddenInput.js +41 -0
- package/widget/multimodal_v2/components/app/Input.js +72 -0
- package/widget/multimodal_v2/components/app/LightboxExperience.js +769 -0
- package/widget/multimodal_v2/components/app/LoadingOverlay.js +97 -0
- package/widget/multimodal_v2/components/app/Main.js +985 -0
- package/widget/multimodal_v2/components/app/MessengerButton.js +160 -0
- package/widget/multimodal_v2/components/app/Multimodal.js +17 -0
- package/widget/multimodal_v2/components/app/OverlayControls.js +79 -0
- package/widget/multimodal_v2/components/app/Preview.js +32 -0
- package/widget/multimodal_v2/components/app/PrivacyDisclosure.js +57 -0
- package/widget/multimodal_v2/components/app/RotateDeviceOverlay.js +70 -0
- package/widget/multimodal_v2/components/app/Toolbar.js +156 -0
- package/widget/multimodal_v2/components/chat/ChatComposer.js +129 -0
- package/widget/multimodal_v2/components/chat/ChatInputForm.js +398 -0
- package/widget/multimodal_v2/components/chat/ColdStartQuestions.js +354 -0
- package/widget/multimodal_v2/components/chat/ComposerErrorBanner.js +62 -0
- package/widget/multimodal_v2/components/chat/PostCallSurvey.js +359 -0
- package/widget/multimodal_v2/components/chat/preview/FieldRequestRenderer.js +41 -0
- package/widget/multimodal_v2/components/chat/preview/PreviewMessageRenderer.js +60 -0
- package/widget/multimodal_v2/components/chat/preview/SharedOfferRenderer.js +143 -0
- package/widget/multimodal_v2/components/chat/preview/TextRenderer.js +27 -0
- package/widget/multimodal_v2/components/chat/preview/TimelinePreview.js +254 -0
- package/widget/multimodal_v2/components/chat/timeline/CalendarEventOfferRenderer.js +103 -0
- package/widget/multimodal_v2/components/chat/timeline/CalendarEventPickRenderer.js +148 -0
- package/widget/multimodal_v2/components/chat/timeline/FieldEntryRenderer.js +84 -0
- package/widget/multimodal_v2/components/chat/timeline/FieldRequestRenderer.js +56 -0
- package/widget/multimodal_v2/components/chat/timeline/InlinePrivacyDisclosure.js +66 -0
- package/widget/multimodal_v2/components/chat/timeline/LinkPreviewCard.js +70 -0
- package/widget/multimodal_v2/components/chat/timeline/MessageEntry.js +88 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentContentRenderer.js +30 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentDeckRenderer.js +279 -0
- package/widget/multimodal_v2/components/chat/timeline/PresentVideoRenderer.js +131 -0
- package/widget/multimodal_v2/components/chat/timeline/ShareContentRenderer.js +59 -0
- package/widget/multimodal_v2/components/chat/timeline/SharedOfferRenderer.js +131 -0
- package/widget/multimodal_v2/components/chat/timeline/SystemRenderer.js +82 -0
- package/widget/multimodal_v2/components/chat/timeline/TextRenderer.js +66 -0
- package/widget/multimodal_v2/components/chat/timeline/Timeline.js +158 -0
- package/widget/multimodal_v2/components/debug/DebugMultimodalPanel.js +327 -0
- package/widget/multimodal_v2/components/decks/index.js +160 -0
- package/widget/multimodal_v2/components/field_request/BooleanField.js +77 -0
- package/widget/multimodal_v2/components/field_request/FieldComponents.js +69 -0
- package/widget/multimodal_v2/components/field_request/Form.js +87 -0
- package/widget/multimodal_v2/components/field_request/MultiPicklistField.js +240 -0
- package/widget/multimodal_v2/components/field_request/PicklistField.js +166 -0
- package/widget/multimodal_v2/components/field_request/SingleLineInputField.js +69 -0
- package/widget/multimodal_v2/components/field_request/TextField.js +37 -0
- package/widget/multimodal_v2/components/field_request/index.js +170 -0
- package/widget/multimodal_v2/components/helpers/AutoScroll.js +37 -0
- package/widget/multimodal_v2/components/helpers/ErrorBoundary.js +53 -0
- package/widget/multimodal_v2/components/helpers/FocusTrapDialog.js +26 -0
- package/widget/multimodal_v2/components/helpers/ImpressionTracker.js +94 -0
- package/widget/multimodal_v2/components/helpers/ListRenderer.js +37 -0
- package/widget/multimodal_v2/components/helpers/Localization.js +76 -0
- package/widget/multimodal_v2/components/helpers/Persisted.js +166 -0
- package/widget/multimodal_v2/components/helpers/RichText.js +358 -0
- package/widget/multimodal_v2/components/helpers/ScreenReaderHeading.js +17 -0
- package/widget/multimodal_v2/components/helpers/Thumbnail.js +190 -0
- package/widget/multimodal_v2/components/helpers/VisuallyHidden.js +41 -0
- package/widget/multimodal_v2/components/helpers/content_click_payloads.js +58 -0
- package/widget/multimodal_v2/components/helpers/useDraggable.js +103 -0
- package/widget/multimodal_v2/components/helpers/useTextOverflow.js +44 -0
- package/widget/multimodal_v2/components/lightbox_gather/index.js +741 -0
- package/widget/multimodal_v2/components/meetings/ArtifactEntryPoint.js +252 -0
- package/widget/multimodal_v2/components/meetings/MeetingAdditionalAttendees.js +325 -0
- package/widget/multimodal_v2/components/meetings/MeetingBookerEntry.js +100 -0
- package/widget/multimodal_v2/components/meetings/MeetingDetailsCard.js +99 -0
- package/widget/multimodal_v2/components/meetings/MeetingErrorBanner.js +62 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferEmailStep.js +239 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferFooter.js +104 -0
- package/widget/multimodal_v2/components/meetings/MeetingOfferSelectionStep.js +60 -0
- package/widget/multimodal_v2/components/meetings/MeetingRepHeader.js +222 -0
- package/widget/multimodal_v2/components/meetings/MeetingStepShell.js +92 -0
- package/widget/multimodal_v2/components/meetings/MeetingSummaryRail.js +515 -0
- package/widget/multimodal_v2/components/meetings/MeetingTimeSelector.js +603 -0
- package/widget/multimodal_v2/components/meetings/MonthDatePicker.js +422 -0
- package/widget/multimodal_v2/components/meetings/NavigationButtons.js +76 -0
- package/widget/multimodal_v2/components/meetings/TimeSlotHeader.js +357 -0
- package/widget/multimodal_v2/components/meetings/WeekViewHeader.js +20 -0
- package/widget/multimodal_v2/components/meetings/constants.js +7 -0
- package/widget/multimodal_v2/components/meetings/index.js +47 -0
- package/widget/multimodal_v2/components/meetings/utils.js +328 -0
- package/widget/multimodal_v2/components/multimodal/Audio.js +28 -0
- package/widget/multimodal_v2/components/multimodal/Controls.js +188 -0
- package/widget/multimodal_v2/components/multimodal/LiveVideo.js +63 -0
- package/widget/multimodal_v2/components/multimodal/MultiModalComponent.js +424 -0
- package/widget/multimodal_v2/components/multimodal/MultimodalAvatar.js +36 -0
- package/widget/multimodal_v2/components/multimodal/OrbAvatar.js +326 -0
- package/widget/multimodal_v2/components/multimodal/Status.js +220 -0
- package/widget/multimodal_v2/components/multimodal/VideoAvatar.js +24 -0
- package/widget/multimodal_v2/components/multimodal/VideoPreview.js +114 -0
- package/widget/multimodal_v2/components/multimodal/useAudioLevelMonitoring.js +96 -0
- package/widget/multimodal_v2/components/multimodal/useMultimodal.js +434 -0
- package/widget/multimodal_v2/components/presentations/index.js +372 -0
- package/widget/multimodal_v2/components/shared/Avatar.js +92 -0
- package/widget/multimodal_v2/components/shared/AvatarGroup.js +135 -0
- package/widget/multimodal_v2/components/shared/Button.js +245 -0
- package/widget/multimodal_v2/components/shared/ButtonGroup.js +133 -0
- package/widget/multimodal_v2/components/shared/ComposerForm.js +98 -0
- package/widget/multimodal_v2/components/shared/SpeakingIndicator.js +239 -0
- package/widget/multimodal_v2/components/shared/ThinkingAnimation.js +165 -0
- package/widget/multimodal_v2/components/shared/Tooltip.js +266 -0
- package/widget/multimodal_v2/components/shared/controls/Dropdown.js +79 -0
- package/widget/multimodal_v2/components/shared/controls/PillToggle.js +142 -0
- package/widget/multimodal_v2/components/shared/controls/TextArea.js +114 -0
- package/widget/multimodal_v2/components/shared/toolCallLabels.js +12 -0
- package/widget/multimodal_v2/components/slides/SlidesThumbnail.js +47 -0
- package/widget/multimodal_v2/components/slides/index.js +61 -0
- package/widget/multimodal_v2/constants.js +88 -0
- package/widget/multimodal_v2/host.split-css.js +2 -0
- package/widget/multimodal_v2/host.string.js +96 -0
- package/widget/multimodal_v2/images/icons.js +582 -0
- package/widget/multimodal_v2/images/posters/piper_low_res.jpg +0 -0
- package/widget/multimodal_v2/index.js +23 -0
- package/widget/multimodal_v2/index.panda.js +28 -0
- package/widget/multimodal_v2/index.split-css.panda.js +2 -0
- package/widget/multimodal_v2/inline_meeting_booker.js +182 -0
- package/widget/multimodal_v2/locales/cs.js +196 -0
- package/widget/multimodal_v2/locales/da.js +196 -0
- package/widget/multimodal_v2/locales/de.js +196 -0
- package/widget/multimodal_v2/locales/en.js +196 -0
- package/widget/multimodal_v2/locales/en_AU.js +197 -0
- package/widget/multimodal_v2/locales/en_GB.js +197 -0
- package/widget/multimodal_v2/locales/es.js +197 -0
- package/widget/multimodal_v2/locales/es_LA.js +196 -0
- package/widget/multimodal_v2/locales/fi.js +196 -0
- package/widget/multimodal_v2/locales/fr.js +197 -0
- package/widget/multimodal_v2/locales/fr_CA.js +196 -0
- package/widget/multimodal_v2/locales/id.js +196 -0
- package/widget/multimodal_v2/locales/index.js +48 -0
- package/widget/multimodal_v2/locales/it.js +196 -0
- package/widget/multimodal_v2/locales/ja.js +196 -0
- package/widget/multimodal_v2/locales/ko.js +196 -0
- package/widget/multimodal_v2/locales/nb.js +196 -0
- package/widget/multimodal_v2/locales/nl.js +196 -0
- package/widget/multimodal_v2/locales/pl.js +196 -0
- package/widget/multimodal_v2/locales/pt_BR.js +196 -0
- package/widget/multimodal_v2/locales/ru.js +196 -0
- package/widget/multimodal_v2/locales/sv.js +196 -0
- package/widget/multimodal_v2/locales/th.js +196 -0
- package/widget/multimodal_v2/locales/tr.js +196 -0
- package/widget/multimodal_v2/locales/vi.js +196 -0
- package/widget/multimodal_v2/locales/zh_CN.js +196 -0
- package/widget/multimodal_v2/locales/zh_TW.js +196 -0
- package/widget/multimodal_v2/multimodal.js +633 -0
- package/widget/multimodal_v2/multimodal_channel.js +195 -0
- package/widget/multimodal_v2/signals/active_conversation_signal.js +33 -0
- package/widget/multimodal_v2/signals/allowed_conversation_mode_signal.js +38 -0
- package/widget/multimodal_v2/signals/artifact_signal.js +22 -0
- package/widget/multimodal_v2/signals/layout_signal.js +98 -0
- package/widget/multimodal_v2/signals/messages_signal.js +207 -0
- package/widget/multimodal_v2/signals/ui_state_signal.js +128 -0
- package/widget/multimodal_v2/stable_bundle_src.js +44 -0
- package/widget/multimodal_v2/stores/ai_conversation_store.js +221 -0
- package/widget/multimodal_v2/stores/artifact_store.js +205 -0
- package/widget/multimodal_v2/stores/base_store.js +16 -0
- package/widget/multimodal_v2/stores/call_store.js +770 -0
- package/widget/multimodal_v2/stores/call_ui_adapter.js +225 -0
- package/widget/multimodal_v2/stores/debug_multimodal_scenario_store.js +471 -0
- package/widget/multimodal_v2/stores/decks_store.js +285 -0
- package/widget/multimodal_v2/stores/device_store.js +63 -0
- package/widget/multimodal_v2/stores/docking_store.js +62 -0
- package/widget/multimodal_v2/stores/field_request_store.js +326 -0
- package/widget/multimodal_v2/stores/meeting_store.js +477 -0
- package/widget/multimodal_v2/stores/participant_store.js +73 -0
- package/widget/multimodal_v2/stores/post_call_survey_store.js +160 -0
- package/widget/multimodal_v2/stores/pounce_tracking_store.js +163 -0
- package/widget/multimodal_v2/stores/pounce_tracking_store_v2.js +511 -0
- package/widget/multimodal_v2/stores/presentations_store.js +111 -0
- package/widget/multimodal_v2/stores/root_store.js +1919 -0
- package/widget/multimodal_v2/stores/screen_share_store.js +217 -0
- package/widget/multimodal_v2/stores/slides_store.js +21 -0
- package/widget/multimodal_v2/stores/translation_store.js +185 -0
- package/widget/multimodal_v2/stores/ui_store.js +496 -0
- package/widget/multimodal_v2/stores/waiting_store.js +159 -0
- package/widget/multimodal_v2/stores/website_navigation_store.js +767 -0
- package/widget/multimodal_v2/styled-system/css/conditions.js +34 -0
- package/widget/multimodal_v2/styled-system/css/css.js +48 -0
- package/widget/multimodal_v2/styled-system/css/cva.js +96 -0
- package/widget/multimodal_v2/styled-system/css/cx.js +13 -0
- package/widget/multimodal_v2/styled-system/css/index.js +15 -0
- package/widget/multimodal_v2/styled-system/css/sva.js +69 -0
- package/widget/multimodal_v2/styled-system/helpers.js +384 -0
- package/widget/multimodal_v2/styled-system/jsx/create-style-context.js +96 -0
- package/widget/multimodal_v2/styled-system/jsx/factory-helper.js +19 -0
- package/widget/multimodal_v2/styled-system/jsx/factory.js +111 -0
- package/widget/multimodal_v2/styled-system/jsx/index.js +12 -0
- package/widget/multimodal_v2/styled-system/jsx/is-valid-prop.js +22 -0
- package/widget/multimodal_v2/types.js +105 -0
- package/widget/multimodal_v2/utils/auto_scroller.js +157 -0
- package/widget/multimodal_v2/utils/flip_animation.js +124 -0
- package/widget/multimodal_v2/utils/focus_gate.js +237 -0
- package/widget/multimodal_v2/utils/locale.js +16 -0
- package/widget/multimodal_v2/utils/media_queries.js +30 -0
- package/widget/multimodal_v2/utils/multimodal_cache.js +19 -0
- package/widget/multimodal_v2/utils/mutation_effect.js +14 -0
- package/widget/multimodal_v2/utils/navigation_interceptor.js +205 -0
- package/widget/multimodal_v2/utils/navigation_strategies/dom_swap.js +393 -0
- package/widget/multimodal_v2/utils/navigation_strategies/index.js +12 -0
- package/widget/multimodal_v2/utils/navigation_strategies/lwr.js +61 -0
- package/widget/multimodal_v2/utils/navigation_strategies/navigation_utils.js +46 -0
- package/widget/multimodal_v2/utils/navigation_strategies/next_js.js +24 -0
- package/widget/multimodal_v2/utils/navigation_strategies/wouter_v3.js +15 -0
- package/widget/multimodal_v2/utils/objects_map.js +38 -0
- package/widget/multimodal_v2/utils/perceived_voice_turn_tracker.js +345 -0
- package/widget/multimodal_v2/utils/sanitize_html.js +132 -0
- package/widget/multimodal_v2/utils/signals.js +97 -0
- package/widget/multimodal_v2/utils/slide_zoom.js +114 -0
- package/widget/multimodal_v2/utils/theme_styles.js +137 -0
- package/widget/multimodal_v2/utils/url_observer.js +52 -0
- package/widget/multimodal_v2/utils/voice_onset_detector.js +127 -0
- package/widget/page_mirror.js +89 -0
- package/widget/page_view_activity_emitter.js +71 -0
- package/widget/pardot_visitor.js +137 -0
- package/widget/personalization_observer.js +96 -0
- package/widget/personalizations_config.js +160 -0
- package/widget/qualified_form/constants.js +23 -0
- package/widget/qualified_form/phone_utils.js +38 -0
- package/widget/qualified_form/qualified_form_action.js +91 -0
- package/widget/qualified_form/qualified_form_action_orchestrator.js +21 -0
- package/widget/qualified_form/qualified_form_api.js +471 -0
- package/widget/scroll_disabler.js +109 -0
- package/widget/server-logger.js +156 -0
- package/widget/smart_website_config.js +112 -0
- package/widget/telemetry/context.js +75 -0
- package/widget/telemetry/index.js +16 -0
- package/widget/telemetry/messenger_uptime.js +80 -0
- package/widget/telemetry/metrics.js +120 -0
- package/widget/telemetry/span.js +82 -0
- package/widget/telemetry/telemetry.js +180 -0
- package/widget/telemetry/tracer.js +41 -0
- package/widget/telemetry/tracing_store.js +310 -0
- package/widget/tracker.js +916 -0
- package/widget/utils/native_globals.js +129 -0
- package/widget/v1_adapter.js +50 -0
- package/widget/v2_adapter.js +368 -0
- package/widget/visitor/base_visitor_state.js +11 -0
- package/widget/visitor/cookie_visitor_state.js +128 -0
- package/widget/visitor/in_memory_visitor_state.js +29 -0
- package/widget/visitor/visitor_state.js +384 -0
- package/widget/visitor.js +356 -0
- package/widget/widget/linked_widget_v2.js +227 -0
- package/widget/widget/page_mirror_factory.js +22 -0
- package/widget/widget/sentry.js +130 -0
- package/widget/widget/widget.js +1698 -0
- package/widget/widget.split-css.js +2 -0
- package/widget/widget_bootstrap.js +97 -0
- package/widget/widget_object.js +73 -0
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
// Computes the inline style that zooms an on-screen media element (the demo video) IN toward a
|
|
2
|
+
// focal point — centering the zoom on that point, not the middle of the media — without changing
|
|
3
|
+
// the element's size on screen.
|
|
4
|
+
//
|
|
5
|
+
// It shows a window of the media (1/scale of the box) centered on the focal point, clamped so the
|
|
6
|
+
// window never runs past the media's edges, and blows that window up to refill the box. So the
|
|
7
|
+
// content the cursor is pointing at is what gets magnified and centered, and the footprint is
|
|
8
|
+
// unchanged. `clip-path` clips the (translated, scaled) content back to the box.
|
|
9
|
+
//
|
|
10
|
+
// Because the focal point pans toward center, the on-screen position of the target moves — call
|
|
11
|
+
// `slideZoomFocus` to find where it lands so the cursor can follow it. Pass null to reset.
|
|
12
|
+
// Default/fallback magnification, used when we point without a bounding box (e.g. a bare focal
|
|
13
|
+
// point) so there's nothing to size the zoom from. When we DO have a box, zoomScaleForBox picks the
|
|
14
|
+
// scale adaptively instead — see below.
|
|
15
|
+
const SLIDE_ZOOM_SCALE = 1.3;
|
|
16
|
+
// Exported so the spotlight overlay can fade in/out on the same timing as the zoom.
|
|
17
|
+
const SLIDE_ZOOM_TRANSITION_MS = 450;
|
|
18
|
+
// Adaptive-zoom bounds. The zoomed viewport shows a 1/scale-sized window of the frame, so a big box
|
|
19
|
+
// must use a gentle scale to stay in frame while a small box can be magnified hard.
|
|
20
|
+
const ZOOM_MIN_SCALE = 1; // never zoom OUT; a near-full-frame box just isn't magnified
|
|
21
|
+
const ZOOM_MAX_SCALE = 2; // cap so a tiny target doesn't blow up into a blurry mess
|
|
22
|
+
// The box's larger side should fill at most this fraction of the zoomed viewport, leaving a margin
|
|
23
|
+
// so the traced rectangle (which is padded outward a little) still sits inside the frame.
|
|
24
|
+
const ZOOM_TARGET_FILL = 0.8;
|
|
25
|
+
// Pick a magnification for a target bounding box (normalized [0,1] corners): the smaller the box,
|
|
26
|
+
// the more we zoom; a wide/tall box gets little or no zoom so the whole thing stays visible. Uses the
|
|
27
|
+
// box's LARGER dimension (the zoom is uniform, so the wider side is the binding constraint) and keeps
|
|
28
|
+
// it at ZOOM_TARGET_FILL of the 1/scale window: scale = ZOOM_TARGET_FILL / size, clamped to bounds.
|
|
29
|
+
function zoomScaleForBox(box) {
|
|
30
|
+
const largestSide = Math.max(Math.abs(box.x2 - box.x1), Math.abs(box.y2 - box.y1));
|
|
31
|
+
if (largestSide <= 0) return ZOOM_MAX_SCALE; // degenerate/point target: magnify fully
|
|
32
|
+
const fitScale = ZOOM_TARGET_FILL / largestSide;
|
|
33
|
+
return Math.min(ZOOM_MAX_SCALE, Math.max(ZOOM_MIN_SCALE, fitScale));
|
|
34
|
+
}
|
|
35
|
+
// Match the media's corner rounding so the clip doesn't square off the corners mid-zoom.
|
|
36
|
+
const SLIDE_ZOOM_CORNER_RADIUS = "8px";
|
|
37
|
+
// A smooth ease-out settle (easeOutQuint): the zoom moves off quickly then glides to a gentle stop,
|
|
38
|
+
// rather than the browser's flatter, more mechanical default `ease-in-out`. Same curve in and out so
|
|
39
|
+
// zooming back looks as smooth as zooming in.
|
|
40
|
+
const SLIDE_ZOOM_EASING = "cubic-bezier(0.22, 1, 0.36, 1)";
|
|
41
|
+
const TRANSITION = "transform " + SLIDE_ZOOM_TRANSITION_MS + "ms " + SLIDE_ZOOM_EASING + ", " + ("clip-path " + SLIDE_ZOOM_TRANSITION_MS + "ms " + SLIDE_ZOOM_EASING);
|
|
42
|
+
const clamp01 = (v)=>Math.min(1, Math.max(0, v));
|
|
43
|
+
// Top-left of the shown window (as a fraction of the box) for one axis: the window is 1/scale of
|
|
44
|
+
// the box, centered on the focal point, clamped to stay within [0, 1].
|
|
45
|
+
function windowOrigin(focal, scale) {
|
|
46
|
+
const windowSize = 1 / scale;
|
|
47
|
+
return Math.min(Math.max(focal - windowSize / 2, 0), 1 - windowSize);
|
|
48
|
+
}
|
|
49
|
+
// Where an arbitrary point lands (fraction of the box) after zooming toward `focal` — the same
|
|
50
|
+
// mapping the media applies, so overlays (cursor, bounding box) can be placed on the zoomed content.
|
|
51
|
+
// The window origin is set by the focal point, so every point shares one origin (unlike calling
|
|
52
|
+
// slideZoomFocus per point, which would recompute the origin from each point).
|
|
53
|
+
function slideZoomPoint(focal, point, scale) {
|
|
54
|
+
if (scale === void 0) scale = SLIDE_ZOOM_SCALE;
|
|
55
|
+
return {
|
|
56
|
+
x: scale * (clamp01(point.x) - windowOrigin(clamp01(focal.x), scale)),
|
|
57
|
+
y: scale * (clamp01(point.y) - windowOrigin(clamp01(focal.y), scale))
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
// Where the focal point lands (fraction of the box) after the zoom, so the cursor can be placed on
|
|
61
|
+
// it. Centered when the window isn't clamped; pulled toward the edge when it is.
|
|
62
|
+
function slideZoomFocus(focal, scale) {
|
|
63
|
+
if (scale === void 0) scale = SLIDE_ZOOM_SCALE;
|
|
64
|
+
return slideZoomPoint(focal, focal, scale);
|
|
65
|
+
}
|
|
66
|
+
// Recover an element's natural (un-zoomed) viewport rect from its measured rect while a slideZoom
|
|
67
|
+
// transform is applied. slideZoomStyle scales the element by `scale` about its top-left and shifts
|
|
68
|
+
// it by the window origin, so `measured` is the natural rect pushed through that transform; this
|
|
69
|
+
// inverts it. Used when a new point arrives mid-zoom: getBoundingClientRect then reflects the
|
|
70
|
+
// still-applied (and mid-transition) zoom, so the natural box can't be read from the DOM directly.
|
|
71
|
+
function unzoomRect(rect, focal) {
|
|
72
|
+
var _focal_scale;
|
|
73
|
+
const s = (_focal_scale = focal.scale) != null ? _focal_scale : SLIDE_ZOOM_SCALE;
|
|
74
|
+
const wx = windowOrigin(clamp01(focal.x), s);
|
|
75
|
+
const wy = windowOrigin(clamp01(focal.y), s);
|
|
76
|
+
return {
|
|
77
|
+
left: rect.left + wx * rect.width,
|
|
78
|
+
top: rect.top + wy * rect.height,
|
|
79
|
+
width: rect.width / s,
|
|
80
|
+
height: rect.height / s
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
function slideZoomStyle(focal) {
|
|
84
|
+
var _focal_scale;
|
|
85
|
+
if (!focal) {
|
|
86
|
+
return {
|
|
87
|
+
transform: "translate(0%, 0%) scale(1)",
|
|
88
|
+
transformOrigin: "0 0",
|
|
89
|
+
clipPath: "inset(0 round " + SLIDE_ZOOM_CORNER_RADIUS + ")",
|
|
90
|
+
transition: TRANSITION
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const s = (_focal_scale = focal.scale) != null ? _focal_scale : SLIDE_ZOOM_SCALE;
|
|
94
|
+
const fx = clamp01(focal.x);
|
|
95
|
+
const fy = clamp01(focal.y);
|
|
96
|
+
const wx = windowOrigin(fx, s);
|
|
97
|
+
const wy = windowOrigin(fy, s);
|
|
98
|
+
const pct = (v)=>"" + (v * 100).toFixed(3) + "%";
|
|
99
|
+
return {
|
|
100
|
+
transformOrigin: "0 0",
|
|
101
|
+
// Show the window [w, w + 1/s] scaled up to fill the box: scale about the top-left, then shift
|
|
102
|
+
// the window's origin to 0. translate() percentages are relative to the element's own box.
|
|
103
|
+
transform: "translate(" + pct(-s * wx) + ", " + pct(-s * wy) + ") scale(" + s + ")",
|
|
104
|
+
// Clip (in pre-transform space) to that same window so the scaled content fills exactly the box.
|
|
105
|
+
clipPath: "inset(" + pct(wy) + " " + pct(1 - wx - 1 / s) + " " + pct(1 - wy - 1 / s) + " " + pct(wx) + " " + ("round " + SLIDE_ZOOM_CORNER_RADIUS + ")"),
|
|
106
|
+
transition: TRANSITION
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
var slide_zoom_SLIDE_ZOOM_TRANSITION_MS = /* unused export */ undefined;
|
|
111
|
+
var slide_zoom_ZOOM_MAX_SCALE = /* unused export */ undefined;
|
|
112
|
+
var slide_zoom_ZOOM_MIN_SCALE = /* unused export */ undefined;
|
|
113
|
+
var slide_zoom_ZOOM_TARGET_FILL = /* unused export */ undefined;
|
|
114
|
+
export { SLIDE_ZOOM_SCALE, slideZoomFocus, slideZoomPoint, slideZoomStyle, slide_zoom_SLIDE_ZOOM_TRANSITION_MS as SLIDE_ZOOM_TRANSITION_MS, slide_zoom_ZOOM_MAX_SCALE as ZOOM_MAX_SCALE, slide_zoom_ZOOM_MIN_SCALE as ZOOM_MIN_SCALE, slide_zoom_ZOOM_TARGET_FILL as ZOOM_TARGET_FILL, unzoomRect, zoomScaleForBox };
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { ButtonStyle as types_ButtonStyle, ButtonShape as types_ButtonShape } from "../types.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
const LIGHTEN_AMOUNT = 0.6;
|
|
5
|
+
function normalizeHex(hex) {
|
|
6
|
+
let h = hex.replace("#", "");
|
|
7
|
+
if (h.length === 3) {
|
|
8
|
+
h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];
|
|
9
|
+
}
|
|
10
|
+
return h;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Darken a hex color by the given fraction (0–1).
|
|
14
|
+
* Accepts both 3-digit (#rgb) and 6-digit (#rrggbb) hex strings.
|
|
15
|
+
* Multiplies each RGB channel by (1 − amount).
|
|
16
|
+
*/ function darkenHex(hex, amount) {
|
|
17
|
+
if (amount === void 0) amount = 0.15;
|
|
18
|
+
const h = normalizeHex(hex);
|
|
19
|
+
const mix = (offset)=>Math.max(0, Math.round(parseInt(h.substring(offset, offset + 2), 16) * (1 - amount)));
|
|
20
|
+
return "#" + [
|
|
21
|
+
mix(0),
|
|
22
|
+
mix(2),
|
|
23
|
+
mix(4)
|
|
24
|
+
].map((c)=>c.toString(16).padStart(2, "0")).join("");
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Lighten a hex color by mixing it toward white by the given fraction (0–1).
|
|
28
|
+
* Accepts both 3-digit (#rgb) and 6-digit (#rrggbb) hex strings.
|
|
29
|
+
*/ function lightenHex(hex, amount) {
|
|
30
|
+
if (amount === void 0) amount = LIGHTEN_AMOUNT;
|
|
31
|
+
const h = normalizeHex(hex);
|
|
32
|
+
const mix = (offset)=>{
|
|
33
|
+
const channel = parseInt(h.substring(offset, offset + 2), 16);
|
|
34
|
+
return Math.min(255, Math.round(channel + (255 - channel) * amount));
|
|
35
|
+
};
|
|
36
|
+
return "#" + [
|
|
37
|
+
mix(0),
|
|
38
|
+
mix(2),
|
|
39
|
+
mix(4)
|
|
40
|
+
].map((c)=>c.toString(16).padStart(2, "0")).join("");
|
|
41
|
+
}
|
|
42
|
+
function hexToRgba(hex, alpha) {
|
|
43
|
+
const h = normalizeHex(hex);
|
|
44
|
+
const r = parseInt(h.substring(0, 2), 16);
|
|
45
|
+
const g = parseInt(h.substring(2, 4), 16);
|
|
46
|
+
const b = parseInt(h.substring(4, 6), 16);
|
|
47
|
+
return "rgba(" + r + ", " + g + ", " + b + ", " + alpha + ")";
|
|
48
|
+
}
|
|
49
|
+
function createThemeCss(theme) {
|
|
50
|
+
const buttonStyles = getButtonStyles(theme);
|
|
51
|
+
return "\n :root, :host {\n --q-primary-color: " + theme.primaryColor + ";\n --q-lighter-primary-color: " + lightenHex(theme.primaryColor) + ";\n --q-text-color: " + theme.textColor + ";\n --q-button-background-color: " + buttonStyles.backgroundColor + ";\n --q-button-hover-background-color: " + buttonStyles.hoverBackgroundColor + ";\n --q-button-background-layer: " + buttonStyles.backgroundLayer + ";\n --q-button-hover-background-layer: " + buttonStyles.hoverBackgroundLayer + ";\n --q-button-text-color: " + buttonStyles.textColor + ";\n --q-button-hover-text-color: " + buttonStyles.hoverTextColor + ";\n --q-button-border-color: " + buttonStyles.borderColor + ";\n --q-button-hover-border-color: " + buttonStyles.hoverBorderColor + ";\n --q-button-border-radius: " + buttonStyles.borderRadius + ";\n --q-control-border-radius: " + buttonStyles.controlBorderRadius + ";\n }\n ";
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Apply theme CSS custom properties directly on an element via style.setProperty().
|
|
55
|
+
*
|
|
56
|
+
* Used in split-css mode where adoptedStyleSheets and <style> injection are blocked
|
|
57
|
+
* by strict CSP (style-src 'self'). CSS custom properties set on an element are
|
|
58
|
+
* inherited through shadow DOM boundaries, so setting them on the shadow host
|
|
59
|
+
* makes them available inside the shadow root.
|
|
60
|
+
*/ function applyThemeCssVars(element, theme) {
|
|
61
|
+
const buttonStyles = getButtonStyles(theme);
|
|
62
|
+
element.style.setProperty("--q-primary-color", theme.primaryColor);
|
|
63
|
+
element.style.setProperty("--q-lighter-primary-color", lightenHex(theme.primaryColor));
|
|
64
|
+
element.style.setProperty("--q-text-color", theme.textColor);
|
|
65
|
+
element.style.setProperty("--q-button-background-color", buttonStyles.backgroundColor);
|
|
66
|
+
element.style.setProperty("--q-button-hover-background-color", buttonStyles.hoverBackgroundColor);
|
|
67
|
+
element.style.setProperty("--q-button-background-layer", buttonStyles.backgroundLayer);
|
|
68
|
+
element.style.setProperty("--q-button-hover-background-layer", buttonStyles.hoverBackgroundLayer);
|
|
69
|
+
element.style.setProperty("--q-button-text-color", buttonStyles.textColor);
|
|
70
|
+
element.style.setProperty("--q-button-hover-text-color", buttonStyles.hoverTextColor);
|
|
71
|
+
element.style.setProperty("--q-button-border-color", buttonStyles.borderColor);
|
|
72
|
+
element.style.setProperty("--q-button-hover-border-color", buttonStyles.hoverBorderColor);
|
|
73
|
+
element.style.setProperty("--q-button-border-radius", buttonStyles.borderRadius);
|
|
74
|
+
element.style.setProperty("--q-control-border-radius", buttonStyles.controlBorderRadius);
|
|
75
|
+
}
|
|
76
|
+
function getButtonStyles(theme) {
|
|
77
|
+
var _theme_buttonPrimaryColor, _theme_buttonTextColor, _theme_buttonBorderRadiusPx;
|
|
78
|
+
// When "Use theme colors" is enabled, buttons inherit global theme colors.
|
|
79
|
+
// Otherwise, use button-specific colors (with theme colors as fallback).
|
|
80
|
+
const primary = theme.buttonsUseThemeColors ? theme.primaryColor : (_theme_buttonPrimaryColor = theme.buttonPrimaryColor) != null ? _theme_buttonPrimaryColor : theme.primaryColor;
|
|
81
|
+
const text = theme.buttonsUseThemeColors ? theme.textColor : (_theme_buttonTextColor = theme.buttonTextColor) != null ? _theme_buttonTextColor : theme.textColor;
|
|
82
|
+
const radius = theme.buttonShape === types_ButtonShape.Pill ? "999px" : "" + ((_theme_buttonBorderRadiusPx = theme.buttonBorderRadiusPx) != null ? _theme_buttonBorderRadiusPx : 4) + "px";
|
|
83
|
+
// Pill is a shape for a button with a word in it. Applied to a grid of calendar
|
|
84
|
+
// cells it turns day numbers into circles and time slots into lozenges, so those
|
|
85
|
+
// surfaces get a squared-off stand-in and every other configured radius through
|
|
86
|
+
// unchanged.
|
|
87
|
+
const controlRadius = theme.buttonShape === types_ButtonShape.Pill ? "8px" : radius;
|
|
88
|
+
switch(theme.buttonStyle){
|
|
89
|
+
case types_ButtonStyle.Outline:
|
|
90
|
+
return {
|
|
91
|
+
backgroundColor: "transparent",
|
|
92
|
+
hoverBackgroundColor: "" + primary + "10",
|
|
93
|
+
// White layer behind the gradient so Outline/Shade tints read consistently
|
|
94
|
+
// over any page background.
|
|
95
|
+
backgroundLayer: "#ffffff",
|
|
96
|
+
hoverBackgroundLayer: "#ffffff",
|
|
97
|
+
textColor: primary,
|
|
98
|
+
hoverTextColor: primary,
|
|
99
|
+
borderColor: primary,
|
|
100
|
+
hoverBorderColor: primary,
|
|
101
|
+
borderRadius: radius,
|
|
102
|
+
controlBorderRadius: controlRadius
|
|
103
|
+
};
|
|
104
|
+
case types_ButtonStyle.Shade:
|
|
105
|
+
return {
|
|
106
|
+
backgroundColor: "" + primary + "20",
|
|
107
|
+
hoverBackgroundColor: "" + primary + "40",
|
|
108
|
+
backgroundLayer: "#ffffff",
|
|
109
|
+
hoverBackgroundLayer: "#ffffff",
|
|
110
|
+
textColor: primary,
|
|
111
|
+
hoverTextColor: primary,
|
|
112
|
+
borderColor: "transparent",
|
|
113
|
+
hoverBorderColor: "transparent",
|
|
114
|
+
borderRadius: radius,
|
|
115
|
+
controlBorderRadius: controlRadius
|
|
116
|
+
};
|
|
117
|
+
case types_ButtonStyle.Solid:
|
|
118
|
+
default:
|
|
119
|
+
return {
|
|
120
|
+
backgroundColor: primary,
|
|
121
|
+
hoverBackgroundColor: darkenHex(primary),
|
|
122
|
+
// Solid buttons use the button color as the backdrop so no white edge
|
|
123
|
+
// peeks through the rounded-corner gap.
|
|
124
|
+
backgroundLayer: primary,
|
|
125
|
+
hoverBackgroundLayer: darkenHex(primary),
|
|
126
|
+
textColor: text,
|
|
127
|
+
hoverTextColor: text,
|
|
128
|
+
borderColor: primary,
|
|
129
|
+
hoverBorderColor: darkenHex(primary),
|
|
130
|
+
borderRadius: radius,
|
|
131
|
+
controlBorderRadius: controlRadius
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
var theme_styles_lightenHex = /* unused export */ undefined;
|
|
137
|
+
export { applyThemeCssVars, createThemeCss, hexToRgba, theme_styles_lightenHex as lightenHex };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { __webpack_require__ } from "../../../js/runtime.js";
|
|
2
|
+
import { normalizeToBaseUrl } from "../../../src/url-utils.js";
|
|
3
|
+
import "../../utils/native_globals.js";
|
|
4
|
+
|
|
5
|
+
/* provided dependency */ var __nativeWindowAddEventListener = __webpack_require__(68034).zh;
|
|
6
|
+
/* provided dependency */ var __nativeWindowRemoveEventListener = __webpack_require__(68034).kZ;
|
|
7
|
+
|
|
8
|
+
class UrlObserver {
|
|
9
|
+
start() {
|
|
10
|
+
// Set initial URL
|
|
11
|
+
this.notifyUrlChange();
|
|
12
|
+
// Listen to popstate for browser back/forward navigation
|
|
13
|
+
const handleUrlChange = ()=>this.notifyUrlChange();
|
|
14
|
+
__nativeWindowAddEventListener("popstate", handleUrlChange);
|
|
15
|
+
this.cleanupCallbacks.push(()=>__nativeWindowRemoveEventListener("popstate", handleUrlChange));
|
|
16
|
+
// Wrap history APIs to track SPA navigations
|
|
17
|
+
const self = this;
|
|
18
|
+
window.history.pushState = function() {
|
|
19
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
20
|
+
args[_key] = arguments[_key];
|
|
21
|
+
}
|
|
22
|
+
self.originalPushState.apply(this, args);
|
|
23
|
+
handleUrlChange();
|
|
24
|
+
};
|
|
25
|
+
window.history.replaceState = function() {
|
|
26
|
+
for(var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++){
|
|
27
|
+
args[_key] = arguments[_key];
|
|
28
|
+
}
|
|
29
|
+
self.originalReplaceState.apply(this, args);
|
|
30
|
+
handleUrlChange();
|
|
31
|
+
};
|
|
32
|
+
this.cleanupCallbacks.push(()=>{
|
|
33
|
+
window.history.pushState = self.originalPushState;
|
|
34
|
+
window.history.replaceState = self.originalReplaceState;
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
stop() {
|
|
38
|
+
this.cleanupCallbacks.forEach((cb)=>cb());
|
|
39
|
+
this.cleanupCallbacks = [];
|
|
40
|
+
}
|
|
41
|
+
notifyUrlChange() {
|
|
42
|
+
this.cb(normalizeToBaseUrl(window.location.href));
|
|
43
|
+
}
|
|
44
|
+
constructor(cb){
|
|
45
|
+
this.cb = cb;
|
|
46
|
+
this.cleanupCallbacks = [];
|
|
47
|
+
this.originalPushState = window.history.pushState;
|
|
48
|
+
this.originalReplaceState = window.history.replaceState;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export { UrlObserver };
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { __webpack_require__ } from "../../../js/runtime.js";
|
|
2
|
+
import "../../utils/native_globals.js";
|
|
3
|
+
|
|
4
|
+
/* provided dependency */ var requestAnimationFrame = __webpack_require__(68034).gj;
|
|
5
|
+
/* provided dependency */ var cancelAnimationFrame = __webpack_require__(68034).pP;
|
|
6
|
+
const NOISE_FLOOR_ALPHA = 0.02; // slow rolling average of quiet samples
|
|
7
|
+
const OPEN_MARGIN = 0.03; // rise this far above floor => active
|
|
8
|
+
const CLOSE_MARGIN = 0.015; // fall within this of floor => inactive (hysteresis gap)
|
|
9
|
+
const MIN_FLOOR = 0.005;
|
|
10
|
+
// Silence must persist this long before we declare a fall (offset). Natural intra-utterance /
|
|
11
|
+
// intra-answer pauses (between words and sentences) are typically shorter than this, so they no
|
|
12
|
+
// longer fragment one speech run into many onset/offset cycles; a real end-of-turn or the
|
|
13
|
+
// multi-second gap while a tool call executes comfortably exceeds it. This keeps a bot answer's
|
|
14
|
+
// `onBotOnset` anchored on the *start* of its final speaking run rather than drifting to its last
|
|
15
|
+
// sentence, and steadies the mic `t0` against transient dips. Rise (onset) stays immediate.
|
|
16
|
+
const DEFAULT_HANGOVER_MS = 350;
|
|
17
|
+
// Read a full time-domain frame from the node and compute its RMS. The buffer
|
|
18
|
+
// must be sized to the node's fftSize (getByteTimeDomainData fills fftSize
|
|
19
|
+
// samples); a smaller buffer would only read part of the waveform frame. We
|
|
20
|
+
// cache the buffer on the channel and only reallocate when fftSize changes, to
|
|
21
|
+
// avoid a per-frame allocation. The node's own fftSize is never mutated.
|
|
22
|
+
function rms(analyser, ch) {
|
|
23
|
+
const size = analyser.fftSize;
|
|
24
|
+
let { buf } = ch;
|
|
25
|
+
if (!buf || buf.length !== size) {
|
|
26
|
+
buf = new Uint8Array(size);
|
|
27
|
+
ch.buf = buf;
|
|
28
|
+
}
|
|
29
|
+
analyser.getByteTimeDomainData(buf);
|
|
30
|
+
let sum = 0;
|
|
31
|
+
for(let i = 0; i < buf.length; i++){
|
|
32
|
+
const s = (buf[i] - 128) / 128;
|
|
33
|
+
sum += s * s;
|
|
34
|
+
}
|
|
35
|
+
return Math.sqrt(sum / buf.length);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Standalone, framework-agnostic DSP module that samples mic/bot AnalyserNodes
|
|
39
|
+
* on a requestAnimationFrame loop and fires onset/offset callbacks based on a
|
|
40
|
+
* rolling noise-floor estimate with hysteresis. Observation-only: this class
|
|
41
|
+
* must never throw into the call, so the sampling loop is fully try/caught.
|
|
42
|
+
*/ class VoiceOnsetDetector {
|
|
43
|
+
start() {
|
|
44
|
+
if (!this.stopped) return;
|
|
45
|
+
this.stopped = false;
|
|
46
|
+
this.tick();
|
|
47
|
+
}
|
|
48
|
+
stop() {
|
|
49
|
+
this.stopped = true;
|
|
50
|
+
if (this.rafId !== null) {
|
|
51
|
+
this.cancelRaf(this.rafId);
|
|
52
|
+
this.rafId = null;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
step(node, ch, ts, onRise, onFall) {
|
|
56
|
+
const level = rms(node, ch);
|
|
57
|
+
if (!ch.active) {
|
|
58
|
+
// While quiet, keep a rolling noise-floor estimate.
|
|
59
|
+
ch.noiseFloor = Math.max(MIN_FLOOR, ch.noiseFloor * (1 - NOISE_FLOOR_ALPHA) + level * NOISE_FLOOR_ALPHA);
|
|
60
|
+
if (level > ch.noiseFloor + OPEN_MARGIN) {
|
|
61
|
+
ch.active = true;
|
|
62
|
+
ch.pendingSilenceSince = null;
|
|
63
|
+
onRise(ts);
|
|
64
|
+
}
|
|
65
|
+
} else if (level < ch.noiseFloor + CLOSE_MARGIN) {
|
|
66
|
+
// Below the close threshold: don't fall immediately. Only declare the offset once the
|
|
67
|
+
// silence has persisted for hangoverMs, so brief intra-run pauses don't split the run.
|
|
68
|
+
if (ch.pendingSilenceSince === null) {
|
|
69
|
+
ch.pendingSilenceSince = ts;
|
|
70
|
+
} else if (ts - ch.pendingSilenceSince >= this.hangoverMs) {
|
|
71
|
+
ch.active = false;
|
|
72
|
+
// Report the offset at the moment it went quiet, not hangoverMs later, so `t0`/onset
|
|
73
|
+
// timing is unaffected by the debounce.
|
|
74
|
+
const fellAt = ch.pendingSilenceSince;
|
|
75
|
+
ch.pendingSilenceSince = null;
|
|
76
|
+
onFall(fellAt);
|
|
77
|
+
}
|
|
78
|
+
} else {
|
|
79
|
+
// Bounced back above the close threshold within the hangover window: still one run.
|
|
80
|
+
ch.pendingSilenceSince = null;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
constructor(opts){
|
|
84
|
+
var _opts_now, _opts_raf, _opts_cancelRaf, _opts_hangoverMs;
|
|
85
|
+
this.rafId = null;
|
|
86
|
+
this.stopped = true;
|
|
87
|
+
this.mic = {
|
|
88
|
+
active: false,
|
|
89
|
+
noiseFloor: MIN_FLOOR,
|
|
90
|
+
buf: null,
|
|
91
|
+
pendingSilenceSince: null
|
|
92
|
+
};
|
|
93
|
+
this.bot = {
|
|
94
|
+
active: false,
|
|
95
|
+
noiseFloor: MIN_FLOOR,
|
|
96
|
+
buf: null,
|
|
97
|
+
pendingSilenceSince: null
|
|
98
|
+
};
|
|
99
|
+
this.tick = ()=>{
|
|
100
|
+
if (this.stopped) return;
|
|
101
|
+
try {
|
|
102
|
+
const micNode = this.getMic();
|
|
103
|
+
const botNode = this.getBot();
|
|
104
|
+
const ts = this.now();
|
|
105
|
+
if (micNode) {
|
|
106
|
+
this.step(micNode, this.mic, ts, this.cb.onMicActive, this.cb.onMicQuiet);
|
|
107
|
+
}
|
|
108
|
+
if (botNode) {
|
|
109
|
+
this.step(botNode, this.bot, ts, this.cb.onBotOnset, this.cb.onBotSilence);
|
|
110
|
+
}
|
|
111
|
+
} catch (unused) {
|
|
112
|
+
// Observation-only: never let a sampling error affect the call.
|
|
113
|
+
}
|
|
114
|
+
if (this.stopped) return;
|
|
115
|
+
this.rafId = this.raf(this.tick);
|
|
116
|
+
};
|
|
117
|
+
this.getMic = opts.getMicAnalyser;
|
|
118
|
+
this.getBot = opts.getBotAnalyser;
|
|
119
|
+
this.cb = opts.callbacks;
|
|
120
|
+
this.now = (_opts_now = opts.now) != null ? _opts_now : ()=>performance.now();
|
|
121
|
+
this.raf = (_opts_raf = opts.raf) != null ? _opts_raf : (cb)=>requestAnimationFrame(cb);
|
|
122
|
+
this.cancelRaf = (_opts_cancelRaf = opts.cancelRaf) != null ? _opts_cancelRaf : (id)=>cancelAnimationFrame(id);
|
|
123
|
+
this.hangoverMs = (_opts_hangoverMs = opts.hangoverMs) != null ? _opts_hangoverMs : DEFAULT_HANGOVER_MS;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export { VoiceOnsetDetector };
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { isDomainMatch } from "../src/iframes.js";
|
|
2
|
+
import { ChangeType } from "../src/mirror/constants.js";
|
|
3
|
+
import { default as Shipper } from "../src/mirror/Shipper.js";
|
|
4
|
+
import { Location } from "../src/mirror/shipper/observers.js";
|
|
5
|
+
import { default as WidgetObject } from "./widget_object.js";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
class PageMirror extends WidgetObject {
|
|
13
|
+
cleanup() {
|
|
14
|
+
this.shipper.dispose();
|
|
15
|
+
this.widget.stopShipper();
|
|
16
|
+
super.cleanup();
|
|
17
|
+
}
|
|
18
|
+
recreateShipper() {
|
|
19
|
+
this.shipper.dispose();
|
|
20
|
+
this.shipper = new Shipper(window, document, this.sendMessage);
|
|
21
|
+
}
|
|
22
|
+
static getLastLocation(message) {
|
|
23
|
+
let lastLocation;
|
|
24
|
+
// message[2] is an array of changes
|
|
25
|
+
message[2].forEach((change)=>{
|
|
26
|
+
if (change[0] === ChangeType.Location) {
|
|
27
|
+
// change[1][1] is document.location.href
|
|
28
|
+
lastLocation = change[1][1];
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
return lastLocation;
|
|
32
|
+
}
|
|
33
|
+
refreshDisableLiveView(lastLocation) {
|
|
34
|
+
this.disableLiveView = !!this.denylistedVisitorStreamDomains.length && isDomainMatch(this.denylistedVisitorStreamDomains, lastLocation, true);
|
|
35
|
+
}
|
|
36
|
+
constructor(injectionProps, denylistedVisitorStreamDomains){
|
|
37
|
+
super(injectionProps), this.disableLiveView = false, this.onReceived = (message)=>{
|
|
38
|
+
if (message.start && (/* inlined export .ProtocolVersion */1) <= message.start) {
|
|
39
|
+
if (this.shipper.started) {
|
|
40
|
+
this.shipper.sendKeyframe();
|
|
41
|
+
this.widget.requestKeyframe();
|
|
42
|
+
} else {
|
|
43
|
+
this.shipper.start();
|
|
44
|
+
this.widget.startShipper();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}, this.onCableDisconnected = ()=>{
|
|
48
|
+
this.recreateShipper();
|
|
49
|
+
this.widget.stopShipper();
|
|
50
|
+
}, this.sendMessage = (message)=>{
|
|
51
|
+
var _this_featureFlags;
|
|
52
|
+
if ((_this_featureFlags = this.featureFlags) == null ? void 0 : _this_featureFlags.liveViewBlockListSpa) {
|
|
53
|
+
this.refreshLocationState();
|
|
54
|
+
this.refreshDisableLiveView(this.currentLocation);
|
|
55
|
+
} else {
|
|
56
|
+
const lastLocation = PageMirror.getLastLocation(message);
|
|
57
|
+
if (lastLocation) this.refreshDisableLiveView(lastLocation);
|
|
58
|
+
}
|
|
59
|
+
if (this.disableLiveView) {
|
|
60
|
+
// Send empty array of new and deleted DOM nodes
|
|
61
|
+
message[3] = [];
|
|
62
|
+
message[4] = [];
|
|
63
|
+
}
|
|
64
|
+
this.channel.sendLiveView({
|
|
65
|
+
m: message
|
|
66
|
+
});
|
|
67
|
+
}, this.onMessageFromWidget = (iframe, message)=>{
|
|
68
|
+
this.shipper.onNestedShipperMessage(iframe, message);
|
|
69
|
+
}, this.refreshLocationState = ()=>{
|
|
70
|
+
const currentWindowLocation = this.shipper.window.location.href;
|
|
71
|
+
if (currentWindowLocation !== this.currentLocation) {
|
|
72
|
+
this.currentLocation = currentWindowLocation;
|
|
73
|
+
// Trigger the location observer's callback
|
|
74
|
+
const locationObserver = this.shipper.helpers.find((observer)=>observer instanceof Location);
|
|
75
|
+
if (locationObserver) {
|
|
76
|
+
locationObserver.onLocationChange();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
this.shipper = new Shipper(window, document, this.sendMessage);
|
|
81
|
+
this.channel.on("receivedLiveView", this.onReceived);
|
|
82
|
+
this.channel.on("disconnected", this.onCableDisconnected);
|
|
83
|
+
this.denylistedVisitorStreamDomains = denylistedVisitorStreamDomains;
|
|
84
|
+
this.currentLocation = this.shipper.window.location.href;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
export default PageMirror;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { default as WidgetObject } from "./widget_object.js";
|
|
2
|
+
import { _extends } from "../js/4101.js";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var page_view_activity_emitter_PersonalizationActivity = /*#__PURE__*/ (/* unused pure expression or super */ null && (function(PersonalizationActivity) {
|
|
7
|
+
PersonalizationActivity["Click"] = "click";
|
|
8
|
+
PersonalizationActivity["ExperimentArmApplied"] = "experiment_arm_applied";
|
|
9
|
+
PersonalizationActivity["ExperimentArmFallback"] = "experiment_arm_fallback";
|
|
10
|
+
PersonalizationActivity["InView"] = "in_view";
|
|
11
|
+
return PersonalizationActivity;
|
|
12
|
+
}(page_view_activity_emitter_PersonalizationActivity || {})));
|
|
13
|
+
var page_view_activity_emitter_OfferActivity = /*#__PURE__*/ (/* unused pure expression or super */ null && (function(OfferActivity) {
|
|
14
|
+
OfferActivity["OfferShown"] = "offer_shown";
|
|
15
|
+
OfferActivity["OfferDismiss"] = "offer_dismiss";
|
|
16
|
+
OfferActivity["OfferClick"] = "offer_click";
|
|
17
|
+
OfferActivity["OfferLanded"] = "offer_landed";
|
|
18
|
+
OfferActivity["OfferPrivacyDisclosureShown"] = "offer_privacy_disclosure_shown";
|
|
19
|
+
OfferActivity["OfferPrivacyDisclosureConsented"] = "offer_privacy_disclosure_consented";
|
|
20
|
+
return OfferActivity;
|
|
21
|
+
}({})));
|
|
22
|
+
var page_view_activity_emitter_FormActivity = /*#__PURE__*/ (/* unused pure expression or super */ null && (function(FormActivity) {
|
|
23
|
+
FormActivity["FormFill"] = "form_fill";
|
|
24
|
+
return FormActivity;
|
|
25
|
+
}(page_view_activity_emitter_FormActivity || {})));
|
|
26
|
+
class PageViewActivityEmitter extends WidgetObject {
|
|
27
|
+
createEmitter(type) {
|
|
28
|
+
return (payload)=>{
|
|
29
|
+
this.emitPageViewActivity({
|
|
30
|
+
type,
|
|
31
|
+
payload
|
|
32
|
+
});
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
emitPageViewActivity(param) {
|
|
36
|
+
let { type, payload } = param;
|
|
37
|
+
if (!this.hasPageViewActivityTracking) {
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
// Wait for the tracker to be initialized before sending the event to ensure that the page view is created
|
|
41
|
+
this.tracker.afterInit(()=>{
|
|
42
|
+
this.channel.perform("record_page_view_activity", _extends({
|
|
43
|
+
activity_type: type
|
|
44
|
+
}, this.underscorePayload(payload)));
|
|
45
|
+
this.widget.serverLog({
|
|
46
|
+
message: "Page view activity emitted with type: " + type,
|
|
47
|
+
fireAndForget: true
|
|
48
|
+
});
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
constructor(injectionProps){
|
|
52
|
+
var _this_config_hasPageViewActivityTracking;
|
|
53
|
+
super(injectionProps), // Personalization activities
|
|
54
|
+
this.emitPersonalizationInView = this.createEmitter("in_view"), this.emitPersonalizationApplied = this.createEmitter("experiment_arm_applied"), this.emitPersonalizationFallback = this.createEmitter("experiment_arm_fallback"), this.emitPersonalizationClick = this.createEmitter("click"), // Offer activities
|
|
55
|
+
this.emitOfferDismiss = this.createEmitter("offer_dismiss"), this.emitOfferClick = this.createEmitter("offer_click"), this.emitOfferLanded = this.createEmitter("offer_landed"), this.emitOfferShown = this.createEmitter("offer_shown"), // Privacy disclosure activities
|
|
56
|
+
this.emitPrivacyDisclosureShown = this.createEmitter("offer_privacy_disclosure_shown"), this.emitPrivacyDisclosureConsented = this.createEmitter("offer_privacy_disclosure_consented"), // Form activities
|
|
57
|
+
this.emitFormFill = this.createEmitter("form_fill"), this.underscorePayload = (payload)=>Object.fromEntries(Object.entries(payload).map((param)=>{
|
|
58
|
+
let [k, v] = param;
|
|
59
|
+
return [
|
|
60
|
+
k.replace(/([a-z\d])([A-Z]+)/g, "$1_$2").replace(/[-\s]+/g, "_").toLowerCase(),
|
|
61
|
+
v
|
|
62
|
+
];
|
|
63
|
+
}));
|
|
64
|
+
this.hasPageViewActivityTracking = (_this_config_hasPageViewActivityTracking = this.config.hasPageViewActivityTracking) != null ? _this_config_hasPageViewActivityTracking : false;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/* export default */ const page_view_activity_emitter = (PageViewActivityEmitter);
|
|
68
|
+
|
|
69
|
+
var widget_page_view_activity_emitter_OfferActivity = /* unused export */ undefined;
|
|
70
|
+
export { widget_page_view_activity_emitter_OfferActivity as OfferActivity };
|
|
71
|
+
export default page_view_activity_emitter;
|