pageflow 15.5.0 → 15.7.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

Files changed (270) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +219 -87
  3. data/README.md +1 -2
  4. data/admins/pageflow/entry.rb +28 -57
  5. data/admins/pageflow/user.rb +1 -3
  6. data/app/assets/images/pageflow/admin/icons/buttons/editor.svg +2 -0
  7. data/app/assets/images/pageflow/admin/icons/buttons/preview.svg +2 -0
  8. data/app/assets/images/pageflow/admin/icons/buttons/show_public.svg +2 -0
  9. data/app/assets/images/pageflow/admin/icons/delete.svg +9 -0
  10. data/app/assets/images/pageflow/admin/icons/done.svg +6 -0
  11. data/app/assets/images/pageflow/admin/icons/edit.svg +7 -0
  12. data/app/assets/images/pageflow/admin/icons/editor.svg +2 -0
  13. data/app/assets/images/pageflow/admin/icons/folder.svg +8 -0
  14. data/app/assets/images/pageflow/admin/icons/folder_active.svg +8 -0
  15. data/app/assets/images/pageflow/admin/icons/info.svg +3 -0
  16. data/app/assets/images/pageflow/admin/icons/new.svg +5 -0
  17. data/app/assets/images/pageflow/admin/icons/preview.svg +2 -0
  18. data/app/assets/images/pageflow/admin/icons/published.svg +2 -0
  19. data/app/assets/images/pageflow/admin/icons/published_with_password.svg +2 -0
  20. data/app/assets/images/pageflow/admin/icons/show_public.svg +2 -0
  21. data/app/assets/images/pageflow/editor/blank_entry/logo.png +0 -0
  22. data/app/assets/images/pageflow/themes/default/embed_opt_in.svg +3 -0
  23. data/app/assets/images/pageflow/themes/default/embed_opt_out_info.svg +16 -0
  24. data/app/assets/javascripts/pageflow/admin/entries.js +9 -57
  25. data/app/assets/javascripts/pageflow/dist/ui.js +127 -10
  26. data/app/assets/stylesheets/pageflow/admin/active_admin_patches.scss +18 -16
  27. data/app/assets/stylesheets/pageflow/admin/badge_list.scss +25 -35
  28. data/app/assets/stylesheets/pageflow/admin/columns.scss +13 -11
  29. data/app/assets/stylesheets/pageflow/admin/embed_code.scss +1 -4
  30. data/app/assets/stylesheets/pageflow/admin/entries/folders.scss +44 -19
  31. data/app/assets/stylesheets/pageflow/admin/entries.scss +15 -31
  32. data/app/assets/stylesheets/pageflow/admin/features.scss +3 -1
  33. data/app/assets/stylesheets/pageflow/admin/forms.scss +14 -12
  34. data/app/assets/stylesheets/pageflow/admin/hint.scss +8 -14
  35. data/app/assets/stylesheets/pageflow/admin/icon_button.scss +25 -14
  36. data/app/assets/stylesheets/pageflow/admin/icon_link.scss +31 -15
  37. data/app/assets/stylesheets/pageflow/admin/publication_state_indicator.scss +14 -7
  38. data/app/assets/stylesheets/pageflow/admin/status_tags.scss +5 -4
  39. data/app/assets/stylesheets/pageflow/admin/tabs_view.scss +36 -34
  40. data/app/assets/stylesheets/pageflow/admin/tooltip_bubble.scss +15 -11
  41. data/app/assets/stylesheets/pageflow/admin.scss +12 -0
  42. data/app/assets/stylesheets/pageflow/editor/background_positioning.scss +15 -61
  43. data/app/assets/stylesheets/pageflow/editor/base.scss +28 -13
  44. data/app/assets/stylesheets/pageflow/editor/blank_entry.scss +6 -6
  45. data/app/assets/stylesheets/pageflow/editor/change_theme.scss +28 -71
  46. data/app/assets/stylesheets/pageflow/editor/composables.scss +2 -2
  47. data/app/assets/stylesheets/pageflow/editor/confirm_encoding.scss +18 -36
  48. data/app/assets/stylesheets/pageflow/editor/confirm_upload.scss +12 -39
  49. data/app/assets/stylesheets/pageflow/editor/dialogs.scss +39 -12
  50. data/app/assets/stylesheets/pageflow/editor/disabled_atmo_indicator.scss +3 -3
  51. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +7 -10
  52. data/app/assets/stylesheets/pageflow/editor/emulation_mode_button.scss +3 -8
  53. data/app/assets/stylesheets/pageflow/editor/failures.scss +3 -3
  54. data/app/assets/stylesheets/pageflow/editor/file_import.scss +22 -38
  55. data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +3 -7
  56. data/app/assets/stylesheets/pageflow/editor/file_settings_dialog.scss +4 -24
  57. data/app/assets/stylesheets/pageflow/editor/file_stages.scss +10 -11
  58. data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +4 -8
  59. data/app/assets/stylesheets/pageflow/editor/files.scss +7 -6
  60. data/app/assets/stylesheets/pageflow/editor/files_explorer.scss +13 -30
  61. data/app/assets/stylesheets/pageflow/editor/files_gallery.scss +15 -11
  62. data/app/assets/stylesheets/pageflow/editor/filtered_files.scss +6 -7
  63. data/app/assets/stylesheets/pageflow/editor/help.scss +19 -14
  64. data/app/assets/stylesheets/pageflow/editor/help_image.scss +1 -1
  65. data/app/assets/stylesheets/pageflow/editor/info_box.scss +19 -0
  66. data/app/assets/stylesheets/pageflow/editor/inputs/file_input.scss +7 -11
  67. data/app/assets/stylesheets/pageflow/editor/inputs/file_processing_state_display.scss +0 -2
  68. data/app/assets/stylesheets/pageflow/editor/inputs/reference.scss +7 -11
  69. data/app/assets/stylesheets/pageflow/editor/list.scss +13 -10
  70. data/app/assets/stylesheets/pageflow/editor/loading.scss +1 -1
  71. data/app/assets/stylesheets/pageflow/editor/locked.scss +9 -5
  72. data/app/assets/stylesheets/pageflow/editor/menu.scss +5 -5
  73. data/app/assets/stylesheets/pageflow/editor/notifications.scss +15 -14
  74. data/app/assets/stylesheets/pageflow/editor/other_entry_item.scss +7 -3
  75. data/app/assets/stylesheets/pageflow/editor/outline.scss +57 -19
  76. data/app/assets/stylesheets/pageflow/editor/page_links.scss +10 -8
  77. data/app/assets/stylesheets/pageflow/editor/page_selection.scss +2 -29
  78. data/app/assets/stylesheets/pageflow/editor/publish_entry.scss +5 -6
  79. data/app/assets/stylesheets/pageflow/editor/quotas.scss +2 -3
  80. data/app/assets/stylesheets/pageflow/editor/select_button.scss +12 -6
  81. data/app/assets/stylesheets/pageflow/editor/sidebar_footer.scss +1 -5
  82. data/app/assets/stylesheets/pageflow/editor/storyline_picker.scss +6 -2
  83. data/app/assets/stylesheets/pageflow/editor/text_tracks.scss +6 -22
  84. data/app/assets/stylesheets/pageflow/editor/widgets.scss +2 -2
  85. data/app/assets/stylesheets/pageflow/editor/wysihtml5.scss +35 -29
  86. data/app/assets/stylesheets/pageflow/mixins/background_icons.scss +3 -3
  87. data/app/assets/stylesheets/pageflow/mixins/buttons.scss +50 -68
  88. data/app/assets/stylesheets/pageflow/themes/default/base.scss +2 -0
  89. data/app/assets/stylesheets/pageflow/themes/default/consent/bar.scss +156 -0
  90. data/app/assets/stylesheets/pageflow/themes/default/consent/vendor_list.scss +62 -0
  91. data/app/assets/stylesheets/pageflow/themes/default/consent.scss +2 -0
  92. data/app/assets/stylesheets/pageflow/themes/default/logo/alignment.scss +7 -0
  93. data/app/assets/stylesheets/pageflow/themes/default/page/shadow.scss +44 -0
  94. data/app/assets/stylesheets/pageflow/themes/default/third_party_embed_consent.scss +103 -0
  95. data/app/assets/stylesheets/pageflow/ui/forms.scss +79 -84
  96. data/app/assets/stylesheets/pageflow/ui/functions.scss +56 -0
  97. data/app/assets/stylesheets/pageflow/ui/input/check_box_group_input.scss +2 -3
  98. data/app/assets/stylesheets/pageflow/ui/input/color_input.scss +6 -6
  99. data/app/assets/stylesheets/pageflow/ui/input/extended_select_input.scss +63 -50
  100. data/app/assets/stylesheets/pageflow/ui/normalize/forms.scss +153 -0
  101. data/app/assets/stylesheets/pageflow/ui/normalize.scss +278 -0
  102. data/app/assets/stylesheets/pageflow/ui/properties.scss +44 -0
  103. data/app/assets/stylesheets/pageflow/ui/table_cells/delete_row_table_cell.scss +1 -1
  104. data/app/assets/stylesheets/pageflow/ui/table_view.scss +14 -18
  105. data/app/assets/stylesheets/pageflow/ui/tabs_view.scss +8 -11
  106. data/app/assets/stylesheets/pageflow/ui/tooltip.scss +6 -8
  107. data/app/assets/stylesheets/pageflow/ui/validation_error_messages.scss +6 -0
  108. data/app/assets/stylesheets/pageflow/ui.scss +4 -0
  109. data/app/controllers/pageflow/edit_locks_controller.rb +3 -1
  110. data/app/helpers/pageflow/admin/entries_helper.rb +2 -12
  111. data/app/helpers/pageflow/embed_code_helper.rb +1 -1
  112. data/app/helpers/pageflow/entries_helper.rb +41 -2
  113. data/app/helpers/pageflow/file_background_images_helper.rb +1 -1
  114. data/app/helpers/pageflow/page_types_helper.rb +1 -1
  115. data/app/helpers/pageflow/themes_helper.rb +1 -1
  116. data/app/jobs/pageflow/poll_meta_data_from_zencoder_job.rb +1 -1
  117. data/app/jobs/pageflow/poll_zencoder_job.rb +1 -9
  118. data/app/models/pageflow/audio_file.rb +17 -0
  119. data/app/models/pageflow/audio_file_url_templates.rb +4 -1
  120. data/app/models/pageflow/customized_theme.rb +37 -0
  121. data/app/models/pageflow/draft_entry.rb +6 -59
  122. data/app/models/pageflow/entry_at_revision.rb +68 -0
  123. data/app/models/pageflow/entry_role_query.rb +44 -24
  124. data/app/models/pageflow/image_file_css_background_image_urls.rb +8 -2
  125. data/app/models/pageflow/published_entry.rb +9 -56
  126. data/app/models/pageflow/theme_customization.rb +46 -0
  127. data/app/models/pageflow/theme_customization_file.rb +58 -0
  128. data/app/models/pageflow/video_file.rb +11 -1
  129. data/app/models/pageflow/video_file_url_templates.rb +1 -0
  130. data/app/policies/pageflow/entry_policy.rb +4 -0
  131. data/app/state_machines/pageflow/media_encoding_state_machine.rb +23 -4
  132. data/app/views/admin/entries/_form.html.erb +50 -0
  133. data/app/views/admin/entries/entry_type_name_input.html.erb +5 -0
  134. data/app/views/admin/features/_form.html.erb +1 -1
  135. data/app/views/admin/memberships/_form.html.erb +2 -3
  136. data/app/views/admin/users/_form.html.erb +1 -1
  137. data/app/views/admin/users/invitation.html.erb +2 -2
  138. data/app/views/components/pageflow/admin/entry_user_badge_list.rb +10 -9
  139. data/app/views/components/pageflow/admin/members_tab.rb +5 -1
  140. data/app/views/components/pageflow/admin/revisions_tab.rb +13 -3
  141. data/app/views/components/pageflow/admin/timestamp.rb +20 -0
  142. data/app/views/components/pageflow/admin/user_account_badge_list.rb +5 -6
  143. data/app/views/pageflow/admin/entries/_cannot_add_user.html.erb +9 -5
  144. data/app/views/pageflow/admin/entries/_entry_type_name_input.html.erb +7 -0
  145. data/app/views/pageflow/audio_files/_audio_file.json.jbuilder +13 -0
  146. data/app/views/pageflow/editor/encoding_confirmations/_intro.html.erb +0 -0
  147. data/app/views/pageflow/editor/encoding_confirmations/check.json.jbuilder +14 -2
  148. data/config/initializers/paperclip.rb +16 -1
  149. data/config/locales/de.yml +24 -28
  150. data/config/locales/en.yml +19 -10
  151. data/db/migrate/20210528073122_create_pageflow_theme_customizations.rb +11 -0
  152. data/db/migrate/20210531090654_create_pageflow_theme_customization_files.rb +15 -0
  153. data/db/migrate/20210531102228_add_selected_file_ids_to_theme_customizations.rb +5 -0
  154. data/db/migrate/20211020085902_add_canonical_entry_url_prefix_to_themings.rb +5 -0
  155. data/db/migrate/20220503150010_add_peak_data_to_audio_files.rb +5 -0
  156. data/db/migrate/20220705084830_add_trailing_slash_in_canonical_urls_to_themings.rb +5 -0
  157. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +256 -124
  158. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +566 -167
  159. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +5 -5
  160. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +4 -4
  161. data/entry_types/paged/app/helpers/pageflow_paged/third_party_embed_consent_helper.rb +38 -0
  162. data/entry_types/paged/app/views/pageflow_paged/third_party_embed_consent/_opt_in.html.erb +12 -0
  163. data/entry_types/paged/app/views/pageflow_paged/third_party_embed_consent/_opt_out_info.html.erb +10 -0
  164. data/entry_types/paged/config/initializers/features.rb +2 -0
  165. data/entry_types/paged/config/locales/new/video_contain.de.yml +7 -0
  166. data/entry_types/paged/config/locales/new/video_contain.en.yml +7 -0
  167. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +3 -0
  168. data/entry_types/scrolled/app/helpers/pageflow_scrolled/entry_json_seed_helper.rb +1 -0
  169. data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +58 -0
  170. data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +37 -3
  171. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +92 -6
  172. data/entry_types/scrolled/app/helpers/pageflow_scrolled/webpack_public_path_helper.rb +20 -0
  173. data/entry_types/scrolled/app/models/pageflow_scrolled/content_element.rb +7 -0
  174. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +5 -2
  175. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_seed.json.jbuilder +5 -1
  176. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +5 -4
  177. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +16 -0
  178. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_theme.json.jbuilder +13 -2
  179. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_widget.json.jbuilder +2 -0
  180. data/entry_types/scrolled/config/locales/de.yml +1 -8
  181. data/entry_types/scrolled/config/locales/en.yml +1 -9
  182. data/entry_types/scrolled/config/locales/new/before_after_slider.de.yml +8 -0
  183. data/entry_types/scrolled/config/locales/new/before_after_slider.en.yml +8 -0
  184. data/entry_types/scrolled/config/locales/new/center_ragged.de.yml +8 -0
  185. data/entry_types/scrolled/config/locales/new/center_ragged.en.yml +9 -0
  186. data/entry_types/scrolled/config/locales/new/consent.de.yml +25 -0
  187. data/entry_types/scrolled/config/locales/new/consent.en.yml +24 -0
  188. data/entry_types/scrolled/config/locales/new/content_element_categories.de.yml +39 -0
  189. data/entry_types/scrolled/config/locales/new/content_element_categories.en.yml +39 -0
  190. data/entry_types/scrolled/config/locales/new/default_transition.de.yml +14 -0
  191. data/entry_types/scrolled/config/locales/new/default_transition.en.yml +14 -0
  192. data/entry_types/scrolled/config/locales/new/header_line_breaks.de.yml +28 -0
  193. data/entry_types/scrolled/config/locales/new/header_line_breaks.en.yml +27 -0
  194. data/entry_types/scrolled/config/locales/new/header_size.de.yml +17 -0
  195. data/entry_types/scrolled/config/locales/new/header_size.en.yml +17 -0
  196. data/entry_types/scrolled/config/locales/new/iframe_embed.de.yml +39 -0
  197. data/entry_types/scrolled/config/locales/new/iframe_embed.en.yml +39 -0
  198. data/entry_types/scrolled/config/locales/new/inline_loops.de.yml +26 -0
  199. data/entry_types/scrolled/config/locales/new/inline_loops.en.yml +26 -0
  200. data/entry_types/scrolled/config/locales/new/portrait_inline_image.de.yml +9 -0
  201. data/entry_types/scrolled/config/locales/new/portrait_inline_image.en.yml +9 -0
  202. data/entry_types/scrolled/config/locales/new/section_width.de.yml +10 -0
  203. data/entry_types/scrolled/config/locales/new/section_width.en.yml +10 -0
  204. data/entry_types/scrolled/config/locales/new/typography_variants.de.yml +7 -0
  205. data/entry_types/scrolled/config/locales/new/typography_variants.en.yml +7 -0
  206. data/entry_types/scrolled/config/locales/new/video_embed_poster.de.yml +8 -0
  207. data/entry_types/scrolled/config/locales/new/video_embed_poster.en.yml +8 -0
  208. data/entry_types/scrolled/config/locales/new/waveform_styles.de.yml +11 -0
  209. data/entry_types/scrolled/config/locales/new/waveform_styles.en.yml +12 -0
  210. data/entry_types/scrolled/config/locales/new/widgets.de.yml +6 -0
  211. data/entry_types/scrolled/config/locales/new/widgets.en.yml +6 -0
  212. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +29 -5
  213. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/templates/themes_plugin.rb.tt +8 -6
  214. data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +37 -0
  215. data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +57 -0
  216. data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +49 -0
  217. data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +2 -0
  218. data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +8 -0
  219. data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +42 -0
  220. data/entry_types/scrolled/lib/pageflow_scrolled.rb +17 -1
  221. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/create_bundle_symlinks_for_yarn.rake +3 -2
  222. data/entry_types/scrolled/package/config/webpack.js +11 -0
  223. data/entry_types/scrolled/package/contentElements-editor.js +323 -89
  224. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  225. data/entry_types/scrolled/package/contentElements-frontend.js +719 -529
  226. data/entry_types/scrolled/package/editor.js +459 -261
  227. data/entry_types/scrolled/package/frontend/{EditableText-7093fd0e.js → EditableInlineText.module-b9923660.js} +284 -362
  228. data/entry_types/scrolled/package/frontend/{i18n-4dc6c377.js → PhonePlatformContext-9fb97827.js} +199 -106
  229. data/entry_types/scrolled/package/frontend/{Viewer-e49e7807.js → Viewer-e2290ea0.js} +196 -79
  230. data/entry_types/scrolled/package/frontend/{Wavesurfer-0adf5667.js → Wavesurfer-7d9cf1b7.js} +16 -58
  231. data/entry_types/scrolled/package/frontend/{components-6a6793ca.js → components-6ab26015.js} +664 -671
  232. data/entry_types/scrolled/package/frontend/{getPrototypeOf-63c7c8e8.js → createSuper-d0f30da3.js} +34 -5
  233. data/entry_types/scrolled/package/frontend/index.css +1 -9
  234. data/entry_types/scrolled/package/frontend/index.js +1919 -2386
  235. data/entry_types/scrolled/package/frontend/{useBrowserFeature-91a4c29d.js → usePhonePlatform-2857c22b.js} +9 -8
  236. data/entry_types/scrolled/package/frontend-server.js +3 -6
  237. data/entry_types/scrolled/package/package.json +16 -8
  238. data/entry_types/scrolled/package/testHelpers.js +456 -0
  239. data/entry_types/scrolled/package/values/breakpoints.module.css +9 -0
  240. data/entry_types/scrolled/package/values/colors.module.css +5 -0
  241. data/entry_types/scrolled/package/widgets/defaultNavigation.css +9 -0
  242. data/entry_types/scrolled/package/widgets/defaultNavigation.js +612 -0
  243. data/entry_types/scrolled/spec/fixtures/image.svg +1 -0
  244. data/lib/pageflow/ability_mixin.rb +4 -0
  245. data/lib/pageflow/built_in_widget_type.rb +4 -0
  246. data/lib/pageflow/built_in_widget_types_plugin.rb +7 -0
  247. data/lib/pageflow/configuration.rb +34 -1
  248. data/lib/pageflow/entry_type.rb +11 -2
  249. data/lib/pageflow/entry_type_configuration.rb +2 -0
  250. data/lib/pageflow/file_type.rb +24 -0
  251. data/lib/pageflow/paperclip_processors/audio_waveform.rb +42 -0
  252. data/lib/pageflow/paperclip_processors/noop.rb +10 -0
  253. data/lib/pageflow/theme_customizations.rb +61 -0
  254. data/lib/pageflow/version.rb +1 -1
  255. data/lib/pageflow.rb +9 -0
  256. data/package/config/jest/index.js +2 -1
  257. data/package/config/postcss/scaleFunctions.js +71 -0
  258. data/package/editor.js +95 -85
  259. data/package/frontend.js +521 -161
  260. data/package/package.json +5 -3
  261. data/package/testHelpers.js +26 -5
  262. data/package/ui.js +124 -11
  263. data/spec/factories/draft_entries.rb +19 -1
  264. data/spec/factories/entries.rb +4 -0
  265. data/spec/factories/published_entries.rb +6 -0
  266. data/spec/fixtures/audio.ogg +0 -0
  267. metadata +119 -14
  268. data/app/views/admin/entries/_not_allowed_to_see_entry_types.json.jbuilder +0 -2
  269. data/app/views/admin/entries/entry_types.json.jbuilder +0 -4
  270. data/package/config/jest/transformers/upwardBabel.js +0 -5
