{ "version": 3, "sources": ["../../../node_modules/commandbar/build/commandbar-js/src/index.js", "../../../node_modules/@honeybadger-io/core/node_modules/stacktrace-parser/dist/stack-trace-parser.esm.js", "../../../node_modules/@honeybadger-io/core/build/src/util.js", "../../../node_modules/@honeybadger-io/core/build/src/plugins/events.js", "../../../node_modules/@honeybadger-io/core/build/src/store.js", "../../../node_modules/@honeybadger-io/core/node_modules/json-nd/dist/module/index.js", "../../../node_modules/@honeybadger-io/core/build/src/defaults.js", "../../../node_modules/@honeybadger-io/core/build/src/throttled_events_logger.js", "../../../node_modules/@honeybadger-io/core/build/src/client.js", "../../../node_modules/@honeybadger-io/core/build/src/types.js", "../../../node_modules/@honeybadger-io/core/build/src/index.js", "../../../node_modules/@honeybadger-io/js/build/src/browser/util.js", "../../../node_modules/@honeybadger-io/js/build/src/browser/integrations/onerror.js", "../../../node_modules/@honeybadger-io/js/build/src/browser/integrations/onunhandledrejection.js", "../../../node_modules/@honeybadger-io/js/build/src/browser/integrations/breadcrumbs.js", "../../../node_modules/@honeybadger-io/js/build/src/browser/integrations/timers.js", "../../../node_modules/@honeybadger-io/js/build/src/browser/integrations/event_listeners.js", "../../../node_modules/@honeybadger-io/js/build/src/browser/transport.js", "../../../node_modules/@honeybadger-io/js/build/src/browser/feedback-form.js", "../../../node_modules/@honeybadger-io/js/build/src/browser.js", "../../../node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js", "../../../node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js", "../../../node_modules/@rails/actioncable/src/adapters.js", "../../../node_modules/@rails/actioncable/src/logger.js", "../../../node_modules/@rails/actioncable/src/connection_monitor.js", "../../../node_modules/@rails/actioncable/src/internal.js", "../../../node_modules/@rails/actioncable/src/connection.js", "../../../node_modules/@rails/actioncable/src/subscription.js", "../../../node_modules/@rails/actioncable/src/subscription_guarantor.js", "../../../node_modules/@rails/actioncable/src/subscriptions.js", "../../../node_modules/@rails/actioncable/src/consumer.js", "../../../node_modules/@rails/actioncable/src/index.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/snakeize.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/fetch_requests.js", "../../../node_modules/@hotwired/turbo-rails/app/javascript/turbo/index.js", "../../../node_modules/@hotwired/stimulus/dist/stimulus.js", "../../../vendor/bundle/ruby/3.3.0/bundler/gems/teamshares-rails-95319504984e/app/frontend/components/shared_ui/demo/controller.js", "../../../vendor/bundle/ruby/3.3.0/bundler/gems/teamshares-rails-95319504984e/app/frontend/components/shared_ui/file_upload/controller.js", "/tmp/build_7ca82346/vendor/bundle/ruby/3.3.0/bundler/gems/teamshares-rails-95319504984e/app/frontend/components/**/controller.js", "../../frontend/components/lead/lead_type/modal_form/controller.js", "/tmp/build_7ca82346/app/frontend/components/**/controller.js", "../../frontend/javascript/controllers/add_input_controller.js", "../../frontend/javascript/controllers/approve_button_controller.js", "../../frontend/javascript/controllers/bookmark_controller.js", "../../frontend/javascript/controllers/bulk_document_actions_controller.js", "../../frontend/javascript/controllers/change_button_text_controller.js", "../../../node_modules/@kurkle/color/dist/color.esm.js", "../../../node_modules/chart.js/src/helpers/helpers.core.ts", "../../../node_modules/chart.js/src/helpers/helpers.math.ts", "../../../node_modules/chart.js/src/helpers/helpers.collection.ts", "../../../node_modules/chart.js/src/helpers/helpers.extras.ts", "../../../node_modules/chart.js/src/helpers/helpers.easing.ts", "../../../node_modules/chart.js/src/helpers/helpers.color.ts", "../../../node_modules/chart.js/src/core/core.animations.defaults.js", "../../../node_modules/chart.js/src/core/core.layouts.defaults.js", "../../../node_modules/chart.js/src/helpers/helpers.intl.ts", "../../../node_modules/chart.js/src/core/core.ticks.js", "../../../node_modules/chart.js/src/core/core.scale.defaults.js", "../../../node_modules/chart.js/src/core/core.defaults.js", "../../../node_modules/chart.js/src/helpers/helpers.canvas.ts", "../../../node_modules/chart.js/src/helpers/helpers.options.ts", "../../../node_modules/chart.js/src/helpers/helpers.config.ts", "../../../node_modules/chart.js/src/helpers/helpers.curve.ts", "../../../node_modules/chart.js/src/helpers/helpers.dom.ts", "../../../node_modules/chart.js/src/helpers/helpers.interpolation.ts", "../../../node_modules/chart.js/src/helpers/helpers.rtl.ts", "../../../node_modules/chart.js/src/helpers/helpers.segment.js", "../../../node_modules/chart.js/src/core/core.animator.js", "../../../node_modules/chart.js/src/core/core.animation.js", "../../../node_modules/chart.js/src/core/core.animations.js", "../../../node_modules/chart.js/src/core/core.datasetController.js", "../../../node_modules/chart.js/src/controllers/controller.bar.js", "../../../node_modules/chart.js/src/controllers/controller.bubble.js", "../../../node_modules/chart.js/src/controllers/controller.doughnut.js", "../../../node_modules/chart.js/src/controllers/controller.line.js", "../../../node_modules/chart.js/src/controllers/controller.polarArea.js", "../../../node_modules/chart.js/src/controllers/controller.pie.js", "../../../node_modules/chart.js/src/controllers/controller.radar.js", "../../../node_modules/chart.js/src/controllers/controller.scatter.js", "../../../node_modules/chart.js/src/core/core.adapters.ts", "../../../node_modules/chart.js/src/core/core.interaction.js", "../../../node_modules/chart.js/src/core/core.layouts.js", "../../../node_modules/chart.js/src/platform/platform.base.js", "../../../node_modules/chart.js/src/platform/platform.basic.js", "../../../node_modules/chart.js/src/platform/platform.dom.js", "../../../node_modules/chart.js/src/platform/index.js", "../../../node_modules/chart.js/src/core/core.element.ts", "../../../node_modules/chart.js/src/core/core.scale.autoskip.js", "../../../node_modules/chart.js/src/core/core.scale.js", "../../../node_modules/chart.js/src/core/core.typedRegistry.js", "../../../node_modules/chart.js/src/core/core.registry.js", "../../../node_modules/chart.js/src/core/core.plugins.js", "../../../node_modules/chart.js/src/core/core.config.js", "../../../node_modules/chart.js/src/core/core.controller.js", "../../../node_modules/chart.js/src/elements/element.arc.ts", "../../../node_modules/chart.js/src/elements/element.line.js", "../../../node_modules/chart.js/src/elements/element.point.ts", "../../../node_modules/chart.js/src/elements/element.bar.js", "../../../node_modules/chart.js/src/plugins/plugin.colors.ts", "../../../node_modules/chart.js/src/plugins/plugin.decimation.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.segment.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.helper.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.options.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.target.stack.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/simpleArc.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.target.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/filler.drawing.js", "../../../node_modules/chart.js/src/plugins/plugin.filler/index.js", "../../../node_modules/chart.js/src/plugins/plugin.legend.js", "../../../node_modules/chart.js/src/plugins/plugin.title.js", "../../../node_modules/chart.js/src/plugins/plugin.subtitle.js", "../../../node_modules/chart.js/src/plugins/plugin.tooltip.js", "../../../node_modules/chart.js/src/scales/scale.category.js", "../../../node_modules/chart.js/src/scales/scale.linearbase.js", "../../../node_modules/chart.js/src/scales/scale.linear.js", "../../../node_modules/chart.js/src/scales/scale.logarithmic.js", "../../../node_modules/chart.js/src/scales/scale.radialLinear.js", "../../../node_modules/chart.js/src/scales/scale.time.js", "../../../node_modules/chart.js/src/scales/scale.timeseries.js", "../../../node_modules/chart.js/src/index.ts", "../../../node_modules/chart.js/auto/auto.js", "../../frontend/javascript/controllers/charts/doughnut_controller.js", "../../frontend/javascript/controllers/charts/lead_summary_bar_line_controller.js", "../../frontend/javascript/controllers/check_box_form_controller.js", "../../frontend/javascript/controllers/cim_answer_controller.js", "../../frontend/javascript/controllers/cim_table_review_controller.js", "../../frontend/javascript/controllers/cim_upload_controller.js", "../../frontend/javascript/controllers/comments_controller.js", "../../frontend/javascript/controllers/company_details_controller.js", "../../frontend/javascript/controllers/copy_value_controller.js", "../../frontend/javascript/controllers/datepicker_controller.js", "../../frontend/javascript/controllers/dropdown_controller.js", "../../frontend/javascript/controllers/edit_drawer_controller.js", "../../frontend/javascript/controllers/email_reads_controller.js", "../../frontend/javascript/controllers/enable_controller.js", "../../../node_modules/dropzone/dist/dropzone.js", "../../frontend/javascript/controllers/file_dropzone_controller.js", "../../frontend/javascript/controllers/filtered_tasks_controller.js", "../../frontend/javascript/controllers/form_control_controller.js", "../../frontend/javascript/controllers/format_currency_controller.js", "../../frontend/javascript/controllers/format_decimal_controller.js", "../../frontend/javascript/controllers/format_ein_controller.js", "../../frontend/javascript/controllers/google_picker_controller.js", "../../frontend/javascript/controllers/hidden_field_controller.js", "../../frontend/javascript/controllers/income_statement_review_col_controller.js", "../../frontend/javascript/controllers/input_clipboard_controller.js", "../../../node_modules/inputmask/dist/inputmask.js", "../../frontend/javascript/controllers/input_mask_controller.js", "../../frontend/javascript/controllers/lead_search_controller.js", "../../frontend/javascript/controllers/lead_type_controller.js", "../../frontend/javascript/controllers/lead_verification_controller.js", "../../frontend/javascript/controllers/liquor_license_controller.js", "../../frontend/javascript/controllers/open_url_controller.js", "../../frontend/javascript/controllers/places_autocomplete_controller.js", "../../frontend/javascript/controllers/prediction_control_controller.js", "../../frontend/javascript/controllers/search_form_controller.js", "../../frontend/javascript/controllers/select_navigation_controller.js", "../../frontend/javascript/controllers/show_modal_controller.js", "../../frontend/javascript/controllers/state_polling_controller.js", "../../frontend/javascript/controllers/supporting_docs_controller.js", "../../frontend/javascript/controllers/switch_controller.js", "../../frontend/javascript/controllers/tab_form_controller.js", "../../frontend/javascript/controllers/task_entry_controller.js", "../../frontend/javascript/controllers/tasks_controller.js", "../../frontend/javascript/controllers/terms_controller.js", "../../frontend/javascript/controllers/toggle_display_controller.js", "../../frontend/javascript/controllers/toggle_display_simple_controller.js", "../../frontend/javascript/controllers/toggle_finalization_deadline_controller.js", "../../frontend/javascript/controllers/toggle_multiple_dropdowns_controller.js", "../../frontend/javascript/controllers/toggle_sub_items_controller.js", "../../frontend/javascript/controllers/tooltip_controller.js", "../../frontend/javascript/controllers/trix_autolink_controller.js", "../../../node_modules/tributejs/src/utils.js", "../../../node_modules/tributejs/src/TributeEvents.js", "../../../node_modules/tributejs/src/TributeMenuEvents.js", "../../../node_modules/tributejs/src/TributeRange.js", "../../../node_modules/tributejs/src/TributeSearch.js", "../../../node_modules/tributejs/src/Tribute.js", "../../../node_modules/trix/src/trix/config/attachments.js", "../../../node_modules/trix/src/trix/config/block_attributes.js", "../../../node_modules/trix/src/trix/config/browser.js", "../../../node_modules/trix/src/trix/config/dompurify.js", "../../../node_modules/trix/src/trix/config/lang.js", "../../../node_modules/trix/src/trix/config/file_size_formatting.js", "../../../node_modules/trix/src/trix/constants.js", "../../../node_modules/trix/src/trix/core/helpers/extend.js", "../../../node_modules/trix/src/trix/core/helpers/dom.js", "../../../node_modules/trix/src/trix/config/input.js", "../../../node_modules/trix/src/trix/config/key_names.js", "../../../node_modules/trix/src/trix/config/parser.js", "../../../node_modules/trix/src/trix/config/text_attributes.js", "../../../node_modules/trix/src/trix/config/toolbar.js", "../../../node_modules/trix/src/trix/config/undo.js", "../../../node_modules/trix/src/trix/config/css.js", "../../../node_modules/trix/src/trix/core/basic_object.js", "../../../node_modules/trix/src/trix/core/utilities/utf16_string.js", "../../../node_modules/trix/src/trix/core/object.js", "../../../node_modules/trix/src/trix/core/helpers/arrays.js", "../../../node_modules/trix/src/trix/core/helpers/bidi.js", "../../../node_modules/trix/src/trix/core/helpers/config.js", "../../../node_modules/trix/src/trix/core/helpers/custom_elements.js", "../../../node_modules/trix/src/trix/core/helpers/events.js", "../../../node_modules/trix/src/trix/core/helpers/functions.js", "../../../node_modules/trix/src/trix/core/helpers/objects.js", "../../../node_modules/trix/src/trix/core/helpers/ranges.js", "../../../node_modules/trix/src/trix/observers/selection_change_observer.js", "../../../node_modules/trix/src/trix/core/helpers/strings.js", "../../../node_modules/trix/src/trix/core/collections/hash.js", "../../../node_modules/trix/src/trix/core/collections/object_group.js", "../../../node_modules/trix/src/trix/core/collections/object_map.js", "../../../node_modules/trix/src/trix/core/collections/element_store.js", "../../../node_modules/trix/src/trix/core/utilities/operation.js", "../../../node_modules/trix/src/trix/views/object_view.js", "../../../node_modules/trix/src/trix/models/html_sanitizer.js", "../../../node_modules/trix/src/trix/views/attachment_view.js", "../../../node_modules/trix/src/trix/views/previewable_attachment_view.js", "../../../node_modules/trix/src/trix/views/piece_view.js", "../../../node_modules/trix/src/trix/views/text_view.js", "../../../node_modules/trix/src/trix/views/block_view.js", "../../../node_modules/trix/src/trix/views/document_view.js", "../../../node_modules/trix/src/trix/models/piece.js", "../../../node_modules/trix/src/trix/operations/image_preload_operation.js", "../../../node_modules/trix/src/trix/models/attachment.js", "../../../node_modules/trix/src/trix/models/attachment_piece.js", "../../../node_modules/trix/src/trix/models/string_piece.js", "../../../node_modules/trix/src/trix/models/splittable_list.js", "../../../node_modules/trix/src/trix/models/text.js", "../../../node_modules/trix/src/trix/models/block.js", "../../../node_modules/trix/src/trix/models/document.js", "../../../node_modules/trix/src/trix/models/html_parser.js", "../../../node_modules/trix/src/trix/core/serialization.js", "../../../node_modules/trix/src/trix/models/managed_attachment.js", "../../../node_modules/trix/src/trix/models/attachment_manager.js", "../../../node_modules/trix/src/trix/models/line_break_insertion.js", "../../../node_modules/trix/src/trix/models/composition.js", "../../../node_modules/trix/src/trix/models/undo_manager.js", "../../../node_modules/trix/src/trix/filters/filter.js", "../../../node_modules/trix/src/trix/filters/attachment_gallery_filter.js", "../../../node_modules/trix/src/trix/models/editor.js", "../../../node_modules/trix/src/trix/models/location_mapper.js", "../../../node_modules/trix/src/trix/models/point_mapper.js", "../../../node_modules/trix/src/trix/models/selection_manager.js", "../../../node_modules/trix/src/trix/controllers/attachment_editor_controller.js", "../../../node_modules/trix/src/trix/controllers/composition_controller.js", "../../../node_modules/trix/src/trix/controllers/controller.js", "../../../node_modules/trix/src/trix/observers/mutation_observer.js", "../../../node_modules/trix/src/trix/operations/file_verification_operation.js", "../../../node_modules/trix/src/trix/models/flaky_android_keyboard_detector.js", "../../../node_modules/trix/src/trix/controllers/input_controller.js", "../../../node_modules/trix/src/trix/controllers/level_0_input_controller.js", "../../../node_modules/trix/src/trix/controllers/level_2_input_controller.js", "../../../node_modules/trix/src/trix/controllers/toolbar_controller.js", "../../../node_modules/trix/src/trix/controllers/editor_controller.js", "../../../node_modules/trix/src/trix/elements/trix_toolbar_element.js", "../../../node_modules/trix/src/trix/elements/trix_editor_element.js", "../../../node_modules/trix/src/trix/trix.js", "../../frontend/javascript/controllers/user_mentions_controller.js", "/tmp/build_7ca82346/app/frontend/javascript/controllers/**/*_controller.js", "/tmp/build_7ca82346/health_insurance/app/frontend/components/**/controller.js", "/tmp/build_7ca82346/health_insurance/app/frontend/javascript/controllers/**/*_controller.js", "../../../node_modules/events/events.js", "../../lib/twilio/backoff.ts", "../../../node_modules/loglevel/lib/loglevel.js", "../../../lib/twilio/errors/twilioError.ts", "../../../lib/twilio/errors/generated.ts", "../../../lib/twilio/errors/index.ts", "../../lib/twilio/constants.ts", "../../lib/twilio/log.ts", "../../lib/twilio/outputdevicecollection.ts", "../../../lib/twilio/shims/mediadeviceinfo.ts", "../../lib/twilio/util.ts", "../../lib/twilio/audiohelper.ts", "../../lib/twilio/audioprocessoreventobserver.ts", "../../lib/twilio/dialtonePlayer.ts", "../../lib/twilio/request.ts", "../../lib/twilio/eventpublisher.ts", "../../../lib/twilio/rtc/mockrtcstatsreport.ts", "../../../lib/twilio/rtc/stats.ts", "../../../lib/twilio/preflight/preflight.ts", "../../lib/twilio/wstransport.ts", "../../lib/twilio/pstream.ts", "../../lib/twilio/regions.ts", "../../../lib/twilio/rtc/sdp.ts", "../../../node_modules/sdp/sdp.js", "../../../node_modules/rtcpeerconnection-shim/rtcpeerconnection.js", "../../../lib/twilio/rtc/rtcpc.ts", "../../../lib/twilio/rtc/peerconnection.ts", "../../../lib/twilio/rtc/index.ts", "../../../lib/twilio/rtc/getusermedia.ts", "../../lib/twilio/deferred.ts", "../../lib/twilio/asyncQueue.ts", "../../../lib/twilio/audioplayer/deferred.ts", "../../../lib/twilio/audioplayer/eventtarget.ts", "../../../lib/twilio/audioplayer/audioplayer.ts", "../../lib/twilio/sound.ts", "../../../node_modules/crypt/crypt.js", "../../../node_modules/charenc/charenc.js", "../../../node_modules/is-buffer/index.js", "../../../node_modules/md5/md5.js", "../../lib/twilio/uuid.ts", "../../lib/twilio/device.ts", "../../../lib/twilio/rtc/icecandidate.ts", "../../../lib/twilio/rtc/mos.ts", "../../lib/twilio/statsMonitor.ts", "../../lib/twilio/call.ts", "../lib/twilio.ts", "../../../node_modules/@datadog/browser-core/src/tools/display.ts", "../../../node_modules/@datadog/browser-core/src/tools/catchUserErrors.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/numberUtils.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/timeUtils.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/byteUtils.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/objectUtils.ts", "../../../node_modules/@datadog/browser-core/src/tools/getGlobalObject.ts", "../../../node_modules/@datadog/browser-core/src/tools/getZoneJsOriginalValue.ts", "../../../node_modules/@datadog/browser-core/src/tools/monitor.ts", "../../../node_modules/@datadog/browser-core/src/tools/timer.ts", "../../../node_modules/@datadog/browser-core/src/tools/observable.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/functionUtils.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/stringUtils.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/browserDetection.ts", "../../../node_modules/@datadog/browser-core/src/browser/cookie.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/storeStrategies/sessionStoreStrategy.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/polyfills.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/sessionConstants.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/sessionStateValidation.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/sessionState.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/oldCookiesMigration.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/storeStrategies/sessionInCookie.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/storeStrategies/sessionInLocalStorage.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/sessionStoreOperations.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/sessionStore.ts", "../../../node_modules/@datadog/browser-core/src/domain/trackingConsent.ts", "../../../node_modules/@datadog/browser-core/src/tools/serialisation/jsonStringify.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/urlPolyfill.ts", "../../../node_modules/@datadog/browser-core/src/domain/configuration/intakeSites.ts", "../../../node_modules/@datadog/browser-core/src/domain/configuration/endpointBuilder.ts", "../../../node_modules/@datadog/browser-core/src/domain/configuration/tags.ts", "../../../node_modules/@datadog/browser-core/src/domain/configuration/transportConfiguration.ts", "../../../node_modules/@datadog/browser-core/src/domain/configuration/configuration.ts", "../../../node_modules/@datadog/browser-core/src/domain/configuration/index.ts", "../../../node_modules/@datadog/browser-core/src/tools/experimentalFeatures.ts", "../../../node_modules/@datadog/browser-core/src/tools/stackTrace/computeStackTrace.ts", "../../../node_modules/@datadog/browser-core/src/tools/stackTrace/handlingStack.ts", "../../../node_modules/@datadog/browser-core/src/tools/instrumentMethod.ts", "../../../node_modules/@datadog/browser-core/src/tools/serialisation/sanitize.ts", "../../../node_modules/@datadog/browser-core/src/domain/error/error.ts", "../../../node_modules/@datadog/browser-core/src/domain/error/error.types.ts", "../../../node_modules/@datadog/browser-core/src/domain/error/trackRuntimeError.ts", "../../../node_modules/@datadog/browser-core/src/boot/init.ts", "../../../node_modules/@datadog/browser-core/src/boot/displayAlreadyInitializedError.ts", "../../../node_modules/@datadog/browser-core/src/browser/addEventListener.ts", "../../../node_modules/@datadog/browser-core/src/domain/report/reportObservable.ts", "../../../node_modules/@datadog/browser-core/src/tools/sendToExtension.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/typeUtils.ts", "../../../node_modules/@datadog/browser-core/src/tools/mergeInto.ts", "../../../node_modules/@datadog/browser-core/src/domain/connectivity/connectivity.ts", "../../../node_modules/@datadog/browser-core/src/domain/connectivity/index.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/arrayUtils.ts", "../../../node_modules/@datadog/browser-core/src/tools/boundedBuffer.ts", "../../../node_modules/@datadog/browser-core/src/domain/telemetry/rawTelemetryEvent.types.ts", "../../../node_modules/@datadog/browser-core/src/domain/telemetry/telemetry.ts", "../../../node_modules/@datadog/browser-core/src/domain/telemetry/index.ts", "../../../node_modules/@datadog/browser-core/src/tools/valueHistory.ts", "../../../node_modules/@datadog/browser-core/src/domain/session/sessionManager.ts", "../../../node_modules/@datadog/browser-core/src/tools/utils/responseUtils.ts", "../../../node_modules/@datadog/browser-core/src/transport/sendWithRetryStrategy.ts", "../../../node_modules/@datadog/browser-core/src/transport/httpRequest.ts", "../../../node_modules/@datadog/browser-core/src/transport/eventBridge.ts", "../../../node_modules/@datadog/browser-core/src/browser/pageMayExitObservable.ts", "../../../node_modules/@datadog/browser-core/src/transport/batch.ts", "../../../node_modules/@datadog/browser-core/src/transport/flushController.ts", "../../../node_modules/@datadog/browser-core/src/transport/startBatchWithReplica.ts", "../../../node_modules/@datadog/browser-core/src/transport/index.ts", "../../../node_modules/@datadog/browser-core/src/tools/encoder.ts", "../../../node_modules/@datadog/browser-core/src/tools/abstractLifeCycle.ts", "../../../node_modules/@datadog/browser-core/src/domain/eventRateLimiter/createEventRateLimiter.ts", "../../../node_modules/@datadog/browser-core/src/browser/runOnReadyState.ts", "../../../node_modules/@datadog/browser-core/src/browser/xhrObservable.ts", "../../../node_modules/@datadog/browser-core/src/browser/fetchObservable.ts", "../../../node_modules/@datadog/browser-core/src/tools/requestIdleCallback.ts", "../../../node_modules/@datadog/browser-core/src/tools/taskQueue.ts", "../../../node_modules/@datadog/browser-core/src/domain/console/consoleObservable.ts", "../../../node_modules/@datadog/browser-core/src/domain/context/contextUtils.ts", "../../../node_modules/@datadog/browser-core/src/domain/context/contextManager.ts", "../../../node_modules/@datadog/browser-core/src/domain/context/storeContextManager.ts", "../../../node_modules/@datadog/browser-core/src/domain/context/customerDataTracker.ts", "../../../node_modules/@datadog/browser-core/src/tools/readBytesFromStream.ts", "../../../node_modules/@datadog/browser-core/src/domain/synthetics/syntheticsWorkerValues.ts", "../../../node_modules/@datadog/browser-core/esm/domain/resourceUtils.js", "../../../node_modules/@datadog/browser-core/src/tools/matchOption.ts", "../../../node_modules/@datadog/browser-core/esm/domain/deflate/deflate.types.js", "../../../node_modules/@datadog/browser-core/src/domain/deflate/index.ts", "../../../node_modules/@datadog/browser-core/src/index.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/contexts/commonContext.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/vital/vitalCollection.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/plugins.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/tracing/identifier.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/tracing/sampler.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/tracing/encodedContext.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/tracing/tracer.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/configuration/configuration.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/configuration/remoteConfiguration.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/configuration/index.ts", "../../../node_modules/@datadog/browser-rum-core/src/boot/preStartRum.ts", "../../../node_modules/@datadog/browser-rum-core/src/boot/rumPublicApi.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/domMutationObservable.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/windowOpenObservable.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/limitModification.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/assembly.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/contexts/internalContext.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/lifeCycle.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/contexts/viewHistory.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/resource/resourceUtils.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/requestCollection.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/discardNegativeDuration.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/trackEventCounts.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/firstInputPolyfill.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/performanceObservable.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/waitPageActivityEnd.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/htmlDomUtils.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/privacy.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/action/getActionNameFromElement.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/getSelectorFromElement.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/action/clickChain.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/action/listenActionEvents.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/action/computeFrustration.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/action/interactionSelectorCache.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/action/trackClickActions.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/action/actionCollection.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/error/trackConsoleError.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/error/trackReportError.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/error/errorCollection.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/resource/matchRequestResourceEntry.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/tracing/getDocumentTraceId.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/performanceUtils.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/resource/retrieveInitialDocumentResourceTiming.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/resource/resourceCollection.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/trackViewEventCounts.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackFirstContentfulPaint.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackFirstInput.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackNavigationTimings.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackLargestContentfulPaint.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackFirstHidden.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackInitialViewMetrics.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackCumulativeLayoutShift.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/interactionCountPolyfill.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackInteractionToNextPaint.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackLoadingTime.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/scroll.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/viewportObservable.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackScrollMetrics.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewMetrics/trackCommonViewMetrics.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/trackViews.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/view/viewCollection.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/rumSessionManager.ts", "../../../node_modules/@datadog/browser-rum-core/src/transport/startRumBatch.ts", "../../../node_modules/@datadog/browser-rum-core/src/transport/startRumEventBridge.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/contexts/urlContexts.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/locationChangeObservable.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/contexts/featureFlagContext.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/startCustomerDataTelemetry.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/contexts/pageStateHistory.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/contexts/displayContext.ts", "../../../node_modules/@datadog/browser-rum-core/src/browser/cookieObservable.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/contexts/ciVisibilityContext.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/longAnimationFrame/longAnimationFrameCollection.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/longTask/longTaskCollection.ts", "../../../node_modules/@datadog/browser-rum-core/src/hooks.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/contexts/syntheticsContext.ts", "../../../node_modules/@datadog/browser-rum-core/src/boot/startRum.ts", "../../../node_modules/@datadog/browser-rum-core/src/domain/getSessionReplayUrl.ts", "../../../node_modules/@datadog/browser-rum-core/src/index.ts", "../../../node_modules/@datadog/browser-rum/src/domain/replayStats.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/serialization/serializationUtils.ts", "../../../node_modules/@datadog/browser-rum/src/types/sessionReplayConstants.ts", "../../../node_modules/@datadog/browser-rum/src/types/index.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/serialization/serializeStyleSheets.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/serialization/serializeAttribute.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/serialization/serializeAttributes.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/serialization/serializeNode.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/serialization/serializeDocument.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/serialization/index.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/eventsUtils.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/viewports.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/assembly.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackMove.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackMouseInteraction.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackScroll.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackViewportResize.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackMediaInteraction.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackStyleSheet.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackFocus.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackFrustration.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackViewEnd.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackInput.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/mutationBatch.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/trackMutation.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/trackers/index.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/elementsScrollPositions.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/shadowRootsController.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/startFullSnapshots.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/recordIds.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/record.ts", "../../../node_modules/@datadog/browser-rum/src/domain/record/index.ts", "../../../node_modules/@datadog/browser-rum/src/domain/segmentCollection/buildReplayPayload.ts", "../../../node_modules/@datadog/browser-rum/src/domain/segmentCollection/segment.ts", "../../../node_modules/@datadog/browser-rum/src/domain/segmentCollection/segmentCollection.ts", "../../../node_modules/@datadog/browser-rum/src/domain/segmentCollection/index.ts", "../../../node_modules/@datadog/browser-rum/src/domain/startRecordBridge.ts", "../../../node_modules/@datadog/browser-rum/src/boot/startRecording.ts", "../../../node_modules/@datadog/browser-rum/src/domain/profiling/utils/getNumberOfSamples.ts", "../../../node_modules/@datadog/browser-rum/src/domain/profiling/utils/longTaskRegistry.ts", "../../../node_modules/@datadog/browser-rum/src/domain/profiling/profilingCorrelation.ts", "../../../node_modules/@datadog/browser-rum/src/domain/profiling/transport/transport.ts", "../../../node_modules/@datadog/browser-rum/src/domain/profiling/profiler.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Patch/Native.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Utilities.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/CustomElementInternals.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/custom-elements.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/CustomElementState.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Deferred.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/DocumentConstructionObserver.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/CustomElementRegistry.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Patch/Interface/ParentNode.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Patch/Document.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Patch/Interface/ChildNode.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Patch/Element.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/AlreadyConstructedMarker.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Patch/HTMLElement.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Patch/Node.ts", "../../../node_modules/@webcomponents/custom-elements/ts_src/Patch/DocumentFragment.ts", "../../../node_modules/@github/clipboard-copy-element/dist/clipboard.js", "../../../node_modules/@github/clipboard-copy-element/dist/clipboard-copy-element.js", "../../../node_modules/@github/clipboard-copy-element/dist/clipboard-copy-element-define.js", "../../frontend/javascript/application.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.IFDWM6P4.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.DL5222VR.js", "../../../node_modules/@lit/reactive-element/src/css-tag.ts", "../../../node_modules/@lit/reactive-element/src/reactive-element.ts", "../../../node_modules/lit-html/src/lit-html.ts", "../../../node_modules/lit-element/src/lit-element.ts", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.YKKSQ2FG.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.B6TFD6BC.js", "../../../node_modules/@lit/reactive-element/src/decorators/property.ts", "../../../node_modules/@lit/reactive-element/src/decorators/state.ts", "../../../node_modules/@lit/reactive-element/src/decorators/event-options.ts", "../../../node_modules/@lit/reactive-element/src/decorators/base.ts", "../../../node_modules/@lit/reactive-element/src/decorators/query.ts", "../../../node_modules/@lit/reactive-element/src/decorators/query-async.ts", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.2YRD3KJP.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.F6SDTK2I.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.PZBNTIXR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.JXE6F466.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GI7VDIWX.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.7PFTIGIY.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.NYIIDP5N.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.2FB5TK5H.js", "../../../node_modules/lit-html/src/directive.ts", "../../../node_modules/lit-html/src/directives/class-map.ts", "../../../node_modules/lit-html/src/directives/if-defined.ts", "../../../node_modules/lit-html/src/directive-helpers.ts", "../../../node_modules/lit-html/src/directives/live.ts", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.YSY5RJCY.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.DQ6ZOCG3.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.TWS2FELI.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.BWVSW6TI.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.MOP7Q34D.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.3Y6SB6QS.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.P7ZG6EMR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GWB677OL.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.FN2JAFC4.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QLXRCYS4.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.Y43KHU46.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.SH4OS6FF.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.FTPRKEVO.js", "../../../node_modules/@shoelace-style/localize/dist/index.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.MAS2SHYD.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.WLV3FVBR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.RTLGDO46.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.DHU6MIVB.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.LHI6QEL2.js", "../../../node_modules/lit-html/src/directives/when.ts", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.WWEUL23L.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.HF7GESMZ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.VN7KGJ37.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.G5PS6TTR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.UAYXD3AN.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.ESELY2US.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.CWRV5BGG.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.VGFLHY4S.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.TILOZ42H.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.3KSWVBQ5.js", "../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs", "../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs", "../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs", "../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs", "../../../node_modules/composed-offset-position/dist/composed-offset-position.browser.min.mjs", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.DUKTB2EG.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.B4BZKR24.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.PDKLBEFT.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.IE6NSX7L.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.P6WCDQ6N.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.E74UJ6SG.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.RK73WSZS.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.SE736RPE.js", "../../../node_modules/lit-html/src/static.ts", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.UFZOLGMN.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.66J66KPN.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.DW6NJEYJ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.BQSEJD7X.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.DFAPX3US.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.SRCS2WFR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.ZW5QBKFF.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.SCM5ISR5.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QYGZ4EZE.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.HEVWVJOK.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.FYPSWRGS.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.X3Y4OPYT.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GOFR2SX6.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.ZEP5BKQE.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QKHCJHJ7.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.YUXDGYNH.js", "../../../node_modules/lit-html/src/directives/unsafe-html.ts", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.ZDXQ32TH.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.RH7POETX.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.HTQNKB5E.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.PFD4VLNN.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.AF2UHIE7.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.G2DPKVZR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.7TRB5GG6.js", "../../../node_modules/lit-html/src/directives/style-map.ts", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.YK6FUNFD.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.5ADRYBBR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.H4IYDCLV.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.MUU2VN4R.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.5VKIB4HA.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.JXJVQXSV.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.YK4PFTI5.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.UIEDNSZD.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.H7RDQGYG.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.2QTYYQ2L.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GU6SKXCW.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.UB5Y5ZSR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.2OUC42YY.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.ZMUTZNBF.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.WIXTCH2R.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.YKTOKKJW.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.5D6IT2SR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.UX4YXSDU.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.C36CIUEJ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.2IHMH66B.js", "../../../node_modules/qr-creator/dist/src/qr-creator.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.EZKTARDT.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.JXORJGUR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.FC3KIO63.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.XVVDUPMB.js", "../../../node_modules/@shoelace-style/animations/dist/index.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/bounce.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/flash.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/headShake.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/heartBeat.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/jello.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/pulse.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/rubberBand.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/shake.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/shakeX.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/shakeY.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/swing.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/tada.js", "../../../node_modules/@shoelace-style/animations/dist/attention_seekers/wobble.js", "../../../node_modules/@shoelace-style/animations/dist/back_entrances/backInDown.js", "../../../node_modules/@shoelace-style/animations/dist/back_entrances/backInLeft.js", "../../../node_modules/@shoelace-style/animations/dist/back_entrances/backInRight.js", "../../../node_modules/@shoelace-style/animations/dist/back_entrances/backInUp.js", "../../../node_modules/@shoelace-style/animations/dist/back_exits/backOutDown.js", "../../../node_modules/@shoelace-style/animations/dist/back_exits/backOutLeft.js", "../../../node_modules/@shoelace-style/animations/dist/back_exits/backOutRight.js", "../../../node_modules/@shoelace-style/animations/dist/back_exits/backOutUp.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_entrances/bounceIn.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_entrances/bounceInDown.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_entrances/bounceInLeft.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_entrances/bounceInRight.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_entrances/bounceInUp.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_exits/bounceOut.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_exits/bounceOutDown.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_exits/bounceOutLeft.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_exits/bounceOutRight.js", "../../../node_modules/@shoelace-style/animations/dist/bouncing_exits/bounceOutUp.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeIn.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInBottomLeft.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInBottomRight.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInDown.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInDownBig.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInLeft.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInLeftBig.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInRight.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInRightBig.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInTopLeft.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInTopRight.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInUp.js", "../../../node_modules/@shoelace-style/animations/dist/fading_entrances/fadeInUpBig.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOut.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutBottomLeft.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutBottomRight.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutDown.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutDownBig.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutLeft.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutLeftBig.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutRight.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutRightBig.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutTopLeft.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutTopRight.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutUp.js", "../../../node_modules/@shoelace-style/animations/dist/fading_exits/fadeOutUpBig.js", "../../../node_modules/@shoelace-style/animations/dist/flippers/flip.js", "../../../node_modules/@shoelace-style/animations/dist/flippers/flipInX.js", "../../../node_modules/@shoelace-style/animations/dist/flippers/flipInY.js", "../../../node_modules/@shoelace-style/animations/dist/flippers/flipOutX.js", "../../../node_modules/@shoelace-style/animations/dist/flippers/flipOutY.js", "../../../node_modules/@shoelace-style/animations/dist/lightspeed/lightSpeedInLeft.js", "../../../node_modules/@shoelace-style/animations/dist/lightspeed/lightSpeedInRight.js", "../../../node_modules/@shoelace-style/animations/dist/lightspeed/lightSpeedOutLeft.js", "../../../node_modules/@shoelace-style/animations/dist/lightspeed/lightSpeedOutRight.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_entrances/rotateIn.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_entrances/rotateInDownLeft.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_entrances/rotateInDownRight.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_entrances/rotateInUpLeft.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_entrances/rotateInUpRight.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_exits/rotateOut.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_exits/rotateOutDownLeft.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_exits/rotateOutDownRight.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_exits/rotateOutUpLeft.js", "../../../node_modules/@shoelace-style/animations/dist/rotating_exits/rotateOutUpRight.js", "../../../node_modules/@shoelace-style/animations/dist/sliding_entrances/slideInDown.js", "../../../node_modules/@shoelace-style/animations/dist/sliding_entrances/slideInLeft.js", "../../../node_modules/@shoelace-style/animations/dist/sliding_entrances/slideInRight.js", "../../../node_modules/@shoelace-style/animations/dist/sliding_entrances/slideInUp.js", "../../../node_modules/@shoelace-style/animations/dist/sliding_exits/slideOutDown.js", "../../../node_modules/@shoelace-style/animations/dist/sliding_exits/slideOutLeft.js", "../../../node_modules/@shoelace-style/animations/dist/sliding_exits/slideOutRight.js", "../../../node_modules/@shoelace-style/animations/dist/sliding_exits/slideOutUp.js", "../../../node_modules/@shoelace-style/animations/dist/specials/hinge.js", "../../../node_modules/@shoelace-style/animations/dist/specials/jackInTheBox.js", "../../../node_modules/@shoelace-style/animations/dist/specials/rollIn.js", "../../../node_modules/@shoelace-style/animations/dist/specials/rollOut.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_entrances/zoomIn.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_entrances/zoomInDown.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_entrances/zoomInLeft.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_entrances/zoomInRight.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_entrances/zoomInUp.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_exits/zoomOut.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_exits/zoomOutDown.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_exits/zoomOutLeft.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_exits/zoomOutRight.js", "../../../node_modules/@shoelace-style/animations/dist/zooming_exits/zoomOutUp.js", "../../../node_modules/@shoelace-style/animations/dist/easings/easings.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.IEH6E2FQ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.B66ZXN3L.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.HLT534QF.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QVTXTTF5.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GXC456DW.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.CSS62QPI.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.D5ANA4CN.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.XOSELTMG.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.RQZ4ZC5M.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.AC45RUS3.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QPEK4MCY.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.LESONHTL.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.MO63OAWF.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.2W6X55FG.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.OXD5A2HX.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.7G2KMLLW.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.F2YMP7DQ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.YL6Y2WV6.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.VPD5J64G.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QKLDALCP.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.DIJ2APZM.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.BRGDCH7V.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.VFFZIT5D.js", "../../../node_modules/lit-html/src/async-directive.ts", "../../../node_modules/lit-html/src/directives/ref.ts", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GZKJ6PRL.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.H7N4H65Q.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.TZXXE6IZ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.FY7IKLNL.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.XNEONNEJ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.LQXTJIZI.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.BK6HGBY4.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.VVA35HTY.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QLTKFERV.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.2DV6NESR.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.55K5U4SC.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.RCGFCKTU.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GEXJVYI2.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.HDMET3E2.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.YDJQXNZA.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.7YTLZ3ED.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.T43HVDBA.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.LXDTFLWU.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.ODFLWOL6.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.WV2QU3SI.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.6XPLVTGY.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QBNX4YZ4.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.M2KQYJXX.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.MSJV2QSC.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.4U4SCLUK.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.SKC3DQQO.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.IB34ADPF.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.LRXEESA3.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.WRPP2J4P.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.N7NZKHGL.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.7I2TDRO6.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.O7N5FQZI.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GDTZ4HPA.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.ZBY4KQSJ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.OLWSF274.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.WSSNCNLM.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QPX2CSBO.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.SBOVJ3VC.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.O6CEROC7.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.4AUO53Q2.js", "../../../node_modules/@ctrl/tinycolor/dist/module/util.js", "../../../node_modules/@ctrl/tinycolor/dist/module/conversion.js", "../../../node_modules/@ctrl/tinycolor/dist/module/css-color-names.js", "../../../node_modules/@ctrl/tinycolor/dist/module/format-input.js", "../../../node_modules/@ctrl/tinycolor/dist/module/index.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.WKSJ5BVG.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GN27OT3W.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.S5IINCEW.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QQPPZBEQ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.CVI5WFBU.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.NJRDFOGI.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.NQ44LUGM.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.DZJMFWXF.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.62ORWLYH.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.3BUYOWA7.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.4JPRTUKZ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.CA5ZMHLC.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.Y2KU7QTE.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.F4VGSDIW.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.BMOWACWC.js", "../../../node_modules/lit-html/src/directives/map.ts", "../../../node_modules/lit-html/src/directives/range.ts", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.UV7C6XIX.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.OVPRKNIS.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.P4NYDBZP.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.LBBZ2ZIU.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.JT7JNXWT.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QIMDC5VL.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GYWFQ7LW.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.3HBMI445.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.4GPOLWBX.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QMNTHEY6.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.JKBS5GQ2.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.GMHRXA7T.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.ZGAGNYQQ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.K35GSB4N.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.QZLGARP4.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.W34T6ZET.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.HNZRMQWM.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.PGFT7ZGN.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.T5GQYUQX.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.4G2SG7DS.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.476RT27L.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.3MPPPFWJ.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.M3A4TKTU.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.YABFDDIP.js", "../../../node_modules/@teamshares/shoelace/dist/chunks/chunk.ZSJPVGGL.js", "../../../node_modules/@teamshares/design-system/rails-js/index.js", "../../../node_modules/@teamshares/design-system/rails-js/includes/ts_wrapper.js", "../../../node_modules/@teamshares/design-system/rails-js/controllers/index.js", "../../../node_modules/@teamshares/design-system/rails-js/controllers/toggle_controller.js", "../../../node_modules/@teamshares/design-system/rails-js/controllers/launcher_controller.js", "../../../node_modules/whatwg-fetch/fetch.js", "../../../node_modules/@rails/actiontext/app/assets/javascripts/actiontext.esm.js", "../../frontend/javascript/includes/numberFormat.js", "../../frontend/javascript/includes/taxFieldEntry.js", "../../frontend/javascript/includes/termsModeling.js", "../../frontend/javascript/includes/admin/retainUnsavedNotes.js", "../../frontend/javascript/includes/admin/leadBrokerUpdate.js", "../../frontend/javascript/includes/admin/emails/sendEmails.js", "../../frontend/javascript/includes/admin/emails/editRecipients.js", "../../frontend/javascript/includes/brokerDocumentUpload.js", "../../frontend/javascript/includes/admin/twilioCall.js", "../../../node_modules/@algolia/requester-browser-xhr/src/createXhrRequester.ts", "../../../node_modules/@algolia/client-common/src/cache/createBrowserLocalStorageCache.ts", "../../../node_modules/@algolia/client-common/src/cache/createNullCache.ts", "../../../node_modules/@algolia/client-common/src/cache/createFallbackableCache.ts", "../../../node_modules/@algolia/client-common/src/cache/createMemoryCache.ts", "../../../node_modules/@algolia/client-common/src/constants.ts", "../../../node_modules/@algolia/client-common/src/createAlgoliaAgent.ts", "../../../node_modules/@algolia/client-common/src/createAuth.ts", "../../../node_modules/@algolia/client-common/src/createIterablePromise.ts", "../../../node_modules/@algolia/client-common/src/getAlgoliaAgent.ts", "../../../node_modules/@algolia/client-common/src/logger/createNullLogger.ts", "../../../node_modules/@algolia/client-common/src/transporter/createStatefulHost.ts", "../../../node_modules/@algolia/client-common/src/transporter/errors.ts", "../../../node_modules/@algolia/client-common/src/transporter/helpers.ts", "../../../node_modules/@algolia/client-common/src/transporter/responses.ts", "../../../node_modules/@algolia/client-common/src/transporter/stackTrace.ts", "../../../node_modules/@algolia/client-common/src/transporter/createTransporter.ts", "../../../node_modules/@algolia/client-common/src/types/logger.ts", "../../../node_modules/@algolia/client-search/builds/browser.ts", "../../../node_modules/@algolia/client-search/src/searchClient.ts", "../../frontend/javascript/includes/admin/algolia.js", "../../../node_modules/@datadog/browser-rum/src/entries/main.ts", "../../../node_modules/@datadog/browser-rum/src/boot/recorderApi.ts", "../../../node_modules/@datadog/browser-rum/src/domain/deflate/deflateEncoder.ts", "../../../node_modules/@datadog/browser-rum/src/domain/deflate/deflateWorker.ts", "../../../node_modules/@datadog/browser-rum/src/domain/scriptLoadingError.ts", "../../../node_modules/@datadog/browser-rum/src/boot/isBrowserSupported.ts", "../../../node_modules/@datadog/browser-rum/src/boot/postStartStrategy.ts", "../../../node_modules/@datadog/browser-rum/src/domain/getSessionReplayLink.ts", "../../../node_modules/@datadog/browser-rum/src/boot/preStartStrategy.ts", "../../../node_modules/@datadog/browser-rum/src/boot/lazyLoadRecorder.ts", "../../../node_modules/@datadog/browser-rum/src/boot/profilerApi.ts", "../../../node_modules/@datadog/browser-rum/src/domain/profiling/profilingSupported.ts", "../../../node_modules/@datadog/browser-rum/src/domain/profiling/lazyLoadProfiler.ts", "../../../node_modules/micromodal/dist/micromodal.es.js"], "sourcesContent": ["!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.commandbar=t():e.commandbar=t()}(this,(()=>(()=>{var e={296:(e,t,o)=>{\"use strict\";var r=o(649),n=o(413),i=o(715),a=o(416),s=o(682);(e.exports=function(e,t){var o,n,c,u,l;return arguments.length<2||\"string\"!=typeof e?(u=t,t=e,e=null):u=arguments[2],r(e)?(o=s.call(e,\"c\"),n=s.call(e,\"e\"),c=s.call(e,\"w\")):(o=c=!0,n=!1),l={value:t,configurable:o,enumerable:n,writable:c},u?i(a(u),l):l}).gs=function(e,t,o){var c,u,l,d;return\"string\"!=typeof e?(l=o,o=t,t=e,e=null):l=arguments[3],r(t)?n(t)?r(o)?n(o)||(l=o,o=void 0):o=void 0:(l=t,t=o=void 0):t=void 0,r(e)?(c=s.call(e,\"c\"),u=s.call(e,\"e\")):(c=!0,u=!1),d={get:t,set:o,configurable:c,enumerable:u},l?i(a(l),d):d}},448:e=>{\"use strict\";e.exports=function(){}},715:(e,t,o)=>{\"use strict\";e.exports=o(927)()?Object.assign:o(958)},927:e=>{\"use strict\";e.exports=function(){var e,t=Object.assign;return\"function\"==typeof t&&(t(e={foo:\"raz\"},{bar:\"dwa\"},{trzy:\"trzy\"}),e.foo+e.bar+e.trzy===\"razdwatrzy\")}},958:(e,t,o)=>{\"use strict\";var r=o(700),n=o(240),i=Math.max;e.exports=function(e,t){var o,a,s,c=i(arguments.length,2);for(e=Object(n(e)),s=function(r){try{e[r]=t[r]}catch(e){o||(o=e)}},a=1;a{\"use strict\";var r=o(448)();e.exports=function(e){return e!==r&&null!==e}},700:(e,t,o)=>{\"use strict\";e.exports=o(790)()?Object.keys:o(360)},790:e=>{\"use strict\";e.exports=function(){try{return Object.keys(\"primitive\"),!0}catch(e){return!1}}},360:(e,t,o)=>{\"use strict\";var r=o(630),n=Object.keys;e.exports=function(e){return n(r(e)?Object(e):e)}},416:(e,t,o)=>{\"use strict\";var r=o(630),n=Array.prototype.forEach,i=Object.create;e.exports=function(e){var t=i(null);return n.call(arguments,(function(e){r(e)&&function(e,t){var o;for(o in e)t[o]=e[o]}(Object(e),t)})),t}},240:(e,t,o)=>{\"use strict\";var r=o(630);e.exports=function(e){if(!r(e))throw new TypeError(\"Cannot use null or undefined\");return e}},682:(e,t,o)=>{\"use strict\";e.exports=o(974)()?String.prototype.contains:o(641)},974:e=>{\"use strict\";var t=\"razdwatrzy\";e.exports=function(){return\"function\"==typeof t.contains&&!0===t.contains(\"dwa\")&&!1===t.contains(\"foo\")}},641:e=>{\"use strict\";var t=String.prototype.indexOf;e.exports=function(e){return t.call(this,e,arguments[1])>-1}},86:(e,t,o)=>{\"use strict\";var r=o(84);e.exports=function(e){if(\"function\"!=typeof e)return!1;if(!hasOwnProperty.call(e,\"length\"))return!1;try{if(\"number\"!=typeof e.length)return!1;if(\"function\"!=typeof e.call)return!1;if(\"function\"!=typeof e.apply)return!1}catch(e){return!1}return!r(e)}},453:(e,t,o)=>{\"use strict\";var r=o(649),n={object:!0,function:!0,undefined:!0};e.exports=function(e){return!!r(e)&&hasOwnProperty.call(n,typeof e)}},413:(e,t,o)=>{\"use strict\";var r=o(86),n=/^\\s*class[\\s{/}]/,i=Function.prototype.toString;e.exports=function(e){return!!r(e)&&!n.test(i.call(e))}},84:(e,t,o)=>{\"use strict\";var r=o(453);e.exports=function(e){if(!r(e))return!1;try{return!!e.constructor&&e.constructor.prototype===e}catch(e){return!1}}},649:e=>{\"use strict\";e.exports=function(e){return null!=e}},992:(e,t,o)=>{\"use strict\";o(98).polyfill()},98:e=>{\"use strict\";function t(e,t){if(null==e)throw new TypeError(\"Cannot convert first argument to object\");for(var o=Object(e),r=1;r{\"use strict\";o(614)()||Object.defineProperty(o(119),\"Symbol\",{value:o(798),configurable:!0,enumerable:!1,writable:!0})},614:(e,t,o)=>{\"use strict\";var r=o(119),n={object:!0,symbol:!0};e.exports=function(){var e,t=r.Symbol;if(\"function\"!=typeof t)return!1;e=t(\"test symbol\");try{String(e)}catch(e){return!1}return!!n[typeof t.iterator]&&!!n[typeof t.toPrimitive]&&!!n[typeof t.toStringTag]}},64:e=>{\"use strict\";e.exports=function(e){return!!e&&(\"symbol\"==typeof e||!!e.constructor&&\"Symbol\"===e.constructor.name&&\"Symbol\"===e[e.constructor.toStringTag])}},573:(e,t,o)=>{\"use strict\";var r=o(296),n=Object.create,i=Object.defineProperty,a=Object.prototype,s=n(null);e.exports=function(e){for(var t,o,n=0;s[e+(n||\"\")];)++n;return s[e+=n||\"\"]=!0,i(a,t=\"@@\"+e,r.gs(null,(function(e){o||(o=!0,i(this,t,r(e)),o=!1)}))),t}},572:(e,t,o)=>{\"use strict\";var r=o(296),n=o(119).Symbol;e.exports=function(e){return Object.defineProperties(e,{hasInstance:r(\"\",n&&n.hasInstance||e(\"hasInstance\")),isConcatSpreadable:r(\"\",n&&n.isConcatSpreadable||e(\"isConcatSpreadable\")),iterator:r(\"\",n&&n.iterator||e(\"iterator\")),match:r(\"\",n&&n.match||e(\"match\")),replace:r(\"\",n&&n.replace||e(\"replace\")),search:r(\"\",n&&n.search||e(\"search\")),species:r(\"\",n&&n.species||e(\"species\")),split:r(\"\",n&&n.split||e(\"split\")),toPrimitive:r(\"\",n&&n.toPrimitive||e(\"toPrimitive\")),toStringTag:r(\"\",n&&n.toStringTag||e(\"toStringTag\")),unscopables:r(\"\",n&&n.unscopables||e(\"unscopables\"))})}},781:(e,t,o)=>{\"use strict\";var r=o(296),n=o(11),i=Object.create(null);e.exports=function(e){return Object.defineProperties(e,{for:r((function(t){return i[t]?i[t]:i[t]=e(String(t))})),keyFor:r((function(e){var t;for(t in n(e),i)if(i[t]===e)return t}))})}},798:(e,t,o)=>{\"use strict\";var r,n,i,a=o(296),s=o(11),c=o(119).Symbol,u=o(573),l=o(572),d=o(781),p=Object.create,m=Object.defineProperties,f=Object.defineProperty;if(\"function\"==typeof c)try{String(c()),i=!0}catch(e){}else c=null;n=function(e){if(this instanceof n)throw new TypeError(\"Symbol is not a constructor\");return r(e)},e.exports=r=function e(t){var o;if(this instanceof e)throw new TypeError(\"Symbol is not a constructor\");return i?c(t):(o=p(n.prototype),t=void 0===t?\"\":String(t),m(o,{__description__:a(\"\",t),__name__:a(\"\",u(t))}))},l(r),d(r),m(n.prototype,{constructor:a(r),toString:a(\"\",(function(){return this.__name__}))}),m(r.prototype,{toString:a((function(){return\"Symbol (\"+s(this).__description__+\")\"})),valueOf:a((function(){return s(this)}))}),f(r.prototype,r.toPrimitive,a(\"\",(function(){var e=s(this);return\"symbol\"==typeof e?e:e.toString()}))),f(r.prototype,r.toStringTag,a(\"c\",\"Symbol\")),f(n.prototype,r.toStringTag,a(\"c\",r.prototype[r.toStringTag])),f(n.prototype,r.toPrimitive,a(\"c\",r.prototype[r.toPrimitive]))},11:(e,t,o)=>{\"use strict\";var r=o(64);e.exports=function(e){if(!r(e))throw new TypeError(e+\" is not a symbol\");return e}},308:e=>{var t=function(){if(\"object\"==typeof self&&self)return self;if(\"object\"==typeof window&&window)return window;throw new Error(\"Unable to resolve global `this`\")};e.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,\"__global__\",{get:function(){return this},configurable:!0})}catch(e){return t()}try{return __global__||t()}finally{delete Object.prototype.__global__}}()},119:(e,t,o)=>{\"use strict\";e.exports=o(801)()?globalThis:o(308)},801:e=>{\"use strict\";e.exports=function(){return\"object\"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},656:(e,t,o)=>{\"use strict\";var r;(r=\"undefined\"!=typeof process&&\"[object process]\"==={}.toString.call(process)||\"undefined\"!=typeof navigator&&\"ReactNative\"===navigator.product?o.g:self).Proxy||(r.Proxy=o(659)(),r.Proxy.revocable=r.Proxy.revocable)},659:e=>{e.exports=function(){let e,t=null;function o(e){return!!e&&(\"object\"==typeof e||\"function\"==typeof e)}function r(e){if(null!==e&&!o(e))throw new TypeError(\"Object prototype may only be an Object or null: \"+e)}const n=Object,i=Boolean(n.create)||!({__proto__:null}instanceof n),a=n.create||(i?function(e){return r(e),{__proto__:e}}:function(e){if(r(e),null===e)throw new SyntaxError(\"Native Object.create is required to create objects with null prototype\");var t=function(){};return t.prototype=e,new t}),s=function(){return null},c=n.getPrototypeOf||([].__proto__===Array.prototype?function(e){const t=e.__proto__;return o(t)?t:null}:s);return e=function(u,l){if(void 0===(this&&this instanceof e?this.constructor:void 0))throw new TypeError(\"Constructor Proxy requires 'new'\");if(!o(u)||!o(l))throw new TypeError(\"Cannot create proxy with a non-object as target or handler\");let d=function(){};t=function(){u=null,d=function(e){throw new TypeError(`Cannot perform '${e}' on a proxy that has been revoked`)}},setTimeout((function(){t=null}),0);const p=l;l={get:null,set:null,apply:null,construct:null};for(let e in p){if(!(e in l))throw new TypeError(`Proxy polyfill does not support trap '${e}'`);l[e]=p[e]}\"function\"==typeof p&&(l.apply=p.apply.bind(p));const m=c(u);let f,y=!1,b=!1;\"function\"==typeof u?(f=function(){const e=this&&this.constructor===f,t=Array.prototype.slice.call(arguments);return d(e?\"construct\":\"apply\"),e&&l.construct?l.construct.call(this,u,t):!e&&l.apply?l.apply(u,this,t):e?(t.unshift(u),new(u.bind.apply(u,t))):u.apply(this,t)},y=!0):u instanceof Array?(f=[],b=!0):f=i||null!==m?a(m):{};const _=l.get?function(e){return d(\"get\"),l.get(this,e,f)}:function(e){return d(\"get\"),this[e]},v=l.set?function(e,t){d(\"set\"),l.set(this,e,t,f)}:function(e,t){d(\"set\"),this[e]=t},g=n.getOwnPropertyNames(u),h={};g.forEach((function(e){if((y||b)&&e in f)return;const t=n.getOwnPropertyDescriptor(u,e),o={enumerable:Boolean(t.enumerable),get:_.bind(u,e),set:v.bind(u,e)};n.defineProperty(f,e,o),h[e]=!0}));let S=!0;if(y||b){const e=n.setPrototypeOf||([].__proto__===Array.prototype?function(e,t){return r(t),e.__proto__=t,e}:s);m&&e(f,m)||(S=!1)}if(l.get||!S)for(let e in u)h[e]||n.defineProperty(f,e,{get:_.bind(u,e)});return n.seal(u),n.seal(f),f},e.revocable=function(o,r){return{proxy:new e(o,r),revoke:t}},e}},14:function(e,t,o){\"use strict\";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,\"__esModule\",{value:!0}),t.initProxy=t.init=void 0;var n=o(956);Object.defineProperty(t,\"init\",{enumerable:!0,get:function(){return r(n).default}});var i=o(737);Object.defineProperty(t,\"initProxy\",{enumerable:!0,get:function(){return i.initProxySDK}})},956:function(e,t,o){\"use strict\";var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,o=1,r=arguments.length;o{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.DEFAULT_META_ATTRIBUTES=t.DEFAULT_INSTANCE_ATTRIBUTES=t.PRODUCTS=t.LEGACY_INLINE_BAR=t.ASYNC_METHODS=t.ASYNC_METHODS_SNIPPET=void 0,t.ASYNC_METHODS_SNIPPET=[\"addCommand\",\"boot\",\"addEventSubscriber\",\"addRecordAction\",\"setFormFactor\"],t.ASYNC_METHODS=[\"addCommand\",\"boot\",\"addEventSubscriber\",\"addEventHandler\",\"addRecordAction\",\"setFormFactor\"],t.LEGACY_INLINE_BAR={\"5725a2a3\":!0,ec420f00:!0,dee37b08:!0},t.PRODUCTS=[\"spotlight\",\"nudges\",\"checklists\",\"help_hub\"],t.DEFAULT_INSTANCE_ATTRIBUTES={canOpenEditor:!0,formFactor:{type:\"modal\"},products:[\"spotlight\",\"nudges\",\"checklists\",\"help_hub\"]},t.DEFAULT_META_ATTRIBUTES={}},737:(e,t,o)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.initProxySDK=t.getProxySDK=void 0;var r=o(314),n=o(343),i=o(207);function a(){var e,t,o,r,a,s,c=window.CommandBar,u=window.CommandBar;Array.isArray(null==c?void 0:c.q)||\"string\"==typeof(null==c?void 0:c.uid)?(r=null==c?void 0:c.uid,a=null==c?void 0:c.q,s=null==c?void 0:c.api):(r=null===(t=null==u?void 0:u[i._configuration])||void 0===t?void 0:t.uuid,a=null==u?void 0:u[i._queue],s=null===(o=null==u?void 0:u[i._configuration])||void 0===o?void 0:o.api);var l=((e={})[i._configuration]={uuid:\"string\"==typeof r?r:\"\",api:\"string\"==typeof s?s:void 0},e[i._disposed]=!1,e[i._isProxy]=!0,e[i._queue]=Array.isArray(a)?a:[],e[i._unwrap]=function(){return l},e[i._eventSubscriptions]=void 0,e[i._sentry]=void 0,e),d=l;Object.assign(l,{shareCallbacks:function(){return{}},shareContext:function(){return{}}}),window.CommandBar=new Proxy(l,{get:function(e,t){return t in d?d[t]:\"then\"!==t?n.ASYNC_METHODS_SNIPPET.includes(t)?function(){var e=Array.prototype.slice.call(arguments);return new Promise((function(o,r){e.unshift(t,o,r),l[i._queue].push(e)}))}:function(){var e=Array.prototype.slice.call(arguments);e.unshift(t),l[i._queue].push(e)}:void 0}})}t.getProxySDK=function(){var e=window.CommandBar;return((0,r.isDisposed)(e)||\"boolean\"!=typeof e[i._isProxy])&&a(),window.CommandBar[i._unwrap]()},t.initProxySDK=a},207:(e,t)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t._user=t._unwrap=t._state=t._showMessage=t._showGuide=t._shareProgrammaticCommands=t._shareContextSettings=t._shareConfig=t._setEditorVisible=t._setTestMode=t._setPreviewMode=t._setDashboard=t._sentry=t._search=t._report=t._reloadChecklists=t._previewChecklist=t._stopNudgeDebug=t._stopChecklistPreview=t._closeNudgeMocks=t._showNudgeStepMock=t._getDebugSnapshot=t._startNudgeDebug=t._stopRecommendationSetPreview=t._previewCopilotSettings=t._previewRecommendationSet=t._reloadThemes=t._reloadHelpHub=t._reloadNudges=t._reloadPlaceholders=t._reloadOrganization=t._reloadCommands=t._reload=t._queue=t._programmaticTheme=t._perf=t._getEditorPreviewDevice=t._updateEditorPreviewDevice=t._shareEditorRouteWithBar=t._onEditorPathChange=t._loadEditor=t._isProxy=t._instanceAttributes=t._disposed=t._dispose=t._dispatch=t._configUser=t._configure=t._configuration=t._analytics=void 0,t._updateEditorCopilotOverrides=t._getActiveChat=t._setActiveChat=t._showWidgetTableau=t._setThemeV2=t._shareTrackedEvents=t._stopDebug=t._startDebug=t._updateEditorRoute=t._metaAttributes=t._eventSubscriptions=t._userProperties=t._fingerprint=void 0,t._analytics=Symbol.for(\"CommandBar::analytics\"),t._configuration=Symbol.for(\"CommandBar::configuration\"),t._configure=Symbol.for(\"CommandBar::configure\"),t._configUser=Symbol.for(\"CommandBar::configUser\"),t._dispatch=Symbol.for(\"CommandBar::dispatch\"),t._dispose=Symbol.for(\"CommandBar::dispose\"),t._disposed=Symbol.for(\"CommandBar::disposed\"),t._instanceAttributes=Symbol.for(\"CommandBar::instanceAttributes\"),t._isProxy=Symbol.for(\"CommandBar::isProxy\"),t._loadEditor=Symbol.for(\"CommandBar::loadEditor\"),t._onEditorPathChange=Symbol.for(\"CommandBar::onEditorPathChange\"),t._shareEditorRouteWithBar=Symbol.for(\"CommandBar::shareEditorRouteWithBar\"),t._updateEditorPreviewDevice=Symbol.for(\"CommandBar::updateEditorPreviewDevice\"),t._getEditorPreviewDevice=Symbol.for(\"CommandBar::getEditorPreviewDevice\"),t._perf=Symbol.for(\"CommandBar::perf\"),t._programmaticTheme=Symbol.for(\"CommandBar::programmaticTheme\"),t._queue=Symbol.for(\"CommandBar::queue\"),t._reload=Symbol.for(\"CommandBar::reload\"),t._reloadCommands=Symbol.for(\"CommandBar::reloadCommands\"),t._reloadOrganization=Symbol.for(\"CommandBar::reloadOrganization\"),t._reloadPlaceholders=Symbol.for(\"CommandBar::reloadPlaceholders\"),t._reloadNudges=Symbol.for(\"CommandBar::reloadNudges\"),t._reloadHelpHub=Symbol.for(\"CommandBar::reloadHelpHub\"),t._reloadThemes=Symbol.for(\"CommandBar::reloadThemes\"),t._previewRecommendationSet=Symbol.for(\"CommandBar::previewRecommendationSet\"),t._previewCopilotSettings=Symbol.for(\"CommandBar::previewCopilotSettings\"),t._stopRecommendationSetPreview=Symbol.for(\"CommandBar::stopRecommendationSetPreview\"),t._startNudgeDebug=Symbol.for(\"CommandBar::startNudgeDebug\"),t._getDebugSnapshot=Symbol.for(\"CommandBar::getDebugSnapshot\"),t._showNudgeStepMock=Symbol.for(\"CommandBar::showNudgeStepMock\"),t._closeNudgeMocks=Symbol.for(\"CommandBar::closeNudgeMocks\"),t._stopChecklistPreview=Symbol.for(\"CommandBar::stopChecklistPreview\"),t._stopNudgeDebug=Symbol.for(\"CommandBar::stopNudgeDebug\"),t._previewChecklist=Symbol.for(\"CommandBar::previewChecklist\"),t._reloadChecklists=Symbol.for(\"CommandBar::reloadChecklists\"),t._report=Symbol.for(\"CommandBar::report\"),t._search=Symbol.for(\"CommandBar::search\"),t._sentry=Symbol.for(\"CommandBar::sentry\"),t._setDashboard=Symbol.for(\"CommandBar::setDashboard\"),t._setPreviewMode=Symbol.for(\"CommandBar::setPreviewMode\"),t._setTestMode=Symbol.for(\"CommandBar::setTestMode\"),t._setEditorVisible=Symbol.for(\"CommandBar::setEditorVisible\"),t._shareConfig=Symbol.for(\"CommandBar::shareConfig\"),t._shareContextSettings=Symbol.for(\"CommandBar::shareContextSettings\"),t._shareProgrammaticCommands=Symbol.for(\"CommandBar::shareProgrammaticCommands\"),t._showGuide=Symbol.for(\"CommandBar::showGuide\"),t._showMessage=Symbol.for(\"CommandBar::showMessage\"),t._state=Symbol.for(\"CommandBar::state\"),t._unwrap=Symbol.for(\"CommandBar::unwrap\"),t._user=Symbol.for(\"CommandBar::user\"),t._fingerprint=Symbol.for(\"CommandBar::fingerprint\"),t._userProperties=Symbol.for(\"CommandBar::userProperties\"),t._eventSubscriptions=Symbol.for(\"CommandBar::eventSubscriptions\"),t._metaAttributes=Symbol.for(\"CommandBar::metaAttributes\"),t._updateEditorRoute=Symbol.for(\"CommandBar::updateEditorRoute\"),t._startDebug=Symbol.for(\"CommandBar::startDebug\"),t._stopDebug=Symbol.for(\"CommandBar::stopDebug\"),t._shareTrackedEvents=Symbol.for(\"CommandBar::shareTrackedEvents\"),t._setThemeV2=Symbol.for(\"CommandBar::setThemeV2\"),t._showWidgetTableau=Symbol.for(\"CommandBar::showWidgetTableau\"),t._setActiveChat=Symbol.for(\"CommandBar::setActiveChat\"),t._getActiveChat=Symbol.for(\"CommandBar::getActiveChat\"),t._updateEditorCopilotOverrides=Symbol.for(\"CommandBar::updateEditorCopilotOverrides\")},314:(e,t,o)=>{\"use strict\";Object.defineProperty(t,\"__esModule\",{value:!0}),t.dispose=t.isDisposed=t.isDisposable=void 0;var r=o(207),n=function(e){return void 0!==e&&void 0!==e.dispose},i=function(e){return void 0!==e&&void 0!==e[r._dispose]};t.isDisposable=function(e){return void 0===e||n(e)||i(e)},t.isDisposed=function(e){return void 0===e||n(e)&&!0===e._disposed||i(e)&&!0===e[r._disposed]},t.dispose=function(e){void 0!==e&&(i(e)?e[r._dispose]():e.dispose())}}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,o),i.exports}return o.g=function(){if(\"object\"==typeof globalThis)return globalThis;try{return this||new Function(\"return this\")()}catch(e){if(\"object\"==typeof window)return window}}(),o(14)})()));", "var UNKNOWN_FUNCTION = '';\n/**\n * This parses the different stack traces and puts them into one format\n * This borrows heavily from TraceKit (https://github.com/csnover/TraceKit)\n */\n\nfunction parse(stackString) {\n var lines = stackString.split('\\n');\n return lines.reduce(function (stack, line) {\n var parseResult = parseChrome(line) || parseWinjs(line) || parseGecko(line) || parseNode(line) || parseJSC(line);\n\n if (parseResult) {\n stack.push(parseResult);\n }\n\n return stack;\n }, []);\n}\nvar chromeRe = /^\\s*at (.*?) ?\\(((?:file|https?|blob|chrome-extension|native|eval|webpack||\\/|[a-z]:\\\\|\\\\\\\\).*?)(?::(\\d+))?(?::(\\d+))?\\)?\\s*$/i;\nvar chromeEvalRe = /\\((\\S*)(?::(\\d+))(?::(\\d+))\\)/;\n\nfunction parseChrome(line) {\n var parts = chromeRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n var isNative = parts[2] && parts[2].indexOf('native') === 0; // start of line\n\n var isEval = parts[2] && parts[2].indexOf('eval') === 0; // start of line\n\n var submatch = chromeEvalRe.exec(parts[2]);\n\n if (isEval && submatch != null) {\n // throw out eval line/column and use top-most line/column number\n parts[2] = submatch[1]; // url\n\n parts[3] = submatch[2]; // line\n\n parts[4] = submatch[3]; // column\n }\n\n return {\n file: !isNative ? parts[2] : null,\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: isNative ? [parts[2]] : [],\n lineNumber: parts[3] ? +parts[3] : null,\n column: parts[4] ? +parts[4] : null\n };\n}\n\nvar winjsRe = /^\\s*at (?:((?:\\[object object\\])?.+) )?\\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nfunction parseWinjs(line) {\n var parts = winjsRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n return {\n file: parts[2],\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: [],\n lineNumber: +parts[3],\n column: parts[4] ? +parts[4] : null\n };\n}\n\nvar geckoRe = /^\\s*(.*?)(?:\\((.*?)\\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\\[native).*?|[^@]*bundle)(?::(\\d+))?(?::(\\d+))?\\s*$/i;\nvar geckoEvalRe = /(\\S+) line (\\d+)(?: > eval line \\d+)* > eval/i;\n\nfunction parseGecko(line) {\n var parts = geckoRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n var isEval = parts[3] && parts[3].indexOf(' > eval') > -1;\n var submatch = geckoEvalRe.exec(parts[3]);\n\n if (isEval && submatch != null) {\n // throw out eval line/column and use top-most line number\n parts[3] = submatch[1];\n parts[4] = submatch[2];\n parts[5] = null; // no column when eval\n }\n\n return {\n file: parts[3],\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: parts[2] ? parts[2].split(',') : [],\n lineNumber: parts[4] ? +parts[4] : null,\n column: parts[5] ? +parts[5] : null\n };\n}\n\nvar javaScriptCoreRe = /^\\s*(?:([^@]*)(?:\\((.*?)\\))?@)?(\\S.*?):(\\d+)(?::(\\d+))?\\s*$/i;\n\nfunction parseJSC(line) {\n var parts = javaScriptCoreRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n return {\n file: parts[3],\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: [],\n lineNumber: +parts[4],\n column: parts[5] ? +parts[5] : null\n };\n}\n\nvar nodeRe = /^\\s*at (?:((?:\\[object object\\])?[^\\\\/]+(?: \\[as \\S+\\])?) )?\\(?(.*?):(\\d+)(?::(\\d+))?\\)?\\s*$/i;\n\nfunction parseNode(line) {\n var parts = nodeRe.exec(line);\n\n if (!parts) {\n return null;\n }\n\n return {\n file: parts[2],\n methodName: parts[1] || UNKNOWN_FUNCTION,\n arguments: [],\n lineNumber: +parts[3],\n column: parts[4] ? +parts[4] : null\n };\n}\n\nexport { parse };\n", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.logDeprecatedMethod = exports.globalThisOrWindow = exports.isBrowserConfig = exports.clone = exports.formatCGIData = exports.filterUrl = exports.filter = exports.generateStackTrace = exports.endpoint = exports.instrumentConsole = exports.instrument = exports.isErrorObject = exports.makeNotice = exports.logger = exports.sanitize = exports.shallowClone = exports.runAfterNotifyHandlers = exports.runBeforeNotifyHandlers = exports.getSourceForBacktrace = exports.getCauses = exports.calculateBacktraceShift = exports.DEFAULT_BACKTRACE_SHIFT = exports.makeBacktrace = exports.objectIsExtensible = exports.objectIsEmpty = exports.mergeNotice = exports.merge = void 0;\n/* eslint-disable prefer-rest-params */\nvar stackTraceParser = __importStar(require(\"stacktrace-parser\"));\nfunction merge(obj1, obj2) {\n var result = {};\n for (var k in obj1) {\n result[k] = obj1[k];\n }\n for (var k in obj2) {\n result[k] = obj2[k];\n }\n return result;\n}\nexports.merge = merge;\nfunction mergeNotice(notice1, notice2) {\n var result = merge(notice1, notice2);\n if (notice1.context && notice2.context) {\n result.context = merge(notice1.context, notice2.context);\n }\n return result;\n}\nexports.mergeNotice = mergeNotice;\nfunction objectIsEmpty(obj) {\n for (var k in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, k)) {\n return false;\n }\n }\n return true;\n}\nexports.objectIsEmpty = objectIsEmpty;\nfunction objectIsExtensible(obj) {\n if (typeof Object.isExtensible !== 'function') {\n return true;\n }\n return Object.isExtensible(obj);\n}\nexports.objectIsExtensible = objectIsExtensible;\nfunction makeBacktrace(stack, filterHbSourceCode, logger) {\n if (filterHbSourceCode === void 0) { filterHbSourceCode = false; }\n if (logger === void 0) { logger = console; }\n if (!stack) {\n return [];\n }\n try {\n var backtrace = stackTraceParser\n .parse(stack)\n .map(function (line) {\n return {\n file: line.file,\n method: line.methodName,\n number: line.lineNumber,\n column: line.column\n };\n });\n if (filterHbSourceCode) {\n backtrace.splice(0, calculateBacktraceShift(backtrace));\n }\n return backtrace;\n }\n catch (err) {\n logger.debug(err);\n return [];\n }\n}\nexports.makeBacktrace = makeBacktrace;\nfunction isFrameFromHbSourceCode(frame) {\n var hasHbFile = false;\n var hasHbMethod = false;\n if (frame.file) {\n hasHbFile = frame.file.toLowerCase().indexOf('@honeybadger-io') > -1;\n }\n if (frame.method) {\n hasHbMethod = frame.method.toLowerCase().indexOf('@honeybadger-io') > -1;\n }\n return hasHbFile || hasHbMethod;\n}\nexports.DEFAULT_BACKTRACE_SHIFT = 3;\n/**\n * If {@link generateStackTrace} is used, we want to exclude frames that come from\n * Honeybadger's source code.\n *\n * Logic:\n * - For each frame, increment the shift if source code is from Honeybadger\n * - If a frame from an file is encountered increment the shift ONLY if between Honeybadger source code\n * (i.e. previous and next frames are from Honeybadger)\n * - Exit when frame encountered is not from Honeybadger source code\n *\n * Note: this will not always work, especially in browser versions where code\n * is minified, uglified and bundled.\n * For those cases we default to 3:\n * - generateStackTrace\n * - makeNotice\n * - notify\n */\nfunction calculateBacktraceShift(backtrace) {\n var shift = 0;\n for (var i = 0; i < backtrace.length; i++) {\n var frame = backtrace[i];\n if (isFrameFromHbSourceCode(frame)) {\n shift++;\n continue;\n }\n if (!frame.file || frame.file === '') {\n var nextFrame = backtrace[i + 1];\n if (nextFrame && isFrameFromHbSourceCode(nextFrame)) {\n shift++;\n continue;\n }\n }\n break;\n }\n return shift || exports.DEFAULT_BACKTRACE_SHIFT;\n}\nexports.calculateBacktraceShift = calculateBacktraceShift;\nfunction getCauses(notice, logger) {\n if (notice.cause) {\n var causes = [];\n var cause = notice;\n // @ts-ignore this throws an error if tsconfig.json has strict: true\n while (causes.length < 3 && (cause = cause.cause)) {\n causes.push({\n class: cause.name,\n message: cause.message,\n backtrace: typeof cause.stack == 'string' ? makeBacktrace(cause.stack, false, logger) : null\n });\n }\n return causes;\n }\n return [];\n}\nexports.getCauses = getCauses;\nfunction getSourceForBacktrace(backtrace, getSourceFileHandler) {\n return __awaiter(this, void 0, void 0, function () {\n var result, index, trace, fileContent;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n result = [];\n if (!getSourceFileHandler || !backtrace || !backtrace.length) {\n return [2 /*return*/, result];\n }\n index = 0;\n _a.label = 1;\n case 1:\n if (!backtrace.length) return [3 /*break*/, 3];\n trace = backtrace.splice(0)[index];\n return [4 /*yield*/, getSourceFileHandler(trace.file)];\n case 2:\n fileContent = _a.sent();\n result[index] = getSourceCodeSnippet(fileContent, trace.number);\n index++;\n return [3 /*break*/, 1];\n case 3: return [2 /*return*/, result];\n }\n });\n });\n}\nexports.getSourceForBacktrace = getSourceForBacktrace;\nfunction runBeforeNotifyHandlers(notice, handlers) {\n var results = [];\n var result = true;\n for (var i = 0, len = handlers.length; i < len; i++) {\n var handler = handlers[i];\n var handlerResult = handler(notice);\n if (handlerResult === false) {\n result = false;\n }\n results.push(handlerResult);\n }\n return {\n results: results,\n result: result\n };\n}\nexports.runBeforeNotifyHandlers = runBeforeNotifyHandlers;\nfunction runAfterNotifyHandlers(notice, handlers, error) {\n if (notice && notice.afterNotify) {\n notice.afterNotify(error, notice);\n }\n for (var i = 0, len = handlers.length; i < len; i++) {\n handlers[i](error, notice);\n }\n return true;\n}\nexports.runAfterNotifyHandlers = runAfterNotifyHandlers;\n// Returns a new object with properties from other object.\nfunction shallowClone(obj) {\n if (typeof (obj) !== 'object' || obj === null) {\n return {};\n }\n var result = {};\n for (var k in obj) {\n result[k] = obj[k];\n }\n return result;\n}\nexports.shallowClone = shallowClone;\nfunction sanitize(obj, maxDepth) {\n if (maxDepth === void 0) { maxDepth = 8; }\n var seenObjects = [];\n function seen(obj) {\n if (!obj || typeof (obj) !== 'object') {\n return false;\n }\n for (var i = 0; i < seenObjects.length; i++) {\n var value = seenObjects[i];\n if (value === obj) {\n return true;\n }\n }\n seenObjects.push(obj);\n return false;\n }\n function canSerialize(obj) {\n var typeOfObj = typeof obj;\n // Functions are TMI\n if (/function/.test(typeOfObj)) {\n // Let special toJSON method pass as it's used by JSON.stringify (#722)\n return obj.name === 'toJSON';\n }\n // Symbols can't convert to strings.\n if (/symbol/.test(typeOfObj)) {\n return false;\n }\n if (obj === null) {\n return false;\n }\n // No prototype, likely created with `Object.create(null)`.\n if (typeof obj === 'object' && typeof obj.hasOwnProperty === 'undefined') {\n return false;\n }\n return true;\n }\n function serialize(obj, depth) {\n if (depth === void 0) { depth = 0; }\n if (depth >= maxDepth) {\n return '[DEPTH]';\n }\n // Inspect invalid types\n if (!canSerialize(obj)) {\n return Object.prototype.toString.call(obj);\n }\n // Halt circular references\n if (seen(obj)) {\n return '[RECURSION]';\n }\n // Serialize inside arrays\n if (Array.isArray(obj)) {\n return obj.map(function (o) { return safeSerialize(o, depth + 1); });\n }\n // Serialize inside objects\n if (typeof (obj) === 'object') {\n var ret = {};\n for (var k in obj) {\n var v = obj[k];\n if (Object.prototype.hasOwnProperty.call(obj, k) && (k != null) && (v != null)) {\n ret[k] = safeSerialize(v, depth + 1);\n }\n }\n return ret;\n }\n // Return everything else untouched\n return obj;\n }\n function safeSerialize(obj, depth) {\n if (depth === void 0) { depth = 0; }\n try {\n return serialize(obj, depth);\n }\n catch (e) {\n return \"[ERROR] \".concat(e);\n }\n }\n return safeSerialize(obj);\n}\nexports.sanitize = sanitize;\nfunction logger(client) {\n var log = function (method) {\n return function () {\n var _a;\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (method === 'debug') {\n if (!client.config.debug) {\n return;\n }\n // Log at default level so that you don't need to also enable verbose\n // logging in Chrome.\n method = 'log';\n }\n args.unshift('[Honeybadger]');\n (_a = client.config.logger)[method].apply(_a, args);\n };\n };\n return {\n log: log('log'),\n info: log('info'),\n debug: log('debug'),\n warn: log('warn'),\n error: log('error')\n };\n}\nexports.logger = logger;\n/**\n * Converts any object into a notice object (which at minimum has the same\n * properties as Error, but supports additional Honeybadger properties.)\n */\nfunction makeNotice(thing) {\n var notice;\n if (!thing) {\n notice = {};\n }\n else if (isErrorObject(thing)) {\n var e = thing;\n notice = merge(thing, { name: e.name, message: e.message, stack: e.stack, cause: e.cause });\n }\n else if (typeof thing === 'object') {\n notice = shallowClone(thing);\n }\n else {\n var m = String(thing);\n notice = { message: m };\n }\n return notice;\n}\nexports.makeNotice = makeNotice;\nfunction isErrorObject(thing) {\n return thing instanceof Error\n || Object.prototype.toString.call(thing) === '[object Error]'; // Important for cross-realm objects\n}\nexports.isErrorObject = isErrorObject;\n/**\n * Instrument an existing function inside an object (usually global).\n * @param {!Object} object\n * @param {!String} name\n * @param {!Function} replacement\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction instrument(object, name, replacement) {\n if (!object || !name || !replacement || !(name in object)) {\n return;\n }\n try {\n var original = object[name];\n while (original && original.__hb_original) {\n original = original.__hb_original;\n }\n object[name] = replacement(original);\n object[name].__hb_original = original;\n }\n catch (_e) {\n // Ignores errors where \"original\" is a restricted object (see #1001)\n // Uncaught Error: Permission denied to access property \"__hb_original\"\n // Also ignores:\n // Error: TypeError: Cannot set property onunhandledrejection of [object Object] which has only a getter\n // User-Agent: Mozilla/5.0 (Linux; Android 10; SAMSUNG SM-G960F) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/12.1 Chrome/79.0.3945.136 Mobile Safari/537.36\n }\n}\nexports.instrument = instrument;\nvar _consoleAlreadyInstrumented = false;\nvar listeners = [];\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction instrumentConsole(_window, handler) {\n if (!_window || !_window.console || !handler) {\n return;\n }\n listeners.push(handler);\n if (_consoleAlreadyInstrumented) {\n return;\n }\n _consoleAlreadyInstrumented = true;\n ['debug', 'info', 'warn', 'error', 'log'].forEach(function (level) {\n instrument(_window.console, level, function hbLogger(original) {\n return function () {\n var args = Array.prototype.slice.call(arguments);\n listeners.forEach(function (listener) {\n try {\n listener(level, args);\n }\n catch (_e) {\n // ignore\n // should never reach here because instrument method already wraps with try/catch block\n }\n });\n if (typeof original === 'function') {\n Function.prototype.apply.call(original, _window.console, arguments);\n }\n };\n });\n });\n}\nexports.instrumentConsole = instrumentConsole;\nfunction endpoint(base, path) {\n var endpoint = base.trim().replace(/\\/$/, '');\n path = path.trim().replace(/(^\\/|\\/$)/g, '');\n return \"\".concat(endpoint, \"/\").concat(path);\n}\nexports.endpoint = endpoint;\nfunction generateStackTrace() {\n try {\n throw new Error('');\n }\n catch (e) {\n if (e.stack) {\n return e.stack;\n }\n }\n var maxStackSize = 10;\n var stack = [];\n var curr = arguments.callee;\n while (curr && stack.length < maxStackSize) {\n if (/function(?:\\s+([\\w$]+))+\\s*\\(/.test(curr.toString())) {\n stack.push(RegExp.$1 || '');\n }\n else {\n stack.push('');\n }\n try {\n curr = curr.caller;\n }\n catch (e) {\n break;\n }\n }\n return stack.join('\\n');\n}\nexports.generateStackTrace = generateStackTrace;\nfunction filter(obj, filters) {\n if (!is('Object', obj)) {\n return;\n }\n if (!is('Array', filters)) {\n filters = [];\n }\n var seen = [];\n function filter(obj) {\n var k, newObj;\n if (is('Object', obj) || is('Array', obj)) {\n if (seen.indexOf(obj) !== -1) {\n return '[CIRCULAR DATA STRUCTURE]';\n }\n seen.push(obj);\n }\n if (is('Object', obj)) {\n newObj = {};\n for (k in obj) {\n if (filterMatch(k, filters)) {\n newObj[k] = '[FILTERED]';\n }\n else {\n newObj[k] = filter(obj[k]);\n }\n }\n return newObj;\n }\n if (is('Array', obj)) {\n return obj.map(function (v) {\n return filter(v);\n });\n }\n if (is('Function', obj)) {\n return '[FUNC]';\n }\n return obj;\n }\n return filter(obj);\n}\nexports.filter = filter;\nfunction filterMatch(key, filters) {\n for (var i = 0; i < filters.length; i++) {\n if (key.toLowerCase().indexOf(filters[i].toLowerCase()) !== -1) {\n return true;\n }\n }\n return false;\n}\nfunction is(type, obj) {\n var klass = Object.prototype.toString.call(obj).slice(8, -1);\n return obj !== undefined && obj !== null && klass === type;\n}\nfunction filterUrl(url, filters) {\n if (!filters) {\n return url;\n }\n if (typeof url !== 'string') {\n return url;\n }\n var query = url.split(/\\?/, 2)[1];\n if (!query) {\n return url;\n }\n var result = url;\n query.split(/[&]\\s?/).forEach(function (pair) {\n var _a = pair.split('=', 2), key = _a[0], value = _a[1];\n if (filterMatch(key, filters)) {\n result = result.replace(\"\".concat(key, \"=\").concat(value), \"\".concat(key, \"=[FILTERED]\"));\n }\n });\n return result;\n}\nexports.filterUrl = filterUrl;\nfunction formatCGIData(vars, prefix) {\n if (prefix === void 0) { prefix = ''; }\n var formattedVars = {};\n Object.keys(vars).forEach(function (key) {\n var formattedKey = prefix + key.replace(/\\W/g, '_').toUpperCase();\n formattedVars[formattedKey] = vars[key];\n });\n return formattedVars;\n}\nexports.formatCGIData = formatCGIData;\nfunction clone(obj) {\n return JSON.parse(JSON.stringify(obj));\n}\nexports.clone = clone;\nfunction getSourceCodeSnippet(fileData, lineNumber, sourceRadius) {\n if (sourceRadius === void 0) { sourceRadius = 2; }\n if (!fileData) {\n return null;\n }\n var lines = fileData.split('\\n');\n // add one empty line because array index starts from 0, but error line number is counted from 1\n lines.unshift('');\n var start = lineNumber - sourceRadius;\n var end = lineNumber + sourceRadius;\n var result = {};\n for (var i = start; i <= end; i++) {\n var line = lines[i];\n if (typeof line === 'string') {\n result[i] = line;\n }\n }\n return result;\n}\nfunction isBrowserConfig(config) {\n return config.async !== undefined;\n}\nexports.isBrowserConfig = isBrowserConfig;\n/** globalThis has fairly good support. But just in case, lets check its defined.\n * @see {https://caniuse.com/?search=globalThis}\n */\nfunction globalThisOrWindow() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n return window;\n}\nexports.globalThisOrWindow = globalThisOrWindow;\nvar _deprecatedMethodCalls = {};\n/**\n * Logs a deprecation warning, every X calls to the method.\n */\nfunction logDeprecatedMethod(logger, oldMethod, newMethod, callCountThreshold) {\n if (callCountThreshold === void 0) { callCountThreshold = 100; }\n var key = \"\".concat(oldMethod, \"-\").concat(newMethod);\n if (typeof _deprecatedMethodCalls[key] === 'undefined') {\n _deprecatedMethodCalls[key] = 0;\n }\n if (_deprecatedMethodCalls[key] % callCountThreshold !== 0) {\n _deprecatedMethodCalls[key]++;\n return;\n }\n var msg = \"Deprecation warning: \".concat(oldMethod, \" has been deprecated; please use \").concat(newMethod, \" instead.\");\n logger.warn(msg);\n _deprecatedMethodCalls[key]++;\n}\nexports.logDeprecatedMethod = logDeprecatedMethod;\n//# sourceMappingURL=util.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar util_1 = require(\"../util\");\nfunction default_1(_window) {\n if (_window === void 0) { _window = (0, util_1.globalThisOrWindow)(); }\n return {\n shouldReloadOnConfigure: false,\n load: function (client) {\n function sendEventsToInsights() {\n return client.config.eventsEnabled;\n }\n if (!sendEventsToInsights()) {\n return;\n }\n (0, util_1.instrumentConsole)(_window, function (level, args) {\n if (!sendEventsToInsights()) {\n return;\n }\n if (args.length === 0) {\n return;\n }\n var data = {\n severity: level,\n };\n if (typeof args[0] === 'string') {\n data.message = args[0];\n data.args = args.slice(1);\n }\n else {\n data.args = args;\n }\n client.event('log', data);\n });\n }\n };\n}\nexports.default = default_1;\n//# sourceMappingURL=events.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.GlobalStore = void 0;\nvar util_1 = require(\"./util\");\nvar GlobalStore = /** @class */ (function () {\n function GlobalStore(contents, breadcrumbsLimit) {\n this.contents = contents;\n this.breadcrumbsLimit = breadcrumbsLimit;\n }\n GlobalStore.create = function (contents, breadcrumbsLimit) {\n return new GlobalStore(contents, breadcrumbsLimit);\n };\n GlobalStore.prototype.available = function () {\n return true;\n };\n GlobalStore.prototype.getContents = function (key) {\n var value = key ? this.contents[key] : this.contents;\n return JSON.parse(JSON.stringify(value));\n };\n GlobalStore.prototype.setContext = function (context) {\n this.contents.context = (0, util_1.merge)(this.contents.context, context || {});\n };\n GlobalStore.prototype.addBreadcrumb = function (breadcrumb) {\n if (this.contents.breadcrumbs.length == this.breadcrumbsLimit) {\n this.contents.breadcrumbs.shift();\n }\n this.contents.breadcrumbs.push(breadcrumb);\n };\n GlobalStore.prototype.clear = function () {\n this.contents.context = {};\n this.contents.breadcrumbs = [];\n };\n GlobalStore.prototype.run = function (callback) {\n return callback();\n };\n return GlobalStore;\n}());\nexports.GlobalStore = GlobalStore;\n//# sourceMappingURL=store.js.map", "export class NdJson {\n static parse(data) {\n const lines = data.trim().split('\\n');\n return lines.map(line => JSON.parse(line));\n }\n static stringify(data) {\n return data.map(item => JSON.stringify(item)).join('\\n');\n }\n}\n", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.CONFIG = void 0;\nexports.CONFIG = {\n apiKey: null,\n endpoint: 'https://api.honeybadger.io',\n environment: null,\n hostname: null,\n projectRoot: null,\n component: null,\n action: null,\n revision: null,\n reportData: null,\n breadcrumbsEnabled: true,\n // we could decide the value of eventsEnabled based on `env` and `developmentEnvironments`\n eventsEnabled: false,\n maxBreadcrumbs: 40,\n maxObjectDepth: 8,\n logger: console,\n developmentEnvironments: ['dev', 'development', 'test'],\n debug: false,\n tags: null,\n enableUncaught: true,\n enableUnhandledRejection: true,\n afterUncaught: function () { return true; },\n filters: ['creditcard', 'password'],\n __plugins: [],\n};\n//# sourceMappingURL=defaults.js.map", "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ThrottledEventsLogger = void 0;\nvar json_nd_1 = require(\"json-nd\");\nvar util_1 = require(\"./util\");\nvar defaults_1 = require(\"./defaults\");\nvar ThrottledEventsLogger = /** @class */ (function () {\n function ThrottledEventsLogger(config, transport) {\n this.config = config;\n this.transport = transport;\n this.queue = [];\n this.isProcessing = false;\n this.config = __assign(__assign({}, defaults_1.CONFIG), config);\n this.logger = this.originalLogger();\n }\n ThrottledEventsLogger.prototype.configure = function (opts) {\n for (var k in opts) {\n this.config[k] = opts[k];\n }\n };\n ThrottledEventsLogger.prototype.log = function (payload) {\n this.queue.push(payload);\n if (!this.isProcessing) {\n this.processQueue();\n }\n };\n ThrottledEventsLogger.prototype.processQueue = function () {\n var _this = this;\n if (this.queue.length === 0 || this.isProcessing) {\n return;\n }\n this.isProcessing = true;\n var eventsData = this.queue.slice();\n this.queue = [];\n var data = json_nd_1.NdJson.stringify(eventsData);\n this.makeHttpRequest(data)\n .then(function () {\n setTimeout(function () {\n _this.isProcessing = false;\n _this.processQueue();\n }, 50);\n })\n .catch(function (error) {\n _this.logger.error('[Honeybadger] Error making HTTP request:', error);\n // Continue processing the queue even if there's an error\n setTimeout(function () {\n _this.isProcessing = false;\n _this.processQueue();\n }, 50);\n });\n };\n ThrottledEventsLogger.prototype.makeHttpRequest = function (data) {\n return __awaiter(this, void 0, void 0, function () {\n var _this = this;\n return __generator(this, function (_a) {\n return [2 /*return*/, this.transport\n .send({\n headers: {\n 'X-API-Key': this.config.apiKey,\n 'Content-Type': 'application/json',\n },\n method: 'POST',\n endpoint: (0, util_1.endpoint)(this.config.endpoint, '/v1/events'),\n maxObjectDepth: this.config.maxObjectDepth,\n logger: this.logger,\n }, data)\n .then(function () {\n if (_this.config.debug) {\n _this.logger.debug('[Honeybadger] Events sent successfully');\n }\n })\n .catch(function (err) {\n _this.logger.error(\"[Honeybadger] Error sending events: \".concat(err.message));\n })];\n });\n });\n };\n /**\n * todo: improve this\n *\n * The EventsLogger overrides the console methods to enable automatic instrumentation\n * of console logs to the Honeybadger API.\n * So if we want to log something in here we need to use the original methods.\n */\n ThrottledEventsLogger.prototype.originalLogger = function () {\n var _a, _b, _c, _d, _e;\n return {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n log: (_a = console.log.__hb_original) !== null && _a !== void 0 ? _a : console.log,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n info: (_b = console.info.__hb_original) !== null && _b !== void 0 ? _b : console.info,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n debug: (_c = console.debug.__hb_original) !== null && _c !== void 0 ? _c : console.debug,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n warn: (_d = console.warn.__hb_original) !== null && _d !== void 0 ? _d : console.warn,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n error: (_e = console.error.__hb_original) !== null && _e !== void 0 ? _e : console.error,\n };\n };\n return ThrottledEventsLogger;\n}());\nexports.ThrottledEventsLogger = ThrottledEventsLogger;\n//# sourceMappingURL=throttled_events_logger.js.map", "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Client = void 0;\nvar util_1 = require(\"./util\");\nvar store_1 = require(\"./store\");\nvar throttled_events_logger_1 = require(\"./throttled_events_logger\");\nvar defaults_1 = require(\"./defaults\");\n// Split at commas and spaces\nvar TAG_SEPARATOR = /,|\\s+/;\n// Checks for non-blank characters\nvar NOT_BLANK = /\\S/;\nvar Client = /** @class */ (function () {\n function Client(opts, transport) {\n if (opts === void 0) { opts = {}; }\n this.__pluginsLoaded = false;\n this.__store = null;\n this.__beforeNotifyHandlers = [];\n this.__afterNotifyHandlers = [];\n this.__notifier = {\n name: '@honeybadger-io/core',\n url: 'https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/core',\n version: '__VERSION__'\n };\n this.config = __assign(__assign({}, defaults_1.CONFIG), opts);\n this.__initStore();\n this.__transport = transport;\n this.__eventsLogger = new throttled_events_logger_1.ThrottledEventsLogger(this.config, this.__transport);\n this.logger = (0, util_1.logger)(this);\n }\n Client.prototype.getVersion = function () {\n return this.__notifier.version;\n };\n Client.prototype.getNotifier = function () {\n return this.__notifier;\n };\n /**\n * CAREFUL: When adding a new notifier or updating the name of an existing notifier,\n * the Honeybadger rails project may need its mappings updated.\n * See https://github.com/honeybadger-io/honeybadger/blob/master/app/presenters/breadcrumbs_presenter.rb\n * https://github.com/honeybadger-io/honeybadger/blob/master/app/models/parser/java_script.rb\n * https://github.com/honeybadger-io/honeybadger/blob/master/app/models/language.rb\n **/\n Client.prototype.setNotifier = function (notifier) {\n this.__notifier = notifier;\n };\n Client.prototype.configure = function (opts) {\n if (opts === void 0) { opts = {}; }\n for (var k in opts) {\n this.config[k] = opts[k];\n }\n this.__eventsLogger.configure(this.config);\n this.loadPlugins();\n return this;\n };\n Client.prototype.loadPlugins = function () {\n var _this = this;\n var pluginsToLoad = this.__pluginsLoaded\n ? this.config.__plugins.filter(function (plugin) { return plugin.shouldReloadOnConfigure; })\n : this.config.__plugins;\n pluginsToLoad.forEach(function (plugin) { return plugin.load(_this); });\n this.__pluginsLoaded = true;\n };\n Client.prototype.__initStore = function () {\n this.__store = new store_1.GlobalStore({ context: {}, breadcrumbs: [] }, this.config.maxBreadcrumbs);\n };\n Client.prototype.beforeNotify = function (handler) {\n this.__beforeNotifyHandlers.push(handler);\n return this;\n };\n Client.prototype.afterNotify = function (handler) {\n this.__afterNotifyHandlers.push(handler);\n return this;\n };\n Client.prototype.setContext = function (context) {\n if (typeof context === 'object' && context != null) {\n this.__store.setContext(context);\n }\n return this;\n };\n Client.prototype.resetContext = function (context) {\n this.logger.warn('Deprecation warning: `Honeybadger.resetContext()` has been deprecated; please use `Honeybadger.clear()` instead.');\n this.__store.clear();\n if (typeof context === 'object' && context !== null) {\n this.__store.setContext(context);\n }\n return this;\n };\n Client.prototype.clear = function () {\n this.__store.clear();\n return this;\n };\n Client.prototype.notify = function (noticeable, name, extra) {\n var _this = this;\n if (name === void 0) { name = undefined; }\n if (extra === void 0) { extra = undefined; }\n var notice = this.makeNotice(noticeable, name, extra);\n // we need to have the source file data before the beforeNotifyHandlers,\n // in case they modify them\n var sourceCodeData = notice && notice.backtrace ? notice.backtrace.map(function (trace) { return (0, util_1.shallowClone)(trace); }) : null;\n var preConditionsResult = this.__runPreconditions(notice);\n if (preConditionsResult instanceof Error) {\n (0, util_1.runAfterNotifyHandlers)(notice, this.__afterNotifyHandlers, preConditionsResult);\n return false;\n }\n if (preConditionsResult instanceof Promise) {\n preConditionsResult.then(function (result) {\n if (result instanceof Error) {\n (0, util_1.runAfterNotifyHandlers)(notice, _this.__afterNotifyHandlers, result);\n return false;\n }\n return _this.__send(notice, sourceCodeData);\n });\n return true;\n }\n this.__send(notice, sourceCodeData).catch(function (_err) { });\n return true;\n };\n /**\n * An async version of {@link notify} that resolves only after the notice has been reported to Honeybadger.\n * Implemented using the {@link afterNotify} hook.\n * Rejects if for any reason the report failed to be reported.\n * Useful in serverless environments (AWS Lambda).\n */\n Client.prototype.notifyAsync = function (noticeable, name, extra) {\n var _this = this;\n if (name === void 0) { name = undefined; }\n if (extra === void 0) { extra = undefined; }\n return new Promise(function (resolve, reject) {\n var applyAfterNotify = function (partialNotice) {\n var originalAfterNotify = partialNotice.afterNotify;\n partialNotice.afterNotify = function (err) {\n originalAfterNotify === null || originalAfterNotify === void 0 ? void 0 : originalAfterNotify.call(_this, err);\n if (err) {\n return reject(err);\n }\n resolve();\n };\n };\n // We have to respect any afterNotify hooks that come from the arguments\n var objectToOverride;\n if (noticeable.afterNotify) {\n objectToOverride = noticeable;\n }\n else if (name && name.afterNotify) {\n objectToOverride = name;\n }\n else if (extra && extra.afterNotify) {\n objectToOverride = extra;\n }\n else if (name && typeof name === 'object') {\n objectToOverride = name;\n }\n else if (extra) {\n objectToOverride = extra;\n }\n else {\n objectToOverride = name = {};\n }\n applyAfterNotify(objectToOverride);\n _this.notify(noticeable, name, extra);\n });\n };\n Client.prototype.makeNotice = function (noticeable, name, extra) {\n if (name === void 0) { name = undefined; }\n if (extra === void 0) { extra = undefined; }\n var notice = (0, util_1.makeNotice)(noticeable);\n if (name && !(typeof name === 'object')) {\n var n = String(name);\n name = { name: n };\n }\n if (name) {\n notice = (0, util_1.mergeNotice)(notice, name);\n }\n if (typeof extra === 'object' && extra !== null) {\n notice = (0, util_1.mergeNotice)(notice, extra);\n }\n if ((0, util_1.objectIsEmpty)(notice)) {\n return null;\n }\n var context = this.__store.getContents('context');\n var noticeTags = this.__constructTags(notice.tags);\n var contextTags = this.__constructTags(context['tags']);\n var configTags = this.__constructTags(this.config.tags);\n // Turning into a Set will remove duplicates\n var tags = noticeTags.concat(contextTags).concat(configTags);\n var uniqueTags = tags.filter(function (item, index) { return tags.indexOf(item) === index; });\n notice = (0, util_1.merge)(notice, {\n name: notice.name || 'Error',\n context: (0, util_1.merge)(context, notice.context),\n projectRoot: notice.projectRoot || this.config.projectRoot,\n environment: notice.environment || this.config.environment,\n component: notice.component || this.config.component,\n action: notice.action || this.config.action,\n revision: notice.revision || this.config.revision,\n tags: uniqueTags,\n });\n // If we're passed a custom backtrace array, use it\n // Otherwise we make one.\n if (!Array.isArray(notice.backtrace) || !notice.backtrace.length) {\n if (typeof notice.stack !== 'string' || !notice.stack.trim()) {\n notice.stack = (0, util_1.generateStackTrace)();\n notice.backtrace = (0, util_1.makeBacktrace)(notice.stack, true, this.logger);\n }\n else {\n notice.backtrace = (0, util_1.makeBacktrace)(notice.stack, false, this.logger);\n }\n }\n return notice;\n };\n Client.prototype.addBreadcrumb = function (message, opts) {\n if (!this.config.breadcrumbsEnabled) {\n return;\n }\n opts = opts || {};\n var metadata = (0, util_1.shallowClone)(opts.metadata);\n var category = opts.category || 'custom';\n var timestamp = new Date().toISOString();\n this.__store.addBreadcrumb({\n category: category,\n message: message,\n metadata: metadata,\n timestamp: timestamp\n });\n return this;\n };\n /**\n * @deprecated Use {@link event} instead.\n */\n Client.prototype.logEvent = function (data) {\n (0, util_1.logDeprecatedMethod)(this.logger, 'Honeybadger.logEvent', 'Honeybadger.event');\n this.event('log', data);\n };\n Client.prototype.event = function (type, data) {\n var _a;\n if (typeof type === 'object') {\n data = type;\n type = (_a = type['event_type']) !== null && _a !== void 0 ? _a : undefined;\n }\n this.__eventsLogger.log(__assign({ event_type: type, ts: new Date().toISOString() }, data));\n };\n Client.prototype.__getBreadcrumbs = function () {\n return this.__store.getContents('breadcrumbs').slice();\n };\n Client.prototype.__getContext = function () {\n return this.__store.getContents('context');\n };\n Client.prototype.__developmentMode = function () {\n if (this.config.reportData === true) {\n return false;\n }\n return (this.config.environment && this.config.developmentEnvironments.includes(this.config.environment));\n };\n Client.prototype.__buildPayload = function (notice) {\n var headers = (0, util_1.filter)(notice.headers, this.config.filters) || {};\n var cgiData = (0, util_1.filter)(__assign(__assign({}, notice.cgiData), (0, util_1.formatCGIData)(headers, 'HTTP_')), this.config.filters);\n return {\n notifier: this.__notifier,\n breadcrumbs: {\n enabled: !!this.config.breadcrumbsEnabled,\n trail: notice.__breadcrumbs || []\n },\n error: {\n class: notice.name,\n message: notice.message,\n backtrace: notice.backtrace,\n fingerprint: notice.fingerprint,\n tags: notice.tags,\n causes: (0, util_1.getCauses)(notice, this.logger),\n },\n request: {\n url: (0, util_1.filterUrl)(notice.url, this.config.filters),\n component: notice.component,\n action: notice.action,\n context: notice.context,\n cgi_data: cgiData,\n params: (0, util_1.filter)(notice.params, this.config.filters) || {},\n session: (0, util_1.filter)(notice.session, this.config.filters) || {}\n },\n server: {\n project_root: notice.projectRoot,\n environment_name: notice.environment,\n revision: notice.revision,\n hostname: this.config.hostname,\n time: new Date().toUTCString()\n },\n details: notice.details || {}\n };\n };\n Client.prototype.__constructTags = function (tags) {\n if (!tags) {\n return [];\n }\n return tags.toString().split(TAG_SEPARATOR).filter(function (tag) { return NOT_BLANK.test(tag); });\n };\n Client.prototype.__runPreconditions = function (notice) {\n var _this = this;\n var preConditionError = null;\n if (!notice) {\n this.logger.debug('failed to build error report');\n preConditionError = new Error('failed to build error report');\n }\n if (this.config.reportData === false) {\n this.logger.debug('skipping error report: honeybadger.js is disabled', notice);\n preConditionError = new Error('honeybadger.js is disabled');\n }\n if (this.__developmentMode()) {\n this.logger.log('honeybadger.js is in development mode; the following error report will be sent in production.', notice);\n preConditionError = new Error('honeybadger.js is in development mode');\n }\n if (!this.config.apiKey) {\n this.logger.warn('could not send error report: no API key has been configured', notice);\n preConditionError = new Error('missing API key');\n }\n var beforeNotifyResult = (0, util_1.runBeforeNotifyHandlers)(notice, this.__beforeNotifyHandlers);\n if (!preConditionError && !beforeNotifyResult.result) {\n this.logger.debug('skipping error report: one or more beforeNotify handlers returned false', notice);\n preConditionError = new Error('beforeNotify handlers returned false');\n }\n if (beforeNotifyResult.results.length && beforeNotifyResult.results.some(function (result) { return result instanceof Promise; })) {\n return Promise.allSettled(beforeNotifyResult.results)\n .then(function (results) {\n if (!preConditionError && (results.some(function (result) { return result.status === 'rejected' || result.value === false; }))) {\n _this.logger.debug('skipping error report: one or more beforeNotify handlers returned false', notice);\n preConditionError = new Error('beforeNotify handlers (async) returned false');\n }\n if (preConditionError) {\n return preConditionError;\n }\n });\n }\n return preConditionError;\n };\n Client.prototype.__send = function (notice, originalBacktrace) {\n var _this = this;\n if (this.config.breadcrumbsEnabled) {\n this.addBreadcrumb('Honeybadger Notice', {\n category: 'notice',\n metadata: {\n message: notice.message,\n name: notice.name,\n stack: notice.stack\n }\n });\n notice.__breadcrumbs = this.__store.getContents('breadcrumbs');\n }\n else {\n notice.__breadcrumbs = [];\n }\n return (0, util_1.getSourceForBacktrace)(originalBacktrace, this.__getSourceFileHandler)\n .then(function (sourcePerTrace) { return __awaiter(_this, void 0, void 0, function () {\n var payload;\n return __generator(this, function (_a) {\n sourcePerTrace.forEach(function (source, index) {\n notice.backtrace[index].source = source;\n });\n payload = this.__buildPayload(notice);\n return [2 /*return*/, this.__transport\n .send({\n headers: {\n 'X-API-Key': this.config.apiKey,\n 'Content-Type': 'application/json',\n 'Accept': 'text/json, application/json'\n },\n method: 'POST',\n endpoint: (0, util_1.endpoint)(this.config.endpoint, '/v1/notices/js'),\n maxObjectDepth: this.config.maxObjectDepth,\n logger: this.logger,\n }, payload)];\n });\n }); })\n .then(function (res) {\n if (res.statusCode !== 201) {\n (0, util_1.runAfterNotifyHandlers)(notice, _this.__afterNotifyHandlers, new Error(\"Bad HTTP response: \".concat(res.statusCode)));\n _this.logger.warn(\"Error report failed: unknown response from server. code=\".concat(res.statusCode));\n return false;\n }\n var uuid = JSON.parse(res.body).id;\n (0, util_1.runAfterNotifyHandlers)((0, util_1.merge)(notice, {\n id: uuid\n }), _this.__afterNotifyHandlers);\n _this.logger.info(\"Error report sent \\u26A1 https://app.honeybadger.io/notice/\".concat(uuid));\n return true;\n })\n .catch(function (err) {\n _this.logger.error('Error report failed: an unknown error occurred.', \"message=\".concat(err.message));\n (0, util_1.runAfterNotifyHandlers)(notice, _this.__afterNotifyHandlers, err);\n return false;\n });\n };\n return Client;\n}());\nexports.Client = Client;\n//# sourceMappingURL=client.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n//# sourceMappingURL=types.js.map", "\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Plugins = exports.Util = exports.Types = exports.Client = void 0;\nvar events_1 = __importDefault(require(\"./plugins/events\"));\nvar client_1 = require(\"./client\");\nObject.defineProperty(exports, \"Client\", { enumerable: true, get: function () { return client_1.Client; } });\n__exportStar(require(\"./store\"), exports);\nexports.Types = __importStar(require(\"./types\"));\nexports.Util = __importStar(require(\"./util\"));\nexports.Plugins = {\n events: events_1.default\n};\n//# sourceMappingURL=index.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.preferCatch = exports.encodeCookie = exports.decodeCookie = exports.localURLPathname = exports.parseURL = exports.nativeFetch = exports.stringTextOfElement = exports.stringSelectorOfElement = exports.stringNameOfElement = void 0;\nvar core_1 = require(\"@honeybadger-io/core\");\nvar globalThisOrWindow = core_1.Util.globalThisOrWindow;\n/**\n * Converts an HTMLElement into a human-readable string.\n * @param {!HTMLElement} element\n * @return {string}\n */\nfunction stringNameOfElement(element) {\n if (!element || !element.tagName) {\n return '';\n }\n var name = element.tagName.toLowerCase();\n // Ignore the root element in selectors and events.\n if (name === 'html') {\n return '';\n }\n if (element.id) {\n name += \"#\".concat(element.id);\n }\n var stringClassNames = element.getAttribute('class');\n if (stringClassNames) {\n stringClassNames.split(/\\s+/).forEach(function (className) {\n name += \".\".concat(className);\n });\n }\n ['alt', 'name', 'title', 'type'].forEach(function (attrName) {\n var attr = element.getAttribute(attrName);\n if (attr) {\n name += \"[\".concat(attrName, \"=\\\"\").concat(attr, \"\\\"]\");\n }\n });\n var siblings = getSiblings(element);\n if (siblings.length > 1) {\n name += \":nth-child(\".concat(Array.prototype.indexOf.call(siblings, element) + 1, \")\");\n }\n return name;\n}\nexports.stringNameOfElement = stringNameOfElement;\nfunction stringSelectorOfElement(element) {\n var name = stringNameOfElement(element);\n if (element.parentNode && element.parentNode.tagName) {\n var parentName = stringSelectorOfElement(element.parentNode);\n if (parentName.length > 0) {\n return \"\".concat(parentName, \" > \").concat(name);\n }\n }\n return name;\n}\nexports.stringSelectorOfElement = stringSelectorOfElement;\nfunction stringTextOfElement(element) {\n var text = element.textContent || element.innerText || '';\n if (!text && (element.type === 'submit' || element.type === 'button')) {\n text = element.value;\n }\n return truncate(text.trim(), 300);\n}\nexports.stringTextOfElement = stringTextOfElement;\nfunction nativeFetch() {\n var global = globalThisOrWindow();\n if (!global.fetch) {\n return false;\n }\n if (isNative(global.fetch)) {\n return true;\n }\n if (typeof document === 'undefined') {\n return false;\n }\n // If fetch isn't native, it may be wrapped by someone else. Try to get\n // a pristine function from an iframe.\n try {\n var sandbox = document.createElement('iframe');\n sandbox.style.display = 'none';\n document.head.appendChild(sandbox);\n var result = sandbox.contentWindow.fetch && isNative(sandbox.contentWindow.fetch);\n document.head.removeChild(sandbox);\n return result;\n }\n catch (err) {\n if (console && console.warn) {\n console.warn('failed to detect native fetch via iframe: ' + err);\n }\n }\n return false;\n}\nexports.nativeFetch = nativeFetch;\nfunction isNative(func) {\n return func.toString().indexOf('native') !== -1;\n}\nfunction parseURL(url) {\n // Regexp: https://tools.ietf.org/html/rfc3986#appendix-B\n var match = url.match(/^(([^:/?#]+):)?(\\/\\/([^/?#]*))?([^?#]*)(\\?([^#]*))?(#(.*))?$/) || {};\n return {\n protocol: match[2],\n host: match[4],\n pathname: match[5]\n };\n}\nexports.parseURL = parseURL;\nfunction localURLPathname(url) {\n var parsed = parseURL(url);\n var parsedDocURL = parseURL(document.URL);\n // URL must be relative\n if (!parsed.host || !parsed.protocol) {\n return parsed.pathname;\n }\n // Same domain\n if (parsed.protocol === parsedDocURL.protocol && parsed.host === parsedDocURL.host) {\n return parsed.pathname;\n }\n // x-domain\n return \"\".concat(parsed.protocol, \"://\").concat(parsed.host).concat(parsed.pathname);\n}\nexports.localURLPathname = localURLPathname;\nfunction decodeCookie(string) {\n var result = {};\n string.split(/[;,]\\s?/).forEach(function (pair) {\n var _a = pair.split('=', 2), key = _a[0], value = _a[1];\n result[key] = value;\n });\n return result;\n}\nexports.decodeCookie = decodeCookie;\nfunction encodeCookie(object) {\n if (typeof object !== 'object') {\n return undefined;\n }\n var cookies = [];\n for (var k in object) {\n cookies.push(k + '=' + object[k]);\n }\n return cookies.join(';');\n}\nexports.encodeCookie = encodeCookie;\n// Helpers\nfunction getSiblings(element) {\n try {\n var nodes = element.parentNode.childNodes;\n var siblings_1 = [];\n Array.prototype.forEach.call(nodes, function (node) {\n if (node.tagName && node.tagName === element.tagName) {\n siblings_1.push(node);\n }\n });\n return siblings_1;\n }\n catch (e) {\n return [];\n }\n}\nfunction truncate(string, length) {\n if (string.length > length) {\n string = string.substr(0, length) + '...';\n }\n return string;\n}\n// Used to decide which error handling method to use when wrapping async\n// handlers: try/catch, or `window.onerror`. When available, `window.onerror`\n// will provide more information in modern browsers.\nexports.preferCatch = (function () {\n var preferCatch = true;\n // In case we're in an environment without access to \"window\", lets make sure theres a window.\n if (typeof window === 'undefined')\n return preferCatch;\n // IE < 10\n if (!window.atob) {\n preferCatch = false;\n }\n // Modern browsers support the full ErrorEvent API\n // See https://developer.mozilla.org/en-US/docs/Web/API/ErrorEvent\n if (window.ErrorEvent) {\n try {\n if ((new window.ErrorEvent('')).colno === 0) {\n preferCatch = false;\n }\n // eslint-disable-next-line no-empty\n }\n catch (_e) { }\n }\n return preferCatch;\n})();\n//# sourceMappingURL=util.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.onError = exports.ignoreNextOnError = void 0;\n/* eslint-disable prefer-rest-params */\nvar core_1 = require(\"@honeybadger-io/core\");\nvar instrument = core_1.Util.instrument, makeNotice = core_1.Util.makeNotice, globalThisOrWindow = core_1.Util.globalThisOrWindow;\nvar ignoreOnError = 0;\nvar currentTimeout;\nfunction ignoreNextOnError() {\n ignoreOnError += 1;\n clearTimeout(currentTimeout);\n currentTimeout = setTimeout(function () {\n ignoreOnError = 0;\n });\n}\nexports.ignoreNextOnError = ignoreNextOnError;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction onError(_window) {\n if (_window === void 0) { _window = globalThisOrWindow(); }\n return {\n load: function (client) {\n instrument(_window, 'onerror', function (original) {\n var onerror = function (msg, url, line, col, err) {\n client.logger.debug('window.onerror callback invoked', arguments);\n if (ignoreOnError > 0) {\n client.logger.debug('Ignoring window.onerror (error likely reported earlier)', arguments);\n ignoreOnError -= 1;\n return;\n }\n // See https://developer.mozilla.org/en/docs/Web/API/GlobalEventHandlers/onerror#Notes\n if (line === 0 && /Script error\\.?/.test(msg)) {\n if (client.config.enableUncaught) {\n // Log only if the user wants to report uncaught errors\n client.logger.warn('Ignoring cross-domain script error: enable CORS to track these types of errors', arguments);\n }\n return;\n }\n var notice = makeNotice(err);\n if (!notice.name) {\n notice.name = 'window.onerror';\n }\n if (!notice.message) {\n notice.message = msg;\n }\n if (!notice.stack) {\n // Simulate v8 stack\n notice.stack = [notice.message, '\\n at ? (', url || 'unknown', ':', line || 0, ':', col || 0, ')'].join('');\n }\n client.addBreadcrumb((notice.name === 'window.onerror' || !notice.name) ? 'window.onerror' : \"window.onerror: \".concat(notice.name), {\n category: 'error',\n metadata: {\n name: notice.name,\n message: notice.message,\n stack: notice.stack\n }\n });\n if (client.config.enableUncaught) {\n client.notify(notice);\n }\n };\n return function (msg, url, line, col, err) {\n onerror(msg, url, line, col, err);\n if (typeof original === 'function') {\n return original.apply(_window, arguments);\n }\n return false;\n };\n });\n }\n };\n}\nexports.onError = onError;\n//# sourceMappingURL=onerror.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* eslint-disable prefer-rest-params */\nvar core_1 = require(\"@honeybadger-io/core\");\nvar instrument = core_1.Util.instrument, globalThisOrWindow = core_1.Util.globalThisOrWindow;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction default_1(_window) {\n if (_window === void 0) { _window = globalThisOrWindow(); }\n return {\n load: function (client) {\n if (!client.config.enableUnhandledRejection) {\n return;\n }\n instrument(_window, 'onunhandledrejection', function (original) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/Window/unhandledrejection_event\n function onunhandledrejection(promiseRejectionEvent) {\n var _a;\n client.logger.debug('window.onunhandledrejection callback invoked', arguments);\n if (!client.config.enableUnhandledRejection) {\n return;\n }\n var reason = promiseRejectionEvent.reason;\n if (reason instanceof Error) {\n // simulate v8 stack\n // const fileName = reason.fileName || 'unknown'\n // const lineNumber = reason.lineNumber || 0\n var fileName = 'unknown';\n var lineNumber = 0;\n var stackFallback = \"\".concat(reason.message, \"\\n at ? (\").concat(fileName, \":\").concat(lineNumber, \")\");\n var stack = reason.stack || stackFallback;\n var err = {\n name: reason.name,\n message: \"UnhandledPromiseRejectionWarning: \".concat(reason),\n stack: stack\n };\n client.addBreadcrumb(\"window.onunhandledrejection: \".concat(err.name), {\n category: 'error',\n metadata: err\n });\n client.notify(err);\n return;\n }\n var message = typeof reason === 'string' ? reason : ((_a = JSON.stringify(reason)) !== null && _a !== void 0 ? _a : 'Unspecified reason');\n client.notify({\n name: 'window.onunhandledrejection',\n message: \"UnhandledPromiseRejectionWarning: \".concat(message)\n });\n }\n return function (promiseRejectionEvent) {\n onunhandledrejection(promiseRejectionEvent);\n if (typeof original === 'function') {\n original.apply(this, arguments);\n }\n };\n });\n }\n };\n}\nexports.default = default_1;\n//# sourceMappingURL=onunhandledrejection.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* eslint-disable prefer-rest-params */\nvar core_1 = require(\"@honeybadger-io/core\");\nvar util_1 = require(\"../util\");\nvar sanitize = core_1.Util.sanitize, instrument = core_1.Util.instrument, instrumentConsole = core_1.Util.instrumentConsole, globalThisOrWindow = core_1.Util.globalThisOrWindow;\nfunction default_1(_window) {\n if (_window === void 0) { _window = globalThisOrWindow(); }\n return {\n load: function (client) {\n function breadcrumbsEnabled(type) {\n if (client.config.breadcrumbsEnabled === true) {\n return true;\n }\n if (type) {\n return client.config.breadcrumbsEnabled[type] === true;\n }\n return client.config.breadcrumbsEnabled !== false;\n }\n // Breadcrumbs: instrument console\n (function () {\n if (!breadcrumbsEnabled('console')) {\n return;\n }\n function inspectArray(obj) {\n if (!Array.isArray(obj)) {\n return '';\n }\n return obj.map(function (value) {\n try {\n return String(value);\n }\n catch (e) {\n return '[unknown]';\n }\n }).join(' ');\n }\n instrumentConsole(_window, function (level, args) {\n var message = inspectArray(args);\n var opts = {\n category: 'log',\n metadata: {\n level: level,\n arguments: sanitize(args, 3)\n }\n };\n client.addBreadcrumb(message, opts);\n });\n })();\n // Breadcrumbs: instrument click events\n (function () {\n if (!breadcrumbsEnabled('dom')) {\n return;\n }\n if (typeof _window.addEventListener !== 'function') {\n return;\n }\n _window.addEventListener('click', function (event) {\n var message, selector, text;\n try {\n message = (0, util_1.stringNameOfElement)(event.target);\n selector = (0, util_1.stringSelectorOfElement)(event.target);\n text = (0, util_1.stringTextOfElement)(event.target);\n }\n catch (e) {\n message = 'UI Click';\n selector = '[unknown]';\n text = '[unknown]';\n }\n // There's nothing to display\n if (message.length === 0) {\n return;\n }\n client.addBreadcrumb(message, {\n category: 'ui.click',\n metadata: {\n selector: selector,\n text: text,\n event: event\n }\n });\n }, _window.location ? true : false); // In CloudFlare workers useCapture must be false. window.location is a hacky way to detect it.\n })();\n // Breadcrumbs: instrument XMLHttpRequest\n (function () {\n if (!breadcrumbsEnabled('network')) {\n return;\n }\n // Some environments may not support XMLHttpRequest.\n if (typeof XMLHttpRequest === 'undefined') {\n return;\n }\n // -- On xhr.open: capture initial metadata\n instrument(XMLHttpRequest.prototype, 'open', function (original) {\n return function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n var rawUrl = arguments[1];\n // in case of url being URL object (which is valid input) we need to stringify it\n var url = typeof rawUrl === 'string' ? rawUrl : String(rawUrl);\n var method = typeof arguments[0] === 'string' ? arguments[0].toUpperCase() : arguments[0];\n var message = \"\".concat(method, \" \").concat((0, util_1.localURLPathname)(url));\n this.__hb_xhr = {\n type: 'xhr',\n method: method,\n url: url,\n message: message\n };\n if (typeof original === 'function') {\n original.apply(xhr, arguments);\n }\n };\n });\n // -- On xhr.send: set up xhr.onreadystatechange to report breadcrumb\n instrument(XMLHttpRequest.prototype, 'send', function (original) {\n return function () {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var xhr = this;\n function onreadystatechangeHandler() {\n if (xhr.readyState === 4) {\n var message = void 0;\n if (xhr.__hb_xhr) {\n xhr.__hb_xhr.status_code = xhr.status;\n message = xhr.__hb_xhr.message;\n delete xhr.__hb_xhr.message;\n }\n client.addBreadcrumb(message || 'XMLHttpRequest', {\n category: 'request',\n metadata: xhr.__hb_xhr\n });\n }\n }\n if ('onreadystatechange' in xhr && typeof xhr.onreadystatechange === 'function') {\n instrument(xhr, 'onreadystatechange', function (original) {\n return function () {\n onreadystatechangeHandler();\n if (typeof original === 'function') {\n // eslint-disable-next-line prefer-rest-params\n original.apply(this, arguments);\n }\n };\n });\n }\n else {\n xhr.onreadystatechange = onreadystatechangeHandler;\n }\n if (typeof original === 'function') {\n // eslint-disable-next-line prefer-rest-params\n original.apply(xhr, arguments);\n }\n };\n });\n })();\n // Breadcrumbs: instrument fetch\n (function () {\n if (!breadcrumbsEnabled('network')) {\n return;\n }\n if (!(0, util_1.nativeFetch)()) {\n // Polyfills use XHR.\n return;\n }\n instrument(_window, 'fetch', function (original) {\n return function () {\n // eslint-disable-next-line prefer-rest-params\n var input = arguments[0];\n var method = 'GET';\n var url;\n if (typeof input === 'string') {\n url = input;\n }\n else if ('Request' in _window && input instanceof Request) {\n url = input.url;\n if (input.method) {\n method = input.method;\n }\n }\n else {\n url = String(input);\n }\n if (arguments[1] && arguments[1].method) {\n method = arguments[1].method;\n }\n if (typeof method === 'string') {\n method = method.toUpperCase();\n }\n // localURLPathname cant be constructed for CF workers due to reliance on \"document\".\n var message = \"\".concat(method, \" \").concat(typeof document === 'undefined' ? url : (0, util_1.localURLPathname)(url));\n var metadata = {\n type: 'fetch',\n method: method,\n url: url\n };\n return original\n .apply(this, arguments)\n .then(function (response) {\n metadata['status_code'] = response.status;\n client.addBreadcrumb(message, {\n category: 'request',\n metadata: metadata\n });\n return response;\n })\n .catch(function (error) {\n client.addBreadcrumb('fetch error', {\n category: 'error',\n metadata: metadata\n });\n throw error;\n });\n };\n });\n })();\n // Breadcrumbs: instrument navigation\n (function () {\n if (!breadcrumbsEnabled('navigation')) {\n return;\n }\n if (_window.location == null) {\n // Most likely in a CF worker, we should be listening to fetch requests instead.\n return;\n }\n // The last known href of the current page\n var lastHref = _window.location.href;\n function recordUrlChange(from, to) {\n lastHref = to;\n client.addBreadcrumb('Page changed', {\n category: 'navigation',\n metadata: {\n from: from,\n to: to\n }\n });\n }\n if (typeof addEventListener === 'function') {\n addEventListener('popstate', function (_event) {\n recordUrlChange(lastHref, _window.location.href);\n });\n }\n if (typeof _window.history === 'undefined') {\n return;\n }\n // https://developer.mozilla.org/en-US/docs/Web/API/History/pushState\n // https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState\n function historyWrapper(original) {\n return function () {\n var url = arguments.length > 2 ? arguments[2] : undefined;\n if (url) {\n recordUrlChange(lastHref, String(url));\n }\n return original.apply(this, arguments);\n };\n }\n instrument(_window.history, 'pushState', historyWrapper);\n instrument(_window.history, 'replaceState', historyWrapper);\n })();\n }\n };\n}\nexports.default = default_1;\n//# sourceMappingURL=breadcrumbs.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\n/* eslint-disable prefer-rest-params */\nvar core_1 = require(\"@honeybadger-io/core\");\nvar instrument = core_1.Util.instrument, globalThisOrWindow = core_1.Util.globalThisOrWindow;\nfunction default_1(_window) {\n if (_window === void 0) { _window = globalThisOrWindow(); }\n return {\n load: function (client) {\n // Wrap timers\n (function () {\n function instrumentTimer(wrapOpts) {\n return function (original) {\n // See https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout\n return function (func, delay) {\n if (typeof func === 'function') {\n var args_1 = Array.prototype.slice.call(arguments, 2);\n func = client.__wrap(func, wrapOpts);\n return original(function () {\n func.apply(void 0, args_1);\n }, delay);\n }\n else {\n return original(func, delay);\n }\n };\n };\n }\n instrument(_window, 'setTimeout', instrumentTimer({ component: 'setTimeout' }));\n instrument(_window, 'setInterval', instrumentTimer({ component: 'setInterval' }));\n })();\n }\n };\n}\nexports.default = default_1;\n//# sourceMappingURL=timers.js.map", "\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nvar core_1 = require(\"@honeybadger-io/core\");\nvar instrument = core_1.Util.instrument, globalThisOrWindow = core_1.Util.globalThisOrWindow;\nfunction default_1(_window) {\n if (_window === void 0) { _window = globalThisOrWindow(); }\n return {\n load: function (client) {\n // Wrap event listeners\n // Event targets borrowed from bugsnag-js:\n // See https://github.com/bugsnag/bugsnag-js/blob/d55af916a4d3c7757f979d887f9533fe1a04cc93/src/bugsnag.js#L542\n var targets = ['EventTarget', 'Window', 'Node', 'ApplicationCache', 'AudioTrackList', 'ChannelMergerNode', 'CryptoOperation', 'EventSource', 'FileReader', 'HTMLUnknownElement', 'IDBDatabase', 'IDBRequest', 'IDBTransaction', 'KeyOperation', 'MediaController', 'MessagePort', 'ModalWindow', 'Notification', 'SVGElementInstance', 'Screen', 'TextTrack', 'TextTrackCue', 'TextTrackList', 'WebSocket', 'WebSocketWorker', 'Worker', 'XMLHttpRequest', 'XMLHttpRequestEventTarget', 'XMLHttpRequestUpload'];\n targets.forEach(function (prop) {\n var prototype = _window[prop] && _window[prop].prototype;\n if (prototype && Object.prototype.hasOwnProperty.call(prototype, 'addEventListener')) {\n instrument(prototype, 'addEventListener', function (original) {\n var wrapOpts = { component: \"\".concat(prop, \".prototype.addEventListener\") };\n // See https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener\n return function (type, listener, useCapture, wantsUntrusted) {\n try {\n if (listener && listener.handleEvent != null) {\n listener.handleEvent = client.__wrap(listener.handleEvent, wrapOpts);\n }\n }\n catch (e) {\n // Ignore 'Permission denied to access property \"handleEvent\"' errors.\n client.logger.error(e);\n }\n return original.call(this, type, client.__wrap(listener, wrapOpts), useCapture, wantsUntrusted);\n };\n });\n instrument(prototype, 'removeEventListener', function (original) {\n return function (type, listener, useCapture, wantsUntrusted) {\n original.call(this, type, listener, useCapture, wantsUntrusted);\n return original.call(this, type, client.__wrap(listener), useCapture, wantsUntrusted);\n };\n });\n }\n });\n }\n };\n}\nexports.default = default_1;\n//# sourceMappingURL=event_listeners.js.map", "\"use strict\";\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BrowserTransport = void 0;\nvar core_1 = require(\"@honeybadger-io/core\");\nvar sanitize = core_1.Util.sanitize, globalThisOrWindow = core_1.Util.globalThisOrWindow;\n/**\n * Helper function to get typesafe Object.entries()\n * https://twitter.com/mattpocockuk/status/1502264005251018754?lang=en\n */\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nvar BrowserTransport = /** @class */ (function () {\n function BrowserTransport(headers) {\n if (headers === void 0) { headers = {}; }\n this.headers = {};\n this.headers = headers;\n }\n BrowserTransport.prototype.defaultHeaders = function () {\n return this.headers;\n };\n BrowserTransport.prototype.send = function (options, payload) {\n return __awaiter(this, void 0, void 0, function () {\n var headerArray, headers, requestInit, response, body;\n return __generator(this, function (_a) {\n switch (_a.label) {\n case 0:\n headerArray = options.headers ? objectEntries(options.headers) : [];\n headers = this.defaultHeaders();\n headerArray.forEach(function (_a) {\n var key = _a[0], value = _a[1];\n if (key != null && value != null) {\n headers[String(key)] = String(value);\n }\n });\n requestInit = {\n method: options.method,\n headers: headers\n };\n // GET methods cannot have a body.\n if (options.method === 'POST' && payload) {\n requestInit.body = typeof payload === 'string' ? payload : JSON.stringify(sanitize(payload, options.maxObjectDepth));\n }\n return [4 /*yield*/, globalThisOrWindow().fetch(options.endpoint, requestInit)];\n case 1:\n response = _a.sent();\n return [4 /*yield*/, response.text()];\n case 2:\n body = _a.sent();\n return [2 /*return*/, Promise.resolve({ statusCode: response.status, body: body })];\n }\n });\n });\n };\n return BrowserTransport;\n}());\nexports.BrowserTransport = BrowserTransport;\n//# sourceMappingURL=transport.js.map", "\"use strict\";\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BrowserFeedbackForm = void 0;\nvar core_1 = require(\"@honeybadger-io/core\");\nvar globalThisOrWindow = core_1.Util.globalThisOrWindow;\nvar BrowserFeedbackForm = /** @class */ (function () {\n function BrowserFeedbackForm(config, logger, scriptUrl) {\n this.config = config;\n this.logger = logger;\n this.scriptUrl = scriptUrl;\n }\n /* ROLLUP_STRIP_CODE_CHROME_EXTENSION_START */\n BrowserFeedbackForm.prototype.appendUserFeedbackTag = function (window, options) {\n if (options === void 0) { options = {}; }\n var script = window.document.createElement('script');\n script.setAttribute('src', this.scriptUrl);\n script.setAttribute('async', 'true');\n if (options.onLoad) {\n script.onload = options.onLoad;\n }\n (global.document.head || global.document.body).appendChild(script);\n };\n BrowserFeedbackForm.prototype.isUserFeedbackUrlAlreadyVisible = function () {\n var global = globalThisOrWindow();\n var feedbackScriptUrl = this.scriptUrl;\n for (var i = 0; i < global.document.scripts.length; i++) {\n var script = global.document.scripts[i];\n if (script.src === feedbackScriptUrl) {\n return true;\n }\n }\n return false;\n };\n /* ROLLUP_STRIP_CODE_CHROME_EXTENSION_END */\n BrowserFeedbackForm.prototype.show = function (lastNoticeId, options) {\n if (options === void 0) { options = {}; }\n if (typeof (this.appendUserFeedbackTag) !== 'function') {\n this.logger.debug('Feedback form is not available in this environment');\n return;\n }\n if (!this.config || !this.config.apiKey) {\n this.logger.debug('Client not initialized');\n return;\n }\n if (!lastNoticeId) {\n this.logger.debug(\"Can't show user feedback form without a notice already reported\");\n return;\n }\n var global = globalThisOrWindow();\n if (typeof global.document === 'undefined') {\n this.logger.debug('global.document is undefined. Cannot attach script');\n return;\n }\n if (this.isUserFeedbackUrlAlreadyVisible()) {\n this.logger.debug('User feedback form is already visible');\n return;\n }\n global['honeybadgerUserFeedbackOptions'] = __assign(__assign({}, options), { apiKey: this.config.apiKey, endpoint: this.config.userFeedbackEndpoint, noticeId: lastNoticeId });\n this.appendUserFeedbackTag(global, options);\n };\n return BrowserFeedbackForm;\n}());\nexports.BrowserFeedbackForm = BrowserFeedbackForm;\n//# sourceMappingURL=feedback-form.js.map", "\"use strict\";\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nvar __generator = (this && this.__generator) || function (thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (_) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Types = exports.getUserFeedbackScriptUrl = void 0;\nvar core_1 = require(\"@honeybadger-io/core\");\nvar util_1 = require(\"./browser/util\");\nvar onerror_1 = require(\"./browser/integrations/onerror\");\nvar onunhandledrejection_1 = __importDefault(require(\"./browser/integrations/onunhandledrejection\"));\nvar breadcrumbs_1 = __importDefault(require(\"./browser/integrations/breadcrumbs\"));\nvar timers_1 = __importDefault(require(\"./browser/integrations/timers\"));\nvar event_listeners_1 = __importDefault(require(\"./browser/integrations/event_listeners\"));\nvar transport_1 = require(\"./browser/transport\");\nvar feedback_form_1 = require(\"./browser/feedback-form\");\nvar merge = core_1.Util.merge, filter = core_1.Util.filter, objectIsExtensible = core_1.Util.objectIsExtensible, globalThisOrWindow = core_1.Util.globalThisOrWindow;\nvar getProjectRoot = function () {\n var global = globalThisOrWindow();\n var projectRoot = '';\n // Cloudflare workers do not have access to location API.\n if (global.location != null) {\n projectRoot = global.location.protocol + '//' + global.location.host;\n }\n return projectRoot;\n};\nvar getUserFeedbackScriptUrl = function (version) {\n var majorMinorVersion = version.split('.').slice(0, 2).join('.');\n return \"https://js.honeybadger.io/v\".concat(majorMinorVersion, \"/honeybadger-feedback-form.js\");\n};\nexports.getUserFeedbackScriptUrl = getUserFeedbackScriptUrl;\nvar Honeybadger = /** @class */ (function (_super) {\n __extends(Honeybadger, _super);\n function Honeybadger(opts) {\n if (opts === void 0) { opts = {}; }\n var _this = _super.call(this, __assign({ userFeedbackEndpoint: 'https://api.honeybadger.io/v2/feedback', async: true, maxErrors: null, projectRoot: getProjectRoot() }, opts), new transport_1.BrowserTransport({\n 'User-Agent': userAgent(),\n })) || this;\n /** @internal */\n _this.__errorsSent = 0;\n /** @internal */\n _this.__lastWrapErr = undefined;\n /** @internal */\n _this.__lastNoticeId = undefined;\n /** @internal */\n _this.__beforeNotifyHandlers = [\n function (notice) {\n if (_this.__exceedsMaxErrors()) {\n _this.logger.debug('Dropping notice: max errors exceeded', notice);\n return false;\n }\n if (notice && !notice.url && typeof document !== 'undefined') {\n notice.url = document.URL;\n }\n _this.__incrementErrorsCount();\n return true;\n }\n ];\n _this.__afterNotifyHandlers = [\n function (_error, notice) {\n if (notice) {\n _this.__lastNoticeId = notice.id;\n }\n }\n ];\n return _this;\n }\n Honeybadger.prototype.configure = function (opts) {\n if (opts === void 0) { opts = {}; }\n return _super.prototype.configure.call(this, opts);\n };\n Honeybadger.prototype.resetMaxErrors = function () {\n return (this.__errorsSent = 0);\n };\n Honeybadger.prototype.factory = function (opts) {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n var clone = new Honeybadger(opts);\n clone.setNotifier(this.getNotifier());\n return clone;\n };\n Honeybadger.prototype.checkIn = function (_id) {\n throw new Error('Honeybadger.checkIn() is not supported on the browser');\n };\n Honeybadger.prototype.showUserFeedbackForm = function (options) {\n if (options === void 0) { options = {}; }\n return __awaiter(this, void 0, void 0, function () {\n var form;\n return __generator(this, function (_a) {\n form = new feedback_form_1.BrowserFeedbackForm(this.config, this.logger, this.getUserFeedbackSubmitUrl());\n form.show(this.__lastNoticeId, options);\n return [2 /*return*/];\n });\n });\n };\n Honeybadger.prototype.getUserFeedbackSubmitUrl = function () {\n return (0, exports.getUserFeedbackScriptUrl)(this.getVersion());\n };\n /** @internal */\n Honeybadger.prototype.__buildPayload = function (notice) {\n var cgiData = {\n HTTP_USER_AGENT: undefined,\n HTTP_REFERER: undefined,\n HTTP_COOKIE: undefined\n };\n if (typeof navigator !== 'undefined' && navigator.userAgent) {\n cgiData.HTTP_USER_AGENT = navigator.userAgent;\n }\n if (typeof document !== 'undefined' && document.referrer.match(/\\S/)) {\n cgiData.HTTP_REFERER = document.referrer;\n }\n var cookiesObject;\n if (typeof notice.cookies === 'string') {\n cookiesObject = (0, util_1.decodeCookie)(notice.cookies);\n }\n else {\n cookiesObject = notice.cookies;\n }\n if (cookiesObject) {\n cgiData.HTTP_COOKIE = (0, util_1.encodeCookie)(filter(cookiesObject, this.config.filters));\n }\n var payload = _super.prototype.__buildPayload.call(this, notice);\n payload.request.cgi_data = merge(cgiData, payload.request.cgi_data);\n return payload;\n };\n /**\n * wrap always returns the same function so that callbacks can be removed via\n * removeEventListener.\n * @internal\n */\n Honeybadger.prototype.__wrap = function (f, opts) {\n if (opts === void 0) { opts = {}; }\n var func = f;\n if (!opts) {\n opts = {};\n }\n try {\n if (typeof func !== 'function') {\n return func;\n }\n if (!objectIsExtensible(func)) {\n return func;\n }\n if (!func.___hb) {\n // eslint-disable-next-line @typescript-eslint/no-this-alias\n var client_1 = this;\n func.___hb = function () {\n if (util_1.preferCatch) {\n try {\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n catch (err) {\n if (client_1.__lastWrapErr === err) {\n throw (err);\n }\n client_1.__lastWrapErr = err;\n (0, onerror_1.ignoreNextOnError)();\n client_1.addBreadcrumb(opts.component ? \"\".concat(opts.component, \": \").concat(err.name) : err.name, {\n category: 'error',\n metadata: {\n message: err.message,\n name: err.name,\n stack: err.stack\n }\n });\n if (client_1.config.enableUncaught) {\n client_1.notify(err);\n }\n throw (err);\n }\n }\n else {\n // eslint-disable-next-line prefer-rest-params\n return func.apply(this, arguments);\n }\n };\n }\n func.___hb.___hb = func.___hb;\n return func.___hb;\n }\n catch (_e) {\n return func;\n }\n };\n /** @internal */\n Honeybadger.prototype.__incrementErrorsCount = function () {\n return this.__errorsSent++;\n };\n /** @internal */\n Honeybadger.prototype.__exceedsMaxErrors = function () {\n return this.config.maxErrors && this.__errorsSent >= this.config.maxErrors;\n };\n return Honeybadger;\n}(core_1.Client));\nvar NOTIFIER = {\n name: '@honeybadger-io/js',\n url: 'https://github.com/honeybadger-io/honeybadger-js/tree/master/packages/js',\n version: '__VERSION__'\n};\nvar userAgent = function () {\n if (typeof navigator !== 'undefined') {\n return \"Honeybadger JS Browser Client \".concat(NOTIFIER.version, \"; \").concat(navigator.userAgent);\n }\n return \"Honeybadger JS Browser Client \".concat(NOTIFIER.version, \"; n/a; n/a\");\n};\nvar singleton = new Honeybadger({\n __plugins: [\n (0, onerror_1.onError)(),\n (0, onunhandledrejection_1.default)(),\n (0, timers_1.default)(),\n (0, event_listeners_1.default)(),\n (0, breadcrumbs_1.default)(),\n core_1.Plugins.events(),\n ]\n});\nsingleton.setNotifier(NOTIFIER);\nvar core_2 = require(\"@honeybadger-io/core\");\nObject.defineProperty(exports, \"Types\", { enumerable: true, get: function () { return core_2.Types; } });\nexports.default = singleton;\n//# sourceMappingURL=browser.js.map", "/*\nUnobtrusive JavaScript\nhttps://github.com/rails/rails/blob/main/actionview/app/assets/javascripts\nReleased under the MIT license\n */;\n\n(function() {\n var context = this;\n\n (function() {\n (function() {\n this.Rails = {\n linkClickSelector: 'a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]',\n buttonClickSelector: {\n selector: 'button[data-remote]:not([form]), button[data-confirm]:not([form])',\n exclude: 'form button'\n },\n inputChangeSelector: 'select[data-remote], input[data-remote], textarea[data-remote]',\n formSubmitSelector: 'form:not([data-turbo=true])',\n formInputClickSelector: 'form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])',\n formDisableSelector: 'input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled',\n formEnableSelector: 'input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled',\n fileInputSelector: 'input[name][type=file]:not([disabled])',\n linkDisableSelector: 'a[data-disable-with], a[data-disable]',\n buttonDisableSelector: 'button[data-remote][data-disable-with], button[data-remote][data-disable]'\n };\n\n }).call(this);\n }).call(context);\n\n var Rails = context.Rails;\n\n (function() {\n (function() {\n var nonce;\n\n nonce = null;\n\n Rails.loadCSPNonce = function() {\n var ref;\n return nonce = (ref = document.querySelector(\"meta[name=csp-nonce]\")) != null ? ref.content : void 0;\n };\n\n Rails.cspNonce = function() {\n return nonce != null ? nonce : Rails.loadCSPNonce();\n };\n\n }).call(this);\n (function() {\n var expando, m;\n\n m = Element.prototype.matches || Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector;\n\n Rails.matches = function(element, selector) {\n if (selector.exclude != null) {\n return m.call(element, selector.selector) && !m.call(element, selector.exclude);\n } else {\n return m.call(element, selector);\n }\n };\n\n expando = '_ujsData';\n\n Rails.getData = function(element, key) {\n var ref;\n return (ref = element[expando]) != null ? ref[key] : void 0;\n };\n\n Rails.setData = function(element, key, value) {\n if (element[expando] == null) {\n element[expando] = {};\n }\n return element[expando][key] = value;\n };\n\n Rails.isContentEditable = function(element) {\n var isEditable;\n isEditable = false;\n while (true) {\n if (element.isContentEditable) {\n isEditable = true;\n break;\n }\n element = element.parentElement;\n if (!element) {\n break;\n }\n }\n return isEditable;\n };\n\n Rails.$ = function(selector) {\n return Array.prototype.slice.call(document.querySelectorAll(selector));\n };\n\n }).call(this);\n (function() {\n var $, csrfParam, csrfToken;\n\n $ = Rails.$;\n\n csrfToken = Rails.csrfToken = function() {\n var meta;\n meta = document.querySelector('meta[name=csrf-token]');\n return meta && meta.content;\n };\n\n csrfParam = Rails.csrfParam = function() {\n var meta;\n meta = document.querySelector('meta[name=csrf-param]');\n return meta && meta.content;\n };\n\n Rails.CSRFProtection = function(xhr) {\n var token;\n token = csrfToken();\n if (token != null) {\n return xhr.setRequestHeader('X-CSRF-Token', token);\n }\n };\n\n Rails.refreshCSRFTokens = function() {\n var param, token;\n token = csrfToken();\n param = csrfParam();\n if ((token != null) && (param != null)) {\n return $('form input[name=\"' + param + '\"]').forEach(function(input) {\n return input.value = token;\n });\n }\n };\n\n }).call(this);\n (function() {\n var CustomEvent, fire, matches, preventDefault;\n\n matches = Rails.matches;\n\n CustomEvent = window.CustomEvent;\n\n if (typeof CustomEvent !== 'function') {\n CustomEvent = function(event, params) {\n var evt;\n evt = document.createEvent('CustomEvent');\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n };\n CustomEvent.prototype = window.Event.prototype;\n preventDefault = CustomEvent.prototype.preventDefault;\n CustomEvent.prototype.preventDefault = function() {\n var result;\n result = preventDefault.call(this);\n if (this.cancelable && !this.defaultPrevented) {\n Object.defineProperty(this, 'defaultPrevented', {\n get: function() {\n return true;\n }\n });\n }\n return result;\n };\n }\n\n fire = Rails.fire = function(obj, name, data) {\n var event;\n event = new CustomEvent(name, {\n bubbles: true,\n cancelable: true,\n detail: data\n });\n obj.dispatchEvent(event);\n return !event.defaultPrevented;\n };\n\n Rails.stopEverything = function(e) {\n fire(e.target, 'ujs:everythingStopped');\n e.preventDefault();\n e.stopPropagation();\n return e.stopImmediatePropagation();\n };\n\n Rails.delegate = function(element, selector, eventType, handler) {\n return element.addEventListener(eventType, function(e) {\n var target;\n target = e.target;\n while (!(!(target instanceof Element) || matches(target, selector))) {\n target = target.parentNode;\n }\n if (target instanceof Element && handler.call(target, e) === false) {\n e.preventDefault();\n return e.stopPropagation();\n }\n });\n };\n\n }).call(this);\n (function() {\n var AcceptHeaders, CSRFProtection, createXHR, cspNonce, fire, prepareOptions, processResponse;\n\n cspNonce = Rails.cspNonce, CSRFProtection = Rails.CSRFProtection, fire = Rails.fire;\n\n AcceptHeaders = {\n '*': '*/*',\n text: 'text/plain',\n html: 'text/html',\n xml: 'application/xml, text/xml',\n json: 'application/json, text/javascript',\n script: 'text/javascript, application/javascript, application/ecmascript, application/x-ecmascript'\n };\n\n Rails.ajax = function(options) {\n var xhr;\n options = prepareOptions(options);\n xhr = createXHR(options, function() {\n var ref, response;\n response = processResponse((ref = xhr.response) != null ? ref : xhr.responseText, xhr.getResponseHeader('Content-Type'));\n if (Math.floor(xhr.status / 100) === 2) {\n if (typeof options.success === \"function\") {\n options.success(response, xhr.statusText, xhr);\n }\n } else {\n if (typeof options.error === \"function\") {\n options.error(response, xhr.statusText, xhr);\n }\n }\n return typeof options.complete === \"function\" ? options.complete(xhr, xhr.statusText) : void 0;\n });\n if ((options.beforeSend != null) && !options.beforeSend(xhr, options)) {\n return false;\n }\n if (xhr.readyState === XMLHttpRequest.OPENED) {\n return xhr.send(options.data);\n }\n };\n\n prepareOptions = function(options) {\n options.url = options.url || location.href;\n options.type = options.type.toUpperCase();\n if (options.type === 'GET' && options.data) {\n if (options.url.indexOf('?') < 0) {\n options.url += '?' + options.data;\n } else {\n options.url += '&' + options.data;\n }\n }\n if (AcceptHeaders[options.dataType] == null) {\n options.dataType = '*';\n }\n options.accept = AcceptHeaders[options.dataType];\n if (options.dataType !== '*') {\n options.accept += ', */*; q=0.01';\n }\n return options;\n };\n\n createXHR = function(options, done) {\n var xhr;\n xhr = new XMLHttpRequest();\n xhr.open(options.type, options.url, true);\n xhr.setRequestHeader('Accept', options.accept);\n if (typeof options.data === 'string') {\n xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8');\n }\n if (!options.crossDomain) {\n xhr.setRequestHeader('X-Requested-With', 'XMLHttpRequest');\n CSRFProtection(xhr);\n }\n xhr.withCredentials = !!options.withCredentials;\n xhr.onreadystatechange = function() {\n if (xhr.readyState === XMLHttpRequest.DONE) {\n return done(xhr);\n }\n };\n return xhr;\n };\n\n processResponse = function(response, type) {\n var parser, script;\n if (typeof response === 'string' && typeof type === 'string') {\n if (type.match(/\\bjson\\b/)) {\n try {\n response = JSON.parse(response);\n } catch (error) {}\n } else if (type.match(/\\b(?:java|ecma)script\\b/)) {\n script = document.createElement('script');\n script.setAttribute('nonce', cspNonce());\n script.text = response;\n document.head.appendChild(script).parentNode.removeChild(script);\n } else if (type.match(/\\b(xml|html|svg)\\b/)) {\n parser = new DOMParser();\n type = type.replace(/;.+/, '');\n try {\n response = parser.parseFromString(response, type);\n } catch (error) {}\n }\n }\n return response;\n };\n\n Rails.href = function(element) {\n return element.href;\n };\n\n Rails.isCrossDomain = function(url) {\n var e, originAnchor, urlAnchor;\n originAnchor = document.createElement('a');\n originAnchor.href = location.href;\n urlAnchor = document.createElement('a');\n try {\n urlAnchor.href = url;\n return !(((!urlAnchor.protocol || urlAnchor.protocol === ':') && !urlAnchor.host) || (originAnchor.protocol + '//' + originAnchor.host === urlAnchor.protocol + '//' + urlAnchor.host));\n } catch (error) {\n e = error;\n return true;\n }\n };\n\n }).call(this);\n (function() {\n var matches, toArray;\n\n matches = Rails.matches;\n\n toArray = function(e) {\n return Array.prototype.slice.call(e);\n };\n\n Rails.serializeElement = function(element, additionalParam) {\n var inputs, params;\n inputs = [element];\n if (matches(element, 'form')) {\n inputs = toArray(element.elements);\n }\n params = [];\n inputs.forEach(function(input) {\n if (!input.name || input.disabled) {\n return;\n }\n if (matches(input, 'fieldset[disabled] *')) {\n return;\n }\n if (matches(input, 'select')) {\n return toArray(input.options).forEach(function(option) {\n if (option.selected) {\n return params.push({\n name: input.name,\n value: option.value\n });\n }\n });\n } else if (input.checked || ['radio', 'checkbox', 'submit'].indexOf(input.type) === -1) {\n return params.push({\n name: input.name,\n value: input.value\n });\n }\n });\n if (additionalParam) {\n params.push(additionalParam);\n }\n return params.map(function(param) {\n if (param.name != null) {\n return (encodeURIComponent(param.name)) + \"=\" + (encodeURIComponent(param.value));\n } else {\n return param;\n }\n }).join('&');\n };\n\n Rails.formElements = function(form, selector) {\n if (matches(form, 'form')) {\n return toArray(form.elements).filter(function(el) {\n return matches(el, selector);\n });\n } else {\n return toArray(form.querySelectorAll(selector));\n }\n };\n\n }).call(this);\n (function() {\n var allowAction, fire, stopEverything;\n\n fire = Rails.fire, stopEverything = Rails.stopEverything;\n\n Rails.handleConfirm = function(e) {\n if (!allowAction(this)) {\n return stopEverything(e);\n }\n };\n\n Rails.confirm = function(message, element) {\n return confirm(message);\n };\n\n allowAction = function(element) {\n var answer, callback, message;\n message = element.getAttribute('data-confirm');\n if (!message) {\n return true;\n }\n answer = false;\n if (fire(element, 'confirm')) {\n try {\n answer = Rails.confirm(message, element);\n } catch (error) {}\n callback = fire(element, 'confirm:complete', [answer]);\n }\n return answer && callback;\n };\n\n }).call(this);\n (function() {\n var disableFormElement, disableFormElements, disableLinkElement, enableFormElement, enableFormElements, enableLinkElement, formElements, getData, isContentEditable, isXhrRedirect, matches, setData, stopEverything;\n\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, stopEverything = Rails.stopEverything, formElements = Rails.formElements, isContentEditable = Rails.isContentEditable;\n\n Rails.handleDisabledElement = function(e) {\n var element;\n element = this;\n if (element.disabled) {\n return stopEverything(e);\n }\n };\n\n Rails.enableElement = function(e) {\n var element;\n if (e instanceof Event) {\n if (isXhrRedirect(e)) {\n return;\n }\n element = e.target;\n } else {\n element = e;\n }\n if (isContentEditable(element)) {\n return;\n }\n if (matches(element, Rails.linkDisableSelector)) {\n return enableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formEnableSelector)) {\n return enableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return enableFormElements(element);\n }\n };\n\n Rails.disableElement = function(e) {\n var element;\n element = e instanceof Event ? e.target : e;\n if (isContentEditable(element)) {\n return;\n }\n if (matches(element, Rails.linkDisableSelector)) {\n return disableLinkElement(element);\n } else if (matches(element, Rails.buttonDisableSelector) || matches(element, Rails.formDisableSelector)) {\n return disableFormElement(element);\n } else if (matches(element, Rails.formSubmitSelector)) {\n return disableFormElements(element);\n }\n };\n\n disableLinkElement = function(element) {\n var replacement;\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n replacement = element.getAttribute('data-disable-with');\n if (replacement != null) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n }\n element.addEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', true);\n };\n\n enableLinkElement = function(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n if (originalText != null) {\n element.innerHTML = originalText;\n setData(element, 'ujs:enable-with', null);\n }\n element.removeEventListener('click', stopEverything);\n return setData(element, 'ujs:disabled', null);\n };\n\n disableFormElements = function(form) {\n return formElements(form, Rails.formDisableSelector).forEach(disableFormElement);\n };\n\n disableFormElement = function(element) {\n var replacement;\n if (getData(element, 'ujs:disabled')) {\n return;\n }\n replacement = element.getAttribute('data-disable-with');\n if (replacement != null) {\n if (matches(element, 'button')) {\n setData(element, 'ujs:enable-with', element.innerHTML);\n element.innerHTML = replacement;\n } else {\n setData(element, 'ujs:enable-with', element.value);\n element.value = replacement;\n }\n }\n element.disabled = true;\n return setData(element, 'ujs:disabled', true);\n };\n\n enableFormElements = function(form) {\n return formElements(form, Rails.formEnableSelector).forEach(enableFormElement);\n };\n\n enableFormElement = function(element) {\n var originalText;\n originalText = getData(element, 'ujs:enable-with');\n if (originalText != null) {\n if (matches(element, 'button')) {\n element.innerHTML = originalText;\n } else {\n element.value = originalText;\n }\n setData(element, 'ujs:enable-with', null);\n }\n element.disabled = false;\n return setData(element, 'ujs:disabled', null);\n };\n\n isXhrRedirect = function(event) {\n var ref, xhr;\n xhr = (ref = event.detail) != null ? ref[0] : void 0;\n return (xhr != null ? xhr.getResponseHeader(\"X-Xhr-Redirect\") : void 0) != null;\n };\n\n }).call(this);\n (function() {\n var isContentEditable, stopEverything;\n\n stopEverything = Rails.stopEverything;\n\n isContentEditable = Rails.isContentEditable;\n\n Rails.handleMethod = function(e) {\n var csrfParam, csrfToken, form, formContent, href, link, method;\n link = this;\n method = link.getAttribute('data-method');\n if (!method) {\n return;\n }\n if (isContentEditable(this)) {\n return;\n }\n href = Rails.href(link);\n csrfToken = Rails.csrfToken();\n csrfParam = Rails.csrfParam();\n form = document.createElement('form');\n formContent = \"\";\n if ((csrfParam != null) && (csrfToken != null) && !Rails.isCrossDomain(href)) {\n formContent += \"\";\n }\n formContent += '';\n form.method = 'post';\n form.action = href;\n form.target = link.target;\n form.innerHTML = formContent;\n form.style.display = 'none';\n document.body.appendChild(form);\n form.querySelector('[type=\"submit\"]').click();\n return stopEverything(e);\n };\n\n }).call(this);\n (function() {\n var ajax, fire, getData, isContentEditable, isCrossDomain, isRemote, matches, serializeElement, setData, stopEverything,\n slice = [].slice;\n\n matches = Rails.matches, getData = Rails.getData, setData = Rails.setData, fire = Rails.fire, stopEverything = Rails.stopEverything, ajax = Rails.ajax, isCrossDomain = Rails.isCrossDomain, serializeElement = Rails.serializeElement, isContentEditable = Rails.isContentEditable;\n\n isRemote = function(element) {\n var value;\n value = element.getAttribute('data-remote');\n return (value != null) && value !== 'false';\n };\n\n Rails.handleRemote = function(e) {\n var button, data, dataType, element, method, url, withCredentials;\n element = this;\n if (!isRemote(element)) {\n return true;\n }\n if (!fire(element, 'ajax:before')) {\n fire(element, 'ajax:stopped');\n return false;\n }\n if (isContentEditable(element)) {\n fire(element, 'ajax:stopped');\n return false;\n }\n withCredentials = element.getAttribute('data-with-credentials');\n dataType = element.getAttribute('data-type') || 'script';\n if (matches(element, Rails.formSubmitSelector)) {\n button = getData(element, 'ujs:submit-button');\n method = getData(element, 'ujs:submit-button-formmethod') || element.method;\n url = getData(element, 'ujs:submit-button-formaction') || element.getAttribute('action') || location.href;\n if (method.toUpperCase() === 'GET') {\n url = url.replace(/\\?.*$/, '');\n }\n if (element.enctype === 'multipart/form-data') {\n data = new FormData(element);\n if (button != null) {\n data.append(button.name, button.value);\n }\n } else {\n data = serializeElement(element, button);\n }\n setData(element, 'ujs:submit-button', null);\n setData(element, 'ujs:submit-button-formmethod', null);\n setData(element, 'ujs:submit-button-formaction', null);\n } else if (matches(element, Rails.buttonClickSelector) || matches(element, Rails.inputChangeSelector)) {\n method = element.getAttribute('data-method');\n url = element.getAttribute('data-url');\n data = serializeElement(element, element.getAttribute('data-params'));\n } else {\n method = element.getAttribute('data-method');\n url = Rails.href(element);\n data = element.getAttribute('data-params');\n }\n ajax({\n type: method || 'GET',\n url: url,\n data: data,\n dataType: dataType,\n beforeSend: function(xhr, options) {\n if (fire(element, 'ajax:beforeSend', [xhr, options])) {\n return fire(element, 'ajax:send', [xhr]);\n } else {\n fire(element, 'ajax:stopped');\n return false;\n }\n },\n success: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:success', args);\n },\n error: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:error', args);\n },\n complete: function() {\n var args;\n args = 1 <= arguments.length ? slice.call(arguments, 0) : [];\n return fire(element, 'ajax:complete', args);\n },\n crossDomain: isCrossDomain(url),\n withCredentials: (withCredentials != null) && withCredentials !== 'false'\n });\n return stopEverything(e);\n };\n\n Rails.formSubmitButtonClick = function(e) {\n var button, form;\n button = this;\n form = button.form;\n if (!form) {\n return;\n }\n if (button.name) {\n setData(form, 'ujs:submit-button', {\n name: button.name,\n value: button.value\n });\n }\n setData(form, 'ujs:formnovalidate-button', button.formNoValidate);\n setData(form, 'ujs:submit-button-formaction', button.getAttribute('formaction'));\n return setData(form, 'ujs:submit-button-formmethod', button.getAttribute('formmethod'));\n };\n\n Rails.preventInsignificantClick = function(e) {\n var data, insignificantMetaClick, link, metaClick, method, nonPrimaryMouseClick;\n link = this;\n method = (link.getAttribute('data-method') || 'GET').toUpperCase();\n data = link.getAttribute('data-params');\n metaClick = e.metaKey || e.ctrlKey;\n insignificantMetaClick = metaClick && method === 'GET' && !data;\n nonPrimaryMouseClick = (e.button != null) && e.button !== 0;\n if (nonPrimaryMouseClick || insignificantMetaClick) {\n return e.stopImmediatePropagation();\n }\n };\n\n }).call(this);\n (function() {\n var $, CSRFProtection, delegate, disableElement, enableElement, fire, formSubmitButtonClick, getData, handleConfirm, handleDisabledElement, handleMethod, handleRemote, loadCSPNonce, preventInsignificantClick, refreshCSRFTokens;\n\n fire = Rails.fire, delegate = Rails.delegate, getData = Rails.getData, $ = Rails.$, refreshCSRFTokens = Rails.refreshCSRFTokens, CSRFProtection = Rails.CSRFProtection, loadCSPNonce = Rails.loadCSPNonce, enableElement = Rails.enableElement, disableElement = Rails.disableElement, handleDisabledElement = Rails.handleDisabledElement, handleConfirm = Rails.handleConfirm, preventInsignificantClick = Rails.preventInsignificantClick, handleRemote = Rails.handleRemote, formSubmitButtonClick = Rails.formSubmitButtonClick, handleMethod = Rails.handleMethod;\n\n if ((typeof jQuery !== \"undefined\" && jQuery !== null) && (jQuery.ajax != null)) {\n if (jQuery.rails) {\n throw new Error('If you load both jquery_ujs and rails-ujs, use rails-ujs only.');\n }\n jQuery.rails = Rails;\n jQuery.ajaxPrefilter(function(options, originalOptions, xhr) {\n if (!options.crossDomain) {\n return CSRFProtection(xhr);\n }\n });\n }\n\n Rails.start = function() {\n if (window._rails_loaded) {\n throw new Error('rails-ujs has already been loaded!');\n }\n window.addEventListener('pageshow', function() {\n $(Rails.formEnableSelector).forEach(function(el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n return $(Rails.linkDisableSelector).forEach(function(el) {\n if (getData(el, 'ujs:disabled')) {\n return enableElement(el);\n }\n });\n });\n delegate(document, Rails.linkDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.linkDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.buttonDisableSelector, 'ajax:stopped', enableElement);\n delegate(document, Rails.linkClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.linkClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.linkClickSelector, 'click', handleConfirm);\n delegate(document, Rails.linkClickSelector, 'click', disableElement);\n delegate(document, Rails.linkClickSelector, 'click', handleRemote);\n delegate(document, Rails.linkClickSelector, 'click', handleMethod);\n delegate(document, Rails.buttonClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.buttonClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleConfirm);\n delegate(document, Rails.buttonClickSelector, 'click', disableElement);\n delegate(document, Rails.buttonClickSelector, 'click', handleRemote);\n delegate(document, Rails.inputChangeSelector, 'change', handleDisabledElement);\n delegate(document, Rails.inputChangeSelector, 'change', handleConfirm);\n delegate(document, Rails.inputChangeSelector, 'change', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', handleDisabledElement);\n delegate(document, Rails.formSubmitSelector, 'submit', handleConfirm);\n delegate(document, Rails.formSubmitSelector, 'submit', handleRemote);\n delegate(document, Rails.formSubmitSelector, 'submit', function(e) {\n return setTimeout((function() {\n return disableElement(e);\n }), 13);\n });\n delegate(document, Rails.formSubmitSelector, 'ajax:send', disableElement);\n delegate(document, Rails.formSubmitSelector, 'ajax:complete', enableElement);\n delegate(document, Rails.formInputClickSelector, 'click', preventInsignificantClick);\n delegate(document, Rails.formInputClickSelector, 'click', handleDisabledElement);\n delegate(document, Rails.formInputClickSelector, 'click', handleConfirm);\n delegate(document, Rails.formInputClickSelector, 'click', formSubmitButtonClick);\n document.addEventListener('DOMContentLoaded', refreshCSRFTokens);\n document.addEventListener('DOMContentLoaded', loadCSPNonce);\n return window._rails_loaded = true;\n };\n\n if (window.Rails === Rails && fire(document, 'rails:attachBindings')) {\n Rails.start();\n }\n\n }).call(this);\n }).call(this);\n\n if (typeof module === \"object\" && module.exports) {\n module.exports = Rails;\n } else if (typeof define === \"function\" && define.amd) {\n define(Rails);\n }\n}).call(this);\n", "/*\nTurbo 7.3.0\nCopyright \u00A9 2023 37signals LLC\n */\n(function () {\n if (window.Reflect === undefined ||\n window.customElements === undefined ||\n window.customElements.polyfillWrapFlushCallback) {\n return;\n }\n const BuiltInHTMLElement = HTMLElement;\n const wrapperForTheName = {\n HTMLElement: function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor);\n },\n };\n window.HTMLElement = wrapperForTheName[\"HTMLElement\"];\n HTMLElement.prototype = BuiltInHTMLElement.prototype;\n HTMLElement.prototype.constructor = HTMLElement;\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);\n})();\n\n/**\n * The MIT License (MIT)\n * \n * Copyright (c) 2019 Javan Makhmali\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n(function(prototype) {\n if (typeof prototype.requestSubmit == \"function\") return\n\n prototype.requestSubmit = function(submitter) {\n if (submitter) {\n validateSubmitter(submitter, this);\n submitter.click();\n } else {\n submitter = document.createElement(\"input\");\n submitter.type = \"submit\";\n submitter.hidden = true;\n this.appendChild(submitter);\n submitter.click();\n this.removeChild(submitter);\n }\n };\n\n function validateSubmitter(submitter, form) {\n submitter instanceof HTMLElement || raise(TypeError, \"parameter 1 is not of type 'HTMLElement'\");\n submitter.type == \"submit\" || raise(TypeError, \"The specified element is not a submit button\");\n submitter.form == form || raise(DOMException, \"The specified element is not owned by this form element\", \"NotFoundError\");\n }\n\n function raise(errorConstructor, message, name) {\n throw new errorConstructor(\"Failed to execute 'requestSubmit' on 'HTMLFormElement': \" + message + \".\", name)\n }\n})(HTMLFormElement.prototype);\n\nconst submittersByForm = new WeakMap();\nfunction findSubmitterFromClickTarget(target) {\n const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n const candidate = element ? element.closest(\"input, button\") : null;\n return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == \"submit\" ? candidate : null;\n}\nfunction clickCaptured(event) {\n const submitter = findSubmitterFromClickTarget(event.target);\n if (submitter && submitter.form) {\n submittersByForm.set(submitter.form, submitter);\n }\n}\n(function () {\n if (\"submitter\" in Event.prototype)\n return;\n let prototype = window.Event.prototype;\n if (\"SubmitEvent\" in window && /Apple Computer/.test(navigator.vendor)) {\n prototype = window.SubmitEvent.prototype;\n }\n else if (\"SubmitEvent\" in window) {\n return;\n }\n addEventListener(\"click\", clickCaptured, true);\n Object.defineProperty(prototype, \"submitter\", {\n get() {\n if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n return submittersByForm.get(this.target);\n }\n },\n });\n})();\n\nvar FrameLoadingStyle;\n(function (FrameLoadingStyle) {\n FrameLoadingStyle[\"eager\"] = \"eager\";\n FrameLoadingStyle[\"lazy\"] = \"lazy\";\n})(FrameLoadingStyle || (FrameLoadingStyle = {}));\nclass FrameElement extends HTMLElement {\n static get observedAttributes() {\n return [\"disabled\", \"complete\", \"loading\", \"src\"];\n }\n constructor() {\n super();\n this.loaded = Promise.resolve();\n this.delegate = new FrameElement.delegateConstructor(this);\n }\n connectedCallback() {\n this.delegate.connect();\n }\n disconnectedCallback() {\n this.delegate.disconnect();\n }\n reload() {\n return this.delegate.sourceURLReloaded();\n }\n attributeChangedCallback(name) {\n if (name == \"loading\") {\n this.delegate.loadingStyleChanged();\n }\n else if (name == \"complete\") {\n this.delegate.completeChanged();\n }\n else if (name == \"src\") {\n this.delegate.sourceURLChanged();\n }\n else {\n this.delegate.disabledChanged();\n }\n }\n get src() {\n return this.getAttribute(\"src\");\n }\n set src(value) {\n if (value) {\n this.setAttribute(\"src\", value);\n }\n else {\n this.removeAttribute(\"src\");\n }\n }\n get loading() {\n return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n }\n set loading(value) {\n if (value) {\n this.setAttribute(\"loading\", value);\n }\n else {\n this.removeAttribute(\"loading\");\n }\n }\n get disabled() {\n return this.hasAttribute(\"disabled\");\n }\n set disabled(value) {\n if (value) {\n this.setAttribute(\"disabled\", \"\");\n }\n else {\n this.removeAttribute(\"disabled\");\n }\n }\n get autoscroll() {\n return this.hasAttribute(\"autoscroll\");\n }\n set autoscroll(value) {\n if (value) {\n this.setAttribute(\"autoscroll\", \"\");\n }\n else {\n this.removeAttribute(\"autoscroll\");\n }\n }\n get complete() {\n return !this.delegate.isLoading;\n }\n get isActive() {\n return this.ownerDocument === document && !this.isPreview;\n }\n get isPreview() {\n var _a, _b;\n return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute(\"data-turbo-preview\");\n }\n}\nfunction frameLoadingStyleFromString(style) {\n switch (style.toLowerCase()) {\n case \"lazy\":\n return FrameLoadingStyle.lazy;\n default:\n return FrameLoadingStyle.eager;\n }\n}\n\nfunction expandURL(locatable) {\n return new URL(locatable.toString(), document.baseURI);\n}\nfunction getAnchor(url) {\n let anchorMatch;\n if (url.hash) {\n return url.hash.slice(1);\n }\n else if ((anchorMatch = url.href.match(/#(.*)$/))) {\n return anchorMatch[1];\n }\n}\nfunction getAction(form, submitter) {\n const action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formaction\")) || form.getAttribute(\"action\") || form.action;\n return expandURL(action);\n}\nfunction getExtension(url) {\n return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\nfunction isHTML(url) {\n return !!getExtension(url).match(/^(?:|\\.(?:htm|html|xhtml|php))$/);\n}\nfunction isPrefixedBy(baseURL, url) {\n const prefix = getPrefix(url);\n return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\nfunction locationIsVisitable(location, rootLocation) {\n return isPrefixedBy(location, rootLocation) && isHTML(location);\n}\nfunction getRequestURL(url) {\n const anchor = getAnchor(url);\n return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\nfunction toCacheKey(url) {\n return getRequestURL(url);\n}\nfunction urlsAreEqual(left, right) {\n return expandURL(left).href == expandURL(right).href;\n}\nfunction getPathComponents(url) {\n return url.pathname.split(\"/\").slice(1);\n}\nfunction getLastPathComponent(url) {\n return getPathComponents(url).slice(-1)[0];\n}\nfunction getPrefix(url) {\n return addTrailingSlash(url.origin + url.pathname);\n}\nfunction addTrailingSlash(value) {\n return value.endsWith(\"/\") ? value : value + \"/\";\n}\n\nclass FetchResponse {\n constructor(response) {\n this.response = response;\n }\n get succeeded() {\n return this.response.ok;\n }\n get failed() {\n return !this.succeeded;\n }\n get clientError() {\n return this.statusCode >= 400 && this.statusCode <= 499;\n }\n get serverError() {\n return this.statusCode >= 500 && this.statusCode <= 599;\n }\n get redirected() {\n return this.response.redirected;\n }\n get location() {\n return expandURL(this.response.url);\n }\n get isHTML() {\n return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n }\n get statusCode() {\n return this.response.status;\n }\n get contentType() {\n return this.header(\"Content-Type\");\n }\n get responseText() {\n return this.response.clone().text();\n }\n get responseHTML() {\n if (this.isHTML) {\n return this.response.clone().text();\n }\n else {\n return Promise.resolve(undefined);\n }\n }\n header(name) {\n return this.response.headers.get(name);\n }\n}\n\nfunction activateScriptElement(element) {\n if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n return element;\n }\n else {\n const createdScriptElement = document.createElement(\"script\");\n const cspNonce = getMetaContent(\"csp-nonce\");\n if (cspNonce) {\n createdScriptElement.nonce = cspNonce;\n }\n createdScriptElement.textContent = element.textContent;\n createdScriptElement.async = false;\n copyElementAttributes(createdScriptElement, element);\n return createdScriptElement;\n }\n}\nfunction copyElementAttributes(destinationElement, sourceElement) {\n for (const { name, value } of sourceElement.attributes) {\n destinationElement.setAttribute(name, value);\n }\n}\nfunction createDocumentFragment(html) {\n const template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content;\n}\nfunction dispatch(eventName, { target, cancelable, detail } = {}) {\n const event = new CustomEvent(eventName, {\n cancelable,\n bubbles: true,\n composed: true,\n detail,\n });\n if (target && target.isConnected) {\n target.dispatchEvent(event);\n }\n else {\n document.documentElement.dispatchEvent(event);\n }\n return event;\n}\nfunction nextAnimationFrame() {\n return new Promise((resolve) => requestAnimationFrame(() => resolve()));\n}\nfunction nextEventLoopTick() {\n return new Promise((resolve) => setTimeout(() => resolve(), 0));\n}\nfunction nextMicrotask() {\n return Promise.resolve();\n}\nfunction parseHTMLDocument(html = \"\") {\n return new DOMParser().parseFromString(html, \"text/html\");\n}\nfunction unindent(strings, ...values) {\n const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n const match = lines[0].match(/^\\s+/);\n const indent = match ? match[0].length : 0;\n return lines.map((line) => line.slice(indent)).join(\"\\n\");\n}\nfunction interpolate(strings, values) {\n return strings.reduce((result, string, i) => {\n const value = values[i] == undefined ? \"\" : values[i];\n return result + string + value;\n }, \"\");\n}\nfunction uuid() {\n return Array.from({ length: 36 })\n .map((_, i) => {\n if (i == 8 || i == 13 || i == 18 || i == 23) {\n return \"-\";\n }\n else if (i == 14) {\n return \"4\";\n }\n else if (i == 19) {\n return (Math.floor(Math.random() * 4) + 8).toString(16);\n }\n else {\n return Math.floor(Math.random() * 15).toString(16);\n }\n })\n .join(\"\");\n}\nfunction getAttribute(attributeName, ...elements) {\n for (const value of elements.map((element) => element === null || element === void 0 ? void 0 : element.getAttribute(attributeName))) {\n if (typeof value == \"string\")\n return value;\n }\n return null;\n}\nfunction hasAttribute(attributeName, ...elements) {\n return elements.some((element) => element && element.hasAttribute(attributeName));\n}\nfunction markAsBusy(...elements) {\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.setAttribute(\"busy\", \"\");\n }\n element.setAttribute(\"aria-busy\", \"true\");\n }\n}\nfunction clearBusyState(...elements) {\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.removeAttribute(\"busy\");\n }\n element.removeAttribute(\"aria-busy\");\n }\n}\nfunction waitForLoad(element, timeoutInMilliseconds = 2000) {\n return new Promise((resolve) => {\n const onComplete = () => {\n element.removeEventListener(\"error\", onComplete);\n element.removeEventListener(\"load\", onComplete);\n resolve();\n };\n element.addEventListener(\"load\", onComplete, { once: true });\n element.addEventListener(\"error\", onComplete, { once: true });\n setTimeout(resolve, timeoutInMilliseconds);\n });\n}\nfunction getHistoryMethodForAction(action) {\n switch (action) {\n case \"replace\":\n return history.replaceState;\n case \"advance\":\n case \"restore\":\n return history.pushState;\n }\n}\nfunction isAction(action) {\n return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\nfunction getVisitAction(...elements) {\n const action = getAttribute(\"data-turbo-action\", ...elements);\n return isAction(action) ? action : null;\n}\nfunction getMetaElement(name) {\n return document.querySelector(`meta[name=\"${name}\"]`);\n}\nfunction getMetaContent(name) {\n const element = getMetaElement(name);\n return element && element.content;\n}\nfunction setMetaContent(name, content) {\n let element = getMetaElement(name);\n if (!element) {\n element = document.createElement(\"meta\");\n element.setAttribute(\"name\", name);\n document.head.appendChild(element);\n }\n element.setAttribute(\"content\", content);\n return element;\n}\nfunction findClosestRecursively(element, selector) {\n var _a;\n if (element instanceof Element) {\n return (element.closest(selector) ||\n findClosestRecursively(element.assignedSlot || ((_a = element.getRootNode()) === null || _a === void 0 ? void 0 : _a.host), selector));\n }\n}\n\nvar FetchMethod;\n(function (FetchMethod) {\n FetchMethod[FetchMethod[\"get\"] = 0] = \"get\";\n FetchMethod[FetchMethod[\"post\"] = 1] = \"post\";\n FetchMethod[FetchMethod[\"put\"] = 2] = \"put\";\n FetchMethod[FetchMethod[\"patch\"] = 3] = \"patch\";\n FetchMethod[FetchMethod[\"delete\"] = 4] = \"delete\";\n})(FetchMethod || (FetchMethod = {}));\nfunction fetchMethodFromString(method) {\n switch (method.toLowerCase()) {\n case \"get\":\n return FetchMethod.get;\n case \"post\":\n return FetchMethod.post;\n case \"put\":\n return FetchMethod.put;\n case \"patch\":\n return FetchMethod.patch;\n case \"delete\":\n return FetchMethod.delete;\n }\n}\nclass FetchRequest {\n constructor(delegate, method, location, body = new URLSearchParams(), target = null) {\n this.abortController = new AbortController();\n this.resolveRequestPromise = (_value) => { };\n this.delegate = delegate;\n this.method = method;\n this.headers = this.defaultHeaders;\n this.body = body;\n this.url = location;\n this.target = target;\n }\n get location() {\n return this.url;\n }\n get params() {\n return this.url.searchParams;\n }\n get entries() {\n return this.body ? Array.from(this.body.entries()) : [];\n }\n cancel() {\n this.abortController.abort();\n }\n async perform() {\n const { fetchOptions } = this;\n this.delegate.prepareRequest(this);\n await this.allowRequestToBeIntercepted(fetchOptions);\n try {\n this.delegate.requestStarted(this);\n const response = await fetch(this.url.href, fetchOptions);\n return await this.receive(response);\n }\n catch (error) {\n if (error.name !== \"AbortError\") {\n if (this.willDelegateErrorHandling(error)) {\n this.delegate.requestErrored(this, error);\n }\n throw error;\n }\n }\n finally {\n this.delegate.requestFinished(this);\n }\n }\n async receive(response) {\n const fetchResponse = new FetchResponse(response);\n const event = dispatch(\"turbo:before-fetch-response\", {\n cancelable: true,\n detail: { fetchResponse },\n target: this.target,\n });\n if (event.defaultPrevented) {\n this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n }\n else if (fetchResponse.succeeded) {\n this.delegate.requestSucceededWithResponse(this, fetchResponse);\n }\n else {\n this.delegate.requestFailedWithResponse(this, fetchResponse);\n }\n return fetchResponse;\n }\n get fetchOptions() {\n var _a;\n return {\n method: FetchMethod[this.method].toUpperCase(),\n credentials: \"same-origin\",\n headers: this.headers,\n redirect: \"follow\",\n body: this.isSafe ? null : this.body,\n signal: this.abortSignal,\n referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href,\n };\n }\n get defaultHeaders() {\n return {\n Accept: \"text/html, application/xhtml+xml\",\n };\n }\n get isSafe() {\n return this.method === FetchMethod.get;\n }\n get abortSignal() {\n return this.abortController.signal;\n }\n acceptResponseType(mimeType) {\n this.headers[\"Accept\"] = [mimeType, this.headers[\"Accept\"]].join(\", \");\n }\n async allowRequestToBeIntercepted(fetchOptions) {\n const requestInterception = new Promise((resolve) => (this.resolveRequestPromise = resolve));\n const event = dispatch(\"turbo:before-fetch-request\", {\n cancelable: true,\n detail: {\n fetchOptions,\n url: this.url,\n resume: this.resolveRequestPromise,\n },\n target: this.target,\n });\n if (event.defaultPrevented)\n await requestInterception;\n }\n willDelegateErrorHandling(error) {\n const event = dispatch(\"turbo:fetch-request-error\", {\n target: this.target,\n cancelable: true,\n detail: { request: this, error: error },\n });\n return !event.defaultPrevented;\n }\n}\n\nclass AppearanceObserver {\n constructor(delegate, element) {\n this.started = false;\n this.intersect = (entries) => {\n const lastEntry = entries.slice(-1)[0];\n if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {\n this.delegate.elementAppearedInViewport(this.element);\n }\n };\n this.delegate = delegate;\n this.element = element;\n this.intersectionObserver = new IntersectionObserver(this.intersect);\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.intersectionObserver.observe(this.element);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n this.intersectionObserver.unobserve(this.element);\n }\n }\n}\n\nclass StreamMessage {\n static wrap(message) {\n if (typeof message == \"string\") {\n return new this(createDocumentFragment(message));\n }\n else {\n return message;\n }\n }\n constructor(fragment) {\n this.fragment = importStreamElements(fragment);\n }\n}\nStreamMessage.contentType = \"text/vnd.turbo-stream.html\";\nfunction importStreamElements(fragment) {\n for (const element of fragment.querySelectorAll(\"turbo-stream\")) {\n const streamElement = document.importNode(element, true);\n for (const inertScriptElement of streamElement.templateElement.content.querySelectorAll(\"script\")) {\n inertScriptElement.replaceWith(activateScriptElement(inertScriptElement));\n }\n element.replaceWith(streamElement);\n }\n return fragment;\n}\n\nvar FormSubmissionState;\n(function (FormSubmissionState) {\n FormSubmissionState[FormSubmissionState[\"initialized\"] = 0] = \"initialized\";\n FormSubmissionState[FormSubmissionState[\"requesting\"] = 1] = \"requesting\";\n FormSubmissionState[FormSubmissionState[\"waiting\"] = 2] = \"waiting\";\n FormSubmissionState[FormSubmissionState[\"receiving\"] = 3] = \"receiving\";\n FormSubmissionState[FormSubmissionState[\"stopping\"] = 4] = \"stopping\";\n FormSubmissionState[FormSubmissionState[\"stopped\"] = 5] = \"stopped\";\n})(FormSubmissionState || (FormSubmissionState = {}));\nvar FormEnctype;\n(function (FormEnctype) {\n FormEnctype[\"urlEncoded\"] = \"application/x-www-form-urlencoded\";\n FormEnctype[\"multipart\"] = \"multipart/form-data\";\n FormEnctype[\"plain\"] = \"text/plain\";\n})(FormEnctype || (FormEnctype = {}));\nfunction formEnctypeFromString(encoding) {\n switch (encoding.toLowerCase()) {\n case FormEnctype.multipart:\n return FormEnctype.multipart;\n case FormEnctype.plain:\n return FormEnctype.plain;\n default:\n return FormEnctype.urlEncoded;\n }\n}\nclass FormSubmission {\n static confirmMethod(message, _element, _submitter) {\n return Promise.resolve(confirm(message));\n }\n constructor(delegate, formElement, submitter, mustRedirect = false) {\n this.state = FormSubmissionState.initialized;\n this.delegate = delegate;\n this.formElement = formElement;\n this.submitter = submitter;\n this.formData = buildFormData(formElement, submitter);\n this.location = expandURL(this.action);\n if (this.method == FetchMethod.get) {\n mergeFormDataEntries(this.location, [...this.body.entries()]);\n }\n this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);\n this.mustRedirect = mustRedirect;\n }\n get method() {\n var _a;\n const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formmethod\")) || this.formElement.getAttribute(\"method\") || \"\";\n return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;\n }\n get action() {\n var _a;\n const formElementAction = typeof this.formElement.action === \"string\" ? this.formElement.action : null;\n if ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"formaction\")) {\n return this.submitter.getAttribute(\"formaction\") || \"\";\n }\n else {\n return this.formElement.getAttribute(\"action\") || formElementAction || \"\";\n }\n }\n get body() {\n if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {\n return new URLSearchParams(this.stringFormData);\n }\n else {\n return this.formData;\n }\n }\n get enctype() {\n var _a;\n return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formenctype\")) || this.formElement.enctype);\n }\n get isSafe() {\n return this.fetchRequest.isSafe;\n }\n get stringFormData() {\n return [...this.formData].reduce((entries, [name, value]) => {\n return entries.concat(typeof value == \"string\" ? [[name, value]] : []);\n }, []);\n }\n async start() {\n const { initialized, requesting } = FormSubmissionState;\n const confirmationMessage = getAttribute(\"data-turbo-confirm\", this.submitter, this.formElement);\n if (typeof confirmationMessage === \"string\") {\n const answer = await FormSubmission.confirmMethod(confirmationMessage, this.formElement, this.submitter);\n if (!answer) {\n return;\n }\n }\n if (this.state == initialized) {\n this.state = requesting;\n return this.fetchRequest.perform();\n }\n }\n stop() {\n const { stopping, stopped } = FormSubmissionState;\n if (this.state != stopping && this.state != stopped) {\n this.state = stopping;\n this.fetchRequest.cancel();\n return true;\n }\n }\n prepareRequest(request) {\n if (!request.isSafe) {\n const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n if (token) {\n request.headers[\"X-CSRF-Token\"] = token;\n }\n }\n if (this.requestAcceptsTurboStreamResponse(request)) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n requestStarted(_request) {\n var _a;\n this.state = FormSubmissionState.waiting;\n (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.setAttribute(\"disabled\", \"\");\n this.setSubmitsWith();\n dispatch(\"turbo:submit-start\", {\n target: this.formElement,\n detail: { formSubmission: this },\n });\n this.delegate.formSubmissionStarted(this);\n }\n requestPreventedHandlingResponse(request, response) {\n this.result = { success: response.succeeded, fetchResponse: response };\n }\n requestSucceededWithResponse(request, response) {\n if (response.clientError || response.serverError) {\n this.delegate.formSubmissionFailedWithResponse(this, response);\n }\n else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n const error = new Error(\"Form responses must redirect to another location\");\n this.delegate.formSubmissionErrored(this, error);\n }\n else {\n this.state = FormSubmissionState.receiving;\n this.result = { success: true, fetchResponse: response };\n this.delegate.formSubmissionSucceededWithResponse(this, response);\n }\n }\n requestFailedWithResponse(request, response) {\n this.result = { success: false, fetchResponse: response };\n this.delegate.formSubmissionFailedWithResponse(this, response);\n }\n requestErrored(request, error) {\n this.result = { success: false, error };\n this.delegate.formSubmissionErrored(this, error);\n }\n requestFinished(_request) {\n var _a;\n this.state = FormSubmissionState.stopped;\n (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.removeAttribute(\"disabled\");\n this.resetSubmitterText();\n dispatch(\"turbo:submit-end\", {\n target: this.formElement,\n detail: Object.assign({ formSubmission: this }, this.result),\n });\n this.delegate.formSubmissionFinished(this);\n }\n setSubmitsWith() {\n if (!this.submitter || !this.submitsWith)\n return;\n if (this.submitter.matches(\"button\")) {\n this.originalSubmitText = this.submitter.innerHTML;\n this.submitter.innerHTML = this.submitsWith;\n }\n else if (this.submitter.matches(\"input\")) {\n const input = this.submitter;\n this.originalSubmitText = input.value;\n input.value = this.submitsWith;\n }\n }\n resetSubmitterText() {\n if (!this.submitter || !this.originalSubmitText)\n return;\n if (this.submitter.matches(\"button\")) {\n this.submitter.innerHTML = this.originalSubmitText;\n }\n else if (this.submitter.matches(\"input\")) {\n const input = this.submitter;\n input.value = this.originalSubmitText;\n }\n }\n requestMustRedirect(request) {\n return !request.isSafe && this.mustRedirect;\n }\n requestAcceptsTurboStreamResponse(request) {\n return !request.isSafe || hasAttribute(\"data-turbo-stream\", this.submitter, this.formElement);\n }\n get submitsWith() {\n var _a;\n return (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"data-turbo-submits-with\");\n }\n}\nfunction buildFormData(formElement, submitter) {\n const formData = new FormData(formElement);\n const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"name\");\n const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"value\");\n if (name) {\n formData.append(name, value || \"\");\n }\n return formData;\n}\nfunction getCookieValue(cookieName) {\n if (cookieName != null) {\n const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n const cookie = cookies.find((cookie) => cookie.startsWith(cookieName));\n if (cookie) {\n const value = cookie.split(\"=\").slice(1).join(\"=\");\n return value ? decodeURIComponent(value) : undefined;\n }\n }\n}\nfunction responseSucceededWithoutRedirect(response) {\n return response.statusCode == 200 && !response.redirected;\n}\nfunction mergeFormDataEntries(url, entries) {\n const searchParams = new URLSearchParams();\n for (const [name, value] of entries) {\n if (value instanceof File)\n continue;\n searchParams.append(name, value);\n }\n url.search = searchParams.toString();\n return url;\n}\n\nclass Snapshot {\n constructor(element) {\n this.element = element;\n }\n get activeElement() {\n return this.element.ownerDocument.activeElement;\n }\n get children() {\n return [...this.element.children];\n }\n hasAnchor(anchor) {\n return this.getElementForAnchor(anchor) != null;\n }\n getElementForAnchor(anchor) {\n return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null;\n }\n get isConnected() {\n return this.element.isConnected;\n }\n get firstAutofocusableElement() {\n const inertDisabledOrHidden = \"[inert], :disabled, [hidden], details:not([open]), dialog:not([open])\";\n for (const element of this.element.querySelectorAll(\"[autofocus]\")) {\n if (element.closest(inertDisabledOrHidden) == null)\n return element;\n else\n continue;\n }\n return null;\n }\n get permanentElements() {\n return queryPermanentElementsAll(this.element);\n }\n getPermanentElementById(id) {\n return getPermanentElementById(this.element, id);\n }\n getPermanentElementMapForSnapshot(snapshot) {\n const permanentElementMap = {};\n for (const currentPermanentElement of this.permanentElements) {\n const { id } = currentPermanentElement;\n const newPermanentElement = snapshot.getPermanentElementById(id);\n if (newPermanentElement) {\n permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n }\n }\n return permanentElementMap;\n }\n}\nfunction getPermanentElementById(node, id) {\n return node.querySelector(`#${id}[data-turbo-permanent]`);\n}\nfunction queryPermanentElementsAll(node) {\n return node.querySelectorAll(\"[id][data-turbo-permanent]\");\n}\n\nclass FormSubmitObserver {\n constructor(delegate, eventTarget) {\n this.started = false;\n this.submitCaptured = () => {\n this.eventTarget.removeEventListener(\"submit\", this.submitBubbled, false);\n this.eventTarget.addEventListener(\"submit\", this.submitBubbled, false);\n };\n this.submitBubbled = ((event) => {\n if (!event.defaultPrevented) {\n const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n const submitter = event.submitter || undefined;\n if (form &&\n submissionDoesNotDismissDialog(form, submitter) &&\n submissionDoesNotTargetIFrame(form, submitter) &&\n this.delegate.willSubmitForm(form, submitter)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.delegate.formSubmitted(form, submitter);\n }\n }\n });\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n start() {\n if (!this.started) {\n this.eventTarget.addEventListener(\"submit\", this.submitCaptured, true);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n this.eventTarget.removeEventListener(\"submit\", this.submitCaptured, true);\n this.started = false;\n }\n }\n}\nfunction submissionDoesNotDismissDialog(form, submitter) {\n const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.getAttribute(\"method\");\n return method != \"dialog\";\n}\nfunction submissionDoesNotTargetIFrame(form, submitter) {\n if ((submitter === null || submitter === void 0 ? void 0 : submitter.hasAttribute(\"formtarget\")) || form.hasAttribute(\"target\")) {\n const target = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formtarget\")) || form.target;\n for (const element of document.getElementsByName(target)) {\n if (element instanceof HTMLIFrameElement)\n return false;\n }\n return true;\n }\n else {\n return true;\n }\n}\n\nclass View {\n constructor(delegate, element) {\n this.resolveRenderPromise = (_value) => { };\n this.resolveInterceptionPromise = (_value) => { };\n this.delegate = delegate;\n this.element = element;\n }\n scrollToAnchor(anchor) {\n const element = this.snapshot.getElementForAnchor(anchor);\n if (element) {\n this.scrollToElement(element);\n this.focusElement(element);\n }\n else {\n this.scrollToPosition({ x: 0, y: 0 });\n }\n }\n scrollToAnchorFromLocation(location) {\n this.scrollToAnchor(getAnchor(location));\n }\n scrollToElement(element) {\n element.scrollIntoView();\n }\n focusElement(element) {\n if (element instanceof HTMLElement) {\n if (element.hasAttribute(\"tabindex\")) {\n element.focus();\n }\n else {\n element.setAttribute(\"tabindex\", \"-1\");\n element.focus();\n element.removeAttribute(\"tabindex\");\n }\n }\n }\n scrollToPosition({ x, y }) {\n this.scrollRoot.scrollTo(x, y);\n }\n scrollToTop() {\n this.scrollToPosition({ x: 0, y: 0 });\n }\n get scrollRoot() {\n return window;\n }\n async render(renderer) {\n const { isPreview, shouldRender, newSnapshot: snapshot } = renderer;\n if (shouldRender) {\n try {\n this.renderPromise = new Promise((resolve) => (this.resolveRenderPromise = resolve));\n this.renderer = renderer;\n await this.prepareToRenderSnapshot(renderer);\n const renderInterception = new Promise((resolve) => (this.resolveInterceptionPromise = resolve));\n const options = { resume: this.resolveInterceptionPromise, render: this.renderer.renderElement };\n const immediateRender = this.delegate.allowsImmediateRender(snapshot, options);\n if (!immediateRender)\n await renderInterception;\n await this.renderSnapshot(renderer);\n this.delegate.viewRenderedSnapshot(snapshot, isPreview);\n this.delegate.preloadOnLoadLinksForView(this.element);\n this.finishRenderingSnapshot(renderer);\n }\n finally {\n delete this.renderer;\n this.resolveRenderPromise(undefined);\n delete this.renderPromise;\n }\n }\n else {\n this.invalidate(renderer.reloadReason);\n }\n }\n invalidate(reason) {\n this.delegate.viewInvalidated(reason);\n }\n async prepareToRenderSnapshot(renderer) {\n this.markAsPreview(renderer.isPreview);\n await renderer.prepareToRender();\n }\n markAsPreview(isPreview) {\n if (isPreview) {\n this.element.setAttribute(\"data-turbo-preview\", \"\");\n }\n else {\n this.element.removeAttribute(\"data-turbo-preview\");\n }\n }\n async renderSnapshot(renderer) {\n await renderer.render();\n }\n finishRenderingSnapshot(renderer) {\n renderer.finishRendering();\n }\n}\n\nclass FrameView extends View {\n missing() {\n this.element.innerHTML = `Content missing`;\n }\n get snapshot() {\n return new Snapshot(this.element);\n }\n}\n\nclass LinkInterceptor {\n constructor(delegate, element) {\n this.clickBubbled = (event) => {\n if (this.respondsToEventTarget(event.target)) {\n this.clickEvent = event;\n }\n else {\n delete this.clickEvent;\n }\n };\n this.linkClicked = ((event) => {\n if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) {\n if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url, event.detail.originalEvent)) {\n this.clickEvent.preventDefault();\n event.preventDefault();\n this.delegate.linkClickIntercepted(event.target, event.detail.url, event.detail.originalEvent);\n }\n }\n delete this.clickEvent;\n });\n this.willVisit = ((_event) => {\n delete this.clickEvent;\n });\n this.delegate = delegate;\n this.element = element;\n }\n start() {\n this.element.addEventListener(\"click\", this.clickBubbled);\n document.addEventListener(\"turbo:click\", this.linkClicked);\n document.addEventListener(\"turbo:before-visit\", this.willVisit);\n }\n stop() {\n this.element.removeEventListener(\"click\", this.clickBubbled);\n document.removeEventListener(\"turbo:click\", this.linkClicked);\n document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n }\n respondsToEventTarget(target) {\n const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n return element && element.closest(\"turbo-frame, html\") == this.element;\n }\n}\n\nclass LinkClickObserver {\n constructor(delegate, eventTarget) {\n this.started = false;\n this.clickCaptured = () => {\n this.eventTarget.removeEventListener(\"click\", this.clickBubbled, false);\n this.eventTarget.addEventListener(\"click\", this.clickBubbled, false);\n };\n this.clickBubbled = (event) => {\n if (event instanceof MouseEvent && this.clickEventIsSignificant(event)) {\n const target = (event.composedPath && event.composedPath()[0]) || event.target;\n const link = this.findLinkFromClickTarget(target);\n if (link && doesNotTargetIFrame(link)) {\n const location = this.getLocationForLink(link);\n if (this.delegate.willFollowLinkToLocation(link, location, event)) {\n event.preventDefault();\n this.delegate.followedLinkToLocation(link, location);\n }\n }\n }\n };\n this.delegate = delegate;\n this.eventTarget = eventTarget;\n }\n start() {\n if (!this.started) {\n this.eventTarget.addEventListener(\"click\", this.clickCaptured, true);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n this.eventTarget.removeEventListener(\"click\", this.clickCaptured, true);\n this.started = false;\n }\n }\n clickEventIsSignificant(event) {\n return !((event.target && event.target.isContentEditable) ||\n event.defaultPrevented ||\n event.which > 1 ||\n event.altKey ||\n event.ctrlKey ||\n event.metaKey ||\n event.shiftKey);\n }\n findLinkFromClickTarget(target) {\n return findClosestRecursively(target, \"a[href]:not([target^=_]):not([download])\");\n }\n getLocationForLink(link) {\n return expandURL(link.getAttribute(\"href\") || \"\");\n }\n}\nfunction doesNotTargetIFrame(anchor) {\n if (anchor.hasAttribute(\"target\")) {\n for (const element of document.getElementsByName(anchor.target)) {\n if (element instanceof HTMLIFrameElement)\n return false;\n }\n return true;\n }\n else {\n return true;\n }\n}\n\nclass FormLinkClickObserver {\n constructor(delegate, element) {\n this.delegate = delegate;\n this.linkInterceptor = new LinkClickObserver(this, element);\n }\n start() {\n this.linkInterceptor.start();\n }\n stop() {\n this.linkInterceptor.stop();\n }\n willFollowLinkToLocation(link, location, originalEvent) {\n return (this.delegate.willSubmitFormLinkToLocation(link, location, originalEvent) &&\n link.hasAttribute(\"data-turbo-method\"));\n }\n followedLinkToLocation(link, location) {\n const form = document.createElement(\"form\");\n const type = \"hidden\";\n for (const [name, value] of location.searchParams) {\n form.append(Object.assign(document.createElement(\"input\"), { type, name, value }));\n }\n const action = Object.assign(location, { search: \"\" });\n form.setAttribute(\"data-turbo\", \"true\");\n form.setAttribute(\"action\", action.href);\n form.setAttribute(\"hidden\", \"\");\n const method = link.getAttribute(\"data-turbo-method\");\n if (method)\n form.setAttribute(\"method\", method);\n const turboFrame = link.getAttribute(\"data-turbo-frame\");\n if (turboFrame)\n form.setAttribute(\"data-turbo-frame\", turboFrame);\n const turboAction = getVisitAction(link);\n if (turboAction)\n form.setAttribute(\"data-turbo-action\", turboAction);\n const turboConfirm = link.getAttribute(\"data-turbo-confirm\");\n if (turboConfirm)\n form.setAttribute(\"data-turbo-confirm\", turboConfirm);\n const turboStream = link.hasAttribute(\"data-turbo-stream\");\n if (turboStream)\n form.setAttribute(\"data-turbo-stream\", \"\");\n this.delegate.submittedFormLinkToLocation(link, location, form);\n document.body.appendChild(form);\n form.addEventListener(\"turbo:submit-end\", () => form.remove(), { once: true });\n requestAnimationFrame(() => form.requestSubmit());\n }\n}\n\nclass Bardo {\n static async preservingPermanentElements(delegate, permanentElementMap, callback) {\n const bardo = new this(delegate, permanentElementMap);\n bardo.enter();\n await callback();\n bardo.leave();\n }\n constructor(delegate, permanentElementMap) {\n this.delegate = delegate;\n this.permanentElementMap = permanentElementMap;\n }\n enter() {\n for (const id in this.permanentElementMap) {\n const [currentPermanentElement, newPermanentElement] = this.permanentElementMap[id];\n this.delegate.enteringBardo(currentPermanentElement, newPermanentElement);\n this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n }\n }\n leave() {\n for (const id in this.permanentElementMap) {\n const [currentPermanentElement] = this.permanentElementMap[id];\n this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n this.delegate.leavingBardo(currentPermanentElement);\n }\n }\n replaceNewPermanentElementWithPlaceholder(permanentElement) {\n const placeholder = createPlaceholderForPermanentElement(permanentElement);\n permanentElement.replaceWith(placeholder);\n }\n replaceCurrentPermanentElementWithClone(permanentElement) {\n const clone = permanentElement.cloneNode(true);\n permanentElement.replaceWith(clone);\n }\n replacePlaceholderWithPermanentElement(permanentElement) {\n const placeholder = this.getPlaceholderById(permanentElement.id);\n placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);\n }\n getPlaceholderById(id) {\n return this.placeholders.find((element) => element.content == id);\n }\n get placeholders() {\n return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")];\n }\n}\nfunction createPlaceholderForPermanentElement(permanentElement) {\n const element = document.createElement(\"meta\");\n element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n element.setAttribute(\"content\", permanentElement.id);\n return element;\n}\n\nclass Renderer {\n constructor(currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n this.activeElement = null;\n this.currentSnapshot = currentSnapshot;\n this.newSnapshot = newSnapshot;\n this.isPreview = isPreview;\n this.willRender = willRender;\n this.renderElement = renderElement;\n this.promise = new Promise((resolve, reject) => (this.resolvingFunctions = { resolve, reject }));\n }\n get shouldRender() {\n return true;\n }\n get reloadReason() {\n return;\n }\n prepareToRender() {\n return;\n }\n finishRendering() {\n if (this.resolvingFunctions) {\n this.resolvingFunctions.resolve();\n delete this.resolvingFunctions;\n }\n }\n async preservingPermanentElements(callback) {\n await Bardo.preservingPermanentElements(this, this.permanentElementMap, callback);\n }\n focusFirstAutofocusableElement() {\n const element = this.connectedSnapshot.firstAutofocusableElement;\n if (elementIsFocusable(element)) {\n element.focus();\n }\n }\n enteringBardo(currentPermanentElement) {\n if (this.activeElement)\n return;\n if (currentPermanentElement.contains(this.currentSnapshot.activeElement)) {\n this.activeElement = this.currentSnapshot.activeElement;\n }\n }\n leavingBardo(currentPermanentElement) {\n if (currentPermanentElement.contains(this.activeElement) && this.activeElement instanceof HTMLElement) {\n this.activeElement.focus();\n this.activeElement = null;\n }\n }\n get connectedSnapshot() {\n return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n }\n get currentElement() {\n return this.currentSnapshot.element;\n }\n get newElement() {\n return this.newSnapshot.element;\n }\n get permanentElementMap() {\n return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n }\n}\nfunction elementIsFocusable(element) {\n return element && typeof element.focus == \"function\";\n}\n\nclass FrameRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n var _a;\n const destinationRange = document.createRange();\n destinationRange.selectNodeContents(currentElement);\n destinationRange.deleteContents();\n const frameElement = newElement;\n const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();\n if (sourceRange) {\n sourceRange.selectNodeContents(frameElement);\n currentElement.appendChild(sourceRange.extractContents());\n }\n }\n constructor(delegate, currentSnapshot, newSnapshot, renderElement, isPreview, willRender = true) {\n super(currentSnapshot, newSnapshot, renderElement, isPreview, willRender);\n this.delegate = delegate;\n }\n get shouldRender() {\n return true;\n }\n async render() {\n await nextAnimationFrame();\n this.preservingPermanentElements(() => {\n this.loadFrameElement();\n });\n this.scrollFrameIntoView();\n await nextAnimationFrame();\n this.focusFirstAutofocusableElement();\n await nextAnimationFrame();\n this.activateScriptElements();\n }\n loadFrameElement() {\n this.delegate.willRenderFrame(this.currentElement, this.newElement);\n this.renderElement(this.currentElement, this.newElement);\n }\n scrollFrameIntoView() {\n if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n const element = this.currentElement.firstElementChild;\n const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n const behavior = readScrollBehavior(this.currentElement.getAttribute(\"data-autoscroll-behavior\"), \"auto\");\n if (element) {\n element.scrollIntoView({ block, behavior });\n return true;\n }\n }\n return false;\n }\n activateScriptElements() {\n for (const inertScriptElement of this.newScriptElements) {\n const activatedScriptElement = activateScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n get newScriptElements() {\n return this.currentElement.querySelectorAll(\"script\");\n }\n}\nfunction readScrollLogicalPosition(value, defaultValue) {\n if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n return value;\n }\n else {\n return defaultValue;\n }\n}\nfunction readScrollBehavior(value, defaultValue) {\n if (value == \"auto\" || value == \"smooth\") {\n return value;\n }\n else {\n return defaultValue;\n }\n}\n\nclass ProgressBar {\n static get defaultCSS() {\n return unindent `\n .turbo-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 2147483647;\n transition:\n width ${ProgressBar.animationDuration}ms ease-out,\n opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n transform: translate3d(0, 0, 0);\n }\n `;\n }\n constructor() {\n this.hiding = false;\n this.value = 0;\n this.visible = false;\n this.trickle = () => {\n this.setValue(this.value + Math.random() / 100);\n };\n this.stylesheetElement = this.createStylesheetElement();\n this.progressElement = this.createProgressElement();\n this.installStylesheetElement();\n this.setValue(0);\n }\n show() {\n if (!this.visible) {\n this.visible = true;\n this.installProgressElement();\n this.startTrickling();\n }\n }\n hide() {\n if (this.visible && !this.hiding) {\n this.hiding = true;\n this.fadeProgressElement(() => {\n this.uninstallProgressElement();\n this.stopTrickling();\n this.visible = false;\n this.hiding = false;\n });\n }\n }\n setValue(value) {\n this.value = value;\n this.refresh();\n }\n installStylesheetElement() {\n document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n }\n installProgressElement() {\n this.progressElement.style.width = \"0\";\n this.progressElement.style.opacity = \"1\";\n document.documentElement.insertBefore(this.progressElement, document.body);\n this.refresh();\n }\n fadeProgressElement(callback) {\n this.progressElement.style.opacity = \"0\";\n setTimeout(callback, ProgressBar.animationDuration * 1.5);\n }\n uninstallProgressElement() {\n if (this.progressElement.parentNode) {\n document.documentElement.removeChild(this.progressElement);\n }\n }\n startTrickling() {\n if (!this.trickleInterval) {\n this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n }\n }\n stopTrickling() {\n window.clearInterval(this.trickleInterval);\n delete this.trickleInterval;\n }\n refresh() {\n requestAnimationFrame(() => {\n this.progressElement.style.width = `${10 + this.value * 90}%`;\n });\n }\n createStylesheetElement() {\n const element = document.createElement(\"style\");\n element.type = \"text/css\";\n element.textContent = ProgressBar.defaultCSS;\n if (this.cspNonce) {\n element.nonce = this.cspNonce;\n }\n return element;\n }\n createProgressElement() {\n const element = document.createElement(\"div\");\n element.className = \"turbo-progress-bar\";\n return element;\n }\n get cspNonce() {\n return getMetaContent(\"csp-nonce\");\n }\n}\nProgressBar.animationDuration = 300;\n\nclass HeadSnapshot extends Snapshot {\n constructor() {\n super(...arguments);\n this.detailsByOuterHTML = this.children\n .filter((element) => !elementIsNoscript(element))\n .map((element) => elementWithoutNonce(element))\n .reduce((result, element) => {\n const { outerHTML } = element;\n const details = outerHTML in result\n ? result[outerHTML]\n : {\n type: elementType(element),\n tracked: elementIsTracked(element),\n elements: [],\n };\n return Object.assign(Object.assign({}, result), { [outerHTML]: Object.assign(Object.assign({}, details), { elements: [...details.elements, element] }) });\n }, {});\n }\n get trackedElementSignature() {\n return Object.keys(this.detailsByOuterHTML)\n .filter((outerHTML) => this.detailsByOuterHTML[outerHTML].tracked)\n .join(\"\");\n }\n getScriptElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n }\n getStylesheetElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n }\n getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n return Object.keys(this.detailsByOuterHTML)\n .filter((outerHTML) => !(outerHTML in snapshot.detailsByOuterHTML))\n .map((outerHTML) => this.detailsByOuterHTML[outerHTML])\n .filter(({ type }) => type == matchedType)\n .map(({ elements: [element] }) => element);\n }\n get provisionalElements() {\n return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n const { type, tracked, elements } = this.detailsByOuterHTML[outerHTML];\n if (type == null && !tracked) {\n return [...result, ...elements];\n }\n else if (elements.length > 1) {\n return [...result, ...elements.slice(1)];\n }\n else {\n return result;\n }\n }, []);\n }\n getMetaValue(name) {\n const element = this.findMetaElementByName(name);\n return element ? element.getAttribute(\"content\") : null;\n }\n findMetaElementByName(name) {\n return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n const { elements: [element], } = this.detailsByOuterHTML[outerHTML];\n return elementIsMetaElementWithName(element, name) ? element : result;\n }, undefined);\n }\n}\nfunction elementType(element) {\n if (elementIsScript(element)) {\n return \"script\";\n }\n else if (elementIsStylesheet(element)) {\n return \"stylesheet\";\n }\n}\nfunction elementIsTracked(element) {\n return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\nfunction elementIsScript(element) {\n const tagName = element.localName;\n return tagName == \"script\";\n}\nfunction elementIsNoscript(element) {\n const tagName = element.localName;\n return tagName == \"noscript\";\n}\nfunction elementIsStylesheet(element) {\n const tagName = element.localName;\n return tagName == \"style\" || (tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\");\n}\nfunction elementIsMetaElementWithName(element, name) {\n const tagName = element.localName;\n return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\nfunction elementWithoutNonce(element) {\n if (element.hasAttribute(\"nonce\")) {\n element.setAttribute(\"nonce\", \"\");\n }\n return element;\n}\n\nclass PageSnapshot extends Snapshot {\n static fromHTMLString(html = \"\") {\n return this.fromDocument(parseHTMLDocument(html));\n }\n static fromElement(element) {\n return this.fromDocument(element.ownerDocument);\n }\n static fromDocument({ head, body }) {\n return new this(body, new HeadSnapshot(head));\n }\n constructor(element, headSnapshot) {\n super(element);\n this.headSnapshot = headSnapshot;\n }\n clone() {\n const clonedElement = this.element.cloneNode(true);\n const selectElements = this.element.querySelectorAll(\"select\");\n const clonedSelectElements = clonedElement.querySelectorAll(\"select\");\n for (const [index, source] of selectElements.entries()) {\n const clone = clonedSelectElements[index];\n for (const option of clone.selectedOptions)\n option.selected = false;\n for (const option of source.selectedOptions)\n clone.options[option.index].selected = true;\n }\n for (const clonedPasswordInput of clonedElement.querySelectorAll('input[type=\"password\"]')) {\n clonedPasswordInput.value = \"\";\n }\n return new PageSnapshot(clonedElement, this.headSnapshot);\n }\n get headElement() {\n return this.headSnapshot.element;\n }\n get rootLocation() {\n var _a;\n const root = (_a = this.getSetting(\"root\")) !== null && _a !== void 0 ? _a : \"/\";\n return expandURL(root);\n }\n get cacheControlValue() {\n return this.getSetting(\"cache-control\");\n }\n get isPreviewable() {\n return this.cacheControlValue != \"no-preview\";\n }\n get isCacheable() {\n return this.cacheControlValue != \"no-cache\";\n }\n get isVisitable() {\n return this.getSetting(\"visit-control\") != \"reload\";\n }\n getSetting(name) {\n return this.headSnapshot.getMetaValue(`turbo-${name}`);\n }\n}\n\nvar TimingMetric;\n(function (TimingMetric) {\n TimingMetric[\"visitStart\"] = \"visitStart\";\n TimingMetric[\"requestStart\"] = \"requestStart\";\n TimingMetric[\"requestEnd\"] = \"requestEnd\";\n TimingMetric[\"visitEnd\"] = \"visitEnd\";\n})(TimingMetric || (TimingMetric = {}));\nvar VisitState;\n(function (VisitState) {\n VisitState[\"initialized\"] = \"initialized\";\n VisitState[\"started\"] = \"started\";\n VisitState[\"canceled\"] = \"canceled\";\n VisitState[\"failed\"] = \"failed\";\n VisitState[\"completed\"] = \"completed\";\n})(VisitState || (VisitState = {}));\nconst defaultOptions = {\n action: \"advance\",\n historyChanged: false,\n visitCachedSnapshot: () => { },\n willRender: true,\n updateHistory: true,\n shouldCacheSnapshot: true,\n acceptsStreamResponse: false,\n};\nvar SystemStatusCode;\n(function (SystemStatusCode) {\n SystemStatusCode[SystemStatusCode[\"networkFailure\"] = 0] = \"networkFailure\";\n SystemStatusCode[SystemStatusCode[\"timeoutFailure\"] = -1] = \"timeoutFailure\";\n SystemStatusCode[SystemStatusCode[\"contentTypeMismatch\"] = -2] = \"contentTypeMismatch\";\n})(SystemStatusCode || (SystemStatusCode = {}));\nclass Visit {\n constructor(delegate, location, restorationIdentifier, options = {}) {\n this.identifier = uuid();\n this.timingMetrics = {};\n this.followedRedirect = false;\n this.historyChanged = false;\n this.scrolled = false;\n this.shouldCacheSnapshot = true;\n this.acceptsStreamResponse = false;\n this.snapshotCached = false;\n this.state = VisitState.initialized;\n this.delegate = delegate;\n this.location = location;\n this.restorationIdentifier = restorationIdentifier || uuid();\n const { action, historyChanged, referrer, snapshot, snapshotHTML, response, visitCachedSnapshot, willRender, updateHistory, shouldCacheSnapshot, acceptsStreamResponse, } = Object.assign(Object.assign({}, defaultOptions), options);\n this.action = action;\n this.historyChanged = historyChanged;\n this.referrer = referrer;\n this.snapshot = snapshot;\n this.snapshotHTML = snapshotHTML;\n this.response = response;\n this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);\n this.visitCachedSnapshot = visitCachedSnapshot;\n this.willRender = willRender;\n this.updateHistory = updateHistory;\n this.scrolled = !willRender;\n this.shouldCacheSnapshot = shouldCacheSnapshot;\n this.acceptsStreamResponse = acceptsStreamResponse;\n }\n get adapter() {\n return this.delegate.adapter;\n }\n get view() {\n return this.delegate.view;\n }\n get history() {\n return this.delegate.history;\n }\n get restorationData() {\n return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n }\n get silent() {\n return this.isSamePage;\n }\n start() {\n if (this.state == VisitState.initialized) {\n this.recordTimingMetric(TimingMetric.visitStart);\n this.state = VisitState.started;\n this.adapter.visitStarted(this);\n this.delegate.visitStarted(this);\n }\n }\n cancel() {\n if (this.state == VisitState.started) {\n if (this.request) {\n this.request.cancel();\n }\n this.cancelRender();\n this.state = VisitState.canceled;\n }\n }\n complete() {\n if (this.state == VisitState.started) {\n this.recordTimingMetric(TimingMetric.visitEnd);\n this.state = VisitState.completed;\n this.followRedirect();\n if (!this.followedRedirect) {\n this.adapter.visitCompleted(this);\n this.delegate.visitCompleted(this);\n }\n }\n }\n fail() {\n if (this.state == VisitState.started) {\n this.state = VisitState.failed;\n this.adapter.visitFailed(this);\n }\n }\n changeHistory() {\n var _a;\n if (!this.historyChanged && this.updateHistory) {\n const actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? \"replace\" : this.action;\n const method = getHistoryMethodForAction(actionForHistory);\n this.history.update(method, this.location, this.restorationIdentifier);\n this.historyChanged = true;\n }\n }\n issueRequest() {\n if (this.hasPreloadedResponse()) {\n this.simulateRequest();\n }\n else if (this.shouldIssueRequest() && !this.request) {\n this.request = new FetchRequest(this, FetchMethod.get, this.location);\n this.request.perform();\n }\n }\n simulateRequest() {\n if (this.response) {\n this.startRequest();\n this.recordResponse();\n this.finishRequest();\n }\n }\n startRequest() {\n this.recordTimingMetric(TimingMetric.requestStart);\n this.adapter.visitRequestStarted(this);\n }\n recordResponse(response = this.response) {\n this.response = response;\n if (response) {\n const { statusCode } = response;\n if (isSuccessful(statusCode)) {\n this.adapter.visitRequestCompleted(this);\n }\n else {\n this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n }\n }\n }\n finishRequest() {\n this.recordTimingMetric(TimingMetric.requestEnd);\n this.adapter.visitRequestFinished(this);\n }\n loadResponse() {\n if (this.response) {\n const { statusCode, responseHTML } = this.response;\n this.render(async () => {\n if (this.shouldCacheSnapshot)\n this.cacheSnapshot();\n if (this.view.renderPromise)\n await this.view.renderPromise;\n if (isSuccessful(statusCode) && responseHTML != null) {\n await this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML), false, this.willRender, this);\n this.performScroll();\n this.adapter.visitRendered(this);\n this.complete();\n }\n else {\n await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML), this);\n this.adapter.visitRendered(this);\n this.fail();\n }\n });\n }\n }\n getCachedSnapshot() {\n const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n if (this.action == \"restore\" || snapshot.isPreviewable) {\n return snapshot;\n }\n }\n }\n getPreloadedSnapshot() {\n if (this.snapshotHTML) {\n return PageSnapshot.fromHTMLString(this.snapshotHTML);\n }\n }\n hasCachedSnapshot() {\n return this.getCachedSnapshot() != null;\n }\n loadCachedSnapshot() {\n const snapshot = this.getCachedSnapshot();\n if (snapshot) {\n const isPreview = this.shouldIssueRequest();\n this.render(async () => {\n this.cacheSnapshot();\n if (this.isSamePage) {\n this.adapter.visitRendered(this);\n }\n else {\n if (this.view.renderPromise)\n await this.view.renderPromise;\n await this.view.renderPage(snapshot, isPreview, this.willRender, this);\n this.performScroll();\n this.adapter.visitRendered(this);\n if (!isPreview) {\n this.complete();\n }\n }\n });\n }\n }\n followRedirect() {\n var _a;\n if (this.redirectedToLocation && !this.followedRedirect && ((_a = this.response) === null || _a === void 0 ? void 0 : _a.redirected)) {\n this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n action: \"replace\",\n response: this.response,\n shouldCacheSnapshot: false,\n willRender: false,\n });\n this.followedRedirect = true;\n }\n }\n goToSamePageAnchor() {\n if (this.isSamePage) {\n this.render(async () => {\n this.cacheSnapshot();\n this.performScroll();\n this.changeHistory();\n this.adapter.visitRendered(this);\n });\n }\n }\n prepareRequest(request) {\n if (this.acceptsStreamResponse) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n requestStarted() {\n this.startRequest();\n }\n requestPreventedHandlingResponse(_request, _response) { }\n async requestSucceededWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const { redirected, statusCode } = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected,\n });\n }\n else {\n this.redirectedToLocation = response.redirected ? response.location : undefined;\n this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n }\n }\n async requestFailedWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const { redirected, statusCode } = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected,\n });\n }\n else {\n this.recordResponse({ statusCode: statusCode, responseHTML, redirected });\n }\n }\n requestErrored(_request, _error) {\n this.recordResponse({\n statusCode: SystemStatusCode.networkFailure,\n redirected: false,\n });\n }\n requestFinished() {\n this.finishRequest();\n }\n performScroll() {\n if (!this.scrolled && !this.view.forceReloaded) {\n if (this.action == \"restore\") {\n this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n }\n else {\n this.scrollToAnchor() || this.view.scrollToTop();\n }\n if (this.isSamePage) {\n this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n }\n this.scrolled = true;\n }\n }\n scrollToRestoredPosition() {\n const { scrollPosition } = this.restorationData;\n if (scrollPosition) {\n this.view.scrollToPosition(scrollPosition);\n return true;\n }\n }\n scrollToAnchor() {\n const anchor = getAnchor(this.location);\n if (anchor != null) {\n this.view.scrollToAnchor(anchor);\n return true;\n }\n }\n recordTimingMetric(metric) {\n this.timingMetrics[metric] = new Date().getTime();\n }\n getTimingMetrics() {\n return Object.assign({}, this.timingMetrics);\n }\n getHistoryMethodForAction(action) {\n switch (action) {\n case \"replace\":\n return history.replaceState;\n case \"advance\":\n case \"restore\":\n return history.pushState;\n }\n }\n hasPreloadedResponse() {\n return typeof this.response == \"object\";\n }\n shouldIssueRequest() {\n if (this.isSamePage) {\n return false;\n }\n else if (this.action == \"restore\") {\n return !this.hasCachedSnapshot();\n }\n else {\n return this.willRender;\n }\n }\n cacheSnapshot() {\n if (!this.snapshotCached) {\n this.view.cacheSnapshot(this.snapshot).then((snapshot) => snapshot && this.visitCachedSnapshot(snapshot));\n this.snapshotCached = true;\n }\n }\n async render(callback) {\n this.cancelRender();\n await new Promise((resolve) => {\n this.frame = requestAnimationFrame(() => resolve());\n });\n await callback();\n delete this.frame;\n }\n cancelRender() {\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n delete this.frame;\n }\n }\n}\nfunction isSuccessful(statusCode) {\n return statusCode >= 200 && statusCode < 300;\n}\n\nclass BrowserAdapter {\n constructor(session) {\n this.progressBar = new ProgressBar();\n this.showProgressBar = () => {\n this.progressBar.show();\n };\n this.session = session;\n }\n visitProposedToLocation(location, options) {\n this.navigator.startVisit(location, (options === null || options === void 0 ? void 0 : options.restorationIdentifier) || uuid(), options);\n }\n visitStarted(visit) {\n this.location = visit.location;\n visit.loadCachedSnapshot();\n visit.issueRequest();\n visit.goToSamePageAnchor();\n }\n visitRequestStarted(visit) {\n this.progressBar.setValue(0);\n if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n this.showVisitProgressBarAfterDelay();\n }\n else {\n this.showProgressBar();\n }\n }\n visitRequestCompleted(visit) {\n visit.loadResponse();\n }\n visitRequestFailedWithStatusCode(visit, statusCode) {\n switch (statusCode) {\n case SystemStatusCode.networkFailure:\n case SystemStatusCode.timeoutFailure:\n case SystemStatusCode.contentTypeMismatch:\n return this.reload({\n reason: \"request_failed\",\n context: {\n statusCode,\n },\n });\n default:\n return visit.loadResponse();\n }\n }\n visitRequestFinished(_visit) {\n this.progressBar.setValue(1);\n this.hideVisitProgressBar();\n }\n visitCompleted(_visit) { }\n pageInvalidated(reason) {\n this.reload(reason);\n }\n visitFailed(_visit) { }\n visitRendered(_visit) { }\n formSubmissionStarted(_formSubmission) {\n this.progressBar.setValue(0);\n this.showFormProgressBarAfterDelay();\n }\n formSubmissionFinished(_formSubmission) {\n this.progressBar.setValue(1);\n this.hideFormProgressBar();\n }\n showVisitProgressBarAfterDelay() {\n this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n hideVisitProgressBar() {\n this.progressBar.hide();\n if (this.visitProgressBarTimeout != null) {\n window.clearTimeout(this.visitProgressBarTimeout);\n delete this.visitProgressBarTimeout;\n }\n }\n showFormProgressBarAfterDelay() {\n if (this.formProgressBarTimeout == null) {\n this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n }\n hideFormProgressBar() {\n this.progressBar.hide();\n if (this.formProgressBarTimeout != null) {\n window.clearTimeout(this.formProgressBarTimeout);\n delete this.formProgressBarTimeout;\n }\n }\n reload(reason) {\n var _a;\n dispatch(\"turbo:reload\", { detail: reason });\n window.location.href = ((_a = this.location) === null || _a === void 0 ? void 0 : _a.toString()) || window.location.href;\n }\n get navigator() {\n return this.session.navigator;\n }\n}\n\nclass CacheObserver {\n constructor() {\n this.selector = \"[data-turbo-temporary]\";\n this.deprecatedSelector = \"[data-turbo-cache=false]\";\n this.started = false;\n this.removeTemporaryElements = ((_event) => {\n for (const element of this.temporaryElements) {\n element.remove();\n }\n });\n }\n start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-cache\", this.removeTemporaryElements, false);\n }\n }\n get temporaryElements() {\n return [...document.querySelectorAll(this.selector), ...this.temporaryElementsWithDeprecation];\n }\n get temporaryElementsWithDeprecation() {\n const elements = document.querySelectorAll(this.deprecatedSelector);\n if (elements.length) {\n console.warn(`The ${this.deprecatedSelector} selector is deprecated and will be removed in a future version. Use ${this.selector} instead.`);\n }\n return [...elements];\n }\n}\n\nclass FrameRedirector {\n constructor(session, element) {\n this.session = session;\n this.element = element;\n this.linkInterceptor = new LinkInterceptor(this, element);\n this.formSubmitObserver = new FormSubmitObserver(this, element);\n }\n start() {\n this.linkInterceptor.start();\n this.formSubmitObserver.start();\n }\n stop() {\n this.linkInterceptor.stop();\n this.formSubmitObserver.stop();\n }\n shouldInterceptLinkClick(element, _location, _event) {\n return this.shouldRedirect(element);\n }\n linkClickIntercepted(element, url, event) {\n const frame = this.findFrameElement(element);\n if (frame) {\n frame.delegate.linkClickIntercepted(element, url, event);\n }\n }\n willSubmitForm(element, submitter) {\n return (element.closest(\"turbo-frame\") == null &&\n this.shouldSubmit(element, submitter) &&\n this.shouldRedirect(element, submitter));\n }\n formSubmitted(element, submitter) {\n const frame = this.findFrameElement(element, submitter);\n if (frame) {\n frame.delegate.formSubmitted(element, submitter);\n }\n }\n shouldSubmit(form, submitter) {\n var _a;\n const action = getAction(form, submitter);\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const rootLocation = expandURL((_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\");\n return this.shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);\n }\n shouldRedirect(element, submitter) {\n const isNavigatable = element instanceof HTMLFormElement\n ? this.session.submissionIsNavigatable(element, submitter)\n : this.session.elementIsNavigatable(element);\n if (isNavigatable) {\n const frame = this.findFrameElement(element, submitter);\n return frame ? frame != element.closest(\"turbo-frame\") : false;\n }\n else {\n return false;\n }\n }\n findFrameElement(element, submitter) {\n const id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\");\n if (id && id != \"_top\") {\n const frame = this.element.querySelector(`#${id}:not([disabled])`);\n if (frame instanceof FrameElement) {\n return frame;\n }\n }\n }\n}\n\nclass History {\n constructor(delegate) {\n this.restorationIdentifier = uuid();\n this.restorationData = {};\n this.started = false;\n this.pageLoaded = false;\n this.onPopState = (event) => {\n if (this.shouldHandlePopState()) {\n const { turbo } = event.state || {};\n if (turbo) {\n this.location = new URL(window.location.href);\n const { restorationIdentifier } = turbo;\n this.restorationIdentifier = restorationIdentifier;\n this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location, restorationIdentifier);\n }\n }\n };\n this.onPageLoad = async (_event) => {\n await nextMicrotask();\n this.pageLoaded = true;\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"popstate\", this.onPopState, false);\n addEventListener(\"load\", this.onPageLoad, false);\n this.started = true;\n this.replace(new URL(window.location.href));\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"popstate\", this.onPopState, false);\n removeEventListener(\"load\", this.onPageLoad, false);\n this.started = false;\n }\n }\n push(location, restorationIdentifier) {\n this.update(history.pushState, location, restorationIdentifier);\n }\n replace(location, restorationIdentifier) {\n this.update(history.replaceState, location, restorationIdentifier);\n }\n update(method, location, restorationIdentifier = uuid()) {\n const state = { turbo: { restorationIdentifier } };\n method.call(history, state, \"\", location.href);\n this.location = location;\n this.restorationIdentifier = restorationIdentifier;\n }\n getRestorationDataForIdentifier(restorationIdentifier) {\n return this.restorationData[restorationIdentifier] || {};\n }\n updateRestorationData(additionalData) {\n const { restorationIdentifier } = this;\n const restorationData = this.restorationData[restorationIdentifier];\n this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);\n }\n assumeControlOfScrollRestoration() {\n var _a;\n if (!this.previousScrollRestoration) {\n this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : \"auto\";\n history.scrollRestoration = \"manual\";\n }\n }\n relinquishControlOfScrollRestoration() {\n if (this.previousScrollRestoration) {\n history.scrollRestoration = this.previousScrollRestoration;\n delete this.previousScrollRestoration;\n }\n }\n shouldHandlePopState() {\n return this.pageIsLoaded();\n }\n pageIsLoaded() {\n return this.pageLoaded || document.readyState == \"complete\";\n }\n}\n\nclass Navigator {\n constructor(delegate) {\n this.delegate = delegate;\n }\n proposeVisit(location, options = {}) {\n if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n if (locationIsVisitable(location, this.view.snapshot.rootLocation)) {\n this.delegate.visitProposedToLocation(location, options);\n }\n else {\n window.location.href = location.toString();\n }\n }\n }\n startVisit(locatable, restorationIdentifier, options = {}) {\n this.stop();\n this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({ referrer: this.location }, options));\n this.currentVisit.start();\n }\n submitForm(form, submitter) {\n this.stop();\n this.formSubmission = new FormSubmission(this, form, submitter, true);\n this.formSubmission.start();\n }\n stop() {\n if (this.formSubmission) {\n this.formSubmission.stop();\n delete this.formSubmission;\n }\n if (this.currentVisit) {\n this.currentVisit.cancel();\n delete this.currentVisit;\n }\n }\n get adapter() {\n return this.delegate.adapter;\n }\n get view() {\n return this.delegate.view;\n }\n get history() {\n return this.delegate.history;\n }\n formSubmissionStarted(formSubmission) {\n if (typeof this.adapter.formSubmissionStarted === \"function\") {\n this.adapter.formSubmissionStarted(formSubmission);\n }\n }\n async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n if (formSubmission == this.formSubmission) {\n const responseHTML = await fetchResponse.responseHTML;\n if (responseHTML) {\n const shouldCacheSnapshot = formSubmission.isSafe;\n if (!shouldCacheSnapshot) {\n this.view.clearSnapshotCache();\n }\n const { statusCode, redirected } = fetchResponse;\n const action = this.getActionForFormSubmission(formSubmission);\n const visitOptions = {\n action,\n shouldCacheSnapshot,\n response: { statusCode, responseHTML, redirected },\n };\n this.proposeVisit(fetchResponse.location, visitOptions);\n }\n }\n }\n async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n const responseHTML = await fetchResponse.responseHTML;\n if (responseHTML) {\n const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n if (fetchResponse.serverError) {\n await this.view.renderError(snapshot, this.currentVisit);\n }\n else {\n await this.view.renderPage(snapshot, false, true, this.currentVisit);\n }\n this.view.scrollToTop();\n this.view.clearSnapshotCache();\n }\n }\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n formSubmissionFinished(formSubmission) {\n if (typeof this.adapter.formSubmissionFinished === \"function\") {\n this.adapter.formSubmissionFinished(formSubmission);\n }\n }\n visitStarted(visit) {\n this.delegate.visitStarted(visit);\n }\n visitCompleted(visit) {\n this.delegate.visitCompleted(visit);\n }\n locationWithActionIsSamePage(location, action) {\n const anchor = getAnchor(location);\n const currentAnchor = getAnchor(this.view.lastRenderedLocation);\n const isRestorationToTop = action === \"restore\" && typeof anchor === \"undefined\";\n return (action !== \"replace\" &&\n getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) &&\n (isRestorationToTop || (anchor != null && anchor !== currentAnchor)));\n }\n visitScrolledToSamePageLocation(oldURL, newURL) {\n this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n }\n get location() {\n return this.history.location;\n }\n get restorationIdentifier() {\n return this.history.restorationIdentifier;\n }\n getActionForFormSubmission({ submitter, formElement }) {\n return getVisitAction(submitter, formElement) || \"advance\";\n }\n}\n\nvar PageStage;\n(function (PageStage) {\n PageStage[PageStage[\"initial\"] = 0] = \"initial\";\n PageStage[PageStage[\"loading\"] = 1] = \"loading\";\n PageStage[PageStage[\"interactive\"] = 2] = \"interactive\";\n PageStage[PageStage[\"complete\"] = 3] = \"complete\";\n})(PageStage || (PageStage = {}));\nclass PageObserver {\n constructor(delegate) {\n this.stage = PageStage.initial;\n this.started = false;\n this.interpretReadyState = () => {\n const { readyState } = this;\n if (readyState == \"interactive\") {\n this.pageIsInteractive();\n }\n else if (readyState == \"complete\") {\n this.pageIsComplete();\n }\n };\n this.pageWillUnload = () => {\n this.delegate.pageWillUnload();\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n if (this.stage == PageStage.initial) {\n this.stage = PageStage.loading;\n }\n document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n addEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n removeEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = false;\n }\n }\n pageIsInteractive() {\n if (this.stage == PageStage.loading) {\n this.stage = PageStage.interactive;\n this.delegate.pageBecameInteractive();\n }\n }\n pageIsComplete() {\n this.pageIsInteractive();\n if (this.stage == PageStage.interactive) {\n this.stage = PageStage.complete;\n this.delegate.pageLoaded();\n }\n }\n get readyState() {\n return document.readyState;\n }\n}\n\nclass ScrollObserver {\n constructor(delegate) {\n this.started = false;\n this.onScroll = () => {\n this.updatePosition({ x: window.pageXOffset, y: window.pageYOffset });\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"scroll\", this.onScroll, false);\n this.onScroll();\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"scroll\", this.onScroll, false);\n this.started = false;\n }\n }\n updatePosition(position) {\n this.delegate.scrollPositionChanged(position);\n }\n}\n\nclass StreamMessageRenderer {\n render({ fragment }) {\n Bardo.preservingPermanentElements(this, getPermanentElementMapForFragment(fragment), () => document.documentElement.appendChild(fragment));\n }\n enteringBardo(currentPermanentElement, newPermanentElement) {\n newPermanentElement.replaceWith(currentPermanentElement.cloneNode(true));\n }\n leavingBardo() { }\n}\nfunction getPermanentElementMapForFragment(fragment) {\n const permanentElementsInDocument = queryPermanentElementsAll(document.documentElement);\n const permanentElementMap = {};\n for (const permanentElementInDocument of permanentElementsInDocument) {\n const { id } = permanentElementInDocument;\n for (const streamElement of fragment.querySelectorAll(\"turbo-stream\")) {\n const elementInStream = getPermanentElementById(streamElement.templateElement.content, id);\n if (elementInStream) {\n permanentElementMap[id] = [permanentElementInDocument, elementInStream];\n }\n }\n }\n return permanentElementMap;\n}\n\nclass StreamObserver {\n constructor(delegate) {\n this.sources = new Set();\n this.started = false;\n this.inspectFetchResponse = ((event) => {\n const response = fetchResponseFromEvent(event);\n if (response && fetchResponseIsStream(response)) {\n event.preventDefault();\n this.receiveMessageResponse(response);\n }\n });\n this.receiveMessageEvent = (event) => {\n if (this.started && typeof event.data == \"string\") {\n this.receiveMessageHTML(event.data);\n }\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n connectStreamSource(source) {\n if (!this.streamSourceIsConnected(source)) {\n this.sources.add(source);\n source.addEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n disconnectStreamSource(source) {\n if (this.streamSourceIsConnected(source)) {\n this.sources.delete(source);\n source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n streamSourceIsConnected(source) {\n return this.sources.has(source);\n }\n async receiveMessageResponse(response) {\n const html = await response.responseHTML;\n if (html) {\n this.receiveMessageHTML(html);\n }\n }\n receiveMessageHTML(html) {\n this.delegate.receivedMessageFromStream(StreamMessage.wrap(html));\n }\n}\nfunction fetchResponseFromEvent(event) {\n var _a;\n const fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;\n if (fetchResponse instanceof FetchResponse) {\n return fetchResponse;\n }\n}\nfunction fetchResponseIsStream(response) {\n var _a;\n const contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : \"\";\n return contentType.startsWith(StreamMessage.contentType);\n}\n\nclass ErrorRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n const { documentElement, body } = document;\n documentElement.replaceChild(newElement, body);\n }\n async render() {\n this.replaceHeadAndBody();\n this.activateScriptElements();\n }\n replaceHeadAndBody() {\n const { documentElement, head } = document;\n documentElement.replaceChild(this.newHead, head);\n this.renderElement(this.currentElement, this.newElement);\n }\n activateScriptElements() {\n for (const replaceableElement of this.scriptElements) {\n const parentNode = replaceableElement.parentNode;\n if (parentNode) {\n const element = activateScriptElement(replaceableElement);\n parentNode.replaceChild(element, replaceableElement);\n }\n }\n }\n get newHead() {\n return this.newSnapshot.headSnapshot.element;\n }\n get scriptElements() {\n return document.documentElement.querySelectorAll(\"script\");\n }\n}\n\nclass PageRenderer extends Renderer {\n static renderElement(currentElement, newElement) {\n if (document.body && newElement instanceof HTMLBodyElement) {\n document.body.replaceWith(newElement);\n }\n else {\n document.documentElement.appendChild(newElement);\n }\n }\n get shouldRender() {\n return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n }\n get reloadReason() {\n if (!this.newSnapshot.isVisitable) {\n return {\n reason: \"turbo_visit_control_is_reload\",\n };\n }\n if (!this.trackedElementsAreIdentical) {\n return {\n reason: \"tracked_element_mismatch\",\n };\n }\n }\n async prepareToRender() {\n await this.mergeHead();\n }\n async render() {\n if (this.willRender) {\n await this.replaceBody();\n }\n }\n finishRendering() {\n super.finishRendering();\n if (!this.isPreview) {\n this.focusFirstAutofocusableElement();\n }\n }\n get currentHeadSnapshot() {\n return this.currentSnapshot.headSnapshot;\n }\n get newHeadSnapshot() {\n return this.newSnapshot.headSnapshot;\n }\n get newElement() {\n return this.newSnapshot.element;\n }\n async mergeHead() {\n const mergedHeadElements = this.mergeProvisionalElements();\n const newStylesheetElements = this.copyNewHeadStylesheetElements();\n this.copyNewHeadScriptElements();\n await mergedHeadElements;\n await newStylesheetElements;\n }\n async replaceBody() {\n await this.preservingPermanentElements(async () => {\n this.activateNewBody();\n await this.assignNewBody();\n });\n }\n get trackedElementsAreIdentical() {\n return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n }\n async copyNewHeadStylesheetElements() {\n const loadingElements = [];\n for (const element of this.newHeadStylesheetElements) {\n loadingElements.push(waitForLoad(element));\n document.head.appendChild(element);\n }\n await Promise.all(loadingElements);\n }\n copyNewHeadScriptElements() {\n for (const element of this.newHeadScriptElements) {\n document.head.appendChild(activateScriptElement(element));\n }\n }\n async mergeProvisionalElements() {\n const newHeadElements = [...this.newHeadProvisionalElements];\n for (const element of this.currentHeadProvisionalElements) {\n if (!this.isCurrentElementInElementList(element, newHeadElements)) {\n document.head.removeChild(element);\n }\n }\n for (const element of newHeadElements) {\n document.head.appendChild(element);\n }\n }\n isCurrentElementInElementList(element, elementList) {\n for (const [index, newElement] of elementList.entries()) {\n if (element.tagName == \"TITLE\") {\n if (newElement.tagName != \"TITLE\") {\n continue;\n }\n if (element.innerHTML == newElement.innerHTML) {\n elementList.splice(index, 1);\n return true;\n }\n }\n if (newElement.isEqualNode(element)) {\n elementList.splice(index, 1);\n return true;\n }\n }\n return false;\n }\n removeCurrentHeadProvisionalElements() {\n for (const element of this.currentHeadProvisionalElements) {\n document.head.removeChild(element);\n }\n }\n copyNewHeadProvisionalElements() {\n for (const element of this.newHeadProvisionalElements) {\n document.head.appendChild(element);\n }\n }\n activateNewBody() {\n document.adoptNode(this.newElement);\n this.activateNewBodyScriptElements();\n }\n activateNewBodyScriptElements() {\n for (const inertScriptElement of this.newBodyScriptElements) {\n const activatedScriptElement = activateScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n async assignNewBody() {\n await this.renderElement(this.currentElement, this.newElement);\n }\n get newHeadStylesheetElements() {\n return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n get newHeadScriptElements() {\n return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n get currentHeadProvisionalElements() {\n return this.currentHeadSnapshot.provisionalElements;\n }\n get newHeadProvisionalElements() {\n return this.newHeadSnapshot.provisionalElements;\n }\n get newBodyScriptElements() {\n return this.newElement.querySelectorAll(\"script\");\n }\n}\n\nclass SnapshotCache {\n constructor(size) {\n this.keys = [];\n this.snapshots = {};\n this.size = size;\n }\n has(location) {\n return toCacheKey(location) in this.snapshots;\n }\n get(location) {\n if (this.has(location)) {\n const snapshot = this.read(location);\n this.touch(location);\n return snapshot;\n }\n }\n put(location, snapshot) {\n this.write(location, snapshot);\n this.touch(location);\n return snapshot;\n }\n clear() {\n this.snapshots = {};\n }\n read(location) {\n return this.snapshots[toCacheKey(location)];\n }\n write(location, snapshot) {\n this.snapshots[toCacheKey(location)] = snapshot;\n }\n touch(location) {\n const key = toCacheKey(location);\n const index = this.keys.indexOf(key);\n if (index > -1)\n this.keys.splice(index, 1);\n this.keys.unshift(key);\n this.trim();\n }\n trim() {\n for (const key of this.keys.splice(this.size)) {\n delete this.snapshots[key];\n }\n }\n}\n\nclass PageView extends View {\n constructor() {\n super(...arguments);\n this.snapshotCache = new SnapshotCache(10);\n this.lastRenderedLocation = new URL(location.href);\n this.forceReloaded = false;\n }\n renderPage(snapshot, isPreview = false, willRender = true, visit) {\n const renderer = new PageRenderer(this.snapshot, snapshot, PageRenderer.renderElement, isPreview, willRender);\n if (!renderer.shouldRender) {\n this.forceReloaded = true;\n }\n else {\n visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n }\n return this.render(renderer);\n }\n renderError(snapshot, visit) {\n visit === null || visit === void 0 ? void 0 : visit.changeHistory();\n const renderer = new ErrorRenderer(this.snapshot, snapshot, ErrorRenderer.renderElement, false);\n return this.render(renderer);\n }\n clearSnapshotCache() {\n this.snapshotCache.clear();\n }\n async cacheSnapshot(snapshot = this.snapshot) {\n if (snapshot.isCacheable) {\n this.delegate.viewWillCacheSnapshot();\n const { lastRenderedLocation: location } = this;\n await nextEventLoopTick();\n const cachedSnapshot = snapshot.clone();\n this.snapshotCache.put(location, cachedSnapshot);\n return cachedSnapshot;\n }\n }\n getCachedSnapshotForLocation(location) {\n return this.snapshotCache.get(location);\n }\n get snapshot() {\n return PageSnapshot.fromElement(this.element);\n }\n}\n\nclass Preloader {\n constructor(delegate) {\n this.selector = \"a[data-turbo-preload]\";\n this.delegate = delegate;\n }\n get snapshotCache() {\n return this.delegate.navigator.view.snapshotCache;\n }\n start() {\n if (document.readyState === \"loading\") {\n return document.addEventListener(\"DOMContentLoaded\", () => {\n this.preloadOnLoadLinksForView(document.body);\n });\n }\n else {\n this.preloadOnLoadLinksForView(document.body);\n }\n }\n preloadOnLoadLinksForView(element) {\n for (const link of element.querySelectorAll(this.selector)) {\n this.preloadURL(link);\n }\n }\n async preloadURL(link) {\n const location = new URL(link.href);\n if (this.snapshotCache.has(location)) {\n return;\n }\n try {\n const response = await fetch(location.toString(), { headers: { \"VND.PREFETCH\": \"true\", Accept: \"text/html\" } });\n const responseText = await response.text();\n const snapshot = PageSnapshot.fromHTMLString(responseText);\n this.snapshotCache.put(location, snapshot);\n }\n catch (_) {\n }\n }\n}\n\nclass Session {\n constructor() {\n this.navigator = new Navigator(this);\n this.history = new History(this);\n this.preloader = new Preloader(this);\n this.view = new PageView(this, document.documentElement);\n this.adapter = new BrowserAdapter(this);\n this.pageObserver = new PageObserver(this);\n this.cacheObserver = new CacheObserver();\n this.linkClickObserver = new LinkClickObserver(this, window);\n this.formSubmitObserver = new FormSubmitObserver(this, document);\n this.scrollObserver = new ScrollObserver(this);\n this.streamObserver = new StreamObserver(this);\n this.formLinkClickObserver = new FormLinkClickObserver(this, document.documentElement);\n this.frameRedirector = new FrameRedirector(this, document.documentElement);\n this.streamMessageRenderer = new StreamMessageRenderer();\n this.drive = true;\n this.enabled = true;\n this.progressBarDelay = 500;\n this.started = false;\n this.formMode = \"on\";\n }\n start() {\n if (!this.started) {\n this.pageObserver.start();\n this.cacheObserver.start();\n this.formLinkClickObserver.start();\n this.linkClickObserver.start();\n this.formSubmitObserver.start();\n this.scrollObserver.start();\n this.streamObserver.start();\n this.frameRedirector.start();\n this.history.start();\n this.preloader.start();\n this.started = true;\n this.enabled = true;\n }\n }\n disable() {\n this.enabled = false;\n }\n stop() {\n if (this.started) {\n this.pageObserver.stop();\n this.cacheObserver.stop();\n this.formLinkClickObserver.stop();\n this.linkClickObserver.stop();\n this.formSubmitObserver.stop();\n this.scrollObserver.stop();\n this.streamObserver.stop();\n this.frameRedirector.stop();\n this.history.stop();\n this.started = false;\n }\n }\n registerAdapter(adapter) {\n this.adapter = adapter;\n }\n visit(location, options = {}) {\n const frameElement = options.frame ? document.getElementById(options.frame) : null;\n if (frameElement instanceof FrameElement) {\n frameElement.src = location.toString();\n frameElement.loaded;\n }\n else {\n this.navigator.proposeVisit(expandURL(location), options);\n }\n }\n connectStreamSource(source) {\n this.streamObserver.connectStreamSource(source);\n }\n disconnectStreamSource(source) {\n this.streamObserver.disconnectStreamSource(source);\n }\n renderStreamMessage(message) {\n this.streamMessageRenderer.render(StreamMessage.wrap(message));\n }\n clearCache() {\n this.view.clearSnapshotCache();\n }\n setProgressBarDelay(delay) {\n this.progressBarDelay = delay;\n }\n setFormMode(mode) {\n this.formMode = mode;\n }\n get location() {\n return this.history.location;\n }\n get restorationIdentifier() {\n return this.history.restorationIdentifier;\n }\n historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {\n if (this.enabled) {\n this.navigator.startVisit(location, restorationIdentifier, {\n action: \"restore\",\n historyChanged: true,\n });\n }\n else {\n this.adapter.pageInvalidated({\n reason: \"turbo_disabled\",\n });\n }\n }\n scrollPositionChanged(position) {\n this.history.updateRestorationData({ scrollPosition: position });\n }\n willSubmitFormLinkToLocation(link, location) {\n return this.elementIsNavigatable(link) && locationIsVisitable(location, this.snapshot.rootLocation);\n }\n submittedFormLinkToLocation() { }\n willFollowLinkToLocation(link, location, event) {\n return (this.elementIsNavigatable(link) &&\n locationIsVisitable(location, this.snapshot.rootLocation) &&\n this.applicationAllowsFollowingLinkToLocation(link, location, event));\n }\n followedLinkToLocation(link, location) {\n const action = this.getActionForLink(link);\n const acceptsStreamResponse = link.hasAttribute(\"data-turbo-stream\");\n this.visit(location.href, { action, acceptsStreamResponse });\n }\n allowsVisitingLocationWithAction(location, action) {\n return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n }\n visitProposedToLocation(location, options) {\n extendURLWithDeprecatedProperties(location);\n this.adapter.visitProposedToLocation(location, options);\n }\n visitStarted(visit) {\n if (!visit.acceptsStreamResponse) {\n markAsBusy(document.documentElement);\n }\n extendURLWithDeprecatedProperties(visit.location);\n if (!visit.silent) {\n this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n }\n }\n visitCompleted(visit) {\n clearBusyState(document.documentElement);\n this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n }\n locationWithActionIsSamePage(location, action) {\n return this.navigator.locationWithActionIsSamePage(location, action);\n }\n visitScrolledToSamePageLocation(oldURL, newURL) {\n this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n }\n willSubmitForm(form, submitter) {\n const action = getAction(form, submitter);\n return (this.submissionIsNavigatable(form, submitter) &&\n locationIsVisitable(expandURL(action), this.snapshot.rootLocation));\n }\n formSubmitted(form, submitter) {\n this.navigator.submitForm(form, submitter);\n }\n pageBecameInteractive() {\n this.view.lastRenderedLocation = this.location;\n this.notifyApplicationAfterPageLoad();\n }\n pageLoaded() {\n this.history.assumeControlOfScrollRestoration();\n }\n pageWillUnload() {\n this.history.relinquishControlOfScrollRestoration();\n }\n receivedMessageFromStream(message) {\n this.renderStreamMessage(message);\n }\n viewWillCacheSnapshot() {\n var _a;\n if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {\n this.notifyApplicationBeforeCachingSnapshot();\n }\n }\n allowsImmediateRender({ element }, options) {\n const event = this.notifyApplicationBeforeRender(element, options);\n const { defaultPrevented, detail: { render }, } = event;\n if (this.view.renderer && render) {\n this.view.renderer.renderElement = render;\n }\n return !defaultPrevented;\n }\n viewRenderedSnapshot(_snapshot, _isPreview) {\n this.view.lastRenderedLocation = this.history.location;\n this.notifyApplicationAfterRender();\n }\n preloadOnLoadLinksForView(element) {\n this.preloader.preloadOnLoadLinksForView(element);\n }\n viewInvalidated(reason) {\n this.adapter.pageInvalidated(reason);\n }\n frameLoaded(frame) {\n this.notifyApplicationAfterFrameLoad(frame);\n }\n frameRendered(fetchResponse, frame) {\n this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n }\n applicationAllowsFollowingLinkToLocation(link, location, ev) {\n const event = this.notifyApplicationAfterClickingLinkToLocation(link, location, ev);\n return !event.defaultPrevented;\n }\n applicationAllowsVisitingLocation(location) {\n const event = this.notifyApplicationBeforeVisitingLocation(location);\n return !event.defaultPrevented;\n }\n notifyApplicationAfterClickingLinkToLocation(link, location, event) {\n return dispatch(\"turbo:click\", {\n target: link,\n detail: { url: location.href, originalEvent: event },\n cancelable: true,\n });\n }\n notifyApplicationBeforeVisitingLocation(location) {\n return dispatch(\"turbo:before-visit\", {\n detail: { url: location.href },\n cancelable: true,\n });\n }\n notifyApplicationAfterVisitingLocation(location, action) {\n return dispatch(\"turbo:visit\", { detail: { url: location.href, action } });\n }\n notifyApplicationBeforeCachingSnapshot() {\n return dispatch(\"turbo:before-cache\");\n }\n notifyApplicationBeforeRender(newBody, options) {\n return dispatch(\"turbo:before-render\", {\n detail: Object.assign({ newBody }, options),\n cancelable: true,\n });\n }\n notifyApplicationAfterRender() {\n return dispatch(\"turbo:render\");\n }\n notifyApplicationAfterPageLoad(timing = {}) {\n return dispatch(\"turbo:load\", {\n detail: { url: this.location.href, timing },\n });\n }\n notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n dispatchEvent(new HashChangeEvent(\"hashchange\", {\n oldURL: oldURL.toString(),\n newURL: newURL.toString(),\n }));\n }\n notifyApplicationAfterFrameLoad(frame) {\n return dispatch(\"turbo:frame-load\", { target: frame });\n }\n notifyApplicationAfterFrameRender(fetchResponse, frame) {\n return dispatch(\"turbo:frame-render\", {\n detail: { fetchResponse },\n target: frame,\n cancelable: true,\n });\n }\n submissionIsNavigatable(form, submitter) {\n if (this.formMode == \"off\") {\n return false;\n }\n else {\n const submitterIsNavigatable = submitter ? this.elementIsNavigatable(submitter) : true;\n if (this.formMode == \"optin\") {\n return submitterIsNavigatable && form.closest('[data-turbo=\"true\"]') != null;\n }\n else {\n return submitterIsNavigatable && this.elementIsNavigatable(form);\n }\n }\n }\n elementIsNavigatable(element) {\n const container = findClosestRecursively(element, \"[data-turbo]\");\n const withinFrame = findClosestRecursively(element, \"turbo-frame\");\n if (this.drive || withinFrame) {\n if (container) {\n return container.getAttribute(\"data-turbo\") != \"false\";\n }\n else {\n return true;\n }\n }\n else {\n if (container) {\n return container.getAttribute(\"data-turbo\") == \"true\";\n }\n else {\n return false;\n }\n }\n }\n getActionForLink(link) {\n return getVisitAction(link) || \"advance\";\n }\n get snapshot() {\n return this.view.snapshot;\n }\n}\nfunction extendURLWithDeprecatedProperties(url) {\n Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\nconst deprecatedLocationPropertyDescriptors = {\n absoluteURL: {\n get() {\n return this.toString();\n },\n },\n};\n\nclass Cache {\n constructor(session) {\n this.session = session;\n }\n clear() {\n this.session.clearCache();\n }\n resetCacheControl() {\n this.setCacheControl(\"\");\n }\n exemptPageFromCache() {\n this.setCacheControl(\"no-cache\");\n }\n exemptPageFromPreview() {\n this.setCacheControl(\"no-preview\");\n }\n setCacheControl(value) {\n setMetaContent(\"turbo-cache-control\", value);\n }\n}\n\nconst StreamActions = {\n after() {\n this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e.nextSibling); });\n },\n append() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach((e) => e.append(this.templateContent));\n },\n before() {\n this.targetElements.forEach((e) => { var _a; return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e); });\n },\n prepend() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach((e) => e.prepend(this.templateContent));\n },\n remove() {\n this.targetElements.forEach((e) => e.remove());\n },\n replace() {\n this.targetElements.forEach((e) => e.replaceWith(this.templateContent));\n },\n update() {\n this.targetElements.forEach((targetElement) => {\n targetElement.innerHTML = \"\";\n targetElement.append(this.templateContent);\n });\n },\n};\n\nconst session = new Session();\nconst cache = new Cache(session);\nconst { navigator: navigator$1 } = session;\nfunction start() {\n session.start();\n}\nfunction registerAdapter(adapter) {\n session.registerAdapter(adapter);\n}\nfunction visit(location, options) {\n session.visit(location, options);\n}\nfunction connectStreamSource(source) {\n session.connectStreamSource(source);\n}\nfunction disconnectStreamSource(source) {\n session.disconnectStreamSource(source);\n}\nfunction renderStreamMessage(message) {\n session.renderStreamMessage(message);\n}\nfunction clearCache() {\n console.warn(\"Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`\");\n session.clearCache();\n}\nfunction setProgressBarDelay(delay) {\n session.setProgressBarDelay(delay);\n}\nfunction setConfirmMethod(confirmMethod) {\n FormSubmission.confirmMethod = confirmMethod;\n}\nfunction setFormMode(mode) {\n session.setFormMode(mode);\n}\n\nvar Turbo = /*#__PURE__*/Object.freeze({\n __proto__: null,\n navigator: navigator$1,\n session: session,\n cache: cache,\n PageRenderer: PageRenderer,\n PageSnapshot: PageSnapshot,\n FrameRenderer: FrameRenderer,\n start: start,\n registerAdapter: registerAdapter,\n visit: visit,\n connectStreamSource: connectStreamSource,\n disconnectStreamSource: disconnectStreamSource,\n renderStreamMessage: renderStreamMessage,\n clearCache: clearCache,\n setProgressBarDelay: setProgressBarDelay,\n setConfirmMethod: setConfirmMethod,\n setFormMode: setFormMode,\n StreamActions: StreamActions\n});\n\nclass TurboFrameMissingError extends Error {\n}\n\nclass FrameController {\n constructor(element) {\n this.fetchResponseLoaded = (_fetchResponse) => { };\n this.currentFetchRequest = null;\n this.resolveVisitPromise = () => { };\n this.connected = false;\n this.hasBeenLoaded = false;\n this.ignoredAttributes = new Set();\n this.action = null;\n this.visitCachedSnapshot = ({ element }) => {\n const frame = element.querySelector(\"#\" + this.element.id);\n if (frame && this.previousFrameElement) {\n frame.replaceChildren(...this.previousFrameElement.children);\n }\n delete this.previousFrameElement;\n };\n this.element = element;\n this.view = new FrameView(this, this.element);\n this.appearanceObserver = new AppearanceObserver(this, this.element);\n this.formLinkClickObserver = new FormLinkClickObserver(this, this.element);\n this.linkInterceptor = new LinkInterceptor(this, this.element);\n this.restorationIdentifier = uuid();\n this.formSubmitObserver = new FormSubmitObserver(this, this.element);\n }\n connect() {\n if (!this.connected) {\n this.connected = true;\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n }\n else {\n this.loadSourceURL();\n }\n this.formLinkClickObserver.start();\n this.linkInterceptor.start();\n this.formSubmitObserver.start();\n }\n }\n disconnect() {\n if (this.connected) {\n this.connected = false;\n this.appearanceObserver.stop();\n this.formLinkClickObserver.stop();\n this.linkInterceptor.stop();\n this.formSubmitObserver.stop();\n }\n }\n disabledChanged() {\n if (this.loadingStyle == FrameLoadingStyle.eager) {\n this.loadSourceURL();\n }\n }\n sourceURLChanged() {\n if (this.isIgnoringChangesTo(\"src\"))\n return;\n if (this.element.isConnected) {\n this.complete = false;\n }\n if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {\n this.loadSourceURL();\n }\n }\n sourceURLReloaded() {\n const { src } = this.element;\n this.ignoringChangesToAttribute(\"complete\", () => {\n this.element.removeAttribute(\"complete\");\n });\n this.element.src = null;\n this.element.src = src;\n return this.element.loaded;\n }\n completeChanged() {\n if (this.isIgnoringChangesTo(\"complete\"))\n return;\n this.loadSourceURL();\n }\n loadingStyleChanged() {\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n }\n else {\n this.appearanceObserver.stop();\n this.loadSourceURL();\n }\n }\n async loadSourceURL() {\n if (this.enabled && this.isActive && !this.complete && this.sourceURL) {\n this.element.loaded = this.visit(expandURL(this.sourceURL));\n this.appearanceObserver.stop();\n await this.element.loaded;\n this.hasBeenLoaded = true;\n }\n }\n async loadResponse(fetchResponse) {\n if (fetchResponse.redirected || (fetchResponse.succeeded && fetchResponse.isHTML)) {\n this.sourceURL = fetchResponse.response.url;\n }\n try {\n const html = await fetchResponse.responseHTML;\n if (html) {\n const document = parseHTMLDocument(html);\n const pageSnapshot = PageSnapshot.fromDocument(document);\n if (pageSnapshot.isVisitable) {\n await this.loadFrameResponse(fetchResponse, document);\n }\n else {\n await this.handleUnvisitableFrameResponse(fetchResponse);\n }\n }\n }\n finally {\n this.fetchResponseLoaded = () => { };\n }\n }\n elementAppearedInViewport(element) {\n this.proposeVisitIfNavigatedWithAction(element, element);\n this.loadSourceURL();\n }\n willSubmitFormLinkToLocation(link) {\n return this.shouldInterceptNavigation(link);\n }\n submittedFormLinkToLocation(link, _location, form) {\n const frame = this.findFrameElement(link);\n if (frame)\n form.setAttribute(\"data-turbo-frame\", frame.id);\n }\n shouldInterceptLinkClick(element, _location, _event) {\n return this.shouldInterceptNavigation(element);\n }\n linkClickIntercepted(element, location) {\n this.navigateFrame(element, location);\n }\n willSubmitForm(element, submitter) {\n return element.closest(\"turbo-frame\") == this.element && this.shouldInterceptNavigation(element, submitter);\n }\n formSubmitted(element, submitter) {\n if (this.formSubmission) {\n this.formSubmission.stop();\n }\n this.formSubmission = new FormSubmission(this, element, submitter);\n const { fetchRequest } = this.formSubmission;\n this.prepareRequest(fetchRequest);\n this.formSubmission.start();\n }\n prepareRequest(request) {\n var _a;\n request.headers[\"Turbo-Frame\"] = this.id;\n if ((_a = this.currentNavigationElement) === null || _a === void 0 ? void 0 : _a.hasAttribute(\"data-turbo-stream\")) {\n request.acceptResponseType(StreamMessage.contentType);\n }\n }\n requestStarted(_request) {\n markAsBusy(this.element);\n }\n requestPreventedHandlingResponse(_request, _response) {\n this.resolveVisitPromise();\n }\n async requestSucceededWithResponse(request, response) {\n await this.loadResponse(response);\n this.resolveVisitPromise();\n }\n async requestFailedWithResponse(request, response) {\n await this.loadResponse(response);\n this.resolveVisitPromise();\n }\n requestErrored(request, error) {\n console.error(error);\n this.resolveVisitPromise();\n }\n requestFinished(_request) {\n clearBusyState(this.element);\n }\n formSubmissionStarted({ formElement }) {\n markAsBusy(formElement, this.findFrameElement(formElement));\n }\n formSubmissionSucceededWithResponse(formSubmission, response) {\n const frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);\n frame.delegate.proposeVisitIfNavigatedWithAction(frame, formSubmission.formElement, formSubmission.submitter);\n frame.delegate.loadResponse(response);\n if (!formSubmission.isSafe) {\n session.clearCache();\n }\n }\n formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n this.element.delegate.loadResponse(fetchResponse);\n session.clearCache();\n }\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n formSubmissionFinished({ formElement }) {\n clearBusyState(formElement, this.findFrameElement(formElement));\n }\n allowsImmediateRender({ element: newFrame }, options) {\n const event = dispatch(\"turbo:before-frame-render\", {\n target: this.element,\n detail: Object.assign({ newFrame }, options),\n cancelable: true,\n });\n const { defaultPrevented, detail: { render }, } = event;\n if (this.view.renderer && render) {\n this.view.renderer.renderElement = render;\n }\n return !defaultPrevented;\n }\n viewRenderedSnapshot(_snapshot, _isPreview) { }\n preloadOnLoadLinksForView(element) {\n session.preloadOnLoadLinksForView(element);\n }\n viewInvalidated() { }\n willRenderFrame(currentElement, _newElement) {\n this.previousFrameElement = currentElement.cloneNode(true);\n }\n async loadFrameResponse(fetchResponse, document) {\n const newFrameElement = await this.extractForeignFrameElement(document.body);\n if (newFrameElement) {\n const snapshot = new Snapshot(newFrameElement);\n const renderer = new FrameRenderer(this, this.view.snapshot, snapshot, FrameRenderer.renderElement, false, false);\n if (this.view.renderPromise)\n await this.view.renderPromise;\n this.changeHistory();\n await this.view.render(renderer);\n this.complete = true;\n session.frameRendered(fetchResponse, this.element);\n session.frameLoaded(this.element);\n this.fetchResponseLoaded(fetchResponse);\n }\n else if (this.willHandleFrameMissingFromResponse(fetchResponse)) {\n this.handleFrameMissingFromResponse(fetchResponse);\n }\n }\n async visit(url) {\n var _a;\n const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n (_a = this.currentFetchRequest) === null || _a === void 0 ? void 0 : _a.cancel();\n this.currentFetchRequest = request;\n return new Promise((resolve) => {\n this.resolveVisitPromise = () => {\n this.resolveVisitPromise = () => { };\n this.currentFetchRequest = null;\n resolve();\n };\n request.perform();\n });\n }\n navigateFrame(element, url, submitter) {\n const frame = this.findFrameElement(element, submitter);\n frame.delegate.proposeVisitIfNavigatedWithAction(frame, element, submitter);\n this.withCurrentNavigationElement(element, () => {\n frame.src = url;\n });\n }\n proposeVisitIfNavigatedWithAction(frame, element, submitter) {\n this.action = getVisitAction(submitter, element, frame);\n if (this.action) {\n const pageSnapshot = PageSnapshot.fromElement(frame).clone();\n const { visitCachedSnapshot } = frame.delegate;\n frame.delegate.fetchResponseLoaded = (fetchResponse) => {\n if (frame.src) {\n const { statusCode, redirected } = fetchResponse;\n const responseHTML = frame.ownerDocument.documentElement.outerHTML;\n const response = { statusCode, redirected, responseHTML };\n const options = {\n response,\n visitCachedSnapshot,\n willRender: false,\n updateHistory: false,\n restorationIdentifier: this.restorationIdentifier,\n snapshot: pageSnapshot,\n };\n if (this.action)\n options.action = this.action;\n session.visit(frame.src, options);\n }\n };\n }\n }\n changeHistory() {\n if (this.action) {\n const method = getHistoryMethodForAction(this.action);\n session.history.update(method, expandURL(this.element.src || \"\"), this.restorationIdentifier);\n }\n }\n async handleUnvisitableFrameResponse(fetchResponse) {\n console.warn(`The response (${fetchResponse.statusCode}) from is performing a full page visit due to turbo-visit-control.`);\n await this.visitResponse(fetchResponse.response);\n }\n willHandleFrameMissingFromResponse(fetchResponse) {\n this.element.setAttribute(\"complete\", \"\");\n const response = fetchResponse.response;\n const visit = async (url, options = {}) => {\n if (url instanceof Response) {\n this.visitResponse(url);\n }\n else {\n session.visit(url, options);\n }\n };\n const event = dispatch(\"turbo:frame-missing\", {\n target: this.element,\n detail: { response, visit },\n cancelable: true,\n });\n return !event.defaultPrevented;\n }\n handleFrameMissingFromResponse(fetchResponse) {\n this.view.missing();\n this.throwFrameMissingError(fetchResponse);\n }\n throwFrameMissingError(fetchResponse) {\n const message = `The response (${fetchResponse.statusCode}) did not contain the expected and will be ignored. To perform a full page visit instead, set turbo-visit-control to reload.`;\n throw new TurboFrameMissingError(message);\n }\n async visitResponse(response) {\n const wrapped = new FetchResponse(response);\n const responseHTML = await wrapped.responseHTML;\n const { location, redirected, statusCode } = wrapped;\n return session.visit(location, { response: { redirected, statusCode, responseHTML } });\n }\n findFrameElement(element, submitter) {\n var _a;\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;\n }\n async extractForeignFrameElement(container) {\n let element;\n const id = CSS.escape(this.id);\n try {\n element = activateElement(container.querySelector(`turbo-frame#${id}`), this.sourceURL);\n if (element) {\n return element;\n }\n element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.sourceURL);\n if (element) {\n await element.loaded;\n return await this.extractForeignFrameElement(element);\n }\n }\n catch (error) {\n console.error(error);\n return new FrameElement();\n }\n return null;\n }\n formActionIsVisitable(form, submitter) {\n const action = getAction(form, submitter);\n return locationIsVisitable(expandURL(action), this.rootLocation);\n }\n shouldInterceptNavigation(element, submitter) {\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n if (element instanceof HTMLFormElement && !this.formActionIsVisitable(element, submitter)) {\n return false;\n }\n if (!this.enabled || id == \"_top\") {\n return false;\n }\n if (id) {\n const frameElement = getFrameElementById(id);\n if (frameElement) {\n return !frameElement.disabled;\n }\n }\n if (!session.elementIsNavigatable(element)) {\n return false;\n }\n if (submitter && !session.elementIsNavigatable(submitter)) {\n return false;\n }\n return true;\n }\n get id() {\n return this.element.id;\n }\n get enabled() {\n return !this.element.disabled;\n }\n get sourceURL() {\n if (this.element.src) {\n return this.element.src;\n }\n }\n set sourceURL(sourceURL) {\n this.ignoringChangesToAttribute(\"src\", () => {\n this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;\n });\n }\n get loadingStyle() {\n return this.element.loading;\n }\n get isLoading() {\n return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;\n }\n get complete() {\n return this.element.hasAttribute(\"complete\");\n }\n set complete(value) {\n this.ignoringChangesToAttribute(\"complete\", () => {\n if (value) {\n this.element.setAttribute(\"complete\", \"\");\n }\n else {\n this.element.removeAttribute(\"complete\");\n }\n });\n }\n get isActive() {\n return this.element.isActive && this.connected;\n }\n get rootLocation() {\n var _a;\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const root = (_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\";\n return expandURL(root);\n }\n isIgnoringChangesTo(attributeName) {\n return this.ignoredAttributes.has(attributeName);\n }\n ignoringChangesToAttribute(attributeName, callback) {\n this.ignoredAttributes.add(attributeName);\n callback();\n this.ignoredAttributes.delete(attributeName);\n }\n withCurrentNavigationElement(element, callback) {\n this.currentNavigationElement = element;\n callback();\n delete this.currentNavigationElement;\n }\n}\nfunction getFrameElementById(id) {\n if (id != null) {\n const element = document.getElementById(id);\n if (element instanceof FrameElement) {\n return element;\n }\n }\n}\nfunction activateElement(element, currentURL) {\n if (element) {\n const src = element.getAttribute(\"src\");\n if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n throw new Error(`Matching element has a source URL which references itself`);\n }\n if (element.ownerDocument !== document) {\n element = document.importNode(element, true);\n }\n if (element instanceof FrameElement) {\n element.connectedCallback();\n element.disconnectedCallback();\n return element;\n }\n }\n}\n\nclass StreamElement extends HTMLElement {\n static async renderElement(newElement) {\n await newElement.performAction();\n }\n async connectedCallback() {\n try {\n await this.render();\n }\n catch (error) {\n console.error(error);\n }\n finally {\n this.disconnect();\n }\n }\n async render() {\n var _a;\n return ((_a = this.renderPromise) !== null && _a !== void 0 ? _a : (this.renderPromise = (async () => {\n const event = this.beforeRenderEvent;\n if (this.dispatchEvent(event)) {\n await nextAnimationFrame();\n await event.detail.render(this);\n }\n })()));\n }\n disconnect() {\n try {\n this.remove();\n }\n catch (_a) { }\n }\n removeDuplicateTargetChildren() {\n this.duplicateChildren.forEach((c) => c.remove());\n }\n get duplicateChildren() {\n var _a;\n const existingChildren = this.targetElements.flatMap((e) => [...e.children]).filter((c) => !!c.id);\n const newChildrenIds = [...(((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children) || [])].filter((c) => !!c.id).map((c) => c.id);\n return existingChildren.filter((c) => newChildrenIds.includes(c.id));\n }\n get performAction() {\n if (this.action) {\n const actionFunction = StreamActions[this.action];\n if (actionFunction) {\n return actionFunction;\n }\n this.raise(\"unknown action\");\n }\n this.raise(\"action attribute is missing\");\n }\n get targetElements() {\n if (this.target) {\n return this.targetElementsById;\n }\n else if (this.targets) {\n return this.targetElementsByQuery;\n }\n else {\n this.raise(\"target or targets attribute is missing\");\n }\n }\n get templateContent() {\n return this.templateElement.content.cloneNode(true);\n }\n get templateElement() {\n if (this.firstElementChild === null) {\n const template = this.ownerDocument.createElement(\"template\");\n this.appendChild(template);\n return template;\n }\n else if (this.firstElementChild instanceof HTMLTemplateElement) {\n return this.firstElementChild;\n }\n this.raise(\"first child element must be a