pageflow 17.0.5 → 17.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +362 -35
- data/README.md +0 -1
- data/admins/pageflow/accounts.rb +16 -14
- data/admins/pageflow/entry.rb +68 -20
- data/admins/pageflow/entry_templates.rb +10 -9
- data/admins/pageflow/folder.rb +1 -1
- data/admins/pageflow/membership.rb +4 -4
- data/admins/pageflow/revisions.rb +5 -5
- data/admins/pageflow/site_root_entry.rb +64 -0
- data/admins/pageflow/sites.rb +12 -3
- data/admins/pageflow/translations.rb +75 -0
- data/admins/pageflow/user.rb +21 -35
- data/app/assets/javascripts/pageflow/admin/entries.js +30 -5
- data/app/assets/javascripts/pageflow/dist/ui.js +2865 -257
- data/app/assets/stylesheets/pageflow/admin/entries/index_table.scss +2 -1
- data/app/assets/stylesheets/pageflow/admin/permalink_input.scss +2 -1
- data/app/assets/stylesheets/pageflow/editor/background_positioning.scss +6 -0
- data/app/assets/stylesheets/pageflow/editor/base.scss +2 -0
- data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +7 -1
- data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +5 -1
- data/app/assets/stylesheets/pageflow/editor/files.scss +28 -16
- data/app/assets/stylesheets/pageflow/editor/filtered_files.scss +24 -0
- data/app/assets/stylesheets/pageflow/editor/info_box.scss +11 -3
- data/app/assets/stylesheets/pageflow/editor/list.scss +6 -4
- data/app/assets/stylesheets/pageflow/editor/list_search_field.scss +52 -0
- data/app/assets/stylesheets/pageflow/editor/outline.scss +0 -13
- data/app/assets/stylesheets/pageflow/editor/select_button.scss +1 -1
- data/app/assets/stylesheets/pageflow/editor/sortable.scss +12 -0
- data/app/assets/stylesheets/pageflow/mixins/buttons.scss +4 -4
- data/app/assets/stylesheets/pageflow/ui/forms.scss +4 -0
- data/app/assets/stylesheets/pageflow/ui/input/color_input.scss +8 -0
- data/app/assets/stylesheets/pageflow/ui/input/file_name_input.scss +37 -0
- data/app/assets/stylesheets/pageflow/ui/properties.scss +5 -0
- data/app/assets/stylesheets/pageflow/ui.scss +1 -0
- data/app/controllers/concerns/pageflow/controller_delegation.rb +1 -1
- data/app/controllers/concerns/pageflow/edit_locking.rb +17 -10
- data/app/controllers/concerns/pageflow/entry_password_protection.rb +1 -0
- data/app/controllers/concerns/pageflow/public_https_mode.rb +2 -1
- data/app/controllers/concerns/pageflow/quota_verification.rb +5 -4
- data/app/controllers/pageflow/admin/initial_passwords_controller.rb +1 -0
- data/app/controllers/pageflow/application_controller.rb +19 -19
- data/app/controllers/pageflow/chapters_controller.rb +3 -2
- data/app/controllers/pageflow/edit_locks_controller.rb +3 -2
- data/app/controllers/pageflow/editor/encoding_confirmations_controller.rb +1 -0
- data/app/controllers/pageflow/editor/entries_controller.rb +2 -1
- data/app/controllers/pageflow/editor/entry_publications_controller.rb +1 -0
- data/app/controllers/pageflow/editor/file_import_controller.rb +3 -3
- data/app/controllers/pageflow/editor/files_controller.rb +7 -6
- data/app/controllers/pageflow/editor/widgets_controller.rb +1 -0
- data/app/controllers/pageflow/entries_controller.rb +77 -17
- data/app/controllers/pageflow/feeds_controller.rb +1 -1
- data/app/controllers/pageflow/files_controller.rb +1 -0
- data/app/controllers/pageflow/pages_controller.rb +4 -2
- data/app/controllers/pageflow/revisions_controller.rb +2 -1
- data/app/controllers/pageflow/sitemaps_controller.rb +1 -1
- data/app/controllers/pageflow/storylines_controller.rb +1 -0
- data/app/helpers/pageflow/admin/cutoff_modes_helper.rb +12 -0
- data/app/helpers/pageflow/admin/entries_helper.rb +1 -1
- data/app/helpers/pageflow/admin/entry_translations_helper.rb +18 -0
- data/app/helpers/pageflow/admin/features_helper.rb +1 -1
- data/app/helpers/pageflow/admin/form_helper.rb +3 -3
- data/app/helpers/pageflow/admin/locales_helper.rb +10 -2
- data/app/helpers/pageflow/admin/memberships_helper.rb +32 -32
- data/app/helpers/pageflow/admin/revisions_helper.rb +1 -1
- data/app/helpers/pageflow/admin/sites_helper.rb +22 -0
- data/app/helpers/pageflow/admin/users_helper.rb +7 -5
- data/app/helpers/pageflow/admin/widgets_helper.rb +3 -3
- data/app/helpers/pageflow/asset_urls_helper.rb +1 -1
- data/app/helpers/pageflow/audio_files_helper.rb +5 -2
- data/app/helpers/pageflow/background_image_helper.rb +7 -6
- data/app/helpers/pageflow/common_entry_seed_helper.rb +2 -4
- data/app/helpers/pageflow/editor/config_helper.rb +1 -1
- data/app/helpers/pageflow/editor/files_helper.rb +1 -1
- data/app/helpers/pageflow/embed_code_helper.rb +3 -3
- data/app/helpers/pageflow/entries_helper.rb +58 -34
- data/app/helpers/pageflow/entry_json_seed_helper.rb +3 -2
- data/app/helpers/pageflow/feeds_helper.rb +2 -2
- data/app/helpers/pageflow/file_background_images_helper.rb +2 -2
- data/app/helpers/pageflow/file_thumbnails_helper.rb +4 -3
- data/app/helpers/pageflow/files_helper.rb +5 -4
- data/app/helpers/pageflow/folders_helper.rb +8 -5
- data/app/helpers/pageflow/help_entries_helper.rb +2 -2
- data/app/helpers/pageflow/hreflang_links_helper.rb +37 -0
- data/app/helpers/pageflow/info_box_helper.rb +7 -11
- data/app/helpers/pageflow/media_query_helper.rb +3 -3
- data/app/helpers/pageflow/navigation_bar_helper.rb +1 -1
- data/app/helpers/pageflow/overview_helper.rb +1 -1
- data/app/helpers/pageflow/page_types_helper.rb +5 -5
- data/app/helpers/pageflow/pages_helper.rb +29 -15
- data/app/helpers/pageflow/public_i18n_helper.rb +1 -1
- data/app/helpers/pageflow/quota_helper.rb +4 -4
- data/app/helpers/pageflow/render_json_helper.rb +6 -3
- data/app/helpers/pageflow/revision_file_helper.rb +2 -1
- data/app/helpers/pageflow/sites_helper.rb +3 -3
- data/app/helpers/pageflow/social_share_helper.rb +24 -10
- data/app/helpers/pageflow/social_share_links_helper.rb +12 -9
- data/app/helpers/pageflow/structured_data_helper.rb +1 -1
- data/app/helpers/pageflow/stub_page_configuration.rb +7 -3
- data/app/helpers/pageflow/text_direction_helper.rb +1 -1
- data/app/helpers/pageflow/themes_helper.rb +1 -1
- data/app/helpers/pageflow/video_files_helper.rb +29 -13
- data/app/helpers/pageflow/widgets_helper.rb +7 -6
- data/app/inputs/pageflow_permalink_input.rb +3 -2
- data/app/jobs/pageflow/application_job.rb +1 -0
- data/app/jobs/pageflow/entry_export_import/upload_and_publish_file_job.rb +1 -1
- data/app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb +1 -0
- data/app/jobs/pageflow/poll_zencoder_job.rb +3 -2
- data/app/jobs/pageflow/process_image_or_text_track_job.rb +1 -0
- data/app/jobs/pageflow/prune_auto_snapshots_job.rb +1 -0
- data/app/jobs/pageflow/request_meta_data_from_zencoder_job.rb +1 -0
- data/app/jobs/pageflow/submit_file_to_zencoder_job.rb +1 -0
- data/app/mailers/pageflow/user_mailer.rb +1 -0
- data/app/models/concerns/pageflow/auto_generated_perma_id.rb +13 -1
- data/app/models/concerns/pageflow/entry_publication_states.rb +7 -3
- data/app/models/concerns/pageflow/feature_target.rb +8 -4
- data/app/models/concerns/pageflow/output_source.rb +3 -3
- data/app/models/concerns/pageflow/permalinkable.rb +2 -1
- data/app/models/concerns/pageflow/reusable_file.rb +23 -23
- data/app/models/concerns/pageflow/serialization_blacklist.rb +1 -1
- data/app/models/concerns/pageflow/suspendable.rb +5 -3
- data/app/models/concerns/pageflow/theme_referencer.rb +1 -1
- data/app/models/concerns/pageflow/translatable.rb +62 -0
- data/app/models/concerns/pageflow/uploadable_file.rb +6 -6
- data/app/models/pageflow/account.rb +6 -5
- data/app/models/pageflow/account_member_query.rb +1 -1
- data/app/models/pageflow/account_role_query.rb +1 -1
- data/app/models/pageflow/application_query.rb +1 -1
- data/app/models/pageflow/application_record.rb +1 -1
- data/app/models/pageflow/audio_file.rb +4 -4
- data/app/models/pageflow/audio_file_url_templates.rb +1 -1
- data/app/models/pageflow/authentication_token.rb +2 -2
- data/app/models/pageflow/chapter.rb +6 -1
- data/app/models/pageflow/chapter_scaffold.rb +2 -4
- data/app/models/pageflow/cname_site_request_scope.rb +1 -1
- data/app/models/pageflow/customized_theme.rb +6 -6
- data/app/models/pageflow/draft_entry.rb +37 -9
- data/app/models/pageflow/edit_lock.rb +19 -21
- data/app/models/pageflow/encoding_confirmation.rb +2 -2
- data/app/models/pageflow/entries_feed.rb +2 -2
- data/app/models/pageflow/entry.rb +44 -30
- data/app/models/pageflow/entry_at_revision.rb +5 -1
- data/app/models/pageflow/entry_duplicate.rb +8 -5
- data/app/models/pageflow/entry_publication.rb +2 -2
- data/app/models/pageflow/entry_role_query.rb +4 -4
- data/app/models/pageflow/entry_template.rb +4 -4
- data/app/models/pageflow/entry_title_or_account_name_query.rb +2 -2
- data/app/models/pageflow/entry_translation_group.rb +42 -0
- data/app/models/pageflow/file_reuse.rb +2 -2
- data/app/models/pageflow/file_usage.rb +10 -3
- data/app/models/pageflow/folder.rb +2 -2
- data/app/models/pageflow/home_button.rb +7 -7
- data/app/models/pageflow/image_file.rb +20 -5
- data/app/models/pageflow/image_file_url_templates.rb +1 -1
- data/app/models/pageflow/invitation_form.rb +2 -1
- data/app/models/pageflow/managed_user_query.rb +1 -1
- data/app/models/pageflow/membership.rb +5 -5
- data/app/models/pageflow/nested_revision_component_copy.rb +263 -0
- data/app/models/pageflow/null_user.rb +1 -1
- data/app/models/pageflow/overview_button.rb +1 -1
- data/app/models/pageflow/page.rb +7 -3
- data/app/models/pageflow/permalink.rb +23 -2
- data/app/models/pageflow/permalink_directory.rb +7 -0
- data/app/models/pageflow/permalink_redirect.rb +7 -0
- data/app/models/pageflow/positioned_file.rb +5 -5
- data/app/models/pageflow/potential_entry_translations.rb +55 -0
- data/app/models/pageflow/potential_memberships.rb +5 -4
- data/app/models/pageflow/published_entry.rb +62 -11
- data/app/models/pageflow/revision.rb +24 -15
- data/app/models/pageflow/roles.rb +14 -18
- data/app/models/pageflow/site.rb +36 -3
- data/app/models/pageflow/site_root_entry_form.rb +27 -0
- data/app/models/pageflow/sitemaps.rb +10 -1
- data/app/models/pageflow/storyline.rb +5 -2
- data/app/models/pageflow/storyline_scaffold.rb +1 -1
- data/app/models/pageflow/text_track_file.rb +1 -1
- data/app/models/pageflow/text_track_file_url_templates.rb +1 -1
- data/app/models/pageflow/theme_customization_file.rb +3 -2
- data/app/models/pageflow/thumbnail_file_resolver.rb +1 -1
- data/app/models/pageflow/url_template.rb +1 -1
- data/app/models/pageflow/used_file.rb +7 -3
- data/app/models/pageflow/user_name_query.rb +2 -2
- data/app/models/pageflow/video_file.rb +22 -15
- data/app/models/pageflow/video_file_url_templates.rb +6 -4
- data/app/models/pageflow/widget.rb +4 -3
- data/app/models/pageflow/with_file_usage_extension.rb +1 -1
- data/app/models/pageflow/zencoder_attachment.rb +8 -8
- data/app/policies/pageflow/account_policy.rb +3 -1
- data/app/policies/pageflow/admin/admin_only_tab_policy.rb +1 -0
- data/app/policies/pageflow/admin/entry_tab_policy.rb +1 -0
- data/app/policies/pageflow/application_policy.rb +2 -0
- data/app/policies/pageflow/entry_policy.rb +7 -1
- data/app/policies/pageflow/entry_template_policy.rb +2 -1
- data/app/policies/pageflow/file_policy.rb +4 -7
- data/app/policies/pageflow/folder_policy.rb +18 -8
- data/app/policies/pageflow/membership_policy.rb +6 -4
- data/app/policies/pageflow/site_policy.rb +10 -3
- data/app/policies/pageflow/user_policy.rb +6 -4
- data/app/state_machines/pageflow/image_and_text_track_processing_state_machine.rb +3 -2
- data/app/state_machines/pageflow/media_encoding_state_machine.rb +5 -4
- data/app/views/admin/accounts/_entry_template_details.html.arb +2 -2
- data/app/views/admin/entries/_attributes_table.html.arb +6 -5
- data/app/views/admin/entries/_form.html.erb +2 -1
- data/app/views/admin/entries/_permalink_inputs.html.erb +9 -2
- data/app/views/admin/entry_templates/_form.html.erb +1 -3
- data/app/views/admin/site_root_entry/choose.html.erb +19 -0
- data/app/views/admin/sites/_fields.html.erb +14 -1
- data/app/views/admin/translations/_form.html.erb +31 -0
- data/app/views/admin/users/_attributes_table.html.arb +13 -0
- data/app/views/components/pageflow/admin/add_membership_button.rb +13 -12
- data/app/views/components/pageflow/admin/custom_scopes_renderer.rb +1 -0
- data/app/views/components/pageflow/admin/embed_code_field.rb +1 -0
- data/app/views/components/pageflow/admin/embedded_index_table.rb +9 -10
- data/app/views/components/pageflow/admin/entries_tab.rb +1 -0
- data/app/views/components/pageflow/admin/entry_publication_state_indicator.rb +6 -5
- data/app/views/components/pageflow/admin/entry_templates_tab.rb +2 -1
- data/app/views/components/pageflow/admin/entry_translations_tab.rb +102 -0
- data/app/views/components/pageflow/admin/entry_user_badge_list.rb +1 -0
- data/app/views/components/pageflow/admin/extensible_attributes_table.rb +9 -8
- data/app/views/components/pageflow/admin/features_tab.rb +1 -0
- data/app/views/components/pageflow/admin/grouped_folder_list.rb +1 -0
- data/app/views/components/pageflow/admin/icon_link_to.rb +1 -0
- data/app/views/components/pageflow/admin/members_tab.rb +4 -3
- data/app/views/components/pageflow/admin/membership_role_with_tooltip.rb +3 -2
- data/app/views/components/pageflow/admin/revisions_tab.rb +14 -10
- data/app/views/components/pageflow/admin/sites_tab.rb +1 -0
- data/app/views/components/pageflow/admin/tabs_view.rb +1 -0
- data/app/views/components/pageflow/admin/timestamp.rb +6 -5
- data/app/views/components/pageflow/admin/user_account_badge_list.rb +2 -3
- data/app/views/components/pageflow/admin/user_accounts_tab.rb +1 -0
- data/app/views/components/pageflow/admin/user_entries_tab.rb +1 -0
- data/app/views/components/pageflow/admin/users_tab.rb +1 -0
- data/app/views/pageflow/editor/config/_seeds.json.jbuilder +1 -1
- data/app/views/pageflow/editor/entries/index.json.jbuilder +1 -1
- data/app/views/pageflow/editor/entries/show.json.jbuilder +1 -1
- data/app/views/pageflow/editor/entry_publications/check.json.jbuilder +2 -2
- data/app/views/pageflow/editor/files/_file.json.jbuilder +5 -13
- data/app/views/pageflow/editor/files/create.json.jbuilder +1 -1
- data/app/views/pageflow/editor/files/index.json.jbuilder +1 -1
- data/app/views/pageflow/editor/sites/_site.json.jbuilder +1 -0
- data/app/views/pageflow/editor/video_files/_video_file.json.jbuilder +1 -3
- data/app/views/pageflow/entries/share_menu/_bluesky_link.html.erb +8 -0
- data/app/views/pageflow/entries/share_menu/_threads_link.html.erb +8 -0
- data/app/views/pageflow/files/_file.json.jbuilder +3 -3
- data/app/views/pageflow/sitemaps/index.xml.builder +9 -1
- data/app/views/pageflow/social_share/_entry_meta_tags.html.erb +1 -1
- data/app/views/pageflow/social_share/_page_meta_tags.html.erb +1 -1
- data/config/initializers/active_admin_patches.rb +3 -6
- data/config/initializers/admin_resource_tabs.rb +3 -0
- data/config/initializers/paperclip.rb +1 -0
- data/config/initializers/symmetric_encryption.rb +1 -1
- data/config/initializers/zencoder.rb +24 -13
- data/config/locales/de.yml +110 -4
- data/config/locales/en.yml +109 -7
- data/config/routes.rb +15 -13
- data/config/spring.rb +2 -1
- data/db/migrate/20140418225525_setup_schema.rb +2 -2
- data/db/migrate/20190306161431_copy_file_attributes_of_failed_uploads.rb +2 -2
- data/db/migrate/20190820152900_drop_accounts_themes.rb +2 -1
- data/db/migrate/20191202145757_create_pageflow_scrolled_sections.rb +11 -11
- data/db/migrate/20191202150657_create_pageflow_scrolled_chapters.rb +1 -1
- data/db/migrate/20191202154723_create_pageflow_scrolled_content_elements.rb +9 -9
- data/db/migrate/20191219143450_add_position_to_content_elements.rb +2 -1
- data/db/migrate/20200117133200_change_revision_appearance_option_default_and_null.rb +2 -1
- data/db/migrate/20200122115400_create_pageflow_entry_templates.rb +25 -25
- data/db/migrate/20200206134400_convert_legacy_scrolled_content_element_types.rb +3 -3
- data/db/migrate/20221215120856_associate_entry_templates_with_sites.rb +2 -2
- data/db/migrate/20230120092923_create_other_files.rb +2 -1
- data/db/migrate/20230419083307_create_pageflow_entry_translation_group.rb +9 -0
- data/db/migrate/20240612110434_add_cutoff_mode_name_to_sites.rb +5 -0
- data/db/migrate/20240918084059_create_pageflow_permalink_redirects.rb +14 -0
- data/db/migrate/20250508172234_ensure_scrolled_entries_have_main_storyline.rb +14 -0
- data/db/migrate/20250617090048_add_custom404_entry_to_sites.rb +5 -0
- data/db/migrate/20250617100000_add_perma_id_counter_to_entries.rb +28 -0
- data/db/migrate/20250722174123_add_perma_id_to_chapters.rb +10 -0
- data/db/migrate/20250725080603_add_perma_id_indexes_to_revision_components.rb +13 -0
- data/db/migrate/20250726000000_add_display_name_to_file_usages.rb +5 -0
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +3912 -1486
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +468 -1161
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +28125 -22
- data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +26589 -19
- data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +1 -0
- data/entry_types/paged/app/helpers/pageflow_paged/page_background_asset_helper.rb +1 -1
- data/entry_types/paged/app/helpers/pageflow_paged/third_party_embed_consent_helper.rb +7 -7
- data/entry_types/paged/app/views/pageflow_paged/editor/entries/_seed.json.jbuilder +1 -0
- data/entry_types/paged/app/views/pageflow_paged/entries/show.html.erb +1 -0
- data/entry_types/paged/lib/pageflow_paged/plugin.rb +4 -0
- data/entry_types/paged/lib/pageflow_paged/react/page_type.rb +1 -1
- data/entry_types/paged/lib/pageflow_paged/react/widget_type.rb +3 -3
- data/entry_types/paged/lib/pageflow_paged.rb +1 -1
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +5 -3
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +2 -2
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +2 -2
- data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +2 -1
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/cache_helper.rb +2 -2
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/entry_json_seed_helper.rb +1 -0
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +2 -1
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/entry_json_seed_helper.rb +60 -6
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +16 -2
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +21 -23
- data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +16 -1
- data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +15 -14
- data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +12 -0
- data/entry_types/scrolled/app/models/pageflow_scrolled/section.rb +12 -1
- data/entry_types/scrolled/app/models/pageflow_scrolled/storyline.rb +19 -1
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/editor/sections/_section_with_content_elements.json.jbuilder +2 -2
- data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +2 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +17 -9
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry_translations.json.jbuilder +14 -0
- data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +25 -5
- data/entry_types/scrolled/app/views/pageflow_scrolled/storylines/_storyline.json.jbuilder +7 -0
- data/entry_types/scrolled/config/locales/de.yml +614 -45
- data/entry_types/scrolled/config/locales/en.yml +586 -47
- data/entry_types/scrolled/config/routes.rb +18 -8
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +11 -11
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoDarkVariantDesktop.svg +56 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/theme/logoDarkVariantMobile.svg +22 -0
- data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +26 -11
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +27 -8
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +1 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/additional_theme_assets.rb +27 -0
- data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +16 -4
- data/entry_types/scrolled/lib/pageflow_scrolled/content_element_consent_vendors.rb +1 -1
- data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +24 -4
- data/entry_types/scrolled/lib/pageflow_scrolled/seeds.rb +24 -22
- data/entry_types/scrolled/lib/pageflow_scrolled.rb +1 -1
- data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +6 -5
- data/entry_types/scrolled/package/config/webpack.js +22 -0
- data/entry_types/scrolled/package/contentElements/hotspots-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements/hotspots-frontend.js +1529 -0
- data/entry_types/scrolled/package/contentElements/tikTokEmbed-frontend.css +1 -0
- data/entry_types/scrolled/package/contentElements/tikTokEmbed-frontend.js +59 -0
- data/entry_types/scrolled/package/contentElements-editor.js +2075 -321
- data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
- data/entry_types/scrolled/package/contentElements-frontend.js +1019 -643
- data/entry_types/scrolled/package/editor.js +2086 -1091
- data/entry_types/scrolled/package/frontend/{EditableInlineText.module-ebd22921.js → FloatingPortalRootProvider-51914be7.js} +1200 -1258
- data/entry_types/scrolled/package/frontend/{PhonePlatformContext-4ec6b2de.js → PhonePlatformContext-9f76033e.js} +7 -8
- data/entry_types/scrolled/package/frontend/ThemeIcon-81f2f066.js +1932 -0
- data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-788e9cdb.js +39 -0
- data/entry_types/scrolled/package/frontend/{Viewer-1bb5597c.js → Viewer-0345ce57.js} +36 -63
- data/entry_types/scrolled/package/frontend/{Viewer-1ecf3375.js → Viewer-cdc549cc.js} +15 -22
- data/entry_types/scrolled/package/frontend/{Wavesurfer-7d9cf1b7.js → Wavesurfer-1cdc3925.js} +54 -74
- data/entry_types/scrolled/package/frontend/{components-024a9893.js → components-96660ffd.js} +1791 -841
- data/entry_types/scrolled/package/frontend/{index-11f32f10.js → index-eb670c2f.js} +11 -18
- data/entry_types/scrolled/package/frontend/index.css +1 -1
- data/entry_types/scrolled/package/frontend/index.js +517 -903
- data/entry_types/scrolled/package/frontend/{createSuper-d0f30da3.js → inherits-539844a6.js} +40 -56
- data/entry_types/scrolled/package/frontend/{useContentElementEditorState-4f4c3cf6.js → useContentElementEditorState-77fe6c79.js} +7 -8
- data/entry_types/scrolled/package/frontend/usePhonePlatform-c2ba875d.js +8 -0
- data/entry_types/scrolled/package/frontend-server.js +0 -1
- data/entry_types/scrolled/package/package.json +18 -10
- data/entry_types/scrolled/package/testHelpers.js +306 -70
- data/entry_types/scrolled/package/values/widgets.module.css +18 -0
- data/entry_types/scrolled/package/widgets/consentBar.css +1 -1
- data/entry_types/scrolled/package/widgets/consentBar.js +47 -66
- data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
- data/entry_types/scrolled/package/widgets/defaultNavigation.js +177 -207
- data/entry_types/scrolled/package/widgets/excursionDialog.css +1 -0
- data/entry_types/scrolled/package/widgets/excursionDialog.js +109 -0
- data/entry_types/scrolled/package/widgets/excursionSheet.css +1 -0
- data/entry_types/scrolled/package/widgets/excursionSheet.js +262 -0
- data/entry_types/scrolled/package/widgets/iconInlineFileRights.css +1 -1
- data/entry_types/scrolled/package/widgets/iconInlineFileRights.js +6 -9
- data/entry_types/scrolled/package/widgets/iconScrollIndicator.css +1 -0
- data/entry_types/scrolled/package/widgets/iconScrollIndicator.js +48 -0
- data/entry_types/scrolled/package/widgets/mainStorylineSheet.css +1 -0
- data/entry_types/scrolled/package/widgets/mainStorylineSheet.js +144 -0
- data/entry_types/scrolled/package/widgets/textInlineFileRights.css +1 -1
- data/entry_types/scrolled/package/widgets/textInlineFileRights.js +26 -9
- data/entry_types/scrolled/package/widgets-server.js +1 -0
- data/entry_types/scrolled/spec/factories/chapters.rb +14 -1
- data/entry_types/scrolled/spec/factories/content_elements.rb +1 -1
- data/lib/generators/pageflow/active_admin_initializer/active_admin_initializer_generator.rb +5 -3
- data/lib/generators/pageflow/assets/assets_generator.rb +7 -5
- data/lib/generators/pageflow/cancan/cancan_generator.rb +2 -1
- data/lib/generators/pageflow/cancan/templates/ability.rb +1 -1
- data/lib/generators/pageflow/error_pages/error_pages_generator.rb +2 -1
- data/lib/generators/pageflow/initializer/initializer_generator.rb +3 -2
- data/lib/generators/pageflow/install/install_generator.rb +2 -2
- data/lib/generators/pageflow/procfile/procfile_generator.rb +2 -1
- data/lib/generators/pageflow/resque/resque_generator.rb +6 -4
- data/lib/generators/pageflow/resque/templates/resque.rake +1 -1
- data/lib/generators/pageflow/routes/routes_generator.rb +4 -2
- data/lib/generators/pageflow/seeds/seeds_generator.rb +3 -2
- data/lib/generators/pageflow/seeds/templates/seeds.rb +6 -6
- data/lib/generators/pageflow/theme/theme_generator.rb +2 -1
- data/lib/generators/pageflow/user/user_generator.rb +2 -1
- data/lib/pageflow/ability_mixin.rb +25 -15
- data/lib/pageflow/active_admin_patches/views/attributes_table.rb +1 -0
- data/lib/pageflow/active_admin_patches/views/pages/base.rb +3 -2
- data/lib/pageflow/active_admin_patches/views/table_for.rb +1 -0
- data/lib/pageflow/additional_headers.rb +27 -0
- data/lib/pageflow/admin/attributes_table_rows.rb +3 -3
- data/lib/pageflow/admin/tabs.rb +1 -1
- data/lib/pageflow/built_in_file_type.rb +1 -1
- data/lib/pageflow/built_in_page_types_plugin.rb +1 -1
- data/lib/pageflow/built_in_widget_type.rb +2 -2
- data/lib/pageflow/built_in_widget_types_plugin.rb +2 -1
- data/lib/pageflow/configuration.rb +141 -18
- data/lib/pageflow/cutoff_modes.rb +39 -0
- data/lib/pageflow/editor_controller.rb +6 -10
- data/lib/pageflow/engine.rb +4 -5
- data/lib/pageflow/entry_export_import/attachment_files.rb +1 -1
- data/lib/pageflow/entry_export_import/entry_serialization.rb +5 -4
- data/lib/pageflow/entry_export_import/file_mappings.rb +1 -0
- data/lib/pageflow/entry_export_import/revision_serialization/import.rb +1 -1
- data/lib/pageflow/entry_export_import.rb +3 -3
- data/lib/pageflow/entry_types.rb +2 -2
- data/lib/pageflow/feature.rb +1 -1
- data/lib/pageflow/features.rb +4 -6
- data/lib/pageflow/file_importers.rb +4 -4
- data/lib/pageflow/file_type.rb +3 -3
- data/lib/pageflow/file_types.rb +3 -3
- data/lib/pageflow/global_config_api.rb +5 -6
- data/lib/pageflow/help_entries.rb +7 -7
- data/lib/pageflow/help_entry.rb +1 -1
- data/lib/pageflow/hooks.rb +1 -1
- data/lib/pageflow/nested_revision_component.rb +9 -27
- data/lib/pageflow/news_item_api.rb +1 -1
- data/lib/pageflow/page_type.rb +2 -3
- data/lib/pageflow/page_types.rb +3 -3
- data/lib/pageflow/paperclip_interpolations/support.rb +1 -1
- data/lib/pageflow/paperclip_processors/vtt.rb +1 -0
- data/lib/pageflow/paperclip_processors/webp.rb +2 -2
- data/lib/pageflow/partial_editor_fragment_renderer.rb +2 -2
- data/lib/pageflow/plugin.rb +1 -2
- data/lib/pageflow/quota.rb +9 -5
- data/lib/pageflow/quotas.rb +1 -1
- data/lib/pageflow/rails_version.rb +1 -0
- data/lib/pageflow/react.rb +1 -1
- data/lib/pageflow/revision_component.rb +8 -40
- data/lib/pageflow/revision_components.rb +16 -6
- data/lib/pageflow/seeds.rb +12 -16
- data/lib/pageflow/theme.rb +1 -1
- data/lib/pageflow/theme_customizations.rb +10 -10
- data/lib/pageflow/themes.rb +3 -3
- data/lib/pageflow/user_mixin.rb +6 -6
- data/lib/pageflow/version.rb +1 -1
- data/lib/pageflow/widget_type.rb +4 -4
- data/lib/pageflow/widget_types.rb +9 -9
- data/lib/pageflow/zencoder_api.rb +32 -42
- data/lib/pageflow/zencoder_audio_output_definition.rb +14 -13
- data/lib/pageflow/zencoder_meta_data_output_definition.rb +3 -2
- data/lib/pageflow/zencoder_output_definition.rb +16 -14
- data/lib/pageflow/zencoder_video_output_definition.rb +140 -88
- data/lib/pageflow.rb +7 -2
- data/lib/tasks/pageflow_tasks.rake +1 -1
- data/package/editor.js +954 -868
- data/package/frontend.js +113 -387
- data/package/package.json +2 -1
- data/package/testHelpers.js +10 -56
- data/package/ui.js +209 -251
- data/spec/factories/accounts.rb +37 -22
- data/spec/factories/audio_files.rb +2 -2
- data/spec/factories/authentication_tokens.rb +4 -4
- data/spec/factories/chapters.rb +4 -4
- data/spec/factories/draft_entries.rb +14 -6
- data/spec/factories/edit_locks.rb +1 -1
- data/spec/factories/entries.rb +28 -19
- data/spec/factories/entry_translation_groups.rb +6 -0
- data/spec/factories/file_usages.rb +2 -1
- data/spec/factories/folders.rb +1 -1
- data/spec/factories/image_files.rb +2 -2
- data/spec/factories/pages.rb +3 -3
- data/spec/factories/published_entries.rb +26 -8
- data/spec/factories/revisions.rb +1 -1
- data/spec/factories/sites.rb +6 -0
- data/spec/factories/test_multi_attachment_files.rb +1 -1
- data/spec/factories/text_track_files.rb +1 -1
- data/spec/factories/uploadable_files.rb +1 -1
- data/spec/factories/users.rb +6 -6
- data/spec/factories/video_files.rb +2 -2
- data/spec/factories/widgets.rb +1 -1
- data/spec/fixtures/7x15_rotated.jpg +0 -0
- data/vendor/assets/javascripts/wysihtml-toolbar.js +19288 -0
- metadata +98 -45
- data/config/initializers/revision_components.rb +0 -5
- data/config/locales/twitter_to_x.de.yml +0 -6
- data/config/locales/twitter_to_x.en.yml +0 -6
- data/entry_types/scrolled/config/locales/twitter_to_x.de.yml +0 -12
- data/entry_types/scrolled/config/locales/twitter_to_x.en.yml +0 -12
- data/entry_types/scrolled/config/locales/vr_image_projection.de.yml +0 -24
- data/entry_types/scrolled/config/locales/vr_image_projection.en.yml +0 -24
- data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-b79159cc.js +0 -107
- data/entry_types/scrolled/package/frontend/arrowRight-62998af9.js +0 -77
- data/entry_types/scrolled/package/frontend/i18n-ce13a8bf.js +0 -1129
@@ -1,6 +1,5 @@
|
|
1
|
-
import '
|
2
|
-
|
3
|
-
export { a8 as Atmo, a9 as AtmoContext, A as AtmoProvider, a6 as AudioPlayer, h as EditableText, $ as Image, I as InlineFileRights, a1 as MediaPlayer, O as PhonePlatformProvider, P as PlayerEventContextDataProvider, R as RootProviders, ad as SectionThumbnail, ac as StandaloneSectionThumbnail, a0 as Text, Q as ThirdPartyOptIn, T as ThirdPartyOptOutInfo, a5 as VideoPlayer, W as Widget, Z as contentElementWidthName, l as contentElementWidths, D as frontend, X as getAvailableTransitionNames, a2 as getInitialPlayerState, V as getTransitionNames, Y as paletteColor, a3 as playerStateReducer, a7 as processSources, B as registerConsentVendors, aa as useAtmo, G as useAudioFocus, U as useConsentRequested, j as useContentElementConfigurationUpdate, H as useContentElementEditorCommandSubscription, J as useContentElementLifecycle, K as useCurrentChapter, f as useDarkBackground, L as useIsStaticPreview, n as useMediaMuted, ab as useOnScreen, M as useOnUnmuteMedia, a4 as usePlayerState, N as usePortraitOrientation } from './EditableInlineText.module-ebd22921.js';
|
1
|
+
import { E as EventContextDataProvider, C as ConnectedSection, u as usePrevious, g as getEventObject, w as withInlineEditingDecorator, a as useCurrentSectionIndexState, b as useScrollToTarget, c as usePostMessageListener, d as contentStyles, A as AtmoProvider, W as Widget, S as SelectableWidget, _ as _asyncToGenerator, e as withInlineEditingAlternative, f as useDarkBackground, i as isBlankEditableTextValue, h as EditableText, j as useContentElementAttributes, k as widths, l as useContentElementConfigurationUpdate, I as InlineFileRights, m as useTextTracks, n as useMediaMuted, o as useFocusOutlineVisible, p as useVideoQualitySetting, q as useIsomorphicLayoutEffect, r as frontendStyles, L as Link, F as Fullscreen, T as Text, s as utils, t as styles$d, R as RootProviders, v as registerVendors, x as api, y as loadInlineEditingComponents } from './FloatingPortalRootProvider-51914be7.js';
|
2
|
+
export { ac as Atmo, ad as AtmoContext, A as AtmoProvider, aa as AudioPlayer, D as ContentElementAttributesProvider, H as ContentElementEditorCommandEmitterContext, K as ContentElementLifecycleContext, U as EditableTable, h as EditableText, $ as FloatingPortalRootProvider, a4 as Image, I as InlineFileRights, a5 as MediaPlayer, af as OnScreenObserverRootProvider, P as PlayerEventContextDataProvider, R as RootProviders, ai as SectionThumbnail, S as SelectableWidget, ah as StandaloneSectionThumbnail, T as Text, V as ThirdPartyOptIn, X as ThirdPartyOptOutInfo, a9 as VideoPlayer, W as Widget, a3 as contentElementWidthName, k as contentElementWidths, x as frontend, a1 as getAvailableTransitionNames, a6 as getInitialPlayerState, a0 as getTransitionNames, a2 as paletteColor, a7 as playerStateReducer, ab as processSources, v as registerConsentVendors, ae as useAtmo, z as useAudioFocus, B as useBackgroundFile, Y as useConsentRequested, l as useContentElementConfigurationUpdate, G as useContentElementEditorCommandSubscription, J as useContentElementLifecycle, M as useCurrentChapter, f as useDarkBackground, Z as useFloatingPortalRoot, N as useIsStaticPreview, q as useIsomorphicLayoutEffect, n as useMediaMuted, ag as useOnScreen, O as useOnUnmuteMedia, a8 as usePlayerState, Q as usePortraitOrientation, s as utils } from './FloatingPortalRootProvider-51914be7.js';
|
4
3
|
import 'core-js/modules/es.symbol';
|
5
4
|
import 'core-js/modules/es.symbol.description';
|
6
5
|
import 'core-js/modules/es.symbol.async-iterator';
|
@@ -19,6 +18,7 @@ import 'core-js/modules/es.array.concat';
|
|
19
18
|
import 'core-js/modules/es.array.fill';
|
20
19
|
import 'core-js/modules/es.array.find';
|
21
20
|
import 'core-js/modules/es.array.from';
|
21
|
+
import 'core-js/modules/es.array.iterator';
|
22
22
|
import 'core-js/modules/es.json.to-string-tag';
|
23
23
|
import 'core-js/modules/es.map';
|
24
24
|
import 'core-js/modules/es.math.to-string-tag';
|
@@ -76,12 +76,12 @@ import 'regenerator-runtime/runtime.js';
|
|
76
76
|
import { browser, events, consent, features } from 'pageflow/frontend';
|
77
77
|
import React, { useRef, useState, useEffect, useCallback, useMemo, Suspense, useContext } from 'react';
|
78
78
|
import ReactDOM from 'react-dom';
|
79
|
-
import { _ as _slicedToArray,
|
80
|
-
export { L as LocaleProvider,
|
79
|
+
import { _ as _slicedToArray, m as useSectionsWithChapter, t as useEntryStructure, v as getFileUrlTemplateHost, u as useI18n, g as useTheme, b as _defineProperty, a as _objectSpread2, T as ThemeIcon, o as _toConsumableArray, e as _objectWithoutProperties, w as useAvailableQualities, x as setupI18n } from './ThemeIcon-81f2f066.js';
|
80
|
+
export { L as LocaleProvider, T as ThemeIcon, x as setupI18n, l as useAdditionalSeedData, y as useChapters, z as useCredits, A as useCutOff, B as useDarkWidgets, c as useEntryMetadata, r as useEntryStateDispatch, C as useEntryTranslations, j as useFile, D as useFileRights, i as useFileWithInlineRights, u as useI18n, F as useLegalInfo, J as useLocale, G as useMainChapters, H as useShareProviders, I as useShareUrl, g as useTheme } from './ThemeIcon-81f2f066.js';
|
81
81
|
import classNames from 'classnames';
|
82
|
-
import { a as useContentElementEditorState } from './useContentElementEditorState-
|
83
|
-
export { a as useContentElementEditorState } from './useContentElementEditorState-
|
84
|
-
import './
|
82
|
+
import { a as useContentElementEditorState } from './useContentElementEditorState-77fe6c79.js';
|
83
|
+
export { C as ContentElementEditorStateContext, a as useContentElementEditorState } from './useContentElementEditorState-77fe6c79.js';
|
84
|
+
import './inherits-539844a6.js';
|
85
85
|
import 'backbone-events-standalone';
|
86
86
|
import 'use-context-selector';
|
87
87
|
import 'reselect';
|
@@ -89,12 +89,12 @@ import 'slugify';
|
|
89
89
|
import 'i18n-js';
|
90
90
|
import 'striptags';
|
91
91
|
import Measure from 'react-measure';
|
92
|
-
|
92
|
+
export { P as PhonePlatformContext } from './PhonePlatformContext-9f76033e.js';
|
93
93
|
import { DraggableCore } from 'react-draggable';
|
94
|
-
export { T as ToggleFullscreenCornerButton } from './ToggleFullscreenCornerButton-
|
95
|
-
export { F as FullscreenViewer } from './index-
|
96
|
-
import {
|
97
|
-
export { u as usePhonePlatform } from './
|
94
|
+
export { T as ToggleFullscreenCornerButton } from './ToggleFullscreenCornerButton-788e9cdb.js';
|
95
|
+
export { F as FullscreenViewer } from './index-eb670c2f.js';
|
96
|
+
import { useI18n as useI18n$1, useTheme as useTheme$1 } from 'pageflow-scrolled/frontend';
|
97
|
+
export { u as usePhonePlatform } from './usePhonePlatform-c2ba875d.js';
|
98
98
|
import invert from 'invert-color';
|
99
99
|
|
100
100
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
@@ -104,37 +104,33 @@ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof win
|
|
104
104
|
// See https://v4.webpack.js.org/guides/public-path/#on-the-fly
|
105
105
|
// PageflowScrolled::WebpackPublicPathHelper generates js snippet
|
106
106
|
// that defines the global. For Storybook, we set it to an empty default.
|
107
|
+
|
107
108
|
// eslint-disable-next-line no-undef
|
108
109
|
__webpack_public_path__ = commonjsGlobal.__webpack_public_path__ || '';
|
109
110
|
|
111
|
+
// Safari does not handle positive root margin correctly inside
|
110
112
|
// iframes. Use polyfill instead.
|
111
|
-
|
112
113
|
if (browser.agent.matchesSafari() && window.parent !== window) {
|
113
114
|
delete window.IntersectionObserver;
|
114
115
|
}
|
116
|
+
require('intersection-observer');
|
115
117
|
|
116
|
-
|
118
|
+
// Make sure we're in a Browser-like environment before importing polyfills
|
117
119
|
// This prevents `fetch()` from being imported in a Node test environment
|
118
|
-
|
119
|
-
|
120
120
|
if (typeof window !== 'undefined') {
|
121
121
|
require('whatwg-fetch');
|
122
|
-
|
123
122
|
require('scroll-timeline');
|
124
123
|
}
|
125
124
|
|
126
125
|
function Chapter(props) {
|
127
126
|
return /*#__PURE__*/React.createElement("div", {
|
128
127
|
id: props.chapterSlug
|
129
|
-
}, renderSections(props.sections, props.currentSectionIndex, props.setCurrentSection
|
128
|
+
}, renderSections(props.sections, props.currentSectionIndex, props.setCurrentSection));
|
130
129
|
}
|
131
|
-
|
132
|
-
function renderSections(sections, currentSectionIndex, setCurrentSection, scrollTargetSectionIndex, setScrollTargetSectionIndex) {
|
130
|
+
function renderSections(sections, currentSectionIndex, setCurrentSection) {
|
133
131
|
function _onActivate(section) {
|
134
132
|
setCurrentSection(section);
|
135
|
-
setScrollTargetSectionIndex(null);
|
136
133
|
}
|
137
|
-
|
138
134
|
return sections.map(function (section) {
|
139
135
|
return /*#__PURE__*/React.createElement(EventContextDataProvider, {
|
140
136
|
key: section.permaId,
|
@@ -142,7 +138,6 @@ function renderSections(sections, currentSectionIndex, setCurrentSection, scroll
|
|
142
138
|
sectionsCount: sections.length
|
143
139
|
}, /*#__PURE__*/React.createElement(ConnectedSection, {
|
144
140
|
state: section.sectionIndex > currentSectionIndex ? 'below' : section.sectionIndex < currentSectionIndex ? 'above' : 'active',
|
145
|
-
isScrollTarget: section.sectionIndex === scrollTargetSectionIndex,
|
146
141
|
onActivate: function onActivate() {
|
147
142
|
return _onActivate(section);
|
148
143
|
},
|
@@ -151,6 +146,7 @@ function renderSections(sections, currentSectionIndex, setCurrentSection, scroll
|
|
151
146
|
});
|
152
147
|
}
|
153
148
|
|
149
|
+
// InApp browsers on iOS (e.g. Twitter) report the height of the
|
154
150
|
// initial viewport as 100vh. Once the page is scrolled, browser
|
155
151
|
// toolbars are hidden, the viewport becomes larger and elements with
|
156
152
|
// height 100vh no longer cover the viewport.
|
@@ -168,26 +164,21 @@ function renderSections(sections, currentSectionIndex, setCurrentSection, scroll
|
|
168
164
|
// On orientation change, we do want to update `--vh`, though. We
|
169
165
|
// therefore do update it when the inner height of the window
|
170
166
|
// decreases by more than 30%.
|
171
|
-
|
172
167
|
function VhFix(_ref) {
|
173
168
|
var children = _ref.children;
|
174
169
|
var probeRef = useRef();
|
175
|
-
|
176
170
|
var _useState = useState(),
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
171
|
+
_useState2 = _slicedToArray(_useState, 2),
|
172
|
+
height = _useState2[0],
|
173
|
+
setHeight = _useState2[1];
|
181
174
|
useEffect(function () {
|
182
175
|
if (!browser.has('ios platform')) {
|
183
176
|
return;
|
184
177
|
}
|
185
|
-
|
186
178
|
window.addEventListener('resize', update);
|
187
179
|
return function () {
|
188
180
|
return window.removeEventListener('resize', update);
|
189
181
|
};
|
190
|
-
|
191
182
|
function update() {
|
192
183
|
setHeight(function (previousHeight) {
|
193
184
|
return getHeight({
|
@@ -212,9 +203,8 @@ function VhFix(_ref) {
|
|
212
203
|
}
|
213
204
|
function getHeight(_ref2) {
|
214
205
|
var windowHeight = _ref2.windowHeight,
|
215
|
-
|
216
|
-
|
217
|
-
|
206
|
+
probeHeight = _ref2.probeHeight,
|
207
|
+
previousHeight = _ref2.previousHeight;
|
218
208
|
if (probeHeight < windowHeight || previousHeight) {
|
219
209
|
if (!previousHeight || windowHeight > previousHeight || windowHeight < previousHeight * 0.7) {
|
220
210
|
return windowHeight;
|
@@ -224,6 +214,65 @@ function getHeight(_ref2) {
|
|
224
214
|
}
|
225
215
|
}
|
226
216
|
|
217
|
+
function useActiveExcursion(entryStructure) {
|
218
|
+
var _useState = useState(),
|
219
|
+
_useState2 = _slicedToArray(_useState, 2),
|
220
|
+
activeExcursionId = _useState2[0],
|
221
|
+
setActiveExcursionId = _useState2[1];
|
222
|
+
useEffect(function () {
|
223
|
+
function handleHashChange(event) {
|
224
|
+
var _window$history$state;
|
225
|
+
var slug = window.location.hash.slice(1);
|
226
|
+
var excursion = entryStructure.excursions.find(function (chapter) {
|
227
|
+
return chapter.chapterSlug === slug;
|
228
|
+
});
|
229
|
+
if (excursion && !((_window$history$state = window.history.state) === null || _window$history$state === void 0 ? void 0 : _window$history$state.excursionReturnHash)) {
|
230
|
+
window.history.replaceState({
|
231
|
+
excursionReturnHash: '#' + event.oldURL.split('#')[1]
|
232
|
+
}, null);
|
233
|
+
}
|
234
|
+
setActiveExcursionId(excursion === null || excursion === void 0 ? void 0 : excursion.id);
|
235
|
+
}
|
236
|
+
window.addEventListener('hashchange', handleHashChange);
|
237
|
+
return function () {
|
238
|
+
return window.removeEventListener('hashchange', handleHashChange);
|
239
|
+
};
|
240
|
+
}, [entryStructure]);
|
241
|
+
var activateExcursionOfSection = useCallback(function (_ref) {
|
242
|
+
var id = _ref.id;
|
243
|
+
var excursion = entryStructure.excursions.find(function (chapter) {
|
244
|
+
return chapter.sections.find(function (section) {
|
245
|
+
return section.id === id;
|
246
|
+
});
|
247
|
+
});
|
248
|
+
if (excursion) {
|
249
|
+
var _window$history$state2;
|
250
|
+
window.history.replaceState({
|
251
|
+
excursionReturnHash: ((_window$history$state2 = window.history.state) === null || _window$history$state2 === void 0 ? void 0 : _window$history$state2.excursionReturnHash) || window.location.hash
|
252
|
+
}, null, '#' + excursion.chapterSlug);
|
253
|
+
}
|
254
|
+
setActiveExcursionId(excursion === null || excursion === void 0 ? void 0 : excursion.id);
|
255
|
+
}, [entryStructure]);
|
256
|
+
var returnFromExcursion = useCallback(function () {
|
257
|
+
var _window$history$state3;
|
258
|
+
setActiveExcursionId(undefined);
|
259
|
+
if ((_window$history$state3 = window.history.state) === null || _window$history$state3 === void 0 ? void 0 : _window$history$state3.excursionReturnHash) {
|
260
|
+
var _window$history$state4;
|
261
|
+
window.history.replaceState(null, null, (_window$history$state4 = window.history.state) === null || _window$history$state4 === void 0 ? void 0 : _window$history$state4.excursionReturnHash);
|
262
|
+
}
|
263
|
+
}, []);
|
264
|
+
var activeExcursion = useMemo(function () {
|
265
|
+
return entryStructure.excursions.find(function (excursion) {
|
266
|
+
return excursion.id === activeExcursionId;
|
267
|
+
});
|
268
|
+
}, [entryStructure, activeExcursionId]);
|
269
|
+
return {
|
270
|
+
activeExcursion: activeExcursion,
|
271
|
+
activateExcursionOfSection: activateExcursionOfSection,
|
272
|
+
returnFromExcursion: returnFromExcursion
|
273
|
+
};
|
274
|
+
}
|
275
|
+
|
227
276
|
function useSectionChangeEvents(currentSectionIndex) {
|
228
277
|
var previousSectionIndex = usePrevious(currentSectionIndex);
|
229
278
|
var sections = useSectionsWithChapter();
|
@@ -249,19 +298,16 @@ var sectionChangeMessagePoster = function sectionChangeMessagePoster(index) {
|
|
249
298
|
};
|
250
299
|
|
251
300
|
var Content = withInlineEditingDecorator('ContentDecorator', function Content(props) {
|
252
|
-
var _useCurrentSectionInd = useCurrentSectionIndexState(),
|
253
|
-
_useCurrentSectionInd2 = _slicedToArray(_useCurrentSectionInd, 2),
|
254
|
-
currentSectionIndex = _useCurrentSectionInd2[0],
|
255
|
-
setCurrentSectionIndexState = _useCurrentSectionInd2[1];
|
256
|
-
|
257
|
-
var _useState = useState(null),
|
258
|
-
_useState2 = _slicedToArray(_useState, 2),
|
259
|
-
scrollTargetSectionIndex = _useState2[0],
|
260
|
-
setScrollTargetSectionIndex = _useState2[1];
|
261
|
-
|
262
301
|
var entryStructure = useEntryStructure();
|
302
|
+
var _useActiveExcursion = useActiveExcursion(entryStructure),
|
303
|
+
activeExcursion = _useActiveExcursion.activeExcursion,
|
304
|
+
activateExcursionOfSection = _useActiveExcursion.activateExcursionOfSection,
|
305
|
+
returnFromExcursion = _useActiveExcursion.returnFromExcursion;
|
306
|
+
var _useCurrentSectionInd = useCurrentSectionIndexState(),
|
307
|
+
_useCurrentSectionInd2 = _slicedToArray(_useCurrentSectionInd, 2),
|
308
|
+
currentSectionIndex = _useCurrentSectionInd2[0],
|
309
|
+
setCurrentSectionIndexState = _useCurrentSectionInd2[1];
|
263
310
|
useSectionChangeEvents(currentSectionIndex);
|
264
|
-
|
265
311
|
var updateChapterSlug = function updateChapterSlug(section) {
|
266
312
|
if (window.history && window.history.replaceState) {
|
267
313
|
if (section.sectionIndex > 0) {
|
@@ -271,97 +317,99 @@ var Content = withInlineEditingDecorator('ContentDecorator', function Content(pr
|
|
271
317
|
}
|
272
318
|
}
|
273
319
|
};
|
274
|
-
|
275
320
|
var setCurrentSection = useCallback(function (section) {
|
276
321
|
sectionChangeMessagePoster(section.sectionIndex);
|
277
322
|
setCurrentSectionIndexState(section.sectionIndex);
|
278
323
|
updateChapterSlug(section);
|
279
324
|
}, [setCurrentSectionIndexState]);
|
325
|
+
var scrollToTarget = useScrollToTarget();
|
280
326
|
var receiveMessage = useCallback(function (data) {
|
281
327
|
if (data.type === 'SCROLL_TO_SECTION') {
|
282
|
-
|
328
|
+
activateExcursionOfSection({
|
329
|
+
id: data.payload.id
|
330
|
+
});
|
331
|
+
scrollToTarget({
|
332
|
+
id: data.payload.id,
|
333
|
+
align: data.payload.align
|
334
|
+
});
|
283
335
|
}
|
284
|
-
}, []);
|
336
|
+
}, [scrollToTarget, activateExcursionOfSection]);
|
285
337
|
usePostMessageListener(receiveMessage);
|
286
|
-
|
287
|
-
function scrollToSection(index) {
|
288
|
-
if (index === 'next') {
|
289
|
-
index = currentSectionIndex + 1;
|
290
|
-
}
|
291
|
-
|
292
|
-
setScrollTargetSectionIndex(index);
|
293
|
-
}
|
294
|
-
|
295
338
|
return /*#__PURE__*/React.createElement("div", {
|
296
339
|
className: contentStyles.Content,
|
297
340
|
id: "goToContent"
|
298
|
-
}, /*#__PURE__*/React.createElement(VhFix, null, /*#__PURE__*/React.createElement(AtmoProvider, null,
|
299
|
-
|
300
|
-
|
341
|
+
}, /*#__PURE__*/React.createElement(VhFix, null, /*#__PURE__*/React.createElement(AtmoProvider, null, renderChapters(entryStructure.main, currentSectionIndex, setCurrentSection), renderExcursion(activeExcursion, {
|
342
|
+
onClose: function onClose() {
|
343
|
+
return returnFromExcursion();
|
344
|
+
}
|
345
|
+
}))));
|
301
346
|
});
|
302
|
-
|
303
|
-
|
304
|
-
|
347
|
+
function renderExcursion(excursion, _ref) {
|
348
|
+
var onClose = _ref.onClose;
|
349
|
+
if (excursion) {
|
350
|
+
return /*#__PURE__*/React.createElement(Widget, {
|
351
|
+
role: "excursion",
|
352
|
+
props: {
|
353
|
+
excursion: excursion,
|
354
|
+
onClose: onClose
|
355
|
+
}
|
356
|
+
}, renderChapters([excursion], 0, function () {}));
|
357
|
+
}
|
358
|
+
}
|
359
|
+
function renderChapters(chapters, currentSectionIndex, setCurrentSection) {
|
360
|
+
return chapters.map(function (chapter, index) {
|
305
361
|
return /*#__PURE__*/React.createElement(Chapter, {
|
306
362
|
key: index,
|
307
363
|
chapterSlug: chapter.chapterSlug,
|
308
364
|
permaId: chapter.permaId,
|
309
365
|
sections: chapter.sections,
|
310
366
|
currentSectionIndex: currentSectionIndex,
|
311
|
-
setCurrentSection: setCurrentSection
|
312
|
-
scrollTargetSectionIndex: scrollTargetSectionIndex,
|
313
|
-
setScrollTargetSectionIndex: setScrollTargetSectionIndex
|
367
|
+
setCurrentSection: setCurrentSection
|
314
368
|
});
|
315
369
|
});
|
316
370
|
}
|
317
371
|
|
318
|
-
function Entry() {
|
372
|
+
var Entry = withInlineEditingDecorator('EntryDecorator', function Entry() {
|
319
373
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Widget, {
|
320
374
|
role: "consent"
|
321
|
-
}), /*#__PURE__*/React.createElement(
|
375
|
+
}), /*#__PURE__*/React.createElement(SelectableWidget, {
|
322
376
|
role: "header"
|
323
377
|
}), /*#__PURE__*/React.createElement(Content, null), /*#__PURE__*/React.createElement(Widget, {
|
324
378
|
role: "footer"
|
325
379
|
}));
|
326
|
-
}
|
380
|
+
});
|
327
381
|
|
382
|
+
function _regeneratorRuntime() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
328
383
|
function loadDashUnlessHlsSupported(_x) {
|
329
384
|
return _loadDashUnlessHlsSupported.apply(this, arguments);
|
330
385
|
}
|
331
|
-
|
332
386
|
function _loadDashUnlessHlsSupported() {
|
333
|
-
_loadDashUnlessHlsSupported = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(seed) {
|
334
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
335
|
-
while (1) {
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
})) {
|
342
|
-
_context.next = 3;
|
343
|
-
break;
|
344
|
-
}
|
345
|
-
|
387
|
+
_loadDashUnlessHlsSupported = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(seed) {
|
388
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
389
|
+
while (1) switch (_context.prev = _context.next) {
|
390
|
+
case 0:
|
391
|
+
if (hasHlsSupport({
|
392
|
+
seed: seed,
|
393
|
+
agent: browser.agent
|
394
|
+
})) {
|
346
395
|
_context.next = 3;
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
396
|
+
break;
|
397
|
+
}
|
398
|
+
_context.next = 3;
|
399
|
+
return import('@videojs/http-streaming');
|
400
|
+
case 3:
|
401
|
+
case "end":
|
402
|
+
return _context.stop();
|
353
403
|
}
|
354
404
|
}, _callee);
|
355
405
|
}));
|
356
406
|
return _loadDashUnlessHlsSupported.apply(this, arguments);
|
357
407
|
}
|
358
|
-
|
359
408
|
function hasHlsSupport(_ref) {
|
360
409
|
var agent = _ref.agent,
|
361
|
-
|
410
|
+
seed = _ref.seed;
|
362
411
|
return agent.matchesSafari() || agent.matchesMobilePlatform() && (!agent.matchesAndroid() || hlsHostSupportedByAndroid(seed));
|
363
412
|
}
|
364
|
-
|
365
413
|
function hlsHostSupportedByAndroid(seed) {
|
366
414
|
return getFileUrlTemplateHost(seed, 'videoFiles', 'hls-playlist').indexOf('_') < 0;
|
367
415
|
}
|
@@ -370,7 +418,7 @@ var ActionButton = withInlineEditingAlternative('ActionButton', function ActionB
|
|
370
418
|
return null;
|
371
419
|
});
|
372
420
|
|
373
|
-
var styles = {"darkContentSurfaceColor":"var(--theme-dark-content-surface-color, #101010)","lightContentSurfaceColor":"var(--theme-light-content-surface-color, #fff)","darkContentTextColor":"var(--theme-dark-content-text-color, #222)","lightContentTextColor":"var(--theme-light-content-text-color, #fff)","contentColorScope":"colors-module_contentColorScope__2Zizr","
|
421
|
+
var styles = {"darkContentSurfaceColor":"var(--theme-dark-content-surface-color, #101010)","lightContentSurfaceColor":"var(--theme-light-content-surface-color, #fff)","darkContentTextColor":"var(--theme-dark-content-text-color, #222)","lightContentTextColor":"var(--theme-light-content-text-color, #fff)","contentColorScope":"colors-module_contentColorScope__2Zizr","root":"Figure-module_root__3FC-x colors-module_contentColorScope__2Zizr","invert":"Figure-module_invert___0BJP"};
|
374
422
|
|
375
423
|
/**
|
376
424
|
* Render a figure with a caption text attached.
|
@@ -378,35 +426,35 @@ var styles = {"darkContentSurfaceColor":"var(--theme-dark-content-surface-color,
|
|
378
426
|
* @param {Object} props
|
379
427
|
* @param {string} props.children - Content of figure.
|
380
428
|
* @param {Object[]|string} props.caption - Formatted text data as provided by onCaptionChange.
|
429
|
+
* @param {string} [props.variant] - Name of figureCaption property scope to apply.
|
381
430
|
* @param {Function} props.onCaptionChange - Receives updated value when it changes.
|
382
431
|
* @param {boolean} [props.addCaptionButtonVisible=true] - Control visiblility of action button.
|
383
432
|
* @param {string} [props.captionButtonPosition='outside'] - Position of action button.
|
384
433
|
*/
|
385
|
-
|
386
434
|
function Figure(_ref) {
|
387
435
|
var children = _ref.children,
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
392
|
-
|
393
|
-
|
436
|
+
variant = _ref.variant,
|
437
|
+
caption = _ref.caption,
|
438
|
+
onCaptionChange = _ref.onCaptionChange,
|
439
|
+
_ref$addCaptionButton = _ref.addCaptionButtonVisible,
|
440
|
+
addCaptionButtonVisible = _ref$addCaptionButton === void 0 ? true : _ref$addCaptionButton,
|
441
|
+
_ref$addCaptionButton2 = _ref.addCaptionButtonPosition,
|
442
|
+
addCaptionButtonPosition = _ref$addCaptionButton2 === void 0 ? 'outside' : _ref$addCaptionButton2,
|
443
|
+
renderInsideCaption = _ref.renderInsideCaption;
|
394
444
|
var darkBackground = useDarkBackground();
|
395
|
-
|
396
445
|
var _useContentElementEdi = useContentElementEditorState(),
|
397
|
-
|
398
|
-
|
399
|
-
|
446
|
+
isSelected = _useContentElementEdi.isSelected,
|
447
|
+
isEditable = _useContentElementEdi.isEditable;
|
400
448
|
var _useState = useState(false),
|
401
|
-
|
402
|
-
|
403
|
-
|
404
|
-
|
449
|
+
_useState2 = _slicedToArray(_useState, 2),
|
450
|
+
isEditingCaption = _useState2[0],
|
451
|
+
setIsEditingCaption = _useState2[1];
|
405
452
|
var _useI18n = useI18n({
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
453
|
+
locale: 'ui'
|
454
|
+
}),
|
455
|
+
t = _useI18n.t;
|
456
|
+
var theme = useTheme();
|
457
|
+
var captionAbove = theme.options.figureCaptionPosition === 'above';
|
410
458
|
caption = useMemo(function () {
|
411
459
|
return typeof caption === 'string' ? [{
|
412
460
|
type: 'paragraph',
|
@@ -415,11 +463,10 @@ function Figure(_ref) {
|
|
415
463
|
}]
|
416
464
|
}] : caption;
|
417
465
|
}, [caption]);
|
418
|
-
|
419
466
|
if (!isBlankEditableTextValue(caption) || isEditable) {
|
420
467
|
return /*#__PURE__*/React.createElement("figure", {
|
421
468
|
className: classNames(styles.root, _defineProperty({}, styles.invert, !darkBackground))
|
422
|
-
}, children, isBlankEditableTextValue(caption) && isSelected && !isEditingCaption && addCaptionButtonVisible && /*#__PURE__*/React.createElement(ActionButton, {
|
469
|
+
}, !captionAbove && children, isBlankEditableTextValue(caption) && isSelected && !isEditingCaption && addCaptionButtonVisible && /*#__PURE__*/React.createElement(ActionButton, {
|
423
470
|
position: addCaptionButtonPosition,
|
424
471
|
icon: "pencil",
|
425
472
|
text: t('pageflow_scrolled.inline_editing.add_caption'),
|
@@ -427,25 +474,25 @@ function Figure(_ref) {
|
|
427
474
|
return setIsEditingCaption(true);
|
428
475
|
}
|
429
476
|
}), (!isBlankEditableTextValue(caption) || isEditingCaption) && /*#__PURE__*/React.createElement("figcaption", {
|
477
|
+
className: classNames(variant && "scope-figureCaption-".concat(variant)),
|
430
478
|
onBlur: function onBlur() {
|
431
479
|
return setIsEditingCaption(false);
|
432
480
|
}
|
433
|
-
}, /*#__PURE__*/React.createElement(EditableText, {
|
481
|
+
}, renderInsideCaption === null || renderInsideCaption === void 0 ? void 0 : renderInsideCaption(), /*#__PURE__*/React.createElement(EditableText, {
|
434
482
|
autoFocus: isEditingCaption,
|
435
483
|
value: caption,
|
436
484
|
scaleCategory: "caption",
|
437
485
|
onChange: onCaptionChange,
|
438
486
|
onlyParagraphs: true,
|
439
487
|
hyphens: "none",
|
440
|
-
floatingControlsPosition: "above",
|
441
488
|
placeholder: t('pageflow_scrolled.inline_editing.type_text')
|
442
|
-
})));
|
489
|
+
})), captionAbove && children);
|
443
490
|
} else {
|
444
491
|
return children;
|
445
492
|
}
|
446
493
|
}
|
447
494
|
|
448
|
-
var styles$1 = {"wrapper":"ContentElementBox-module_wrapper__3wZgP"};
|
495
|
+
var styles$1 = {"wrapper":"ContentElementBox-module_wrapper__3wZgP","full":"ContentElementBox-module_full__AfWPr","positioned":"ContentElementBox-module_positioned__3R1dq"};
|
449
496
|
|
450
497
|
/**
|
451
498
|
* Wrap content element that render a visible box in this component to
|
@@ -453,12 +500,24 @@ var styles$1 = {"wrapper":"ContentElementBox-module_wrapper__3wZgP"};
|
|
453
500
|
*
|
454
501
|
* @param {Object} props
|
455
502
|
* @param {string} props.children - Content of box.
|
503
|
+
* @param {string} props.borderRadius - Border radius value from theme scale, or "none" to render no wrapper.
|
456
504
|
*/
|
457
|
-
|
458
505
|
function ContentElementBox(_ref) {
|
459
|
-
var children = _ref.children
|
506
|
+
var children = _ref.children,
|
507
|
+
borderRadius = _ref.borderRadius,
|
508
|
+
positioned = _ref.positioned;
|
509
|
+
var _useContentElementAtt = useContentElementAttributes(),
|
510
|
+
position = _useContentElementAtt.position,
|
511
|
+
width = _useContentElementAtt.width;
|
512
|
+
if (position === 'backdrop' || borderRadius === 'none') {
|
513
|
+
return children;
|
514
|
+
}
|
515
|
+
var style = borderRadius ? {
|
516
|
+
'--content-element-box-border-radius': "var(--theme-content-element-box-border-radius-".concat(borderRadius, ")")
|
517
|
+
} : {};
|
460
518
|
return /*#__PURE__*/React.createElement("div", {
|
461
|
-
className: styles$1.wrapper
|
519
|
+
className: classNames(styles$1.wrapper, _defineProperty(_defineProperty({}, styles$1.full, width === widths.full), styles$1.positioned, positioned)),
|
520
|
+
style: style
|
462
521
|
}, children);
|
463
522
|
}
|
464
523
|
|
@@ -467,17 +526,24 @@ function ContentElementBox(_ref) {
|
|
467
526
|
* @param {Object} props.configuration - Configuration of the content element.
|
468
527
|
* @param {string} props.children - Content of box.
|
469
528
|
*/
|
470
|
-
|
471
529
|
function ContentElementFigure(_ref) {
|
472
530
|
var configuration = _ref.configuration,
|
473
|
-
|
531
|
+
children = _ref.children;
|
474
532
|
var updateConfiguration = useContentElementConfigurationUpdate();
|
475
|
-
|
476
533
|
var _useContentElementAtt = useContentElementAttributes(),
|
477
|
-
|
478
|
-
|
534
|
+
width = _useContentElementAtt.width,
|
535
|
+
position = _useContentElementAtt.position;
|
536
|
+
var _useContentElementEdi = useContentElementEditorState(),
|
537
|
+
isEditable = _useContentElementEdi.isEditable;
|
538
|
+
if (position === 'backdrop') {
|
539
|
+
return children;
|
540
|
+
}
|
479
541
|
return /*#__PURE__*/React.createElement(Figure, {
|
480
542
|
caption: configuration.caption,
|
543
|
+
variant: configuration.captionVariant,
|
544
|
+
renderInsideCaption: function renderInsideCaption() {
|
545
|
+
return isEditable && /*#__PURE__*/React.createElement(HasCaptionTransientState, null);
|
546
|
+
},
|
481
547
|
onCaptionChange: function onCaptionChange(caption) {
|
482
548
|
return updateConfiguration({
|
483
549
|
caption: caption
|
@@ -486,12 +552,27 @@ function ContentElementFigure(_ref) {
|
|
486
552
|
addCaptionButtonPosition: width === widths.full ? 'outsideIndented' : 'outside'
|
487
553
|
}, children);
|
488
554
|
}
|
555
|
+
function HasCaptionTransientState() {
|
556
|
+
var _useContentElementEdi2 = useContentElementEditorState(),
|
557
|
+
setTransientState = _useContentElementEdi2.setTransientState;
|
558
|
+
useEffect(function () {
|
559
|
+
setTransientState({
|
560
|
+
hasCaption: true
|
561
|
+
});
|
562
|
+
return function () {
|
563
|
+
return setTransientState({
|
564
|
+
hasCaption: false
|
565
|
+
});
|
566
|
+
};
|
567
|
+
}, [setTransientState]);
|
568
|
+
return null;
|
569
|
+
}
|
489
570
|
|
490
571
|
function MediaInteractionTracking(_ref) {
|
491
572
|
var playerState = _ref.playerState,
|
492
|
-
|
493
|
-
|
494
|
-
|
573
|
+
playerActions = _ref.playerActions,
|
574
|
+
idleDelay = _ref.idleDelay,
|
575
|
+
children = _ref.children;
|
495
576
|
var hideControlsTimeout = useRef();
|
496
577
|
var wasPlaying = usePrevious(playerState.isPlaying);
|
497
578
|
var focusWasInside = usePrevious(playerState.focusInsideControls);
|
@@ -509,12 +590,10 @@ function MediaInteractionTracking(_ref) {
|
|
509
590
|
return clearTimeout(hideControlsTimeout.current);
|
510
591
|
};
|
511
592
|
}, []);
|
512
|
-
|
513
593
|
var handleInteraction = function handleInteraction() {
|
514
594
|
playerActions.userInteraction();
|
515
595
|
setHideControlsTimeout();
|
516
596
|
};
|
517
|
-
|
518
597
|
return /*#__PURE__*/React.createElement("div", {
|
519
598
|
onClick: handleInteraction,
|
520
599
|
onMouseMove: handleInteraction,
|
@@ -528,21 +607,18 @@ MediaInteractionTracking.defaultProps = {
|
|
528
607
|
|
529
608
|
function RemotePeakData(_ref) {
|
530
609
|
var audioFile = _ref.audioFile,
|
531
|
-
|
610
|
+
children = _ref.children;
|
532
611
|
var peakDataUrl = audioFile === null || audioFile === void 0 ? void 0 : audioFile.urls.peakData;
|
533
|
-
|
534
612
|
var _useState = useState('pending'),
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
613
|
+
_useState2 = _slicedToArray(_useState, 2),
|
614
|
+
peakData = _useState2[0],
|
615
|
+
setPeakData = _useState2[1];
|
539
616
|
useEffect(function () {
|
540
617
|
if (peakDataUrl) {
|
541
618
|
fetch(peakDataUrl).then(function (response) {
|
542
619
|
if (!response.ok) {
|
543
620
|
throw new Error("HTTP error ".concat(response.status, " while loading peaks."));
|
544
621
|
}
|
545
|
-
|
546
622
|
return response.json();
|
547
623
|
}).then(function (peaks) {
|
548
624
|
setPeakData(peaks.data);
|
@@ -551,7 +627,6 @@ function RemotePeakData(_ref) {
|
|
551
627
|
setPeakData(null);
|
552
628
|
}
|
553
629
|
}, [peakDataUrl]);
|
554
|
-
|
555
630
|
if (peakData === 'pending') {
|
556
631
|
return null;
|
557
632
|
} else {
|
@@ -566,7 +641,7 @@ var waveColorInverted = 'rgba(0, 0, 0, 0.5)';
|
|
566
641
|
var cursorColor = '#fff';
|
567
642
|
var cursorColorInverted = '#888';
|
568
643
|
var Wavesurfer = React.lazy(function () {
|
569
|
-
return import('./Wavesurfer-
|
644
|
+
return import('./Wavesurfer-1cdc3925.js');
|
570
645
|
});
|
571
646
|
var waveformStyles = {
|
572
647
|
waveformLines: {
|
@@ -581,10 +656,9 @@ var waveformStyles = {
|
|
581
656
|
};
|
582
657
|
function Waveform(props) {
|
583
658
|
var _useState = useState(90),
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
659
|
+
_useState2 = _slicedToArray(_useState, 2),
|
660
|
+
height = _useState2[0],
|
661
|
+
setHeight = _useState2[1];
|
588
662
|
if (props.mediaElementId) {
|
589
663
|
return /*#__PURE__*/React.createElement(Suspense, {
|
590
664
|
fallback: /*#__PURE__*/React.createElement("div", null)
|
@@ -629,18 +703,15 @@ function formatTime(value) {
|
|
629
703
|
if (isNaN(value)) {
|
630
704
|
return unknownTimePlaceholder;
|
631
705
|
}
|
632
|
-
|
633
706
|
var seconds = Math.floor(value) % 60;
|
634
707
|
var minutes = Math.floor(value / 60) % 60;
|
635
708
|
var hours = Math.floor(value / 60 / 60);
|
636
|
-
|
637
709
|
if (hours > 0) {
|
638
710
|
return "".concat(hours, ":").concat(pad(minutes), ":").concat(pad(seconds));
|
639
711
|
} else {
|
640
712
|
return "".concat(minutes, ":").concat(pad(seconds));
|
641
713
|
}
|
642
714
|
}
|
643
|
-
|
644
715
|
function pad(value) {
|
645
716
|
return value < 10 ? '0' + value : value;
|
646
717
|
}
|
@@ -656,48 +727,15 @@ function TimeDisplay(props) {
|
|
656
727
|
}, formatTime(props.duration)));
|
657
728
|
}
|
658
729
|
|
659
|
-
var styles$4 = {"wrapper":"MenuBarButton-module_wrapper__2lFoI","button":"MenuBarButton-module_button__2sY0F ControlBar-module_button___4aXE utils-module_unstyledButton__3rgne","
|
660
|
-
|
661
|
-
function _extends() {
|
662
|
-
_extends = Object.assign || function (target) {
|
663
|
-
for (var i = 1; i < arguments.length; i++) {
|
664
|
-
var source = arguments[i];
|
665
|
-
|
666
|
-
for (var key in source) {
|
667
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
668
|
-
target[key] = source[key];
|
669
|
-
}
|
670
|
-
}
|
671
|
-
}
|
672
|
-
|
673
|
-
return target;
|
674
|
-
};
|
675
|
-
|
676
|
-
return _extends.apply(this, arguments);
|
677
|
-
}
|
678
|
-
var CheckIcon = (function (_ref) {
|
679
|
-
var _ref$styles = _ref.styles,
|
680
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
681
|
-
|
682
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
683
|
-
xmlns: "http://www.w3.org/2000/svg",
|
684
|
-
width: "24",
|
685
|
-
height: "24",
|
686
|
-
viewBox: "0 0 512 512"
|
687
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
688
|
-
d: "M434.442 58.997L195.559 297.881 77.554 179.88 0 257.438l195.559 195.565L512 136.551z"
|
689
|
-
}));
|
690
|
-
});
|
730
|
+
var styles$4 = {"wrapper":"MenuBarButton-module_wrapper__2lFoI","button":"MenuBarButton-module_button__2sY0F ControlBar-module_button___4aXE utils-module_unstyledButton__3rgne","subMenuItemAnnotation":"MenuBarButton-module_subMenuItemAnnotation__32Quc","subMenu":"MenuBarButton-module_subMenu__f-E-X","subMenuExpanded":"MenuBarButton-module_subMenuExpanded__2UvkJ","subMenuItem":"MenuBarButton-module_subMenuItem__1pyn_","subMenuItemButton":"MenuBarButton-module_subMenuItemButton__2QnUz utils-module_unstyledButton__3rgne"};
|
691
731
|
|
692
732
|
function MenuBarButton(props) {
|
693
733
|
var subMenuItems = props.subMenuItems,
|
694
|
-
|
695
|
-
|
734
|
+
onClick = props.onClick;
|
696
735
|
var _useState = useState(props.subMenuExpanded),
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
736
|
+
_useState2 = _slicedToArray(_useState, 2),
|
737
|
+
subMenuExpanded = _useState2[0],
|
738
|
+
setSubMenuExpanded = _useState2[1];
|
701
739
|
var closeMenuTimeout = useRef();
|
702
740
|
var openMenu = useCallback(function () {
|
703
741
|
if (subMenuItems.length > 0) {
|
@@ -709,7 +747,6 @@ function MenuBarButton(props) {
|
|
709
747
|
}, []);
|
710
748
|
var onButtonClick = useCallback(function (event) {
|
711
749
|
openMenu();
|
712
|
-
|
713
750
|
if (onClick) {
|
714
751
|
onClick();
|
715
752
|
}
|
@@ -739,14 +776,13 @@ function MenuBarButton(props) {
|
|
739
776
|
className: styles$4.button,
|
740
777
|
title: props.title,
|
741
778
|
onClick: onButtonClick
|
742
|
-
}, React.createElement(
|
743
|
-
|
779
|
+
}, /*#__PURE__*/React.createElement(ThemeIcon, {
|
780
|
+
name: props.icon
|
744
781
|
})), renderSubMenu(props, closeMenu));
|
745
782
|
}
|
746
783
|
MenuBarButton.defaultProps = {
|
747
784
|
subMenuItems: []
|
748
785
|
};
|
749
|
-
|
750
786
|
function renderSubMenu(props, closeMenu) {
|
751
787
|
if (props.subMenuItems.length > 0) {
|
752
788
|
return /*#__PURE__*/React.createElement("ul", {
|
@@ -755,7 +791,6 @@ function renderSubMenu(props, closeMenu) {
|
|
755
791
|
}, renderSubMenuItems(props, closeMenu));
|
756
792
|
}
|
757
793
|
}
|
758
|
-
|
759
794
|
function renderSubMenuItems(props, closeMenu) {
|
760
795
|
return props.subMenuItems.map(function (item) {
|
761
796
|
return /*#__PURE__*/React.createElement("li", {
|
@@ -769,15 +804,13 @@ function renderSubMenuItems(props, closeMenu) {
|
|
769
804
|
}, renderSubMenuItemIcon(item), item.label, renderSubMenuItemAnnotation(props, item)));
|
770
805
|
});
|
771
806
|
}
|
772
|
-
|
773
807
|
function renderSubMenuItemIcon(item) {
|
774
808
|
if (item.active) {
|
775
|
-
return /*#__PURE__*/React.createElement(
|
776
|
-
|
809
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
810
|
+
name: "checked"
|
777
811
|
});
|
778
812
|
}
|
779
813
|
}
|
780
|
-
|
781
814
|
function renderSubMenuItemAnnotation(props, item) {
|
782
815
|
if (item.annotation) {
|
783
816
|
return /*#__PURE__*/React.createElement("span", {
|
@@ -785,58 +818,25 @@ function renderSubMenuItemAnnotation(props, item) {
|
|
785
818
|
}, item.annotation);
|
786
819
|
}
|
787
820
|
}
|
788
|
-
|
789
821
|
function subMenuItemClickHandler(props, value, closeMenu) {
|
790
822
|
return function (event) {
|
791
823
|
event.preventDefault();
|
792
824
|
closeMenu();
|
793
|
-
|
794
825
|
if (props.onSubMenuItemClick) {
|
795
826
|
props.onSubMenuItemClick(value);
|
796
827
|
}
|
797
828
|
};
|
798
829
|
}
|
799
830
|
|
800
|
-
function _extends$1() {
|
801
|
-
_extends$1 = Object.assign || function (target) {
|
802
|
-
for (var i = 1; i < arguments.length; i++) {
|
803
|
-
var source = arguments[i];
|
804
|
-
|
805
|
-
for (var key in source) {
|
806
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
807
|
-
target[key] = source[key];
|
808
|
-
}
|
809
|
-
}
|
810
|
-
}
|
811
|
-
|
812
|
-
return target;
|
813
|
-
};
|
814
|
-
|
815
|
-
return _extends$1.apply(this, arguments);
|
816
|
-
}
|
817
|
-
var TextTracksIcon = (function (_ref) {
|
818
|
-
var _ref$styles = _ref.styles,
|
819
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
820
|
-
|
821
|
-
return /*#__PURE__*/React.createElement("svg", _extends$1({
|
822
|
-
xmlns: "http://www.w3.org/2000/svg",
|
823
|
-
viewBox: "-3 -3 30 30"
|
824
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
825
|
-
d: "M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zM4 12h4v2H4v-2zm10 6H4v-2h10v2zm6 0h-4v-2h4v2zm0-4H10v-2h10v2z"
|
826
|
-
}));
|
827
|
-
});
|
828
|
-
|
829
831
|
function TextTracksMenu(props) {
|
830
832
|
var _useI18n = useI18n(),
|
831
|
-
|
832
|
-
|
833
|
+
t = _useI18n.t;
|
833
834
|
if (props.items.length < 2) {
|
834
835
|
return null;
|
835
836
|
}
|
836
|
-
|
837
837
|
return /*#__PURE__*/React.createElement(MenuBarButton, {
|
838
838
|
title: t('pageflow_scrolled.public.player_controls.text_tracks'),
|
839
|
-
icon:
|
839
|
+
icon: "textTracks",
|
840
840
|
subMenuItems: props.items,
|
841
841
|
onSubMenuItemClick: props.onItemClick
|
842
842
|
});
|
@@ -845,70 +845,11 @@ TextTracksMenu.defaultProps = {
|
|
845
845
|
items: []
|
846
846
|
};
|
847
847
|
|
848
|
-
var styles$5 = {"container":"ControlBar-module_container__1GH64","lightBackground":"ControlBar-module_lightBackground__3-tGf","darkBackground":"ControlBar-module_darkBackground__31Wv7","controlBarContainer":"ControlBar-module_controlBarContainer__1cxRO","inset":"ControlBar-module_inset__JvBh9","controlBarInner":"ControlBar-module_controlBarInner__39fE9","
|
849
|
-
|
850
|
-
function _extends$2() {
|
851
|
-
_extends$2 = Object.assign || function (target) {
|
852
|
-
for (var i = 1; i < arguments.length; i++) {
|
853
|
-
var source = arguments[i];
|
854
|
-
|
855
|
-
for (var key in source) {
|
856
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
857
|
-
target[key] = source[key];
|
858
|
-
}
|
859
|
-
}
|
860
|
-
}
|
861
|
-
|
862
|
-
return target;
|
863
|
-
};
|
864
|
-
|
865
|
-
return _extends$2.apply(this, arguments);
|
866
|
-
}
|
867
|
-
var PlayIcon = (function (_ref) {
|
868
|
-
var _ref$styles = _ref.styles,
|
869
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
870
|
-
|
871
|
-
return /*#__PURE__*/React.createElement("svg", _extends$2({
|
872
|
-
xmlns: "http://www.w3.org/2000/svg",
|
873
|
-
viewBox: "0 0 24 24"
|
874
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
875
|
-
d: "M8 5v14l11-7z"
|
876
|
-
}));
|
877
|
-
});
|
878
|
-
|
879
|
-
function _extends$3() {
|
880
|
-
_extends$3 = Object.assign || function (target) {
|
881
|
-
for (var i = 1; i < arguments.length; i++) {
|
882
|
-
var source = arguments[i];
|
883
|
-
|
884
|
-
for (var key in source) {
|
885
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
886
|
-
target[key] = source[key];
|
887
|
-
}
|
888
|
-
}
|
889
|
-
}
|
890
|
-
|
891
|
-
return target;
|
892
|
-
};
|
893
|
-
|
894
|
-
return _extends$3.apply(this, arguments);
|
895
|
-
}
|
896
|
-
var PauseIcon = (function (_ref) {
|
897
|
-
var _ref$styles = _ref.styles,
|
898
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
899
|
-
|
900
|
-
return /*#__PURE__*/React.createElement("svg", _extends$3({
|
901
|
-
xmlns: "http://www.w3.org/2000/svg",
|
902
|
-
viewBox: "0 0 24 24"
|
903
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
904
|
-
d: "M6 19h4V5H6v14zm8-14v14h4V5h-4z"
|
905
|
-
}));
|
906
|
-
});
|
848
|
+
var styles$5 = {"container":"ControlBar-module_container__1GH64","sticky":"ControlBar-module_sticky__6qVoI","lightBackground":"ControlBar-module_lightBackground__3-tGf","darkBackground":"ControlBar-module_darkBackground__31Wv7","controlBarContainer":"ControlBar-module_controlBarContainer__1cxRO","inset":"ControlBar-module_inset__JvBh9","controlBarInner":"ControlBar-module_controlBarInner__39fE9","fadedOut":"ControlBar-module_fadedOut__2sP_3","button":"ControlBar-module_button___4aXE utils-module_unstyledButton__3rgne","playControl":"ControlBar-module_playControl__Vg5et ControlBar-module_button___4aXE utils-module_unstyledButton__3rgne"};
|
907
849
|
|
908
850
|
function PlayPauseButton(props) {
|
909
851
|
var _useI18n = useI18n(),
|
910
|
-
|
911
|
-
|
852
|
+
t = _useI18n.t;
|
912
853
|
return /*#__PURE__*/React.createElement("button", {
|
913
854
|
className: styles$5.playControl,
|
914
855
|
"aria-label": t(props.isPlaying ? 'pause' : 'play', {
|
@@ -923,20 +864,20 @@ function PlayPauseButton(props) {
|
|
923
864
|
}
|
924
865
|
}, pausePlayIcon(props));
|
925
866
|
}
|
926
|
-
|
927
867
|
function pausePlayIcon(props) {
|
928
868
|
if (props.isPlaying) {
|
929
|
-
return /*#__PURE__*/React.createElement(
|
930
|
-
|
869
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
870
|
+
name: "pause"
|
931
871
|
});
|
932
872
|
} else {
|
933
|
-
return /*#__PURE__*/React.createElement(
|
934
|
-
|
873
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
874
|
+
name: "play"
|
935
875
|
});
|
936
876
|
}
|
937
877
|
}
|
938
878
|
|
939
879
|
function WaveformPlayerControls(props) {
|
880
|
+
var _theme$options$proper, _theme$options$proper2, _theme$options$colors;
|
940
881
|
var darkBackground = useDarkBackground();
|
941
882
|
var theme = useTheme();
|
942
883
|
return /*#__PURE__*/React.createElement("div", {
|
@@ -955,7 +896,7 @@ function WaveformPlayerControls(props) {
|
|
955
896
|
inverted: !darkBackground,
|
956
897
|
variant: props.variant,
|
957
898
|
waveformColor: props.waveformColor,
|
958
|
-
mainColor: theme.options.colors.accent,
|
899
|
+
mainColor: ((_theme$options$proper = theme.options.properties) === null || _theme$options$proper === void 0 ? void 0 : (_theme$options$proper2 = _theme$options$proper.root) === null || _theme$options$proper2 === void 0 ? void 0 : _theme$options$proper2.accentColor) || ((_theme$options$colors = theme.options.colors) === null || _theme$options$colors === void 0 ? void 0 : _theme$options$colors.accent),
|
959
900
|
play: props.play,
|
960
901
|
pause: props.pause,
|
961
902
|
mediaElementId: props.mediaElementId
|
@@ -978,31 +919,32 @@ function WaveformPlayerControls(props) {
|
|
978
919
|
})), /*#__PURE__*/React.createElement(InlineFileRights, {
|
979
920
|
items: props.inlineFileRightsItems,
|
980
921
|
context: "playerControls",
|
981
|
-
|
922
|
+
playerControlsFadedOut: false,
|
982
923
|
playerControlsStandAlone: props.standAlone
|
983
924
|
})));
|
984
925
|
}
|
985
926
|
|
986
|
-
var styles$6 = {"container":"BigPlayPauseButton-module_container__19sKj","pointerCursor":"BigPlayPauseButton-module_pointerCursor__2A55P","hideCursor":"BigPlayPauseButton-module_hideCursor__2Hyys","button":"BigPlayPauseButton-module_button__10g4Q utils-module_unstyledButton__3rgne","hidden":"BigPlayPauseButton-module_hidden__1KUzr","animated":"BigPlayPauseButton-module_animated__1MMNq","fadeOut":"BigPlayPauseButton-module_fadeOut__2vcA_","fadeIn":"BigPlayPauseButton-module_fadeIn__1Ge1-"};
|
927
|
+
var styles$6 = {"container":"BigPlayPauseButton-module_container__19sKj","fadeOutDelay":"BigPlayPauseButton-module_fadeOutDelay__yoaW6","pointerCursor":"BigPlayPauseButton-module_pointerCursor__2A55P","hideCursor":"BigPlayPauseButton-module_hideCursor__2Hyys","button":"BigPlayPauseButton-module_button__10g4Q utils-module_unstyledButton__3rgne","hidden":"BigPlayPauseButton-module_hidden__1KUzr","animated":"BigPlayPauseButton-module_animated__1MMNq","fadeOut":"BigPlayPauseButton-module_fadeOut__2vcA_","fadeIn":"BigPlayPauseButton-module_fadeIn__1Ge1-"};
|
987
928
|
|
988
929
|
function BigPlayPauseButton(props) {
|
989
|
-
var
|
990
|
-
|
991
|
-
var c = classNames(styles$6.button, (_classNames = {}, _defineProperty(_classNames, styles$6.hidden, props.hidden || props.lastControlledVia === 'playPauseButton'), _defineProperty(_classNames, styles$6.fadeIn, props.unplayed), _defineProperty(_classNames, styles$6.animated, !props.unplayed), _classNames));
|
930
|
+
var c = classNames(styles$6.button, _defineProperty(_defineProperty(_defineProperty({}, styles$6.hidden, props.hidden || props.lastControlledVia === 'playPauseButton'), styles$6.fadeIn, props.unplayed), styles$6.animated, !props.unplayed));
|
992
931
|
return /*#__PURE__*/React.createElement("div", {
|
993
|
-
className: classNames(styles$6.container, (
|
932
|
+
className: classNames(styles$6.container, _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, styles$6.hideCursor, props.hideCursor), styles$6.hidden, props.fadedOut), styles$6.fadeOutDelay, props.isPlaying), styles$6.pointerCursor, !!props.onClick)),
|
994
933
|
onClick: props.onClick
|
995
934
|
}, /*#__PURE__*/React.createElement("div", {
|
996
935
|
key: props.isPlaying,
|
997
936
|
className: c
|
998
937
|
}, pausePlayIcon$1(props)));
|
999
938
|
}
|
1000
|
-
|
1001
939
|
function pausePlayIcon$1(props) {
|
1002
940
|
if (props.unplayed || props.isPlaying) {
|
1003
|
-
return /*#__PURE__*/React.createElement(
|
941
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
942
|
+
name: "play"
|
943
|
+
});
|
1004
944
|
} else {
|
1005
|
-
return /*#__PURE__*/React.createElement(
|
945
|
+
return /*#__PURE__*/React.createElement(ThemeIcon, {
|
946
|
+
name: "pause"
|
947
|
+
});
|
1006
948
|
}
|
1007
949
|
}
|
1008
950
|
|
@@ -1010,19 +952,16 @@ var styles$7 = {"container":"ProgressIndicators-module_container__1QiQJ","wrappe
|
|
1010
952
|
|
1011
953
|
function ProgressIndicators(_ref) {
|
1012
954
|
var currentTime = _ref.currentTime,
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
955
|
+
duration = _ref.duration,
|
956
|
+
bufferedEnd = _ref.bufferedEnd,
|
957
|
+
scrubTo = _ref.scrubTo,
|
958
|
+
seekTo = _ref.seekTo;
|
1018
959
|
var _useI18n = useI18n(),
|
1019
|
-
|
1020
|
-
|
960
|
+
t = _useI18n.t;
|
1021
961
|
var _useState = useState(),
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
962
|
+
_useState2 = _slicedToArray(_useState, 2),
|
963
|
+
dragging = _useState2[0],
|
964
|
+
setDragging = _useState2[1];
|
1026
965
|
var progressBarsContainerWidth = useRef();
|
1027
966
|
var positionToTime = useCallback(function (x) {
|
1028
967
|
if (duration && progressBarsContainerWidth.current) {
|
@@ -1042,13 +981,11 @@ function ProgressIndicators(_ref) {
|
|
1042
981
|
}, [scrubTo, positionToTime]);
|
1043
982
|
var handleKeyDown = useCallback(function (event) {
|
1044
983
|
var destination;
|
1045
|
-
|
1046
984
|
if (event.key === 'ArrowLeft') {
|
1047
985
|
destination = Math.max(0, currentTime - 1);
|
1048
986
|
} else if (event.key === 'ArrowRight') {
|
1049
987
|
destination = Math.min(currentTime + 1, duration || Infinity);
|
1050
988
|
}
|
1051
|
-
|
1052
989
|
seekTo(destination);
|
1053
990
|
}, [seekTo, currentTime, duration]);
|
1054
991
|
var loadProgress = duration > 0 ? Math.min(1, bufferedEnd / duration) : 0;
|
@@ -1102,51 +1039,19 @@ function ProgressIndicators(_ref) {
|
|
1102
1039
|
}))));
|
1103
1040
|
})));
|
1104
1041
|
}
|
1105
|
-
|
1106
1042
|
function toPercent(value) {
|
1107
1043
|
return value > 0 ? value * 100 + '%' : 0;
|
1108
1044
|
}
|
1109
1045
|
|
1110
|
-
function _extends$4() {
|
1111
|
-
_extends$4 = Object.assign || function (target) {
|
1112
|
-
for (var i = 1; i < arguments.length; i++) {
|
1113
|
-
var source = arguments[i];
|
1114
|
-
|
1115
|
-
for (var key in source) {
|
1116
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1117
|
-
target[key] = source[key];
|
1118
|
-
}
|
1119
|
-
}
|
1120
|
-
}
|
1121
|
-
|
1122
|
-
return target;
|
1123
|
-
};
|
1124
|
-
|
1125
|
-
return _extends$4.apply(this, arguments);
|
1126
|
-
}
|
1127
|
-
var QualityIcon = (function (_ref) {
|
1128
|
-
var _ref$styles = _ref.styles,
|
1129
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1130
|
-
|
1131
|
-
return /*#__PURE__*/React.createElement("svg", _extends$4({
|
1132
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1133
|
-
viewBox: "-3 -3 30 30"
|
1134
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1135
|
-
d: "M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0014 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"
|
1136
|
-
}));
|
1137
|
-
});
|
1138
|
-
|
1139
1046
|
function QualityMenu(props) {
|
1140
1047
|
var _useI18n = useI18n(),
|
1141
|
-
|
1142
|
-
|
1048
|
+
t = _useI18n.t;
|
1143
1049
|
if (props.items.length < 2) {
|
1144
1050
|
return null;
|
1145
1051
|
}
|
1146
|
-
|
1147
1052
|
return /*#__PURE__*/React.createElement(MenuBarButton, {
|
1148
1053
|
title: t('pageflow_scrolled.public.player_controls.quality'),
|
1149
|
-
icon:
|
1054
|
+
icon: "gear",
|
1150
1055
|
subMenuItems: props.items,
|
1151
1056
|
subMenuExpanded: props.subMenuExpanded,
|
1152
1057
|
onSubMenuItemClick: props.onItemClick,
|
@@ -1159,28 +1064,26 @@ QualityMenu.defaultProps = {
|
|
1159
1064
|
|
1160
1065
|
function ClassicPlayerControls(props) {
|
1161
1066
|
var darkBackground = useDarkBackground();
|
1162
|
-
var
|
1067
|
+
var fadedOut = !props.standAlone && props.unplayed || props.isPlaying && props.inactive || props.fadedOut;
|
1163
1068
|
return /*#__PURE__*/React.createElement("div", {
|
1164
|
-
className: styles$5.container
|
1069
|
+
className: classNames(styles$5.container, _defineProperty({}, styles$5.sticky, props.sticky))
|
1165
1070
|
}, props.children, !props.standAlone && /*#__PURE__*/React.createElement(BigPlayPauseButton, {
|
1166
1071
|
unplayed: props.unplayed,
|
1167
1072
|
isPlaying: props.isPlaying,
|
1168
1073
|
lastControlledVia: props.lastControlledVia,
|
1169
1074
|
hidden: props.hideBigPlayButton,
|
1075
|
+
fadedOut: props.fadedOut,
|
1170
1076
|
hideCursor: props.isPlaying && props.inactive,
|
1171
1077
|
onClick: props.onPlayerClick
|
1172
|
-
}), !props.hideControlBar && renderControlBar(props, darkBackground,
|
1078
|
+
}), !props.hideControlBar && renderControlBar(props, darkBackground, fadedOut));
|
1173
1079
|
}
|
1174
|
-
|
1175
|
-
function renderControlBar(props, darkBackground, transparent) {
|
1176
|
-
var _classNames;
|
1177
|
-
|
1080
|
+
function renderControlBar(props, darkBackground, fadedOut) {
|
1178
1081
|
return /*#__PURE__*/React.createElement("div", {
|
1179
1082
|
onFocus: props.onFocus,
|
1180
1083
|
onBlur: props.onBlur,
|
1181
1084
|
onMouseEnter: props.onMouseEnter,
|
1182
1085
|
onMouseLeave: props.onMouseLeave,
|
1183
|
-
className: classNames(styles$5.controlBarContainer, darkBackground ? styles$5.darkBackground : styles$5.lightBackground, (
|
1086
|
+
className: classNames(styles$5.controlBarContainer, darkBackground ? styles$5.darkBackground : styles$5.lightBackground, _defineProperty(_defineProperty({}, styles$5.inset, !props.standAlone), styles$5.fadedOut, fadedOut))
|
1184
1087
|
}, /*#__PURE__*/React.createElement("div", {
|
1185
1088
|
className: styles$5.controlBarInner
|
1186
1089
|
}, /*#__PURE__*/React.createElement(PlayPauseButton, {
|
@@ -1206,14 +1109,13 @@ function renderControlBar(props, darkBackground, transparent) {
|
|
1206
1109
|
})), /*#__PURE__*/React.createElement(InlineFileRights, {
|
1207
1110
|
items: props.inlineFileRightsItems,
|
1208
1111
|
context: "playerControls",
|
1209
|
-
|
1112
|
+
playerControlsFadedOut: fadedOut,
|
1210
1113
|
playerControlsStandAlone: props.standAlone
|
1211
1114
|
}));
|
1212
1115
|
}
|
1213
1116
|
|
1214
1117
|
function PlayerControls(props) {
|
1215
1118
|
var _props$variant;
|
1216
|
-
|
1217
1119
|
var ControlComponent = ((_props$variant = props.variant) === null || _props$variant === void 0 ? void 0 : _props$variant.startsWith('waveform')) ? WaveformPlayerControls : ClassicPlayerControls;
|
1218
1120
|
return /*#__PURE__*/React.createElement(ControlComponent, props);
|
1219
1121
|
}
|
@@ -1232,10 +1134,8 @@ PlayerControls.defaultProps = {
|
|
1232
1134
|
function MediaPlayerControls(props) {
|
1233
1135
|
var playerState = props.playerState;
|
1234
1136
|
var playerActions = props.playerActions;
|
1235
|
-
|
1236
1137
|
var _useI18n = useI18n(),
|
1237
|
-
|
1238
|
-
|
1138
|
+
t = _useI18n.t;
|
1239
1139
|
var textTracks = useTextTracks({
|
1240
1140
|
file: props.file,
|
1241
1141
|
defaultTextTrackFilePermaId: props.defaultTextTrackFilePermaId,
|
@@ -1271,12 +1171,10 @@ function MediaPlayerControls(props) {
|
|
1271
1171
|
MediaPlayerControls.defaultProps = {
|
1272
1172
|
configuration: {}
|
1273
1173
|
};
|
1274
|
-
|
1275
1174
|
function getTextTracksMenuItems(textTracks, t) {
|
1276
1175
|
if (!textTracks.files.length) {
|
1277
1176
|
return [];
|
1278
1177
|
}
|
1279
|
-
|
1280
1178
|
return [{
|
1281
1179
|
value: 'off',
|
1282
1180
|
label: t('pageflow_scrolled.public.text_track_modes.none'),
|
@@ -1294,20 +1192,17 @@ function getTextTracksMenuItems(textTracks, t) {
|
|
1294
1192
|
})));
|
1295
1193
|
}
|
1296
1194
|
|
1195
|
+
var _excluded = ["videoFile"];
|
1297
1196
|
function VideoPlayerControls(_ref) {
|
1298
1197
|
var videoFile = _ref.videoFile,
|
1299
|
-
|
1300
|
-
|
1198
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
1301
1199
|
var _useVideoQualitySetti = useVideoQualitySetting(),
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1200
|
+
_useVideoQualitySetti2 = _slicedToArray(_useVideoQualitySetti, 2),
|
1201
|
+
activeQuality = _useVideoQualitySetti2[0],
|
1202
|
+
setActiveQuality = _useVideoQualitySetti2[1];
|
1306
1203
|
var availableQualities = useAvailableQualities(videoFile);
|
1307
|
-
|
1308
1204
|
var _useI18n = useI18n(),
|
1309
|
-
|
1310
|
-
|
1205
|
+
t = _useI18n.t;
|
1311
1206
|
return /*#__PURE__*/React.createElement(MediaPlayerControls, Object.assign({}, props, {
|
1312
1207
|
file: videoFile,
|
1313
1208
|
autoHide: true,
|
@@ -1315,7 +1210,6 @@ function VideoPlayerControls(_ref) {
|
|
1315
1210
|
onQualityMenuItemClick: setActiveQuality
|
1316
1211
|
}));
|
1317
1212
|
}
|
1318
|
-
|
1319
1213
|
function getQualityMenuItems(availableQualities, activeQuality, t) {
|
1320
1214
|
return availableQualities.map(function (quality) {
|
1321
1215
|
return {
|
@@ -1329,17 +1223,17 @@ function getQualityMenuItems(availableQualities, activeQuality, t) {
|
|
1329
1223
|
});
|
1330
1224
|
}
|
1331
1225
|
|
1226
|
+
var _excluded$1 = ["audioFile"];
|
1332
1227
|
function AudioPlayerControls(_ref) {
|
1333
1228
|
var audioFile = _ref.audioFile,
|
1334
|
-
|
1335
|
-
|
1229
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
1336
1230
|
return /*#__PURE__*/React.createElement(MediaPlayerControls, Object.assign({}, props, {
|
1337
1231
|
file: audioFile
|
1338
1232
|
}));
|
1339
1233
|
}
|
1340
1234
|
|
1341
1235
|
var Viewer = React.lazy(function () {
|
1342
|
-
return import('./Viewer-
|
1236
|
+
return import('./Viewer-0345ce57.js');
|
1343
1237
|
});
|
1344
1238
|
function Panorama(props) {
|
1345
1239
|
return /*#__PURE__*/React.createElement(Suspense, {
|
@@ -1347,28 +1241,92 @@ function Panorama(props) {
|
|
1347
1241
|
}, /*#__PURE__*/React.createElement(Viewer, props));
|
1348
1242
|
}
|
1349
1243
|
|
1244
|
+
var _excluded$2 = ["enabled"];
|
1350
1245
|
var Viewer$1 = React.lazy(function () {
|
1351
|
-
return import('./Viewer-
|
1246
|
+
return import('./Viewer-cdc549cc.js');
|
1352
1247
|
});
|
1353
1248
|
function ExpandableImage(_ref) {
|
1354
1249
|
var enabled = _ref.enabled,
|
1355
|
-
|
1356
|
-
|
1250
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
1357
1251
|
if (!enabled) {
|
1358
1252
|
return props.children;
|
1359
1253
|
}
|
1360
|
-
|
1361
1254
|
return /*#__PURE__*/React.createElement(Suspense, {
|
1362
1255
|
fallback: /*#__PURE__*/React.createElement("div", null)
|
1363
1256
|
}, /*#__PURE__*/React.createElement(Viewer$1, props));
|
1364
1257
|
}
|
1365
1258
|
|
1259
|
+
var styles$8 = {"nav":"PaginationIndicator-module_nav__cY6JE","item":"PaginationIndicator-module_item__O7cZ-","current":"PaginationIndicator-module_current__1wxHj"};
|
1260
|
+
|
1261
|
+
function PaginationIndicator(_ref) {
|
1262
|
+
var itemCount = _ref.itemCount,
|
1263
|
+
currentIndex = _ref.currentIndex,
|
1264
|
+
scrollerRef = _ref.scrollerRef,
|
1265
|
+
navAriaLabelTranslationKey = _ref.navAriaLabelTranslationKey,
|
1266
|
+
itemAriaLabelTranslationKey = _ref.itemAriaLabelTranslationKey,
|
1267
|
+
onItemClick = _ref.onItemClick;
|
1268
|
+
var _useI18n = useI18n$1(),
|
1269
|
+
t = _useI18n.t;
|
1270
|
+
var navRef = useRef();
|
1271
|
+
var theme = useTheme$1();
|
1272
|
+
var currentItemFlex = theme.options.properties.root.paginationIndicatorCurrentItemFlex || 3;
|
1273
|
+
useEffect(function () {
|
1274
|
+
if (!(currentItemFlex > 1)) {
|
1275
|
+
return;
|
1276
|
+
}
|
1277
|
+
var timeline = new window.ScrollTimeline({
|
1278
|
+
source: scrollerRef.current,
|
1279
|
+
axis: 'inline'
|
1280
|
+
});
|
1281
|
+
var animations = _toConsumableArray(navRef.current.children).map(function (element, index) {
|
1282
|
+
var start = 1 / Math.max(itemCount - 1, 1) * (index - 1);
|
1283
|
+
var end = 1 / Math.max(itemCount - 1, 1) * (index + 1);
|
1284
|
+
return element.animate([start >= 0 && {
|
1285
|
+
flex: 1,
|
1286
|
+
offset: start
|
1287
|
+
}, {
|
1288
|
+
flex: currentItemFlex
|
1289
|
+
}, end <= 1 && {
|
1290
|
+
flex: 1,
|
1291
|
+
offset: end
|
1292
|
+
}].filter(Boolean), {
|
1293
|
+
easing: 'linear',
|
1294
|
+
timeline: timeline
|
1295
|
+
});
|
1296
|
+
});
|
1297
|
+
return function () {
|
1298
|
+
return animations.forEach(function (animation) {
|
1299
|
+
return animation.cancel();
|
1300
|
+
});
|
1301
|
+
};
|
1302
|
+
}, [currentItemFlex, scrollerRef, itemCount]);
|
1303
|
+
return /*#__PURE__*/React.createElement("nav", {
|
1304
|
+
ref: navRef,
|
1305
|
+
className: styles$8.nav,
|
1306
|
+
"aria-label": t(navAriaLabelTranslationKey),
|
1307
|
+
style: {
|
1308
|
+
aspectRatio: "".concat(itemCount + 2, " / 1")
|
1309
|
+
}
|
1310
|
+
}, Array(itemCount).fill().map(function (_, index) {
|
1311
|
+
return /*#__PURE__*/React.createElement("button", {
|
1312
|
+
key: index,
|
1313
|
+
className: classNames(styles$8.item, _defineProperty({}, styles$8.current, index === currentIndex)),
|
1314
|
+
"aria-label": t(itemAriaLabelTranslationKey, {
|
1315
|
+
index: index
|
1316
|
+
}),
|
1317
|
+
"aria-current": index === currentIndex,
|
1318
|
+
onClick: function onClick() {
|
1319
|
+
return onItemClick(index);
|
1320
|
+
}
|
1321
|
+
});
|
1322
|
+
}));
|
1323
|
+
}
|
1324
|
+
|
1366
1325
|
// from https://github.com/n8tb1t/use-scroll-position
|
1367
1326
|
var isBrowser = typeof window !== "undefined";
|
1368
|
-
|
1369
1327
|
function getScrollPosition(_ref) {
|
1370
1328
|
var element = _ref.element,
|
1371
|
-
|
1329
|
+
useWindow = _ref.useWindow;
|
1372
1330
|
if (!isBrowser) return {
|
1373
1331
|
x: 0,
|
1374
1332
|
y: 0
|
@@ -1383,13 +1341,11 @@ function getScrollPosition(_ref) {
|
|
1383
1341
|
y: position.top
|
1384
1342
|
};
|
1385
1343
|
}
|
1386
|
-
|
1387
1344
|
function useScrollPosition(effect, deps, element, useWindow, wait) {
|
1388
1345
|
var position = useRef(getScrollPosition({
|
1389
1346
|
useWindow: useWindow
|
1390
1347
|
}));
|
1391
1348
|
var throttleTimeout = null;
|
1392
|
-
|
1393
1349
|
var callBack = function callBack() {
|
1394
1350
|
var currPos = getScrollPosition({
|
1395
1351
|
element: element,
|
@@ -1402,12 +1358,10 @@ function useScrollPosition(effect, deps, element, useWindow, wait) {
|
|
1402
1358
|
position.current = currPos;
|
1403
1359
|
throttleTimeout = null;
|
1404
1360
|
};
|
1405
|
-
|
1406
1361
|
useIsomorphicLayoutEffect(function () {
|
1407
1362
|
if (!isBrowser) {
|
1408
1363
|
return;
|
1409
1364
|
}
|
1410
|
-
|
1411
1365
|
var handleScroll = function handleScroll() {
|
1412
1366
|
if (wait) {
|
1413
1367
|
if (throttleTimeout === null) {
|
@@ -1418,7 +1372,6 @@ function useScrollPosition(effect, deps, element, useWindow, wait) {
|
|
1418
1372
|
callBack();
|
1419
1373
|
}
|
1420
1374
|
};
|
1421
|
-
|
1422
1375
|
window.addEventListener('scroll', handleScroll);
|
1423
1376
|
return function () {
|
1424
1377
|
return window.removeEventListener('scroll', handleScroll);
|
@@ -1434,19 +1387,40 @@ useScrollPosition.defaultProps = {
|
|
1434
1387
|
|
1435
1388
|
var EditableInlineText = withInlineEditingAlternative('EditableInlineText', function EditableInlineText(_ref) {
|
1436
1389
|
var _value$, _value$$children$;
|
1437
|
-
|
1438
1390
|
var value = _ref.value,
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1391
|
+
hyphens = _ref.hyphens,
|
1392
|
+
_ref$defaultValue = _ref.defaultValue,
|
1393
|
+
defaultValue = _ref$defaultValue === void 0 ? '' : _ref$defaultValue;
|
1394
|
+
var text = value ? (_value$ = value[0]) === null || _value$ === void 0 ? void 0 : (_value$$children$ = _value$.children[0]) === null || _value$$children$ === void 0 ? void 0 : _value$$children$.text : defaultValue;
|
1442
1395
|
return /*#__PURE__*/React.createElement("span", {
|
1443
|
-
className: classNames(frontendStyles.root, frontendStyles["hyphens-".concat(hyphens)])
|
1444
|
-
},
|
1396
|
+
className: classNames(frontendStyles.root, frontendStyles.textEffects, frontendStyles["hyphens-".concat(hyphens)])
|
1397
|
+
}, /*#__PURE__*/React.createElement("span", null, text));
|
1445
1398
|
});
|
1446
1399
|
|
1447
|
-
var
|
1400
|
+
var EditableLink = withInlineEditingAlternative('EditableLink', function EditableLink(_ref) {
|
1401
|
+
var className = _ref.className,
|
1402
|
+
href = _ref.href,
|
1403
|
+
openInNewTab = _ref.openInNewTab,
|
1404
|
+
children = _ref.children;
|
1405
|
+
return /*#__PURE__*/React.createElement(Link, {
|
1406
|
+
href: href,
|
1407
|
+
openInNewTab: openInNewTab,
|
1408
|
+
attributes: {
|
1409
|
+
className: className
|
1410
|
+
},
|
1411
|
+
children: children
|
1412
|
+
});
|
1413
|
+
});
|
1414
|
+
|
1415
|
+
var LinkTooltipProvider = withInlineEditingAlternative('LinkTooltipProvider', function LinkTooltipProvider(_ref) {
|
1416
|
+
var children = _ref.children;
|
1417
|
+
return children;
|
1418
|
+
});
|
1419
|
+
|
1420
|
+
var styles$9 = {"container":"FitViewport-module_container__-awVj","content":"FitViewport-module_content__1_K5a","inner":"FitViewport-module_inner__3psd1","opaque":"FitViewport-module_opaque__3EE3o"};
|
1448
1421
|
|
1449
1422
|
var AspectRatioContext = React.createContext();
|
1423
|
+
|
1450
1424
|
/**
|
1451
1425
|
* Render a div with the given aspect ratio which does not
|
1452
1426
|
* exceed the heigth of the viewport by setting an appropriate
|
@@ -1471,76 +1445,61 @@ var AspectRatioContext = React.createContext();
|
|
1471
1445
|
* @param {Object} [props.file] - Use width/height of file to calculate aspect ratio.
|
1472
1446
|
* @param {number} [props.scale] - Only take up fraction of the viewport height supplied as value between 0 and 1.
|
1473
1447
|
* @param {Object} [props.opaque] - Render black background behind content.
|
1448
|
+
* @param {string} [props.fill] - Ignore aspect ration and fill viewport vertically.
|
1474
1449
|
*/
|
1475
|
-
|
1476
1450
|
function FitViewport(_ref) {
|
1477
1451
|
var file = _ref.file,
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
var _useFullscreenDimensi = useFullscreenDimensions(),
|
1485
|
-
height = _useFullscreenDimensi.height;
|
1486
|
-
|
1452
|
+
aspectRatio = _ref.aspectRatio,
|
1453
|
+
opaque = _ref.opaque,
|
1454
|
+
children = _ref.children,
|
1455
|
+
fill = _ref.fill,
|
1456
|
+
scale = _ref.scale;
|
1487
1457
|
if (!file && !aspectRatio) return children;
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
if (height) {
|
1492
|
-
// thumbnail view/fixed size: calculate absolute width in px
|
1493
|
-
maxWidthCSS = height / aspectRatio * scale + 'px';
|
1494
|
-
} else {
|
1495
|
-
// published view: set max width to specific aspect ratio depending on viewport height
|
1496
|
-
maxWidthCSS = 100 / aspectRatio * scale + 'vh';
|
1458
|
+
if (typeof aspectRatio === 'string') {
|
1459
|
+
aspectRatio = "var(--theme-aspect-ratio-".concat(aspectRatio, ")");
|
1497
1460
|
}
|
1498
|
-
|
1461
|
+
aspectRatio = fill ? 'fill' : aspectRatio || file.height / file.width;
|
1499
1462
|
return /*#__PURE__*/React.createElement("div", {
|
1500
|
-
className: classNames(styles$
|
1463
|
+
className: classNames(styles$9.container, _defineProperty({}, styles$9.opaque, opaque)),
|
1501
1464
|
style: {
|
1502
|
-
|
1465
|
+
'--fit-viewport-aspect-ratio': fill ? undefined : aspectRatio,
|
1466
|
+
'--fit-viewport-scale': scale
|
1503
1467
|
}
|
1504
1468
|
}, /*#__PURE__*/React.createElement(AspectRatioContext.Provider, {
|
1505
1469
|
value: aspectRatio
|
1506
1470
|
}, children));
|
1507
1471
|
}
|
1508
|
-
|
1509
1472
|
FitViewport.Content = function FitViewportContent(_ref2) {
|
1510
1473
|
var children = _ref2.children;
|
1511
|
-
var
|
1512
|
-
|
1513
|
-
|
1474
|
+
var aspectRatio = useContext(AspectRatioContext);
|
1475
|
+
if (aspectRatio === 'fill') {
|
1476
|
+
return /*#__PURE__*/React.createElement(Fullscreen, {
|
1477
|
+
children: children
|
1478
|
+
});
|
1479
|
+
} else if (!aspectRatio) {
|
1514
1480
|
return children;
|
1515
1481
|
}
|
1516
|
-
|
1517
1482
|
return /*#__PURE__*/React.createElement("div", {
|
1518
|
-
className: styles$
|
1519
|
-
}, /*#__PURE__*/React.createElement("div", {
|
1520
|
-
|
1521
|
-
paddingTop: arPaddingTop + '%'
|
1522
|
-
}
|
1523
|
-
}), /*#__PURE__*/React.createElement("div", {
|
1524
|
-
className: styles$8.inner
|
1483
|
+
className: styles$9.content
|
1484
|
+
}, /*#__PURE__*/React.createElement("div", null), /*#__PURE__*/React.createElement("div", {
|
1485
|
+
className: styles$9.inner
|
1525
1486
|
}, children));
|
1526
1487
|
};
|
1527
1488
|
|
1528
|
-
var styles$
|
1489
|
+
var styles$a = {"container":"Tooltip-module_container__3V63U","bubble":"Tooltip-module_bubble__FIL1C scope-tooltip","fixed":"Tooltip-module_fixed__3NGyG","openOnHover":"Tooltip-module_openOnHover__1EeI5","fadeIn":"Tooltip-module_fadeIn__3g9QH","inner":"Tooltip-module_inner__E2hsp","highlight":"Tooltip-module_highlight__2NpuQ","arrow":"Tooltip-module_arrow__3LxXo"};
|
1529
1490
|
|
1530
1491
|
function Tooltip(_ref) {
|
1531
|
-
var _classNames;
|
1532
|
-
|
1533
1492
|
var bubbleClassName = _ref.bubbleClassName,
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1493
|
+
arrowPos = _ref.arrowPos,
|
1494
|
+
children = _ref.children,
|
1495
|
+
content = _ref.content,
|
1496
|
+
fixed = _ref.fixed,
|
1497
|
+
highlight = _ref.highlight,
|
1498
|
+
openOnHover = _ref.openOnHover,
|
1499
|
+
verticalOffset = _ref.verticalOffset,
|
1500
|
+
horizontalOffset = _ref.horizontalOffset;
|
1542
1501
|
return /*#__PURE__*/React.createElement("div", {
|
1543
|
-
className: classNames(styles$
|
1502
|
+
className: classNames(styles$a.container, _defineProperty(_defineProperty({}, styles$a.openOnHover, openOnHover), styles$a.fixed, fixed)),
|
1544
1503
|
onClick: fixFocusHandlingSafari
|
1545
1504
|
}, children, /*#__PURE__*/React.createElement(Bubble, {
|
1546
1505
|
className: bubbleClassName,
|
@@ -1552,49 +1511,48 @@ function Tooltip(_ref) {
|
|
1552
1511
|
}
|
1553
1512
|
function Bubble(_ref2) {
|
1554
1513
|
var className = _ref2.className,
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1514
|
+
arrowPos = _ref2.arrowPos,
|
1515
|
+
children = _ref2.children,
|
1516
|
+
highlight = _ref2.highlight,
|
1517
|
+
horizontalOffset = _ref2.horizontalOffset,
|
1518
|
+
verticalOffset = _ref2.verticalOffset;
|
1560
1519
|
var inlineStyle = {
|
1561
1520
|
marginLeft: horizontalOffset,
|
1562
1521
|
marginTop: verticalOffset
|
1563
|
-
};
|
1522
|
+
};
|
1523
|
+
|
1524
|
+
// Negative tabIndex ensures element can take focus but does not
|
1564
1525
|
// come up in tab order. This ensures the tooltip stays expanded
|
1565
1526
|
// when text in the legal info menu is selected.
|
1566
|
-
|
1567
1527
|
return /*#__PURE__*/React.createElement("div", {
|
1568
1528
|
style: inlineStyle,
|
1569
1529
|
tabIndex: "-1",
|
1570
|
-
className: classNames(className, styles$
|
1530
|
+
className: classNames(className, styles$a.bubble, _defineProperty({}, styles$a.highlight, highlight))
|
1571
1531
|
}, /*#__PURE__*/React.createElement("div", {
|
1572
1532
|
style: {
|
1573
1533
|
left: arrowPos
|
1574
1534
|
},
|
1575
|
-
className: styles$
|
1535
|
+
className: styles$a.arrow
|
1576
1536
|
}), /*#__PURE__*/React.createElement("div", {
|
1577
|
-
className: styles$
|
1537
|
+
className: styles$a.inner
|
1578
1538
|
}, children));
|
1579
|
-
}
|
1539
|
+
}
|
1540
|
+
|
1541
|
+
// Safari does not focus buttons after they are clicked [1]. Focus
|
1580
1542
|
// manually to ensure `focus-within` selector that opens the tooltip
|
1581
1543
|
// applies.
|
1582
1544
|
//
|
1583
1545
|
// [1] https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button#Clicking_and_focus
|
1584
|
-
|
1585
1546
|
function fixFocusHandlingSafari(event) {
|
1586
1547
|
if (!event.target.closest) {
|
1587
1548
|
// IE does not support closest, but also does not need this fix.
|
1588
1549
|
return;
|
1589
1550
|
}
|
1590
|
-
|
1591
1551
|
var button = event.target.closest('button');
|
1592
|
-
|
1593
1552
|
if (button) {
|
1594
1553
|
button.focus();
|
1595
1554
|
}
|
1596
1555
|
}
|
1597
|
-
|
1598
1556
|
Tooltip.defaultProps = {
|
1599
1557
|
arrowPos: '50%',
|
1600
1558
|
fixed: false,
|
@@ -1603,396 +1561,28 @@ Tooltip.defaultProps = {
|
|
1603
1561
|
horizontalOffset: 0
|
1604
1562
|
};
|
1605
1563
|
|
1606
|
-
|
1607
|
-
_extends$5 = Object.assign || function (target) {
|
1608
|
-
for (var i = 1; i < arguments.length; i++) {
|
1609
|
-
var source = arguments[i];
|
1610
|
-
|
1611
|
-
for (var key in source) {
|
1612
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1613
|
-
target[key] = source[key];
|
1614
|
-
}
|
1615
|
-
}
|
1616
|
-
}
|
1617
|
-
|
1618
|
-
return target;
|
1619
|
-
};
|
1620
|
-
|
1621
|
-
return _extends$5.apply(this, arguments);
|
1622
|
-
}
|
1623
|
-
var muted = (function (_ref) {
|
1624
|
-
var _ref$styles = _ref.styles,
|
1625
|
-
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
1626
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1627
|
-
|
1628
|
-
return /*#__PURE__*/React.createElement("svg", _extends$5({
|
1629
|
-
"aria-hidden": "true",
|
1630
|
-
"data-prefix": "fas",
|
1631
|
-
"data-icon": "volume-mute",
|
1632
|
-
className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-volume-mute"] || "fa-volume-mute") + " " + (styles["fa-w-16"] || "fa-w-16"),
|
1633
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1634
|
-
viewBox: "0 0 512 512"
|
1635
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1636
|
-
d: "M215.03 71.05L126.06 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-21.46-25.96-31.98-40.97-16.97zM461.64 256l45.64-45.64c6.3-6.3 6.3-16.52 0-22.82l-22.82-22.82c-6.3-6.3-16.52-6.3-22.82 0L416 210.36l-45.64-45.64c-6.3-6.3-16.52-6.3-22.82 0l-22.82 22.82c-6.3 6.3-6.3 16.52 0 22.82L370.36 256l-45.63 45.63c-6.3 6.3-6.3 16.52 0 22.82l22.82 22.82c6.3 6.3 16.52 6.3 22.82 0L416 301.64l45.64 45.64c6.3 6.3 16.52 6.3 22.82 0l22.82-22.82c6.3-6.3 6.3-16.52 0-22.82L461.64 256z"
|
1637
|
-
}));
|
1638
|
-
});
|
1639
|
-
|
1640
|
-
function _extends$6() {
|
1641
|
-
_extends$6 = Object.assign || function (target) {
|
1642
|
-
for (var i = 1; i < arguments.length; i++) {
|
1643
|
-
var source = arguments[i];
|
1644
|
-
|
1645
|
-
for (var key in source) {
|
1646
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1647
|
-
target[key] = source[key];
|
1648
|
-
}
|
1649
|
-
}
|
1650
|
-
}
|
1651
|
-
|
1652
|
-
return target;
|
1653
|
-
};
|
1654
|
-
|
1655
|
-
return _extends$6.apply(this, arguments);
|
1656
|
-
}
|
1657
|
-
var share = (function (_ref) {
|
1658
|
-
var _ref$styles = _ref.styles,
|
1659
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1660
|
-
|
1661
|
-
return /*#__PURE__*/React.createElement("svg", _extends$6({
|
1662
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1663
|
-
viewBox: "5 5 84 84"
|
1664
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1665
|
-
d: "M67.5 18c-5.1 0-9.3 4.2-9.3 9.3 0 .5.1 1.1.2 1.6l-23 12.9c-1.7-1.8-4.1-3-6.8-3-5.1 0-9.3 4.1-9.3 9.3 0 5.1 4.1 9.3 9.3 9.3 2.7 0 5.2-1.2 6.9-3.1l22.8 13.4c0 .4-.1.7-.1 1.1 0 5.1 4.1 9.3 9.3 9.3 5.1 0 9.3-4.1 9.3-9.3 0-5.1-4.1-9.3-9.3-9.3-2.8 0-5.4 1.3-7.1 3.3L37.7 49.4c.1-.4.1-.9.1-1.3 0-.5 0-1-.1-1.5l23.1-13c1.7 1.8 4.1 3 6.8 3 5.1 0 9.3-4.1 9.3-9.3-.1-5.1-4.3-9.3-9.4-9.3z"
|
1666
|
-
}));
|
1667
|
-
});
|
1668
|
-
|
1669
|
-
function _extends$7() {
|
1670
|
-
_extends$7 = Object.assign || function (target) {
|
1671
|
-
for (var i = 1; i < arguments.length; i++) {
|
1672
|
-
var source = arguments[i];
|
1673
|
-
|
1674
|
-
for (var key in source) {
|
1675
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1676
|
-
target[key] = source[key];
|
1677
|
-
}
|
1678
|
-
}
|
1679
|
-
}
|
1680
|
-
|
1681
|
-
return target;
|
1682
|
-
};
|
1683
|
-
|
1684
|
-
return _extends$7.apply(this, arguments);
|
1685
|
-
}
|
1686
|
-
var unmuted = (function (_ref) {
|
1687
|
-
var _ref$styles = _ref.styles,
|
1688
|
-
styles = _ref$styles === void 0 ? {} : _ref$styles,
|
1689
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1690
|
-
|
1691
|
-
return /*#__PURE__*/React.createElement("svg", _extends$7({
|
1692
|
-
"aria-hidden": "true",
|
1693
|
-
"data-prefix": "fas",
|
1694
|
-
"data-icon": "volume-mute",
|
1695
|
-
className: (styles["svg-inline--fa"] || "svg-inline--fa") + " " + (styles["fa-volume-mute"] || "fa-volume-mute") + " " + (styles["fa-w-16"] || "fa-w-16"),
|
1696
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1697
|
-
viewBox: "0 0 512 512"
|
1698
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1699
|
-
d: "M232.36 64.01a24.007 24.007 0 00-1.176.002c-5.703.15-11.464 2.348-16.155 7.039L126.061 160H24c-13.26 0-24 10.74-24 24v144c0 13.25 10.74 24 24 24h102.06l88.97 88.95c15.03 15.03 40.97 4.47 40.97-16.97V88.02c0-14.293-11.514-23.733-23.64-24.01zm149.5 31.994c-8.107-.16-16.098 3.814-20.75 11.217-7.09 11.28-3.78 26.21 7.41 33.36C408.27 165.97 432 209.11 432 256s-23.73 90.03-63.48 115.42c-11.19 7.14-14.5 22.07-7.41 33.36 6.51 10.36 21.12 15.14 33.12 7.46C447.94 377.94 480 319.54 480 256c0-63.53-32.06-121.94-85.77-156.24a23.808 23.808 0 00-12.37-3.756zm-55.032 80.174c-8.51-.046-16.795 4.42-21.209 12.402-6.39 11.61-2.159 26.2 9.451 32.61C327.98 228.28 336 241.63 336 256c0 14.38-8.02 27.72-20.92 34.81-11.61 6.41-15.84 21-9.45 32.61 6.43 11.66 21.05 15.8 32.61 9.45 28.23-15.55 45.77-45 45.77-76.88 0-31.88-17.54-61.32-45.78-76.86a23.987 23.987 0 00-11.402-2.952z"
|
1700
|
-
}));
|
1701
|
-
});
|
1702
|
-
|
1703
|
-
function _extends$8() {
|
1704
|
-
_extends$8 = Object.assign || function (target) {
|
1705
|
-
for (var i = 1; i < arguments.length; i++) {
|
1706
|
-
var source = arguments[i];
|
1707
|
-
|
1708
|
-
for (var key in source) {
|
1709
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1710
|
-
target[key] = source[key];
|
1711
|
-
}
|
1712
|
-
}
|
1713
|
-
}
|
1714
|
-
|
1715
|
-
return target;
|
1716
|
-
};
|
1717
|
-
|
1718
|
-
return _extends$8.apply(this, arguments);
|
1719
|
-
}
|
1720
|
-
var gear = (function (_ref) {
|
1721
|
-
var _ref$styles = _ref.styles,
|
1722
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1723
|
-
|
1724
|
-
return /*#__PURE__*/React.createElement("svg", _extends$8({
|
1725
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1726
|
-
viewBox: "-3 -3 30 30"
|
1727
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1728
|
-
d: "M19.43 12.98c.04-.32.07-.64.07-.98s-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.12-.22-.39-.3-.61-.22l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65A.488.488 0 0014 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.23-.09-.49 0-.61.22l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98s.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.12.22.39.3.61.22l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.23.09.49 0 .61-.22l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zM12 15.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z"
|
1729
|
-
}));
|
1730
|
-
});
|
1731
|
-
|
1732
|
-
function _extends$9() {
|
1733
|
-
_extends$9 = Object.assign || function (target) {
|
1734
|
-
for (var i = 1; i < arguments.length; i++) {
|
1735
|
-
var source = arguments[i];
|
1736
|
-
|
1737
|
-
for (var key in source) {
|
1738
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1739
|
-
target[key] = source[key];
|
1740
|
-
}
|
1741
|
-
}
|
1742
|
-
}
|
1743
|
-
|
1744
|
-
return target;
|
1745
|
-
};
|
1746
|
-
|
1747
|
-
return _extends$9.apply(this, arguments);
|
1748
|
-
}
|
1749
|
-
var copyright = (function (_ref) {
|
1750
|
-
var _ref$styles = _ref.styles,
|
1751
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1752
|
-
|
1753
|
-
return /*#__PURE__*/React.createElement("svg", _extends$9({
|
1754
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1755
|
-
width: "800",
|
1756
|
-
height: "800",
|
1757
|
-
viewBox: "0 0 24 24",
|
1758
|
-
fill: "none"
|
1759
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1760
|
-
d: "M14 9c-.48-.6-1.07-1-2-1-1.923 0-3 1.143-3 4s1.077 4 3 4c.93 0 1.52-.4 2-1m-2 6a9 9 0 100-18 9 9 0 000 18z",
|
1761
|
-
stroke: "currentColor",
|
1762
|
-
strokeWidth: "2",
|
1763
|
-
strokeLinecap: "round",
|
1764
|
-
strokeLinejoin: "round"
|
1765
|
-
}));
|
1766
|
-
});
|
1767
|
-
|
1768
|
-
function _extends$a() {
|
1769
|
-
_extends$a = Object.assign || function (target) {
|
1770
|
-
for (var i = 1; i < arguments.length; i++) {
|
1771
|
-
var source = arguments[i];
|
1772
|
-
|
1773
|
-
for (var key in source) {
|
1774
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1775
|
-
target[key] = source[key];
|
1776
|
-
}
|
1777
|
-
}
|
1778
|
-
}
|
1779
|
-
|
1780
|
-
return target;
|
1781
|
-
};
|
1782
|
-
|
1783
|
-
return _extends$a.apply(this, arguments);
|
1784
|
-
}
|
1785
|
-
var email = (function (_ref) {
|
1786
|
-
var _ref$styles = _ref.styles,
|
1787
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1788
|
-
|
1789
|
-
return /*#__PURE__*/React.createElement("svg", _extends$a({
|
1790
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1791
|
-
viewBox: "0 0 612 612"
|
1792
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1793
|
-
d: "M573.75 57.375H38.25C17.136 57.375 0 74.511 0 95.625v420.75c0 21.133 17.136 38.25 38.25 38.25h535.5c21.133 0 38.25-17.117 38.25-38.25V95.625c0-21.114-17.117-38.25-38.25-38.25zM554.625 497.25H57.375V204.657l224.03 187.999c7.134 5.967 15.874 8.97 24.595 8.97 8.74 0 17.461-3.003 24.595-8.97l224.03-187.999V497.25zm0-367.487L306 338.379 57.375 129.763V114.75h497.25v15.013z"
|
1794
|
-
}));
|
1795
|
-
});
|
1796
|
-
|
1797
|
-
function _extends$b() {
|
1798
|
-
_extends$b = Object.assign || function (target) {
|
1799
|
-
for (var i = 1; i < arguments.length; i++) {
|
1800
|
-
var source = arguments[i];
|
1801
|
-
|
1802
|
-
for (var key in source) {
|
1803
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1804
|
-
target[key] = source[key];
|
1805
|
-
}
|
1806
|
-
}
|
1807
|
-
}
|
1808
|
-
|
1809
|
-
return target;
|
1810
|
-
};
|
1811
|
-
|
1812
|
-
return _extends$b.apply(this, arguments);
|
1813
|
-
}
|
1814
|
-
var facebook = (function (_ref) {
|
1815
|
-
var _ref$styles = _ref.styles,
|
1816
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1817
|
-
|
1818
|
-
return /*#__PURE__*/React.createElement("svg", _extends$b({
|
1819
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1820
|
-
viewBox: "0 0 430.113 430.114"
|
1821
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1822
|
-
d: "M158.081 83.3v59.218h-43.385v72.412h43.385v215.183h89.122V214.936h59.805s5.601-34.721 8.316-72.685H247.54V92.74c0-7.4 9.717-17.354 19.321-17.354h48.557V.001h-66.021C155.878-.004 158.081 72.48 158.081 83.3z"
|
1823
|
-
}));
|
1824
|
-
});
|
1825
|
-
|
1826
|
-
function _extends$c() {
|
1827
|
-
_extends$c = Object.assign || function (target) {
|
1828
|
-
for (var i = 1; i < arguments.length; i++) {
|
1829
|
-
var source = arguments[i];
|
1830
|
-
|
1831
|
-
for (var key in source) {
|
1832
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1833
|
-
target[key] = source[key];
|
1834
|
-
}
|
1835
|
-
}
|
1836
|
-
}
|
1837
|
-
|
1838
|
-
return target;
|
1839
|
-
};
|
1840
|
-
|
1841
|
-
return _extends$c.apply(this, arguments);
|
1842
|
-
}
|
1843
|
-
var linkedIn = (function (_ref) {
|
1844
|
-
var _ref$styles = _ref.styles,
|
1845
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1846
|
-
|
1847
|
-
return /*#__PURE__*/React.createElement("svg", _extends$c({
|
1848
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1849
|
-
viewBox: "0 0 430.117 430.117"
|
1850
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1851
|
-
d: "M430.117 261.543V420.56h-92.188V272.193c0-37.271-13.334-62.707-46.703-62.707-25.473 0-40.632 17.142-47.301 33.724-2.432 5.928-3.058 14.179-3.058 22.477V420.56h-92.219s1.242-251.285 0-277.32h92.21v39.309c-.187.294-.43.611-.606.896h.606v-.896c12.251-18.869 34.13-45.824 83.102-45.824 60.673-.001 106.157 39.636 106.157 124.818zM52.183 9.558C20.635 9.558 0 30.251 0 57.463c0 26.619 20.038 47.94 50.959 47.94h.616c32.159 0 52.159-21.317 52.159-47.94-.606-27.212-20-47.905-51.551-47.905zM5.477 420.56h92.184V143.24H5.477v277.32z"
|
1852
|
-
}));
|
1853
|
-
});
|
1854
|
-
|
1855
|
-
function _extends$d() {
|
1856
|
-
_extends$d = Object.assign || function (target) {
|
1857
|
-
for (var i = 1; i < arguments.length; i++) {
|
1858
|
-
var source = arguments[i];
|
1859
|
-
|
1860
|
-
for (var key in source) {
|
1861
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1862
|
-
target[key] = source[key];
|
1863
|
-
}
|
1864
|
-
}
|
1865
|
-
}
|
1866
|
-
|
1867
|
-
return target;
|
1868
|
-
};
|
1869
|
-
|
1870
|
-
return _extends$d.apply(this, arguments);
|
1871
|
-
}
|
1872
|
-
var telegram = (function (_ref) {
|
1873
|
-
var _ref$styles = _ref.styles,
|
1874
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1875
|
-
|
1876
|
-
return /*#__PURE__*/React.createElement("svg", _extends$d({
|
1877
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1878
|
-
viewBox: "0 0 512.004 512.004"
|
1879
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1880
|
-
d: "M508.194 20.517c-4.43-4.96-11.42-6.29-17.21-3.76l-482 211a15.01 15.01 0 00-8.98 13.41 15.005 15.005 0 008.38 13.79l115.09 56.6 28.68 172.06c.93 6.53 6.06 11.78 12.74 12.73 4.8.69 9.57-1 12.87-4.4l90.86-90.86 129.66 92.62a15.02 15.02 0 0014.24 1.74 15.01 15.01 0 009.19-11.01l90-451c.89-4.47-.26-9.26-3.52-12.92zm-372.84 263.45l-84.75-41.68 334.82-146.57-250.07 188.25zm46.94 44.59l-13.95 69.75-15.05-90.3 183.97-138.49-150.88 151.39c-2.12 2.12-3.53 4.88-4.09 7.65zm9.13 107.3l15.74-78.67 36.71 26.22-52.45 52.45zm205.41 19.94l-176.73-126.23 252.47-253.31-75.74 379.54z"
|
1881
|
-
}));
|
1882
|
-
});
|
1883
|
-
|
1884
|
-
function _extends$e() {
|
1885
|
-
_extends$e = Object.assign || function (target) {
|
1886
|
-
for (var i = 1; i < arguments.length; i++) {
|
1887
|
-
var source = arguments[i];
|
1888
|
-
|
1889
|
-
for (var key in source) {
|
1890
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1891
|
-
target[key] = source[key];
|
1892
|
-
}
|
1893
|
-
}
|
1894
|
-
}
|
1895
|
-
|
1896
|
-
return target;
|
1897
|
-
};
|
1898
|
-
|
1899
|
-
return _extends$e.apply(this, arguments);
|
1900
|
-
}
|
1901
|
-
var twitter = (function (_ref) {
|
1902
|
-
var _ref$styles = _ref.styles,
|
1903
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1904
|
-
|
1905
|
-
return /*#__PURE__*/React.createElement("svg", _extends$e({
|
1906
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1907
|
-
viewBox: "0 0 512 512"
|
1908
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1909
|
-
d: "M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8l164.9-188.5L26.8 48h145.6l100.5 132.9L389.2 48zm-24.8 373.8h39.1L151.1 88h-42l255.3 333.8z"
|
1910
|
-
}));
|
1911
|
-
});
|
1912
|
-
|
1913
|
-
function _extends$f() {
|
1914
|
-
_extends$f = Object.assign || function (target) {
|
1915
|
-
for (var i = 1; i < arguments.length; i++) {
|
1916
|
-
var source = arguments[i];
|
1917
|
-
|
1918
|
-
for (var key in source) {
|
1919
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
1920
|
-
target[key] = source[key];
|
1921
|
-
}
|
1922
|
-
}
|
1923
|
-
}
|
1924
|
-
|
1925
|
-
return target;
|
1926
|
-
};
|
1927
|
-
|
1928
|
-
return _extends$f.apply(this, arguments);
|
1929
|
-
}
|
1930
|
-
var whatsApp = (function (_ref) {
|
1931
|
-
var _ref$styles = _ref.styles,
|
1932
|
-
props = _objectWithoutProperties(_ref, ["styles"]);
|
1933
|
-
|
1934
|
-
return /*#__PURE__*/React.createElement("svg", _extends$f({
|
1935
|
-
xmlns: "http://www.w3.org/2000/svg",
|
1936
|
-
viewBox: "0 0 90 90"
|
1937
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
1938
|
-
d: "M90 43.841c0 24.213-19.779 43.841-44.182 43.841a44.256 44.256 0 01-21.357-5.455L0 90l7.975-23.522a43.38 43.38 0 01-6.34-22.637C1.635 19.628 21.416 0 45.818 0 70.223 0 90 19.628 90 43.841zM45.818 6.982c-20.484 0-37.146 16.535-37.146 36.859 0 8.065 2.629 15.534 7.076 21.61L11.107 79.14l14.275-4.537A37.122 37.122 0 0045.819 80.7c20.481 0 37.146-16.533 37.146-36.857S66.301 6.982 45.818 6.982zm22.311 46.956c-.273-.447-.994-.717-2.076-1.254-1.084-.537-6.41-3.138-7.4-3.495-.993-.358-1.717-.538-2.438.537-.721 1.076-2.797 3.495-3.43 4.212-.632.719-1.263.809-2.347.271-1.082-.537-4.571-1.673-8.708-5.333-3.219-2.848-5.393-6.364-6.025-7.441-.631-1.075-.066-1.656.475-2.191.488-.482 1.084-1.255 1.625-1.882.543-.628.723-1.075 1.082-1.793.363-.717.182-1.344-.09-1.883-.27-.537-2.438-5.825-3.34-7.977-.902-2.15-1.803-1.792-2.436-1.792-.631 0-1.354-.09-2.076-.09s-1.896.269-2.889 1.344c-.992 1.076-3.789 3.676-3.789 8.963 0 5.288 3.879 10.397 4.422 11.113.541.716 7.49 11.92 18.5 16.223C58.2 65.771 58.2 64.336 60.186 64.156c1.984-.179 6.406-2.599 7.312-5.107.9-2.512.9-4.663.631-5.111z"
|
1939
|
-
}));
|
1940
|
-
});
|
1941
|
-
|
1942
|
-
var icons = {
|
1943
|
-
expand: ArrowRightIcon,
|
1944
|
-
information: information,
|
1945
|
-
muted: muted,
|
1946
|
-
share: share,
|
1947
|
-
unmuted: unmuted,
|
1948
|
-
gear: gear,
|
1949
|
-
copyright: copyright,
|
1950
|
-
email: email,
|
1951
|
-
facebook: facebook,
|
1952
|
-
linkedIn: linkedIn,
|
1953
|
-
telegram: telegram,
|
1954
|
-
twitter: twitter,
|
1955
|
-
whatsApp: whatsApp,
|
1956
|
-
arrowLeft: ArrowLeftIcon,
|
1957
|
-
arrowRight: ArrowRightIcon
|
1958
|
-
};
|
1959
|
-
/**
|
1960
|
-
* Render an SVG icon that can be customized in themes.
|
1961
|
-
*
|
1962
|
-
* @param {Object} props
|
1963
|
-
* @param {string} props.name -
|
1964
|
-
* Either: copyright, expand, gear, information, muted, share, unmuted,
|
1965
|
-
* email, facebook, linkedIn, telegram, twitter, whatsApp,
|
1966
|
-
* arrowLeft, arrowRight,
|
1967
|
-
* @params {number} [props.width] - Image width.
|
1968
|
-
* @params {number} [props.height] - Image height.
|
1969
|
-
*/
|
1970
|
-
|
1971
|
-
function ThemeIcon(_ref) {
|
1972
|
-
var name = _ref.name,
|
1973
|
-
width = _ref.width,
|
1974
|
-
height = _ref.height;
|
1975
|
-
var theme = useTheme();
|
1976
|
-
var FallbackIcon = icons[name];
|
1977
|
-
var themeAsset = theme.assets.icons[name];
|
1978
|
-
|
1979
|
-
if (!FallbackIcon) {
|
1980
|
-
throw new Error("Unknown icon '".concat(name, "'. Available options: ").concat(Object.keys(icons).join(', '), "."));
|
1981
|
-
}
|
1564
|
+
var styles$b = {"button":"ScrollButton-module_button__3rrDc","icon":"ScrollButton-module_icon__128_J","disabled":"ScrollButton-module_disabled__35fFF","visuallyHidden":"ScrollButton-module_visuallyHidden__36chO"};
|
1982
1565
|
|
1983
|
-
|
1984
|
-
|
1985
|
-
|
1986
|
-
|
1987
|
-
|
1988
|
-
|
1989
|
-
|
1990
|
-
|
1991
|
-
|
1992
|
-
|
1993
|
-
|
1994
|
-
|
1995
|
-
|
1566
|
+
var size = 40;
|
1567
|
+
function ScrollButton(_ref) {
|
1568
|
+
var direction = _ref.direction,
|
1569
|
+
disabled = _ref.disabled,
|
1570
|
+
onClick = _ref.onClick;
|
1571
|
+
var _useI18n = useI18n(),
|
1572
|
+
t = _useI18n.t;
|
1573
|
+
return /*#__PURE__*/React.createElement("button", {
|
1574
|
+
className: classNames(styles$b.button, _defineProperty({}, styles$b.disabled, disabled)),
|
1575
|
+
tabIndex: "-1",
|
1576
|
+
onClick: onClick
|
1577
|
+
}, /*#__PURE__*/React.createElement("div", {
|
1578
|
+
className: styles$b.icon
|
1579
|
+
}, /*#__PURE__*/React.createElement(ThemeIcon, {
|
1580
|
+
name: direction === 'left' ? 'arrowLeft' : 'arrowRight',
|
1581
|
+
width: size,
|
1582
|
+
height: size
|
1583
|
+
}), /*#__PURE__*/React.createElement("span", {
|
1584
|
+
className: styles$b.visuallyHidden
|
1585
|
+
}, t(direction === 'left' ? 'pageflow_scrolled.public.previous' : 'pageflow_scrolled.public.next'))));
|
1996
1586
|
}
|
1997
1587
|
|
1998
1588
|
function textColorForBackgroundColor(hex) {
|
@@ -2004,72 +1594,98 @@ function registerTemplateWidgetType (typeName, callback) {
|
|
2004
1594
|
callback(element);
|
2005
1595
|
}
|
2006
1596
|
|
2007
|
-
var
|
2008
|
-
|
2009
|
-
|
2010
|
-
|
2011
|
-
presence: presence
|
2012
|
-
};
|
1597
|
+
var WidgetSelectionRect = withInlineEditingAlternative('WidgetSelectionRect', function WidgetSelectionRect(_ref) {
|
1598
|
+
var children = _ref.children;
|
1599
|
+
return children;
|
1600
|
+
});
|
2013
1601
|
|
1602
|
+
var styles$c = {"button":"LinkButton-module_button__33q1F","editable":"LinkButton-module_editable__FzuA4"};
|
1603
|
+
|
1604
|
+
var _excluded$3 = ["href", "openInNewTab", "value", "onTextChange", "onLinkChange", "scaleCategory", "className", "actionButtonVisible", "linkPreviewPosition", "linkPreviewDisabled", "children"];
|
1605
|
+
function LinkButton(_ref) {
|
1606
|
+
var href = _ref.href,
|
1607
|
+
openInNewTab = _ref.openInNewTab,
|
1608
|
+
value = _ref.value,
|
1609
|
+
onTextChange = _ref.onTextChange,
|
1610
|
+
onLinkChange = _ref.onLinkChange,
|
1611
|
+
scaleCategory = _ref.scaleCategory,
|
1612
|
+
className = _ref.className,
|
1613
|
+
actionButtonVisible = _ref.actionButtonVisible,
|
1614
|
+
linkPreviewPosition = _ref.linkPreviewPosition,
|
1615
|
+
linkPreviewDisabled = _ref.linkPreviewDisabled,
|
1616
|
+
children = _ref.children,
|
1617
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
1618
|
+
var _useI18n = useI18n({
|
1619
|
+
locale: 'ui'
|
1620
|
+
}),
|
1621
|
+
t = _useI18n.t;
|
1622
|
+
var _useContentElementEdi = useContentElementEditorState(),
|
1623
|
+
isEditable = _useContentElementEdi.isEditable;
|
1624
|
+
return /*#__PURE__*/React.createElement(Text, {
|
1625
|
+
inline: true,
|
1626
|
+
scaleCategory: scaleCategory
|
1627
|
+
}, /*#__PURE__*/React.createElement(EditableLink, Object.assign({
|
1628
|
+
href: href,
|
1629
|
+
openInNewTab: openInNewTab,
|
1630
|
+
linkPreviewPosition: linkPreviewPosition,
|
1631
|
+
linkPreviewDisabled: utils.isBlankEditableTextValue(value) || linkPreviewDisabled,
|
1632
|
+
actionButtonVisible: actionButtonVisible,
|
1633
|
+
className: classNames(styles$c.button, className, _defineProperty({}, styles$c.editable, isEditable)),
|
1634
|
+
onChange: onLinkChange
|
1635
|
+
}, props), /*#__PURE__*/React.createElement(EditableInlineText, {
|
1636
|
+
value: value,
|
1637
|
+
onChange: onTextChange,
|
1638
|
+
placeholder: t('pageflow_scrolled.inline_editing.type_text')
|
1639
|
+
}), children));
|
1640
|
+
}
|
1641
|
+
|
1642
|
+
function _regeneratorRuntime$1() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime$1 = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(typeof e + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
2014
1643
|
var editMode = typeof window !== 'undefined' && window.location.pathname.indexOf('/editor/entries') === 0;
|
2015
|
-
var withShadowClassName = styles$
|
2016
|
-
|
1644
|
+
var withShadowClassName = styles$d.withShadow;
|
2017
1645
|
global.pageflowScrolledRender = /*#__PURE__*/function () {
|
2018
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(seed) {
|
2019
|
-
return _regeneratorRuntime.wrap(function _callee$(_context) {
|
2020
|
-
while (1) {
|
2021
|
-
|
2022
|
-
|
2023
|
-
|
2024
|
-
|
2025
|
-
|
2026
|
-
|
2027
|
-
|
2028
|
-
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
case 6:
|
2033
|
-
if (!editMode) {
|
2034
|
-
_context.next = 11;
|
2035
|
-
break;
|
2036
|
-
}
|
2037
|
-
|
2038
|
-
_context.next = 9;
|
2039
|
-
return loadInlineEditingComponents();
|
2040
|
-
|
2041
|
-
case 9:
|
2042
|
-
_context.next = 12;
|
1646
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime$1().mark(function _callee(seed) {
|
1647
|
+
return _regeneratorRuntime$1().wrap(function _callee$(_context) {
|
1648
|
+
while (1) switch (_context.prev = _context.next) {
|
1649
|
+
case 0:
|
1650
|
+
setupI18n(seed.i18n);
|
1651
|
+
features.enable('frontend', seed.config.enabledFeatureNames);
|
1652
|
+
_context.next = 4;
|
1653
|
+
return browser.detectFeatures();
|
1654
|
+
case 4:
|
1655
|
+
_context.next = 6;
|
1656
|
+
return loadDashUnlessHlsSupported(seed);
|
1657
|
+
case 6:
|
1658
|
+
if (!editMode) {
|
1659
|
+
_context.next = 11;
|
2043
1660
|
break;
|
2044
|
-
|
2045
|
-
|
2046
|
-
|
2047
|
-
|
2048
|
-
|
2049
|
-
|
2050
|
-
|
2051
|
-
|
2052
|
-
|
2053
|
-
|
2054
|
-
|
2055
|
-
|
2056
|
-
|
2057
|
-
|
2058
|
-
|
1661
|
+
}
|
1662
|
+
_context.next = 9;
|
1663
|
+
return loadInlineEditingComponents();
|
1664
|
+
case 9:
|
1665
|
+
_context.next = 12;
|
1666
|
+
break;
|
1667
|
+
case 11:
|
1668
|
+
registerVendors({
|
1669
|
+
contentElementTypes: api.contentElementTypes,
|
1670
|
+
consent: consent,
|
1671
|
+
seed: seed
|
1672
|
+
});
|
1673
|
+
case 12:
|
1674
|
+
render(seed);
|
1675
|
+
case 13:
|
1676
|
+
case "end":
|
1677
|
+
return _context.stop();
|
2059
1678
|
}
|
2060
1679
|
}, _callee);
|
2061
1680
|
}));
|
2062
|
-
|
2063
1681
|
return function (_x) {
|
2064
1682
|
return _ref.apply(this, arguments);
|
2065
1683
|
};
|
2066
1684
|
}();
|
2067
|
-
|
2068
1685
|
global.pageflowScrolledRegisterUpdateSeedHandler = function () {
|
2069
1686
|
if (window.parent !== window) {
|
2070
1687
|
window.addEventListener('message', receive);
|
2071
1688
|
}
|
2072
|
-
|
2073
1689
|
function receive(message) {
|
2074
1690
|
if (window.location.href.indexOf(message.origin) === 0) {
|
2075
1691
|
if (message.data.type === 'UPDATE_SEED') {
|
@@ -2078,7 +1694,6 @@ global.pageflowScrolledRegisterUpdateSeedHandler = function () {
|
|
2078
1694
|
}
|
2079
1695
|
}
|
2080
1696
|
};
|
2081
|
-
|
2082
1697
|
function render(seed) {
|
2083
1698
|
if (editMode) {
|
2084
1699
|
ReactDOM.render( /*#__PURE__*/React.createElement(Root, {
|
@@ -2090,7 +1705,6 @@ function render(seed) {
|
|
2090
1705
|
}), document.getElementById('root'));
|
2091
1706
|
}
|
2092
1707
|
}
|
2093
|
-
|
2094
1708
|
function Root(_ref2) {
|
2095
1709
|
var seed = _ref2.seed;
|
2096
1710
|
return /*#__PURE__*/React.createElement(RootProviders, {
|
@@ -2098,4 +1712,4 @@ function Root(_ref2) {
|
|
2098
1712
|
}, /*#__PURE__*/React.createElement(Entry, null));
|
2099
1713
|
}
|
2100
1714
|
|
2101
|
-
export { AudioPlayerControls, ClassicPlayerControls, ContentElementBox, ContentElementFigure, EditableInlineText, Entry, ExpandableImage, Figure, FitViewport, MediaInteractionTracking, MediaPlayerControls, Panorama, PlayerControls, Root,
|
1715
|
+
export { AudioPlayerControls, ClassicPlayerControls, ContentElementBox, ContentElementFigure, EditableInlineText, EditableLink, Entry, ExpandableImage, Figure, FitViewport, LinkButton, LinkTooltipProvider, MediaInteractionTracking, MediaPlayerControls, PaginationIndicator, Panorama, PlayerControls, Root, ScrollButton, Tooltip, VideoPlayerControls, WaveformPlayerControls, WidgetSelectionRect, registerTemplateWidgetType, textColorForBackgroundColor, useScrollPosition, withShadowClassName };
|