@@ -1,6 +1,6 @@
1
1
  import { browser } from 'pageflow/frontend';
2
2
  import React, { createContext, useContext, useState, useEffect } from 'react';
3
- import { _ as _slicedToArray } from './i18n-4dc6c377.js';
3
+ import { c as _slicedToArray, P as PhonePlatformContext } from './PhonePlatformContext-9fb97827.js';
4
4
 
5
5
  var BrowserFeaturesAvailableContext = createContext(); // Browser feature detection is not available during server side
6
6
  // rendering. To prevent mismatches during hydration, we keep features
@@ -19,15 +19,16 @@ function BrowserFeaturesProvider(_ref) {
19
19
  useEffect(function () {
20
20
  return setIsAvailable(true);
21
21
  }, []);
22
- return (
23
- /*#__PURE__*/
24
- React.createElement(BrowserFeaturesAvailableContext.Provider, {
25
- value: isAvailable
26
- }, children)
27
- );
22
+ return /*#__PURE__*/React.createElement(BrowserFeaturesAvailableContext.Provider, {
23
+ value: isAvailable
24
+ }, children);
28
25
  }
29
26
  function useBrowserFeature(name) {
30
27
  return useContext(BrowserFeaturesAvailableContext) && browser.has(name);
31
28
  }
32
29
 
