wagtail 6.1.2__py3-none-any.whl → 6.2__py3-none-any.whl

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.
Files changed (1387) hide show
  1. wagtail/__init__.py +1 -1
  2. wagtail/actions/copy_for_translation.py +15 -1
  3. wagtail/admin/checks.py +20 -30
  4. wagtail/admin/forms/pages.py +10 -0
  5. wagtail/admin/icons.py +43 -0
  6. wagtail/admin/locale/ar/LC_MESSAGES/django.mo +0 -0
  7. wagtail/admin/locale/ar/LC_MESSAGES/django.po +6 -9
  8. wagtail/admin/locale/ar/LC_MESSAGES/djangojs.mo +0 -0
  9. wagtail/admin/locale/ar/LC_MESSAGES/djangojs.po +8 -2
  10. wagtail/admin/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  11. wagtail/admin/locale/be/LC_MESSAGES/django.mo +0 -0
  12. wagtail/admin/locale/be/LC_MESSAGES/django.po +11 -14
  13. wagtail/admin/locale/be/LC_MESSAGES/djangojs.mo +0 -0
  14. wagtail/admin/locale/be/LC_MESSAGES/djangojs.po +11 -5
  15. wagtail/admin/locale/bg/LC_MESSAGES/django.po +1 -1
  16. wagtail/admin/locale/bn/LC_MESSAGES/django.po +1 -1
  17. wagtail/admin/locale/ca/LC_MESSAGES/django.mo +0 -0
  18. wagtail/admin/locale/ca/LC_MESSAGES/django.po +179 -102
  19. wagtail/admin/locale/ca/LC_MESSAGES/djangojs.mo +0 -0
  20. wagtail/admin/locale/ca/LC_MESSAGES/djangojs.po +13 -2
  21. wagtail/admin/locale/cs/LC_MESSAGES/django.mo +0 -0
  22. wagtail/admin/locale/cs/LC_MESSAGES/django.po +14 -21
  23. wagtail/admin/locale/cs/LC_MESSAGES/djangojs.mo +0 -0
  24. wagtail/admin/locale/cs/LC_MESSAGES/djangojs.po +8 -2
  25. wagtail/admin/locale/cy/LC_MESSAGES/django.mo +0 -0
  26. wagtail/admin/locale/cy/LC_MESSAGES/django.po +4 -1
  27. wagtail/admin/locale/da/LC_MESSAGES/django.mo +0 -0
  28. wagtail/admin/locale/da/LC_MESSAGES/django.po +1 -7
  29. wagtail/admin/locale/de/LC_MESSAGES/django.mo +0 -0
  30. wagtail/admin/locale/de/LC_MESSAGES/django.po +184 -100
  31. wagtail/admin/locale/de/LC_MESSAGES/djangojs.mo +0 -0
  32. wagtail/admin/locale/de/LC_MESSAGES/djangojs.po +14 -3
  33. wagtail/admin/locale/dv/LC_MESSAGES/django.mo +0 -0
  34. wagtail/admin/locale/dv/LC_MESSAGES/django.po +15 -54
  35. wagtail/admin/locale/dv/LC_MESSAGES/djangojs.mo +0 -0
  36. wagtail/admin/locale/dv/LC_MESSAGES/djangojs.po +6 -0
  37. wagtail/admin/locale/el/LC_MESSAGES/django.mo +0 -0
  38. wagtail/admin/locale/el/LC_MESSAGES/django.po +8 -14
  39. wagtail/admin/locale/el/LC_MESSAGES/djangojs.mo +0 -0
  40. wagtail/admin/locale/el/LC_MESSAGES/djangojs.po +8 -2
  41. wagtail/admin/locale/en/LC_MESSAGES/django.po +405 -295
  42. wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +21 -3
  43. wagtail/admin/locale/es/LC_MESSAGES/django.mo +0 -0
  44. wagtail/admin/locale/es/LC_MESSAGES/django.po +44 -55
  45. wagtail/admin/locale/es/LC_MESSAGES/djangojs.mo +0 -0
  46. wagtail/admin/locale/es/LC_MESSAGES/djangojs.po +8 -2
  47. wagtail/admin/locale/es_419/LC_MESSAGES/django.mo +0 -0
  48. wagtail/admin/locale/es_419/LC_MESSAGES/django.po +9 -12
  49. wagtail/admin/locale/es_VE/LC_MESSAGES/django.po +1 -1
  50. wagtail/admin/locale/et/LC_MESSAGES/django.mo +0 -0
  51. wagtail/admin/locale/et/LC_MESSAGES/django.po +18 -25
  52. wagtail/admin/locale/et/LC_MESSAGES/djangojs.mo +0 -0
  53. wagtail/admin/locale/et/LC_MESSAGES/djangojs.po +8 -2
  54. wagtail/admin/locale/eu/LC_MESSAGES/django.po +1 -1
  55. wagtail/admin/locale/fa/LC_MESSAGES/django.mo +0 -0
  56. wagtail/admin/locale/fa/LC_MESSAGES/django.po +123 -29
  57. wagtail/admin/locale/fa/LC_MESSAGES/djangojs.mo +0 -0
  58. wagtail/admin/locale/fa/LC_MESSAGES/djangojs.po +12 -2
  59. wagtail/admin/locale/fi/LC_MESSAGES/django.mo +0 -0
  60. wagtail/admin/locale/fi/LC_MESSAGES/django.po +65 -39
  61. wagtail/admin/locale/fi/LC_MESSAGES/djangojs.mo +0 -0
  62. wagtail/admin/locale/fi/LC_MESSAGES/djangojs.po +12 -1
  63. wagtail/admin/locale/fr/LC_MESSAGES/django.mo +0 -0
  64. wagtail/admin/locale/fr/LC_MESSAGES/django.po +269 -99
  65. wagtail/admin/locale/fr/LC_MESSAGES/djangojs.mo +0 -0
  66. wagtail/admin/locale/fr/LC_MESSAGES/djangojs.po +15 -2
  67. wagtail/admin/locale/gl/LC_MESSAGES/django.mo +0 -0
  68. wagtail/admin/locale/gl/LC_MESSAGES/django.po +182 -105
  69. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.mo +0 -0
  70. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.po +14 -3
  71. wagtail/admin/locale/he_IL/LC_MESSAGES/django.mo +0 -0
  72. wagtail/admin/locale/he_IL/LC_MESSAGES/django.po +1 -4
  73. wagtail/admin/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  74. wagtail/admin/locale/hr_HR/LC_MESSAGES/django.po +17 -25
  75. wagtail/admin/locale/hr_HR/LC_MESSAGES/djangojs.mo +0 -0
  76. wagtail/admin/locale/hr_HR/LC_MESSAGES/djangojs.po +10 -4
  77. wagtail/admin/locale/ht/LC_MESSAGES/django.po +1 -1
  78. wagtail/admin/locale/hu/LC_MESSAGES/django.mo +0 -0
  79. wagtail/admin/locale/hu/LC_MESSAGES/django.po +52 -102
  80. wagtail/admin/locale/hu/LC_MESSAGES/djangojs.mo +0 -0
  81. wagtail/admin/locale/hu/LC_MESSAGES/djangojs.po +8 -2
  82. wagtail/admin/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  83. wagtail/admin/locale/id_ID/LC_MESSAGES/django.po +10 -13
  84. wagtail/admin/locale/id_ID/LC_MESSAGES/djangojs.mo +0 -0
  85. wagtail/admin/locale/id_ID/LC_MESSAGES/djangojs.po +8 -2
  86. wagtail/admin/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  87. wagtail/admin/locale/is_IS/LC_MESSAGES/django.po +60 -98
  88. wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.mo +0 -0
  89. wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.po +8 -2
  90. wagtail/admin/locale/it/LC_MESSAGES/django.mo +0 -0
  91. wagtail/admin/locale/it/LC_MESSAGES/django.po +63 -116
  92. wagtail/admin/locale/it/LC_MESSAGES/djangojs.mo +0 -0
  93. wagtail/admin/locale/it/LC_MESSAGES/djangojs.po +8 -2
  94. wagtail/admin/locale/ja/LC_MESSAGES/django.mo +0 -0
  95. wagtail/admin/locale/ja/LC_MESSAGES/django.po +6 -9
  96. wagtail/admin/locale/ja/LC_MESSAGES/djangojs.mo +0 -0
  97. wagtail/admin/locale/ja/LC_MESSAGES/djangojs.po +8 -2
  98. wagtail/admin/locale/ka/LC_MESSAGES/django.po +1 -1
  99. wagtail/admin/locale/ko/LC_MESSAGES/django.mo +0 -0
  100. wagtail/admin/locale/ko/LC_MESSAGES/django.po +22 -33
  101. wagtail/admin/locale/ko/LC_MESSAGES/djangojs.mo +0 -0
  102. wagtail/admin/locale/ko/LC_MESSAGES/djangojs.po +8 -2
  103. wagtail/admin/locale/lt/LC_MESSAGES/django.mo +0 -0
  104. wagtail/admin/locale/lt/LC_MESSAGES/django.po +8 -17
  105. wagtail/admin/locale/lt/LC_MESSAGES/djangojs.mo +0 -0
  106. wagtail/admin/locale/lt/LC_MESSAGES/djangojs.po +8 -1
  107. wagtail/admin/locale/lv/LC_MESSAGES/django.mo +0 -0
  108. wagtail/admin/locale/lv/LC_MESSAGES/django.po +1 -7
  109. wagtail/admin/locale/lv/LC_MESSAGES/djangojs.mo +0 -0
  110. wagtail/admin/locale/lv/LC_MESSAGES/djangojs.po +8 -2
  111. wagtail/admin/locale/mi/LC_MESSAGES/django.mo +0 -0
  112. wagtail/admin/locale/mi/LC_MESSAGES/django.po +4 -4
  113. wagtail/admin/locale/mi/LC_MESSAGES/djangojs.mo +0 -0
  114. wagtail/admin/locale/mi/LC_MESSAGES/djangojs.po +8 -2
  115. wagtail/admin/locale/mn/LC_MESSAGES/django.mo +0 -0
  116. wagtail/admin/locale/mn/LC_MESSAGES/django.po +4 -7
  117. wagtail/admin/locale/mn/LC_MESSAGES/djangojs.mo +0 -0
  118. wagtail/admin/locale/mn/LC_MESSAGES/djangojs.po +8 -2
  119. wagtail/admin/locale/my/LC_MESSAGES/django.po +1 -1
  120. wagtail/admin/locale/nb/LC_MESSAGES/django.mo +0 -0
  121. wagtail/admin/locale/nb/LC_MESSAGES/django.po +26 -29
  122. wagtail/admin/locale/nb/LC_MESSAGES/djangojs.mo +0 -0
  123. wagtail/admin/locale/nb/LC_MESSAGES/djangojs.po +8 -2
  124. wagtail/admin/locale/nl/LC_MESSAGES/django.mo +0 -0
  125. wagtail/admin/locale/nl/LC_MESSAGES/django.po +178 -92
  126. wagtail/admin/locale/nl/LC_MESSAGES/djangojs.mo +0 -0
  127. wagtail/admin/locale/nl/LC_MESSAGES/djangojs.po +14 -3
  128. wagtail/admin/locale/pl/LC_MESSAGES/django.mo +0 -0
  129. wagtail/admin/locale/pl/LC_MESSAGES/django.po +53 -104
  130. wagtail/admin/locale/pl/LC_MESSAGES/djangojs.mo +0 -0
  131. wagtail/admin/locale/pl/LC_MESSAGES/djangojs.po +11 -5
  132. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  133. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.po +53 -84
  134. wagtail/admin/locale/pt_BR/LC_MESSAGES/djangojs.mo +0 -0
  135. wagtail/admin/locale/pt_BR/LC_MESSAGES/djangojs.po +8 -2
  136. wagtail/admin/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  137. wagtail/admin/locale/pt_PT/LC_MESSAGES/django.po +25 -36
  138. wagtail/admin/locale/pt_PT/LC_MESSAGES/djangojs.mo +0 -0
  139. wagtail/admin/locale/pt_PT/LC_MESSAGES/djangojs.po +8 -2
  140. wagtail/admin/locale/ro/LC_MESSAGES/django.mo +0 -0
  141. wagtail/admin/locale/ro/LC_MESSAGES/django.po +55 -107
  142. wagtail/admin/locale/ro/LC_MESSAGES/djangojs.mo +0 -0
  143. wagtail/admin/locale/ro/LC_MESSAGES/djangojs.po +8 -1
  144. wagtail/admin/locale/ru/LC_MESSAGES/django.mo +0 -0
  145. wagtail/admin/locale/ru/LC_MESSAGES/django.po +198 -115
  146. wagtail/admin/locale/ru/LC_MESSAGES/djangojs.mo +0 -0
  147. wagtail/admin/locale/ru/LC_MESSAGES/djangojs.po +19 -5
  148. wagtail/admin/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  149. wagtail/admin/locale/sk_SK/LC_MESSAGES/django.po +19 -12
  150. wagtail/admin/locale/sk_SK/LC_MESSAGES/djangojs.mo +0 -0
  151. wagtail/admin/locale/sk_SK/LC_MESSAGES/djangojs.po +8 -2
  152. wagtail/admin/locale/sl/LC_MESSAGES/django.mo +0 -0
  153. wagtail/admin/locale/sl/LC_MESSAGES/django.po +93 -97
  154. wagtail/admin/locale/sl/LC_MESSAGES/djangojs.mo +0 -0
  155. wagtail/admin/locale/sl/LC_MESSAGES/djangojs.po +10 -4
  156. wagtail/admin/locale/sv/LC_MESSAGES/django.mo +0 -0
  157. wagtail/admin/locale/sv/LC_MESSAGES/django.po +121 -57
  158. wagtail/admin/locale/sv/LC_MESSAGES/djangojs.mo +0 -0
  159. wagtail/admin/locale/sv/LC_MESSAGES/djangojs.po +12 -3
  160. wagtail/admin/locale/tet/LC_MESSAGES/django.mo +0 -0
  161. wagtail/admin/locale/tet/LC_MESSAGES/django.po +6 -9
  162. wagtail/admin/locale/tet/LC_MESSAGES/djangojs.mo +0 -0
  163. wagtail/admin/locale/tet/LC_MESSAGES/djangojs.po +8 -2
  164. wagtail/admin/locale/th/LC_MESSAGES/django.mo +0 -0
  165. wagtail/admin/locale/th/LC_MESSAGES/django.po +8 -11
  166. wagtail/admin/locale/th/LC_MESSAGES/djangojs.mo +0 -0
  167. wagtail/admin/locale/th/LC_MESSAGES/djangojs.po +8 -2
  168. wagtail/admin/locale/tr/LC_MESSAGES/django.mo +0 -0
  169. wagtail/admin/locale/tr/LC_MESSAGES/django.po +8 -11
  170. wagtail/admin/locale/tr/LC_MESSAGES/djangojs.mo +0 -0
  171. wagtail/admin/locale/tr/LC_MESSAGES/djangojs.po +8 -2
  172. wagtail/admin/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  173. wagtail/admin/locale/tr_TR/LC_MESSAGES/django.po +8 -11
  174. wagtail/admin/locale/tr_TR/LC_MESSAGES/djangojs.mo +0 -0
  175. wagtail/admin/locale/tr_TR/LC_MESSAGES/djangojs.po +8 -2
  176. wagtail/admin/locale/uk/LC_MESSAGES/django.mo +0 -0
  177. wagtail/admin/locale/uk/LC_MESSAGES/django.po +15 -26
  178. wagtail/admin/locale/uk/LC_MESSAGES/djangojs.mo +0 -0
  179. wagtail/admin/locale/uk/LC_MESSAGES/djangojs.po +8 -2
  180. wagtail/admin/locale/vi/LC_MESSAGES/django.po +1 -1
  181. wagtail/admin/locale/zh/LC_MESSAGES/django.mo +0 -0
  182. wagtail/admin/locale/zh/LC_MESSAGES/django.po +1 -4
  183. wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  184. wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.po +87 -28
  185. wagtail/admin/locale/zh_Hans/LC_MESSAGES/djangojs.mo +0 -0
  186. wagtail/admin/locale/zh_Hans/LC_MESSAGES/djangojs.po +8 -2
  187. wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  188. wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.po +6 -15
  189. wagtail/admin/locale/zh_Hant/LC_MESSAGES/djangojs.mo +0 -0
  190. wagtail/admin/locale/zh_Hant/LC_MESSAGES/djangojs.po +8 -2
  191. wagtail/admin/menu.py +2 -2
  192. wagtail/admin/migrations/0004_editingsession.py +57 -0
  193. wagtail/admin/migrations/0005_editingsession_is_editing.py +18 -0
  194. wagtail/admin/models.py +36 -3
  195. wagtail/admin/rich_text/editors/draftail/__init__.py +2 -20
  196. wagtail/admin/static/wagtailadmin/css/core.css +1 -1
  197. wagtail/admin/static/wagtailadmin/js/bulk-actions.js +1 -1
  198. wagtail/admin/static/wagtailadmin/js/chooser-modal.js +1 -1
  199. wagtail/admin/static/wagtailadmin/js/chooser-widget-telepath.js +1 -1
  200. wagtail/admin/static/wagtailadmin/js/chooser-widget.js +1 -1
  201. wagtail/admin/static/wagtailadmin/js/comments.js +1 -1
  202. wagtail/admin/static/wagtailadmin/js/core.js +1 -1
  203. wagtail/admin/static/wagtailadmin/js/date-time-chooser.js +1 -1
  204. wagtail/admin/static/wagtailadmin/js/draftail.js +1 -1
  205. wagtail/admin/static/wagtailadmin/js/expanding-formset.js +1 -1
  206. wagtail/admin/static/wagtailadmin/js/filtered-select.js +1 -1
  207. wagtail/admin/static/wagtailadmin/js/modal-workflow.js +1 -1
  208. wagtail/admin/static/wagtailadmin/js/page-chooser-modal.js +1 -1
  209. wagtail/admin/static/wagtailadmin/js/page-chooser-telepath.js +1 -1
  210. wagtail/admin/static/wagtailadmin/js/page-chooser.js +1 -1
  211. wagtail/admin/static/wagtailadmin/js/preview-panel.js +2 -1
  212. wagtail/admin/static/wagtailadmin/js/preview-panel.js.LICENSE.txt +11 -0
  213. wagtail/admin/static/wagtailadmin/js/privacy-switch.js +1 -1
  214. wagtail/admin/static/wagtailadmin/js/sidebar.js +1 -1
  215. wagtail/admin/static/wagtailadmin/js/task-chooser-modal.js +1 -1
  216. wagtail/admin/static/wagtailadmin/js/task-chooser.js +1 -1
  217. wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
  218. wagtail/admin/static/wagtailadmin/js/telepath/widgets.js +1 -1
  219. wagtail/admin/static/wagtailadmin/js/userbar.js +2 -1
  220. wagtail/admin/static/wagtailadmin/js/userbar.js.LICENSE.txt +11 -0
  221. wagtail/admin/static/wagtailadmin/js/vendor.js +1 -1
  222. wagtail/admin/static/wagtailadmin/js/vendor.js.LICENSE.txt +0 -12
  223. wagtail/admin/static/wagtailadmin/js/wagtailadmin.js +1 -1
  224. wagtail/admin/static/wagtailadmin/js/workflow-action.js +1 -1
  225. wagtail/admin/templates/wagtailadmin/collection_privacy/ancestor_privacy.html +2 -6
  226. wagtail/admin/templates/wagtailadmin/generic/index_results.html +1 -17
  227. wagtail/admin/templates/wagtailadmin/generic/listing_results.html +20 -1
  228. wagtail/admin/templates/wagtailadmin/home/workflow_objects_to_moderate.html +2 -11
  229. wagtail/admin/templates/wagtailadmin/page_privacy/ancestor_privacy.html +2 -6
  230. wagtail/admin/templates/wagtailadmin/page_privacy/no_privacy.html +2 -0
  231. wagtail/admin/templates/wagtailadmin/pages/_editor_js.html +0 -1
  232. wagtail/admin/templates/wagtailadmin/pages/action_menu/menu.html +1 -1
  233. wagtail/admin/templates/wagtailadmin/reports/aging_pages_results.html +54 -0
  234. wagtail/admin/templates/wagtailadmin/reports/base_page_report.html +1 -17
  235. wagtail/admin/templates/wagtailadmin/reports/base_page_report_results.html +10 -0
  236. wagtail/admin/templates/wagtailadmin/reports/base_report.html +1 -40
  237. wagtail/admin/templates/wagtailadmin/reports/base_report_results.html +1 -0
  238. wagtail/admin/templates/wagtailadmin/reports/listing/_list_page_report.html +21 -27
  239. wagtail/admin/templates/wagtailadmin/reports/listing/_list_page_types_usage.html +48 -54
  240. wagtail/admin/templates/wagtailadmin/reports/{locked_pages.html → locked_pages_results.html} +3 -3
  241. wagtail/admin/templates/wagtailadmin/reports/page_types_usage_results.html +10 -0
  242. wagtail/admin/templates/wagtailadmin/reports/site_history_results.html +53 -0
  243. wagtail/admin/templates/wagtailadmin/reports/workflow_results.html +74 -0
  244. wagtail/admin/templates/wagtailadmin/reports/workflow_tasks_results.html +56 -0
  245. wagtail/admin/templates/wagtailadmin/shared/_workflow_init.html +8 -44
  246. wagtail/admin/templates/wagtailadmin/shared/avatar.html +11 -1
  247. wagtail/admin/templates/wagtailadmin/shared/dialog/dialog.html +5 -4
  248. wagtail/admin/templates/wagtailadmin/shared/dropdown/dropdown_button.html +2 -1
  249. wagtail/admin/templates/wagtailadmin/shared/editing_sessions/list.html +132 -0
  250. wagtail/admin/templates/wagtailadmin/shared/editing_sessions/module.html +44 -0
  251. wagtail/admin/templates/wagtailadmin/shared/headers/slim_header.html +7 -1
  252. wagtail/admin/templates/wagtailadmin/shared/page_status_tag_new.html +1 -1
  253. wagtail/admin/templates/wagtailadmin/shared/side_panels/checks.html +37 -16
  254. wagtail/admin/templates/wagtailadmin/skeleton.html +1 -1
  255. wagtail/admin/templates/wagtailadmin/userbar/item_accessibility.html +9 -11
  256. wagtail/admin/templatetags/wagtailadmin_tags.py +13 -2
  257. wagtail/admin/tests/formats/en/__init__.py +0 -0
  258. wagtail/admin/tests/formats/en/formats.py +1 -0
  259. wagtail/admin/tests/pages/test_create_page.py +47 -0
  260. wagtail/admin/tests/pages/test_edit_page.py +10 -8
  261. wagtail/admin/tests/pages/test_parent_page_chooser_view.py +45 -1
  262. wagtail/admin/tests/test_checks.py +53 -3
  263. wagtail/admin/tests/test_collections_views.py +62 -1
  264. wagtail/admin/tests/test_edit_handlers.py +37 -0
  265. wagtail/admin/tests/test_editing_sessions.py +1333 -0
  266. wagtail/admin/tests/test_icon_sprite.py +12 -21
  267. wagtail/admin/tests/test_page_chooser.py +309 -7
  268. wagtail/admin/tests/test_privacy.py +82 -0
  269. wagtail/admin/tests/test_reports_views.py +464 -70
  270. wagtail/admin/tests/test_userbar.py +93 -6
  271. wagtail/admin/tests/test_workflows.py +223 -33
  272. wagtail/admin/tests/viewsets/test_model_viewset.py +151 -2
  273. wagtail/admin/ui/editing_sessions.py +47 -0
  274. wagtail/admin/urls/__init__.py +9 -15
  275. wagtail/admin/urls/editing_sessions.py +17 -0
  276. wagtail/admin/urls/reports.py +33 -1
  277. wagtail/admin/userbar.py +77 -20
  278. wagtail/admin/views/chooser.py +49 -22
  279. wagtail/admin/views/collections.py +0 -11
  280. wagtail/admin/views/editing_sessions.py +191 -0
  281. wagtail/admin/views/generic/__init__.py +1 -0
  282. wagtail/admin/views/generic/base.py +3 -2
  283. wagtail/admin/views/generic/history.py +9 -3
  284. wagtail/admin/views/generic/mixins.py +43 -3
  285. wagtail/admin/views/generic/models.py +46 -72
  286. wagtail/admin/views/generic/permissions.py +20 -10
  287. wagtail/admin/views/home.py +2 -31
  288. wagtail/admin/views/page_privacy.py +20 -5
  289. wagtail/admin/views/pages/choose_parent.py +62 -0
  290. wagtail/admin/views/pages/edit.py +27 -0
  291. wagtail/admin/views/reports/aging_pages.py +6 -10
  292. wagtail/admin/views/reports/audit_logging.py +13 -42
  293. wagtail/admin/views/reports/base.py +31 -4
  294. wagtail/admin/views/reports/locked_pages.py +5 -8
  295. wagtail/admin/views/reports/page_types_usage.py +6 -10
  296. wagtail/admin/views/reports/workflows.py +36 -12
  297. wagtail/admin/viewsets/base.py +8 -3
  298. wagtail/admin/viewsets/chooser.py +1 -1
  299. wagtail/admin/viewsets/model.py +26 -1
  300. wagtail/admin/wagtail_hooks.py +2 -1
  301. wagtail/api/v2/filters.py +6 -0
  302. wagtail/api/v2/tests/test_documents.py +1 -1
  303. wagtail/api/v2/tests/test_images.py +1 -1
  304. wagtail/api/v2/tests/test_pages.py +11 -1
  305. wagtail/api/v2/utils.py +2 -2
  306. wagtail/blocks/base.py +42 -15
  307. wagtail/blocks/definition_lookup.py +85 -0
  308. wagtail/blocks/list_block.py +24 -0
  309. wagtail/blocks/migrations/migrate_operation.py +2 -0
  310. wagtail/blocks/stream_block.py +19 -0
  311. wagtail/blocks/struct_block.py +19 -0
  312. wagtail/contrib/forms/locale/af/LC_MESSAGES/django.po +1 -1
  313. wagtail/contrib/forms/locale/ar/LC_MESSAGES/django.po +1 -1
  314. wagtail/contrib/forms/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  315. wagtail/contrib/forms/locale/be/LC_MESSAGES/django.po +4 -4
  316. wagtail/contrib/forms/locale/bg/LC_MESSAGES/django.po +1 -1
  317. wagtail/contrib/forms/locale/bn/LC_MESSAGES/django.po +1 -1
  318. wagtail/contrib/forms/locale/ca/LC_MESSAGES/django.po +1 -1
  319. wagtail/contrib/forms/locale/cs/LC_MESSAGES/django.po +1 -1
  320. wagtail/contrib/forms/locale/cy/LC_MESSAGES/django.po +1 -1
  321. wagtail/contrib/forms/locale/da/LC_MESSAGES/django.po +1 -1
  322. wagtail/contrib/forms/locale/de/LC_MESSAGES/django.po +1 -1
  323. wagtail/contrib/forms/locale/dv/LC_MESSAGES/django.po +1 -1
  324. wagtail/contrib/forms/locale/el/LC_MESSAGES/django.po +1 -1
  325. wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +1 -1
  326. wagtail/contrib/forms/locale/es/LC_MESSAGES/django.po +1 -1
  327. wagtail/contrib/forms/locale/es_419/LC_MESSAGES/django.po +1 -1
  328. wagtail/contrib/forms/locale/et/LC_MESSAGES/django.po +1 -1
  329. wagtail/contrib/forms/locale/eu/LC_MESSAGES/django.po +1 -1
  330. wagtail/contrib/forms/locale/fa/LC_MESSAGES/django.po +1 -1
  331. wagtail/contrib/forms/locale/fi/LC_MESSAGES/django.po +1 -1
  332. wagtail/contrib/forms/locale/fr/LC_MESSAGES/django.po +1 -1
  333. wagtail/contrib/forms/locale/gl/LC_MESSAGES/django.po +1 -1
  334. wagtail/contrib/forms/locale/he_IL/LC_MESSAGES/django.po +1 -1
  335. wagtail/contrib/forms/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  336. wagtail/contrib/forms/locale/ht/LC_MESSAGES/django.po +1 -1
  337. wagtail/contrib/forms/locale/hu/LC_MESSAGES/django.po +1 -1
  338. wagtail/contrib/forms/locale/hy/LC_MESSAGES/django.po +1 -1
  339. wagtail/contrib/forms/locale/id_ID/LC_MESSAGES/django.po +1 -1
  340. wagtail/contrib/forms/locale/is_IS/LC_MESSAGES/django.po +1 -1
  341. wagtail/contrib/forms/locale/it/LC_MESSAGES/django.po +1 -1
  342. wagtail/contrib/forms/locale/ja/LC_MESSAGES/django.po +1 -1
  343. wagtail/contrib/forms/locale/ka/LC_MESSAGES/django.po +1 -1
  344. wagtail/contrib/forms/locale/ko/LC_MESSAGES/django.po +1 -1
  345. wagtail/contrib/forms/locale/lt/LC_MESSAGES/django.po +1 -1
  346. wagtail/contrib/forms/locale/lv/LC_MESSAGES/django.po +1 -1
  347. wagtail/contrib/forms/locale/mi/LC_MESSAGES/django.po +1 -1
  348. wagtail/contrib/forms/locale/mn/LC_MESSAGES/django.po +1 -1
  349. wagtail/contrib/forms/locale/my/LC_MESSAGES/django.po +1 -1
  350. wagtail/contrib/forms/locale/nb/LC_MESSAGES/django.po +1 -1
  351. wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.po +1 -1
  352. wagtail/contrib/forms/locale/pl/LC_MESSAGES/django.po +4 -4
  353. wagtail/contrib/forms/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  354. wagtail/contrib/forms/locale/pt_BR/LC_MESSAGES/django.po +4 -4
  355. wagtail/contrib/forms/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  356. wagtail/contrib/forms/locale/ro/LC_MESSAGES/django.po +1 -1
  357. wagtail/contrib/forms/locale/ru/LC_MESSAGES/django.po +4 -4
  358. wagtail/contrib/forms/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  359. wagtail/contrib/forms/locale/sl/LC_MESSAGES/django.po +3 -3
  360. wagtail/contrib/forms/locale/sv/LC_MESSAGES/django.po +1 -1
  361. wagtail/contrib/forms/locale/tet/LC_MESSAGES/django.po +1 -1
  362. wagtail/contrib/forms/locale/th/LC_MESSAGES/django.po +1 -1
  363. wagtail/contrib/forms/locale/tr/LC_MESSAGES/django.po +1 -1
  364. wagtail/contrib/forms/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  365. wagtail/contrib/forms/locale/uk/LC_MESSAGES/django.po +1 -1
  366. wagtail/contrib/forms/locale/vi/LC_MESSAGES/django.po +1 -1
  367. wagtail/contrib/forms/locale/zh/LC_MESSAGES/django.po +1 -1
  368. wagtail/contrib/forms/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  369. wagtail/contrib/forms/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  370. wagtail/contrib/frontend_cache/backends/__init__.py +5 -0
  371. wagtail/contrib/frontend_cache/backends/azure.py +179 -0
  372. wagtail/contrib/frontend_cache/backends/base.py +28 -0
  373. wagtail/contrib/frontend_cache/backends/cloudflare.py +114 -0
  374. wagtail/contrib/frontend_cache/backends/cloudfront.py +99 -0
  375. wagtail/contrib/frontend_cache/backends/http.py +64 -0
  376. wagtail/contrib/frontend_cache/tests.py +59 -17
  377. wagtail/contrib/frontend_cache/utils.py +26 -8
  378. wagtail/contrib/redirects/filters.py +15 -1
  379. wagtail/contrib/redirects/locale/af/LC_MESSAGES/django.po +1 -1
  380. wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po +5 -5
  381. wagtail/contrib/redirects/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  382. wagtail/contrib/redirects/locale/be/LC_MESSAGES/django.po +4 -4
  383. wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.po +5 -5
  384. wagtail/contrib/redirects/locale/bn/LC_MESSAGES/django.po +1 -1
  385. wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.po +5 -5
  386. wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.po +5 -5
  387. wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.po +7 -7
  388. wagtail/contrib/redirects/locale/da/LC_MESSAGES/django.po +1 -1
  389. wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.po +6 -5
  390. wagtail/contrib/redirects/locale/dv/LC_MESSAGES/django.po +1 -1
  391. wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.po +8 -8
  392. wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +37 -72
  393. wagtail/contrib/redirects/locale/en_IN/LC_MESSAGES/django.po +1 -1
  394. wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.po +7 -7
  395. wagtail/contrib/redirects/locale/es_419/LC_MESSAGES/django.po +1 -1
  396. wagtail/contrib/redirects/locale/es_VE/LC_MESSAGES/django.po +1 -1
  397. wagtail/contrib/redirects/locale/et/LC_MESSAGES/django.po +5 -5
  398. wagtail/contrib/redirects/locale/eu/LC_MESSAGES/django.po +1 -1
  399. wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.mo +0 -0
  400. wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.po +19 -6
  401. wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.po +7 -7
  402. wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.po +5 -5
  403. wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.po +5 -5
  404. wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.po +1 -1
  405. wagtail/contrib/redirects/locale/hi/LC_MESSAGES/django.po +1 -1
  406. wagtail/contrib/redirects/locale/hr_HR/LC_MESSAGES/django.po +9 -9
  407. wagtail/contrib/redirects/locale/ht/LC_MESSAGES/django.po +1 -1
  408. wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.po +7 -7
  409. wagtail/contrib/redirects/locale/hy/LC_MESSAGES/django.po +1 -1
  410. wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.po +5 -5
  411. wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.po +7 -7
  412. wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.po +5 -5
  413. wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.po +3 -3
  414. wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.po +1 -1
  415. wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.po +5 -5
  416. wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.po +5 -5
  417. wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.po +1 -1
  418. wagtail/contrib/redirects/locale/mi/LC_MESSAGES/django.po +1 -1
  419. wagtail/contrib/redirects/locale/mn/LC_MESSAGES/django.po +5 -5
  420. wagtail/contrib/redirects/locale/my/LC_MESSAGES/django.po +1 -1
  421. wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.po +5 -5
  422. wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.po +5 -5
  423. wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.po +10 -10
  424. wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.po +6 -6
  425. wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.po +5 -5
  426. wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.po +5 -5
  427. wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.po +8 -8
  428. wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.po +5 -5
  429. wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.po +7 -7
  430. wagtail/contrib/redirects/locale/sr/LC_MESSAGES/django.po +3 -3
  431. wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.po +5 -5
  432. wagtail/contrib/redirects/locale/ta/LC_MESSAGES/django.po +1 -1
  433. wagtail/contrib/redirects/locale/tet/LC_MESSAGES/django.po +5 -5
  434. wagtail/contrib/redirects/locale/th/LC_MESSAGES/django.po +5 -5
  435. wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.po +5 -5
  436. wagtail/contrib/redirects/locale/tr_TR/LC_MESSAGES/django.po +5 -5
  437. wagtail/contrib/redirects/locale/uk/LC_MESSAGES/django.po +5 -5
  438. wagtail/contrib/redirects/locale/vi/LC_MESSAGES/django.po +1 -1
  439. wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.po +5 -5
  440. wagtail/contrib/redirects/locale/zh_Hans/LC_MESSAGES/django.po +5 -5
  441. wagtail/contrib/redirects/locale/zh_Hant/LC_MESSAGES/django.po +5 -5
  442. wagtail/contrib/redirects/models.py +6 -5
  443. wagtail/contrib/redirects/templates/wagtailredirects/edit.html +1 -38
  444. wagtail/contrib/redirects/tests/test_redirects.py +141 -1
  445. wagtail/contrib/redirects/urls.py +1 -2
  446. wagtail/contrib/redirects/views.py +39 -80
  447. wagtail/contrib/routable_page/models.py +6 -4
  448. wagtail/contrib/routable_page/tests.py +11 -0
  449. wagtail/contrib/search_promotions/locale/af/LC_MESSAGES/django.po +1 -1
  450. wagtail/contrib/search_promotions/locale/ar/LC_MESSAGES/django.po +5 -5
  451. wagtail/contrib/search_promotions/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  452. wagtail/contrib/search_promotions/locale/be/LC_MESSAGES/django.po +8 -8
  453. wagtail/contrib/search_promotions/locale/bg/LC_MESSAGES/django.po +1 -1
  454. wagtail/contrib/search_promotions/locale/bn/LC_MESSAGES/django.po +1 -1
  455. wagtail/contrib/search_promotions/locale/ca/LC_MESSAGES/django.po +9 -9
  456. wagtail/contrib/search_promotions/locale/cs/LC_MESSAGES/django.po +3 -3
  457. wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.po +5 -5
  458. wagtail/contrib/search_promotions/locale/da/LC_MESSAGES/django.po +1 -1
  459. wagtail/contrib/search_promotions/locale/de/LC_MESSAGES/django.po +7 -7
  460. wagtail/contrib/search_promotions/locale/dv/LC_MESSAGES/django.po +1 -1
  461. wagtail/contrib/search_promotions/locale/el/LC_MESSAGES/django.po +5 -5
  462. wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +1 -1
  463. wagtail/contrib/search_promotions/locale/en_IN/LC_MESSAGES/django.po +1 -1
  464. wagtail/contrib/search_promotions/locale/es/LC_MESSAGES/django.po +7 -7
  465. wagtail/contrib/search_promotions/locale/es_419/LC_MESSAGES/django.po +1 -1
  466. wagtail/contrib/search_promotions/locale/es_VE/LC_MESSAGES/django.po +1 -1
  467. wagtail/contrib/search_promotions/locale/et/LC_MESSAGES/django.po +5 -5
  468. wagtail/contrib/search_promotions/locale/eu/LC_MESSAGES/django.po +1 -1
  469. wagtail/contrib/search_promotions/locale/fa/LC_MESSAGES/django.po +5 -5
  470. wagtail/contrib/search_promotions/locale/fi/LC_MESSAGES/django.po +7 -7
  471. wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.mo +0 -0
  472. wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.po +10 -7
  473. wagtail/contrib/search_promotions/locale/gl/LC_MESSAGES/django.po +7 -7
  474. wagtail/contrib/search_promotions/locale/he_IL/LC_MESSAGES/django.po +1 -1
  475. wagtail/contrib/search_promotions/locale/hi/LC_MESSAGES/django.po +1 -1
  476. wagtail/contrib/search_promotions/locale/hr_HR/LC_MESSAGES/django.po +9 -9
  477. wagtail/contrib/search_promotions/locale/ht/LC_MESSAGES/django.po +1 -1
  478. wagtail/contrib/search_promotions/locale/hu/LC_MESSAGES/django.po +5 -5
  479. wagtail/contrib/search_promotions/locale/id_ID/LC_MESSAGES/django.po +5 -5
  480. wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.po +9 -9
  481. wagtail/contrib/search_promotions/locale/it/LC_MESSAGES/django.po +7 -7
  482. wagtail/contrib/search_promotions/locale/ja/LC_MESSAGES/django.po +5 -5
  483. wagtail/contrib/search_promotions/locale/ka/LC_MESSAGES/django.po +1 -1
  484. wagtail/contrib/search_promotions/locale/ko/LC_MESSAGES/django.po +5 -5
  485. wagtail/contrib/search_promotions/locale/lt/LC_MESSAGES/django.po +7 -7
  486. wagtail/contrib/search_promotions/locale/lv/LC_MESSAGES/django.po +1 -1
  487. wagtail/contrib/search_promotions/locale/mi/LC_MESSAGES/django.po +1 -1
  488. wagtail/contrib/search_promotions/locale/mn/LC_MESSAGES/django.po +1 -1
  489. wagtail/contrib/search_promotions/locale/my/LC_MESSAGES/django.po +1 -1
  490. wagtail/contrib/search_promotions/locale/nb/LC_MESSAGES/django.po +5 -5
  491. wagtail/contrib/search_promotions/locale/nl/LC_MESSAGES/django.po +7 -7
  492. wagtail/contrib/search_promotions/locale/pl/LC_MESSAGES/django.po +10 -10
  493. wagtail/contrib/search_promotions/locale/pt_BR/LC_MESSAGES/django.po +5 -5
  494. wagtail/contrib/search_promotions/locale/pt_PT/LC_MESSAGES/django.po +5 -5
  495. wagtail/contrib/search_promotions/locale/ro/LC_MESSAGES/django.po +5 -5
  496. wagtail/contrib/search_promotions/locale/ru/LC_MESSAGES/django.po +10 -10
  497. wagtail/contrib/search_promotions/locale/sk_SK/LC_MESSAGES/django.po +5 -5
  498. wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.mo +0 -0
  499. wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.po +63 -9
  500. wagtail/contrib/search_promotions/locale/sr/LC_MESSAGES/django.po +3 -3
  501. wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.mo +0 -0
  502. wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.po +10 -7
  503. wagtail/contrib/search_promotions/locale/ta/LC_MESSAGES/django.po +1 -1
  504. wagtail/contrib/search_promotions/locale/tet/LC_MESSAGES/django.po +1 -1
  505. wagtail/contrib/search_promotions/locale/th/LC_MESSAGES/django.po +5 -5
  506. wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.po +5 -5
  507. wagtail/contrib/search_promotions/locale/tr_TR/LC_MESSAGES/django.po +5 -5
  508. wagtail/contrib/search_promotions/locale/uk/LC_MESSAGES/django.po +5 -5
  509. wagtail/contrib/search_promotions/locale/vi/LC_MESSAGES/django.po +1 -1
  510. wagtail/contrib/search_promotions/locale/zh/LC_MESSAGES/django.po +1 -1
  511. wagtail/contrib/search_promotions/locale/zh_Hans/LC_MESSAGES/django.po +3 -3
  512. wagtail/contrib/search_promotions/locale/zh_Hant/LC_MESSAGES/django.po +3 -3
  513. wagtail/contrib/settings/locale/af/LC_MESSAGES/django.po +1 -1
  514. wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.po +1 -1
  515. wagtail/contrib/settings/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  516. wagtail/contrib/settings/locale/be/LC_MESSAGES/django.po +4 -4
  517. wagtail/contrib/settings/locale/bg/LC_MESSAGES/django.po +1 -1
  518. wagtail/contrib/settings/locale/bn/LC_MESSAGES/django.po +1 -1
  519. wagtail/contrib/settings/locale/ca/LC_MESSAGES/django.po +1 -1
  520. wagtail/contrib/settings/locale/cs/LC_MESSAGES/django.po +1 -1
  521. wagtail/contrib/settings/locale/cy/LC_MESSAGES/django.po +1 -1
  522. wagtail/contrib/settings/locale/da/LC_MESSAGES/django.po +1 -1
  523. wagtail/contrib/settings/locale/de/LC_MESSAGES/django.po +1 -1
  524. wagtail/contrib/settings/locale/dv/LC_MESSAGES/django.po +1 -1
  525. wagtail/contrib/settings/locale/el/LC_MESSAGES/django.po +1 -1
  526. wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +4 -4
  527. wagtail/contrib/settings/locale/en_IN/LC_MESSAGES/django.po +1 -1
  528. wagtail/contrib/settings/locale/es/LC_MESSAGES/django.po +1 -1
  529. wagtail/contrib/settings/locale/es_419/LC_MESSAGES/django.po +1 -1
  530. wagtail/contrib/settings/locale/es_VE/LC_MESSAGES/django.po +1 -1
  531. wagtail/contrib/settings/locale/et/LC_MESSAGES/django.po +1 -1
  532. wagtail/contrib/settings/locale/fa/LC_MESSAGES/django.po +1 -1
  533. wagtail/contrib/settings/locale/fi/LC_MESSAGES/django.po +1 -1
  534. wagtail/contrib/settings/locale/fr/LC_MESSAGES/django.po +1 -1
  535. wagtail/contrib/settings/locale/gl/LC_MESSAGES/django.po +1 -1
  536. wagtail/contrib/settings/locale/he_IL/LC_MESSAGES/django.po +1 -1
  537. wagtail/contrib/settings/locale/hi/LC_MESSAGES/django.po +1 -1
  538. wagtail/contrib/settings/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  539. wagtail/contrib/settings/locale/ht/LC_MESSAGES/django.po +1 -1
  540. wagtail/contrib/settings/locale/hu/LC_MESSAGES/django.po +1 -1
  541. wagtail/contrib/settings/locale/id_ID/LC_MESSAGES/django.po +1 -1
  542. wagtail/contrib/settings/locale/is_IS/LC_MESSAGES/django.po +1 -1
  543. wagtail/contrib/settings/locale/it/LC_MESSAGES/django.po +1 -1
  544. wagtail/contrib/settings/locale/ja/LC_MESSAGES/django.po +1 -1
  545. wagtail/contrib/settings/locale/ka/LC_MESSAGES/django.po +1 -1
  546. wagtail/contrib/settings/locale/ko/LC_MESSAGES/django.po +1 -1
  547. wagtail/contrib/settings/locale/lt/LC_MESSAGES/django.po +1 -1
  548. wagtail/contrib/settings/locale/lv/LC_MESSAGES/django.po +1 -1
  549. wagtail/contrib/settings/locale/mi/LC_MESSAGES/django.po +1 -1
  550. wagtail/contrib/settings/locale/mn/LC_MESSAGES/django.po +1 -1
  551. wagtail/contrib/settings/locale/my/LC_MESSAGES/django.po +1 -1
  552. wagtail/contrib/settings/locale/nb/LC_MESSAGES/django.po +1 -1
  553. wagtail/contrib/settings/locale/nl/LC_MESSAGES/django.po +1 -1
  554. wagtail/contrib/settings/locale/pl/LC_MESSAGES/django.po +4 -4
  555. wagtail/contrib/settings/locale/pt_BR/LC_MESSAGES/django.po +2 -2
  556. wagtail/contrib/settings/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  557. wagtail/contrib/settings/locale/ro/LC_MESSAGES/django.po +1 -1
  558. wagtail/contrib/settings/locale/ru/LC_MESSAGES/django.po +4 -4
  559. wagtail/contrib/settings/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  560. wagtail/contrib/settings/locale/sk_SK/LC_MESSAGES/django.po +11 -2
  561. wagtail/contrib/settings/locale/sl/LC_MESSAGES/django.po +3 -3
  562. wagtail/contrib/settings/locale/sr/LC_MESSAGES/django.po +3 -3
  563. wagtail/contrib/settings/locale/sv/LC_MESSAGES/django.po +1 -1
  564. wagtail/contrib/settings/locale/ta/LC_MESSAGES/django.po +1 -1
  565. wagtail/contrib/settings/locale/tet/LC_MESSAGES/django.po +1 -1
  566. wagtail/contrib/settings/locale/th/LC_MESSAGES/django.po +1 -1
  567. wagtail/contrib/settings/locale/tr/LC_MESSAGES/django.po +1 -1
  568. wagtail/contrib/settings/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  569. wagtail/contrib/settings/locale/uk/LC_MESSAGES/django.po +1 -1
  570. wagtail/contrib/settings/locale/vi/LC_MESSAGES/django.po +1 -1
  571. wagtail/contrib/settings/locale/zh/LC_MESSAGES/django.po +1 -1
  572. wagtail/contrib/settings/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  573. wagtail/contrib/settings/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  574. wagtail/contrib/simple_translation/locale/ar/LC_MESSAGES/django.po +1 -1
  575. wagtail/contrib/simple_translation/locale/be/LC_MESSAGES/django.po +4 -4
  576. wagtail/contrib/simple_translation/locale/ca/LC_MESSAGES/django.mo +0 -0
  577. wagtail/contrib/simple_translation/locale/ca/LC_MESSAGES/django.po +6 -3
  578. wagtail/contrib/simple_translation/locale/cs/LC_MESSAGES/django.po +1 -1
  579. wagtail/contrib/simple_translation/locale/cy/LC_MESSAGES/django.po +1 -1
  580. wagtail/contrib/simple_translation/locale/de/LC_MESSAGES/django.mo +0 -0
  581. wagtail/contrib/simple_translation/locale/de/LC_MESSAGES/django.po +6 -3
  582. wagtail/contrib/simple_translation/locale/dv/LC_MESSAGES/django.po +1 -1
  583. wagtail/contrib/simple_translation/locale/el/LC_MESSAGES/django.po +1 -1
  584. wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +5 -1
  585. wagtail/contrib/simple_translation/locale/es/LC_MESSAGES/django.po +1 -1
  586. wagtail/contrib/simple_translation/locale/es_419/LC_MESSAGES/django.po +1 -1
  587. wagtail/contrib/simple_translation/locale/fa/LC_MESSAGES/django.po +1 -1
  588. wagtail/contrib/simple_translation/locale/fi/LC_MESSAGES/django.po +1 -1
  589. wagtail/contrib/simple_translation/locale/fr/LC_MESSAGES/django.mo +0 -0
  590. wagtail/contrib/simple_translation/locale/fr/LC_MESSAGES/django.po +6 -2
  591. wagtail/contrib/simple_translation/locale/gl/LC_MESSAGES/django.mo +0 -0
  592. wagtail/contrib/simple_translation/locale/gl/LC_MESSAGES/django.po +6 -3
  593. wagtail/contrib/simple_translation/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  594. wagtail/contrib/simple_translation/locale/hu/LC_MESSAGES/django.po +1 -1
  595. wagtail/contrib/simple_translation/locale/is_IS/LC_MESSAGES/django.po +1 -1
  596. wagtail/contrib/simple_translation/locale/it/LC_MESSAGES/django.po +1 -1
  597. wagtail/contrib/simple_translation/locale/ko/LC_MESSAGES/django.po +1 -1
  598. wagtail/contrib/simple_translation/locale/lt/LC_MESSAGES/django.po +1 -1
  599. wagtail/contrib/simple_translation/locale/mi/LC_MESSAGES/django.po +1 -1
  600. wagtail/contrib/simple_translation/locale/mn/LC_MESSAGES/django.po +1 -1
  601. wagtail/contrib/simple_translation/locale/nb/LC_MESSAGES/django.po +1 -1
  602. wagtail/contrib/simple_translation/locale/nl/LC_MESSAGES/django.mo +0 -0
  603. wagtail/contrib/simple_translation/locale/nl/LC_MESSAGES/django.po +6 -3
  604. wagtail/contrib/simple_translation/locale/pl/LC_MESSAGES/django.po +4 -4
  605. wagtail/contrib/simple_translation/locale/pt_BR/LC_MESSAGES/django.po +2 -2
  606. wagtail/contrib/simple_translation/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  607. wagtail/contrib/simple_translation/locale/ro/LC_MESSAGES/django.po +1 -1
  608. wagtail/contrib/simple_translation/locale/ru/LC_MESSAGES/django.mo +0 -0
  609. wagtail/contrib/simple_translation/locale/ru/LC_MESSAGES/django.po +9 -6
  610. wagtail/contrib/simple_translation/locale/sl/LC_MESSAGES/django.po +3 -3
  611. wagtail/contrib/simple_translation/locale/sv/LC_MESSAGES/django.po +1 -1
  612. wagtail/contrib/simple_translation/locale/uk/LC_MESSAGES/django.po +1 -1
  613. wagtail/contrib/simple_translation/locale/vi/LC_MESSAGES/django.po +1 -1
  614. wagtail/contrib/simple_translation/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  615. wagtail/contrib/simple_translation/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  616. wagtail/contrib/simple_translation/models.py +2 -1
  617. wagtail/contrib/styleguide/locale/af/LC_MESSAGES/django.po +1 -1
  618. wagtail/contrib/styleguide/locale/ar/LC_MESSAGES/django.po +1 -1
  619. wagtail/contrib/styleguide/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  620. wagtail/contrib/styleguide/locale/be/LC_MESSAGES/django.po +4 -4
  621. wagtail/contrib/styleguide/locale/bg/LC_MESSAGES/django.po +1 -1
  622. wagtail/contrib/styleguide/locale/bn/LC_MESSAGES/django.po +1 -1
  623. wagtail/contrib/styleguide/locale/ca/LC_MESSAGES/django.po +1 -1
  624. wagtail/contrib/styleguide/locale/cs/LC_MESSAGES/django.po +1 -1
  625. wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.po +1 -1
  626. wagtail/contrib/styleguide/locale/da/LC_MESSAGES/django.po +1 -1
  627. wagtail/contrib/styleguide/locale/de/LC_MESSAGES/django.po +1 -1
  628. wagtail/contrib/styleguide/locale/dv/LC_MESSAGES/django.po +1 -1
  629. wagtail/contrib/styleguide/locale/el/LC_MESSAGES/django.po +1 -1
  630. wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +7 -7
  631. wagtail/contrib/styleguide/locale/en_IN/LC_MESSAGES/django.po +1 -1
  632. wagtail/contrib/styleguide/locale/es/LC_MESSAGES/django.po +1 -1
  633. wagtail/contrib/styleguide/locale/es_419/LC_MESSAGES/django.po +1 -1
  634. wagtail/contrib/styleguide/locale/es_VE/LC_MESSAGES/django.po +1 -1
  635. wagtail/contrib/styleguide/locale/et/LC_MESSAGES/django.po +1 -1
  636. wagtail/contrib/styleguide/locale/fa/LC_MESSAGES/django.po +1 -1
  637. wagtail/contrib/styleguide/locale/fi/LC_MESSAGES/django.po +1 -1
  638. wagtail/contrib/styleguide/locale/fr/LC_MESSAGES/django.po +1 -1
  639. wagtail/contrib/styleguide/locale/gl/LC_MESSAGES/django.po +1 -1
  640. wagtail/contrib/styleguide/locale/he_IL/LC_MESSAGES/django.po +1 -1
  641. wagtail/contrib/styleguide/locale/hi/LC_MESSAGES/django.po +1 -1
  642. wagtail/contrib/styleguide/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  643. wagtail/contrib/styleguide/locale/ht/LC_MESSAGES/django.po +1 -1
  644. wagtail/contrib/styleguide/locale/hu/LC_MESSAGES/django.po +1 -1
  645. wagtail/contrib/styleguide/locale/id_ID/LC_MESSAGES/django.po +1 -1
  646. wagtail/contrib/styleguide/locale/is_IS/LC_MESSAGES/django.po +1 -1
  647. wagtail/contrib/styleguide/locale/it/LC_MESSAGES/django.po +1 -1
  648. wagtail/contrib/styleguide/locale/ja/LC_MESSAGES/django.po +1 -1
  649. wagtail/contrib/styleguide/locale/ka/LC_MESSAGES/django.po +1 -1
  650. wagtail/contrib/styleguide/locale/ko/LC_MESSAGES/django.po +1 -1
  651. wagtail/contrib/styleguide/locale/lt/LC_MESSAGES/django.po +1 -1
  652. wagtail/contrib/styleguide/locale/lv/LC_MESSAGES/django.po +1 -1
  653. wagtail/contrib/styleguide/locale/mi/LC_MESSAGES/django.po +1 -1
  654. wagtail/contrib/styleguide/locale/mn/LC_MESSAGES/django.po +1 -1
  655. wagtail/contrib/styleguide/locale/my/LC_MESSAGES/django.po +1 -1
  656. wagtail/contrib/styleguide/locale/nb/LC_MESSAGES/django.po +1 -1
  657. wagtail/contrib/styleguide/locale/nl/LC_MESSAGES/django.po +1 -1
  658. wagtail/contrib/styleguide/locale/pl/LC_MESSAGES/django.po +4 -4
  659. wagtail/contrib/styleguide/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  660. wagtail/contrib/styleguide/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  661. wagtail/contrib/styleguide/locale/ro/LC_MESSAGES/django.po +1 -1
  662. wagtail/contrib/styleguide/locale/ru/LC_MESSAGES/django.po +4 -4
  663. wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  664. wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.po +6 -2
  665. wagtail/contrib/styleguide/locale/sl/LC_MESSAGES/django.po +3 -3
  666. wagtail/contrib/styleguide/locale/sv/LC_MESSAGES/django.po +1 -1
  667. wagtail/contrib/styleguide/locale/ta/LC_MESSAGES/django.po +1 -1
  668. wagtail/contrib/styleguide/locale/tet/LC_MESSAGES/django.po +1 -1
  669. wagtail/contrib/styleguide/locale/th/LC_MESSAGES/django.po +1 -1
  670. wagtail/contrib/styleguide/locale/tr/LC_MESSAGES/django.po +1 -1
  671. wagtail/contrib/styleguide/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  672. wagtail/contrib/styleguide/locale/uk/LC_MESSAGES/django.po +1 -1
  673. wagtail/contrib/styleguide/locale/vi/LC_MESSAGES/django.po +1 -1
  674. wagtail/contrib/styleguide/locale/zh/LC_MESSAGES/django.po +1 -1
  675. wagtail/contrib/styleguide/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  676. wagtail/contrib/styleguide/locale/zh_Hans/LC_MESSAGES/django.po +4 -1
  677. wagtail/contrib/styleguide/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  678. wagtail/contrib/table_block/locale/ar/LC_MESSAGES/django.po +1 -1
  679. wagtail/contrib/table_block/locale/be/LC_MESSAGES/django.po +4 -4
  680. wagtail/contrib/table_block/locale/ca/LC_MESSAGES/django.po +1 -1
  681. wagtail/contrib/table_block/locale/cs/LC_MESSAGES/django.po +1 -1
  682. wagtail/contrib/table_block/locale/cy/LC_MESSAGES/django.po +1 -1
  683. wagtail/contrib/table_block/locale/de/LC_MESSAGES/django.po +1 -1
  684. wagtail/contrib/table_block/locale/dv/LC_MESSAGES/django.po +1 -1
  685. wagtail/contrib/table_block/locale/el/LC_MESSAGES/django.po +1 -1
  686. wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +1 -1
  687. wagtail/contrib/table_block/locale/en_IN/LC_MESSAGES/django.po +1 -1
  688. wagtail/contrib/table_block/locale/es/LC_MESSAGES/django.po +1 -1
  689. wagtail/contrib/table_block/locale/et/LC_MESSAGES/django.po +1 -1
  690. wagtail/contrib/table_block/locale/fa/LC_MESSAGES/django.po +1 -1
  691. wagtail/contrib/table_block/locale/fi/LC_MESSAGES/django.po +1 -1
  692. wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.mo +0 -0
  693. wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.po +28 -2
  694. wagtail/contrib/table_block/locale/gl/LC_MESSAGES/django.po +1 -1
  695. wagtail/contrib/table_block/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  696. wagtail/contrib/table_block/locale/ht/LC_MESSAGES/django.po +1 -1
  697. wagtail/contrib/table_block/locale/hu/LC_MESSAGES/django.po +1 -1
  698. wagtail/contrib/table_block/locale/id_ID/LC_MESSAGES/django.po +1 -1
  699. wagtail/contrib/table_block/locale/is_IS/LC_MESSAGES/django.po +1 -1
  700. wagtail/contrib/table_block/locale/it/LC_MESSAGES/django.po +1 -1
  701. wagtail/contrib/table_block/locale/ja/LC_MESSAGES/django.po +1 -1
  702. wagtail/contrib/table_block/locale/ko/LC_MESSAGES/django.po +1 -1
  703. wagtail/contrib/table_block/locale/lt/LC_MESSAGES/django.po +1 -1
  704. wagtail/contrib/table_block/locale/lv/LC_MESSAGES/django.po +1 -1
  705. wagtail/contrib/table_block/locale/mi/LC_MESSAGES/django.po +1 -1
  706. wagtail/contrib/table_block/locale/mn/LC_MESSAGES/django.po +1 -1
  707. wagtail/contrib/table_block/locale/my/LC_MESSAGES/django.po +1 -1
  708. wagtail/contrib/table_block/locale/nb/LC_MESSAGES/django.po +1 -1
  709. wagtail/contrib/table_block/locale/nl/LC_MESSAGES/django.po +1 -1
  710. wagtail/contrib/table_block/locale/pl/LC_MESSAGES/django.po +4 -4
  711. wagtail/contrib/table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  712. wagtail/contrib/table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  713. wagtail/contrib/table_block/locale/ro/LC_MESSAGES/django.po +1 -1
  714. wagtail/contrib/table_block/locale/ru/LC_MESSAGES/django.po +4 -4
  715. wagtail/contrib/table_block/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  716. wagtail/contrib/table_block/locale/sl/LC_MESSAGES/django.mo +0 -0
  717. wagtail/contrib/table_block/locale/sl/LC_MESSAGES/django.po +30 -4
  718. wagtail/contrib/table_block/locale/sv/LC_MESSAGES/django.po +1 -1
  719. wagtail/contrib/table_block/locale/tet/LC_MESSAGES/django.po +1 -1
  720. wagtail/contrib/table_block/locale/th/LC_MESSAGES/django.po +1 -1
  721. wagtail/contrib/table_block/locale/tr/LC_MESSAGES/django.po +1 -1
  722. wagtail/contrib/table_block/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  723. wagtail/contrib/table_block/locale/uk/LC_MESSAGES/django.po +1 -1
  724. wagtail/contrib/table_block/locale/vi/LC_MESSAGES/django.po +1 -1
  725. wagtail/contrib/table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  726. wagtail/contrib/table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  727. wagtail/contrib/table_block/static/table_block/js/table.js +1 -1
  728. wagtail/contrib/typed_table_block/blocks.py +19 -0
  729. wagtail/contrib/typed_table_block/locale/ar/LC_MESSAGES/django.po +1 -1
  730. wagtail/contrib/typed_table_block/locale/be/LC_MESSAGES/django.po +4 -4
  731. wagtail/contrib/typed_table_block/locale/ca/LC_MESSAGES/django.po +1 -1
  732. wagtail/contrib/typed_table_block/locale/cy/LC_MESSAGES/django.po +1 -1
  733. wagtail/contrib/typed_table_block/locale/de/LC_MESSAGES/django.po +1 -1
  734. wagtail/contrib/typed_table_block/locale/dv/LC_MESSAGES/django.po +1 -1
  735. wagtail/contrib/typed_table_block/locale/el/LC_MESSAGES/django.po +1 -1
  736. wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +10 -10
  737. wagtail/contrib/typed_table_block/locale/es/LC_MESSAGES/django.po +1 -1
  738. wagtail/contrib/typed_table_block/locale/fa/LC_MESSAGES/django.po +1 -1
  739. wagtail/contrib/typed_table_block/locale/fi/LC_MESSAGES/django.po +1 -1
  740. wagtail/contrib/typed_table_block/locale/fr/LC_MESSAGES/django.mo +0 -0
  741. wagtail/contrib/typed_table_block/locale/fr/LC_MESSAGES/django.po +13 -2
  742. wagtail/contrib/typed_table_block/locale/gl/LC_MESSAGES/django.po +1 -1
  743. wagtail/contrib/typed_table_block/locale/hu/LC_MESSAGES/django.po +1 -1
  744. wagtail/contrib/typed_table_block/locale/is_IS/LC_MESSAGES/django.po +1 -1
  745. wagtail/contrib/typed_table_block/locale/it/LC_MESSAGES/django.po +1 -1
  746. wagtail/contrib/typed_table_block/locale/ko/LC_MESSAGES/django.po +1 -1
  747. wagtail/contrib/typed_table_block/locale/lt/LC_MESSAGES/django.po +1 -1
  748. wagtail/contrib/typed_table_block/locale/nl/LC_MESSAGES/django.po +1 -1
  749. wagtail/contrib/typed_table_block/locale/pl/LC_MESSAGES/django.po +4 -4
  750. wagtail/contrib/typed_table_block/locale/pt_BR/LC_MESSAGES/django.po +2 -2
  751. wagtail/contrib/typed_table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  752. wagtail/contrib/typed_table_block/locale/ro/LC_MESSAGES/django.po +1 -1
  753. wagtail/contrib/typed_table_block/locale/ru/LC_MESSAGES/django.po +4 -4
  754. wagtail/contrib/typed_table_block/locale/sl/LC_MESSAGES/django.mo +0 -0
  755. wagtail/contrib/typed_table_block/locale/sl/LC_MESSAGES/django.po +15 -5
  756. wagtail/contrib/typed_table_block/locale/sv/LC_MESSAGES/django.po +1 -1
  757. wagtail/contrib/typed_table_block/locale/th/LC_MESSAGES/django.po +1 -1
  758. wagtail/contrib/typed_table_block/locale/uk/LC_MESSAGES/django.po +1 -1
  759. wagtail/contrib/typed_table_block/locale/zh/LC_MESSAGES/django.po +1 -1
  760. wagtail/contrib/typed_table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  761. wagtail/contrib/typed_table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  762. wagtail/contrib/typed_table_block/static/typed_table_block/js/typed_table_block.js +1 -1
  763. wagtail/contrib/typed_table_block/tests.py +38 -0
  764. wagtail/coreutils.py +1 -1
  765. wagtail/documents/__init__.py +1 -1
  766. wagtail/documents/locale/af/LC_MESSAGES/django.po +1 -1
  767. wagtail/documents/locale/ar/LC_MESSAGES/django.po +9 -9
  768. wagtail/documents/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  769. wagtail/documents/locale/be/LC_MESSAGES/django.po +12 -12
  770. wagtail/documents/locale/bg/LC_MESSAGES/django.po +5 -5
  771. wagtail/documents/locale/bn/LC_MESSAGES/django.po +1 -1
  772. wagtail/documents/locale/ca/LC_MESSAGES/django.mo +0 -0
  773. wagtail/documents/locale/ca/LC_MESSAGES/django.po +13 -12
  774. wagtail/documents/locale/cs/LC_MESSAGES/django.po +7 -7
  775. wagtail/documents/locale/cy/LC_MESSAGES/django.po +1 -1
  776. wagtail/documents/locale/da/LC_MESSAGES/django.po +1 -1
  777. wagtail/documents/locale/de/LC_MESSAGES/django.po +11 -9
  778. wagtail/documents/locale/dv/LC_MESSAGES/django.po +1 -1
  779. wagtail/documents/locale/el/LC_MESSAGES/django.po +9 -9
  780. wagtail/documents/locale/en/LC_MESSAGES/django.po +8 -8
  781. wagtail/documents/locale/en_IN/LC_MESSAGES/django.po +1 -1
  782. wagtail/documents/locale/es/LC_MESSAGES/django.po +9 -9
  783. wagtail/documents/locale/es_419/LC_MESSAGES/django.po +1 -1
  784. wagtail/documents/locale/es_VE/LC_MESSAGES/django.po +1 -1
  785. wagtail/documents/locale/et/LC_MESSAGES/django.po +7 -7
  786. wagtail/documents/locale/eu/LC_MESSAGES/django.po +1 -1
  787. wagtail/documents/locale/fa/LC_MESSAGES/django.mo +0 -0
  788. wagtail/documents/locale/fa/LC_MESSAGES/django.po +18 -9
  789. wagtail/documents/locale/fi/LC_MESSAGES/django.po +11 -11
  790. wagtail/documents/locale/fr/LC_MESSAGES/django.po +7 -7
  791. wagtail/documents/locale/gl/LC_MESSAGES/django.po +9 -9
  792. wagtail/documents/locale/he_IL/LC_MESSAGES/django.po +1 -1
  793. wagtail/documents/locale/hi/LC_MESSAGES/django.po +1 -1
  794. wagtail/documents/locale/hr_HR/LC_MESSAGES/django.po +15 -15
  795. wagtail/documents/locale/ht/LC_MESSAGES/django.po +1 -1
  796. wagtail/documents/locale/hu/LC_MESSAGES/django.po +13 -13
  797. wagtail/documents/locale/id_ID/LC_MESSAGES/django.po +7 -7
  798. wagtail/documents/locale/is_IS/LC_MESSAGES/django.po +9 -9
  799. wagtail/documents/locale/it/LC_MESSAGES/django.po +9 -9
  800. wagtail/documents/locale/ja/LC_MESSAGES/django.po +9 -9
  801. wagtail/documents/locale/ka/LC_MESSAGES/django.po +1 -1
  802. wagtail/documents/locale/ko/LC_MESSAGES/django.po +9 -9
  803. wagtail/documents/locale/lt/LC_MESSAGES/django.po +9 -9
  804. wagtail/documents/locale/lv/LC_MESSAGES/django.po +1 -1
  805. wagtail/documents/locale/mi/LC_MESSAGES/django.po +11 -11
  806. wagtail/documents/locale/mn/LC_MESSAGES/django.po +6 -5
  807. wagtail/documents/locale/my/LC_MESSAGES/django.po +1 -1
  808. wagtail/documents/locale/nb/LC_MESSAGES/django.po +7 -7
  809. wagtail/documents/locale/nl/LC_MESSAGES/django.po +9 -9
  810. wagtail/documents/locale/pl/LC_MESSAGES/django.po +12 -12
  811. wagtail/documents/locale/pt_BR/LC_MESSAGES/django.po +9 -9
  812. wagtail/documents/locale/pt_PT/LC_MESSAGES/django.po +9 -9
  813. wagtail/documents/locale/ro/LC_MESSAGES/django.po +9 -9
  814. wagtail/documents/locale/ru/LC_MESSAGES/django.po +10 -10
  815. wagtail/documents/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  816. wagtail/documents/locale/sk_SK/LC_MESSAGES/django.po +56 -13
  817. wagtail/documents/locale/sl/LC_MESSAGES/django.mo +0 -0
  818. wagtail/documents/locale/sl/LC_MESSAGES/django.po +31 -11
  819. wagtail/documents/locale/sr/LC_MESSAGES/django.po +3 -3
  820. wagtail/documents/locale/sv/LC_MESSAGES/django.po +7 -7
  821. wagtail/documents/locale/ta/LC_MESSAGES/django.po +1 -1
  822. wagtail/documents/locale/tet/LC_MESSAGES/django.po +1 -1
  823. wagtail/documents/locale/th/LC_MESSAGES/django.po +9 -9
  824. wagtail/documents/locale/tr/LC_MESSAGES/django.po +9 -9
  825. wagtail/documents/locale/tr_TR/LC_MESSAGES/django.po +9 -9
  826. wagtail/documents/locale/uk/LC_MESSAGES/django.po +9 -9
  827. wagtail/documents/locale/vi/LC_MESSAGES/django.po +1 -1
  828. wagtail/documents/locale/zh/LC_MESSAGES/django.po +3 -3
  829. wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  830. wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.po +12 -6
  831. wagtail/documents/locale/zh_Hant/LC_MESSAGES/django.po +5 -5
  832. wagtail/documents/models.py +5 -1
  833. wagtail/documents/static/wagtaildocs/js/document-chooser-modal.js +1 -1
  834. wagtail/documents/static/wagtaildocs/js/document-chooser-telepath.js +1 -1
  835. wagtail/documents/static/wagtaildocs/js/document-chooser.js +1 -1
  836. wagtail/documents/tests/test_models.py +5 -1
  837. wagtail/embeds/apps.py +2 -0
  838. wagtail/embeds/embeds.py +12 -14
  839. wagtail/embeds/finders/__init__.py +2 -0
  840. wagtail/embeds/finders/facebook.py +17 -33
  841. wagtail/embeds/finders/instagram.py +19 -16
  842. wagtail/embeds/locale/ar/LC_MESSAGES/django.po +1 -1
  843. wagtail/embeds/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  844. wagtail/embeds/locale/be/LC_MESSAGES/django.po +4 -4
  845. wagtail/embeds/locale/bg/LC_MESSAGES/django.po +1 -1
  846. wagtail/embeds/locale/bn/LC_MESSAGES/django.po +1 -1
  847. wagtail/embeds/locale/ca/LC_MESSAGES/django.po +1 -1
  848. wagtail/embeds/locale/cs/LC_MESSAGES/django.po +1 -1
  849. wagtail/embeds/locale/cy/LC_MESSAGES/django.po +1 -1
  850. wagtail/embeds/locale/da/LC_MESSAGES/django.po +1 -1
  851. wagtail/embeds/locale/de/LC_MESSAGES/django.po +1 -1
  852. wagtail/embeds/locale/dv/LC_MESSAGES/django.po +1 -1
  853. wagtail/embeds/locale/el/LC_MESSAGES/django.po +1 -1
  854. wagtail/embeds/locale/en/LC_MESSAGES/django.po +1 -1
  855. wagtail/embeds/locale/es/LC_MESSAGES/django.po +1 -1
  856. wagtail/embeds/locale/es_419/LC_MESSAGES/django.po +1 -1
  857. wagtail/embeds/locale/et/LC_MESSAGES/django.po +1 -1
  858. wagtail/embeds/locale/fa/LC_MESSAGES/django.po +1 -1
  859. wagtail/embeds/locale/fi/LC_MESSAGES/django.po +1 -1
  860. wagtail/embeds/locale/fr/LC_MESSAGES/django.po +1 -1
  861. wagtail/embeds/locale/gl/LC_MESSAGES/django.po +1 -1
  862. wagtail/embeds/locale/he_IL/LC_MESSAGES/django.po +1 -1
  863. wagtail/embeds/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  864. wagtail/embeds/locale/ht/LC_MESSAGES/django.po +1 -1
  865. wagtail/embeds/locale/hu/LC_MESSAGES/django.po +1 -1
  866. wagtail/embeds/locale/id_ID/LC_MESSAGES/django.po +1 -1
  867. wagtail/embeds/locale/is_IS/LC_MESSAGES/django.po +1 -1
  868. wagtail/embeds/locale/it/LC_MESSAGES/django.po +1 -1
  869. wagtail/embeds/locale/ja/LC_MESSAGES/django.po +1 -1
  870. wagtail/embeds/locale/ko/LC_MESSAGES/django.po +1 -1
  871. wagtail/embeds/locale/lt/LC_MESSAGES/django.po +1 -1
  872. wagtail/embeds/locale/lv/LC_MESSAGES/django.po +1 -1
  873. wagtail/embeds/locale/mi/LC_MESSAGES/django.po +1 -1
  874. wagtail/embeds/locale/mn/LC_MESSAGES/django.po +1 -1
  875. wagtail/embeds/locale/my/LC_MESSAGES/django.po +1 -1
  876. wagtail/embeds/locale/nb/LC_MESSAGES/django.po +1 -1
  877. wagtail/embeds/locale/nl/LC_MESSAGES/django.po +1 -1
  878. wagtail/embeds/locale/pl/LC_MESSAGES/django.po +4 -4
  879. wagtail/embeds/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  880. wagtail/embeds/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  881. wagtail/embeds/locale/ro/LC_MESSAGES/django.po +1 -1
  882. wagtail/embeds/locale/ru/LC_MESSAGES/django.po +4 -4
  883. wagtail/embeds/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  884. wagtail/embeds/locale/sl/LC_MESSAGES/django.po +3 -3
  885. wagtail/embeds/locale/sv/LC_MESSAGES/django.po +1 -1
  886. wagtail/embeds/locale/tet/LC_MESSAGES/django.po +1 -1
  887. wagtail/embeds/locale/th/LC_MESSAGES/django.po +1 -1
  888. wagtail/embeds/locale/tr/LC_MESSAGES/django.po +1 -1
  889. wagtail/embeds/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  890. wagtail/embeds/locale/uk/LC_MESSAGES/django.po +1 -1
  891. wagtail/embeds/locale/vi/LC_MESSAGES/django.po +1 -1
  892. wagtail/embeds/locale/zh/LC_MESSAGES/django.po +1 -1
  893. wagtail/embeds/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  894. wagtail/embeds/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  895. wagtail/embeds/signal_handlers.py +13 -0
  896. wagtail/embeds/tests/test_embeds.py +7 -7
  897. wagtail/fields.py +58 -14
  898. wagtail/images/__init__.py +1 -1
  899. wagtail/images/locale/af/LC_MESSAGES/django.po +1 -1
  900. wagtail/images/locale/ar/LC_MESSAGES/django.po +7 -7
  901. wagtail/images/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  902. wagtail/images/locale/be/LC_MESSAGES/django.po +4 -4
  903. wagtail/images/locale/bg/LC_MESSAGES/django.po +1 -1
  904. wagtail/images/locale/bn/LC_MESSAGES/django.po +1 -1
  905. wagtail/images/locale/ca/LC_MESSAGES/django.po +9 -9
  906. wagtail/images/locale/cs/LC_MESSAGES/django.po +9 -9
  907. wagtail/images/locale/cy/LC_MESSAGES/django.po +9 -9
  908. wagtail/images/locale/da/LC_MESSAGES/django.po +1 -1
  909. wagtail/images/locale/de/LC_MESSAGES/django.po +7 -7
  910. wagtail/images/locale/dv/LC_MESSAGES/django.po +1 -1
  911. wagtail/images/locale/el/LC_MESSAGES/django.po +9 -9
  912. wagtail/images/locale/en/LC_MESSAGES/django.po +34 -34
  913. wagtail/images/locale/en_IN/LC_MESSAGES/django.po +1 -1
  914. wagtail/images/locale/es/LC_MESSAGES/django.po +11 -11
  915. wagtail/images/locale/es_419/LC_MESSAGES/django.po +1 -1
  916. wagtail/images/locale/et/LC_MESSAGES/django.po +9 -9
  917. wagtail/images/locale/eu/LC_MESSAGES/django.po +1 -1
  918. wagtail/images/locale/fa/LC_MESSAGES/django.mo +0 -0
  919. wagtail/images/locale/fa/LC_MESSAGES/django.po +29 -10
  920. wagtail/images/locale/fi/LC_MESSAGES/django.po +9 -9
  921. wagtail/images/locale/fr/LC_MESSAGES/django.po +7 -7
  922. wagtail/images/locale/gl/LC_MESSAGES/django.po +9 -9
  923. wagtail/images/locale/he_IL/LC_MESSAGES/django.po +1 -1
  924. wagtail/images/locale/hi/LC_MESSAGES/django.po +1 -1
  925. wagtail/images/locale/hr_HR/LC_MESSAGES/django.po +9 -9
  926. wagtail/images/locale/ht/LC_MESSAGES/django.po +1 -1
  927. wagtail/images/locale/hu/LC_MESSAGES/django.po +9 -9
  928. wagtail/images/locale/id_ID/LC_MESSAGES/django.po +7 -7
  929. wagtail/images/locale/is_IS/LC_MESSAGES/django.po +9 -9
  930. wagtail/images/locale/it/LC_MESSAGES/django.po +9 -9
  931. wagtail/images/locale/ja/LC_MESSAGES/django.po +9 -9
  932. wagtail/images/locale/ka/LC_MESSAGES/django.po +1 -1
  933. wagtail/images/locale/ko/LC_MESSAGES/django.po +7 -7
  934. wagtail/images/locale/lt/LC_MESSAGES/django.po +9 -9
  935. wagtail/images/locale/lv/LC_MESSAGES/django.po +1 -1
  936. wagtail/images/locale/mi/LC_MESSAGES/django.po +1 -1
  937. wagtail/images/locale/mn/LC_MESSAGES/django.po +1 -1
  938. wagtail/images/locale/my/LC_MESSAGES/django.po +1 -1
  939. wagtail/images/locale/nb/LC_MESSAGES/django.po +9 -9
  940. wagtail/images/locale/nl/LC_MESSAGES/django.po +9 -9
  941. wagtail/images/locale/pl/LC_MESSAGES/django.po +12 -12
  942. wagtail/images/locale/pt_BR/LC_MESSAGES/django.po +9 -9
  943. wagtail/images/locale/pt_PT/LC_MESSAGES/django.po +9 -9
  944. wagtail/images/locale/ro/LC_MESSAGES/django.po +9 -9
  945. wagtail/images/locale/ru/LC_MESSAGES/django.po +12 -12
  946. wagtail/images/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  947. wagtail/images/locale/sk_SK/LC_MESSAGES/django.po +24 -9
  948. wagtail/images/locale/sl/LC_MESSAGES/django.mo +0 -0
  949. wagtail/images/locale/sl/LC_MESSAGES/django.po +45 -13
  950. wagtail/images/locale/sv/LC_MESSAGES/django.mo +0 -0
  951. wagtail/images/locale/sv/LC_MESSAGES/django.po +21 -9
  952. wagtail/images/locale/tet/LC_MESSAGES/django.po +5 -5
  953. wagtail/images/locale/th/LC_MESSAGES/django.po +9 -9
  954. wagtail/images/locale/tr/LC_MESSAGES/django.po +7 -7
  955. wagtail/images/locale/tr_TR/LC_MESSAGES/django.po +7 -7
  956. wagtail/images/locale/uk/LC_MESSAGES/django.po +9 -9
  957. wagtail/images/locale/vi/LC_MESSAGES/django.po +1 -1
  958. wagtail/images/locale/zh/LC_MESSAGES/django.po +1 -1
  959. wagtail/images/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  960. wagtail/images/locale/zh_Hans/LC_MESSAGES/django.po +50 -6
  961. wagtail/images/locale/zh_Hant/LC_MESSAGES/django.po +5 -5
  962. wagtail/images/models.py +3 -0
  963. wagtail/images/static/wagtailimages/js/image-chooser-modal.js +1 -1
  964. wagtail/images/static/wagtailimages/js/image-chooser-telepath.js +1 -1
  965. wagtail/images/static/wagtailimages/js/image-chooser.js +1 -1
  966. wagtail/images/templates/wagtailimages/images/edit.html +4 -4
  967. wagtail/images/tests/test_admin_views.py +58 -2
  968. wagtail/images/tests/test_image_operations.py +12 -0
  969. wagtail/images/tests/tests.py +27 -2
  970. wagtail/images/views/chooser.py +6 -1
  971. wagtail/images/views/images.py +7 -3
  972. wagtail/images/views/serve.py +1 -0
  973. wagtail/locale/af/LC_MESSAGES/django.po +1 -1
  974. wagtail/locale/ar/LC_MESSAGES/django.po +1 -1
  975. wagtail/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  976. wagtail/locale/be/LC_MESSAGES/django.po +4 -4
  977. wagtail/locale/bg/LC_MESSAGES/django.po +1 -1
  978. wagtail/locale/bn/LC_MESSAGES/django.po +1 -1
  979. wagtail/locale/ca/LC_MESSAGES/django.mo +0 -0
  980. wagtail/locale/ca/LC_MESSAGES/django.po +4 -1
  981. wagtail/locale/cs/LC_MESSAGES/django.po +1 -1
  982. wagtail/locale/cy/LC_MESSAGES/django.po +1 -1
  983. wagtail/locale/da/LC_MESSAGES/django.po +1 -1
  984. wagtail/locale/de/LC_MESSAGES/django.mo +0 -0
  985. wagtail/locale/de/LC_MESSAGES/django.po +4 -1
  986. wagtail/locale/dv/LC_MESSAGES/django.po +1 -1
  987. wagtail/locale/el/LC_MESSAGES/django.po +1 -1
  988. wagtail/locale/en/LC_MESSAGES/django.po +84 -80
  989. wagtail/locale/es/LC_MESSAGES/django.po +1 -1
  990. wagtail/locale/es_419/LC_MESSAGES/django.po +1 -1
  991. wagtail/locale/et/LC_MESSAGES/django.po +1 -1
  992. wagtail/locale/eu/LC_MESSAGES/django.po +1 -1
  993. wagtail/locale/fa/LC_MESSAGES/django.mo +0 -0
  994. wagtail/locale/fa/LC_MESSAGES/django.po +4 -1
  995. wagtail/locale/fi/LC_MESSAGES/django.mo +0 -0
  996. wagtail/locale/fi/LC_MESSAGES/django.po +65 -3
  997. wagtail/locale/fr/LC_MESSAGES/django.mo +0 -0
  998. wagtail/locale/fr/LC_MESSAGES/django.po +27 -5
  999. wagtail/locale/gl/LC_MESSAGES/django.mo +0 -0
  1000. wagtail/locale/gl/LC_MESSAGES/django.po +4 -1
  1001. wagtail/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1002. wagtail/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  1003. wagtail/locale/hu/LC_MESSAGES/django.po +1 -1
  1004. wagtail/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1005. wagtail/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1006. wagtail/locale/it/LC_MESSAGES/django.po +1 -1
  1007. wagtail/locale/ja/LC_MESSAGES/django.po +1 -1
  1008. wagtail/locale/ka/LC_MESSAGES/django.po +1 -1
  1009. wagtail/locale/ko/LC_MESSAGES/django.po +1 -1
  1010. wagtail/locale/lt/LC_MESSAGES/django.po +1 -1
  1011. wagtail/locale/lv/LC_MESSAGES/django.po +1 -1
  1012. wagtail/locale/mi/LC_MESSAGES/django.po +1 -1
  1013. wagtail/locale/mn/LC_MESSAGES/django.po +1 -1
  1014. wagtail/locale/my/LC_MESSAGES/django.po +1 -1
  1015. wagtail/locale/nb/LC_MESSAGES/django.po +1 -1
  1016. wagtail/locale/nl/LC_MESSAGES/django.mo +0 -0
  1017. wagtail/locale/nl/LC_MESSAGES/django.po +4 -1
  1018. wagtail/locale/pl/LC_MESSAGES/django.po +4 -4
  1019. wagtail/locale/pt_BR/LC_MESSAGES/django.po +2 -2
  1020. wagtail/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1021. wagtail/locale/ro/LC_MESSAGES/django.po +1 -1
  1022. wagtail/locale/ru/LC_MESSAGES/django.mo +0 -0
  1023. wagtail/locale/ru/LC_MESSAGES/django.po +8 -5
  1024. wagtail/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1025. wagtail/locale/sl/LC_MESSAGES/django.po +3 -3
  1026. wagtail/locale/sv/LC_MESSAGES/django.mo +0 -0
  1027. wagtail/locale/sv/LC_MESSAGES/django.po +12 -3
  1028. wagtail/locale/tet/LC_MESSAGES/django.po +1 -1
  1029. wagtail/locale/th/LC_MESSAGES/django.po +1 -1
  1030. wagtail/locale/tr/LC_MESSAGES/django.po +1 -1
  1031. wagtail/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1032. wagtail/locale/uk/LC_MESSAGES/django.po +1 -1
  1033. wagtail/locale/vi/LC_MESSAGES/django.po +1 -1
  1034. wagtail/locale/zh/LC_MESSAGES/django.po +1 -1
  1035. wagtail/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1036. wagtail/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1037. wagtail/locales/locale/ar/LC_MESSAGES/django.po +1 -1
  1038. wagtail/locales/locale/be/LC_MESSAGES/django.po +4 -4
  1039. wagtail/locales/locale/bg/LC_MESSAGES/django.po +1 -1
  1040. wagtail/locales/locale/ca/LC_MESSAGES/django.po +1 -1
  1041. wagtail/locales/locale/cs/LC_MESSAGES/django.po +1 -1
  1042. wagtail/locales/locale/cy/LC_MESSAGES/django.po +1 -1
  1043. wagtail/locales/locale/da/LC_MESSAGES/django.po +1 -1
  1044. wagtail/locales/locale/de/LC_MESSAGES/django.po +1 -1
  1045. wagtail/locales/locale/dv/LC_MESSAGES/django.po +1 -1
  1046. wagtail/locales/locale/el/LC_MESSAGES/django.po +1 -1
  1047. wagtail/locales/locale/en/LC_MESSAGES/django.po +2 -2
  1048. wagtail/locales/locale/es/LC_MESSAGES/django.po +1 -1
  1049. wagtail/locales/locale/et/LC_MESSAGES/django.po +1 -1
  1050. wagtail/locales/locale/fa/LC_MESSAGES/django.po +1 -1
  1051. wagtail/locales/locale/fi/LC_MESSAGES/django.po +1 -1
  1052. wagtail/locales/locale/fr/LC_MESSAGES/django.po +1 -1
  1053. wagtail/locales/locale/gl/LC_MESSAGES/django.po +1 -1
  1054. wagtail/locales/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1055. wagtail/locales/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  1056. wagtail/locales/locale/hu/LC_MESSAGES/django.po +1 -1
  1057. wagtail/locales/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1058. wagtail/locales/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1059. wagtail/locales/locale/it/LC_MESSAGES/django.po +1 -1
  1060. wagtail/locales/locale/ja/LC_MESSAGES/django.po +1 -1
  1061. wagtail/locales/locale/ko/LC_MESSAGES/django.po +1 -1
  1062. wagtail/locales/locale/lt/LC_MESSAGES/django.po +1 -1
  1063. wagtail/locales/locale/lv/LC_MESSAGES/django.po +1 -1
  1064. wagtail/locales/locale/mi/LC_MESSAGES/django.po +1 -1
  1065. wagtail/locales/locale/mn/LC_MESSAGES/django.po +1 -1
  1066. wagtail/locales/locale/my/LC_MESSAGES/django.po +1 -1
  1067. wagtail/locales/locale/nb/LC_MESSAGES/django.po +1 -1
  1068. wagtail/locales/locale/nl/LC_MESSAGES/django.po +1 -1
  1069. wagtail/locales/locale/pl/LC_MESSAGES/django.po +4 -4
  1070. wagtail/locales/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  1071. wagtail/locales/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1072. wagtail/locales/locale/ro/LC_MESSAGES/django.po +1 -1
  1073. wagtail/locales/locale/ru/LC_MESSAGES/django.po +4 -4
  1074. wagtail/locales/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1075. wagtail/locales/locale/sl/LC_MESSAGES/django.po +3 -3
  1076. wagtail/locales/locale/sv/LC_MESSAGES/django.po +1 -1
  1077. wagtail/locales/locale/tet/LC_MESSAGES/django.po +1 -1
  1078. wagtail/locales/locale/th/LC_MESSAGES/django.po +1 -1
  1079. wagtail/locales/locale/tr/LC_MESSAGES/django.po +1 -1
  1080. wagtail/locales/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1081. wagtail/locales/locale/uk/LC_MESSAGES/django.po +1 -1
  1082. wagtail/locales/locale/vi/LC_MESSAGES/django.po +1 -1
  1083. wagtail/locales/locale/zh/LC_MESSAGES/django.po +1 -1
  1084. wagtail/locales/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1085. wagtail/locales/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1086. wagtail/locales/tests.py +16 -0
  1087. wagtail/locales/wagtail_hooks.py +0 -9
  1088. wagtail/migrations/0094_alter_page_locale.py +19 -0
  1089. wagtail/models/__init__.py +11 -5
  1090. wagtail/models/i18n.py +6 -1
  1091. wagtail/project_template/requirements.txt +1 -1
  1092. wagtail/search/locale/ar/LC_MESSAGES/django.po +1 -1
  1093. wagtail/search/locale/be/LC_MESSAGES/django.po +4 -4
  1094. wagtail/search/locale/ca/LC_MESSAGES/django.po +1 -1
  1095. wagtail/search/locale/cs/LC_MESSAGES/django.po +1 -1
  1096. wagtail/search/locale/cy/LC_MESSAGES/django.po +1 -1
  1097. wagtail/search/locale/de/LC_MESSAGES/django.po +1 -1
  1098. wagtail/search/locale/dv/LC_MESSAGES/django.po +1 -1
  1099. wagtail/search/locale/en/LC_MESSAGES/django.po +1 -1
  1100. wagtail/search/locale/es/LC_MESSAGES/django.po +1 -1
  1101. wagtail/search/locale/et/LC_MESSAGES/django.po +1 -1
  1102. wagtail/search/locale/fa/LC_MESSAGES/django.mo +0 -0
  1103. wagtail/search/locale/fa/LC_MESSAGES/django.po +24 -0
  1104. wagtail/search/locale/fi/LC_MESSAGES/django.po +1 -1
  1105. wagtail/search/locale/fr/LC_MESSAGES/django.po +1 -1
  1106. wagtail/search/locale/gl/LC_MESSAGES/django.po +1 -1
  1107. wagtail/search/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  1108. wagtail/search/locale/ht/LC_MESSAGES/django.po +1 -1
  1109. wagtail/search/locale/hu/LC_MESSAGES/django.po +1 -1
  1110. wagtail/search/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1111. wagtail/search/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1112. wagtail/search/locale/it/LC_MESSAGES/django.po +1 -1
  1113. wagtail/search/locale/ja/LC_MESSAGES/django.po +1 -1
  1114. wagtail/search/locale/ko/LC_MESSAGES/django.po +1 -1
  1115. wagtail/search/locale/lt/LC_MESSAGES/django.po +1 -1
  1116. wagtail/search/locale/mi/LC_MESSAGES/django.po +1 -1
  1117. wagtail/search/locale/mn/LC_MESSAGES/django.po +1 -1
  1118. wagtail/search/locale/my/LC_MESSAGES/django.po +1 -1
  1119. wagtail/search/locale/nb/LC_MESSAGES/django.po +1 -1
  1120. wagtail/search/locale/nl/LC_MESSAGES/django.po +1 -1
  1121. wagtail/search/locale/pl/LC_MESSAGES/django.po +4 -4
  1122. wagtail/search/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  1123. wagtail/search/locale/pt_BR/LC_MESSAGES/django.po +4 -4
  1124. wagtail/search/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1125. wagtail/search/locale/ro/LC_MESSAGES/django.po +1 -1
  1126. wagtail/search/locale/ru/LC_MESSAGES/django.po +4 -4
  1127. wagtail/search/locale/sl/LC_MESSAGES/django.po +3 -3
  1128. wagtail/search/locale/sv/LC_MESSAGES/django.po +1 -1
  1129. wagtail/search/locale/tet/LC_MESSAGES/django.po +1 -1
  1130. wagtail/search/locale/th/LC_MESSAGES/django.po +1 -1
  1131. wagtail/search/locale/tr/LC_MESSAGES/django.po +1 -1
  1132. wagtail/search/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1133. wagtail/search/locale/uk/LC_MESSAGES/django.po +1 -1
  1134. wagtail/search/locale/vi/LC_MESSAGES/django.po +1 -1
  1135. wagtail/search/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1136. wagtail/search/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1137. wagtail/search/tests/test_queries.py +24 -0
  1138. wagtail/search/utils.py +6 -12
  1139. wagtail/signals.py +4 -0
  1140. wagtail/sites/locale/ar/LC_MESSAGES/django.po +1 -1
  1141. wagtail/sites/locale/be/LC_MESSAGES/django.po +4 -4
  1142. wagtail/sites/locale/bn/LC_MESSAGES/django.po +1 -1
  1143. wagtail/sites/locale/ca/LC_MESSAGES/django.po +1 -1
  1144. wagtail/sites/locale/cs/LC_MESSAGES/django.po +1 -1
  1145. wagtail/sites/locale/cy/LC_MESSAGES/django.po +1 -1
  1146. wagtail/sites/locale/da/LC_MESSAGES/django.po +1 -1
  1147. wagtail/sites/locale/de/LC_MESSAGES/django.po +1 -1
  1148. wagtail/sites/locale/dv/LC_MESSAGES/django.po +1 -1
  1149. wagtail/sites/locale/el/LC_MESSAGES/django.po +1 -1
  1150. wagtail/sites/locale/en/LC_MESSAGES/django.po +2 -2
  1151. wagtail/sites/locale/en_IN/LC_MESSAGES/django.po +1 -1
  1152. wagtail/sites/locale/es/LC_MESSAGES/django.po +1 -1
  1153. wagtail/sites/locale/es_419/LC_MESSAGES/django.po +1 -1
  1154. wagtail/sites/locale/es_VE/LC_MESSAGES/django.po +1 -1
  1155. wagtail/sites/locale/et/LC_MESSAGES/django.po +1 -1
  1156. wagtail/sites/locale/fa/LC_MESSAGES/django.po +1 -1
  1157. wagtail/sites/locale/fi/LC_MESSAGES/django.po +1 -1
  1158. wagtail/sites/locale/fr/LC_MESSAGES/django.po +1 -1
  1159. wagtail/sites/locale/gl/LC_MESSAGES/django.po +1 -1
  1160. wagtail/sites/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1161. wagtail/sites/locale/hi/LC_MESSAGES/django.po +1 -1
  1162. wagtail/sites/locale/hr_HR/LC_MESSAGES/django.po +3 -3
  1163. wagtail/sites/locale/ht/LC_MESSAGES/django.po +1 -1
  1164. wagtail/sites/locale/hu/LC_MESSAGES/django.po +1 -1
  1165. wagtail/sites/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1166. wagtail/sites/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1167. wagtail/sites/locale/it/LC_MESSAGES/django.po +1 -1
  1168. wagtail/sites/locale/ja/LC_MESSAGES/django.po +1 -1
  1169. wagtail/sites/locale/ka/LC_MESSAGES/django.po +1 -1
  1170. wagtail/sites/locale/ko/LC_MESSAGES/django.po +1 -1
  1171. wagtail/sites/locale/lt/LC_MESSAGES/django.po +1 -1
  1172. wagtail/sites/locale/lv/LC_MESSAGES/django.po +1 -1
  1173. wagtail/sites/locale/mi/LC_MESSAGES/django.po +1 -1
  1174. wagtail/sites/locale/mn/LC_MESSAGES/django.po +1 -1
  1175. wagtail/sites/locale/my/LC_MESSAGES/django.po +1 -1
  1176. wagtail/sites/locale/nb/LC_MESSAGES/django.po +1 -1
  1177. wagtail/sites/locale/nl/LC_MESSAGES/django.po +1 -1
  1178. wagtail/sites/locale/pl/LC_MESSAGES/django.po +4 -4
  1179. wagtail/sites/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  1180. wagtail/sites/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1181. wagtail/sites/locale/ro/LC_MESSAGES/django.po +1 -1
  1182. wagtail/sites/locale/ru/LC_MESSAGES/django.po +4 -4
  1183. wagtail/sites/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1184. wagtail/sites/locale/sl/LC_MESSAGES/django.po +3 -3
  1185. wagtail/sites/locale/sr/LC_MESSAGES/django.po +3 -3
  1186. wagtail/sites/locale/sv/LC_MESSAGES/django.po +1 -1
  1187. wagtail/sites/locale/ta/LC_MESSAGES/django.po +1 -1
  1188. wagtail/sites/locale/tet/LC_MESSAGES/django.po +1 -1
  1189. wagtail/sites/locale/th/LC_MESSAGES/django.po +1 -1
  1190. wagtail/sites/locale/tr/LC_MESSAGES/django.po +1 -1
  1191. wagtail/sites/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1192. wagtail/sites/locale/uk/LC_MESSAGES/django.po +1 -1
  1193. wagtail/sites/locale/vi/LC_MESSAGES/django.po +1 -1
  1194. wagtail/sites/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1195. wagtail/sites/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1196. wagtail/sites/tests.py +15 -0
  1197. wagtail/sites/wagtail_hooks.py +0 -9
  1198. wagtail/snippets/blocks.py +9 -1
  1199. wagtail/snippets/locale/af/LC_MESSAGES/django.po +1 -1
  1200. wagtail/snippets/locale/ar/LC_MESSAGES/django.po +1 -1
  1201. wagtail/snippets/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  1202. wagtail/snippets/locale/be/LC_MESSAGES/django.po +4 -4
  1203. wagtail/snippets/locale/bg/LC_MESSAGES/django.po +1 -1
  1204. wagtail/snippets/locale/bn/LC_MESSAGES/django.po +1 -1
  1205. wagtail/snippets/locale/ca/LC_MESSAGES/django.po +7 -7
  1206. wagtail/snippets/locale/cs/LC_MESSAGES/django.po +1 -1
  1207. wagtail/snippets/locale/cy/LC_MESSAGES/django.po +1 -1
  1208. wagtail/snippets/locale/da/LC_MESSAGES/django.po +1 -1
  1209. wagtail/snippets/locale/de/LC_MESSAGES/django.po +6 -6
  1210. wagtail/snippets/locale/dv/LC_MESSAGES/django.po +1 -1
  1211. wagtail/snippets/locale/el/LC_MESSAGES/django.po +1 -1
  1212. wagtail/snippets/locale/en/LC_MESSAGES/django.po +9 -9
  1213. wagtail/snippets/locale/en_IN/LC_MESSAGES/django.po +1 -1
  1214. wagtail/snippets/locale/es/LC_MESSAGES/django.po +7 -7
  1215. wagtail/snippets/locale/es_419/LC_MESSAGES/django.po +1 -1
  1216. wagtail/snippets/locale/es_VE/LC_MESSAGES/django.po +1 -1
  1217. wagtail/snippets/locale/et/LC_MESSAGES/django.po +1 -1
  1218. wagtail/snippets/locale/eu/LC_MESSAGES/django.po +1 -1
  1219. wagtail/snippets/locale/fa/LC_MESSAGES/django.mo +0 -0
  1220. wagtail/snippets/locale/fa/LC_MESSAGES/django.po +22 -2
  1221. wagtail/snippets/locale/fi/LC_MESSAGES/django.po +1 -1
  1222. wagtail/snippets/locale/fr/LC_MESSAGES/django.po +6 -6
  1223. wagtail/snippets/locale/gl/LC_MESSAGES/django.po +7 -7
  1224. wagtail/snippets/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1225. wagtail/snippets/locale/hi/LC_MESSAGES/django.po +1 -1
  1226. wagtail/snippets/locale/hr_HR/LC_MESSAGES/django.po +9 -9
  1227. wagtail/snippets/locale/ht/LC_MESSAGES/django.po +1 -1
  1228. wagtail/snippets/locale/hu/LC_MESSAGES/django.po +8 -8
  1229. wagtail/snippets/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1230. wagtail/snippets/locale/is_IS/LC_MESSAGES/django.po +6 -6
  1231. wagtail/snippets/locale/it/LC_MESSAGES/django.po +6 -6
  1232. wagtail/snippets/locale/ja/LC_MESSAGES/django.po +1 -1
  1233. wagtail/snippets/locale/ka/LC_MESSAGES/django.po +1 -1
  1234. wagtail/snippets/locale/ko/LC_MESSAGES/django.po +7 -7
  1235. wagtail/snippets/locale/lt/LC_MESSAGES/django.po +1 -1
  1236. wagtail/snippets/locale/lv/LC_MESSAGES/django.po +1 -1
  1237. wagtail/snippets/locale/mi/LC_MESSAGES/django.po +1 -1
  1238. wagtail/snippets/locale/mn/LC_MESSAGES/django.po +1 -1
  1239. wagtail/snippets/locale/my/LC_MESSAGES/django.po +1 -1
  1240. wagtail/snippets/locale/nb/LC_MESSAGES/django.po +7 -7
  1241. wagtail/snippets/locale/nl/LC_MESSAGES/django.po +9 -9
  1242. wagtail/snippets/locale/pl/LC_MESSAGES/django.po +10 -10
  1243. wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.po +2 -2
  1244. wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1245. wagtail/snippets/locale/ro/LC_MESSAGES/django.po +7 -7
  1246. wagtail/snippets/locale/ru/LC_MESSAGES/django.po +9 -9
  1247. wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  1248. wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.po +4 -1
  1249. wagtail/snippets/locale/sl/LC_MESSAGES/django.po +9 -9
  1250. wagtail/snippets/locale/sr/LC_MESSAGES/django.po +3 -3
  1251. wagtail/snippets/locale/sv/LC_MESSAGES/django.po +7 -7
  1252. wagtail/snippets/locale/ta/LC_MESSAGES/django.po +1 -1
  1253. wagtail/snippets/locale/tet/LC_MESSAGES/django.po +1 -1
  1254. wagtail/snippets/locale/th/LC_MESSAGES/django.po +1 -1
  1255. wagtail/snippets/locale/tr/LC_MESSAGES/django.po +1 -1
  1256. wagtail/snippets/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1257. wagtail/snippets/locale/uk/LC_MESSAGES/django.po +1 -1
  1258. wagtail/snippets/locale/vi/LC_MESSAGES/django.po +1 -1
  1259. wagtail/snippets/locale/zh/LC_MESSAGES/django.po +1 -1
  1260. wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  1261. wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.po +41 -2
  1262. wagtail/snippets/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1263. wagtail/snippets/permissions.py +5 -3
  1264. wagtail/snippets/static/wagtailsnippets/js/snippet-chooser-telepath.js +1 -1
  1265. wagtail/snippets/static/wagtailsnippets/js/snippet-chooser.js +1 -1
  1266. wagtail/snippets/templates/wagtailsnippets/snippets/action_menu/menu.html +1 -1
  1267. wagtail/snippets/tests/test_snippets.py +84 -13
  1268. wagtail/snippets/tests/test_viewset.py +22 -0
  1269. wagtail/snippets/views/snippets.py +19 -14
  1270. wagtail/snippets/wagtail_hooks.py +2 -10
  1271. wagtail/templatetags/wagtailcore_tags.py +3 -0
  1272. wagtail/test/dummy_external_storage.py +1 -1
  1273. wagtail/test/i18n/migrations/0003_alter_clusterabletestmodel_locale_and_more.py +40 -0
  1274. wagtail/test/routablepage/models.py +4 -0
  1275. wagtail/test/snippets/migrations/0012_alter_translatablesnippet_locale.py +20 -0
  1276. wagtail/test/testapp/migrations/0038_sociallink.py +52 -0
  1277. wagtail/test/testapp/migrations/0039_alter_eventcategory_locale_and_more.py +45 -0
  1278. wagtail/test/testapp/models.py +24 -0
  1279. wagtail/test/testapp/views.py +1 -0
  1280. wagtail/test/testapp/wagtail_hooks.py +9 -0
  1281. wagtail/test/urls_multilang.py +6 -1
  1282. wagtail/test/urls_multilang_non_root.py +11 -0
  1283. wagtail/tests/streamfield_migrations/test_migrations.py +53 -12
  1284. wagtail/tests/test_audit_log.py +72 -2
  1285. wagtail/tests/test_blocks.py +103 -0
  1286. wagtail/tests/test_signals.py +49 -2
  1287. wagtail/tests/test_streamfield.py +230 -0
  1288. wagtail/tests/test_utils.py +42 -1
  1289. wagtail/tests/tests.py +5 -0
  1290. wagtail/users/apps.py +1 -0
  1291. wagtail/users/forms.py +7 -0
  1292. wagtail/users/locale/af/LC_MESSAGES/django.po +1 -1
  1293. wagtail/users/locale/ar/LC_MESSAGES/django.po +5 -5
  1294. wagtail/users/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  1295. wagtail/users/locale/be/LC_MESSAGES/django.po +10 -10
  1296. wagtail/users/locale/bg/LC_MESSAGES/django.po +1 -1
  1297. wagtail/users/locale/bn/LC_MESSAGES/django.po +1 -1
  1298. wagtail/users/locale/ca/LC_MESSAGES/django.mo +0 -0
  1299. wagtail/users/locale/ca/LC_MESSAGES/django.po +12 -9
  1300. wagtail/users/locale/cs/LC_MESSAGES/django.po +7 -7
  1301. wagtail/users/locale/cy/LC_MESSAGES/django.po +9 -9
  1302. wagtail/users/locale/da/LC_MESSAGES/django.po +1 -1
  1303. wagtail/users/locale/de/LC_MESSAGES/django.mo +0 -0
  1304. wagtail/users/locale/de/LC_MESSAGES/django.po +12 -9
  1305. wagtail/users/locale/dv/LC_MESSAGES/django.po +1 -1
  1306. wagtail/users/locale/el/LC_MESSAGES/django.po +5 -5
  1307. wagtail/users/locale/en/LC_MESSAGES/django.po +55 -50
  1308. wagtail/users/locale/es/LC_MESSAGES/django.po +9 -9
  1309. wagtail/users/locale/es_419/LC_MESSAGES/django.po +1 -1
  1310. wagtail/users/locale/es_VE/LC_MESSAGES/django.po +1 -1
  1311. wagtail/users/locale/et/LC_MESSAGES/django.po +9 -9
  1312. wagtail/users/locale/eu/LC_MESSAGES/django.po +1 -1
  1313. wagtail/users/locale/fa/LC_MESSAGES/django.mo +0 -0
  1314. wagtail/users/locale/fa/LC_MESSAGES/django.po +70 -8
  1315. wagtail/users/locale/fi/LC_MESSAGES/django.po +9 -9
  1316. wagtail/users/locale/fr/LC_MESSAGES/django.mo +0 -0
  1317. wagtail/users/locale/fr/LC_MESSAGES/django.po +56 -12
  1318. wagtail/users/locale/gl/LC_MESSAGES/django.mo +0 -0
  1319. wagtail/users/locale/gl/LC_MESSAGES/django.po +12 -9
  1320. wagtail/users/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1321. wagtail/users/locale/hi/LC_MESSAGES/django.po +1 -1
  1322. wagtail/users/locale/hr_HR/LC_MESSAGES/django.po +11 -11
  1323. wagtail/users/locale/ht/LC_MESSAGES/django.po +1 -1
  1324. wagtail/users/locale/hu/LC_MESSAGES/django.po +9 -9
  1325. wagtail/users/locale/hy/LC_MESSAGES/django.po +1 -1
  1326. wagtail/users/locale/id_ID/LC_MESSAGES/django.po +5 -5
  1327. wagtail/users/locale/is_IS/LC_MESSAGES/django.po +9 -9
  1328. wagtail/users/locale/it/LC_MESSAGES/django.po +9 -9
  1329. wagtail/users/locale/ja/LC_MESSAGES/django.po +5 -5
  1330. wagtail/users/locale/ka/LC_MESSAGES/django.po +1 -1
  1331. wagtail/users/locale/ko/LC_MESSAGES/django.po +5 -5
  1332. wagtail/users/locale/lt/LC_MESSAGES/django.po +5 -5
  1333. wagtail/users/locale/lv/LC_MESSAGES/django.po +5 -5
  1334. wagtail/users/locale/mi/LC_MESSAGES/django.po +1 -1
  1335. wagtail/users/locale/mn/LC_MESSAGES/django.po +6 -5
  1336. wagtail/users/locale/my/LC_MESSAGES/django.po +1 -1
  1337. wagtail/users/locale/nb/LC_MESSAGES/django.po +9 -9
  1338. wagtail/users/locale/nl/LC_MESSAGES/django.mo +0 -0
  1339. wagtail/users/locale/nl/LC_MESSAGES/django.po +10 -7
  1340. wagtail/users/locale/pl/LC_MESSAGES/django.po +10 -10
  1341. wagtail/users/locale/pt_BR/LC_MESSAGES/django.po +10 -10
  1342. wagtail/users/locale/pt_PT/LC_MESSAGES/django.po +9 -9
  1343. wagtail/users/locale/ro/LC_MESSAGES/django.po +9 -9
  1344. wagtail/users/locale/ru/LC_MESSAGES/django.mo +0 -0
  1345. wagtail/users/locale/ru/LC_MESSAGES/django.po +15 -12
  1346. wagtail/users/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  1347. wagtail/users/locale/sk_SK/LC_MESSAGES/django.po +13 -6
  1348. wagtail/users/locale/sl/LC_MESSAGES/django.mo +0 -0
  1349. wagtail/users/locale/sl/LC_MESSAGES/django.po +57 -13
  1350. wagtail/users/locale/sv/LC_MESSAGES/django.mo +0 -0
  1351. wagtail/users/locale/sv/LC_MESSAGES/django.po +50 -11
  1352. wagtail/users/locale/tet/LC_MESSAGES/django.po +5 -5
  1353. wagtail/users/locale/th/LC_MESSAGES/django.po +5 -5
  1354. wagtail/users/locale/tr/LC_MESSAGES/django.po +5 -5
  1355. wagtail/users/locale/tr_TR/LC_MESSAGES/django.po +5 -5
  1356. wagtail/users/locale/uk/LC_MESSAGES/django.po +9 -9
  1357. wagtail/users/locale/vi/LC_MESSAGES/django.po +1 -1
  1358. wagtail/users/locale/zh/LC_MESSAGES/django.po +1 -1
  1359. wagtail/users/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  1360. wagtail/users/locale/zh_Hans/LC_MESSAGES/django.po +50 -6
  1361. wagtail/users/locale/zh_Hant/LC_MESSAGES/django.po +3 -3
  1362. wagtail/users/models.py +1 -0
  1363. wagtail/users/templates/wagtailusers/groups/includes/formatted_permissions.html +3 -2
  1364. wagtail/users/templatetags/wagtailusers_tags.py +9 -0
  1365. wagtail/users/tests/__init__.py +7 -1
  1366. wagtail/users/tests/test_admin_views.py +117 -32
  1367. wagtail/users/views/groups.py +4 -0
  1368. wagtail/users/views/users.py +58 -14
  1369. wagtail/users/wagtail_hooks.py +7 -123
  1370. wagtail/utils/utils.py +27 -0
  1371. wagtail/utils/version.py +5 -2
  1372. wagtail-6.2.dist-info/METADATA +78 -0
  1373. {wagtail-6.1.2.dist-info → wagtail-6.2.dist-info}/RECORD +1377 -1350
  1374. {wagtail-6.1.2.dist-info → wagtail-6.2.dist-info}/WHEEL +1 -1
  1375. wagtail/admin/templates/wagtailadmin/reports/aging_pages.html +0 -58
  1376. wagtail/admin/templates/wagtailadmin/reports/page_types_usage.html +0 -18
  1377. wagtail/admin/templates/wagtailadmin/reports/site_history.html +0 -57
  1378. wagtail/admin/templates/wagtailadmin/reports/workflow.html +0 -81
  1379. wagtail/admin/templates/wagtailadmin/reports/workflow_tasks.html +0 -63
  1380. wagtail/contrib/frontend_cache/backends.py +0 -400
  1381. wagtail/contrib/redirects/templates/wagtailredirects/list.html +0 -43
  1382. wagtail/contrib/redirects/templates/wagtailredirects/reports/redirects_report.html +0 -14
  1383. wagtail/contrib/redirects/tests/test_reports_view.py +0 -82
  1384. wagtail-6.1.2.dist-info/METADATA +0 -78
  1385. {wagtail-6.1.2.dist-info → wagtail-6.2.dist-info}/LICENSE +0 -0
  1386. {wagtail-6.1.2.dist-info → wagtail-6.2.dist-info}/entry_points.txt +0 -0
  1387. {wagtail-6.1.2.dist-info → wagtail-6.2.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- (()=>{"use strict";var e,t={4625:(e,t,c)=>{var n=c(9675);const o="[data-bulk-action-checkbox]",r="[data-bulk-action-select-all-checkbox]",d="[data-bulk-action-footer]",a="[data-bulk-action-num-objects]",l="[data-bulk-action-num-objects-in-listing]";let i={};function s(e){return wagtailConfig.STRINGS.BULK_ACTIONS[wagtailConfig.BULK_ACTION_ITEM_TYPE]?wagtailConfig.STRINGS.BULK_ACTIONS[wagtailConfig.BULK_ACTION_ITEM_TYPE][e]:wagtailConfig.STRINGS.BULK_ACTIONS.ITEM[e]}function u(e){document.querySelectorAll(r).forEach((t=>{t.checked=e.target.checked}));const t=new Event("change");document.querySelectorAll(o).forEach((c=>{c.checked!==e.target.checked&&(c.checked=e.target.checked,e.target.checked?c.dispatchEvent(t):c.classList.remove("show"))})),e.target.checked||(i.checkedObjects.clear(),document.querySelector(d).classList.add("hidden"))}function h(e){if(e.shiftKey&&i.prevCheckedObject){const t=[...document.querySelectorAll(o)],c=t.findIndex((e=>e.dataset.objectId===i.prevCheckedObject)),r=t.findIndex((t=>t.dataset.objectId===e.target.dataset.objectId)),d=(c>r?r:c)+1,a=c<=r?r:c;(0,n.y)(d,a).forEach((e=>{const n=new Event("change");t[e].checked=t[c].checked,t[e].dispatchEvent(n)})),i.prevCheckedObject=e.target.dataset.objectId}}function f(e){i.selectAllInListing&&(i.selectAllInListing=!1);const t=i.checkedObjects.size;e.target.checked?i.checkedObjects.add(e.target.dataset.objectId):(document.querySelectorAll(r).forEach((e=>{e.checked=!1})),i.checkedObjects.delete(e.target.dataset.objectId));const c=i.checkedObjects.size;if(0===c?(document.querySelector(d).classList.add("hidden"),document.querySelectorAll(o).forEach((e=>e.classList.remove("show")))):1===c&&0===t&&(document.querySelectorAll(o).forEach((e=>{e.classList.add("show")})),document.querySelector(d).classList.remove("hidden")),c===i.numObjects?(document.querySelectorAll(r).forEach((e=>{e.checked=!0})),i.shouldShowAllInListingText&&document.querySelector(l).classList.remove("w-hidden")):i.shouldShowAllInListingText&&document.querySelector(l).classList.add("w-hidden"),c>0){let e="";e=1===c?s("SINGULAR"):c===i.numObjects?s("ALL").replace("%(objects)s",c):s("PLURAL").replace("%(objects)s",c),document.querySelector(a).textContent=e}i.prevCheckedObject=e.target.dataset.objectId}function b(e){e.preventDefault(),i.selectAllInListing=!0,document.querySelector(a).textContent=`${s("ALL_IN_LISTING")}.`,document.querySelector(l).classList.add("w-hidden")}function g(e){e.preventDefault();const t=e.target.getAttribute("href"),c=new URLSearchParams(window.location.search);if(i.selectAllInListing){c.append("id","all");const e=document.querySelector("[data-bulk-action-parent-id]");if(e){const t=e.dataset.bulkActionParentId;c.append("childOf",t)}}else i.checkedObjects.forEach((e=>{c.append("id",e)}));window.location.href=`${t}&${c.toString()}`}document.addEventListener("DOMContentLoaded",(function(){i={checkedObjects:new Set,numObjects:0,selectAllInListing:!1,shouldShowAllInListingText:!0,prevCheckedObject:null};const e=new Event("change");document.querySelectorAll(o).forEach((e=>{i.numObjects+=1,e.addEventListener("change",f),e.addEventListener("click",h)})),document.querySelectorAll(r).forEach((e=>{e.addEventListener("change",u)})),document.querySelectorAll(`${d} [data-bulk-action-button]`).forEach((e=>e.addEventListener("click",g))),document.addEventListener("w-dropdown:shown",(()=>{document.querySelectorAll(`${d} [data-bulk-action-button]`).forEach((e=>{e.removeEventListener("click",g),e.addEventListener("click",g)}))}));const t=document.querySelector(l);t?t.addEventListener("click",b):i.shouldShowAllInListingText=!1,document.querySelectorAll(o).forEach((t=>{t.checked&&t.dispatchEvent(e)}))})),document.addEventListener("w-swap:success",(function(){document.querySelectorAll(r).forEach((e=>{e.checked=!1})),document.querySelector(d).classList.add("hidden"),document.querySelectorAll(r).forEach((e=>{e.removeEventListener("change",u),e.addEventListener("change",u)})),i.checkedObjects.clear(),i.numObjects=0,document.querySelectorAll(o).forEach((e=>{i.numObjects+=1,e.addEventListener("change",f)}))}))}},c={};function n(e){var o=c[e];if(void 0!==o)return o.exports;var r=c[e]={id:e,loaded:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.m=t,e=[],n.O=(t,c,o,r)=>{if(!c){var d=1/0;for(s=0;s<e.length;s++){for(var[c,o,r]=e[s],a=!0,l=0;l<c.length;l++)(!1&r||d>=r)&&Object.keys(n.O).every((e=>n.O[e](c[l])))?c.splice(l--,1):(a=!1,r<d&&(d=r));if(a){e.splice(s--,1);var i=o();void 0!==i&&(t=i)}}return t}r=r||0;for(var s=e.length;s>0&&e[s-1][2]>r;s--)e[s]=e[s-1];e[s]=[c,o,r]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var c in t)n.o(t,c)&&!n.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:t[c]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),n.j=217,(()=>{var e={217:0};n.O.j=t=>0===e[t];var t=(t,c)=>{var o,r,[d,a,l]=c,i=0;if(d.some((t=>0!==e[t]))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(l)var s=l(n)}for(t&&t(c);i<d.length;i++)r=d[i],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(s)},c=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];c.forEach(t.bind(null,0)),c.push=t.bind(null,c.push.bind(c))})();var o=n.O(void 0,[321],(()=>n(4625)));o=n.O(o)})();
1
+ (()=>{"use strict";var e,t={4625:(e,t,c)=>{var n=c(9675);const o="[data-bulk-action-checkbox]",r="[data-bulk-action-select-all-checkbox]",d="[data-bulk-action-footer]",a="[data-bulk-action-num-objects]",l="[data-bulk-action-num-objects-in-listing]";let i={};function s(e){return wagtailConfig.STRINGS.BULK_ACTIONS[wagtailConfig.BULK_ACTION_ITEM_TYPE]?wagtailConfig.STRINGS.BULK_ACTIONS[wagtailConfig.BULK_ACTION_ITEM_TYPE][e]:wagtailConfig.STRINGS.BULK_ACTIONS.ITEM[e]}function u(e){document.querySelectorAll(r).forEach((t=>{t.checked=e.target.checked}));const t=new Event("change");document.querySelectorAll(o).forEach((c=>{c.checked!==e.target.checked&&(c.checked=e.target.checked,e.target.checked?c.dispatchEvent(t):c.classList.remove("show"))})),e.target.checked||(i.checkedObjects.clear(),document.querySelector(d).classList.add("hidden"))}function h(e){if(e.shiftKey&&i.prevCheckedObject){const t=[...document.querySelectorAll(o)],c=t.findIndex((e=>e.dataset.objectId===i.prevCheckedObject)),r=t.findIndex((t=>t.dataset.objectId===e.target.dataset.objectId)),d=(c>r?r:c)+1,a=c<=r?r:c;(0,n.y)(d,a).forEach((e=>{const n=new Event("change");t[e].checked=t[c].checked,t[e].dispatchEvent(n)})),i.prevCheckedObject=e.target.dataset.objectId}}function f(e){i.selectAllInListing&&(i.selectAllInListing=!1);const t=i.checkedObjects.size;e.target.checked?i.checkedObjects.add(e.target.dataset.objectId):(document.querySelectorAll(r).forEach((e=>{e.checked=!1})),i.checkedObjects.delete(e.target.dataset.objectId));const c=i.checkedObjects.size;if(0===c?(document.querySelector(d).classList.add("hidden"),document.querySelectorAll(o).forEach((e=>e.classList.remove("show")))):1===c&&0===t&&(document.querySelectorAll(o).forEach((e=>{e.classList.add("show")})),document.querySelector(d).classList.remove("hidden")),c===i.numObjects?(document.querySelectorAll(r).forEach((e=>{e.checked=!0})),i.shouldShowAllInListingText&&document.querySelector(l).classList.remove("w-hidden")):i.shouldShowAllInListingText&&document.querySelector(l).classList.add("w-hidden"),c>0){let e="";e=1===c?s("SINGULAR"):c===i.numObjects?s("ALL").replace("%(objects)s",c):s("PLURAL").replace("%(objects)s",c),document.querySelector(a).textContent=e}i.prevCheckedObject=e.target.dataset.objectId}function b(e){e.preventDefault(),i.selectAllInListing=!0,document.querySelector(a).textContent=`${s("ALL_IN_LISTING")}.`,document.querySelector(l).classList.add("w-hidden")}function g(e){e.preventDefault();const t=e.target.getAttribute("href"),c=new URLSearchParams(window.location.search);if(i.selectAllInListing){c.append("id","all");const e=document.querySelector("[data-bulk-action-parent-id]");if(e){const t=e.dataset.bulkActionParentId;c.append("childOf",t)}}else i.checkedObjects.forEach((e=>{c.append("id",e)}));window.location.href=`${t}&${c.toString()}`}document.addEventListener("DOMContentLoaded",(function(){i={checkedObjects:new Set,numObjects:0,selectAllInListing:!1,shouldShowAllInListingText:!0,prevCheckedObject:null};const e=new Event("change");document.querySelectorAll(o).forEach((e=>{i.numObjects+=1,e.addEventListener("change",f),e.addEventListener("click",h)})),document.querySelectorAll(r).forEach((e=>{e.addEventListener("change",u)})),document.querySelectorAll(`${d} [data-bulk-action-button]`).forEach((e=>e.addEventListener("click",g))),document.addEventListener("w-dropdown:shown",(()=>{document.querySelectorAll(`${d} [data-bulk-action-button]`).forEach((e=>{e.removeEventListener("click",g),e.addEventListener("click",g)}))}));const t=document.querySelector(l);t?t.addEventListener("click",b):i.shouldShowAllInListingText=!1,document.querySelectorAll(o).forEach((t=>{t.checked&&t.dispatchEvent(e)}))})),document.addEventListener("w-swap:success",(function(){document.querySelectorAll(r).forEach((e=>{e.checked=!1})),document.querySelector(d).classList.add("hidden"),document.querySelectorAll(r).forEach((e=>{e.removeEventListener("change",u),e.addEventListener("change",u)})),i.checkedObjects.clear(),i.numObjects=0,document.querySelectorAll(o).forEach((e=>{i.numObjects+=1,e.addEventListener("change",f)}))}))}},c={};function n(e){var o=c[e];if(void 0!==o)return o.exports;var r=c[e]={exports:{}};return t[e](r,r.exports,n),r.exports}n.m=t,e=[],n.O=(t,c,o,r)=>{if(!c){var d=1/0;for(s=0;s<e.length;s++){for(var[c,o,r]=e[s],a=!0,l=0;l<c.length;l++)(!1&r||d>=r)&&Object.keys(n.O).every((e=>n.O[e](c[l])))?c.splice(l--,1):(a=!1,r<d&&(d=r));if(a){e.splice(s--,1);var i=o();void 0!==i&&(t=i)}}return t}r=r||0;for(var s=e.length;s>0&&e[s-1][2]>r;s--)e[s]=e[s-1];e[s]=[c,o,r]},n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var c in t)n.o(t,c)&&!n.o(e,c)&&Object.defineProperty(e,c,{enumerable:!0,get:t[c]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=217,(()=>{var e={217:0};n.O.j=t=>0===e[t];var t=(t,c)=>{var o,r,[d,a,l]=c,i=0;if(d.some((t=>0!==e[t]))){for(o in a)n.o(a,o)&&(n.m[o]=a[o]);if(l)var s=l(n)}for(t&&t(c);i<d.length;i++)r=d[i],n.o(e,r)&&e[r]&&e[r][0](),e[r]=0;return n.O(s)},c=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];c.forEach(t.bind(null,0)),c.push=t.bind(null,c.push.bind(c))})();var o=n.O(void 0,[321],(()=>n(4625)));o=n.O(o)})();
@@ -1 +1 @@
1
- (()=>{"use strict";var e,r={7599:(e,r,o)=>{var t=o(2614);window.ChooserModalOnloadHandlerFactory=t.C4,window.CHOOSER_MODAL_ONLOAD_HANDLERS=t.FF},1669:e=>{e.exports=jQuery}},o={};function t(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(a.exports,a,a.exports,t),a.loaded=!0,a.exports}t.m=r,e=[],t.O=(r,o,n,a)=>{if(!o){var i=1/0;for(s=0;s<e.length;s++){for(var[o,n,a]=e[s],l=!0,d=0;d<o.length;d++)(!1&a||i>=a)&&Object.keys(t.O).every((e=>t.O[e](o[d])))?o.splice(d--,1):(l=!1,a<i&&(i=a));if(l){e.splice(s--,1);var u=n();void 0!==u&&(r=u)}}return r}a=a||0;for(var s=e.length;s>0&&e[s-1][2]>a;s--)e[s]=e[s-1];e[s]=[o,n,a]},t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t.j=238,(()=>{var e={238:0};t.O.j=r=>0===e[r];var r=(r,o)=>{var n,a,[i,l,d]=o,u=0;if(i.some((r=>0!==e[r]))){for(n in l)t.o(l,n)&&(t.m[n]=l[n]);if(d)var s=d(t)}for(r&&r(o);u<i.length;u++)a=i[u],t.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return t.O(s)},o=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})();var n=t.O(void 0,[321],(()=>t(7599)));n=t.O(n)})();
1
+ (()=>{"use strict";var e,r={7599:(e,r,o)=>{var t=o(2614);window.ChooserModalOnloadHandlerFactory=t.C4,window.CHOOSER_MODAL_ONLOAD_HANDLERS=t.FF},1669:e=>{e.exports=jQuery}},o={};function t(e){var n=o[e];if(void 0!==n)return n.exports;var a=o[e]={exports:{}};return r[e](a,a.exports,t),a.exports}t.m=r,e=[],t.O=(r,o,n,a)=>{if(!o){var i=1/0;for(f=0;f<e.length;f++){for(var[o,n,a]=e[f],l=!0,u=0;u<o.length;u++)(!1&a||i>=a)&&Object.keys(t.O).every((e=>t.O[e](o[u])))?o.splice(u--,1):(l=!1,a<i&&(i=a));if(l){e.splice(f--,1);var d=n();void 0!==d&&(r=d)}}return r}a=a||0;for(var f=e.length;f>0&&e[f-1][2]>a;f--)e[f]=e[f-1];e[f]=[o,n,a]},t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.j=238,(()=>{var e={238:0};t.O.j=r=>0===e[r];var r=(r,o)=>{var n,a,[i,l,u]=o,d=0;if(i.some((r=>0!==e[r]))){for(n in l)t.o(l,n)&&(t.m[n]=l[n]);if(u)var f=u(t)}for(r&&r(o);d<i.length;d++)a=i[d],t.o(e,a)&&e[a]&&e[a][0](),e[a]=0;return t.O(f)},o=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})();var n=t.O(void 0,[321],(()=>t(7599)));n=t.O(n)})();
@@ -1 +1 @@
1
- (()=>{"use strict";var e,r={8878:(e,r,t)=>{var o=t(9465);window.telepath.register("wagtail.admin.widgets.Chooser",o._)},1669:e=>{e.exports=jQuery}},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=r,e=[],o.O=(r,t,n,i)=>{if(!t){var a=1/0;for(s=0;s<e.length;s++){for(var[t,n,i]=e[s],l=!0,d=0;d<t.length;d++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](t[d])))?t.splice(d--,1):(l=!1,i<a&&(a=i));if(l){e.splice(s--,1);var u=n();void 0!==u&&(r=u)}}return r}i=i||0;for(var s=e.length;s>0&&e[s-1][2]>i;s--)e[s]=e[s-1];e[s]=[t,n,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=577,(()=>{var e={577:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var n,i,[a,l,d]=t,u=0;if(a.some((r=>0!==e[r]))){for(n in l)o.o(l,n)&&(o.m[n]=l[n]);if(d)var s=d(o)}for(r&&r(t);u<a.length;u++)i=a[u],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(s)},t=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var n=o.O(void 0,[321],(()=>o(8878)));n=o.O(n)})();
1
+ (()=>{"use strict";var e,r={8878:(e,r,t)=>{var o=t(9465);window.telepath.register("wagtail.admin.widgets.Chooser",o._)},1669:e=>{e.exports=jQuery}},t={};function o(e){var n=t[e];if(void 0!==n)return n.exports;var i=t[e]={exports:{}};return r[e](i,i.exports,o),i.exports}o.m=r,e=[],o.O=(r,t,n,i)=>{if(!t){var a=1/0;for(f=0;f<e.length;f++){for(var[t,n,i]=e[f],l=!0,u=0;u<t.length;u++)(!1&i||a>=i)&&Object.keys(o.O).every((e=>o.O[e](t[u])))?t.splice(u--,1):(l=!1,i<a&&(a=i));if(l){e.splice(f--,1);var s=n();void 0!==s&&(r=s)}}return r}i=i||0;for(var f=e.length;f>0&&e[f-1][2]>i;f--)e[f]=e[f-1];e[f]=[t,n,i]},o.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return o.d(r,{a:r}),r},o.d=(e,r)=>{for(var t in r)o.o(r,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.j=577,(()=>{var e={577:0};o.O.j=r=>0===e[r];var r=(r,t)=>{var n,i,[a,l,u]=t,s=0;if(a.some((r=>0!==e[r]))){for(n in l)o.o(l,n)&&(o.m[n]=l[n]);if(u)var f=u(o)}for(r&&r(t);s<a.length;s++)i=a[s],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(f)},t=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})();var n=o.O(void 0,[321],(()=>o(8878)));n=o.O(n)})();
@@ -1 +1 @@
1
- (()=>{"use strict";var e,r={2732:(e,r,o)=>{var t=o(9465);window.Chooser=t.y},1669:e=>{e.exports=jQuery}},o={};function t(e){var n=o[e];if(void 0!==n)return n.exports;var i=o[e]={id:e,loaded:!1,exports:{}};return r[e].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}t.m=r,e=[],t.O=(r,o,n,i)=>{if(!o){var a=1/0;for(s=0;s<e.length;s++){for(var[o,n,i]=e[s],l=!0,d=0;d<o.length;d++)(!1&i||a>=i)&&Object.keys(t.O).every((e=>t.O[e](o[d])))?o.splice(d--,1):(l=!1,i<a&&(a=i));if(l){e.splice(s--,1);var u=n();void 0!==u&&(r=u)}}return r}i=i||0;for(var s=e.length;s>0&&e[s-1][2]>i;s--)e[s]=e[s-1];e[s]=[o,n,i]},t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),t.j=307,(()=>{var e={307:0};t.O.j=r=>0===e[r];var r=(r,o)=>{var n,i,[a,l,d]=o,u=0;if(a.some((r=>0!==e[r]))){for(n in l)t.o(l,n)&&(t.m[n]=l[n]);if(d)var s=d(t)}for(r&&r(o);u<a.length;u++)i=a[u],t.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return t.O(s)},o=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})();var n=t.O(void 0,[321],(()=>t(2732)));n=t.O(n)})();
1
+ (()=>{"use strict";var e,r={2732:(e,r,o)=>{var t=o(9465);window.Chooser=t.y},1669:e=>{e.exports=jQuery}},o={};function t(e){var n=o[e];if(void 0!==n)return n.exports;var i=o[e]={exports:{}};return r[e](i,i.exports,t),i.exports}t.m=r,e=[],t.O=(r,o,n,i)=>{if(!o){var a=1/0;for(s=0;s<e.length;s++){for(var[o,n,i]=e[s],l=!0,u=0;u<o.length;u++)(!1&i||a>=i)&&Object.keys(t.O).every((e=>t.O[e](o[u])))?o.splice(u--,1):(l=!1,i<a&&(a=i));if(l){e.splice(s--,1);var f=n();void 0!==f&&(r=f)}}return r}i=i||0;for(var s=e.length;s>0&&e[s-1][2]>i;s--)e[s]=e[s-1];e[s]=[o,n,i]},t.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return t.d(r,{a:r}),r},t.d=(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),t.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.j=307,(()=>{var e={307:0};t.O.j=r=>0===e[r];var r=(r,o)=>{var n,i,[a,l,u]=o,f=0;if(a.some((r=>0!==e[r]))){for(n in l)t.o(l,n)&&(t.m[n]=l[n]);if(u)var s=u(t)}for(r&&r(o);f<a.length;f++)i=a[f],t.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return t.O(s)},o=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];o.forEach(r.bind(null,0)),o.push=r.bind(null,o.push.bind(o))})();var n=t.O(void 0,[321],(()=>t(2732)));n=t.O(n)})();
@@ -1 +1 @@
1
- (()=>{"use strict";var e,t={406:(e,t,n)=>{var o=n(2833),r=n(2427),i=n.n(r),s=n(6931),a=n.n(s);function c(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var l="function"==typeof Symbol&&Symbol.observable||"@@observable",m=function(){return Math.random().toString(36).substring(7).split("").join(".")},u={INIT:"@@redux/INIT"+m(),REPLACE:"@@redux/REPLACE"+m(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+m()}};function d(e,t,n){var o;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(c(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(c(1));return n(d)(e,t)}if("function"!=typeof e)throw new Error(c(2));var r=e,i=t,s=[],a=s,m=!1;function p(){a===s&&(a=s.slice())}function f(){if(m)throw new Error(c(3));return i}function h(e){if("function"!=typeof e)throw new Error(c(4));if(m)throw new Error(c(5));var t=!0;return p(),a.push(e),function(){if(t){if(m)throw new Error(c(6));t=!1,p();var n=a.indexOf(e);a.splice(n,1),s=null}}}function y(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(c(7));if(void 0===e.type)throw new Error(c(8));if(m)throw new Error(c(9));try{m=!0,i=r(i,e)}finally{m=!1}for(var t=s=a,n=0;n<t.length;n++)(0,t[n])();return e}return y({type:u.INIT}),(o={dispatch:y,subscribe:h,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw new Error(c(10));r=e,y({type:u.REPLACE})}})[l]=function(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(c(11));function n(){e.next&&e.next(f())}return n(),{unsubscribe:t(n)}}})[l]=function(){return this},e},o}function p(e,t,n){const o=e.get(t);return void 0===o?n:o}class f{commentElements=new Map;commentAnnotations=new Map;commentTabs=new Map;commentDesiredPositions=new Map;commentHeights=new Map;pinnedComment=null;commentCalculatedPositions=new Map;isDirty=!1;setCommentElement(e,t){null!==t?this.commentElements.set(e,t):this.commentElements.delete(e),this.isDirty=!0}setCommentAnnotation(e,t){this.commentAnnotations.set(e,t),this.commentTabs.set(e,t.getTab()||null),this.updateDesiredPosition(e),this.isDirty=!0}setCommentHeight(e,t){this.commentHeights.get(e)!==t&&(this.commentHeights.set(e,t),this.isDirty=!0)}setPinnedComment(e){this.pinnedComment=e,this.isDirty=!0}updateDesiredPosition(e){const t=this.commentAnnotations.get(e);if(!t)return;const n=t.getAnchorNode(e===this.pinnedComment);let o=n.getBoundingClientRect().top,r=n.parentElement;for(;r;)o+=r.scrollTop,r=r.parentElement;this.commentDesiredPositions.set(e,0!==o?o+-50:0)}refreshDesiredPositions(e=null){const t=new Map(this.commentDesiredPositions);this.commentAnnotations.forEach(((t,n)=>{this.getCommentTabVisible(e,n)&&this.updateDesiredPosition(n)})),this.commentDesiredPositions!==t&&(this.isDirty=!0)}refreshLayout(){if(!this.isDirty)return!1;const e=Array.from(this.commentElements.keys()).map((e=>({tab:p(this.commentTabs,e,null),position:p(this.commentDesiredPositions,e,0),height:p(this.commentHeights,e,0),comments:[e],containsPinnedComment:null!==this.pinnedComment&&e===this.pinnedComment,pinnedCommentPosition:0}))),t=new Map;e.forEach((e=>{const n=t.get(e.tab)||[];n.push(e),t.set(e.tab,n)}));const n=this.pinnedComment?this.commentDesiredPositions.get(this.pinnedComment):void 0,o=this.pinnedComment?this.commentTabs.get(this.pinnedComment):void 0;return Array.from(t.entries()).forEach((([e,t])=>{const r=this.pinnedComment&&o===e;t.sort(((e,t)=>e.position-t.position));let i=t,s=!0;for(;s;){s=!1;const e=[];let t=null;for(const o of i)t&&t.position+t.height+20>o.position?(s=!0,t.comments.push(...o.comments),o.containsPinnedComment&&(t.containsPinnedComment=!0,t.pinnedCommentPosition=o.pinnedCommentPosition+t.height),t.height+=o.height,!r&&t.position<50&&(t.position=100+t.height- -50),n&&t.containsPinnedComment&&(t.position=n-t.pinnedCommentPosition)):(e.push(o),t=o);i=e}i.forEach((e=>{let t=e.position;e.comments.forEach((e=>{this.commentCalculatedPositions.set(e,t);const n=this.commentHeights.get(e);n&&(t+=n+20)}))}))})),this.isDirty=!1,!0}getCommentTabVisible(e,t){return p(this.commentTabs,t,null)===e}getCommentVisible(e,t){return this.getCommentTabVisible(e,t)&&p(this.commentDesiredPositions,t,1)>0}getCommentPosition(e){return this.commentCalculatedPositions.has(e)?this.commentCalculatedPositions.get(e):this.commentDesiredPositions.get(e)}}let h=1,y=1;function v(){return h+=1,h}function b(){return y+=1,y}function g(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function E(e){return!!e&&!!e[ae]}function _(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===le}(e)||Array.isArray(e)||!!e[se]||!!(null===(t=e.constructor)||void 0===t?void 0:t[se])||A(e)||x(e))}function C(e,t,n){void 0===n&&(n=!1),0===w(e)?(n?Object.keys:me)(e).forEach((function(o){n&&"symbol"==typeof o||t(o,e[o],e)})):e.forEach((function(n,o){return t(o,n,e)}))}function w(e){var t=e[ae];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:A(e)?2:x(e)?3:0}function P(e,t){return 2===w(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function I(e,t,n){var o=w(e);2===o?e.set(t,n):3===o?e.add(n):e[t]=n}function N(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function A(e){return ne&&e instanceof Map}function x(e){return oe&&e instanceof Set}function O(e){return e.o||e.t}function k(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ue(e);delete t[ae];for(var n=me(t),o=0;o<n.length;o++){var r=n[o],i=t[r];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[r]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[r]})}return Object.create(Object.getPrototypeOf(e),t)}function R(e,t){return void 0===t&&(t=!1),F(e)||E(e)||!_(e)||(w(e)>1&&(e.set=e.add=e.clear=e.delete=D),Object.freeze(e),t&&C(e,(function(e,t){return R(t,!0)}),!0)),e}function D(){g(2)}function F(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function S(e){var t=de[e];return t||g(18,e),t}function T(e,t){de[e]||(de[e]=t)}function j(){return ee}function M(e,t){t&&(S("Patches"),e.u=[],e.s=[],e.v=t)}function L(e){U(e),e.p.forEach(H),e.p=null}function U(e){e===ee&&(ee=e.l)}function z(e){return ee={p:[],l:ee,h:e,m:!0,_:0}}function H(e){var t=e[ae];0===t.i||1===t.i?t.j():t.g=!0}function $(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.O||S("ES5").S(t,e,o),o?(n[ae].P&&(L(t),g(4)),_(e)&&(e=q(t,e),t.l||V(t,e)),t.u&&S("Patches").M(n[ae].t,e,t.u,t.s)):e=q(t,n,[]),L(t),t.u&&t.v(t.u,t.s),e!==ie?e:void 0}function q(e,t,n){if(F(t))return t;var o=t[ae];if(!o)return C(t,(function(r,i){return K(e,o,t,r,i,n)}),!0),t;if(o.A!==e)return t;if(!o.P)return V(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=4===o.i||5===o.i?o.o=k(o.k):o.o,i=r,s=!1;3===o.i&&(i=new Set(r),r.clear(),s=!0),C(i,(function(t,i){return K(e,o,r,t,i,n,s)})),V(e,r,!1),n&&e.u&&S("Patches").N(o,n,e.u,e.s)}return o.o}function K(e,t,n,o,r,i,s){if(E(r)){var a=q(e,r,i&&t&&3!==t.i&&!P(t.R,o)?i.concat(o):void 0);if(I(n,o,a),!E(a))return;e.m=!1}else s&&n.add(r);if(_(r)&&!F(r)){if(!e.h.D&&e._<1)return;q(e,r),t&&t.A.l||V(e,r)}}function V(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&R(t,n)}function B(e,t){var n=e[ae];return(n?O(n):e)[t]}function W(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Object.getPrototypeOf(n)}}function J(e){e.P||(e.P=!0,e.l&&J(e.l))}function X(e){e.o||(e.o=k(e.t))}function Y(e,t,n){var o=A(t)?S("MapSet").F(t,n):x(t)?S("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),o={i:n?1:0,A:t?t.A:j(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},r=o,i=pe;n&&(r=[o],i=fe);var s=Proxy.revocable(r,i),a=s.revoke,c=s.proxy;return o.k=c,o.j=a,c}(t,n):S("ES5").J(t,n);return(n?n.A:j()).p.push(o),o}function G(e){return E(e)||g(22,e),function e(t){if(!_(t))return t;var n,o=t[ae],r=w(t);if(o){if(!o.P&&(o.i<4||!S("ES5").K(o)))return o.t;o.I=!0,n=Q(t,r),o.I=!1}else n=Q(t,r);return C(n,(function(t,r){o&&function(e,t){return 2===w(e)?e.get(t):e[t]}(o.t,t)===r||I(n,t,e(r))})),3===r?new Set(n):n}(e)}function Q(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return k(e)}var Z,ee,te="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ne="undefined"!=typeof Map,oe="undefined"!=typeof Set,re="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ie=te?Symbol.for("immer-nothing"):((Z={})["immer-nothing"]=!0,Z),se=te?Symbol.for("immer-draftable"):"__$immer_draftable",ae=te?Symbol.for("immer-state"):"__$immer_state",ce="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",le=""+Object.prototype.constructor,me="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ue=Object.getOwnPropertyDescriptors||function(e){var t={};return me(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},de={},pe={get:function(e,t){if(t===ae)return e;var n=O(e);if(!P(n,t))return function(e,t,n){var o,r=W(t,n);return r?"value"in r?r.value:null===(o=r.get)||void 0===o?void 0:o.call(e.k):void 0}(e,n,t);var o=n[t];return e.I||!_(o)?o:o===B(e.t,t)?(X(e),e.o[t]=Y(e.A.h,o,e)):o},has:function(e,t){return t in O(e)},ownKeys:function(e){return Reflect.ownKeys(O(e))},set:function(e,t,n){var o=W(O(e),t);if(null==o?void 0:o.set)return o.set.call(e.k,n),!0;if(!e.P){var r=B(O(e),t),i=null==r?void 0:r[ae];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(N(n,r)&&(void 0!==n||P(e.t,t)))return!0;X(e),J(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==B(e.t,t)||t in e.t?(e.R[t]=!1,X(e),J(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=O(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},defineProperty:function(){g(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){g(12)}},fe={};C(pe,(function(e,t){fe[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),fe.deleteProperty=function(e,t){return fe.set.call(this,e,t,void 0)},fe.set=function(e,t,n){return pe.set.call(this,e[0],t,n,e[0])};var he=function(){function e(e){var t=this;this.O=re,this.D=!0,this.produce=function(e,n,o){if("function"==typeof e&&"function"!=typeof n){var r=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=r);for(var o=arguments.length,s=Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];return i.produce(e,(function(e){var o;return(o=n).call.apply(o,[t,e].concat(s))}))}}var s;if("function"!=typeof n&&g(6),void 0!==o&&"function"!=typeof o&&g(7),_(e)){var a=z(t),c=Y(t,e,void 0),l=!0;try{s=n(c),l=!1}finally{l?L(a):U(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(e){return M(a,o),$(e,a)}),(function(e){throw L(a),e})):(M(a,o),$(s,a))}if(!e||"object"!=typeof e){if(void 0===(s=n(e))&&(s=e),s===ie&&(s=void 0),t.D&&R(s,!0),o){var m=[],u=[];S("Patches").M(e,s,m,u),o(m,u)}return s}g(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var o=arguments.length,r=Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(r))}))};var o,r,i=t.produce(e,n,(function(e,t){o=e,r=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,o,r]})):[i,o,r]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){_(e)||g(8),E(e)&&(e=G(e));var t=z(this),n=Y(this,e,void 0);return n[ae].C=!0,U(t),n},t.finishDraft=function(e,t){var n=(e&&e[ae]).A;return M(n,t),$(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!re&&g(20),this.O=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));var r=S("Patches").$;return E(e)?r(e,t):this.produce(e,(function(e){return r(e,t)}))},e}(),ye=new he,ve=ye.produce;ye.produceWithPatches.bind(ye),ye.setAutoFreeze.bind(ye),ye.setUseProxies.bind(ye),ye.applyPatches.bind(ye),ye.createDraft.bind(ye),ye.finishDraft.bind(ye);const be=ve,ge="add-comment",Ee="update-comment",_e="delete-comment",Ce="resolve-comment",we="set-focused-comment",Pe="add-reply",Ie="update-reply",Ne="delete-reply",Ae="invalidate-content-path";function xe(e){return{type:ge,comment:e}}function Oe(e,t){return{type:Ee,commentId:e,update:t}}function ke(e){return{type:_e,commentId:e}}function Re(e){return{type:Ce,commentId:e}}function De(e,{updatePinnedComment:t,forceFocus:n}={updatePinnedComment:!1,forceFocus:!1}){return{type:we,commentId:e,updatePinnedComment:t,forceFocus:n}}function Fe(e,t){return{type:Pe,commentId:e,reply:t}}function Se(e,t,n){return{type:Ie,commentId:e,replyId:t,update:n}}function Te(e,t){return{type:Ne,commentId:e,replyId:t}}function je(e){return{type:Ae,contentPath:e}}const Me={addComment:xe,updateComment:Oe,deleteComment:ke,resolveComment:Re,setFocusedComment:De,addReply:Fe,updateReply:Se,deleteReply:Te,invalidateContentPath:je};function Le(e,t,n,{remoteId:o=null,mode:r="default",text:i="",deleted:s=!1}){return{localId:e,remoteId:o,mode:r,author:t,date:n,text:i,originalText:i,newText:"",deleted:s}}function Ue(e,t,n,o,r,i,{remoteId:s=null,mode:a="default",text:c="",resolved:l=!1,deleted:m=!1,replies:u=new Map}){return{contentpath:e,position:t,localId:n,annotation:o,remoteId:s,mode:a,author:r,date:i,text:c,originalText:c,replies:u,newReply:"",newText:"",deleted:m,resolved:l,remoteReplyCount:Array.from(u.values()).reduce(((e,t)=>null!==t.remoteId?e+1:e),0)}}(function(){function e(e,t){var n=r[e];return n?n.enumerable=t:r[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[ae];return pe.get(t,e)},set:function(t){var n=this[ae];pe.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var r=e[t][ae];if(!r.P)switch(r.i){case 5:o(r)&&J(r);break;case 4:n(r)&&J(r)}}}function n(e){for(var t=e.t,n=e.k,o=me(n),r=o.length-1;r>=0;r--){var i=o[r];if(i!==ae){var s=t[i];if(void 0===s&&!P(t,i))return!0;var a=n[i],c=a&&a[ae];if(c?c.t!==s:!N(a,s))return!0}}var l=!!t[ae];return o.length!==me(t).length+(l?0:1)}function o(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var o=0;o<t.length;o++)if(!t.hasOwnProperty(o))return!0;return!1}var r={};T("ES5",{J:function(t,n){var o=Array.isArray(t),r=function(t,n){if(t){for(var o=Array(n.length),r=0;r<n.length;r++)Object.defineProperty(o,""+r,e(r,!0));return o}var i=ue(n);delete i[ae];for(var s=me(i),a=0;a<s.length;a++){var c=s[a];i[c]=e(c,t||!!i[c].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(o,t),i={i:o?5:4,A:n?n.A:j(),P:!1,I:!1,R:{},l:n,t,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,ae,{value:i,writable:!0}),r},S:function(e,n,r){r?E(n)&&n[ae].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[ae];if(n){var r=n.t,i=n.k,s=n.R,a=n.i;if(4===a)C(i,(function(t){t!==ae&&(void 0!==r[t]||P(r,t)?s[t]||e(i[t]):(s[t]=!0,J(n)))})),C(r,(function(e){void 0!==i[e]||P(i,e)||(s[e]=!1,J(n))}));else if(5===a){if(o(n)&&(J(n),s.length=!0),i.length<r.length)for(var c=i.length;c<r.length;c++)s[c]=!1;else for(var l=r.length;l<i.length;l++)s[l]=!0;for(var m=Math.min(i.length,r.length),u=0;u<m;u++)i.hasOwnProperty(u)||(s[u]=!0),void 0===s[u]&&e(i[u])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):o(e)}})})(),function(){function e(e,t){function n(){this.constructor=e}r(e,t),e.prototype=(n.prototype=t.prototype,new n)}function t(e){e.o||(e.R=new Map,e.o=new Map(e.t))}function n(e){e.o||(e.o=new Set,e.t.forEach((function(t){if(_(t)){var n=Y(e.A.h,t,e);e.p.set(t,n),e.o.add(n)}else e.o.add(t)})))}function o(e){e.g&&g(3,JSON.stringify(O(e)))}var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},i=function(){function n(e,t){return this[ae]={i:2,l:t,A:t?t.A:j(),P:!1,I:!1,o:void 0,R:void 0,t:e,k:this,C:!1,g:!1},this}e(n,Map);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return O(this[ae]).size}}),r.has=function(e){return O(this[ae]).has(e)},r.set=function(e,n){var r=this[ae];return o(r),O(r).has(e)&&O(r).get(e)===n||(t(r),J(r),r.R.set(e,!0),r.o.set(e,n),r.R.set(e,!0)),this},r.delete=function(e){if(!this.has(e))return!1;var n=this[ae];return o(n),t(n),J(n),n.t.has(e)?n.R.set(e,!1):n.R.delete(e),n.o.delete(e),!0},r.clear=function(){var e=this[ae];o(e),O(e).size&&(t(e),J(e),e.R=new Map,C(e.t,(function(t){e.R.set(t,!1)})),e.o.clear())},r.forEach=function(e,t){var n=this;O(this[ae]).forEach((function(o,r){e.call(t,n.get(r),r,n)}))},r.get=function(e){var n=this[ae];o(n);var r=O(n).get(e);if(n.I||!_(r))return r;if(r!==n.t.get(e))return r;var i=Y(n.A.h,r,n);return t(n),n.o.set(e,i),i},r.keys=function(){return O(this[ae]).keys()},r.values=function(){var e,t=this,n=this.keys();return(e={})[ce]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},r.entries=function(){var e,t=this,n=this.keys();return(e={})[ce]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var o=t.get(e.value);return{done:!1,value:[e.value,o]}},e},r[ce]=function(){return this.entries()},n}(),s=function(){function t(e,t){return this[ae]={i:3,l:t,A:t?t.A:j(),P:!1,I:!1,o:void 0,t:e,k:this,p:new Map,g:!1,C:!1},this}e(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return O(this[ae]).size}}),r.has=function(e){var t=this[ae];return o(t),t.o?!!t.o.has(e)||!(!t.p.has(e)||!t.o.has(t.p.get(e))):t.t.has(e)},r.add=function(e){var t=this[ae];return o(t),this.has(e)||(n(t),J(t),t.o.add(e)),this},r.delete=function(e){if(!this.has(e))return!1;var t=this[ae];return o(t),n(t),J(t),t.o.delete(e)||!!t.p.has(e)&&t.o.delete(t.p.get(e))},r.clear=function(){var e=this[ae];o(e),O(e).size&&(n(e),J(e),e.o.clear())},r.values=function(){var e=this[ae];return o(e),n(e),e.o.values()},r.entries=function(){var e=this[ae];return o(e),n(e),e.o.entries()},r.keys=function(){return this.values()},r[ce]=function(){return this.values()},r.forEach=function(e,t){for(var n=this.values(),o=n.next();!o.done;)e.call(t,o.value,o.value,this),o=n.next()},t}();T("MapSet",{F:function(e,t){return new i(e,t)},T:function(e,t){return new s(e,t)}})}();const ze=be(((e,t)=>{const n=t=>{t.remoteId?t.resolved=!0:e.comments.delete(t.localId),e.focusedComment===t.localId&&(e.focusedComment=null),e.pinnedComment===t.localId&&(e.pinnedComment=null)};switch(t.type){case ge:e.comments.set(t.comment.localId,t.comment),t.comment.remoteId&&(e.remoteCommentCount+=1);break;case Ee:{const n=e.comments.get(t.commentId);if(n){if(t.update.newText&&0===t.update.newText.length)break;Object.assign(n,t.update)}break}case _e:{const n=e.comments.get(t.commentId);if(!n)break;(t=>{t.remoteId?t.deleted=!0:e.comments.delete(t.localId),e.focusedComment===t.localId&&(e.focusedComment=null,e.forceFocus=!1),e.pinnedComment===t.localId&&(e.pinnedComment=null)})(n);break}case Ce:{const o=e.comments.get(t.commentId);if(!o)break;n(o);break}case we:(null===t.commentId||e.comments.has(t.commentId))&&(e.focusedComment=t.commentId,t.updatePinnedComment&&(e.pinnedComment=t.commentId),e.forceFocus=t.forceFocus);break;case Pe:{const n=e.comments.get(t.commentId);if(!n||0===t.reply.text.length)break;t.reply.remoteId&&(n.remoteReplyCount+=1),n.replies.set(t.reply.localId,t.reply);break}case Ie:{const n=e.comments.get(t.commentId);if(!n)break;const o=n.replies.get(t.replyId);if(!o)break;if(t.update.newText&&0===t.update.newText.length)break;Object.assign(o,t.update);break}case Ne:{const n=e.comments.get(t.commentId);if(!n)break;const o=n.replies.get(t.replyId);if(!o)break;o.remoteId?o.deleted=!0:n.replies.delete(o.localId);break}case Ae:{const o=e.comments;for(const e of o.values())e.contentpath.startsWith(t.contentPath)&&n(e);break}}}),{comments:new Map,forceFocus:!1,focusedComment:null,pinnedComment:null,remoteCommentCount:0}),He="update-global-settings";function $e(e){return{type:He,update:e}}const qe={user:null,currentTab:null},Ke=function(e){for(var t=Object.keys(e),n={},o=0;o<t.length;o++){var r=t[o];"function"==typeof e[r]&&(n[r]=e[r])}var i,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:u.INIT}))throw new Error(c(12));if(void 0===n(void 0,{type:u.PROBE_UNKNOWN_ACTION()}))throw new Error(c(13))}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var o=!1,r={},a=0;a<s.length;a++){var l=s[a],m=n[l],u=e[l],d=m(u,t);if(void 0===d)throw t&&t.type,new Error(c(14));r[l]=d,o=o||d!==u}return(o=o||s.length!==Object.keys(e).length)?r:e}}({comments:ze,settings:be(((e,t)=>{t.type===He&&Object.assign(e,t.update)}),qe)});var Ve="NOT_FOUND",Be=function(e,t){return e===t};function We(e,t){var n,o,r="object"==typeof t?t:{equalityCheck:t},i=r.equalityCheck,s=void 0===i?Be:i,a=r.maxSize,c=void 0===a?1:a,l=r.resultEqualityCheck,m=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var o=t.length,r=0;r<o;r++)if(!e(t[r],n[r]))return!1;return!0}}(s),u=1===c?(n=m,{get:function(e){return o&&n(o.key,e)?o.value:Ve},put:function(e,t){o={key:e,value:t}},getEntries:function(){return o?[o]:[]},clear:function(){o=void 0}}):function(e,t){var n=[];function o(e){var o=n.findIndex((function(n){return t(e,n.key)}));if(o>-1){var r=n[o];return o>0&&(n.splice(o,1),n.unshift(r)),r.value}return Ve}return{get:o,put:function(t,r){o(t)===Ve&&(n.unshift({key:t,value:r}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(c,m);function d(){var t=u.get(arguments);if(t===Ve){if(t=e.apply(null,arguments),l){var n=u.getEntries().find((function(e){return l(e.value,t)}));n&&(t=n.value)}u.put(arguments,t)}return t}return d.clearCache=function(){return u.clear()},d}function Je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];var i,s=0,a={memoizeOptions:void 0},c=o.pop();if("object"==typeof c&&(a=c,c=o.pop()),"function"!=typeof c)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof c+"]");var l=a.memoizeOptions,m=void 0===l?n:l,u=Array.isArray(m)?m:[m],d=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}(o),p=e.apply(void 0,[function(){return s++,c.apply(null,arguments)}].concat(u)),f=e((function(){for(var e=[],t=d.length,n=0;n<t;n++)e.push(d[n].apply(null,arguments));return i=p.apply(null,e)}));return Object.assign(f,{resultFunc:c,memoizedResultFunc:p,dependencies:d,lastResult:function(){return i},recomputations:function(){return s},resetRecomputations:function(){return s=0}}),f}}var Xe=Je(We);const Ye=e=>e.comments.comments,Ge=e=>e.comments.focusedComment;function Qe(e){return Xe(Ye,(t=>[...t.values()].filter((t=>t.contentpath===e&&!(t.deleted||t.resolved)))))}function Ze(e){return Xe(Ye,(t=>{const n=t.get(e);if(void 0===n||!n.deleted&&!n.resolved)return n}))}const et=Xe(Ye,(e=>e.comments.remoteCommentCount),((e,t)=>t!==e.size||Array.from(e.values()).some((e=>!(!e.deleted&&!e.resolved&&e.replies.size===e.remoteReplyCount&&e.originalText===e.text)||Array.from(e.replies.values()).some((e=>e.deleted||e.originalText!==e.text)))))),tt=e=>[...e.comments.comments.values()].filter((e=>!e.deleted&&!e.resolved)).length;var nt=n(1688),ot=n.n(nt),rt=n(1238);const it=new Intl.DateTimeFormat([],{dateStyle:"medium",timeStyle:"short"}),st=({commentReply:e,store:t,onResolve:n,onEdit:s,onDelete:a,descriptionId:c,focused:l})=>{const{author:m,date:u}=e,[d,p]=(0,r.useState)(!1);(0,r.useEffect)((()=>{d&&!l&&p(!1)}),[l]);const f=(0,r.useRef)(null),h=(0,r.useRef)(null),y=e=>{e.preventDefault(),e.stopPropagation(),p(!d)};(0,r.useEffect)((()=>{d&&setTimeout((()=>f.current?.focus()),1)}),[d]);const v=e=>{h.current&&e.target instanceof Node&&!h.current.contains(e.target)&&p(!1)};(0,r.useEffect)((()=>(document.addEventListener("click",v,!0),()=>{document.removeEventListener("click",v,!0)})),[]);const b=new Date(u).toISOString();return i().createElement("div",{className:"comment-header"},i().createElement("div",{className:"comment-header__actions"},(s||a||n)&&i().createElement("div",{className:"comment-header__action comment-header__action--more",ref:h},i().createElement("details",{open:d,onClick:y},i().createElement("summary",{"aria-label":(0,o.AP)("More actions"),"aria-haspopup":"menu",role:"button",onClick:y,"aria-expanded":d},i().createElement(rt.A,{name:"dots-horizontal"})),i().createElement("div",{className:"comment-header__more-actions",role:"menu",ref:f},s&&i().createElement("button",{type:"button",role:"menuitem",onClick:async n=>{n.preventDefault(),s&&s(e,t)}},(0,o.AP)("Edit")),a&&i().createElement("button",{type:"button",role:"menuitem",onClick:async n=>{n.preventDefault(),a&&a(e,t)}},(0,o.AP)("Delete")),n&&i().createElement("button",{type:"button",role:"menuitem",onClick:o=>{o.preventDefault(),n&&n(e,t)}},(0,o.AP)("Resolve")))))),m&&m.avatarUrl&&i().createElement("img",{className:"comment-header__avatar",src:m.avatarUrl,alt:"",decoding:"async",loading:"lazy"}),i().createElement("span",{id:c},i().createElement("p",{className:"comment-header__author"},m?m.name:""),i().createElement("p",{className:"comment-header__date"},i().createElement("time",{dateTime:b},it.format(u)))))},at=i().forwardRef((({value:e,className:t,placeholder:n,onChange:o,focusOnMount:r,focusTarget:s=!1,additionalAttributes:a={}},c)=>{const l=i().useRef(null);return i().useImperativeHandle(c,(()=>l.current)),i().useEffect((()=>{l.current&&(l.current.style.height="",l.current.style.height=l.current.scrollHeight+"px")}),[e,l]),i().useEffect((()=>{r&&l.current&&l.current.focus()}),[l]),i().createElement("textarea",{"data-focus-target":s,rows:1,style:{resize:"none",overflowY:"hidden"},className:t,placeholder:n,ref:l,onChange:e=>{o&&o(e.target.value)},value:e,...a})}));async function ct(e,t,n){n.dispatch(Se(e.localId,t.localId,{mode:"saving"}));try{n.dispatch(Se(e.localId,t.localId,{mode:"default",text:t.newText,author:t.author}))}catch(o){console.error(o),n.dispatch(Se(e.localId,t.localId,{mode:"save_error"}))}}async function lt(e,t,n){n.dispatch(Se(e.localId,t.localId,{mode:"deleting"}));try{n.dispatch(Te(e.localId,t.localId))}catch(o){n.dispatch(Se(e.localId,t.localId,{mode:"delete_error"}))}}class mt extends i().Component{renderEditing(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,focused:r}),i().createElement("form",{onSubmit:async o=>{o.preventDefault(),await ct(e,t,n)}},i().createElement(at,{className:"comment-reply__input",value:t.newText,onChange:o=>{n.dispatch(Se(e.localId,t.localId,{newText:o}))}}),i().createElement("div",{className:"comment-reply__actions"},i().createElement("button",{type:"submit",disabled:0===t.newText.length,className:"comment-reply__button comment-reply__button--primary"},(0,o.AP)("Save")),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:o=>{o.preventDefault(),n.dispatch(Se(e.localId,t.localId,{mode:"default",newText:t.text}))}},(0,o.AP)("Cancel")))))}renderSaving(){const{reply:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment-reply__text"},e.text),i().createElement("div",{className:"comment-reply__progress"},(0,o.AP)("Saving...")))}renderSaveError(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,focused:r}),i().createElement("p",{className:"comment-reply__text"},t.text),i().createElement("div",{className:"comment-reply__error"},(0,o.AP)("Save error"),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:async o=>{o.preventDefault(),await ct(e,t,n)}},(0,o.AP)("Retry"))))}renderDeleteConfirm(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,focused:r}),i().createElement("p",{className:"comment-reply__text"},t.text),i().createElement("div",{className:"comment-reply__confirm-delete"},(0,o.AP)("Are you sure?"),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:o=>{o.preventDefault(),n.dispatch(Se(e.localId,t.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),i().createElement("button",{type:"button",className:"comment-reply__button comment-reply__button--primary",onClick:async o=>{o.preventDefault(),await lt(e,t,n)}},(0,o.AP)("Delete"))))}renderDeleting(){const{reply:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment-reply__text"},e.text),i().createElement("div",{className:"comment-reply__progress"},(0,o.AP)("Deleting")))}renderDeleteError(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,focused:r}),i().createElement("p",{className:"comment-reply__text"},t.text),i().createElement("div",{className:"comment-reply__error"},(0,o.AP)("Delete error"),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:async o=>{o.preventDefault(),n.dispatch(Se(e.localId,t.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:async o=>{o.preventDefault(),await lt(e,t,n)}},(0,o.AP)("Retry"))))}renderDefault(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;let s,a;(null===t.author||this.props.user&&this.props.user.id===t.author.id)&&(s=()=>{n.dispatch(Se(e.localId,t.localId,{mode:"editing",newText:t.text}))},a=()=>{n.dispatch(Se(e.localId,t.localId,{mode:"delete_confirm"}))});let c="";return t.remoteId&&t.text===t.originalText||(c=(0,o.AP)("Save the page to save this reply")),i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,onEdit:s,onDelete:a,focused:r}),i().createElement("p",{className:"comment-reply__text"},t.text),c&&i().createElement("div",{className:"comment__notice-placeholder"},i().createElement("div",{className:"comment__notice",role:"status"},i().createElement(rt.A,{name:"info-circle"}),c)))}render(){let e;switch(this.props.reply.mode){case"editing":e=this.renderEditing();break;case"saving":e=this.renderSaving();break;case"save_error":e=this.renderSaveError();break;case"delete_confirm":e=this.renderDeleteConfirm();break;case"deleting":e=this.renderDeleting();break;case"delete_error":e=this.renderDeleteError();break;default:e=this.renderDefault()}return i().createElement("li",{key:this.props.reply.localId,className:`comment-reply comment-reply--mode-${this.props.reply.mode}`,"data-reply-id":this.props.reply.localId},e)}}async function ut(e,t){t.dispatch(Oe(e.localId,{mode:"saving"}));try{t.dispatch(Oe(e.localId,{mode:"default",text:e.newText,remoteId:e.remoteId,author:e.author,date:e.date}))}catch(n){console.error(n),t.dispatch(Oe(e.localId,{mode:"save_error"}))}}async function dt(e,t){t.dispatch(Oe(e.localId,{mode:"deleting"}));try{t.dispatch(ke(e.localId))}catch(n){console.error(n),t.dispatch(Oe(e.localId,{mode:"delete_error"}))}}function pt(e,t){t.dispatch(Re(e.localId))}class ft extends i().Component{renderReplies({hideNewReply:e=!1}={}){const{comment:t,isFocused:n,store:r,user:s}=this.props;if(!t.remoteId)return null;const a=[];let c,l=!1;for(const e of t.replies.values())"saving"!==e.mode&&"editing"!==e.mode||(l=!0),e.deleted||a.push(i().createElement(mt,{key:e.localId,store:r,user:s,comment:t,reply:e,isFocused:n}));if(e||l||!n&&!t.newReply){if(0===a.length)return null}else c=i().createElement("form",{onSubmit:async e=>{e.preventDefault();const n=Le(b(),s,Date.now(),{text:t.newReply,mode:"default"});r.dispatch(Fe(t.localId,n)),r.dispatch(Oe(t.localId,{newReply:""}))}},i().createElement(at,{className:"comment__reply-input",placeholder:(0,o.AP)("Enter your reply..."),value:t.newReply,onChange:e=>{r.dispatch(Oe(t.localId,{newReply:e}))}}),i().createElement("div",{className:"comment__reply-actions"},i().createElement("button",{disabled:0===t.newReply.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Reply")),i().createElement("button",{type:"button",onClick:e=>{e.preventDefault(),r.dispatch(Oe(t.localId,{newReply:""})),r.dispatch(De(null)),e.stopPropagation()},className:"comment__button"},(0,o.AP)("Cancel"))));return i().createElement(i().Fragment,null,i().createElement("ul",{className:"comment__replies"},a),c)}renderCreating(){const{comment:e,store:t,isFocused:n}=this.props,r=`comment-description-${e.localId}`;return i().createElement(i().Fragment,null,i().createElement(st,{descriptionId:r,commentReply:e,store:t,focused:n}),i().createElement("form",{onSubmit:async n=>{n.preventDefault(),await ut(e,t)}},i().createElement(at,{focusTarget:n,className:"comment__input",value:e.newText,onChange:n=>{t.dispatch(Oe(e.localId,{newText:n}))},placeholder:(0,o.AP)("Enter your comments..."),additionalAttributes:{"aria-describedby":r}}),i().createElement("div",{className:"comment__actions"},i().createElement("button",{disabled:0===e.newText.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Comment")),i().createElement("button",{type:"button",onClick:n=>{n.preventDefault(),t.dispatch(ke(e.localId))},className:"comment__button"},(0,o.AP)("Cancel")))))}renderEditing(){const{comment:e,store:t,isFocused:n}=this.props,r=`comment-description-${e.localId}`;return i().createElement(i().Fragment,null,i().createElement(st,{descriptionId:r,commentReply:e,store:t,focused:n}),i().createElement("form",{onSubmit:async n=>{n.preventDefault(),await ut(e,t)}},i().createElement(at,{focusTarget:n,className:"comment__input",value:e.newText,additionalAttributes:{"aria-describedby":r},onChange:n=>{t.dispatch(Oe(e.localId,{newText:n}))}}),i().createElement("div",{className:"comment__actions"},i().createElement("button",{disabled:0===e.newText.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Save")),i().createElement("button",{type:"button",onClick:n=>{n.preventDefault(),t.dispatch(Oe(e.localId,{mode:"default",newText:e.text}))},className:"comment__button"},(0,o.AP)("Cancel")))),this.renderReplies({hideNewReply:!0}))}renderSaving(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),i().createElement("div",{className:"comment__progress"},(0,o.AP)("Saving...")),this.renderReplies({hideNewReply:!0}))}renderSaveError(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),this.renderReplies({hideNewReply:!0}),i().createElement("div",{className:"comment__error"},(0,o.AP)("Save error"),i().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),await ut(e,t)}},(0,o.AP)("Retry"))))}renderDeleteConfirm(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),i().createElement("div",{className:"comment__confirm-delete"},(0,o.AP)("Are you sure?"),i().createElement("button",{type:"button",className:"comment__button button button-small",onClick:n=>{n.preventDefault(),t.dispatch(Oe(e.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),i().createElement("button",{type:"button",className:"comment__button button button-small no",onClick:async n=>{n.preventDefault(),await dt(e,t)}},(0,o.AP)("Delete"))),this.renderReplies({hideNewReply:!0}))}renderDeleting(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),i().createElement("div",{className:"comment__progress"},(0,o.AP)("Deleting")),this.renderReplies({hideNewReply:!0}))}renderDeleteError(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),this.renderReplies({hideNewReply:!0}),i().createElement("div",{className:"comment__error"},(0,o.AP)("Delete error"),i().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),t.dispatch(Oe(e.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),i().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),await dt(e,t)}},(0,o.AP)("Retry"))))}renderDefault(){const{comment:e,store:t,isFocused:n}=this.props;let r,s;(null===e.author||this.props.user&&this.props.user.id===e.author.id)&&(r=()=>{t.dispatch(Oe(e.localId,{mode:"editing",newText:e.text}))},s=()=>{t.dispatch(Oe(e.localId,{mode:"delete_confirm"}))});let a="";return e.remoteId?e.text!==e.originalText&&(a=(0,o.AP)("Save the page to save this comment")):a=(0,o.AP)("Save the page to add this comment"),i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,onResolve:pt,onEdit:r,onDelete:s,focused:n}),i().createElement("p",{className:"comment__text"},e.text),a&&i().createElement("div",{className:"comment__notice-placeholder"},i().createElement("div",{className:"comment__notice",role:"status"},i().createElement(rt.A,{name:"info-circle"}),a)),this.renderReplies())}render(){let e;switch(this.props.comment.mode){case"creating":e=this.renderCreating();break;case"editing":e=this.renderEditing();break;case"saving":e=this.renderSaving();break;case"save_error":e=this.renderSaveError();break;case"delete_confirm":e=this.renderDeleteConfirm();break;case"deleting":e=this.renderDeleting();break;case"delete_error":e=this.renderDeleteError();break;default:e=this.renderDefault()}const t=this.props.layout.getCommentPosition(this.props.comment.localId);return i().createElement(ot(),{focusTrapOptions:{preventScroll:!0,clickOutsideDeactivates:!0,onDeactivate:()=>{this.props.store.dispatch(De(null,{updatePinnedComment:!0,forceFocus:!1}))},initialFocus:'[data-focus-target="true"]',delayFocus:!1},active:this.props.isFocused&&this.props.forceFocus},i().createElement("li",{tabIndex:-1,"data-focus-target":this.props.isFocused&&!["creating","editing"].includes(this.props.comment.mode),key:this.props.comment.localId,className:`comment comment--mode-${this.props.comment.mode} ${this.props.isFocused?"comment--focused":""}`,style:{position:"absolute",top:`${t}px`,display:this.props.isVisible?"block":"none"},"data-comment-id":this.props.comment.localId,onClick:()=>{this.props.store.dispatch(De(this.props.comment.localId,{updatePinnedComment:!1,forceFocus:this.props.isFocused&&this.props.forceFocus}))},onDoubleClick:()=>{this.props.store.dispatch(De(this.props.comment.localId,{updatePinnedComment:!0,forceFocus:!0}))}},e))}componentDidMount(){const e=a().findDOMNode(this);e instanceof HTMLElement&&(this.props.layout.setCommentElement(this.props.comment.localId,e),this.props.isVisible&&this.props.layout.setCommentHeight(this.props.comment.localId,e.offsetHeight))}componentWillUnmount(){this.props.layout.setCommentElement(this.props.comment.localId,null)}componentDidUpdate(){const e=a().findDOMNode(this);this.props.isVisible&&e instanceof HTMLElement&&this.props.layout.setCommentHeight(this.props.comment.localId,e.offsetHeight)}}function ht({prefix:e,value:t,fieldName:n}){return i().createElement("input",{type:"hidden",name:`${e}-${n}`,value:null===t?"":t,id:`id_${e}-${n}`})}function yt({reply:e,formNumber:t,prefix:n}){const o=`${n}-${t}`;return i().createElement("fieldset",null,i().createElement(ht,{fieldName:"DELETE",value:e.deleted?1:"",prefix:o}),i().createElement(ht,{fieldName:"id",value:e.remoteId,prefix:o}),i().createElement(ht,{fieldName:"text",value:e.text,prefix:o}))}function vt({replies:e,prefix:t,remoteReplyCount:n}){const o=`${t}-replies`,r=e.map(((e,t)=>i().createElement(yt,{key:e.localId,formNumber:t,reply:e,prefix:o})));return i().createElement(i().Fragment,null,i().createElement(ht,{fieldName:"TOTAL_FORMS",value:e.length,prefix:o}),i().createElement(ht,{fieldName:"INITIAL_FORMS",value:n,prefix:o}),i().createElement(ht,{fieldName:"MIN_NUM_FORMS",value:"0",prefix:o}),i().createElement(ht,{fieldName:"MAX_NUM_FORMS",value:"",prefix:o}),r)}function bt({comment:e,formNumber:t,prefix:n}){const o=`${n}-${t}`;return i().createElement("fieldset",null,i().createElement(ht,{fieldName:"DELETE",value:e.deleted?1:"",prefix:o}),i().createElement(ht,{fieldName:"resolved",value:e.resolved?1:"",prefix:o}),i().createElement(ht,{fieldName:"id",value:e.remoteId,prefix:o}),i().createElement(ht,{fieldName:"contentpath",value:e.contentpath,prefix:o}),i().createElement(ht,{fieldName:"text",value:e.text,prefix:o}),i().createElement(ht,{fieldName:"position",value:e.position,prefix:o}),i().createElement(vt,{replies:Array.from(e.replies.values()),prefix:o,remoteReplyCount:e.remoteReplyCount}))}function gt({comments:e,remoteCommentCount:t}){const n="comments",o=e.map(((e,t)=>i().createElement(bt,{key:e.localId,comment:e,formNumber:t,prefix:n})));return i().createElement(i().Fragment,null,i().createElement(ht,{fieldName:"TOTAL_FORMS",value:e.length,prefix:n}),i().createElement(ht,{fieldName:"INITIAL_FORMS",value:t,prefix:n}),i().createElement(ht,{fieldName:"MIN_NUM_FORMS",value:"0",prefix:n}),i().createElement(ht,{fieldName:"MAX_NUM_FORMS",value:"",prefix:n}),o)}const Et=(e,t)=>{const n=p(e,String(t),{name:"",avatar_url:""});return{id:t,name:n.name,avatarUrl:n.avatar_url}};function _t({store:e,layout:t,comments:n}){const o=e.getState(),{user:s,currentTab:a}=o.settings,{focusedComment:c,forceFocus:l}=o.comments,m=i().useRef(null),u=(0,r.useCallback)((e=>{if(!m.current)return;if("scroll"===e.type&&!document.querySelector(".form-side--comments"))return;const t=document.querySelector(".content"),n=t?.getBoundingClientRect().top;m.current.style.top=`${n}px`}),[m]);let d=n;i().useEffect((()=>{const e=document.querySelector("#main"),t=document.querySelector('[data-side-panel="comments"]');return e?.addEventListener("scroll",u),t?.addEventListener("show",u),()=>{e?.removeEventListener("scroll",u),t?.removeEventListener("show",u)}}),[]),s||(d=[]),d=d.filter((({deleted:e,resolved:t})=>!(e||t)));const p=d.map((n=>i().createElement(ft,{key:n.localId,store:e,layout:t,user:s,comment:n,isFocused:n.localId===c,forceFocus:l,isVisible:t.getCommentVisible(a,n.localId)})));return i().createElement("ol",{ref:m,className:"comments-list"},p)}class Ct{store;layout;utils={selectCommentsForContentPathFactory:Qe,selectCommentFactory:Ze};selectors={selectComments:Ye,selectFocused:Ge,selectIsDirty:et,selectCommentCount:tt};actions=Me;activationHandlers=[];constructor(){this.store=d(Ke,{settings:qe}),this.layout=new f}setUser(e,t){this.store.dispatch($e({user:Et(t,e)}))}updateAnnotation(e,t){this.attachAnnotationLayout(e,t),this.store.dispatch(Oe(t,{annotation:e}))}attachAnnotationLayout(e,t){this.layout.setCommentAnnotation(t,e)}setCurrentTab(e){this.store.dispatch($e({currentTab:e}))}makeComment(e,t,n=""){const o=v();return this.attachAnnotationLayout(e,o),this.store.dispatch(xe(Ue(t,n,o,e,this.store.getState().settings.user,Date.now(),{mode:"creating"}))),this.store.dispatch(De(o,{updatePinnedComment:!0,forceFocus:!0})),o}activate(){this.activationHandlers.forEach((e=>e()))}onActivate(e){this.activationHandlers.push(e)}invalidateContentPath(e){this.store.dispatch(je(e))}updateContentPath(e,t){this.store.dispatch(Oe(e,{contentpath:t}))}renderApp(e,t,n,o,r){let s=null;this.setUser(n,r);let c=null;const l=new URLSearchParams(window.location.search).get("comment");l&&(c=parseInt(l,10));const m=()=>{const n=this.store.getState(),o=Array.from(n.comments.comments.values());a().render(i().createElement(gt,{comments:o.filter((e=>"creating"!==e.mode)),remoteCommentCount:n.comments.remoteCommentCount}),t),n.comments.pinnedComment!==s&&(this.layout.setPinnedComment(n.comments.pinnedComment),s=n.comments.pinnedComment),a().render(i().createElement(_t,{store:this.store,layout:this.layout,comments:o}),e,(()=>{this.layout.refreshDesiredPositions(n.settings.currentTab),this.layout.refreshLayout()&&a().render(i().createElement(_t,{store:this.store,layout:this.layout,comments:o}),e)}))};for(const e of o){const t=v();this.store.dispatch(xe(Ue(e.contentpath,e.position,t,null,Et(r,e.user),Date.parse(e.created_at),{remoteId:e.pk,text:e.text,deleted:e.deleted,resolved:e.resolved})));for(const n of e.replies)this.store.dispatch(Fe(t,Le(b(),Et(r,n.user),Date.parse(n.created_at),{remoteId:n.pk,text:n.text,deleted:n.deleted})));c&&e.pk===c&&this.store.dispatch(De(t,{updatePinnedComment:!0,forceFocus:!0}))}m(),this.store.subscribe(m),document.body.addEventListener("mousedown",(e=>{e.target instanceof HTMLElement&&(e.target.closest("#comments, [data-annotation], [data-comment-add]")||setTimeout((()=>{this.store.dispatch(De(null,{updatePinnedComment:!0,forceFocus:!1}))}),200))})),document.body.addEventListener("commentAnchorVisibilityChange",(()=>{this.layout.refreshDesiredPositions(this.store.getState().settings.currentTab),this.layout.refreshLayout()&&m()}))}}window.comments=(()=>{const e=new Ct;function t(e){return(e.ctrlKey||e.metaKey)&&e.altKey&&77===e.keyCode}function n(e){if(e.closest("[data-contentpath-disabled]"))return"";let t=e.closest("[data-contentpath]");const n=[];for(;null!==t;)n.push(t.dataset.contentpath),t=t.parentElement.closest("[data-contentpath]");return n.reverse(),n.join(".")}class r{constructor(e,t){this.node=t,this.fieldNode=e,this.unsubscribe=null}subscribeToUpdates(t){const{selectFocused:n}=e.selectors,o=e.utils.selectCommentFactory(t),r=e.store,i=r.getState();let s=n(i)===t;s&&this.onFocus(),this.show(),this.unsubscribe=r.subscribe((()=>{const e=r.getState();o(e)||this.onDelete();const i=n(e)===t;i!==s&&(s?this.onUnfocus():this.onFocus(),s=i)})),this.setOnClickHandler(t)}onDelete(){this.node.remove(),this.unsubscribe&&this.unsubscribe()}onFocus(){this.node.classList.add("w-field__comment-button--focused"),this.node.ariaLabel=(0,o.AP)("Unfocus comment")}onUnfocus(){this.node.classList.remove("w-field__comment-button--focused"),this.node.ariaLabel=(0,o.AP)("Focus comment")}show(){this.node.classList.remove("!w-hidden")}hide(){this.node.classList.add("!w-hidden")}setOnClickHandler(t){this.node.addEventListener("click",(()=>{e.activate(),e.store.dispatch(e.actions.setFocusedComment(t,{updatePinnedComment:!0,forceFocus:!0}))}))}getTab(){return this.fieldNode.closest('[role="tabpanel"]')?.getAttribute("id")}getAnchorNode(){return this.fieldNode}}class i extends Error{constructor(e,...t){super(...t),this.name="MissingElementError",this.element=e}}class s{constructor({fieldNode:e,commentAdditionNode:t}){if(this.fieldNode=e,this.contentpath=n(e),!t)throw new i(t);this.commentAdditionNode=t}register(){if(!this.contentpath)return void this.commentAdditionNode.remove();const n=e.store.getState(),o=e.utils.selectCommentsForContentPathFactory(this.contentpath);let r=o(n);const i=e.store.subscribe((()=>{const t=e.store.getState(),n=o(t);r!==n&&(r=n,r.filter((e=>null===e.annotation)).forEach((t=>{const n=this.getAnnotationForComment(t);e.updateAnnotation(n,t.localId),n.subscribeToUpdates(t.localId)})))}));n.comments.comments.forEach((t=>{if(t.contentpath===this.contentpath){const n=this.getAnnotationForComment(t);e.updateAnnotation(n,t.localId),n.subscribeToUpdates(t.localId)}}));const s=()=>{const t=this.getAnnotationForComment(),n=e.makeComment(t,this.contentpath);t.subscribeToUpdates(n)};return this.commentAdditionNode.addEventListener("click",(()=>{e.activate(),s()})),this.fieldNode.addEventListener("keyup",(n=>{t(n)&&(0===r.length?s():e.store.dispatch(e.actions.setFocusedComment(r[0].localId,{updatePinnedComment:!0,forceFocus:!0})))})),i}getAnnotationForComment(){const t=document.querySelector("#comment-icon").cloneNode(!0);return t.id="",t.setAttribute("aria-label",this.commentAdditionNode.getAttribute("aria-label")),t.setAttribute("aria-describedby",this.commentAdditionNode.getAttribute("aria-describedby")),t.classList.remove("!w-hidden"),this.commentAdditionNode.insertAdjacentElement("beforebegin",t),new r(this.fieldNode,t,e)}}function a(e){new s({fieldNode:e.closest("[data-contentpath]"),commentAdditionNode:e}).register()}function c(t){const n=document.getElementById("comments"),o=document.getElementById("comments-output"),r=document.getElementById("comments-data");if(!n||!o||!r)throw new Error("Comments app failed to initialise. Missing HTML element");const i=JSON.parse(r.textContent);e.renderApp(n,o,i.user,i.comments,new Map(Object.entries(i.authors))),t.querySelectorAll('[data-component="add-comment-button"]').forEach(a);const s=t.querySelector('[data-tabs] [role="tablist"]');s&&(e.setCurrentTab(s.querySelector('[role="tab"][aria-selected="true"]').getAttribute("href").replace("#","")),s.addEventListener("switch",(t=>{e.setCurrentTab(t.detail.tab)})));const c=document.querySelector("[data-comment-notifications]");c.hidden=!1,c.querySelector("input").setAttribute("form",t.id),t.querySelector(".tab-content").classList.add("tab-content--comments-enabled");const l=document.querySelector('[data-side-panel="comments"]');e.onActivate((()=>{l.dispatchEvent(new Event("open"))}));const m=document.querySelector('[data-side-panel-toggle="comments"] [data-side-panel-toggle-counter]'),u=()=>{const t=e.selectors.selectCommentCount(e.store.getState());m&&(t>0?(m.innerText=t.toString(),m.hidden=!1):m.hidden=!0)};e.store.subscribe(u),u()}return document.addEventListener("w-comments:init",(({target:e})=>{setTimeout((()=>{c(e)}))}),{once:!0}),{commentApp:e,getContentPath:n,isCommentShortcut:t,initAddCommentButton:a,initCommentsInterface:c}})()}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=t,e=[],o.O=(t,n,r,i)=>{if(!n){var s=1/0;for(m=0;m<e.length;m++){for(var[n,r,i]=e[m],a=!0,c=0;c<n.length;c++)(!1&i||s>=i)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(a=!1,i<s&&(s=i));if(a){e.splice(m--,1);var l=r();void 0!==l&&(t=l)}}return t}i=i||0;for(var m=e.length;m>0&&e[m-1][2]>i;m--)e[m]=e[m-1];e[m]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),o.j=125,(()=>{var e={125:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[s,a,c]=n,l=0;if(s.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(c)var m=c(o)}for(t&&t(n);l<s.length;l++)i=s[l],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(m)},n=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[321],(()=>o(406)));r=o.O(r)})();
1
+ (()=>{"use strict";var e,t={406:(e,t,n)=>{var o=n(2833),r=n(2427),i=n.n(r),s=n(6931),a=n.n(s);function c(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var l="function"==typeof Symbol&&Symbol.observable||"@@observable",m=function(){return Math.random().toString(36).substring(7).split("").join(".")},u={INIT:"@@redux/INIT"+m(),REPLACE:"@@redux/REPLACE"+m(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+m()}};function d(e,t,n){var o;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(c(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(c(1));return n(d)(e,t)}if("function"!=typeof e)throw new Error(c(2));var r=e,i=t,s=[],a=s,m=!1;function p(){a===s&&(a=s.slice())}function f(){if(m)throw new Error(c(3));return i}function h(e){if("function"!=typeof e)throw new Error(c(4));if(m)throw new Error(c(5));var t=!0;return p(),a.push(e),function(){if(t){if(m)throw new Error(c(6));t=!1,p();var n=a.indexOf(e);a.splice(n,1),s=null}}}function y(e){if(!function(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}(e))throw new Error(c(7));if(void 0===e.type)throw new Error(c(8));if(m)throw new Error(c(9));try{m=!0,i=r(i,e)}finally{m=!1}for(var t=s=a,n=0;n<t.length;n++)(0,t[n])();return e}return y({type:u.INIT}),(o={dispatch:y,subscribe:h,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw new Error(c(10));r=e,y({type:u.REPLACE})}})[l]=function(){var e,t=h;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(c(11));function n(){e.next&&e.next(f())}return n(),{unsubscribe:t(n)}}})[l]=function(){return this},e},o}function p(e,t,n){const o=e.get(t);return void 0===o?n:o}class f{commentElements=new Map;commentAnnotations=new Map;commentTabs=new Map;commentDesiredPositions=new Map;commentHeights=new Map;pinnedComment=null;commentCalculatedPositions=new Map;isDirty=!1;setCommentElement(e,t){null!==t?this.commentElements.set(e,t):this.commentElements.delete(e),this.isDirty=!0}setCommentAnnotation(e,t){this.commentAnnotations.set(e,t),this.commentTabs.set(e,t.getTab()||null),this.updateDesiredPosition(e),this.isDirty=!0}setCommentHeight(e,t){this.commentHeights.get(e)!==t&&(this.commentHeights.set(e,t),this.isDirty=!0)}setPinnedComment(e){this.pinnedComment=e,this.isDirty=!0}updateDesiredPosition(e){const t=this.commentAnnotations.get(e);if(!t)return;const n=t.getAnchorNode(e===this.pinnedComment);let o=n.getBoundingClientRect().top,r=n.parentElement;for(;r;)o+=r.scrollTop,r=r.parentElement;this.commentDesiredPositions.set(e,0!==o?o+-50:0)}refreshDesiredPositions(e=null){const t=new Map(this.commentDesiredPositions);this.commentAnnotations.forEach(((t,n)=>{this.getCommentTabVisible(e,n)&&this.updateDesiredPosition(n)})),this.commentDesiredPositions!==t&&(this.isDirty=!0)}refreshLayout(){if(!this.isDirty)return!1;const e=Array.from(this.commentElements.keys()).map((e=>({tab:p(this.commentTabs,e,null),position:p(this.commentDesiredPositions,e,0),height:p(this.commentHeights,e,0),comments:[e],containsPinnedComment:null!==this.pinnedComment&&e===this.pinnedComment,pinnedCommentPosition:0}))),t=new Map;e.forEach((e=>{const n=t.get(e.tab)||[];n.push(e),t.set(e.tab,n)}));const n=this.pinnedComment?this.commentDesiredPositions.get(this.pinnedComment):void 0,o=this.pinnedComment?this.commentTabs.get(this.pinnedComment):void 0;return Array.from(t.entries()).forEach((([e,t])=>{const r=this.pinnedComment&&o===e;t.sort(((e,t)=>e.position-t.position));let i=t,s=!0;for(;s;){s=!1;const e=[];let t=null;for(const o of i)t&&t.position+t.height+20>o.position?(s=!0,t.comments.push(...o.comments),o.containsPinnedComment&&(t.containsPinnedComment=!0,t.pinnedCommentPosition=o.pinnedCommentPosition+t.height),t.height+=o.height,!r&&t.position<50&&(t.position=100+t.height- -50),n&&t.containsPinnedComment&&(t.position=n-t.pinnedCommentPosition)):(e.push(o),t=o);i=e}i.forEach((e=>{let t=e.position;e.comments.forEach((e=>{this.commentCalculatedPositions.set(e,t);const n=this.commentHeights.get(e);n&&(t+=n+20)}))}))})),this.isDirty=!1,!0}getCommentTabVisible(e,t){return p(this.commentTabs,t,null)===e}getCommentVisible(e,t){return this.getCommentTabVisible(e,t)&&p(this.commentDesiredPositions,t,1)>0}getCommentPosition(e){return this.commentCalculatedPositions.has(e)?this.commentCalculatedPositions.get(e):this.commentDesiredPositions.get(e)}}let h=1,y=1;function v(){return h+=1,h}function b(){return y+=1,y}function g(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];throw Error("[Immer] minified error nr: "+e+(n.length?" "+n.map((function(e){return"'"+e+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function E(e){return!!e&&!!e[ae]}function _(e){var t;return!!e&&(function(e){if(!e||"object"!=typeof e)return!1;var t=Object.getPrototypeOf(e);if(null===t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===le}(e)||Array.isArray(e)||!!e[se]||!!(null===(t=e.constructor)||void 0===t?void 0:t[se])||A(e)||x(e))}function C(e,t,n){void 0===n&&(n=!1),0===w(e)?(n?Object.keys:me)(e).forEach((function(o){n&&"symbol"==typeof o||t(o,e[o],e)})):e.forEach((function(n,o){return t(o,n,e)}))}function w(e){var t=e[ae];return t?t.i>3?t.i-4:t.i:Array.isArray(e)?1:A(e)?2:x(e)?3:0}function P(e,t){return 2===w(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function I(e,t,n){var o=w(e);2===o?e.set(t,n):3===o?e.add(n):e[t]=n}function N(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function A(e){return ne&&e instanceof Map}function x(e){return oe&&e instanceof Set}function O(e){return e.o||e.t}function k(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=ue(e);delete t[ae];for(var n=me(t),o=0;o<n.length;o++){var r=n[o],i=t[r];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(t[r]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[r]})}return Object.create(Object.getPrototypeOf(e),t)}function R(e,t){return void 0===t&&(t=!1),F(e)||E(e)||!_(e)||(w(e)>1&&(e.set=e.add=e.clear=e.delete=D),Object.freeze(e),t&&C(e,(function(e,t){return R(t,!0)}),!0)),e}function D(){g(2)}function F(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function S(e){var t=de[e];return t||g(18,e),t}function T(e,t){de[e]||(de[e]=t)}function j(){return ee}function M(e,t){t&&(S("Patches"),e.u=[],e.s=[],e.v=t)}function L(e){U(e),e.p.forEach(H),e.p=null}function U(e){e===ee&&(ee=e.l)}function z(e){return ee={p:[],l:ee,h:e,m:!0,_:0}}function H(e){var t=e[ae];0===t.i||1===t.i?t.j():t.g=!0}function $(e,t){t._=t.p.length;var n=t.p[0],o=void 0!==e&&e!==n;return t.h.O||S("ES5").S(t,e,o),o?(n[ae].P&&(L(t),g(4)),_(e)&&(e=q(t,e),t.l||V(t,e)),t.u&&S("Patches").M(n[ae].t,e,t.u,t.s)):e=q(t,n,[]),L(t),t.u&&t.v(t.u,t.s),e!==ie?e:void 0}function q(e,t,n){if(F(t))return t;var o=t[ae];if(!o)return C(t,(function(r,i){return K(e,o,t,r,i,n)}),!0),t;if(o.A!==e)return t;if(!o.P)return V(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var r=4===o.i||5===o.i?o.o=k(o.k):o.o,i=r,s=!1;3===o.i&&(i=new Set(r),r.clear(),s=!0),C(i,(function(t,i){return K(e,o,r,t,i,n,s)})),V(e,r,!1),n&&e.u&&S("Patches").N(o,n,e.u,e.s)}return o.o}function K(e,t,n,o,r,i,s){if(E(r)){var a=q(e,r,i&&t&&3!==t.i&&!P(t.R,o)?i.concat(o):void 0);if(I(n,o,a),!E(a))return;e.m=!1}else s&&n.add(r);if(_(r)&&!F(r)){if(!e.h.D&&e._<1)return;q(e,r),t&&t.A.l||V(e,r)}}function V(e,t,n){void 0===n&&(n=!1),!e.l&&e.h.D&&e.m&&R(t,n)}function B(e,t){var n=e[ae];return(n?O(n):e)[t]}function W(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var o=Object.getOwnPropertyDescriptor(n,t);if(o)return o;n=Object.getPrototypeOf(n)}}function J(e){e.P||(e.P=!0,e.l&&J(e.l))}function X(e){e.o||(e.o=k(e.t))}function Y(e,t,n){var o=A(t)?S("MapSet").F(t,n):x(t)?S("MapSet").T(t,n):e.O?function(e,t){var n=Array.isArray(e),o={i:n?1:0,A:t?t.A:j(),P:!1,I:!1,R:{},l:t,t:e,k:null,o:null,j:null,C:!1},r=o,i=pe;n&&(r=[o],i=fe);var s=Proxy.revocable(r,i),a=s.revoke,c=s.proxy;return o.k=c,o.j=a,c}(t,n):S("ES5").J(t,n);return(n?n.A:j()).p.push(o),o}function G(e){return E(e)||g(22,e),function e(t){if(!_(t))return t;var n,o=t[ae],r=w(t);if(o){if(!o.P&&(o.i<4||!S("ES5").K(o)))return o.t;o.I=!0,n=Q(t,r),o.I=!1}else n=Q(t,r);return C(n,(function(t,r){o&&function(e,t){return 2===w(e)?e.get(t):e[t]}(o.t,t)===r||I(n,t,e(r))})),3===r?new Set(n):n}(e)}function Q(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return k(e)}var Z,ee,te="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),ne="undefined"!=typeof Map,oe="undefined"!=typeof Set,re="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,ie=te?Symbol.for("immer-nothing"):((Z={})["immer-nothing"]=!0,Z),se=te?Symbol.for("immer-draftable"):"__$immer_draftable",ae=te?Symbol.for("immer-state"):"__$immer_state",ce="undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator",le=""+Object.prototype.constructor,me="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,ue=Object.getOwnPropertyDescriptors||function(e){var t={};return me(e).forEach((function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)})),t},de={},pe={get:function(e,t){if(t===ae)return e;var n=O(e);if(!P(n,t))return function(e,t,n){var o,r=W(t,n);return r?"value"in r?r.value:null===(o=r.get)||void 0===o?void 0:o.call(e.k):void 0}(e,n,t);var o=n[t];return e.I||!_(o)?o:o===B(e.t,t)?(X(e),e.o[t]=Y(e.A.h,o,e)):o},has:function(e,t){return t in O(e)},ownKeys:function(e){return Reflect.ownKeys(O(e))},set:function(e,t,n){var o=W(O(e),t);if(null==o?void 0:o.set)return o.set.call(e.k,n),!0;if(!e.P){var r=B(O(e),t),i=null==r?void 0:r[ae];if(i&&i.t===n)return e.o[t]=n,e.R[t]=!1,!0;if(N(n,r)&&(void 0!==n||P(e.t,t)))return!0;X(e),J(e)}return e.o[t]===n&&(void 0!==n||t in e.o)||Number.isNaN(n)&&Number.isNaN(e.o[t])||(e.o[t]=n,e.R[t]=!0),!0},deleteProperty:function(e,t){return void 0!==B(e.t,t)||t in e.t?(e.R[t]=!1,X(e),J(e)):delete e.R[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=O(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},defineProperty:function(){g(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){g(12)}},fe={};C(pe,(function(e,t){fe[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),fe.deleteProperty=function(e,t){return fe.set.call(this,e,t,void 0)},fe.set=function(e,t,n){return pe.set.call(this,e[0],t,n,e[0])};var he=function(){function e(e){var t=this;this.O=re,this.D=!0,this.produce=function(e,n,o){if("function"==typeof e&&"function"!=typeof n){var r=n;n=e;var i=t;return function(e){var t=this;void 0===e&&(e=r);for(var o=arguments.length,s=Array(o>1?o-1:0),a=1;a<o;a++)s[a-1]=arguments[a];return i.produce(e,(function(e){var o;return(o=n).call.apply(o,[t,e].concat(s))}))}}var s;if("function"!=typeof n&&g(6),void 0!==o&&"function"!=typeof o&&g(7),_(e)){var a=z(t),c=Y(t,e,void 0),l=!0;try{s=n(c),l=!1}finally{l?L(a):U(a)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(e){return M(a,o),$(e,a)}),(function(e){throw L(a),e})):(M(a,o),$(s,a))}if(!e||"object"!=typeof e){if(void 0===(s=n(e))&&(s=e),s===ie&&(s=void 0),t.D&&R(s,!0),o){var m=[],u=[];S("Patches").M(e,s,m,u),o(m,u)}return s}g(21,e)},this.produceWithPatches=function(e,n){if("function"==typeof e)return function(n){for(var o=arguments.length,r=Array(o>1?o-1:0),i=1;i<o;i++)r[i-1]=arguments[i];return t.produceWithPatches(n,(function(t){return e.apply(void 0,[t].concat(r))}))};var o,r,i=t.produce(e,n,(function(e,t){o=e,r=t}));return"undefined"!=typeof Promise&&i instanceof Promise?i.then((function(e){return[e,o,r]})):[i,o,r]},"boolean"==typeof(null==e?void 0:e.useProxies)&&this.setUseProxies(e.useProxies),"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze)}var t=e.prototype;return t.createDraft=function(e){_(e)||g(8),E(e)&&(e=G(e));var t=z(this),n=Y(this,e,void 0);return n[ae].C=!0,U(t),n},t.finishDraft=function(e,t){var n=(e&&e[ae]).A;return M(n,t),$(void 0,n)},t.setAutoFreeze=function(e){this.D=e},t.setUseProxies=function(e){e&&!re&&g(20),this.O=e},t.applyPatches=function(e,t){var n;for(n=t.length-1;n>=0;n--){var o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));var r=S("Patches").$;return E(e)?r(e,t):this.produce(e,(function(e){return r(e,t)}))},e}(),ye=new he,ve=ye.produce;ye.produceWithPatches.bind(ye),ye.setAutoFreeze.bind(ye),ye.setUseProxies.bind(ye),ye.applyPatches.bind(ye),ye.createDraft.bind(ye),ye.finishDraft.bind(ye);const be=ve,ge="add-comment",Ee="update-comment",_e="delete-comment",Ce="resolve-comment",we="set-focused-comment",Pe="add-reply",Ie="update-reply",Ne="delete-reply",Ae="invalidate-content-path";function xe(e){return{type:ge,comment:e}}function Oe(e,t){return{type:Ee,commentId:e,update:t}}function ke(e){return{type:_e,commentId:e}}function Re(e){return{type:Ce,commentId:e}}function De(e,{updatePinnedComment:t,forceFocus:n}={updatePinnedComment:!1,forceFocus:!1}){return{type:we,commentId:e,updatePinnedComment:t,forceFocus:n}}function Fe(e,t){return{type:Pe,commentId:e,reply:t}}function Se(e,t,n){return{type:Ie,commentId:e,replyId:t,update:n}}function Te(e,t){return{type:Ne,commentId:e,replyId:t}}function je(e){return{type:Ae,contentPath:e}}const Me={addComment:xe,updateComment:Oe,deleteComment:ke,resolveComment:Re,setFocusedComment:De,addReply:Fe,updateReply:Se,deleteReply:Te,invalidateContentPath:je};function Le(e,t,n,{remoteId:o=null,mode:r="default",text:i="",deleted:s=!1}){return{localId:e,remoteId:o,mode:r,author:t,date:n,text:i,originalText:i,newText:"",deleted:s}}function Ue(e,t,n,o,r,i,{remoteId:s=null,mode:a="default",text:c="",resolved:l=!1,deleted:m=!1,replies:u=new Map}){return{contentpath:e,position:t,localId:n,annotation:o,remoteId:s,mode:a,author:r,date:i,text:c,originalText:c,replies:u,newReply:"",newText:"",deleted:m,resolved:l,remoteReplyCount:Array.from(u.values()).reduce(((e,t)=>null!==t.remoteId?e+1:e),0)}}(function(){function e(e,t){var n=r[e];return n?n.enumerable=t:r[e]=n={configurable:!0,enumerable:t,get:function(){var t=this[ae];return pe.get(t,e)},set:function(t){var n=this[ae];pe.set(n,e,t)}},n}function t(e){for(var t=e.length-1;t>=0;t--){var r=e[t][ae];if(!r.P)switch(r.i){case 5:o(r)&&J(r);break;case 4:n(r)&&J(r)}}}function n(e){for(var t=e.t,n=e.k,o=me(n),r=o.length-1;r>=0;r--){var i=o[r];if(i!==ae){var s=t[i];if(void 0===s&&!P(t,i))return!0;var a=n[i],c=a&&a[ae];if(c?c.t!==s:!N(a,s))return!0}}var l=!!t[ae];return o.length!==me(t).length+(l?0:1)}function o(e){var t=e.k;if(t.length!==e.t.length)return!0;var n=Object.getOwnPropertyDescriptor(t,t.length-1);if(n&&!n.get)return!0;for(var o=0;o<t.length;o++)if(!t.hasOwnProperty(o))return!0;return!1}var r={};T("ES5",{J:function(t,n){var o=Array.isArray(t),r=function(t,n){if(t){for(var o=Array(n.length),r=0;r<n.length;r++)Object.defineProperty(o,""+r,e(r,!0));return o}var i=ue(n);delete i[ae];for(var s=me(i),a=0;a<s.length;a++){var c=s[a];i[c]=e(c,t||!!i[c].enumerable)}return Object.create(Object.getPrototypeOf(n),i)}(o,t),i={i:o?5:4,A:n?n.A:j(),P:!1,I:!1,R:{},l:n,t,k:r,o:null,g:!1,C:!1};return Object.defineProperty(r,ae,{value:i,writable:!0}),r},S:function(e,n,r){r?E(n)&&n[ae].A===e&&t(e.p):(e.u&&function e(t){if(t&&"object"==typeof t){var n=t[ae];if(n){var r=n.t,i=n.k,s=n.R,a=n.i;if(4===a)C(i,(function(t){t!==ae&&(void 0!==r[t]||P(r,t)?s[t]||e(i[t]):(s[t]=!0,J(n)))})),C(r,(function(e){void 0!==i[e]||P(i,e)||(s[e]=!1,J(n))}));else if(5===a){if(o(n)&&(J(n),s.length=!0),i.length<r.length)for(var c=i.length;c<r.length;c++)s[c]=!1;else for(var l=r.length;l<i.length;l++)s[l]=!0;for(var m=Math.min(i.length,r.length),u=0;u<m;u++)i.hasOwnProperty(u)||(s[u]=!0),void 0===s[u]&&e(i[u])}}}}(e.p[0]),t(e.p))},K:function(e){return 4===e.i?n(e):o(e)}})})(),function(){function e(e,t){function n(){this.constructor=e}r(e,t),e.prototype=(n.prototype=t.prototype,new n)}function t(e){e.o||(e.R=new Map,e.o=new Map(e.t))}function n(e){e.o||(e.o=new Set,e.t.forEach((function(t){if(_(t)){var n=Y(e.A.h,t,e);e.p.set(t,n),e.o.add(n)}else e.o.add(t)})))}function o(e){e.g&&g(3,JSON.stringify(O(e)))}var r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},i=function(){function n(e,t){return this[ae]={i:2,l:t,A:t?t.A:j(),P:!1,I:!1,o:void 0,R:void 0,t:e,k:this,C:!1,g:!1},this}e(n,Map);var r=n.prototype;return Object.defineProperty(r,"size",{get:function(){return O(this[ae]).size}}),r.has=function(e){return O(this[ae]).has(e)},r.set=function(e,n){var r=this[ae];return o(r),O(r).has(e)&&O(r).get(e)===n||(t(r),J(r),r.R.set(e,!0),r.o.set(e,n),r.R.set(e,!0)),this},r.delete=function(e){if(!this.has(e))return!1;var n=this[ae];return o(n),t(n),J(n),n.t.has(e)?n.R.set(e,!1):n.R.delete(e),n.o.delete(e),!0},r.clear=function(){var e=this[ae];o(e),O(e).size&&(t(e),J(e),e.R=new Map,C(e.t,(function(t){e.R.set(t,!1)})),e.o.clear())},r.forEach=function(e,t){var n=this;O(this[ae]).forEach((function(o,r){e.call(t,n.get(r),r,n)}))},r.get=function(e){var n=this[ae];o(n);var r=O(n).get(e);if(n.I||!_(r))return r;if(r!==n.t.get(e))return r;var i=Y(n.A.h,r,n);return t(n),n.o.set(e,i),i},r.keys=function(){return O(this[ae]).keys()},r.values=function(){var e,t=this,n=this.keys();return(e={})[ce]=function(){return t.values()},e.next=function(){var e=n.next();return e.done?e:{done:!1,value:t.get(e.value)}},e},r.entries=function(){var e,t=this,n=this.keys();return(e={})[ce]=function(){return t.entries()},e.next=function(){var e=n.next();if(e.done)return e;var o=t.get(e.value);return{done:!1,value:[e.value,o]}},e},r[ce]=function(){return this.entries()},n}(),s=function(){function t(e,t){return this[ae]={i:3,l:t,A:t?t.A:j(),P:!1,I:!1,o:void 0,t:e,k:this,p:new Map,g:!1,C:!1},this}e(t,Set);var r=t.prototype;return Object.defineProperty(r,"size",{get:function(){return O(this[ae]).size}}),r.has=function(e){var t=this[ae];return o(t),t.o?!!t.o.has(e)||!(!t.p.has(e)||!t.o.has(t.p.get(e))):t.t.has(e)},r.add=function(e){var t=this[ae];return o(t),this.has(e)||(n(t),J(t),t.o.add(e)),this},r.delete=function(e){if(!this.has(e))return!1;var t=this[ae];return o(t),n(t),J(t),t.o.delete(e)||!!t.p.has(e)&&t.o.delete(t.p.get(e))},r.clear=function(){var e=this[ae];o(e),O(e).size&&(n(e),J(e),e.o.clear())},r.values=function(){var e=this[ae];return o(e),n(e),e.o.values()},r.entries=function(){var e=this[ae];return o(e),n(e),e.o.entries()},r.keys=function(){return this.values()},r[ce]=function(){return this.values()},r.forEach=function(e,t){for(var n=this.values(),o=n.next();!o.done;)e.call(t,o.value,o.value,this),o=n.next()},t}();T("MapSet",{F:function(e,t){return new i(e,t)},T:function(e,t){return new s(e,t)}})}();const ze=be(((e,t)=>{const n=t=>{t.remoteId?t.resolved=!0:e.comments.delete(t.localId),e.focusedComment===t.localId&&(e.focusedComment=null),e.pinnedComment===t.localId&&(e.pinnedComment=null)};switch(t.type){case ge:e.comments.set(t.comment.localId,t.comment),t.comment.remoteId&&(e.remoteCommentCount+=1);break;case Ee:{const n=e.comments.get(t.commentId);if(n){if(t.update.newText&&0===t.update.newText.length)break;Object.assign(n,t.update)}break}case _e:{const n=e.comments.get(t.commentId);if(!n)break;(t=>{t.remoteId?t.deleted=!0:e.comments.delete(t.localId),e.focusedComment===t.localId&&(e.focusedComment=null,e.forceFocus=!1),e.pinnedComment===t.localId&&(e.pinnedComment=null)})(n);break}case Ce:{const o=e.comments.get(t.commentId);if(!o)break;n(o);break}case we:(null===t.commentId||e.comments.has(t.commentId))&&(e.focusedComment=t.commentId,t.updatePinnedComment&&(e.pinnedComment=t.commentId),e.forceFocus=t.forceFocus);break;case Pe:{const n=e.comments.get(t.commentId);if(!n||0===t.reply.text.length)break;t.reply.remoteId&&(n.remoteReplyCount+=1),n.replies.set(t.reply.localId,t.reply);break}case Ie:{const n=e.comments.get(t.commentId);if(!n)break;const o=n.replies.get(t.replyId);if(!o)break;if(t.update.newText&&0===t.update.newText.length)break;Object.assign(o,t.update);break}case Ne:{const n=e.comments.get(t.commentId);if(!n)break;const o=n.replies.get(t.replyId);if(!o)break;o.remoteId?o.deleted=!0:n.replies.delete(o.localId);break}case Ae:{const o=e.comments;for(const e of o.values())e.contentpath.startsWith(t.contentPath)&&n(e);break}}}),{comments:new Map,forceFocus:!1,focusedComment:null,pinnedComment:null,remoteCommentCount:0}),He="update-global-settings";function $e(e){return{type:He,update:e}}const qe={user:null,currentTab:null},Ke=function(e){for(var t=Object.keys(e),n={},o=0;o<t.length;o++){var r=t[o];"function"==typeof e[r]&&(n[r]=e[r])}var i,s=Object.keys(n);try{!function(e){Object.keys(e).forEach((function(t){var n=e[t];if(void 0===n(void 0,{type:u.INIT}))throw new Error(c(12));if(void 0===n(void 0,{type:u.PROBE_UNKNOWN_ACTION()}))throw new Error(c(13))}))}(n)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var o=!1,r={},a=0;a<s.length;a++){var l=s[a],m=n[l],u=e[l],d=m(u,t);if(void 0===d)throw t&&t.type,new Error(c(14));r[l]=d,o=o||d!==u}return(o=o||s.length!==Object.keys(e).length)?r:e}}({comments:ze,settings:be(((e,t)=>{t.type===He&&Object.assign(e,t.update)}),qe)});var Ve="NOT_FOUND",Be=function(e,t){return e===t};function We(e,t){var n,o,r="object"==typeof t?t:{equalityCheck:t},i=r.equalityCheck,s=void 0===i?Be:i,a=r.maxSize,c=void 0===a?1:a,l=r.resultEqualityCheck,m=function(e){return function(t,n){if(null===t||null===n||t.length!==n.length)return!1;for(var o=t.length,r=0;r<o;r++)if(!e(t[r],n[r]))return!1;return!0}}(s),u=1===c?(n=m,{get:function(e){return o&&n(o.key,e)?o.value:Ve},put:function(e,t){o={key:e,value:t}},getEntries:function(){return o?[o]:[]},clear:function(){o=void 0}}):function(e,t){var n=[];function o(e){var o=n.findIndex((function(n){return t(e,n.key)}));if(o>-1){var r=n[o];return o>0&&(n.splice(o,1),n.unshift(r)),r.value}return Ve}return{get:o,put:function(t,r){o(t)===Ve&&(n.unshift({key:t,value:r}),n.length>e&&n.pop())},getEntries:function(){return n},clear:function(){n=[]}}}(c,m);function d(){var t=u.get(arguments);if(t===Ve){if(t=e.apply(null,arguments),l){var n=u.getEntries().find((function(e){return l(e.value,t)}));n&&(t=n.value)}u.put(arguments,t)}return t}return d.clearCache=function(){return u.clear()},d}function Je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),o=1;o<t;o++)n[o-1]=arguments[o];return function(){for(var t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];var i,s=0,a={memoizeOptions:void 0},c=o.pop();if("object"==typeof c&&(a=c,c=o.pop()),"function"!=typeof c)throw new Error("createSelector expects an output function after the inputs, but received: ["+typeof c+"]");var l=a.memoizeOptions,m=void 0===l?n:l,u=Array.isArray(m)?m:[m],d=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every((function(e){return"function"==typeof e}))){var n=t.map((function(e){return"function"==typeof e?"function "+(e.name||"unnamed")+"()":typeof e})).join(", ");throw new Error("createSelector expects all input-selectors to be functions, but received the following types: ["+n+"]")}return t}(o),p=e.apply(void 0,[function(){return s++,c.apply(null,arguments)}].concat(u)),f=e((function(){for(var e=[],t=d.length,n=0;n<t;n++)e.push(d[n].apply(null,arguments));return i=p.apply(null,e)}));return Object.assign(f,{resultFunc:c,memoizedResultFunc:p,dependencies:d,lastResult:function(){return i},recomputations:function(){return s},resetRecomputations:function(){return s=0}}),f}}var Xe=Je(We);const Ye=e=>e.comments.comments,Ge=e=>e.comments.focusedComment;function Qe(e){return Xe(Ye,(t=>[...t.values()].filter((t=>t.contentpath===e&&!(t.deleted||t.resolved)))))}function Ze(e){return Xe(Ye,(t=>{const n=t.get(e);if(void 0===n||!n.deleted&&!n.resolved)return n}))}const et=Xe(Ye,(e=>e.comments.remoteCommentCount),((e,t)=>t!==e.size||Array.from(e.values()).some((e=>!(!e.deleted&&!e.resolved&&e.replies.size===e.remoteReplyCount&&e.originalText===e.text)||Array.from(e.replies.values()).some((e=>e.deleted||e.originalText!==e.text)))))),tt=e=>[...e.comments.comments.values()].filter((e=>!e.deleted&&!e.resolved)).length;var nt=n(1688),ot=n.n(nt),rt=n(1238);const it=new Intl.DateTimeFormat([],{dateStyle:"medium",timeStyle:"short"}),st=({commentReply:e,store:t,onResolve:n,onEdit:s,onDelete:a,descriptionId:c,focused:l})=>{const{author:m,date:u}=e,[d,p]=(0,r.useState)(!1);(0,r.useEffect)((()=>{d&&!l&&p(!1)}),[l]);const f=(0,r.useRef)(null),h=(0,r.useRef)(null),y=e=>{e.preventDefault(),e.stopPropagation(),p(!d)};(0,r.useEffect)((()=>{d&&setTimeout((()=>f.current?.focus()),1)}),[d]);const v=e=>{h.current&&e.target instanceof Node&&!h.current.contains(e.target)&&p(!1)};(0,r.useEffect)((()=>(document.addEventListener("click",v,!0),()=>{document.removeEventListener("click",v,!0)})),[]);const b=new Date(u).toISOString();return i().createElement("div",{className:"comment-header"},i().createElement("div",{className:"comment-header__actions"},(s||a||n)&&i().createElement("div",{className:"comment-header__action comment-header__action--more",ref:h},i().createElement("details",{open:d,onClick:y},i().createElement("summary",{"aria-label":(0,o.AP)("More actions"),"aria-haspopup":"menu",role:"button",onClick:y,"aria-expanded":d},i().createElement(rt.A,{name:"dots-horizontal"})),i().createElement("div",{className:"comment-header__more-actions",role:"menu",ref:f},s&&i().createElement("button",{type:"button",role:"menuitem",onClick:async n=>{n.preventDefault(),s&&s(e,t)}},(0,o.AP)("Edit")),a&&i().createElement("button",{type:"button",role:"menuitem",onClick:async n=>{n.preventDefault(),a&&a(e,t)}},(0,o.AP)("Delete")),n&&i().createElement("button",{type:"button",role:"menuitem",onClick:o=>{o.preventDefault(),n&&n(e,t)}},(0,o.AP)("Resolve")))))),m&&m.avatarUrl&&i().createElement("img",{className:"comment-header__avatar",src:m.avatarUrl,alt:"",decoding:"async",loading:"lazy"}),i().createElement("span",{id:c},i().createElement("p",{className:"comment-header__author"},m?m.name:""),i().createElement("p",{className:"comment-header__date"},i().createElement("time",{dateTime:b},it.format(u)))))},at=i().forwardRef((({value:e,className:t,placeholder:n,onChange:o,focusOnMount:r,focusTarget:s=!1,additionalAttributes:a={}},c)=>{const l=i().useRef(null);return i().useImperativeHandle(c,(()=>l.current)),i().useEffect((()=>{l.current&&(l.current.style.height="",l.current.style.height=l.current.scrollHeight+"px")}),[e,l]),i().useEffect((()=>{r&&l.current&&l.current.focus()}),[l]),i().createElement("textarea",{"data-focus-target":s,rows:1,style:{resize:"none",overflowY:"hidden"},className:t,placeholder:n,ref:l,onChange:e=>{o&&o(e.target.value)},value:e,...a})}));async function ct(e,t,n){n.dispatch(Se(e.localId,t.localId,{mode:"saving"}));try{n.dispatch(Se(e.localId,t.localId,{mode:"default",text:t.newText,author:t.author}))}catch(o){console.error(o),n.dispatch(Se(e.localId,t.localId,{mode:"save_error"}))}}async function lt(e,t,n){n.dispatch(Se(e.localId,t.localId,{mode:"deleting"}));try{n.dispatch(Te(e.localId,t.localId))}catch(o){n.dispatch(Se(e.localId,t.localId,{mode:"delete_error"}))}}class mt extends i().Component{renderEditing(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,focused:r}),i().createElement("form",{onSubmit:async o=>{o.preventDefault(),await ct(e,t,n)}},i().createElement(at,{className:"comment-reply__input",value:t.newText,onChange:o=>{n.dispatch(Se(e.localId,t.localId,{newText:o}))}}),i().createElement("div",{className:"comment-reply__actions"},i().createElement("button",{type:"submit",disabled:0===t.newText.length,className:"comment-reply__button comment-reply__button--primary"},(0,o.AP)("Save")),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:o=>{o.preventDefault(),n.dispatch(Se(e.localId,t.localId,{mode:"default",newText:t.text}))}},(0,o.AP)("Cancel")))))}renderSaving(){const{reply:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment-reply__text"},e.text),i().createElement("div",{className:"comment-reply__progress"},(0,o.AP)("Saving...")))}renderSaveError(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,focused:r}),i().createElement("p",{className:"comment-reply__text"},t.text),i().createElement("div",{className:"comment-reply__error"},(0,o.AP)("Save error"),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:async o=>{o.preventDefault(),await ct(e,t,n)}},(0,o.AP)("Retry"))))}renderDeleteConfirm(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,focused:r}),i().createElement("p",{className:"comment-reply__text"},t.text),i().createElement("div",{className:"comment-reply__confirm-delete"},(0,o.AP)("Are you sure?"),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:o=>{o.preventDefault(),n.dispatch(Se(e.localId,t.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),i().createElement("button",{type:"button",className:"comment-reply__button comment-reply__button--primary",onClick:async o=>{o.preventDefault(),await lt(e,t,n)}},(0,o.AP)("Delete"))))}renderDeleting(){const{reply:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment-reply__text"},e.text),i().createElement("div",{className:"comment-reply__progress"},(0,o.AP)("Deleting")))}renderDeleteError(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,focused:r}),i().createElement("p",{className:"comment-reply__text"},t.text),i().createElement("div",{className:"comment-reply__error"},(0,o.AP)("Delete error"),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:async o=>{o.preventDefault(),n.dispatch(Se(e.localId,t.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),i().createElement("button",{type:"button",className:"comment-reply__button",onClick:async o=>{o.preventDefault(),await lt(e,t,n)}},(0,o.AP)("Retry"))))}renderDefault(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;let s,a;(null===t.author||this.props.user&&this.props.user.id===t.author.id)&&(s=()=>{n.dispatch(Se(e.localId,t.localId,{mode:"editing",newText:t.text}))},a=()=>{n.dispatch(Se(e.localId,t.localId,{mode:"delete_confirm"}))});let c="";return t.remoteId&&t.text===t.originalText||(c=(0,o.AP)("Save the page to save this reply")),i().createElement(i().Fragment,null,i().createElement(st,{commentReply:t,store:n,onEdit:s,onDelete:a,focused:r}),i().createElement("p",{className:"comment-reply__text"},t.text),c&&i().createElement("div",{className:"comment__notice-placeholder"},i().createElement("div",{className:"comment__notice",role:"status"},i().createElement(rt.A,{name:"info-circle"}),c)))}render(){let e;switch(this.props.reply.mode){case"editing":e=this.renderEditing();break;case"saving":e=this.renderSaving();break;case"save_error":e=this.renderSaveError();break;case"delete_confirm":e=this.renderDeleteConfirm();break;case"deleting":e=this.renderDeleting();break;case"delete_error":e=this.renderDeleteError();break;default:e=this.renderDefault()}return i().createElement("li",{key:this.props.reply.localId,className:`comment-reply comment-reply--mode-${this.props.reply.mode}`,"data-reply-id":this.props.reply.localId},e)}}async function ut(e,t){t.dispatch(Oe(e.localId,{mode:"saving"}));try{t.dispatch(Oe(e.localId,{mode:"default",text:e.newText,remoteId:e.remoteId,author:e.author,date:e.date}))}catch(n){console.error(n),t.dispatch(Oe(e.localId,{mode:"save_error"}))}}async function dt(e,t){t.dispatch(Oe(e.localId,{mode:"deleting"}));try{t.dispatch(ke(e.localId))}catch(n){console.error(n),t.dispatch(Oe(e.localId,{mode:"delete_error"}))}}function pt(e,t){t.dispatch(Re(e.localId))}class ft extends i().Component{renderReplies({hideNewReply:e=!1}={}){const{comment:t,isFocused:n,store:r,user:s}=this.props;if(!t.remoteId)return null;const a=[];let c,l=!1;for(const e of t.replies.values())"saving"!==e.mode&&"editing"!==e.mode||(l=!0),e.deleted||a.push(i().createElement(mt,{key:e.localId,store:r,user:s,comment:t,reply:e,isFocused:n}));if(e||l||!n&&!t.newReply){if(0===a.length)return null}else c=i().createElement("form",{onSubmit:async e=>{e.preventDefault();const n=Le(b(),s,Date.now(),{text:t.newReply,mode:"default"});r.dispatch(Fe(t.localId,n)),r.dispatch(Oe(t.localId,{newReply:""}))}},i().createElement(at,{className:"comment__reply-input",placeholder:(0,o.AP)("Enter your reply..."),value:t.newReply,onChange:e=>{r.dispatch(Oe(t.localId,{newReply:e}))}}),i().createElement("div",{className:"comment__reply-actions"},i().createElement("button",{disabled:0===t.newReply.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Reply")),i().createElement("button",{type:"button",onClick:e=>{e.preventDefault(),r.dispatch(Oe(t.localId,{newReply:""})),r.dispatch(De(null)),e.stopPropagation()},className:"comment__button"},(0,o.AP)("Cancel"))));return i().createElement(i().Fragment,null,i().createElement("ul",{className:"comment__replies"},a),c)}renderCreating(){const{comment:e,store:t,isFocused:n}=this.props,r=`comment-description-${e.localId}`;return i().createElement(i().Fragment,null,i().createElement(st,{descriptionId:r,commentReply:e,store:t,focused:n}),i().createElement("form",{onSubmit:async n=>{n.preventDefault(),await ut(e,t)}},i().createElement(at,{focusTarget:n,className:"comment__input",value:e.newText,onChange:n=>{t.dispatch(Oe(e.localId,{newText:n}))},placeholder:(0,o.AP)("Enter your comments..."),additionalAttributes:{"aria-describedby":r}}),i().createElement("div",{className:"comment__actions"},i().createElement("button",{disabled:0===e.newText.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Comment")),i().createElement("button",{type:"button",onClick:n=>{n.preventDefault(),t.dispatch(ke(e.localId))},className:"comment__button"},(0,o.AP)("Cancel")))))}renderEditing(){const{comment:e,store:t,isFocused:n}=this.props,r=`comment-description-${e.localId}`;return i().createElement(i().Fragment,null,i().createElement(st,{descriptionId:r,commentReply:e,store:t,focused:n}),i().createElement("form",{onSubmit:async n=>{n.preventDefault(),await ut(e,t)}},i().createElement(at,{focusTarget:n,className:"comment__input",value:e.newText,additionalAttributes:{"aria-describedby":r},onChange:n=>{t.dispatch(Oe(e.localId,{newText:n}))}}),i().createElement("div",{className:"comment__actions"},i().createElement("button",{disabled:0===e.newText.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Save")),i().createElement("button",{type:"button",onClick:n=>{n.preventDefault(),t.dispatch(Oe(e.localId,{mode:"default",newText:e.text}))},className:"comment__button"},(0,o.AP)("Cancel")))),this.renderReplies({hideNewReply:!0}))}renderSaving(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),i().createElement("div",{className:"comment__progress"},(0,o.AP)("Saving...")),this.renderReplies({hideNewReply:!0}))}renderSaveError(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),this.renderReplies({hideNewReply:!0}),i().createElement("div",{className:"comment__error"},(0,o.AP)("Save error"),i().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),await ut(e,t)}},(0,o.AP)("Retry"))))}renderDeleteConfirm(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),i().createElement("div",{className:"comment__confirm-delete"},(0,o.AP)("Are you sure?"),i().createElement("button",{type:"button",className:"comment__button button button-small",onClick:n=>{n.preventDefault(),t.dispatch(Oe(e.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),i().createElement("button",{type:"button",className:"comment__button button button-small no",onClick:async n=>{n.preventDefault(),await dt(e,t)}},(0,o.AP)("Delete"))),this.renderReplies({hideNewReply:!0}))}renderDeleting(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),i().createElement("div",{className:"comment__progress"},(0,o.AP)("Deleting")),this.renderReplies({hideNewReply:!0}))}renderDeleteError(){const{comment:e,store:t,isFocused:n}=this.props;return i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,focused:n}),i().createElement("p",{className:"comment__text"},e.text),this.renderReplies({hideNewReply:!0}),i().createElement("div",{className:"comment__error"},(0,o.AP)("Delete error"),i().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),t.dispatch(Oe(e.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),i().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),await dt(e,t)}},(0,o.AP)("Retry"))))}renderDefault(){const{comment:e,store:t,isFocused:n}=this.props;let r,s;(null===e.author||this.props.user&&this.props.user.id===e.author.id)&&(r=()=>{t.dispatch(Oe(e.localId,{mode:"editing",newText:e.text}))},s=()=>{t.dispatch(Oe(e.localId,{mode:"delete_confirm"}))});let a="";return e.remoteId?e.text!==e.originalText&&(a=(0,o.AP)("Save the page to save this comment")):a=(0,o.AP)("Save the page to add this comment"),i().createElement(i().Fragment,null,i().createElement(st,{commentReply:e,store:t,onResolve:pt,onEdit:r,onDelete:s,focused:n}),i().createElement("p",{className:"comment__text"},e.text),a&&i().createElement("div",{className:"comment__notice-placeholder"},i().createElement("div",{className:"comment__notice",role:"status"},i().createElement(rt.A,{name:"info-circle"}),a)),this.renderReplies())}render(){let e;switch(this.props.comment.mode){case"creating":e=this.renderCreating();break;case"editing":e=this.renderEditing();break;case"saving":e=this.renderSaving();break;case"save_error":e=this.renderSaveError();break;case"delete_confirm":e=this.renderDeleteConfirm();break;case"deleting":e=this.renderDeleting();break;case"delete_error":e=this.renderDeleteError();break;default:e=this.renderDefault()}const t=this.props.layout.getCommentPosition(this.props.comment.localId);return i().createElement(ot(),{focusTrapOptions:{preventScroll:!0,clickOutsideDeactivates:!0,onDeactivate:()=>{this.props.store.dispatch(De(null,{updatePinnedComment:!0,forceFocus:!1}))},initialFocus:'[data-focus-target="true"]',delayFocus:!1},active:this.props.isFocused&&this.props.forceFocus},i().createElement("li",{tabIndex:-1,"data-focus-target":this.props.isFocused&&!["creating","editing"].includes(this.props.comment.mode),key:this.props.comment.localId,className:`comment comment--mode-${this.props.comment.mode} ${this.props.isFocused?"comment--focused":""}`,style:{position:"absolute",top:`${t}px`,display:this.props.isVisible?"block":"none"},"data-comment-id":this.props.comment.localId,onClick:()=>{this.props.store.dispatch(De(this.props.comment.localId,{updatePinnedComment:!1,forceFocus:this.props.isFocused&&this.props.forceFocus}))},onDoubleClick:()=>{this.props.store.dispatch(De(this.props.comment.localId,{updatePinnedComment:!0,forceFocus:!0}))}},e))}componentDidMount(){const e=a().findDOMNode(this);e instanceof HTMLElement&&(this.props.layout.setCommentElement(this.props.comment.localId,e),this.props.isVisible&&this.props.layout.setCommentHeight(this.props.comment.localId,e.offsetHeight))}componentWillUnmount(){this.props.layout.setCommentElement(this.props.comment.localId,null)}componentDidUpdate(){const e=a().findDOMNode(this);this.props.isVisible&&e instanceof HTMLElement&&this.props.layout.setCommentHeight(this.props.comment.localId,e.offsetHeight)}}function ht({prefix:e,value:t,fieldName:n}){return i().createElement("input",{type:"hidden",name:`${e}-${n}`,value:null===t?"":t,id:`id_${e}-${n}`})}function yt({reply:e,formNumber:t,prefix:n}){const o=`${n}-${t}`;return i().createElement("fieldset",null,i().createElement(ht,{fieldName:"DELETE",value:e.deleted?1:"",prefix:o}),i().createElement(ht,{fieldName:"id",value:e.remoteId,prefix:o}),i().createElement(ht,{fieldName:"text",value:e.text,prefix:o}))}function vt({replies:e,prefix:t,remoteReplyCount:n}){const o=`${t}-replies`,r=e.map(((e,t)=>i().createElement(yt,{key:e.localId,formNumber:t,reply:e,prefix:o})));return i().createElement(i().Fragment,null,i().createElement(ht,{fieldName:"TOTAL_FORMS",value:e.length,prefix:o}),i().createElement(ht,{fieldName:"INITIAL_FORMS",value:n,prefix:o}),i().createElement(ht,{fieldName:"MIN_NUM_FORMS",value:"0",prefix:o}),i().createElement(ht,{fieldName:"MAX_NUM_FORMS",value:"",prefix:o}),r)}function bt({comment:e,formNumber:t,prefix:n}){const o=`${n}-${t}`;return i().createElement("fieldset",null,i().createElement(ht,{fieldName:"DELETE",value:e.deleted?1:"",prefix:o}),i().createElement(ht,{fieldName:"resolved",value:e.resolved?1:"",prefix:o}),i().createElement(ht,{fieldName:"id",value:e.remoteId,prefix:o}),i().createElement(ht,{fieldName:"contentpath",value:e.contentpath,prefix:o}),i().createElement(ht,{fieldName:"text",value:e.text,prefix:o}),i().createElement(ht,{fieldName:"position",value:e.position,prefix:o}),i().createElement(vt,{replies:Array.from(e.replies.values()),prefix:o,remoteReplyCount:e.remoteReplyCount}))}function gt({comments:e,remoteCommentCount:t}){const n="comments",o=e.map(((e,t)=>i().createElement(bt,{key:e.localId,comment:e,formNumber:t,prefix:n})));return i().createElement(i().Fragment,null,i().createElement(ht,{fieldName:"TOTAL_FORMS",value:e.length,prefix:n}),i().createElement(ht,{fieldName:"INITIAL_FORMS",value:t,prefix:n}),i().createElement(ht,{fieldName:"MIN_NUM_FORMS",value:"0",prefix:n}),i().createElement(ht,{fieldName:"MAX_NUM_FORMS",value:"",prefix:n}),o)}const Et=(e,t)=>{const n=p(e,String(t),{name:"",avatar_url:""});return{id:t,name:n.name,avatarUrl:n.avatar_url}};function _t({store:e,layout:t,comments:n}){const o=e.getState(),{user:s,currentTab:a}=o.settings,{focusedComment:c,forceFocus:l}=o.comments,m=i().useRef(null),u=(0,r.useCallback)((e=>{if(!m.current)return;if("scroll"===e.type&&!document.querySelector(".form-side--comments"))return;const t=document.querySelector(".content"),n=t?.getBoundingClientRect().top;m.current.style.top=`${n}px`}),[m]);let d=n;i().useEffect((()=>{const e=document.querySelector("#main"),t=document.querySelector('[data-side-panel="comments"]');return e?.addEventListener("scroll",u),t?.addEventListener("show",u),()=>{e?.removeEventListener("scroll",u),t?.removeEventListener("show",u)}}),[]),s||(d=[]),d=d.filter((({deleted:e,resolved:t})=>!(e||t)));const p=d.map((n=>i().createElement(ft,{key:n.localId,store:e,layout:t,user:s,comment:n,isFocused:n.localId===c,forceFocus:l,isVisible:t.getCommentVisible(a,n.localId)})));return i().createElement("ol",{ref:m,className:"comments-list"},p)}class Ct{store;layout;utils={selectCommentsForContentPathFactory:Qe,selectCommentFactory:Ze};selectors={selectComments:Ye,selectFocused:Ge,selectIsDirty:et,selectCommentCount:tt};actions=Me;activationHandlers=[];constructor(){this.store=d(Ke,{settings:qe}),this.layout=new f}setUser(e,t){this.store.dispatch($e({user:Et(t,e)}))}updateAnnotation(e,t){this.attachAnnotationLayout(e,t),this.store.dispatch(Oe(t,{annotation:e}))}attachAnnotationLayout(e,t){this.layout.setCommentAnnotation(t,e)}setCurrentTab(e){this.store.dispatch($e({currentTab:e}))}makeComment(e,t,n=""){const o=v();return this.attachAnnotationLayout(e,o),this.store.dispatch(xe(Ue(t,n,o,e,this.store.getState().settings.user,Date.now(),{mode:"creating"}))),this.store.dispatch(De(o,{updatePinnedComment:!0,forceFocus:!0})),o}activate(){this.activationHandlers.forEach((e=>e()))}onActivate(e){this.activationHandlers.push(e)}invalidateContentPath(e){this.store.dispatch(je(e))}updateContentPath(e,t){this.store.dispatch(Oe(e,{contentpath:t}))}renderApp(e,t,n,o,r){let s=null;this.setUser(n,r);let c=null;const l=new URLSearchParams(window.location.search).get("comment");l&&(c=parseInt(l,10));const m=()=>{const n=this.store.getState(),o=Array.from(n.comments.comments.values());a().render(i().createElement(gt,{comments:o.filter((e=>"creating"!==e.mode)),remoteCommentCount:n.comments.remoteCommentCount}),t),n.comments.pinnedComment!==s&&(this.layout.setPinnedComment(n.comments.pinnedComment),s=n.comments.pinnedComment),a().render(i().createElement(_t,{store:this.store,layout:this.layout,comments:o}),e,(()=>{this.layout.refreshDesiredPositions(n.settings.currentTab),this.layout.refreshLayout()&&a().render(i().createElement(_t,{store:this.store,layout:this.layout,comments:o}),e)}))};for(const e of o){const t=v();this.store.dispatch(xe(Ue(e.contentpath,e.position,t,null,Et(r,e.user),Date.parse(e.created_at),{remoteId:e.pk,text:e.text,deleted:e.deleted,resolved:e.resolved})));for(const n of e.replies)this.store.dispatch(Fe(t,Le(b(),Et(r,n.user),Date.parse(n.created_at),{remoteId:n.pk,text:n.text,deleted:n.deleted})));c&&e.pk===c&&this.store.dispatch(De(t,{updatePinnedComment:!0,forceFocus:!0}))}m(),this.store.subscribe(m),document.body.addEventListener("mousedown",(e=>{e.target instanceof HTMLElement&&(e.target.closest("#comments, [data-annotation], [data-comment-add]")||setTimeout((()=>{this.store.dispatch(De(null,{updatePinnedComment:!0,forceFocus:!1}))}),200))})),document.body.addEventListener("commentAnchorVisibilityChange",(()=>{this.layout.refreshDesiredPositions(this.store.getState().settings.currentTab),this.layout.refreshLayout()&&m()}))}}window.comments=(()=>{const e=new Ct;function t(e){return(e.ctrlKey||e.metaKey)&&e.altKey&&77===e.keyCode}function n(e){if(e.closest("[data-contentpath-disabled]"))return"";let t=e.closest("[data-contentpath]");const n=[];for(;null!==t;)n.push(t.dataset.contentpath),t=t.parentElement.closest("[data-contentpath]");return n.reverse(),n.join(".")}class r{constructor(e,t){this.node=t,this.fieldNode=e,this.unsubscribe=null}subscribeToUpdates(t){const{selectFocused:n}=e.selectors,o=e.utils.selectCommentFactory(t),r=e.store,i=r.getState();let s=n(i)===t;s&&this.onFocus(),this.show(),this.unsubscribe=r.subscribe((()=>{const e=r.getState();o(e)||this.onDelete();const i=n(e)===t;i!==s&&(s?this.onUnfocus():this.onFocus(),s=i)})),this.setOnClickHandler(t)}onDelete(){this.node.remove(),this.unsubscribe&&this.unsubscribe()}onFocus(){this.node.classList.add("w-field__comment-button--focused"),this.node.ariaLabel=(0,o.AP)("Unfocus comment")}onUnfocus(){this.node.classList.remove("w-field__comment-button--focused"),this.node.ariaLabel=(0,o.AP)("Focus comment")}show(){this.node.classList.remove("!w-hidden")}hide(){this.node.classList.add("!w-hidden")}setOnClickHandler(t){this.node.addEventListener("click",(()=>{e.activate(),e.store.dispatch(e.actions.setFocusedComment(t,{updatePinnedComment:!0,forceFocus:!0}))}))}getTab(){return this.fieldNode.closest('[role="tabpanel"]')?.getAttribute("id")}getAnchorNode(){return this.fieldNode}}class i extends Error{constructor(e,...t){super(...t),this.name="MissingElementError",this.element=e}}class s{constructor({fieldNode:e,commentAdditionNode:t}){if(this.fieldNode=e,this.contentpath=n(e),!t)throw new i(t);this.commentAdditionNode=t}register(){if(!this.contentpath)return void this.commentAdditionNode.remove();const n=e.store.getState(),o=e.utils.selectCommentsForContentPathFactory(this.contentpath);let r=o(n);const i=e.store.subscribe((()=>{const t=e.store.getState(),n=o(t);r!==n&&(r=n,r.filter((e=>null===e.annotation)).forEach((t=>{const n=this.getAnnotationForComment(t);e.updateAnnotation(n,t.localId),n.subscribeToUpdates(t.localId)})))}));n.comments.comments.forEach((t=>{if(t.contentpath===this.contentpath){const n=this.getAnnotationForComment(t);e.updateAnnotation(n,t.localId),n.subscribeToUpdates(t.localId)}}));const s=()=>{const t=this.getAnnotationForComment(),n=e.makeComment(t,this.contentpath);t.subscribeToUpdates(n)};return this.commentAdditionNode.addEventListener("click",(()=>{e.activate(),s()})),this.fieldNode.addEventListener("keyup",(n=>{t(n)&&(0===r.length?s():e.store.dispatch(e.actions.setFocusedComment(r[0].localId,{updatePinnedComment:!0,forceFocus:!0})))})),i}getAnnotationForComment(){const t=document.querySelector("#comment-icon").cloneNode(!0);return t.id="",t.setAttribute("aria-label",this.commentAdditionNode.getAttribute("aria-label")),t.setAttribute("aria-describedby",this.commentAdditionNode.getAttribute("aria-describedby")),t.classList.remove("!w-hidden"),this.commentAdditionNode.insertAdjacentElement("beforebegin",t),new r(this.fieldNode,t,e)}}function a(e){new s({fieldNode:e.closest("[data-contentpath]"),commentAdditionNode:e}).register()}function c(t){const n=document.getElementById("comments"),o=document.getElementById("comments-output"),r=document.getElementById("comments-data");if(!n||!o||!r)throw new Error("Comments app failed to initialise. Missing HTML element");const i=JSON.parse(r.textContent);e.renderApp(n,o,i.user,i.comments,new Map(Object.entries(i.authors))),t.querySelectorAll('[data-component="add-comment-button"]').forEach(a);const s=t.querySelector('[data-tabs] [role="tablist"]');s&&(e.setCurrentTab(s.querySelector('[role="tab"][aria-selected="true"]').getAttribute("href").replace("#","")),s.addEventListener("switch",(t=>{e.setCurrentTab(t.detail.tab)})));const c=document.querySelector("[data-comment-notifications]");c.hidden=!1,c.querySelector("input").setAttribute("form",t.id),t.querySelector(".tab-content").classList.add("tab-content--comments-enabled");const l=document.querySelector('[data-side-panel="comments"]');e.onActivate((()=>{l.dispatchEvent(new Event("open"))}));const m=document.querySelector('[data-side-panel-toggle="comments"] [data-side-panel-toggle-counter]'),u=()=>{const t=e.selectors.selectCommentCount(e.store.getState());m&&(t>0?(m.innerText=t.toString(),m.hidden=!1):m.hidden=!0)};e.store.subscribe(u),u()}return document.addEventListener("w-comments:init",(({target:e})=>{setTimeout((()=>{c(e)}))}),{once:!0}),{commentApp:e,getContentPath:n,isCommentShortcut:t,initAddCommentButton:a,initCommentsInterface:c}})()}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={exports:{}};return t[e](i,i.exports,o),i.exports}o.m=t,e=[],o.O=(t,n,r,i)=>{if(!n){var s=1/0;for(m=0;m<e.length;m++){for(var[n,r,i]=e[m],a=!0,c=0;c<n.length;c++)(!1&i||s>=i)&&Object.keys(o.O).every((e=>o.O[e](n[c])))?n.splice(c--,1):(a=!1,i<s&&(s=i));if(a){e.splice(m--,1);var l=r();void 0!==l&&(t=l)}}return t}i=i||0;for(var m=e.length;m>0&&e[m-1][2]>i;m--)e[m]=e[m-1];e[m]=[n,r,i]},o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.j=125,(()=>{var e={125:0};o.O.j=t=>0===e[t];var t=(t,n)=>{var r,i,[s,a,c]=n,l=0;if(s.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(c)var m=c(o)}for(t&&t(n);l<s.length;l++)i=s[l],o.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return o.O(m)},n=globalThis.webpackChunkwagtail=globalThis.webpackChunkwagtail||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var r=o.O(void 0,[321],(()=>o(406)));r=o.O(r)})();