33
- export { BrowserFeaturesProvider as B, useBrowserFeature as u };
30
+ function usePhonePlatform() {
31
+ return React.useContext(PhonePlatformContext);
32
+ }
33
+
34
+ export { BrowserFeaturesProvider as B, usePhonePlatform as a, useBrowserFeature as u };
@@ -219,10 +219,7 @@ ReactRailsUJS.getConstructor = function () {
219
219
  function ServerRenderedRoot(_ref) {
220
220
  var seed = _ref.seed;
221
221
  setupI18n(seed.i18n);
222
- return (
223
- /*#__PURE__*/
224
- React.createElement(Root, {
225
- seed: seed
226
- })
227
- );
222
+ return /*#__PURE__*/React.createElement(Root, {
223
+ seed: seed
224
+ });
228
225
  }
@@ -29,8 +29,8 @@
29
29
  "slugify": "^1.4.6",
30
30
  "striptags": "^3.1.1",
31
31
  "use-context-selector": "^1.2.11",
32
- "video.js": "https://github.com/tf/video.js#pageflow-scrolled-5",
33
- "wavesurfer.js": "https://github.com/tf/wavesurfer.js#patches",
32
+ "video.js": "https://github.com/tf/video.js#pageflow-scrolled-6",
33
+ "wavesurfer.js": "6.1.0",
34
34
  "whatwg-fetch": "^3.0.0"
35
35
  },
36
36
  "peerDependencies": {
@@ -39,16 +39,19 @@
39
39
  "react-dom": "^16.9.0"
40
40
  },
41
41
  "devDependencies": {
42
+ "@percy-io/in-percy": "^0.1.11",
42
43
  "@percy/storybook": "^3.2.0",
43
44
  "@storybook/addon-viewport": "^5.3.13",
44
45
  "@storybook/react": "^5.3.9",
45
- "@testing-library/jest-dom": "^4.2.4",
46
- "@testing-library/react": "^10.3.0",
47
- "@testing-library/react-hooks": "^3.2.1",
46
+ "@testing-library/dom": "^8.11.1",
47
+ "@testing-library/jest-dom": "^5.14.1",
48
+ "@testing-library/react": "^12.0.0",
49
+ "@testing-library/react-hooks": "^7.0.1",
50
+ "@testing-library/user-event": "^13.5.0",
48
51
  "@typescript-eslint/eslint-plugin": "2.x",
49
52
  "@typescript-eslint/parser": "2.x",
50
53
  "babel-eslint": "10.x",
51
- "babel-jest": "^24.9.0",
54
+ "babel-jest": "^27.0.6",
52
55
  "babel-loader": "^8.0.6",
53
56
  "eslint": "6.x",
54
57
  "eslint-config-react-app": "^5.1.0",
@@ -59,10 +62,15 @@
59
62
  "eslint-plugin-jsx-a11y": "6.x",
60
63
  "eslint-plugin-react": "7.x",
61
64
  "eslint-plugin-react-hooks": "1.x",
62
- "jest": "^24.9.0",
65
+ "jest": "^27.0.6",
66
+ "jest-fetch-mock": "^3.0.3",
63
67
  "jest-svg-transformer": "^1.0.0",
68
+ "mockdate": "^3.0.5",
69
+ "react": "^16.14.0",
70
+ "react-dom": "^16.14.0",
64
71
  "react-svg-loader": "^3.0.3",
65
- "react-test-renderer": "^16.9.0"
72
+ "react-test-renderer": "^16.9.0",
73
+ "slate-hyperscript": "^0.57.3"
66
74
  },
67
75
  "scripts": {
68
76
  "test": "jest",
@@ -0,0 +1,456 @@
1
+ import React, { useEffect } from 'react';
2
+ import { render } from '@testing-library/react';
3
+ import { renderHook } from '@testing-library/react-hooks/dom';
4
+ import { Consent } from 'pageflow/frontend';
5
+ import { RootProviders, useEntryStateDispatch } from 'pageflow-scrolled/frontend';
6
+
7
+ function _defineProperty(obj, key, value) {
8
+ if (key in obj) {
9
+ Object.defineProperty(obj, key, {
10
+ value: value,
11
+ enumerable: true,
12
+ configurable: true,
13
+ writable: true
14
+ });
15
+ } else {
16
+ obj[key] = value;
17
+ }
18
+
19
+ return obj;
20
+ }
21
+
22
+ function ownKeys(object, enumerableOnly) {
23
+ var keys = Object.keys(object);
24
+
25
+ if (Object.getOwnPropertySymbols) {
26
+ var symbols = Object.getOwnPropertySymbols(object);
27
+ if (enumerableOnly) symbols = symbols.filter(function (sym) {
28
+ return Object.getOwnPropertyDescriptor(object, sym).enumerable;
29
+ });
30
+ keys.push.apply(keys, symbols);
31
+ }
32
+
33
+ return keys;
34
+ }
35
+
36
+ function _objectSpread2(target) {
37
+ for (var i = 1; i < arguments.length; i++) {
38
+ var source = arguments[i] != null ? arguments[i] : {};
39
+
40
+ if (i % 2) {
41
+ ownKeys(Object(source), true).forEach(function (key) {
42
+ _defineProperty(target, key, source[key]);
43
+ });
44
+ } else if (Object.getOwnPropertyDescriptors) {
45
+ Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
46
+ } else {
47
+ ownKeys(Object(source)).forEach(function (key) {
48
+ Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
49
+ });
50
+ }
51
+ }
52
+
53
+ return target;
54
+ }
55
+
56
+ /**
57
+ * Construct data structure that resembles seed generated by server
58
+ * side JBuilder templates.
59
+ *
60
+ * @param {Object} [options]
61
+ * @param {Object} [options.imageFileUrlTemplates] - Mapping of url template names to url templates.
62
+ * @param {String} [options.prettyUrl] - The entry's url (Default share url).
63
+ * @param {Object} [options.shareUrlTemplates] - Mapping of share provider names to sharing urls.
64
+ * @param {String} [options.defaultFileRights] - Default file rights of entry's account.
65
+ * @param {Object} [options.legalInfo] - imprint, copyright and privacy information of entry.
66
+ * @param {Object} [options.themeOptions] - Options set via theme registration.
67
+ * @param {Object} [options.themeAssets] - Paths to theme assets.
68
+ * @param {Object} [options.entry] - attributes of entry.
69
+ * @param {Array} [options.imageFiles] - Array of objects with image file attributes of entry.
70
+ * @param {Array} [options.videoFiles] - Array of objects with video file attributes of entry.
71
+ * @param {Array} [options.audioFiles] - Array of objects with audio file attributes of entry.
72
+ * @param {Array} [options.textTrackFiles] - Array of objects with text track file attributes of entry.
73
+ * @param {Array} [options.chapters] - Array of objects with chapter attributes of entry.
74
+ * @param {Array} [options.sections] - Array of objects with section attributes of entry.
75
+ * @param {Array} [options.contentElements] - Array of objects with content element attributes of entry.
76
+ * @param {Array} [options.widgets] - Array of objects with widget attributes of entry.
77
+ * @returns {Object} - Data that resembles seed generated by server side rendering.
78
+ */
79
+ function normalizeSeed() {
80
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
81
+ imageFileUrlTemplates = _ref.imageFileUrlTemplates,
82
+ fileUrlTemplates = _ref.fileUrlTemplates,
83
+ fileModelTypes = _ref.fileModelTypes,
84
+ prettyUrl = _ref.prettyUrl,
85
+ shareUrlTemplates = _ref.shareUrlTemplates,
86
+ defaultFileRights = _ref.defaultFileRights,
87
+ legalInfo = _ref.legalInfo,
88
+ themeOptions = _ref.themeOptions,
89
+ themeAssets = _ref.themeAssets,
90
+ entry = _ref.entry,
91
+ imageFiles = _ref.imageFiles,
92
+ videoFiles = _ref.videoFiles,
93
+ audioFiles = _ref.audioFiles,
94
+ textTrackFiles = _ref.textTrackFiles,
95
+ chapters = _ref.chapters,
96
+ sections = _ref.sections,
97
+ contentElements = _ref.contentElements,
98
+ widgets = _ref.widgets,
99
+ additionalSeedData = _ref.additionalSeedData;
100
+
101
+ var entries = entry ? [entry] : [{}];
102
+ var normalizedEntries = normalizeCollection(entries);
103
+ var normalizedContentElements = normalizeCollection(contentElements, {
104
+ typeName: 'textBlock',
105
+ configuration: {}
106
+ });
107
+ var normalizedSections = normalizeSections(sections, normalizedContentElements);
108
+ var normalizedChapters = normalizeChapters(chapters, normalizedSections);
109
+ return {
110
+ config: {
111
+ fileUrlTemplates: _objectSpread2({
112
+ imageFiles: _objectSpread2({}, imageFileUrlTemplates),
113
+ videoFiles: {},
114
+ audioFiles: {},
115
+ textTrackFiles: {}
116
+ }, fileUrlTemplates),
117
+ fileModelTypes: _objectSpread2({
118
+ audioFiles: 'Pageflow::AudioFile',
119
+ imageFiles: 'Pageflow::ImageFile',
120
+ textTrackFiles: 'Pageflow::TextTrackFile',
121
+ videoFiles: 'Pageflow::VideoFile'
122
+ }, fileModelTypes),
123
+ prettyUrl: prettyUrl,
124
+ shareUrlTemplates: normalizeShareUrlTemplates(shareUrlTemplates),
125
+ defaultFileRights: defaultFileRights,
126
+ legalInfo: normalizeLegalInfo(legalInfo),
127
+ theme: normalizeTheme({
128
+ themeOptions: themeOptions,
129
+ themeAssets: themeAssets
130
+ }),
131
+ additionalSeedData: additionalSeedData || {}
132
+ },
133
+ collections: {
134
+ entries: normalizedEntries,
135
+ imageFiles: normalizeCollection(imageFiles, {
136
+ isReady: true,
137
+ width: 1920,
138
+ height: 1279,
139
+ configuration: {}
140
+ }),
141
+ videoFiles: normalizeCollection(videoFiles, {
142
+ isReady: true,
143
+ width: 1920,
144
+ height: 1279,
145
+ configuration: {}
146
+ }),
147
+ audioFiles: normalizeCollection(audioFiles, {
148
+ isReady: true,
149
+ configuration: {}
150
+ }),
151
+ textTrackFiles: normalizeCollection(textTrackFiles, {
152
+ parentFileId: null,
153
+ parentFileType: null,
154
+ configuration: {}
155
+ }),
156
+ chapters: normalizedChapters,
157
+ sections: normalizedSections,
158
+ contentElements: normalizedContentElements,
159
+ widgets: normalizeWidgets(widgets)
160
+ }
161
+ };
162
+ }
163
+
164
+ function normalizeSections() {
165
+ var sections = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
166
+ var contentElements = arguments.length > 1 ? arguments[1] : undefined;
167
+ var sectionDefaults = {
168
+ configuration: {
169
+ transition: 'scroll',
170
+ backdrop: {
171
+ image: '#000'
172
+ }
173
+ }
174
+ };
175
+
176
+ if (contentElements.length && !sections.length) {
177
+ contentElements.forEach(function (contentElement) {
178
+ return contentElement.sectionId = 10;
179
+ });
180
+ return [_objectSpread2({
181
+ id: 10,
182
+ permaId: 1
183
+ }, sectionDefaults)];
184
+ }
185
+
186
+ return normalizeCollection(sections, sectionDefaults);
187
+ }
188
+
189
+ function normalizeChapters() {
190
+ var chapters = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
191
+ var sections = arguments.length > 1 ? arguments[1] : undefined;
192
+ var chapterDefaults = {
193
+ configuration: {}
194
+ };
195
+
196
+ if (sections.length && !chapters.length) {
197
+ sections.forEach(function (section) {
198
+ return section.chapterId = 100;
199
+ });
200
+ return [_objectSpread2({
201
+ id: 100,
202
+ permaId: 10
203
+ }, chapterDefaults)];
204
+ }
205
+
206
+ return normalizeCollection(chapters, chapterDefaults);
207
+ }
208
+
209
+ function normalizeShareUrlTemplates(shareUrlTemplates) {
210
+ if (shareUrlTemplates) {
211
+ return shareUrlTemplates;
212
+ } else {
213
+ return {
214
+ email: 'mailto:?body=%{url}',
215
+ facebook: 'http://www.facebook.com/sharer/sharer.php?u=%{url}',
216
+ google: 'https://plus.google.com/share?url=%{url}',
217
+ linked_in: 'https://www.linkedin.com/shareArticle?mini=true&url=%{url}',
218
+ telegram: 'tg://msg?text=%{url}',
219
+ twitter: 'https://twitter.com/intent/tweet?url=%{url}',
220
+ whats_app: 'WhatsApp://send?text=%{url}'
221
+ };
222
+ }
223
+ }
224
+
225
+ function normalizeLegalInfo(legalInfo) {
226
+ if (legalInfo) {
227
+ return legalInfo;
228
+ } else {
229
+ return {
230
+ imprint: {
231
+ label: '',
232
+ url: ''
233
+ },
234
+ copyright: {
235
+ label: '',
236
+ url: ''
237
+ },
238
+ privacy: {
239
+ label: '',
240
+ url: ''
241
+ }
242
+ };
243
+ }
244
+ }
245
+
246
+ function normalizeTheme(_ref2) {
247
+ var themeAssets = _ref2.themeAssets,
248
+ themeOptions = _ref2.themeOptions;
249
+ return {
250
+ assets: _objectSpread2({
251
+ icons: {}
252
+ }, themeAssets),
253
+ options: _objectSpread2({
254
+ colors: {}
255
+ }, themeOptions)
256
+ };
257
+ }
258
+
259
+ function normalizeWidgets() {
260
+ var widgets = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
261
+ return widgets.map(function (widget) {
262
+ return _objectSpread2({
263
+ permaId: widget.role,
264
+ configuration: {}
265
+ }, widget);
266
+ });
267
+ }
268
+
269
+ function normalizeCollection() {
270
+ var collection = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
271
+ var defaults = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
272
+ return collection.map(function (item, index) {
273
+ return _objectSpread2(_objectSpread2({
274
+ id: index + 1,
275
+ permaId: index + 1
276
+ }, defaults), item);
277
+ });
278
+ }
279
+
280
+ function _objectWithoutPropertiesLoose(source, excluded) {
281
+ if (source == null) return {};
282
+ var target = {};
283
+ var sourceKeys = Object.keys(source);
284
+ var key, i;
285
+
286
+ for (i = 0; i < sourceKeys.length; i++) {
287
+ key = sourceKeys[i];
288
+ if (excluded.indexOf(key) >= 0) continue;
289
+ target[key] = source[key];
290
+ }
291
+
292
+ return target;
293
+ }
294
+
295
+ function _objectWithoutProperties(source, excluded) {
296
+ if (source == null) return {};
297
+ var target = _objectWithoutPropertiesLoose(source, excluded);
298
+ var key, i;
299
+
300
+ if (Object.getOwnPropertySymbols) {
301
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
302
+
303
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
304
+ key = sourceSymbolKeys[i];
305
+ if (excluded.indexOf(key) >= 0) continue;
306
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
307
+ target[key] = source[key];
308
+ }
309
+ }
310
+
311
+ return target;
312
+ }
313
+
314
+ /**
315
+ * Render a component that depends on entry state. Accepts all options
316
+ * supported by [`render` of
317
+ * `@testing-library/react`](https://testing-library.com/docs/react-testing-library/api#render).
318
+ *
319
+ * The `seed` option can be used to simulate rendering the component
320
+ * in the published entry. Data passed in this option would normally
321
+ * be rendered in a server side JBuilder template.
322
+ *
323
+ * The `setup` option can be used to simulate rendering the component
324
+ * in the editor where data is synchronized from Backbone models.
325
+ *
326
+ * To be able to render components that expect the result of certain
327
+ * hooks as part of their props, instead of a React component, you can
328
+ * pass a function returning a React component as first parameter. The
329
+ * function will be evaluated in a context of a React component and
330
+ * can thus make use of hooks
331
+ *
332
+ * // DOES NOT WORK
333
+ * renderInEntry(<Image file={useFile({collectionName: 'imageFiles', permaId: 4})} />, {seed});
334
+ *
335
+ * // WORKS
336
+ * renderInEntry(() => <Image file={useFile({collectionName: 'imageFiles', permaId: 4})} />, {seed});
337
+ *
338
+ * When using the `rerender` function from the result, you again need
339
+ * to use the same type of parameter you passed to the original
340
+ * `renderInEntry` call.
341
+ *
342
+ * @param {React.Component|Function} ui - React component or function returning a React component
343
+ * @param {Object} [options]
344
+ * @param {Object} [options.seed] - Seed data for entry state. Passed through {@link normalizeSeed}.
345
+ * @param {Function} [options.setup] -
346
+ * Function that gets called with the internal entry state dispatch
347
+ * function. The normalized seed constructed from the `seed` option
348
+ * is passed as a second parameter.
349
+ */
350
+
351
+ function renderInEntry(ui) {
352
+ var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
353
+ seed = _ref.seed,
354
+ setup = _ref.setup,
355
+ wrapper = _ref.wrapper,
356
+ _ref$consent = _ref.consent,
357
+ consent = _ref$consent === void 0 ? Consent.create() : _ref$consent,
358
+ options = _objectWithoutProperties(_ref, ["seed", "setup", "wrapper", "consent"]);
359
+
360
+ options = _objectSpread2({
361
+ wrapper: createWrapper(seed, setup, wrapper, consent)
362
+ }, options);
363
+
364
+ if (typeof ui === 'function') {
365
+ // Evaluate `ui` inside a React component to allow using hooks in
366
+ // the test. We also could have used `ui` as a React component
367
+ // directly (e.g. `React.createElement(ui)`). But when calling
368
+ // `rerender` with a different function than the one passed to the
369
+ // original `renderInEntry` call, e.g.
370
+ //
371
+ // const {rerender} = renderInEntry(() => <MyComponent someProp={1} />);
372
+ // rerender(() => <MyComponent someProp={2} />);
373
+ //
374
+ // React would unmount the `MyComponent` component from the first
375
+ // render call and mount a new one. We therefore define a single
376
+ // component that is reused across rerenders to ensure
377
+ // `MyComponent` stays mounted and just receives new props.
378
+ var HooksWrapper = function HooksWrapper(_ref2) {
379
+ var ui = _ref2.ui;
380
+ return ui();
381
+ };
382
+
383
+ var result = render( /*#__PURE__*/React.createElement(HooksWrapper, {
384
+ ui: ui
385
+ }), options);
386
+ return _objectSpread2(_objectSpread2({}, result), {}, {
387
+ rerender: function rerender(ui) {
388
+ result.rerender( /*#__PURE__*/React.createElement(HooksWrapper, {
389
+ ui: ui
390
+ }));
391
+ }
392
+ });
393
+ } else {
394
+ return render(ui, options);
395
+ }
396
+ }
397
+ /**
398
+ * Render a hook that depends on entry state. Accepts all options
399
+ * supported by [`renderHook` of
400
+ * `@testing-library/react-hooks`](https://react-hooks-testing-library.com/reference/api)
401
+ *
402
+ * Can be used to test selector hooks which extract information from
403
+ * the entry state.
404
+ *
405
+ * @param {Function} callback - Function that calls the hook.
406
+ * @param {Object} [options]
407
+ * @param {Object} [options.seed] - Seed data for entry state. Passed through {@link normalizeSeed}.
408
+ * @param {Function} [options.setup] - See {@link renderInEntry}.
409
+ */
410
+
411
+ function renderHookInEntry(callback) {
412
+ var _ref3 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
413
+ seed = _ref3.seed,
414
+ setup = _ref3.setup,
415
+ wrapper = _ref3.wrapper,
416
+ options = _objectWithoutProperties(_ref3, ["seed", "setup", "wrapper"]);
417
+
418
+ return renderHook(callback, _objectSpread2({
419
+ wrapper: createWrapper(seed, setup, wrapper)
420
+ }, options));
421
+ }
422
+
423
+ function createWrapper(seed, setup, originalWrapper, consent) {
424
+ var normalizedSeed = normalizeSeed(seed);
425
+
426
+ var OriginalWrapper = originalWrapper || function Noop(_ref4) {
427
+ var children = _ref4.children;
428
+ return children;
429
+ };
430
+
431
+ return function Wrapper(_ref5) {
432
+ var children = _ref5.children;
433
+ return /*#__PURE__*/React.createElement(RootProviders, {
434
+ seed: normalizedSeed,
435
+ consent: consent
436
+ }, /*#__PURE__*/React.createElement(Dispatcher, {
437
+ callback: setup,
438
+ seed: normalizedSeed
439
+ }, /*#__PURE__*/React.createElement(OriginalWrapper, null, children)));
440
+ };
441
+ }
442
+
443
+ function Dispatcher(_ref6) {
444
+ var children = _ref6.children,
445
+ seed = _ref6.seed,
446
+ callback = _ref6.callback;
447
+ var dispatch = useEntryStateDispatch();
448
+ useEffect(function () {
449
+ if (callback) {
450
+ callback(dispatch, seed);
451
+ }
452
+ }, [dispatch, seed, callback]);
453
+ return children;
454
+ }
455
+
456
+ export { normalizeSeed, renderHookInEntry, renderInEntry };
@@ -0,0 +1,9 @@
1
+ @value breakpoint-sm: (min-width: 640px);
2
+ @value breakpoint-md: (min-width: 768px);
3
+ @value breakpoint-lg: (min-width: 1024px);
4
+ @value breakpoint-xl: (min-width: 1280px);
5
+
6
+ @value breakpoint-below-sm: (max-width: 639px);
7
+ @value breakpoint-below-md: (max-width: 767px);
8
+ @value breakpoint-below-lg: (max-width: 1023px);
9
+ @value breakpoint-below-xl: (max-width: 1279px);
@@ -0,0 +1,5 @@
1
+ @value lightContentSurfaceColor: var(--theme-light-content-surface-color, #fff);
2
+ @value darkContentSurfaceColor: var(--theme-dark-content-surface-color, #101010);
3
+
4
+ @value lightContentTextColor: var(--theme-light-content-text-color, #fff);
5
+ @value darkContentTextColor: var(--theme-dark-content-text-color, #222);
@@ -0,0 +1,9 @@
1
+ .DefaultNavigation-module_navigationBar__2RK0h{--default-navigation-bar-height:var(--theme-default-navigation-bar-height,50px);--default-navigation-scroller-top:var(--theme-default-navigation-scroller-top,0);--default-navigation-scroll-button-top:var(--theme-default-navigation-scroll-button-top,5px);--default-navigation-chapter-link-height:var(--theme-default-navigation-chapter-link-height,50px);--default-navigation-progress-indicator-height:var(--theme-default-navigation-progress-indicator-height,10px);font-family:var(--theme-widget-font-family);position:fixed;top:calc(-1*var(--default-navigation-bar-height));transition:top .15s;z-index:10000;width:100%;text-align:center;height:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.DefaultNavigation-module_navigationBarExpanded__C3sLq{top:0}.DefaultNavigation-module_navigationBarContentWrapper__3narH{position:relative;z-index:2;background-color:var(--theme-widget-surface-color);color:var(--theme-widget-on-surface-color);height:var(--default-navigation-bar-height);box-sizing:border-box;padding-top:var(--default-navigation-scroller-top)}.DefaultNavigation-module_menuIcon__2bb8s{position:absolute;top:0;left:12px;height:var(--default-navigation-bar-height)}.DefaultNavigation-module_contextIcons__2e65s{position:absolute;top:0;right:12px;display:flex}.DefaultNavigation-module_contextIcons__2e65s>*{pointer-events:auto}.DefaultNavigation-module_contextIcon__ELsqa{cursor:pointer;width:40px;height:var(--default-navigation-bar-height);color:var(--theme-widget-secondary-color);fill:currentcolor;stroke:currentColor}.DefaultNavigation-module_contextIcon__ELsqa svg{width:35px;height:35px;margin:7px 2px}.DefaultNavigation-module_contextIcon__ELsqa:hover,div:focus-within>.DefaultNavigation-module_contextIcon__ELsqa{color:var(--theme-widget-primary-color)}.DefaultNavigation-module_logo__3gUbx{top:0;left:15px;height:100%;max-width:15%}.DefaultNavigation-module_logo__3gUbx img{height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain}.DefaultNavigation-module_chapterList__3VoXX{padding:0;margin:0;list-style:none;display:flex}.DefaultNavigation-module_chapterListItem__1YF5e{position:relative;padding:0 5px;border-right:1px solid #e9e9e9}.DefaultNavigation-module_chapterListItem__1YF5e:last-of-type{border-right:none}.DefaultNavigation-module_navigationTooltip__26Fvn{opacity:1!important;box-shadow:0 0 .3125rem rgba(0,0,0,.2)}.DefaultNavigation-module_progressBar__1jvov{position:relative;background-color:hsla(0,0%,76.1%,.8);height:8px;width:100%}.DefaultNavigation-module_progressIndicator__2d_e3{position:absolute;top:0;left:0;width:0;height:100%;background-color:var(--theme-accent-color)}@media screen and (max-width:767px){.DefaultNavigation-module_logo__3gUbx{max-width:30%}.DefaultNavigation-module_hasChapters__3ab-r .DefaultNavigation-module_logo__3gUbx{left:65px}.DefaultNavigation-module_navigationChapters__3M6zh{display:block;position:fixed;top:calc(var(--default-navigation-bar-height) + var(--default-navigation-progress-indicator-height));left:0;background:var(--theme-widget-background-color);width:100vw;bottom:0;-ms-scroll-chaining:none;overscroll-behavior:contain;overflow:scroll}.DefaultNavigation-module_navigationChaptersHidden__2TrUo{display:none}.DefaultNavigation-module_chapterList__3VoXX{display:block;padding-top:var(--default-navigation-bar-height);box-sizing:border-box;min-height:101%}.DefaultNavigation-module_chapterListItem__1YF5e{width:80vw;padding:25px 10vw;border-right:none}.DefaultNavigation-module_chapterListItem__1YF5e:after,.DefaultNavigation-module_chapterListItem__1YF5e:before{display:table;content:" ";border-top:1px solid #646464;width:14%;margin:0 43%;transition:width .15s,margin .15s}.DefaultNavigation-module_chapterListItem__1YF5e:hover:after,.DefaultNavigation-module_chapterListItem__1YF5e:hover:before{border-top:1px solid var(--theme-widget-primary-color);width:80%;margin:0 10%}.DefaultNavigation-module_chapterListItem__1YF5e p{margin-top:0}.DefaultNavigation-module_progressBar__1jvov{height:var(--default-navigation-progress-indicator-height)}}@media print{.DefaultNavigation-module_navigationBar__2RK0h{position:relative;top:0;height:auto}.DefaultNavigation-module_logo__3gUbx{left:0}.DefaultNavigation-module_chapterList__3VoXX,.DefaultNavigation-module_contextIcons__2e65s,.DefaultNavigation-module_progressBar__1jvov{display:none}}@media (min-width:768px){.HamburgerIcon-module_burgerMenuIconContainer__3aBkk{display:none}}.HamburgerIcon-module_burgerMenuIcon__1WUV0{outline:none}
2
+
3
+ /*!
4
+ * Hamburgers
5
+ * @description Tasty CSS-animated hamburgers
6
+ * @author Jonathan Suh @jonsuh
7
+ * @site https://jonsuh.com/hamburgers
8
+ * @link https://github.com/jonsuh/hamburgers
9
+ */.HamburgerIcons-module_hamburger__SOreS{display:inline-block;cursor:pointer;transition-property:opacity,filter;transition-duration:.15s;transition-timing-function:linear;font:inherit;color:inherit;text-transform:none;background-color:transparent;border:0;margin:0;overflow:visible}.HamburgerIcons-module_hamburger__SOreS.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn,.HamburgerIcons-module_hamburger__SOreS.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:after,.HamburgerIcons-module_hamburger__SOreS.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:before{background-color:var(--theme-accent-color)}.HamburgerIcons-module_hamburger-box__10MR1{width:40px;height:24px;display:inline-block;position:relative;vertical-align:top}.HamburgerIcons-module_hamburger-inner__Wv7Dn{display:block;top:50%;margin-top:-2px}.HamburgerIcons-module_hamburger-inner__Wv7Dn,.HamburgerIcons-module_hamburger-inner__Wv7Dn:after,.HamburgerIcons-module_hamburger-inner__Wv7Dn:before{width:30px;height:4px;background-color:var(--theme-widget-primary-color);border-radius:4px;position:absolute;transition-property:transform;transition-duration:.15s;transition-timing-function:ease}.HamburgerIcons-module_hamburger-inner__Wv7Dn:after,.HamburgerIcons-module_hamburger-inner__Wv7Dn:before{content:"";display:block}.HamburgerIcons-module_hamburger-inner__Wv7Dn:before{top:-10px}.HamburgerIcons-module_hamburger-inner__Wv7Dn:after{bottom:-10px}.HamburgerIcons-module_hamburger--collapse__1xOkf .HamburgerIcons-module_hamburger-inner__Wv7Dn{top:auto;bottom:0;transition-duration:.13s;transition-delay:.13s;transition-timing-function:cubic-bezier(.55,.055,.675,.19)}.HamburgerIcons-module_hamburger--collapse__1xOkf .HamburgerIcons-module_hamburger-inner__Wv7Dn:after{top:-20px;transition:top .2s cubic-bezier(.33333,.66667,.66667,1) .2s,opacity .1s linear}.HamburgerIcons-module_hamburger--collapse__1xOkf .HamburgerIcons-module_hamburger-inner__Wv7Dn:before{transition:top .12s cubic-bezier(.33333,.66667,.66667,1) .2s,transform .13s cubic-bezier(.55,.055,.675,.19)}.HamburgerIcons-module_hamburger--collapse__1xOkf.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn{transform:translate3d(0,-10px,0) rotate(-45deg);transition-delay:.22s;transition-timing-function:cubic-bezier(.215,.61,.355,1)}.HamburgerIcons-module_hamburger--collapse__1xOkf.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:after{top:0;opacity:0;transition:top .2s cubic-bezier(.33333,0,.66667,.33333),opacity .1s linear .22s}.HamburgerIcons-module_hamburger--collapse__1xOkf.HamburgerIcons-module_is-active__2jpzX .HamburgerIcons-module_hamburger-inner__Wv7Dn:before{top:0;transform:rotate(-90deg);transition:top .1s cubic-bezier(.33333,0,.66667,.33333) .16s,transform .13s cubic-bezier(.215,.61,.355,1) .25s}.ChapterLink-module_chapterLink__3YspQ{line-height:42px;color:var(--theme-widget-primary-color);text-decoration:none;position:relative;display:block;font-family:inherit;font-weight:700;font-size:1rem;height:42px;white-space:nowrap;padding:0 10px;margin:4px 0}.ChapterLink-module_chapterLink__3YspQ:hover,.ChapterLink-module_chapterLinkActive__9i8SL{color:var(--theme-accent-color)}.ChapterLink-module_summary__2ZfRU{color:var(--theme-widget-on-background-color)}.ChapterLink-module_tooltipBubble__3VRUO{display:none}@media (min-width:768px){.ChapterLink-module_summary__2ZfRU{display:none}.ChapterLink-module_tooltipBubble__3VRUO{display:block}}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u{text-align:left}.LegalInfoMenu-module_scroller__3NPW_{overflow:auto;max-height:40vh;scrollbar-width:thin;margin-right:-5px;padding-right:5px}.LegalInfoMenu-module_scroller__3NPW_::-webkit-scrollbar{width:3px}.LegalInfoMenu-module_scroller__3NPW_::-webkit-scrollbar-thumb{background-color:var(--theme-widget-secondary-color);border-radius:2px}.LegalInfoMenu-module_scroller__3NPW_::-webkit-scrollbar-track{background-color:var(--theme-widget-surface-color)}.LegalInfoMenu-module_links__1kpsd{position:relative;padding-top:5px;padding-bottom:5px}.LegalInfoMenu-module_links__1kpsd:before{content:"";position:absolute;top:0;left:-5px;right:-5px;border-top:1px solid var(--theme-widget-primary-color);opacity:.1}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u:after{left:90%!important}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u p{margin:0 0 .5em}.LegalInfoMenu-module_legalInfoTooltip__Qmf8u a{color:var(--theme-accent-color)}.LegalInfoMenu-module_legalInfoLink__gkXaF{display:block;margin-top:5px}.SharingMenu-module_shareIcon__2iW2l svg{width:40px;height:40px;margin:5px 0}header .share svg{fill:var(--theme-widget-primary-color)}header .share:hover svg{fill:var(--theme-accent-color)}.SharingMenu-module_sharingTooltip__2Tyev{width:160px;padding:0!important}.SharingMenu-module_sharingTooltip__2Tyev:after{left:90%!important}.SharingMenu-module_shareLinkContainer__3-3W6{display:inline-block;width:80px;height:60px;cursor:pointer;color:transparent;text-align:center}.SharingMenu-module_shareLink__3PdRE{position:relative;color:var(--theme-widget-primary-color);text-decoration:none}.SharingMenu-module_shareLink__3PdRE:hover{color:var(--theme-accent-color)}.SharingMenu-module_shareIcon__2iW2l{width:80px;height:25px;margin-top:5px;margin-bottom:3px}.ToggleMuteButton-module_button__1ACmo{color:var(--theme-widget-primary-color)}.ToggleMuteButton-module_animate__pd1yK{position:relative}.ToggleMuteButton-module_animate__pd1yK:before{content:"";display:block;position:absolute;top:50%;left:50%;margin:-5px;z-index:-1;width:10px;height:10px;background-color:#ddd;border-radius:5px;-webkit-animation:ToggleMuteButton-module_pulse__2UN7Q .5s ease .2s 1;animation:ToggleMuteButton-module_pulse__2UN7Q .5s ease .2s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;pointer-events:none}@-webkit-keyframes ToggleMuteButton-module_pulse__2UN7Q{0%{opacity:.8}to{transform:scale(40);opacity:0}}@keyframes ToggleMuteButton-module_pulse__2UN7Q{0%{opacity:.8}to{transform:scale(40);opacity:0}}.SkipLinks-module_link__HMj9l{position:absolute;z-index:10000;top:-1000em;left:-1000em;display:block;border:1px solid #eee;border-radius:5px;padding:5px;background:#00375a;text-align:center;line-height:25px;color:#fff}.SkipLinks-module_link__HMj9l:focus{left:13.8%;top:13%}.utils-module_clip__34eot{clip:rect(0,auto,auto,0);-webkit-clip-path:polygon(0 0,100% 0,100% 100%,0 100%);clip-path:polygon(0 0,100% 0,100% 100%,0 100%)}.utils-module_unstyledButton__3rgne{border:0;padding:0;background-color:transparent;text-align:initial}.ScrollButton-module_button__1GKRF{position:absolute;top:var(--default-navigation-scroll-button-top);height:40px;width:20px;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease;z-index:1}.ScrollButton-module_button__1GKRF svg{width:18px;height:18px;color:var(--theme-widget-primary-color)}.ScrollButton-module_visible__29yco{opacity:1;visibility:visible}.ScrollButton-module_start__1XPra{right:80%}.ScrollButton-module_end__3PxQt{left:79%}@media screen and (min-width:768px){.Scroller-module_scroller__139cK{overflow:hidden;scroll-behavior:smooth;padding-bottom:90vh;pointer-events:none;margin:0 auto;width:58%}.Scroller-module_scroller__139cK>*{pointer-events:auto}@supports ((-webkit-clip-path:polygon(0 0)) or (clip-path:polygon(0 0))){.Scroller-module_scroller__139cK{width:auto;-webkit-clip-path:polygon(20% 0,79% 0,79% var(--default-navigation-chapter-link-height),100% var(--default-navigation-chapter-link-height),100% 400%,0 400%,0 var(--default-navigation-chapter-link-height),20% var(--default-navigation-chapter-link-height));clip-path:polygon(20% 0,79% 0,79% var(--default-navigation-chapter-link-height),100% var(--default-navigation-chapter-link-height),100% 400%,0 400%,0 var(--default-navigation-chapter-link-height),20% var(--default-navigation-chapter-link-height));-webkit-mask:linear-gradient(90deg,transparent 0,transparent 20%,#000 22%,#000 77%,transparent 79%,transparent) top,linear-gradient(90deg,#000 0,#000) bottom;mask:linear-gradient(90deg,transparent 0,transparent 20%,#000 22%,#000 77%,transparent 79%,transparent) top,linear-gradient(90deg,#000 0,#000) bottom;-webkit-mask-size:100% var(--default-navigation-chapter-link-height),100% calc(100% - var(--default-navigation-chapter-link-height));mask-size:100% var(--default-navigation-chapter-link-height),100% calc(100% - var(--default-navigation-chapter-link-height));-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.Scroller-module_inner__3dhuM{display:inline-block;margin:0 22%}}}