wagtail 7.0.1__py3-none-any.whl → 7.1__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 (1731) hide show
  1. wagtail/__init__.py +1 -1
  2. wagtail/actions/copy_page.py +8 -7
  3. wagtail/actions/create_alias.py +1 -0
  4. wagtail/admin/apps.py +2 -0
  5. wagtail/admin/checks.py +2 -1
  6. wagtail/admin/filters.py +11 -6
  7. wagtail/admin/forms/account.py +4 -1
  8. wagtail/admin/forms/pages.py +1 -1
  9. wagtail/admin/forms/workflows.py +1 -1
  10. wagtail/admin/locale/af/LC_MESSAGES/djangojs.mo +0 -0
  11. wagtail/admin/locale/ar/LC_MESSAGES/django.mo +0 -0
  12. wagtail/admin/locale/ar/LC_MESSAGES/django.po +2936 -375
  13. wagtail/admin/locale/ar/LC_MESSAGES/djangojs.mo +0 -0
  14. wagtail/admin/locale/ar/LC_MESSAGES/djangojs.po +167 -22
  15. wagtail/admin/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  16. wagtail/admin/locale/be/LC_MESSAGES/django.mo +0 -0
  17. wagtail/admin/locale/be/LC_MESSAGES/django.po +4 -32
  18. wagtail/admin/locale/be/LC_MESSAGES/djangojs.mo +0 -0
  19. wagtail/admin/locale/be/LC_MESSAGES/djangojs.po +8 -2
  20. wagtail/admin/locale/bg/LC_MESSAGES/django.po +1 -1
  21. wagtail/admin/locale/bn/LC_MESSAGES/django.po +1 -1
  22. wagtail/admin/locale/ca/LC_MESSAGES/django.mo +0 -0
  23. wagtail/admin/locale/ca/LC_MESSAGES/django.po +31 -63
  24. wagtail/admin/locale/ca/LC_MESSAGES/djangojs.mo +0 -0
  25. wagtail/admin/locale/ca/LC_MESSAGES/djangojs.po +15 -0
  26. wagtail/admin/locale/cs/LC_MESSAGES/django.mo +0 -0
  27. wagtail/admin/locale/cs/LC_MESSAGES/django.po +6 -39
  28. wagtail/admin/locale/cs/LC_MESSAGES/djangojs.mo +0 -0
  29. wagtail/admin/locale/cs/LC_MESSAGES/djangojs.po +12 -3
  30. wagtail/admin/locale/cy/LC_MESSAGES/django.mo +0 -0
  31. wagtail/admin/locale/cy/LC_MESSAGES/django.po +1 -9
  32. wagtail/admin/locale/da/LC_MESSAGES/django.mo +0 -0
  33. wagtail/admin/locale/da/LC_MESSAGES/django.po +1 -5
  34. wagtail/admin/locale/de/LC_MESSAGES/django.mo +0 -0
  35. wagtail/admin/locale/de/LC_MESSAGES/django.po +13 -66
  36. wagtail/admin/locale/de/LC_MESSAGES/djangojs.mo +0 -0
  37. wagtail/admin/locale/de/LC_MESSAGES/djangojs.po +12 -3
  38. wagtail/admin/locale/dv/LC_MESSAGES/django.mo +0 -0
  39. wagtail/admin/locale/dv/LC_MESSAGES/django.po +9 -65
  40. wagtail/admin/locale/dv/LC_MESSAGES/djangojs.mo +0 -0
  41. wagtail/admin/locale/dv/LC_MESSAGES/djangojs.po +9 -0
  42. wagtail/admin/locale/el/LC_MESSAGES/django.mo +0 -0
  43. wagtail/admin/locale/el/LC_MESSAGES/django.po +6 -11
  44. wagtail/admin/locale/el/LC_MESSAGES/djangojs.mo +0 -0
  45. wagtail/admin/locale/el/LC_MESSAGES/djangojs.po +8 -2
  46. wagtail/admin/locale/en/LC_MESSAGES/django.po +232 -279
  47. wagtail/admin/locale/en/LC_MESSAGES/djangojs.po +41 -24
  48. wagtail/admin/locale/en_IN/LC_MESSAGES/djangojs.mo +0 -0
  49. wagtail/admin/locale/es/LC_MESSAGES/django.mo +0 -0
  50. wagtail/admin/locale/es/LC_MESSAGES/django.po +13 -58
  51. wagtail/admin/locale/es/LC_MESSAGES/djangojs.mo +0 -0
  52. wagtail/admin/locale/es/LC_MESSAGES/djangojs.po +12 -3
  53. wagtail/admin/locale/es_419/LC_MESSAGES/django.po +4 -4
  54. wagtail/admin/locale/es_VE/LC_MESSAGES/django.po +1 -1
  55. wagtail/admin/locale/es_VE/LC_MESSAGES/djangojs.mo +0 -0
  56. wagtail/admin/locale/et/LC_MESSAGES/django.mo +0 -0
  57. wagtail/admin/locale/et/LC_MESSAGES/django.po +6 -35
  58. wagtail/admin/locale/et/LC_MESSAGES/djangojs.mo +0 -0
  59. wagtail/admin/locale/et/LC_MESSAGES/djangojs.po +6 -0
  60. wagtail/admin/locale/eu/LC_MESSAGES/django.po +1 -1
  61. wagtail/admin/locale/fa/LC_MESSAGES/django.mo +0 -0
  62. wagtail/admin/locale/fa/LC_MESSAGES/django.po +4 -39
  63. wagtail/admin/locale/fa/LC_MESSAGES/djangojs.mo +0 -0
  64. wagtail/admin/locale/fa/LC_MESSAGES/djangojs.po +5 -2
  65. wagtail/admin/locale/fi/LC_MESSAGES/django.mo +0 -0
  66. wagtail/admin/locale/fi/LC_MESSAGES/django.po +13 -51
  67. wagtail/admin/locale/fi/LC_MESSAGES/djangojs.mo +0 -0
  68. wagtail/admin/locale/fi/LC_MESSAGES/djangojs.po +8 -2
  69. wagtail/admin/locale/fr/LC_MESSAGES/django.mo +0 -0
  70. wagtail/admin/locale/fr/LC_MESSAGES/django.po +33 -63
  71. wagtail/admin/locale/fr/LC_MESSAGES/djangojs.mo +0 -0
  72. wagtail/admin/locale/fr/LC_MESSAGES/djangojs.po +17 -2
  73. wagtail/admin/locale/gl/LC_MESSAGES/django.mo +0 -0
  74. wagtail/admin/locale/gl/LC_MESSAGES/django.po +31 -63
  75. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.mo +0 -0
  76. wagtail/admin/locale/gl/LC_MESSAGES/djangojs.po +17 -2
  77. wagtail/admin/locale/he_IL/LC_MESSAGES/django.po +1 -1
  78. wagtail/admin/locale/hi/LC_MESSAGES/djangojs.mo +0 -0
  79. wagtail/admin/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  80. wagtail/admin/locale/hr_HR/LC_MESSAGES/django.po +6 -43
  81. wagtail/admin/locale/hr_HR/LC_MESSAGES/djangojs.mo +0 -0
  82. wagtail/admin/locale/hr_HR/LC_MESSAGES/djangojs.po +6 -0
  83. wagtail/admin/locale/ht/LC_MESSAGES/django.po +1 -1
  84. wagtail/admin/locale/hu/LC_MESSAGES/django.mo +0 -0
  85. wagtail/admin/locale/hu/LC_MESSAGES/django.po +84 -64
  86. wagtail/admin/locale/hu/LC_MESSAGES/djangojs.mo +0 -0
  87. wagtail/admin/locale/hu/LC_MESSAGES/djangojs.po +15 -0
  88. wagtail/admin/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  89. wagtail/admin/locale/id_ID/LC_MESSAGES/django.po +1 -5
  90. wagtail/admin/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  91. wagtail/admin/locale/is_IS/LC_MESSAGES/django.po +130 -69
  92. wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.mo +0 -0
  93. wagtail/admin/locale/is_IS/LC_MESSAGES/djangojs.po +9 -0
  94. wagtail/admin/locale/it/LC_MESSAGES/django.mo +0 -0
  95. wagtail/admin/locale/it/LC_MESSAGES/django.po +96 -68
  96. wagtail/admin/locale/it/LC_MESSAGES/djangojs.mo +0 -0
  97. wagtail/admin/locale/it/LC_MESSAGES/djangojs.po +11 -2
  98. wagtail/admin/locale/ja/LC_MESSAGES/django.mo +0 -0
  99. wagtail/admin/locale/ja/LC_MESSAGES/django.po +5 -6
  100. wagtail/admin/locale/ka/LC_MESSAGES/django.po +1 -1
  101. wagtail/admin/locale/ko/LC_MESSAGES/django.mo +0 -0
  102. wagtail/admin/locale/ko/LC_MESSAGES/django.po +7 -44
  103. wagtail/admin/locale/ko/LC_MESSAGES/djangojs.mo +0 -0
  104. wagtail/admin/locale/ko/LC_MESSAGES/djangojs.po +8 -2
  105. wagtail/admin/locale/lt/LC_MESSAGES/django.mo +0 -0
  106. wagtail/admin/locale/lt/LC_MESSAGES/django.po +4 -32
  107. wagtail/admin/locale/lv/LC_MESSAGES/django.mo +0 -0
  108. wagtail/admin/locale/lv/LC_MESSAGES/django.po +4 -8
  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 -9
  113. wagtail/admin/locale/mn/LC_MESSAGES/django.mo +0 -0
  114. wagtail/admin/locale/mn/LC_MESSAGES/django.po +4 -24
  115. wagtail/admin/locale/my/LC_MESSAGES/django.po +1 -1
  116. wagtail/admin/locale/nb/LC_MESSAGES/django.mo +0 -0
  117. wagtail/admin/locale/nb/LC_MESSAGES/django.po +4 -32
  118. wagtail/admin/locale/nl/LC_MESSAGES/django.mo +0 -0
  119. wagtail/admin/locale/nl/LC_MESSAGES/django.po +13 -66
  120. wagtail/admin/locale/nl/LC_MESSAGES/djangojs.mo +0 -0
  121. wagtail/admin/locale/nl/LC_MESSAGES/djangojs.po +12 -3
  122. wagtail/admin/locale/pl/LC_MESSAGES/django.mo +0 -0
  123. wagtail/admin/locale/pl/LC_MESSAGES/django.po +13 -66
  124. wagtail/admin/locale/pl/LC_MESSAGES/djangojs.mo +0 -0
  125. wagtail/admin/locale/pl/LC_MESSAGES/djangojs.po +10 -1
  126. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  127. wagtail/admin/locale/pt_BR/LC_MESSAGES/django.po +13 -66
  128. wagtail/admin/locale/pt_BR/LC_MESSAGES/djangojs.mo +0 -0
  129. wagtail/admin/locale/pt_BR/LC_MESSAGES/djangojs.po +9 -0
  130. wagtail/admin/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  131. wagtail/admin/locale/pt_PT/LC_MESSAGES/django.po +9 -43
  132. wagtail/admin/locale/pt_PT/LC_MESSAGES/djangojs.mo +0 -0
  133. wagtail/admin/locale/pt_PT/LC_MESSAGES/djangojs.po +6 -0
  134. wagtail/admin/locale/ro/LC_MESSAGES/django.mo +0 -0
  135. wagtail/admin/locale/ro/LC_MESSAGES/django.po +13 -66
  136. wagtail/admin/locale/ro/LC_MESSAGES/djangojs.mo +0 -0
  137. wagtail/admin/locale/ro/LC_MESSAGES/djangojs.po +11 -2
  138. wagtail/admin/locale/ru/LC_MESSAGES/django.mo +0 -0
  139. wagtail/admin/locale/ru/LC_MESSAGES/django.po +13 -66
  140. wagtail/admin/locale/ru/LC_MESSAGES/djangojs.mo +0 -0
  141. wagtail/admin/locale/ru/LC_MESSAGES/djangojs.po +10 -1
  142. wagtail/admin/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  143. wagtail/admin/locale/sk_SK/LC_MESSAGES/django.po +1 -5
  144. wagtail/admin/locale/sl/LC_MESSAGES/django.mo +0 -0
  145. wagtail/admin/locale/sl/LC_MESSAGES/django.po +13 -66
  146. wagtail/admin/locale/sl/LC_MESSAGES/djangojs.mo +0 -0
  147. wagtail/admin/locale/sl/LC_MESSAGES/djangojs.po +11 -2
  148. wagtail/admin/locale/sv/LC_MESSAGES/django.mo +0 -0
  149. wagtail/admin/locale/sv/LC_MESSAGES/django.po +13 -66
  150. wagtail/admin/locale/sv/LC_MESSAGES/djangojs.mo +0 -0
  151. wagtail/admin/locale/sv/LC_MESSAGES/djangojs.po +11 -2
  152. wagtail/admin/locale/ta/LC_MESSAGES/djangojs.mo +0 -0
  153. wagtail/admin/locale/tet/LC_MESSAGES/django.mo +0 -0
  154. wagtail/admin/locale/tet/LC_MESSAGES/django.po +1 -5
  155. wagtail/admin/locale/th/LC_MESSAGES/django.mo +0 -0
  156. wagtail/admin/locale/th/LC_MESSAGES/django.po +1 -13
  157. wagtail/admin/locale/tr/LC_MESSAGES/django.mo +0 -0
  158. wagtail/admin/locale/tr/LC_MESSAGES/django.po +11 -30
  159. wagtail/admin/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  160. wagtail/admin/locale/tr_TR/LC_MESSAGES/django.po +1 -29
  161. wagtail/admin/locale/ug/LC_MESSAGES/django.mo +0 -0
  162. wagtail/admin/locale/ug/LC_MESSAGES/django.po +12 -65
  163. wagtail/admin/locale/ug/LC_MESSAGES/djangojs.mo +0 -0
  164. wagtail/admin/locale/ug/LC_MESSAGES/djangojs.po +9 -0
  165. wagtail/admin/locale/uk/LC_MESSAGES/django.mo +0 -0
  166. wagtail/admin/locale/uk/LC_MESSAGES/django.po +6 -43
  167. wagtail/admin/locale/uk/LC_MESSAGES/djangojs.mo +0 -0
  168. wagtail/admin/locale/uk/LC_MESSAGES/djangojs.po +9 -2
  169. wagtail/admin/locale/vi/LC_MESSAGES/django.mo +0 -0
  170. wagtail/admin/locale/vi/LC_MESSAGES/django.po +1 -5
  171. wagtail/admin/locale/zh/LC_MESSAGES/django.po +1 -1
  172. wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  173. wagtail/admin/locale/zh_Hans/LC_MESSAGES/django.po +8 -49
  174. wagtail/admin/locale/zh_Hans/LC_MESSAGES/djangojs.mo +0 -0
  175. wagtail/admin/locale/zh_Hans/LC_MESSAGES/djangojs.po +12 -3
  176. wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  177. wagtail/admin/locale/zh_Hant/LC_MESSAGES/django.po +5 -34
  178. wagtail/admin/locale/zh_Hant/LC_MESSAGES/djangojs.mo +0 -0
  179. wagtail/admin/locale/zh_Hant/LC_MESSAGES/djangojs.po +6 -0
  180. wagtail/admin/panels/base.py +13 -0
  181. wagtail/admin/panels/field_panel.py +16 -0
  182. wagtail/admin/panels/group.py +16 -0
  183. wagtail/admin/panels/inline_panel.py +30 -2
  184. wagtail/admin/panels/multiple_chooser_panel.py +10 -2
  185. wagtail/admin/rich_text/editors/draftail/__init__.py +2 -2
  186. wagtail/admin/signals.py +9 -3
  187. wagtail/admin/static/wagtailadmin/css/core.css +1 -1
  188. wagtail/admin/static/wagtailadmin/css/panels/streamfield.css +1 -1
  189. wagtail/admin/static/wagtailadmin/js/comments.js +1 -1
  190. wagtail/admin/static/wagtailadmin/js/core.js +1 -1
  191. wagtail/admin/static/wagtailadmin/js/date-time-chooser.js +1 -1
  192. wagtail/admin/static/wagtailadmin/js/draftail.js +1 -1
  193. wagtail/admin/static/wagtailadmin/js/sidebar.js +1 -1
  194. wagtail/admin/static/wagtailadmin/js/task-chooser-modal.js +1 -1
  195. wagtail/admin/static/wagtailadmin/js/telepath/blocks.js +1 -1
  196. wagtail/admin/static/wagtailadmin/js/telepath/telepath.js +1 -1
  197. wagtail/admin/static/wagtailadmin/js/telepath/widgets.js +1 -1
  198. wagtail/admin/static/wagtailadmin/js/userbar.js +1 -1
  199. wagtail/admin/static/wagtailadmin/js/vendor.js +1 -1
  200. wagtail/admin/static/wagtailadmin/js/vendor.js.LICENSE.txt +0 -20
  201. wagtail/admin/static/wagtailadmin/js/wagtailadmin.js +1 -1
  202. wagtail/admin/telepath/__init__.py +70 -0
  203. wagtail/admin/telepath/widgets.py +78 -0
  204. wagtail/admin/templates/wagtailadmin/account/account.html +4 -2
  205. wagtail/admin/templates/wagtailadmin/admin_base.html +0 -1
  206. wagtail/admin/templates/wagtailadmin/base.html +1 -1
  207. wagtail/admin/templates/wagtailadmin/bulk_actions/confirmation/form.html +1 -1
  208. wagtail/admin/templates/wagtailadmin/generic/chooser/chooser.html +4 -4
  209. wagtail/admin/templates/wagtailadmin/generic/chooser/creation_form.html +1 -0
  210. wagtail/admin/templates/wagtailadmin/generic/form.html +1 -0
  211. wagtail/admin/templates/wagtailadmin/icons/grid.svg +1 -0
  212. wagtail/admin/templates/wagtailadmin/notifications/base.html +1 -1
  213. wagtail/admin/templates/wagtailadmin/pages/add_subpage.html +1 -1
  214. wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_bulk_delete.html +7 -3
  215. wagtail/admin/templates/wagtailadmin/pages/bulk_actions/confirm_delete_form.html +6 -0
  216. wagtail/admin/templates/wagtailadmin/pages/confirm_delete.html +3 -14
  217. wagtail/admin/templates/wagtailadmin/pages/edit_alias.html +1 -1
  218. wagtail/admin/templates/wagtailadmin/pages/listing/_button_with_dropdown.html +1 -4
  219. wagtail/admin/templates/wagtailadmin/pages/listing/_page_header_buttons.html +3 -1
  220. wagtail/admin/templates/wagtailadmin/panels/inline_panel.html +2 -7
  221. wagtail/admin/templates/wagtailadmin/panels/inline_panel_child.html +1 -1
  222. wagtail/admin/templates/wagtailadmin/panels/multiple_chooser_panel.html +1 -7
  223. wagtail/admin/templates/wagtailadmin/panels/tabbed_interface.html +3 -2
  224. wagtail/admin/templates/wagtailadmin/shared/breadcrumbs.html +1 -0
  225. wagtail/admin/templates/wagtailadmin/shared/button_with_dropdown.html +8 -0
  226. wagtail/admin/templates/wagtailadmin/shared/dialog/confirm_site_name.html +18 -0
  227. wagtail/admin/templates/wagtailadmin/shared/formatted_field.html +1 -1
  228. wagtail/admin/templates/wagtailadmin/shared/headers/_filters.html +1 -1
  229. wagtail/admin/templates/wagtailadmin/shared/icons.html +1 -1
  230. wagtail/admin/templates/wagtailadmin/shared/keyboard_shortcuts_dialog.html +6 -4
  231. wagtail/admin/templates/wagtailadmin/shared/panel.html +2 -0
  232. wagtail/admin/templates/wagtailadmin/shared/side_panels/checks.html +53 -37
  233. wagtail/admin/templates/wagtailadmin/shared/side_panels/comments.html +18 -11
  234. wagtail/admin/templates/wagtailadmin/shared/tabs/tab_nav_link.html +1 -1
  235. wagtail/admin/templates/wagtailadmin/shared/workflow_history/detail.html +4 -4
  236. wagtail/admin/templates/wagtailadmin/tables/boolean_cell.html +2 -2
  237. wagtail/admin/templates/wagtailadmin/tables/download_cell.html +1 -1
  238. wagtail/admin/templates/wagtailadmin/tables/usage_count_column_cell.html +11 -0
  239. wagtail/admin/templates/wagtailadmin/userbar/base.html +15 -8
  240. wagtail/admin/templates/wagtailadmin/userbar/item_accessibility.html +18 -18
  241. wagtail/admin/templates/wagtailadmin/userbar/item_admin.html +2 -1
  242. wagtail/admin/templates/wagtailadmin/userbar/item_page_add.html +2 -1
  243. wagtail/admin/templates/wagtailadmin/userbar/item_page_edit.html +2 -1
  244. wagtail/admin/templates/wagtailadmin/userbar/item_page_explore.html +2 -1
  245. wagtail/admin/templates/wagtailadmin/workflows/task_chooser/chooser.html +4 -2
  246. wagtail/admin/templates/wagtailadmin/workflows/task_chooser/includes/results.html +1 -1
  247. wagtail/admin/templatetags/wagtailadmin_tags.py +64 -31
  248. wagtail/admin/templatetags/wagtailuserbar.py +4 -72
  249. wagtail/admin/tests/pages/test_bulk_actions/test_bulk_delete.py +253 -16
  250. wagtail/admin/tests/pages/test_copy_page.py +121 -0
  251. wagtail/admin/tests/pages/test_create_page.py +112 -66
  252. wagtail/admin/tests/pages/test_delete_page.py +33 -3
  253. wagtail/admin/tests/pages/test_edit_page.py +35 -6
  254. wagtail/admin/tests/pages/test_workflow_history.py +8 -6
  255. wagtail/admin/tests/test_account_management.py +37 -0
  256. wagtail/admin/tests/test_audit_log.py +3 -3
  257. wagtail/admin/tests/test_block_preview.py +31 -7
  258. wagtail/admin/tests/test_buttons_hooks.py +65 -3
  259. wagtail/admin/tests/test_edit_handlers.py +69 -55
  260. wagtail/admin/tests/test_reports_views.py +2 -2
  261. wagtail/{tests → admin/tests}/test_telepath.py +1 -1
  262. wagtail/admin/tests/test_templatetags.py +20 -18
  263. wagtail/admin/tests/test_userbar.py +249 -14
  264. wagtail/admin/tests/test_widgets.py +210 -5
  265. wagtail/admin/tests/test_workflows.py +1 -1
  266. wagtail/admin/tests/ui/test_sidebar.py +1 -1
  267. wagtail/admin/tests/viewsets/test_base_viewset.py +5 -0
  268. wagtail/admin/tests/viewsets/test_model_viewset.py +10 -17
  269. wagtail/admin/ui/menus/__init__.py +25 -0
  270. wagtail/admin/ui/menus/pages.py +43 -0
  271. wagtail/admin/ui/side_panels.py +1 -1
  272. wagtail/admin/ui/sidebar.py +1 -1
  273. wagtail/admin/ui/tables/__init__.py +15 -1
  274. wagtail/admin/userbar.py +85 -27
  275. wagtail/admin/views/account.py +3 -1
  276. wagtail/admin/views/bulk_action/base_bulk_action.py +6 -1
  277. wagtail/admin/views/bulk_action/mixins.py +38 -0
  278. wagtail/admin/views/generic/mixins.py +7 -0
  279. wagtail/admin/views/generic/models.py +17 -19
  280. wagtail/admin/views/generic/preview.py +7 -4
  281. wagtail/admin/views/pages/bulk_actions/delete.py +36 -2
  282. wagtail/admin/views/pages/copy.py +7 -0
  283. wagtail/admin/views/pages/create.py +11 -5
  284. wagtail/admin/views/pages/delete.py +8 -11
  285. wagtail/admin/views/pages/edit.py +8 -1
  286. wagtail/admin/views/pages/utils.py +19 -0
  287. wagtail/admin/viewsets/base.py +8 -4
  288. wagtail/admin/viewsets/chooser.py +1 -1
  289. wagtail/admin/viewsets/model.py +1 -1
  290. wagtail/admin/wagtail_hooks.py +51 -77
  291. wagtail/admin/widgets/button.py +84 -61
  292. wagtail/admin/widgets/chooser.py +2 -2
  293. wagtail/admin/widgets/datetime.py +2 -2
  294. wagtail/admin/widgets/slug.py +55 -5
  295. wagtail/api/v2/filters.py +28 -41
  296. wagtail/api/v2/tests/test_documents.py +1 -1
  297. wagtail/api/v2/tests/test_images.py +1 -1
  298. wagtail/api/v2/tests/test_pages.py +18 -19
  299. wagtail/api/v2/views.py +12 -1
  300. wagtail/apps.py +0 -2
  301. wagtail/blocks/base.py +21 -10
  302. wagtail/blocks/field_block.py +12 -3
  303. wagtail/blocks/list_block.py +2 -1
  304. wagtail/blocks/static_block.py +2 -1
  305. wagtail/blocks/stream_block.py +2 -1
  306. wagtail/blocks/struct_block.py +7 -4
  307. wagtail/contrib/forms/forms.py +13 -22
  308. wagtail/contrib/forms/locale/af/LC_MESSAGES/django.mo +0 -0
  309. wagtail/contrib/forms/locale/af/LC_MESSAGES/django.po +1 -1
  310. wagtail/contrib/forms/locale/ar/LC_MESSAGES/django.mo +0 -0
  311. wagtail/contrib/forms/locale/ar/LC_MESSAGES/django.po +92 -28
  312. wagtail/contrib/forms/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  313. wagtail/contrib/forms/locale/be/LC_MESSAGES/django.po +1 -1
  314. wagtail/contrib/forms/locale/bg/LC_MESSAGES/django.po +1 -1
  315. wagtail/contrib/forms/locale/bn/LC_MESSAGES/django.po +1 -1
  316. wagtail/contrib/forms/locale/ca/LC_MESSAGES/django.po +1 -1
  317. wagtail/contrib/forms/locale/cs/LC_MESSAGES/django.po +1 -1
  318. wagtail/contrib/forms/locale/cy/LC_MESSAGES/django.po +1 -1
  319. wagtail/contrib/forms/locale/da/LC_MESSAGES/django.po +1 -1
  320. wagtail/contrib/forms/locale/de/LC_MESSAGES/django.mo +0 -0
  321. wagtail/contrib/forms/locale/de/LC_MESSAGES/django.po +20 -3
  322. wagtail/contrib/forms/locale/dv/LC_MESSAGES/django.po +1 -1
  323. wagtail/contrib/forms/locale/el/LC_MESSAGES/django.po +1 -1
  324. wagtail/contrib/forms/locale/en/LC_MESSAGES/django.po +13 -13
  325. wagtail/contrib/forms/locale/es/LC_MESSAGES/django.po +1 -1
  326. wagtail/contrib/forms/locale/es_419/LC_MESSAGES/django.po +1 -1
  327. wagtail/contrib/forms/locale/et/LC_MESSAGES/django.po +1 -1
  328. wagtail/contrib/forms/locale/eu/LC_MESSAGES/django.po +1 -1
  329. wagtail/contrib/forms/locale/fa/LC_MESSAGES/django.po +1 -1
  330. wagtail/contrib/forms/locale/fi/LC_MESSAGES/django.po +1 -1
  331. wagtail/contrib/forms/locale/fr/LC_MESSAGES/django.mo +0 -0
  332. wagtail/contrib/forms/locale/fr/LC_MESSAGES/django.po +9 -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 +1 -1
  336. wagtail/contrib/forms/locale/ht/LC_MESSAGES/django.po +1 -1
  337. wagtail/contrib/forms/locale/hu/LC_MESSAGES/django.mo +0 -0
  338. wagtail/contrib/forms/locale/hu/LC_MESSAGES/django.po +21 -3
  339. wagtail/contrib/forms/locale/hy/LC_MESSAGES/django.mo +0 -0
  340. wagtail/contrib/forms/locale/hy/LC_MESSAGES/django.po +1 -1
  341. wagtail/contrib/forms/locale/id_ID/LC_MESSAGES/django.po +1 -1
  342. wagtail/contrib/forms/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  343. wagtail/contrib/forms/locale/is_IS/LC_MESSAGES/django.po +20 -3
  344. wagtail/contrib/forms/locale/it/LC_MESSAGES/django.po +1 -1
  345. wagtail/contrib/forms/locale/ja/LC_MESSAGES/django.po +1 -1
  346. wagtail/contrib/forms/locale/ka/LC_MESSAGES/django.po +1 -1
  347. wagtail/contrib/forms/locale/ko/LC_MESSAGES/django.po +1 -1
  348. wagtail/contrib/forms/locale/lt/LC_MESSAGES/django.po +1 -1
  349. wagtail/contrib/forms/locale/lv/LC_MESSAGES/django.po +1 -1
  350. wagtail/contrib/forms/locale/mi/LC_MESSAGES/django.po +1 -1
  351. wagtail/contrib/forms/locale/mn/LC_MESSAGES/django.po +1 -1
  352. wagtail/contrib/forms/locale/my/LC_MESSAGES/django.po +1 -1
  353. wagtail/contrib/forms/locale/nb/LC_MESSAGES/django.po +1 -1
  354. wagtail/contrib/forms/locale/nl/LC_MESSAGES/django.po +1 -1
  355. wagtail/contrib/forms/locale/pl/LC_MESSAGES/django.po +1 -1
  356. wagtail/contrib/forms/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  357. wagtail/contrib/forms/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  358. wagtail/contrib/forms/locale/ro/LC_MESSAGES/django.po +1 -1
  359. wagtail/contrib/forms/locale/ru/LC_MESSAGES/django.po +1 -1
  360. wagtail/contrib/forms/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  361. wagtail/contrib/forms/locale/sl/LC_MESSAGES/django.po +1 -1
  362. wagtail/contrib/forms/locale/sv/LC_MESSAGES/django.po +1 -1
  363. wagtail/contrib/forms/locale/tet/LC_MESSAGES/django.po +1 -1
  364. wagtail/contrib/forms/locale/th/LC_MESSAGES/django.po +1 -1
  365. wagtail/contrib/forms/locale/tr/LC_MESSAGES/django.po +1 -1
  366. wagtail/contrib/forms/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  367. wagtail/contrib/forms/locale/ug/LC_MESSAGES/django.po +1 -1
  368. wagtail/contrib/forms/locale/uk/LC_MESSAGES/django.po +1 -1
  369. wagtail/contrib/forms/locale/vi/LC_MESSAGES/django.po +1 -1
  370. wagtail/contrib/forms/locale/zh/LC_MESSAGES/django.po +1 -1
  371. wagtail/contrib/forms/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  372. wagtail/contrib/forms/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  373. wagtail/contrib/forms/tests/test_forms.py +51 -80
  374. wagtail/contrib/forms/tests/test_views.py +6 -0
  375. wagtail/contrib/forms/views.py +4 -0
  376. wagtail/contrib/frontend_cache/backends/cloudfront.py +6 -1
  377. wagtail/contrib/frontend_cache/tests.py +72 -0
  378. wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.mo +0 -0
  379. wagtail/contrib/redirects/locale/ar/LC_MESSAGES/django.po +114 -27
  380. wagtail/contrib/redirects/locale/be/LC_MESSAGES/django.po +1 -1
  381. wagtail/contrib/redirects/locale/bg/LC_MESSAGES/django.po +1 -1
  382. wagtail/contrib/redirects/locale/bn/LC_MESSAGES/django.po +1 -1
  383. wagtail/contrib/redirects/locale/ca/LC_MESSAGES/django.po +1 -1
  384. wagtail/contrib/redirects/locale/cs/LC_MESSAGES/django.po +1 -1
  385. wagtail/contrib/redirects/locale/cy/LC_MESSAGES/django.po +1 -1
  386. wagtail/contrib/redirects/locale/da/LC_MESSAGES/django.po +1 -1
  387. wagtail/contrib/redirects/locale/de/LC_MESSAGES/django.po +1 -1
  388. wagtail/contrib/redirects/locale/dv/LC_MESSAGES/django.po +1 -1
  389. wagtail/contrib/redirects/locale/el/LC_MESSAGES/django.po +1 -1
  390. wagtail/contrib/redirects/locale/en/LC_MESSAGES/django.po +1 -1
  391. wagtail/contrib/redirects/locale/en_IN/LC_MESSAGES/django.mo +0 -0
  392. wagtail/contrib/redirects/locale/en_IN/LC_MESSAGES/django.po +1 -1
  393. wagtail/contrib/redirects/locale/es/LC_MESSAGES/django.po +1 -1
  394. wagtail/contrib/redirects/locale/es_419/LC_MESSAGES/django.po +1 -1
  395. wagtail/contrib/redirects/locale/es_VE/LC_MESSAGES/django.mo +0 -0
  396. wagtail/contrib/redirects/locale/es_VE/LC_MESSAGES/django.po +1 -1
  397. wagtail/contrib/redirects/locale/et/LC_MESSAGES/django.po +1 -1
  398. wagtail/contrib/redirects/locale/eu/LC_MESSAGES/django.mo +0 -0
  399. wagtail/contrib/redirects/locale/eu/LC_MESSAGES/django.po +1 -1
  400. wagtail/contrib/redirects/locale/fa/LC_MESSAGES/django.po +1 -1
  401. wagtail/contrib/redirects/locale/fi/LC_MESSAGES/django.po +1 -1
  402. wagtail/contrib/redirects/locale/fr/LC_MESSAGES/django.po +1 -1
  403. wagtail/contrib/redirects/locale/gl/LC_MESSAGES/django.po +1 -1
  404. wagtail/contrib/redirects/locale/he_IL/LC_MESSAGES/django.po +1 -1
  405. wagtail/contrib/redirects/locale/hi/LC_MESSAGES/django.mo +0 -0
  406. wagtail/contrib/redirects/locale/hi/LC_MESSAGES/django.po +1 -1
  407. wagtail/contrib/redirects/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  408. wagtail/contrib/redirects/locale/ht/LC_MESSAGES/django.mo +0 -0
  409. wagtail/contrib/redirects/locale/ht/LC_MESSAGES/django.po +1 -1
  410. wagtail/contrib/redirects/locale/hu/LC_MESSAGES/django.po +1 -1
  411. wagtail/contrib/redirects/locale/hy/LC_MESSAGES/django.mo +0 -0
  412. wagtail/contrib/redirects/locale/hy/LC_MESSAGES/django.po +1 -1
  413. wagtail/contrib/redirects/locale/id_ID/LC_MESSAGES/django.po +1 -1
  414. wagtail/contrib/redirects/locale/is_IS/LC_MESSAGES/django.po +1 -1
  415. wagtail/contrib/redirects/locale/it/LC_MESSAGES/django.po +1 -1
  416. wagtail/contrib/redirects/locale/ja/LC_MESSAGES/django.po +1 -1
  417. wagtail/contrib/redirects/locale/ka/LC_MESSAGES/django.po +1 -1
  418. wagtail/contrib/redirects/locale/ko/LC_MESSAGES/django.po +1 -1
  419. wagtail/contrib/redirects/locale/lt/LC_MESSAGES/django.po +1 -1
  420. wagtail/contrib/redirects/locale/lv/LC_MESSAGES/django.po +1 -1
  421. wagtail/contrib/redirects/locale/mi/LC_MESSAGES/django.po +1 -1
  422. wagtail/contrib/redirects/locale/mn/LC_MESSAGES/django.po +1 -1
  423. wagtail/contrib/redirects/locale/my/LC_MESSAGES/django.po +1 -1
  424. wagtail/contrib/redirects/locale/nb/LC_MESSAGES/django.po +1 -1
  425. wagtail/contrib/redirects/locale/nl/LC_MESSAGES/django.po +1 -1
  426. wagtail/contrib/redirects/locale/pl/LC_MESSAGES/django.po +1 -1
  427. wagtail/contrib/redirects/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  428. wagtail/contrib/redirects/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  429. wagtail/contrib/redirects/locale/ro/LC_MESSAGES/django.po +1 -1
  430. wagtail/contrib/redirects/locale/ru/LC_MESSAGES/django.po +1 -1
  431. wagtail/contrib/redirects/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  432. wagtail/contrib/redirects/locale/sl/LC_MESSAGES/django.po +1 -1
  433. wagtail/contrib/redirects/locale/sr/LC_MESSAGES/django.mo +0 -0
  434. wagtail/contrib/redirects/locale/sr/LC_MESSAGES/django.po +1 -1
  435. wagtail/contrib/redirects/locale/sv/LC_MESSAGES/django.po +1 -1
  436. wagtail/contrib/redirects/locale/ta/LC_MESSAGES/django.mo +0 -0
  437. wagtail/contrib/redirects/locale/ta/LC_MESSAGES/django.po +1 -1
  438. wagtail/contrib/redirects/locale/tet/LC_MESSAGES/django.po +1 -1
  439. wagtail/contrib/redirects/locale/th/LC_MESSAGES/django.po +1 -1
  440. wagtail/contrib/redirects/locale/tr/LC_MESSAGES/django.po +1 -1
  441. wagtail/contrib/redirects/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  442. wagtail/contrib/redirects/locale/ug/LC_MESSAGES/django.po +1 -1
  443. wagtail/contrib/redirects/locale/uk/LC_MESSAGES/django.po +1 -1
  444. wagtail/contrib/redirects/locale/vi/LC_MESSAGES/django.po +1 -1
  445. wagtail/contrib/redirects/locale/zh/LC_MESSAGES/django.po +1 -1
  446. wagtail/contrib/redirects/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  447. wagtail/contrib/redirects/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  448. wagtail/contrib/redirects/management/commands/import_redirects.py +2 -2
  449. wagtail/contrib/redirects/tests/test_import_command.py +49 -31
  450. wagtail/contrib/search_promotions/locale/af/LC_MESSAGES/django.po +1 -1
  451. wagtail/contrib/search_promotions/locale/ar/LC_MESSAGES/django.mo +0 -0
  452. wagtail/contrib/search_promotions/locale/ar/LC_MESSAGES/django.po +91 -30
  453. wagtail/contrib/search_promotions/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  454. wagtail/contrib/search_promotions/locale/be/LC_MESSAGES/django.po +1 -1
  455. wagtail/contrib/search_promotions/locale/bg/LC_MESSAGES/django.po +1 -1
  456. wagtail/contrib/search_promotions/locale/bn/LC_MESSAGES/django.po +1 -1
  457. wagtail/contrib/search_promotions/locale/ca/LC_MESSAGES/django.po +1 -1
  458. wagtail/contrib/search_promotions/locale/cs/LC_MESSAGES/django.po +1 -1
  459. wagtail/contrib/search_promotions/locale/cy/LC_MESSAGES/django.po +1 -1
  460. wagtail/contrib/search_promotions/locale/da/LC_MESSAGES/django.po +1 -1
  461. wagtail/contrib/search_promotions/locale/de/LC_MESSAGES/django.po +1 -1
  462. wagtail/contrib/search_promotions/locale/dv/LC_MESSAGES/django.po +1 -1
  463. wagtail/contrib/search_promotions/locale/el/LC_MESSAGES/django.po +1 -1
  464. wagtail/contrib/search_promotions/locale/en/LC_MESSAGES/django.po +12 -12
  465. wagtail/contrib/search_promotions/locale/es/LC_MESSAGES/django.po +1 -1
  466. wagtail/contrib/search_promotions/locale/es_419/LC_MESSAGES/django.po +1 -1
  467. wagtail/contrib/search_promotions/locale/et/LC_MESSAGES/django.po +1 -1
  468. wagtail/contrib/search_promotions/locale/eu/LC_MESSAGES/django.po +1 -1
  469. wagtail/contrib/search_promotions/locale/fa/LC_MESSAGES/django.po +1 -1
  470. wagtail/contrib/search_promotions/locale/fi/LC_MESSAGES/django.po +1 -1
  471. wagtail/contrib/search_promotions/locale/fr/LC_MESSAGES/django.po +1 -1
  472. wagtail/contrib/search_promotions/locale/gl/LC_MESSAGES/django.po +1 -1
  473. wagtail/contrib/search_promotions/locale/he_IL/LC_MESSAGES/django.po +1 -1
  474. wagtail/contrib/search_promotions/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  475. wagtail/contrib/search_promotions/locale/ht/LC_MESSAGES/django.po +1 -1
  476. wagtail/contrib/search_promotions/locale/hu/LC_MESSAGES/django.po +1 -1
  477. wagtail/contrib/search_promotions/locale/id_ID/LC_MESSAGES/django.po +1 -1
  478. wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  479. wagtail/contrib/search_promotions/locale/is_IS/LC_MESSAGES/django.po +9 -4
  480. wagtail/contrib/search_promotions/locale/it/LC_MESSAGES/django.po +1 -1
  481. wagtail/contrib/search_promotions/locale/ja/LC_MESSAGES/django.po +1 -1
  482. wagtail/contrib/search_promotions/locale/ka/LC_MESSAGES/django.po +1 -1
  483. wagtail/contrib/search_promotions/locale/ko/LC_MESSAGES/django.po +1 -1
  484. wagtail/contrib/search_promotions/locale/lt/LC_MESSAGES/django.po +1 -1
  485. wagtail/contrib/search_promotions/locale/lv/LC_MESSAGES/django.po +1 -1
  486. wagtail/contrib/search_promotions/locale/mi/LC_MESSAGES/django.po +1 -1
  487. wagtail/contrib/search_promotions/locale/mn/LC_MESSAGES/django.po +1 -1
  488. wagtail/contrib/search_promotions/locale/my/LC_MESSAGES/django.po +1 -1
  489. wagtail/contrib/search_promotions/locale/nb/LC_MESSAGES/django.po +1 -1
  490. wagtail/contrib/search_promotions/locale/nl/LC_MESSAGES/django.po +1 -1
  491. wagtail/contrib/search_promotions/locale/pl/LC_MESSAGES/django.po +1 -1
  492. wagtail/contrib/search_promotions/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  493. wagtail/contrib/search_promotions/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  494. wagtail/contrib/search_promotions/locale/ro/LC_MESSAGES/django.po +1 -1
  495. wagtail/contrib/search_promotions/locale/ru/LC_MESSAGES/django.po +1 -1
  496. wagtail/contrib/search_promotions/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  497. wagtail/contrib/search_promotions/locale/sl/LC_MESSAGES/django.po +1 -1
  498. wagtail/contrib/search_promotions/locale/sv/LC_MESSAGES/django.po +1 -1
  499. wagtail/contrib/search_promotions/locale/tet/LC_MESSAGES/django.po +1 -1
  500. wagtail/contrib/search_promotions/locale/th/LC_MESSAGES/django.po +1 -1
  501. wagtail/contrib/search_promotions/locale/tr/LC_MESSAGES/django.po +1 -1
  502. wagtail/contrib/search_promotions/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  503. wagtail/contrib/search_promotions/locale/ug/LC_MESSAGES/django.po +1 -1
  504. wagtail/contrib/search_promotions/locale/uk/LC_MESSAGES/django.po +1 -1
  505. wagtail/contrib/search_promotions/locale/vi/LC_MESSAGES/django.po +1 -1
  506. wagtail/contrib/search_promotions/locale/zh/LC_MESSAGES/django.po +1 -1
  507. wagtail/contrib/search_promotions/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  508. wagtail/contrib/search_promotions/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  509. wagtail/contrib/search_promotions/templates/wagtailsearchpromotions/includes/searchpromotion_form.html +1 -1
  510. wagtail/contrib/search_promotions/tests.py +39 -25
  511. wagtail/contrib/search_promotions/views/reports.py +2 -2
  512. wagtail/contrib/search_promotions/views/settings.py +6 -2
  513. wagtail/contrib/settings/forms.py +93 -3
  514. wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.mo +0 -0
  515. wagtail/contrib/settings/locale/ar/LC_MESSAGES/django.po +11 -2
  516. wagtail/contrib/settings/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  517. wagtail/contrib/settings/locale/be/LC_MESSAGES/django.mo +0 -0
  518. wagtail/contrib/settings/locale/be/LC_MESSAGES/django.po +6 -2
  519. wagtail/contrib/settings/locale/bn/LC_MESSAGES/django.po +1 -1
  520. wagtail/contrib/settings/locale/ca/LC_MESSAGES/django.mo +0 -0
  521. wagtail/contrib/settings/locale/ca/LC_MESSAGES/django.po +10 -3
  522. wagtail/contrib/settings/locale/cs/LC_MESSAGES/django.mo +0 -0
  523. wagtail/contrib/settings/locale/cs/LC_MESSAGES/django.po +4 -1
  524. wagtail/contrib/settings/locale/cy/LC_MESSAGES/django.mo +0 -0
  525. wagtail/contrib/settings/locale/cy/LC_MESSAGES/django.po +5 -1
  526. wagtail/contrib/settings/locale/da/LC_MESSAGES/django.po +1 -1
  527. wagtail/contrib/settings/locale/de/LC_MESSAGES/django.mo +0 -0
  528. wagtail/contrib/settings/locale/de/LC_MESSAGES/django.po +6 -1
  529. wagtail/contrib/settings/locale/dv/LC_MESSAGES/django.po +2 -1
  530. wagtail/contrib/settings/locale/el/LC_MESSAGES/django.mo +0 -0
  531. wagtail/contrib/settings/locale/el/LC_MESSAGES/django.po +5 -1
  532. wagtail/contrib/settings/locale/en/LC_MESSAGES/django.po +16 -7
  533. wagtail/contrib/settings/locale/en_IN/LC_MESSAGES/django.po +2 -1
  534. wagtail/contrib/settings/locale/es/LC_MESSAGES/django.mo +0 -0
  535. wagtail/contrib/settings/locale/es/LC_MESSAGES/django.po +4 -1
  536. wagtail/contrib/settings/locale/es_419/LC_MESSAGES/django.po +2 -1
  537. wagtail/contrib/settings/locale/es_VE/LC_MESSAGES/django.po +2 -1
  538. wagtail/contrib/settings/locale/et/LC_MESSAGES/django.mo +0 -0
  539. wagtail/contrib/settings/locale/et/LC_MESSAGES/django.po +4 -1
  540. wagtail/contrib/settings/locale/fa/LC_MESSAGES/django.mo +0 -0
  541. wagtail/contrib/settings/locale/fa/LC_MESSAGES/django.po +6 -1
  542. wagtail/contrib/settings/locale/fi/LC_MESSAGES/django.mo +0 -0
  543. wagtail/contrib/settings/locale/fi/LC_MESSAGES/django.po +4 -1
  544. wagtail/contrib/settings/locale/fr/LC_MESSAGES/django.mo +0 -0
  545. wagtail/contrib/settings/locale/fr/LC_MESSAGES/django.po +10 -3
  546. wagtail/contrib/settings/locale/gl/LC_MESSAGES/django.mo +0 -0
  547. wagtail/contrib/settings/locale/gl/LC_MESSAGES/django.po +10 -3
  548. wagtail/contrib/settings/locale/he_IL/LC_MESSAGES/django.mo +0 -0
  549. wagtail/contrib/settings/locale/he_IL/LC_MESSAGES/django.po +4 -1
  550. wagtail/contrib/settings/locale/hi/LC_MESSAGES/django.po +4 -1
  551. wagtail/contrib/settings/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  552. wagtail/contrib/settings/locale/hr_HR/LC_MESSAGES/django.po +5 -2
  553. wagtail/contrib/settings/locale/ht/LC_MESSAGES/django.mo +0 -0
  554. wagtail/contrib/settings/locale/ht/LC_MESSAGES/django.po +4 -1
  555. wagtail/contrib/settings/locale/hu/LC_MESSAGES/django.mo +0 -0
  556. wagtail/contrib/settings/locale/hu/LC_MESSAGES/django.po +11 -3
  557. wagtail/contrib/settings/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  558. wagtail/contrib/settings/locale/id_ID/LC_MESSAGES/django.po +4 -1
  559. wagtail/contrib/settings/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  560. wagtail/contrib/settings/locale/is_IS/LC_MESSAGES/django.po +4 -1
  561. wagtail/contrib/settings/locale/it/LC_MESSAGES/django.mo +0 -0
  562. wagtail/contrib/settings/locale/it/LC_MESSAGES/django.po +5 -2
  563. wagtail/contrib/settings/locale/ja/LC_MESSAGES/django.mo +0 -0
  564. wagtail/contrib/settings/locale/ja/LC_MESSAGES/django.po +4 -1
  565. wagtail/contrib/settings/locale/ka/LC_MESSAGES/django.mo +0 -0
  566. wagtail/contrib/settings/locale/ka/LC_MESSAGES/django.po +4 -1
  567. wagtail/contrib/settings/locale/ko/LC_MESSAGES/django.mo +0 -0
  568. wagtail/contrib/settings/locale/ko/LC_MESSAGES/django.po +4 -1
  569. wagtail/contrib/settings/locale/lt/LC_MESSAGES/django.mo +0 -0
  570. wagtail/contrib/settings/locale/lt/LC_MESSAGES/django.po +4 -1
  571. wagtail/contrib/settings/locale/lv/LC_MESSAGES/django.mo +0 -0
  572. wagtail/contrib/settings/locale/lv/LC_MESSAGES/django.po +4 -1
  573. wagtail/contrib/settings/locale/mi/LC_MESSAGES/django.mo +0 -0
  574. wagtail/contrib/settings/locale/mi/LC_MESSAGES/django.po +4 -1
  575. wagtail/contrib/settings/locale/mn/LC_MESSAGES/django.mo +0 -0
  576. wagtail/contrib/settings/locale/mn/LC_MESSAGES/django.po +6 -2
  577. wagtail/contrib/settings/locale/my/LC_MESSAGES/django.mo +0 -0
  578. wagtail/contrib/settings/locale/my/LC_MESSAGES/django.po +4 -1
  579. wagtail/contrib/settings/locale/nb/LC_MESSAGES/django.mo +0 -0
  580. wagtail/contrib/settings/locale/nb/LC_MESSAGES/django.po +5 -1
  581. wagtail/contrib/settings/locale/nl/LC_MESSAGES/django.mo +0 -0
  582. wagtail/contrib/settings/locale/nl/LC_MESSAGES/django.po +4 -1
  583. wagtail/contrib/settings/locale/pl/LC_MESSAGES/django.mo +0 -0
  584. wagtail/contrib/settings/locale/pl/LC_MESSAGES/django.po +4 -1
  585. wagtail/contrib/settings/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  586. wagtail/contrib/settings/locale/pt_BR/LC_MESSAGES/django.po +7 -2
  587. wagtail/contrib/settings/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  588. wagtail/contrib/settings/locale/pt_PT/LC_MESSAGES/django.po +4 -1
  589. wagtail/contrib/settings/locale/ro/LC_MESSAGES/django.mo +0 -0
  590. wagtail/contrib/settings/locale/ro/LC_MESSAGES/django.po +5 -2
  591. wagtail/contrib/settings/locale/ru/LC_MESSAGES/django.mo +0 -0
  592. wagtail/contrib/settings/locale/ru/LC_MESSAGES/django.po +6 -2
  593. wagtail/contrib/settings/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  594. wagtail/contrib/settings/locale/sk_SK/LC_MESSAGES/django.po +2 -2
  595. wagtail/contrib/settings/locale/sl/LC_MESSAGES/django.mo +0 -0
  596. wagtail/contrib/settings/locale/sl/LC_MESSAGES/django.po +5 -2
  597. wagtail/contrib/settings/locale/sr/LC_MESSAGES/django.po +1 -1
  598. wagtail/contrib/settings/locale/sv/LC_MESSAGES/django.mo +0 -0
  599. wagtail/contrib/settings/locale/sv/LC_MESSAGES/django.po +4 -1
  600. wagtail/contrib/settings/locale/ta/LC_MESSAGES/django.po +1 -1
  601. wagtail/contrib/settings/locale/tet/LC_MESSAGES/django.mo +0 -0
  602. wagtail/contrib/settings/locale/tet/LC_MESSAGES/django.po +4 -1
  603. wagtail/contrib/settings/locale/th/LC_MESSAGES/django.mo +0 -0
  604. wagtail/contrib/settings/locale/th/LC_MESSAGES/django.po +6 -2
  605. wagtail/contrib/settings/locale/tr/LC_MESSAGES/django.mo +0 -0
  606. wagtail/contrib/settings/locale/tr/LC_MESSAGES/django.po +5 -2
  607. wagtail/contrib/settings/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  608. wagtail/contrib/settings/locale/tr_TR/LC_MESSAGES/django.po +5 -2
  609. wagtail/contrib/settings/locale/ug/LC_MESSAGES/django.mo +0 -0
  610. wagtail/contrib/settings/locale/ug/LC_MESSAGES/django.po +6 -2
  611. wagtail/contrib/settings/locale/uk/LC_MESSAGES/django.mo +0 -0
  612. wagtail/contrib/settings/locale/uk/LC_MESSAGES/django.po +5 -2
  613. wagtail/contrib/settings/locale/vi/LC_MESSAGES/django.mo +0 -0
  614. wagtail/contrib/settings/locale/vi/LC_MESSAGES/django.po +4 -1
  615. wagtail/contrib/settings/locale/zh/LC_MESSAGES/django.po +1 -1
  616. wagtail/contrib/settings/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  617. wagtail/contrib/settings/locale/zh_Hans/LC_MESSAGES/django.po +6 -2
  618. wagtail/contrib/settings/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  619. wagtail/contrib/settings/locale/zh_Hant/LC_MESSAGES/django.po +4 -1
  620. wagtail/contrib/settings/models.py +10 -0
  621. wagtail/contrib/settings/registry.py +14 -4
  622. wagtail/contrib/settings/templates/wagtailsettings/edit.html +6 -0
  623. wagtail/contrib/settings/templates/wagtailsettings/permissions/includes/site_permission_form.html +11 -0
  624. wagtail/contrib/settings/tests/generic/test_admin.py +15 -1
  625. wagtail/contrib/settings/tests/generic/test_model.py +1 -1
  626. wagtail/contrib/settings/tests/shared/__init__.py +0 -0
  627. wagtail/contrib/settings/tests/shared/test_preview.py +193 -0
  628. wagtail/contrib/settings/tests/site_specific/test_admin.py +320 -10
  629. wagtail/contrib/settings/tests/site_specific/test_forms.py +1 -1
  630. wagtail/contrib/settings/urls.py +5 -0
  631. wagtail/contrib/settings/views.py +89 -13
  632. wagtail/contrib/simple_translation/locale/ar/LC_MESSAGES/django.mo +0 -0
  633. wagtail/contrib/simple_translation/locale/ar/LC_MESSAGES/django.po +73 -2
  634. wagtail/contrib/simple_translation/locale/be/LC_MESSAGES/django.mo +0 -0
  635. wagtail/contrib/simple_translation/locale/be/LC_MESSAGES/django.po +1 -5
  636. wagtail/contrib/simple_translation/locale/ca/LC_MESSAGES/django.mo +0 -0
  637. wagtail/contrib/simple_translation/locale/ca/LC_MESSAGES/django.po +1 -5
  638. wagtail/contrib/simple_translation/locale/cs/LC_MESSAGES/django.mo +0 -0
  639. wagtail/contrib/simple_translation/locale/cs/LC_MESSAGES/django.po +1 -5
  640. wagtail/contrib/simple_translation/locale/cy/LC_MESSAGES/django.mo +0 -0
  641. wagtail/contrib/simple_translation/locale/cy/LC_MESSAGES/django.po +1 -5
  642. wagtail/contrib/simple_translation/locale/de/LC_MESSAGES/django.mo +0 -0
  643. wagtail/contrib/simple_translation/locale/de/LC_MESSAGES/django.po +1 -5
  644. wagtail/contrib/simple_translation/locale/dv/LC_MESSAGES/django.mo +0 -0
  645. wagtail/contrib/simple_translation/locale/dv/LC_MESSAGES/django.po +1 -5
  646. wagtail/contrib/simple_translation/locale/el/LC_MESSAGES/django.mo +0 -0
  647. wagtail/contrib/simple_translation/locale/el/LC_MESSAGES/django.po +1 -1
  648. wagtail/contrib/simple_translation/locale/en/LC_MESSAGES/django.po +2 -7
  649. wagtail/contrib/simple_translation/locale/es/LC_MESSAGES/django.mo +0 -0
  650. wagtail/contrib/simple_translation/locale/es/LC_MESSAGES/django.po +1 -5
  651. wagtail/contrib/simple_translation/locale/es_419/LC_MESSAGES/django.mo +0 -0
  652. wagtail/contrib/simple_translation/locale/es_419/LC_MESSAGES/django.po +1 -1
  653. wagtail/contrib/simple_translation/locale/fa/LC_MESSAGES/django.mo +0 -0
  654. wagtail/contrib/simple_translation/locale/fa/LC_MESSAGES/django.po +1 -1
  655. wagtail/contrib/simple_translation/locale/fi/LC_MESSAGES/django.mo +0 -0
  656. wagtail/contrib/simple_translation/locale/fi/LC_MESSAGES/django.po +1 -5
  657. wagtail/contrib/simple_translation/locale/fr/LC_MESSAGES/django.mo +0 -0
  658. wagtail/contrib/simple_translation/locale/fr/LC_MESSAGES/django.po +1 -5
  659. wagtail/contrib/simple_translation/locale/gl/LC_MESSAGES/django.mo +0 -0
  660. wagtail/contrib/simple_translation/locale/gl/LC_MESSAGES/django.po +1 -5
  661. wagtail/contrib/simple_translation/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  662. wagtail/contrib/simple_translation/locale/hr_HR/LC_MESSAGES/django.po +1 -5
  663. wagtail/contrib/simple_translation/locale/hu/LC_MESSAGES/django.mo +0 -0
  664. wagtail/contrib/simple_translation/locale/hu/LC_MESSAGES/django.po +1 -5
  665. wagtail/contrib/simple_translation/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  666. wagtail/contrib/simple_translation/locale/is_IS/LC_MESSAGES/django.po +1 -5
  667. wagtail/contrib/simple_translation/locale/it/LC_MESSAGES/django.mo +0 -0
  668. wagtail/contrib/simple_translation/locale/it/LC_MESSAGES/django.po +1 -5
  669. wagtail/contrib/simple_translation/locale/ko/LC_MESSAGES/django.mo +0 -0
  670. wagtail/contrib/simple_translation/locale/ko/LC_MESSAGES/django.po +1 -5
  671. wagtail/contrib/simple_translation/locale/lt/LC_MESSAGES/django.mo +0 -0
  672. wagtail/contrib/simple_translation/locale/lt/LC_MESSAGES/django.po +1 -5
  673. wagtail/contrib/simple_translation/locale/mi/LC_MESSAGES/django.mo +0 -0
  674. wagtail/contrib/simple_translation/locale/mi/LC_MESSAGES/django.po +1 -1
  675. wagtail/contrib/simple_translation/locale/mn/LC_MESSAGES/django.mo +0 -0
  676. wagtail/contrib/simple_translation/locale/mn/LC_MESSAGES/django.po +1 -1
  677. wagtail/contrib/simple_translation/locale/nb/LC_MESSAGES/django.mo +0 -0
  678. wagtail/contrib/simple_translation/locale/nb/LC_MESSAGES/django.po +1 -1
  679. wagtail/contrib/simple_translation/locale/nl/LC_MESSAGES/django.mo +0 -0
  680. wagtail/contrib/simple_translation/locale/nl/LC_MESSAGES/django.po +1 -5
  681. wagtail/contrib/simple_translation/locale/pl/LC_MESSAGES/django.mo +0 -0
  682. wagtail/contrib/simple_translation/locale/pl/LC_MESSAGES/django.po +1 -5
  683. wagtail/contrib/simple_translation/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  684. wagtail/contrib/simple_translation/locale/pt_BR/LC_MESSAGES/django.po +1 -5
  685. wagtail/contrib/simple_translation/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  686. wagtail/contrib/simple_translation/locale/pt_PT/LC_MESSAGES/django.po +1 -5
  687. wagtail/contrib/simple_translation/locale/ro/LC_MESSAGES/django.mo +0 -0
  688. wagtail/contrib/simple_translation/locale/ro/LC_MESSAGES/django.po +1 -5
  689. wagtail/contrib/simple_translation/locale/ru/LC_MESSAGES/django.mo +0 -0
  690. wagtail/contrib/simple_translation/locale/ru/LC_MESSAGES/django.po +1 -5
  691. wagtail/contrib/simple_translation/locale/sl/LC_MESSAGES/django.mo +0 -0
  692. wagtail/contrib/simple_translation/locale/sl/LC_MESSAGES/django.po +1 -5
  693. wagtail/contrib/simple_translation/locale/sv/LC_MESSAGES/django.mo +0 -0
  694. wagtail/contrib/simple_translation/locale/sv/LC_MESSAGES/django.po +1 -5
  695. wagtail/contrib/simple_translation/locale/ug/LC_MESSAGES/django.mo +0 -0
  696. wagtail/contrib/simple_translation/locale/ug/LC_MESSAGES/django.po +1 -5
  697. wagtail/contrib/simple_translation/locale/uk/LC_MESSAGES/django.mo +0 -0
  698. wagtail/contrib/simple_translation/locale/uk/LC_MESSAGES/django.po +1 -5
  699. wagtail/contrib/simple_translation/locale/vi/LC_MESSAGES/django.po +1 -1
  700. wagtail/contrib/simple_translation/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  701. wagtail/contrib/simple_translation/locale/zh_Hans/LC_MESSAGES/django.po +1 -5
  702. wagtail/contrib/simple_translation/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  703. wagtail/contrib/simple_translation/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  704. wagtail/contrib/simple_translation/tests/test_wagtail_hooks.py +34 -0
  705. wagtail/contrib/simple_translation/wagtail_hooks.py +2 -9
  706. wagtail/contrib/styleguide/locale/af/LC_MESSAGES/django.mo +0 -0
  707. wagtail/contrib/styleguide/locale/af/LC_MESSAGES/django.po +1 -1
  708. wagtail/contrib/styleguide/locale/ar/LC_MESSAGES/django.mo +0 -0
  709. wagtail/contrib/styleguide/locale/ar/LC_MESSAGES/django.po +4 -1
  710. wagtail/contrib/styleguide/locale/az_AZ/LC_MESSAGES/django.mo +0 -0
  711. wagtail/contrib/styleguide/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  712. wagtail/contrib/styleguide/locale/be/LC_MESSAGES/django.po +1 -1
  713. wagtail/contrib/styleguide/locale/bg/LC_MESSAGES/django.po +1 -1
  714. wagtail/contrib/styleguide/locale/bn/LC_MESSAGES/django.po +1 -1
  715. wagtail/contrib/styleguide/locale/ca/LC_MESSAGES/django.po +1 -1
  716. wagtail/contrib/styleguide/locale/cs/LC_MESSAGES/django.po +1 -1
  717. wagtail/contrib/styleguide/locale/cy/LC_MESSAGES/django.po +1 -1
  718. wagtail/contrib/styleguide/locale/da/LC_MESSAGES/django.po +1 -1
  719. wagtail/contrib/styleguide/locale/de/LC_MESSAGES/django.po +1 -1
  720. wagtail/contrib/styleguide/locale/dv/LC_MESSAGES/django.po +1 -1
  721. wagtail/contrib/styleguide/locale/el/LC_MESSAGES/django.po +1 -1
  722. wagtail/contrib/styleguide/locale/en/LC_MESSAGES/django.po +1 -1
  723. wagtail/contrib/styleguide/locale/en_IN/LC_MESSAGES/django.mo +0 -0
  724. wagtail/contrib/styleguide/locale/en_IN/LC_MESSAGES/django.po +1 -1
  725. wagtail/contrib/styleguide/locale/es/LC_MESSAGES/django.po +1 -1
  726. wagtail/contrib/styleguide/locale/es_419/LC_MESSAGES/django.po +1 -1
  727. wagtail/contrib/styleguide/locale/es_VE/LC_MESSAGES/django.mo +0 -0
  728. wagtail/contrib/styleguide/locale/es_VE/LC_MESSAGES/django.po +1 -1
  729. wagtail/contrib/styleguide/locale/et/LC_MESSAGES/django.po +1 -1
  730. wagtail/contrib/styleguide/locale/fa/LC_MESSAGES/django.po +1 -1
  731. wagtail/contrib/styleguide/locale/fi/LC_MESSAGES/django.po +1 -1
  732. wagtail/contrib/styleguide/locale/fr/LC_MESSAGES/django.po +1 -1
  733. wagtail/contrib/styleguide/locale/gl/LC_MESSAGES/django.po +1 -1
  734. wagtail/contrib/styleguide/locale/he_IL/LC_MESSAGES/django.po +1 -1
  735. wagtail/contrib/styleguide/locale/hi/LC_MESSAGES/django.mo +0 -0
  736. wagtail/contrib/styleguide/locale/hi/LC_MESSAGES/django.po +1 -1
  737. wagtail/contrib/styleguide/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  738. wagtail/contrib/styleguide/locale/ht/LC_MESSAGES/django.po +1 -1
  739. wagtail/contrib/styleguide/locale/hu/LC_MESSAGES/django.po +1 -1
  740. wagtail/contrib/styleguide/locale/id_ID/LC_MESSAGES/django.po +1 -1
  741. wagtail/contrib/styleguide/locale/is_IS/LC_MESSAGES/django.po +1 -1
  742. wagtail/contrib/styleguide/locale/it/LC_MESSAGES/django.po +1 -1
  743. wagtail/contrib/styleguide/locale/ja/LC_MESSAGES/django.po +1 -1
  744. wagtail/contrib/styleguide/locale/ka/LC_MESSAGES/django.po +1 -1
  745. wagtail/contrib/styleguide/locale/ko/LC_MESSAGES/django.po +1 -1
  746. wagtail/contrib/styleguide/locale/lt/LC_MESSAGES/django.po +1 -1
  747. wagtail/contrib/styleguide/locale/lv/LC_MESSAGES/django.po +1 -1
  748. wagtail/contrib/styleguide/locale/mi/LC_MESSAGES/django.po +1 -1
  749. wagtail/contrib/styleguide/locale/mn/LC_MESSAGES/django.po +1 -1
  750. wagtail/contrib/styleguide/locale/my/LC_MESSAGES/django.po +1 -1
  751. wagtail/contrib/styleguide/locale/nb/LC_MESSAGES/django.po +1 -1
  752. wagtail/contrib/styleguide/locale/nl/LC_MESSAGES/django.po +1 -1
  753. wagtail/contrib/styleguide/locale/pl/LC_MESSAGES/django.po +1 -1
  754. wagtail/contrib/styleguide/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  755. wagtail/contrib/styleguide/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  756. wagtail/contrib/styleguide/locale/ro/LC_MESSAGES/django.po +1 -1
  757. wagtail/contrib/styleguide/locale/ru/LC_MESSAGES/django.po +1 -1
  758. wagtail/contrib/styleguide/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  759. wagtail/contrib/styleguide/locale/sl/LC_MESSAGES/django.po +1 -1
  760. wagtail/contrib/styleguide/locale/sv/LC_MESSAGES/django.po +1 -1
  761. wagtail/contrib/styleguide/locale/ta/LC_MESSAGES/django.mo +0 -0
  762. wagtail/contrib/styleguide/locale/ta/LC_MESSAGES/django.po +1 -1
  763. wagtail/contrib/styleguide/locale/tet/LC_MESSAGES/django.po +1 -1
  764. wagtail/contrib/styleguide/locale/th/LC_MESSAGES/django.po +1 -1
  765. wagtail/contrib/styleguide/locale/tr/LC_MESSAGES/django.po +1 -1
  766. wagtail/contrib/styleguide/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  767. wagtail/contrib/styleguide/locale/ug/LC_MESSAGES/django.po +1 -1
  768. wagtail/contrib/styleguide/locale/uk/LC_MESSAGES/django.po +1 -1
  769. wagtail/contrib/styleguide/locale/vi/LC_MESSAGES/django.po +1 -1
  770. wagtail/contrib/styleguide/locale/zh/LC_MESSAGES/django.po +1 -1
  771. wagtail/contrib/styleguide/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  772. wagtail/contrib/styleguide/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  773. wagtail/contrib/styleguide/templates/wagtailstyleguide/base.html +49 -16
  774. wagtail/contrib/table_block/blocks.py +2 -2
  775. wagtail/contrib/table_block/locale/ar/LC_MESSAGES/django.mo +0 -0
  776. wagtail/contrib/table_block/locale/ar/LC_MESSAGES/django.po +28 -2
  777. wagtail/contrib/table_block/locale/be/LC_MESSAGES/django.mo +0 -0
  778. wagtail/contrib/table_block/locale/be/LC_MESSAGES/django.po +3 -2
  779. wagtail/contrib/table_block/locale/ca/LC_MESSAGES/django.po +1 -1
  780. wagtail/contrib/table_block/locale/cs/LC_MESSAGES/django.po +1 -1
  781. wagtail/contrib/table_block/locale/cy/LC_MESSAGES/django.po +2 -1
  782. wagtail/contrib/table_block/locale/de/LC_MESSAGES/django.po +1 -1
  783. wagtail/contrib/table_block/locale/dv/LC_MESSAGES/django.po +2 -1
  784. wagtail/contrib/table_block/locale/el/LC_MESSAGES/django.po +2 -1
  785. wagtail/contrib/table_block/locale/en/LC_MESSAGES/django.po +1 -1
  786. wagtail/contrib/table_block/locale/en_IN/LC_MESSAGES/django.mo +0 -0
  787. wagtail/contrib/table_block/locale/en_IN/LC_MESSAGES/django.po +2 -1
  788. wagtail/contrib/table_block/locale/es/LC_MESSAGES/django.po +1 -1
  789. wagtail/contrib/table_block/locale/et/LC_MESSAGES/django.po +1 -1
  790. wagtail/contrib/table_block/locale/fa/LC_MESSAGES/django.po +1 -1
  791. wagtail/contrib/table_block/locale/fi/LC_MESSAGES/django.mo +0 -0
  792. wagtail/contrib/table_block/locale/fi/LC_MESSAGES/django.po +2 -2
  793. wagtail/contrib/table_block/locale/fr/LC_MESSAGES/django.po +1 -1
  794. wagtail/contrib/table_block/locale/gl/LC_MESSAGES/django.po +1 -1
  795. wagtail/contrib/table_block/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  796. wagtail/contrib/table_block/locale/ht/LC_MESSAGES/django.po +1 -1
  797. wagtail/contrib/table_block/locale/hu/LC_MESSAGES/django.mo +0 -0
  798. wagtail/contrib/table_block/locale/hu/LC_MESSAGES/django.po +2 -2
  799. wagtail/contrib/table_block/locale/id_ID/LC_MESSAGES/django.po +1 -1
  800. wagtail/contrib/table_block/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  801. wagtail/contrib/table_block/locale/is_IS/LC_MESSAGES/django.po +2 -3
  802. wagtail/contrib/table_block/locale/it/LC_MESSAGES/django.mo +0 -0
  803. wagtail/contrib/table_block/locale/it/LC_MESSAGES/django.po +2 -2
  804. wagtail/contrib/table_block/locale/ja/LC_MESSAGES/django.po +1 -1
  805. wagtail/contrib/table_block/locale/ko/LC_MESSAGES/django.po +1 -1
  806. wagtail/contrib/table_block/locale/lt/LC_MESSAGES/django.po +1 -1
  807. wagtail/contrib/table_block/locale/lv/LC_MESSAGES/django.mo +0 -0
  808. wagtail/contrib/table_block/locale/lv/LC_MESSAGES/django.po +1 -1
  809. wagtail/contrib/table_block/locale/mi/LC_MESSAGES/django.po +1 -1
  810. wagtail/contrib/table_block/locale/mn/LC_MESSAGES/django.po +1 -1
  811. wagtail/contrib/table_block/locale/my/LC_MESSAGES/django.po +1 -1
  812. wagtail/contrib/table_block/locale/nb/LC_MESSAGES/django.po +1 -1
  813. wagtail/contrib/table_block/locale/nl/LC_MESSAGES/django.mo +0 -0
  814. wagtail/contrib/table_block/locale/nl/LC_MESSAGES/django.po +2 -2
  815. wagtail/contrib/table_block/locale/pl/LC_MESSAGES/django.mo +0 -0
  816. wagtail/contrib/table_block/locale/pl/LC_MESSAGES/django.po +2 -2
  817. wagtail/contrib/table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  818. wagtail/contrib/table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  819. wagtail/contrib/table_block/locale/ro/LC_MESSAGES/django.po +1 -1
  820. wagtail/contrib/table_block/locale/ru/LC_MESSAGES/django.mo +0 -0
  821. wagtail/contrib/table_block/locale/ru/LC_MESSAGES/django.po +4 -2
  822. wagtail/contrib/table_block/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  823. wagtail/contrib/table_block/locale/sl/LC_MESSAGES/django.mo +0 -0
  824. wagtail/contrib/table_block/locale/sl/LC_MESSAGES/django.po +3 -3
  825. wagtail/contrib/table_block/locale/sv/LC_MESSAGES/django.po +1 -1
  826. wagtail/contrib/table_block/locale/tet/LC_MESSAGES/django.po +1 -1
  827. wagtail/contrib/table_block/locale/th/LC_MESSAGES/django.mo +0 -0
  828. wagtail/contrib/table_block/locale/th/LC_MESSAGES/django.po +3 -2
  829. wagtail/contrib/table_block/locale/tr/LC_MESSAGES/django.po +1 -1
  830. wagtail/contrib/table_block/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  831. wagtail/contrib/table_block/locale/ug/LC_MESSAGES/django.po +1 -1
  832. wagtail/contrib/table_block/locale/uk/LC_MESSAGES/django.po +1 -1
  833. wagtail/contrib/table_block/locale/vi/LC_MESSAGES/django.po +1 -1
  834. wagtail/contrib/table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  835. wagtail/contrib/table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  836. wagtail/contrib/table_block/tests.py +1 -0
  837. wagtail/contrib/typed_table_block/blocks.py +101 -98
  838. wagtail/contrib/typed_table_block/locale/ar/LC_MESSAGES/django.mo +0 -0
  839. wagtail/contrib/typed_table_block/locale/ar/LC_MESSAGES/django.po +15 -6
  840. wagtail/contrib/typed_table_block/locale/be/LC_MESSAGES/django.po +1 -1
  841. wagtail/contrib/typed_table_block/locale/ca/LC_MESSAGES/django.po +1 -1
  842. wagtail/contrib/typed_table_block/locale/cy/LC_MESSAGES/django.po +1 -1
  843. wagtail/contrib/typed_table_block/locale/de/LC_MESSAGES/django.po +1 -1
  844. wagtail/contrib/typed_table_block/locale/dv/LC_MESSAGES/django.mo +0 -0
  845. wagtail/contrib/typed_table_block/locale/dv/LC_MESSAGES/django.po +1 -1
  846. wagtail/contrib/typed_table_block/locale/el/LC_MESSAGES/django.po +1 -1
  847. wagtail/contrib/typed_table_block/locale/en/LC_MESSAGES/django.po +10 -10
  848. wagtail/contrib/typed_table_block/locale/es/LC_MESSAGES/django.po +1 -1
  849. wagtail/contrib/typed_table_block/locale/fa/LC_MESSAGES/django.po +1 -1
  850. wagtail/contrib/typed_table_block/locale/fi/LC_MESSAGES/django.po +1 -1
  851. wagtail/contrib/typed_table_block/locale/fr/LC_MESSAGES/django.po +1 -1
  852. wagtail/contrib/typed_table_block/locale/gl/LC_MESSAGES/django.po +1 -1
  853. wagtail/contrib/typed_table_block/locale/hu/LC_MESSAGES/django.po +1 -1
  854. wagtail/contrib/typed_table_block/locale/is_IS/LC_MESSAGES/django.po +1 -1
  855. wagtail/contrib/typed_table_block/locale/it/LC_MESSAGES/django.po +1 -1
  856. wagtail/contrib/typed_table_block/locale/ko/LC_MESSAGES/django.po +1 -1
  857. wagtail/contrib/typed_table_block/locale/lt/LC_MESSAGES/django.po +1 -1
  858. wagtail/contrib/typed_table_block/locale/nl/LC_MESSAGES/django.po +1 -1
  859. wagtail/contrib/typed_table_block/locale/pl/LC_MESSAGES/django.po +1 -1
  860. wagtail/contrib/typed_table_block/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  861. wagtail/contrib/typed_table_block/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  862. wagtail/contrib/typed_table_block/locale/ro/LC_MESSAGES/django.po +1 -1
  863. wagtail/contrib/typed_table_block/locale/ru/LC_MESSAGES/django.po +1 -1
  864. wagtail/contrib/typed_table_block/locale/sl/LC_MESSAGES/django.po +1 -1
  865. wagtail/contrib/typed_table_block/locale/sv/LC_MESSAGES/django.po +1 -1
  866. wagtail/contrib/typed_table_block/locale/th/LC_MESSAGES/django.mo +0 -0
  867. wagtail/contrib/typed_table_block/locale/th/LC_MESSAGES/django.po +1 -1
  868. wagtail/contrib/typed_table_block/locale/ug/LC_MESSAGES/django.po +1 -1
  869. wagtail/contrib/typed_table_block/locale/uk/LC_MESSAGES/django.po +1 -1
  870. wagtail/contrib/typed_table_block/locale/zh/LC_MESSAGES/django.po +1 -1
  871. wagtail/contrib/typed_table_block/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  872. wagtail/contrib/typed_table_block/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  873. wagtail/contrib/typed_table_block/tests.py +32 -2
  874. wagtail/coreutils.py +57 -1
  875. wagtail/documents/locale/af/LC_MESSAGES/django.mo +0 -0
  876. wagtail/documents/locale/af/LC_MESSAGES/django.po +1 -1
  877. wagtail/documents/locale/ar/LC_MESSAGES/django.mo +0 -0
  878. wagtail/documents/locale/ar/LC_MESSAGES/django.po +259 -67
  879. wagtail/documents/locale/az_AZ/LC_MESSAGES/django.mo +0 -0
  880. wagtail/documents/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  881. wagtail/documents/locale/be/LC_MESSAGES/django.po +9 -9
  882. wagtail/documents/locale/bg/LC_MESSAGES/django.po +1 -1
  883. wagtail/documents/locale/bn/LC_MESSAGES/django.po +1 -1
  884. wagtail/documents/locale/ca/LC_MESSAGES/django.mo +0 -0
  885. wagtail/documents/locale/ca/LC_MESSAGES/django.po +13 -11
  886. wagtail/documents/locale/cs/LC_MESSAGES/django.po +9 -9
  887. wagtail/documents/locale/cy/LC_MESSAGES/django.mo +0 -0
  888. wagtail/documents/locale/cy/LC_MESSAGES/django.po +9 -16
  889. wagtail/documents/locale/da/LC_MESSAGES/django.po +1 -1
  890. wagtail/documents/locale/de/LC_MESSAGES/django.mo +0 -0
  891. wagtail/documents/locale/de/LC_MESSAGES/django.po +7 -14
  892. wagtail/documents/locale/dv/LC_MESSAGES/django.mo +0 -0
  893. wagtail/documents/locale/dv/LC_MESSAGES/django.po +7 -14
  894. wagtail/documents/locale/el/LC_MESSAGES/django.po +7 -7
  895. wagtail/documents/locale/en/LC_MESSAGES/django.po +33 -33
  896. wagtail/documents/locale/es/LC_MESSAGES/django.mo +0 -0
  897. wagtail/documents/locale/es/LC_MESSAGES/django.po +8 -15
  898. wagtail/documents/locale/es_419/LC_MESSAGES/django.po +1 -1
  899. wagtail/documents/locale/et/LC_MESSAGES/django.po +7 -7
  900. wagtail/documents/locale/eu/LC_MESSAGES/django.po +1 -1
  901. wagtail/documents/locale/fa/LC_MESSAGES/django.mo +0 -0
  902. wagtail/documents/locale/fa/LC_MESSAGES/django.po +7 -14
  903. wagtail/documents/locale/fi/LC_MESSAGES/django.mo +0 -0
  904. wagtail/documents/locale/fi/LC_MESSAGES/django.po +7 -14
  905. wagtail/documents/locale/fr/LC_MESSAGES/django.mo +0 -0
  906. wagtail/documents/locale/fr/LC_MESSAGES/django.po +14 -12
  907. wagtail/documents/locale/gl/LC_MESSAGES/django.mo +0 -0
  908. wagtail/documents/locale/gl/LC_MESSAGES/django.po +13 -11
  909. wagtail/documents/locale/he_IL/LC_MESSAGES/django.po +1 -1
  910. wagtail/documents/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  911. wagtail/documents/locale/hr_HR/LC_MESSAGES/django.po +8 -15
  912. wagtail/documents/locale/ht/LC_MESSAGES/django.mo +0 -0
  913. wagtail/documents/locale/ht/LC_MESSAGES/django.po +1 -1
  914. wagtail/documents/locale/hu/LC_MESSAGES/django.mo +0 -0
  915. wagtail/documents/locale/hu/LC_MESSAGES/django.po +13 -11
  916. wagtail/documents/locale/id_ID/LC_MESSAGES/django.po +6 -6
  917. wagtail/documents/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  918. wagtail/documents/locale/is_IS/LC_MESSAGES/django.po +7 -14
  919. wagtail/documents/locale/it/LC_MESSAGES/django.mo +0 -0
  920. wagtail/documents/locale/it/LC_MESSAGES/django.po +8 -15
  921. wagtail/documents/locale/ja/LC_MESSAGES/django.po +6 -6
  922. wagtail/documents/locale/ka/LC_MESSAGES/django.po +1 -1
  923. wagtail/documents/locale/ko/LC_MESSAGES/django.mo +0 -0
  924. wagtail/documents/locale/ko/LC_MESSAGES/django.po +6 -13
  925. wagtail/documents/locale/lt/LC_MESSAGES/django.po +9 -9
  926. wagtail/documents/locale/lv/LC_MESSAGES/django.po +1 -1
  927. wagtail/documents/locale/mi/LC_MESSAGES/django.po +7 -7
  928. wagtail/documents/locale/mn/LC_MESSAGES/django.po +7 -7
  929. wagtail/documents/locale/my/LC_MESSAGES/django.po +1 -1
  930. wagtail/documents/locale/nb/LC_MESSAGES/django.mo +0 -0
  931. wagtail/documents/locale/nb/LC_MESSAGES/django.po +7 -14
  932. wagtail/documents/locale/nl/LC_MESSAGES/django.mo +0 -0
  933. wagtail/documents/locale/nl/LC_MESSAGES/django.po +7 -14
  934. wagtail/documents/locale/pl/LC_MESSAGES/django.mo +0 -0
  935. wagtail/documents/locale/pl/LC_MESSAGES/django.po +9 -16
  936. wagtail/documents/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  937. wagtail/documents/locale/pt_BR/LC_MESSAGES/django.po +8 -15
  938. wagtail/documents/locale/pt_PT/LC_MESSAGES/django.po +8 -8
  939. wagtail/documents/locale/ro/LC_MESSAGES/django.mo +0 -0
  940. wagtail/documents/locale/ro/LC_MESSAGES/django.po +8 -15
  941. wagtail/documents/locale/ru/LC_MESSAGES/django.mo +0 -0
  942. wagtail/documents/locale/ru/LC_MESSAGES/django.po +9 -16
  943. wagtail/documents/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  944. wagtail/documents/locale/sl/LC_MESSAGES/django.mo +0 -0
  945. wagtail/documents/locale/sl/LC_MESSAGES/django.po +9 -16
  946. wagtail/documents/locale/sv/LC_MESSAGES/django.mo +0 -0
  947. wagtail/documents/locale/sv/LC_MESSAGES/django.po +7 -14
  948. wagtail/documents/locale/tet/LC_MESSAGES/django.po +6 -6
  949. wagtail/documents/locale/th/LC_MESSAGES/django.po +6 -6
  950. wagtail/documents/locale/tr/LC_MESSAGES/django.po +7 -7
  951. wagtail/documents/locale/tr_TR/LC_MESSAGES/django.po +7 -7
  952. wagtail/documents/locale/ug/LC_MESSAGES/django.mo +0 -0
  953. wagtail/documents/locale/ug/LC_MESSAGES/django.po +7 -14
  954. wagtail/documents/locale/uk/LC_MESSAGES/django.mo +0 -0
  955. wagtail/documents/locale/uk/LC_MESSAGES/django.po +9 -16
  956. wagtail/documents/locale/vi/LC_MESSAGES/django.po +6 -6
  957. wagtail/documents/locale/zh/LC_MESSAGES/django.po +1 -1
  958. wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  959. wagtail/documents/locale/zh_Hans/LC_MESSAGES/django.po +6 -13
  960. wagtail/documents/locale/zh_Hant/LC_MESSAGES/django.po +6 -6
  961. wagtail/documents/templates/wagtaildocs/bulk_actions/confirm_bulk_delete.html +12 -9
  962. wagtail/documents/templates/wagtaildocs/chooser/results.html +1 -1
  963. wagtail/documents/templates/wagtaildocs/multiple/add.html +2 -2
  964. wagtail/documents/tests/test_admin_views.py +26 -0
  965. wagtail/documents/tests/test_bulk_actions/test_bulk_add_to_collection.py +85 -1
  966. wagtail/documents/tests/test_bulk_actions/test_bulk_delete.py +65 -18
  967. wagtail/documents/views/bulk_actions/delete.py +5 -1
  968. wagtail/documents/views/bulk_actions/document_bulk_action.py +3 -1
  969. wagtail/documents/views/documents.py +15 -1
  970. wagtail/embeds/blocks.py +5 -4
  971. wagtail/embeds/embeds.py +5 -2
  972. wagtail/embeds/finders/oembed.py +6 -10
  973. wagtail/embeds/locale/ar/LC_MESSAGES/django.po +1 -1
  974. wagtail/embeds/locale/az_AZ/LC_MESSAGES/django.mo +0 -0
  975. wagtail/embeds/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  976. wagtail/embeds/locale/be/LC_MESSAGES/django.po +1 -1
  977. wagtail/embeds/locale/bg/LC_MESSAGES/django.po +1 -1
  978. wagtail/embeds/locale/bn/LC_MESSAGES/django.mo +0 -0
  979. wagtail/embeds/locale/bn/LC_MESSAGES/django.po +1 -1
  980. wagtail/embeds/locale/ca/LC_MESSAGES/django.po +1 -1
  981. wagtail/embeds/locale/cs/LC_MESSAGES/django.po +1 -1
  982. wagtail/embeds/locale/cy/LC_MESSAGES/django.po +1 -1
  983. wagtail/embeds/locale/da/LC_MESSAGES/django.mo +0 -0
  984. wagtail/embeds/locale/da/LC_MESSAGES/django.po +1 -1
  985. wagtail/embeds/locale/de/LC_MESSAGES/django.po +1 -1
  986. wagtail/embeds/locale/dv/LC_MESSAGES/django.mo +0 -0
  987. wagtail/embeds/locale/dv/LC_MESSAGES/django.po +1 -1
  988. wagtail/embeds/locale/el/LC_MESSAGES/django.po +2 -1
  989. wagtail/embeds/locale/en/LC_MESSAGES/django.po +2 -2
  990. wagtail/embeds/locale/es/LC_MESSAGES/django.po +1 -1
  991. wagtail/embeds/locale/es_419/LC_MESSAGES/django.mo +0 -0
  992. wagtail/embeds/locale/es_419/LC_MESSAGES/django.po +1 -1
  993. wagtail/embeds/locale/et/LC_MESSAGES/django.po +1 -1
  994. wagtail/embeds/locale/fa/LC_MESSAGES/django.po +1 -1
  995. wagtail/embeds/locale/fi/LC_MESSAGES/django.po +1 -1
  996. wagtail/embeds/locale/fr/LC_MESSAGES/django.po +2 -1
  997. wagtail/embeds/locale/gl/LC_MESSAGES/django.po +1 -1
  998. wagtail/embeds/locale/he_IL/LC_MESSAGES/django.po +1 -1
  999. wagtail/embeds/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  1000. wagtail/embeds/locale/ht/LC_MESSAGES/django.po +1 -1
  1001. wagtail/embeds/locale/hu/LC_MESSAGES/django.po +1 -1
  1002. wagtail/embeds/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1003. wagtail/embeds/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1004. wagtail/embeds/locale/it/LC_MESSAGES/django.po +1 -1
  1005. wagtail/embeds/locale/ja/LC_MESSAGES/django.po +1 -1
  1006. wagtail/embeds/locale/ko/LC_MESSAGES/django.po +1 -1
  1007. wagtail/embeds/locale/lt/LC_MESSAGES/django.po +1 -1
  1008. wagtail/embeds/locale/lv/LC_MESSAGES/django.po +1 -1
  1009. wagtail/embeds/locale/mi/LC_MESSAGES/django.po +1 -1
  1010. wagtail/embeds/locale/mn/LC_MESSAGES/django.mo +0 -0
  1011. wagtail/embeds/locale/mn/LC_MESSAGES/django.po +3 -2
  1012. wagtail/embeds/locale/my/LC_MESSAGES/django.mo +0 -0
  1013. wagtail/embeds/locale/my/LC_MESSAGES/django.po +1 -1
  1014. wagtail/embeds/locale/nb/LC_MESSAGES/django.po +1 -1
  1015. wagtail/embeds/locale/nl/LC_MESSAGES/django.mo +0 -0
  1016. wagtail/embeds/locale/nl/LC_MESSAGES/django.po +2 -2
  1017. wagtail/embeds/locale/pl/LC_MESSAGES/django.po +1 -1
  1018. wagtail/embeds/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  1019. wagtail/embeds/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1020. wagtail/embeds/locale/ro/LC_MESSAGES/django.po +1 -1
  1021. wagtail/embeds/locale/ru/LC_MESSAGES/django.po +2 -1
  1022. wagtail/embeds/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1023. wagtail/embeds/locale/sl/LC_MESSAGES/django.po +1 -1
  1024. wagtail/embeds/locale/sv/LC_MESSAGES/django.po +1 -1
  1025. wagtail/embeds/locale/tet/LC_MESSAGES/django.po +1 -1
  1026. wagtail/embeds/locale/th/LC_MESSAGES/django.po +1 -1
  1027. wagtail/embeds/locale/tr/LC_MESSAGES/django.po +1 -1
  1028. wagtail/embeds/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1029. wagtail/embeds/locale/ug/LC_MESSAGES/django.po +1 -1
  1030. wagtail/embeds/locale/uk/LC_MESSAGES/django.po +1 -1
  1031. wagtail/embeds/locale/vi/LC_MESSAGES/django.po +1 -1
  1032. wagtail/embeds/locale/zh/LC_MESSAGES/django.po +1 -1
  1033. wagtail/embeds/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1034. wagtail/embeds/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1035. wagtail/embeds/oembed_providers.py +10 -1
  1036. wagtail/embeds/tests/test_embeds.py +220 -165
  1037. wagtail/fields.py +30 -1
  1038. wagtail/images/blocks.py +1 -1
  1039. wagtail/images/fields.py +4 -11
  1040. wagtail/images/locale/ar/LC_MESSAGES/django.mo +0 -0
  1041. wagtail/images/locale/ar/LC_MESSAGES/django.po +398 -88
  1042. wagtail/images/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  1043. wagtail/images/locale/be/LC_MESSAGES/django.mo +0 -0
  1044. wagtail/images/locale/be/LC_MESSAGES/django.po +15 -9
  1045. wagtail/images/locale/bg/LC_MESSAGES/django.mo +0 -0
  1046. wagtail/images/locale/bg/LC_MESSAGES/django.po +4 -1
  1047. wagtail/images/locale/bn/LC_MESSAGES/django.po +1 -1
  1048. wagtail/images/locale/ca/LC_MESSAGES/django.mo +0 -0
  1049. wagtail/images/locale/ca/LC_MESSAGES/django.po +30 -13
  1050. wagtail/images/locale/cs/LC_MESSAGES/django.mo +0 -0
  1051. wagtail/images/locale/cs/LC_MESSAGES/django.po +15 -9
  1052. wagtail/images/locale/cy/LC_MESSAGES/django.mo +0 -0
  1053. wagtail/images/locale/cy/LC_MESSAGES/django.po +12 -16
  1054. wagtail/images/locale/da/LC_MESSAGES/django.mo +0 -0
  1055. wagtail/images/locale/da/LC_MESSAGES/django.po +4 -1
  1056. wagtail/images/locale/de/LC_MESSAGES/django.mo +0 -0
  1057. wagtail/images/locale/de/LC_MESSAGES/django.po +13 -14
  1058. wagtail/images/locale/dv/LC_MESSAGES/django.mo +0 -0
  1059. wagtail/images/locale/dv/LC_MESSAGES/django.po +13 -12
  1060. wagtail/images/locale/el/LC_MESSAGES/django.mo +0 -0
  1061. wagtail/images/locale/el/LC_MESSAGES/django.po +13 -7
  1062. wagtail/images/locale/en/LC_MESSAGES/django.po +105 -85
  1063. wagtail/images/locale/es/LC_MESSAGES/django.mo +0 -0
  1064. wagtail/images/locale/es/LC_MESSAGES/django.po +14 -15
  1065. wagtail/images/locale/es_419/LC_MESSAGES/django.mo +0 -0
  1066. wagtail/images/locale/es_419/LC_MESSAGES/django.po +4 -1
  1067. wagtail/images/locale/et/LC_MESSAGES/django.mo +0 -0
  1068. wagtail/images/locale/et/LC_MESSAGES/django.po +13 -7
  1069. wagtail/images/locale/eu/LC_MESSAGES/django.mo +0 -0
  1070. wagtail/images/locale/eu/LC_MESSAGES/django.po +4 -1
  1071. wagtail/images/locale/fa/LC_MESSAGES/django.mo +0 -0
  1072. wagtail/images/locale/fa/LC_MESSAGES/django.po +10 -14
  1073. wagtail/images/locale/fi/LC_MESSAGES/django.mo +0 -0
  1074. wagtail/images/locale/fi/LC_MESSAGES/django.po +13 -14
  1075. wagtail/images/locale/fr/LC_MESSAGES/django.mo +0 -0
  1076. wagtail/images/locale/fr/LC_MESSAGES/django.po +31 -14
  1077. wagtail/images/locale/gl/LC_MESSAGES/django.mo +0 -0
  1078. wagtail/images/locale/gl/LC_MESSAGES/django.po +30 -13
  1079. wagtail/images/locale/he_IL/LC_MESSAGES/django.mo +0 -0
  1080. wagtail/images/locale/he_IL/LC_MESSAGES/django.po +4 -1
  1081. wagtail/images/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  1082. wagtail/images/locale/hr_HR/LC_MESSAGES/django.po +14 -15
  1083. wagtail/images/locale/ht/LC_MESSAGES/django.po +1 -1
  1084. wagtail/images/locale/hu/LC_MESSAGES/django.mo +0 -0
  1085. wagtail/images/locale/hu/LC_MESSAGES/django.po +29 -12
  1086. wagtail/images/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  1087. wagtail/images/locale/id_ID/LC_MESSAGES/django.po +9 -6
  1088. wagtail/images/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  1089. wagtail/images/locale/is_IS/LC_MESSAGES/django.po +13 -14
  1090. wagtail/images/locale/it/LC_MESSAGES/django.mo +0 -0
  1091. wagtail/images/locale/it/LC_MESSAGES/django.po +14 -15
  1092. wagtail/images/locale/ja/LC_MESSAGES/django.mo +0 -0
  1093. wagtail/images/locale/ja/LC_MESSAGES/django.po +12 -6
  1094. wagtail/images/locale/ka/LC_MESSAGES/django.mo +0 -0
  1095. wagtail/images/locale/ka/LC_MESSAGES/django.po +4 -1
  1096. wagtail/images/locale/ko/LC_MESSAGES/django.mo +0 -0
  1097. wagtail/images/locale/ko/LC_MESSAGES/django.po +12 -13
  1098. wagtail/images/locale/lt/LC_MESSAGES/django.mo +0 -0
  1099. wagtail/images/locale/lt/LC_MESSAGES/django.po +15 -9
  1100. wagtail/images/locale/lv/LC_MESSAGES/django.mo +0 -0
  1101. wagtail/images/locale/lv/LC_MESSAGES/django.po +4 -1
  1102. wagtail/images/locale/mi/LC_MESSAGES/django.mo +0 -0
  1103. wagtail/images/locale/mi/LC_MESSAGES/django.po +13 -7
  1104. wagtail/images/locale/mn/LC_MESSAGES/django.mo +0 -0
  1105. wagtail/images/locale/mn/LC_MESSAGES/django.po +10 -7
  1106. wagtail/images/locale/my/LC_MESSAGES/django.mo +0 -0
  1107. wagtail/images/locale/my/LC_MESSAGES/django.po +4 -1
  1108. wagtail/images/locale/nb/LC_MESSAGES/django.mo +0 -0
  1109. wagtail/images/locale/nb/LC_MESSAGES/django.po +13 -14
  1110. wagtail/images/locale/nl/LC_MESSAGES/django.mo +0 -0
  1111. wagtail/images/locale/nl/LC_MESSAGES/django.po +17 -17
  1112. wagtail/images/locale/pl/LC_MESSAGES/django.mo +0 -0
  1113. wagtail/images/locale/pl/LC_MESSAGES/django.po +15 -16
  1114. wagtail/images/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  1115. wagtail/images/locale/pt_BR/LC_MESSAGES/django.po +14 -15
  1116. wagtail/images/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  1117. wagtail/images/locale/pt_PT/LC_MESSAGES/django.po +14 -8
  1118. wagtail/images/locale/ro/LC_MESSAGES/django.mo +0 -0
  1119. wagtail/images/locale/ro/LC_MESSAGES/django.po +14 -15
  1120. wagtail/images/locale/ru/LC_MESSAGES/django.mo +0 -0
  1121. wagtail/images/locale/ru/LC_MESSAGES/django.po +15 -16
  1122. wagtail/images/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  1123. wagtail/images/locale/sk_SK/LC_MESSAGES/django.po +4 -1
  1124. wagtail/images/locale/sl/LC_MESSAGES/django.mo +0 -0
  1125. wagtail/images/locale/sl/LC_MESSAGES/django.po +15 -16
  1126. wagtail/images/locale/sv/LC_MESSAGES/django.mo +0 -0
  1127. wagtail/images/locale/sv/LC_MESSAGES/django.po +13 -14
  1128. wagtail/images/locale/tet/LC_MESSAGES/django.mo +0 -0
  1129. wagtail/images/locale/tet/LC_MESSAGES/django.po +9 -6
  1130. wagtail/images/locale/th/LC_MESSAGES/django.mo +0 -0
  1131. wagtail/images/locale/th/LC_MESSAGES/django.po +9 -6
  1132. wagtail/images/locale/tr/LC_MESSAGES/django.mo +0 -0
  1133. wagtail/images/locale/tr/LC_MESSAGES/django.po +10 -7
  1134. wagtail/images/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  1135. wagtail/images/locale/tr_TR/LC_MESSAGES/django.po +10 -7
  1136. wagtail/images/locale/ug/LC_MESSAGES/django.mo +0 -0
  1137. wagtail/images/locale/ug/LC_MESSAGES/django.po +13 -14
  1138. wagtail/images/locale/uk/LC_MESSAGES/django.mo +0 -0
  1139. wagtail/images/locale/uk/LC_MESSAGES/django.po +15 -16
  1140. wagtail/images/locale/vi/LC_MESSAGES/django.mo +0 -0
  1141. wagtail/images/locale/vi/LC_MESSAGES/django.po +9 -6
  1142. wagtail/images/locale/zh/LC_MESSAGES/django.mo +0 -0
  1143. wagtail/images/locale/zh/LC_MESSAGES/django.po +4 -1
  1144. wagtail/images/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  1145. wagtail/images/locale/zh_Hans/LC_MESSAGES/django.po +12 -13
  1146. wagtail/images/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  1147. wagtail/images/locale/zh_Hant/LC_MESSAGES/django.po +12 -6
  1148. wagtail/images/models.py +93 -5
  1149. wagtail/images/static/wagtailimages/js/focal-point-chooser.js +1 -1
  1150. wagtail/images/static/wagtailimages/js/image-block.js +1 -1
  1151. wagtail/images/templates/wagtailimages/bulk_actions/confirm_bulk_delete.html +12 -9
  1152. wagtail/images/templates/wagtailimages/chooser/results.html +1 -1
  1153. wagtail/images/templates/wagtailimages/images/edit.html +2 -1
  1154. wagtail/images/templates/wagtailimages/images/image_preview_column_cell.html +10 -0
  1155. wagtail/images/templates/wagtailimages/images/index.html +3 -0
  1156. wagtail/images/templates/wagtailimages/images/index_results.html +29 -18
  1157. wagtail/images/templates/wagtailimages/images/layout_toggle_button.html +10 -0
  1158. wagtail/images/templates/wagtailimages/images/title_column_cell.html +11 -0
  1159. wagtail/images/templates/wagtailimages/images/url_generator.html +1 -8
  1160. wagtail/images/templates/wagtailimages/multiple/add.html +3 -2
  1161. wagtail/images/templatetags/wagtailimages_tags.py +5 -16
  1162. wagtail/images/tests/test_admin_views.py +335 -5
  1163. wagtail/images/tests/test_blocks.py +1 -1
  1164. wagtail/images/tests/test_bulk_actions/test_bulk_add_to_collection.py +84 -1
  1165. wagtail/images/tests/test_bulk_actions/test_bulk_delete.py +65 -18
  1166. wagtail/images/tests/test_image_operations.py +2 -3
  1167. wagtail/images/tests/test_jinja2_svg.py +240 -0
  1168. wagtail/images/tests/test_models.py +114 -0
  1169. wagtail/images/tests/test_templatetags.py +58 -4
  1170. wagtail/images/utils.py +27 -0
  1171. wagtail/images/views/bulk_actions/delete.py +5 -1
  1172. wagtail/images/views/bulk_actions/image_bulk_action.py +3 -1
  1173. wagtail/images/views/images.py +79 -2
  1174. wagtail/images/views/multiple.py +6 -2
  1175. wagtail/images/widgets.py +1 -1
  1176. wagtail/locale/af/LC_MESSAGES/django.po +1 -1
  1177. wagtail/locale/ar/LC_MESSAGES/django.mo +0 -0
  1178. wagtail/locale/ar/LC_MESSAGES/django.po +789 -86
  1179. wagtail/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  1180. wagtail/locale/be/LC_MESSAGES/django.po +1 -1
  1181. wagtail/locale/bg/LC_MESSAGES/django.po +1 -1
  1182. wagtail/locale/bn/LC_MESSAGES/django.po +1 -1
  1183. wagtail/locale/ca/LC_MESSAGES/django.mo +0 -0
  1184. wagtail/locale/ca/LC_MESSAGES/django.po +12 -3
  1185. wagtail/locale/cs/LC_MESSAGES/django.po +1 -1
  1186. wagtail/locale/cy/LC_MESSAGES/django.po +1 -1
  1187. wagtail/locale/da/LC_MESSAGES/django.po +1 -1
  1188. wagtail/locale/de/LC_MESSAGES/django.po +1 -1
  1189. wagtail/locale/dv/LC_MESSAGES/django.po +1 -1
  1190. wagtail/locale/el/LC_MESSAGES/django.po +1 -1
  1191. wagtail/locale/en/LC_MESSAGES/django.po +99 -87
  1192. wagtail/locale/es/LC_MESSAGES/django.po +1 -1
  1193. wagtail/locale/es_419/LC_MESSAGES/django.po +1 -1
  1194. wagtail/locale/et/LC_MESSAGES/django.po +1 -1
  1195. wagtail/locale/eu/LC_MESSAGES/django.po +1 -1
  1196. wagtail/locale/fa/LC_MESSAGES/django.po +1 -1
  1197. wagtail/locale/fi/LC_MESSAGES/django.po +1 -1
  1198. wagtail/locale/fr/LC_MESSAGES/django.mo +0 -0
  1199. wagtail/locale/fr/LC_MESSAGES/django.po +12 -3
  1200. wagtail/locale/gl/LC_MESSAGES/django.mo +0 -0
  1201. wagtail/locale/gl/LC_MESSAGES/django.po +12 -3
  1202. wagtail/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1203. wagtail/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  1204. wagtail/locale/hu/LC_MESSAGES/django.mo +0 -0
  1205. wagtail/locale/hu/LC_MESSAGES/django.po +11 -2
  1206. wagtail/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1207. wagtail/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1208. wagtail/locale/it/LC_MESSAGES/django.po +1 -1
  1209. wagtail/locale/ja/LC_MESSAGES/django.po +1 -1
  1210. wagtail/locale/ka/LC_MESSAGES/django.po +1 -1
  1211. wagtail/locale/ko/LC_MESSAGES/django.po +1 -1
  1212. wagtail/locale/lt/LC_MESSAGES/django.po +1 -1
  1213. wagtail/locale/lv/LC_MESSAGES/django.po +1 -1
  1214. wagtail/locale/mi/LC_MESSAGES/django.po +1 -1
  1215. wagtail/locale/mn/LC_MESSAGES/django.po +1 -1
  1216. wagtail/locale/my/LC_MESSAGES/django.po +1 -1
  1217. wagtail/locale/nb/LC_MESSAGES/django.po +1 -1
  1218. wagtail/locale/nl/LC_MESSAGES/django.po +1 -1
  1219. wagtail/locale/pl/LC_MESSAGES/django.po +1 -1
  1220. wagtail/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  1221. wagtail/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1222. wagtail/locale/ro/LC_MESSAGES/django.po +1 -1
  1223. wagtail/locale/ru/LC_MESSAGES/django.po +1 -1
  1224. wagtail/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1225. wagtail/locale/sl/LC_MESSAGES/django.po +1 -1
  1226. wagtail/locale/sv/LC_MESSAGES/django.po +1 -1
  1227. wagtail/locale/tet/LC_MESSAGES/django.po +1 -1
  1228. wagtail/locale/th/LC_MESSAGES/django.po +1 -1
  1229. wagtail/locale/tr/LC_MESSAGES/django.po +1 -1
  1230. wagtail/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1231. wagtail/locale/ug/LC_MESSAGES/django.po +1 -1
  1232. wagtail/locale/uk/LC_MESSAGES/django.po +1 -1
  1233. wagtail/locale/vi/LC_MESSAGES/django.po +1 -1
  1234. wagtail/locale/zh/LC_MESSAGES/django.po +1 -1
  1235. wagtail/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1236. wagtail/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1237. wagtail/locales/locale/ar/LC_MESSAGES/django.mo +0 -0
  1238. wagtail/locales/locale/ar/LC_MESSAGES/django.po +78 -6
  1239. wagtail/locales/locale/be/LC_MESSAGES/django.po +1 -1
  1240. wagtail/locales/locale/bg/LC_MESSAGES/django.mo +0 -0
  1241. wagtail/locales/locale/bg/LC_MESSAGES/django.po +1 -1
  1242. wagtail/locales/locale/ca/LC_MESSAGES/django.po +1 -1
  1243. wagtail/locales/locale/cs/LC_MESSAGES/django.po +1 -1
  1244. wagtail/locales/locale/cy/LC_MESSAGES/django.po +1 -1
  1245. wagtail/locales/locale/da/LC_MESSAGES/django.mo +0 -0
  1246. wagtail/locales/locale/da/LC_MESSAGES/django.po +1 -1
  1247. wagtail/locales/locale/de/LC_MESSAGES/django.po +1 -1
  1248. wagtail/locales/locale/dv/LC_MESSAGES/django.po +1 -1
  1249. wagtail/locales/locale/el/LC_MESSAGES/django.po +1 -1
  1250. wagtail/locales/locale/en/LC_MESSAGES/django.po +1 -1
  1251. wagtail/locales/locale/es/LC_MESSAGES/django.po +1 -1
  1252. wagtail/locales/locale/et/LC_MESSAGES/django.po +1 -1
  1253. wagtail/locales/locale/fa/LC_MESSAGES/django.mo +0 -0
  1254. wagtail/locales/locale/fa/LC_MESSAGES/django.po +1 -1
  1255. wagtail/locales/locale/fi/LC_MESSAGES/django.po +1 -1
  1256. wagtail/locales/locale/fr/LC_MESSAGES/django.mo +0 -0
  1257. wagtail/locales/locale/fr/LC_MESSAGES/django.po +4 -3
  1258. wagtail/locales/locale/gl/LC_MESSAGES/django.po +1 -1
  1259. wagtail/locales/locale/he_IL/LC_MESSAGES/django.mo +0 -0
  1260. wagtail/locales/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1261. wagtail/locales/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  1262. wagtail/locales/locale/hu/LC_MESSAGES/django.mo +0 -0
  1263. wagtail/locales/locale/hu/LC_MESSAGES/django.po +13 -3
  1264. wagtail/locales/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1265. wagtail/locales/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  1266. wagtail/locales/locale/is_IS/LC_MESSAGES/django.po +13 -3
  1267. wagtail/locales/locale/it/LC_MESSAGES/django.po +1 -1
  1268. wagtail/locales/locale/ja/LC_MESSAGES/django.po +1 -1
  1269. wagtail/locales/locale/ko/LC_MESSAGES/django.po +1 -1
  1270. wagtail/locales/locale/lt/LC_MESSAGES/django.po +1 -1
  1271. wagtail/locales/locale/lv/LC_MESSAGES/django.mo +0 -0
  1272. wagtail/locales/locale/lv/LC_MESSAGES/django.po +1 -1
  1273. wagtail/locales/locale/mi/LC_MESSAGES/django.po +1 -1
  1274. wagtail/locales/locale/mn/LC_MESSAGES/django.po +1 -1
  1275. wagtail/locales/locale/my/LC_MESSAGES/django.mo +0 -0
  1276. wagtail/locales/locale/my/LC_MESSAGES/django.po +1 -1
  1277. wagtail/locales/locale/nb/LC_MESSAGES/django.po +1 -1
  1278. wagtail/locales/locale/nl/LC_MESSAGES/django.po +1 -1
  1279. wagtail/locales/locale/pl/LC_MESSAGES/django.po +1 -1
  1280. wagtail/locales/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  1281. wagtail/locales/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1282. wagtail/locales/locale/ro/LC_MESSAGES/django.po +1 -1
  1283. wagtail/locales/locale/ru/LC_MESSAGES/django.po +1 -1
  1284. wagtail/locales/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  1285. wagtail/locales/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1286. wagtail/locales/locale/sl/LC_MESSAGES/django.po +1 -1
  1287. wagtail/locales/locale/sv/LC_MESSAGES/django.po +1 -1
  1288. wagtail/locales/locale/tet/LC_MESSAGES/django.po +1 -1
  1289. wagtail/locales/locale/th/LC_MESSAGES/django.po +1 -1
  1290. wagtail/locales/locale/tr/LC_MESSAGES/django.po +1 -1
  1291. wagtail/locales/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1292. wagtail/locales/locale/ug/LC_MESSAGES/django.po +1 -1
  1293. wagtail/locales/locale/uk/LC_MESSAGES/django.po +1 -1
  1294. wagtail/locales/locale/vi/LC_MESSAGES/django.mo +0 -0
  1295. wagtail/locales/locale/vi/LC_MESSAGES/django.po +1 -1
  1296. wagtail/locales/locale/zh/LC_MESSAGES/django.mo +0 -0
  1297. wagtail/locales/locale/zh/LC_MESSAGES/django.po +1 -1
  1298. wagtail/locales/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1299. wagtail/locales/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1300. wagtail/migrations/0095_groupsitepermission.py +60 -0
  1301. wagtail/models/__init__.py +1 -1
  1302. wagtail/models/pages.py +13 -3
  1303. wagtail/models/preview.py +9 -1
  1304. wagtail/models/reference_index.py +125 -5
  1305. wagtail/models/revisions.py +31 -13
  1306. wagtail/models/sites.py +48 -0
  1307. wagtail/models/workflows.py +35 -11
  1308. wagtail/permission_policies/base.py +9 -7
  1309. wagtail/permission_policies/collections.py +7 -7
  1310. wagtail/permission_policies/sites.py +195 -0
  1311. wagtail/project_template/home/migrations/0002_create_homepage.py +8 -3
  1312. wagtail/project_template/home/tests.py +43 -0
  1313. wagtail/project_template/project_name/settings/base.py +3 -7
  1314. wagtail/project_template/project_name/settings/production.py +6 -0
  1315. wagtail/project_template/requirements.txt +1 -1
  1316. wagtail/rich_text/__init__.py +11 -1
  1317. wagtail/search/backends/base.py +13 -0
  1318. wagtail/search/backends/database/fallback.py +1 -0
  1319. wagtail/search/backends/database/mysql/mysql.py +1 -0
  1320. wagtail/search/backends/database/postgres/postgres.py +1 -0
  1321. wagtail/search/backends/database/sqlite/sqlite.py +1 -0
  1322. wagtail/search/locale/ar/LC_MESSAGES/django.mo +0 -0
  1323. wagtail/search/locale/ar/LC_MESSAGES/django.po +8 -2
  1324. wagtail/search/locale/be/LC_MESSAGES/django.mo +0 -0
  1325. wagtail/search/locale/be/LC_MESSAGES/django.po +3 -2
  1326. wagtail/search/locale/ca/LC_MESSAGES/django.po +1 -1
  1327. wagtail/search/locale/cs/LC_MESSAGES/django.mo +0 -0
  1328. wagtail/search/locale/cs/LC_MESSAGES/django.po +1 -1
  1329. wagtail/search/locale/cy/LC_MESSAGES/django.po +1 -1
  1330. wagtail/search/locale/de/LC_MESSAGES/django.po +1 -1
  1331. wagtail/search/locale/dv/LC_MESSAGES/django.po +2 -1
  1332. wagtail/search/locale/en/LC_MESSAGES/django.po +1 -1
  1333. wagtail/search/locale/es/LC_MESSAGES/django.po +1 -1
  1334. wagtail/search/locale/et/LC_MESSAGES/django.mo +0 -0
  1335. wagtail/search/locale/et/LC_MESSAGES/django.po +1 -1
  1336. wagtail/search/locale/fa/LC_MESSAGES/django.mo +0 -0
  1337. wagtail/search/locale/fa/LC_MESSAGES/django.po +3 -2
  1338. wagtail/search/locale/fi/LC_MESSAGES/django.po +1 -1
  1339. wagtail/search/locale/fr/LC_MESSAGES/django.po +1 -1
  1340. wagtail/search/locale/gl/LC_MESSAGES/django.po +1 -1
  1341. wagtail/search/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  1342. wagtail/search/locale/ht/LC_MESSAGES/django.mo +0 -0
  1343. wagtail/search/locale/ht/LC_MESSAGES/django.po +1 -1
  1344. wagtail/search/locale/hu/LC_MESSAGES/django.po +1 -1
  1345. wagtail/search/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  1346. wagtail/search/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1347. wagtail/search/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1348. wagtail/search/locale/it/LC_MESSAGES/django.po +1 -1
  1349. wagtail/search/locale/ja/LC_MESSAGES/django.mo +0 -0
  1350. wagtail/search/locale/ja/LC_MESSAGES/django.po +1 -1
  1351. wagtail/search/locale/ko/LC_MESSAGES/django.po +1 -1
  1352. wagtail/search/locale/lt/LC_MESSAGES/django.mo +0 -0
  1353. wagtail/search/locale/lt/LC_MESSAGES/django.po +1 -1
  1354. wagtail/search/locale/mi/LC_MESSAGES/django.mo +0 -0
  1355. wagtail/search/locale/mi/LC_MESSAGES/django.po +1 -1
  1356. wagtail/search/locale/mn/LC_MESSAGES/django.mo +0 -0
  1357. wagtail/search/locale/mn/LC_MESSAGES/django.po +1 -1
  1358. wagtail/search/locale/my/LC_MESSAGES/django.mo +0 -0
  1359. wagtail/search/locale/my/LC_MESSAGES/django.po +1 -1
  1360. wagtail/search/locale/nb/LC_MESSAGES/django.mo +0 -0
  1361. wagtail/search/locale/nb/LC_MESSAGES/django.po +3 -2
  1362. wagtail/search/locale/nl/LC_MESSAGES/django.po +1 -1
  1363. wagtail/search/locale/pl/LC_MESSAGES/django.mo +0 -0
  1364. wagtail/search/locale/pl/LC_MESSAGES/django.po +3 -3
  1365. wagtail/search/locale/pt_BR/LC_MESSAGES/django.po +2 -1
  1366. wagtail/search/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1367. wagtail/search/locale/ro/LC_MESSAGES/django.po +1 -1
  1368. wagtail/search/locale/ru/LC_MESSAGES/django.po +2 -1
  1369. wagtail/search/locale/sl/LC_MESSAGES/django.po +1 -1
  1370. wagtail/search/locale/sv/LC_MESSAGES/django.po +1 -1
  1371. wagtail/search/locale/tet/LC_MESSAGES/django.mo +0 -0
  1372. wagtail/search/locale/tet/LC_MESSAGES/django.po +1 -1
  1373. wagtail/search/locale/th/LC_MESSAGES/django.mo +0 -0
  1374. wagtail/search/locale/th/LC_MESSAGES/django.po +1 -1
  1375. wagtail/search/locale/tr/LC_MESSAGES/django.mo +0 -0
  1376. wagtail/search/locale/tr/LC_MESSAGES/django.po +1 -1
  1377. wagtail/search/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  1378. wagtail/search/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1379. wagtail/search/locale/ug/LC_MESSAGES/django.po +1 -1
  1380. wagtail/search/locale/uk/LC_MESSAGES/django.po +1 -1
  1381. wagtail/search/locale/vi/LC_MESSAGES/django.mo +0 -0
  1382. wagtail/search/locale/vi/LC_MESSAGES/django.po +1 -1
  1383. wagtail/search/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1384. wagtail/search/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  1385. wagtail/search/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1386. wagtail/search/migrations/0009_remove_ngram_autocomplete.py +45 -0
  1387. wagtail/search/tests/test_page_search.py +20 -1
  1388. wagtail/signals.py +4 -0
  1389. wagtail/sites/locale/ar/LC_MESSAGES/django.po +1 -1
  1390. wagtail/sites/locale/be/LC_MESSAGES/django.po +1 -1
  1391. wagtail/sites/locale/bn/LC_MESSAGES/django.mo +0 -0
  1392. wagtail/sites/locale/bn/LC_MESSAGES/django.po +1 -1
  1393. wagtail/sites/locale/ca/LC_MESSAGES/django.po +1 -1
  1394. wagtail/sites/locale/cs/LC_MESSAGES/django.po +1 -1
  1395. wagtail/sites/locale/cy/LC_MESSAGES/django.po +1 -1
  1396. wagtail/sites/locale/da/LC_MESSAGES/django.mo +0 -0
  1397. wagtail/sites/locale/da/LC_MESSAGES/django.po +1 -1
  1398. wagtail/sites/locale/de/LC_MESSAGES/django.po +1 -1
  1399. wagtail/sites/locale/dv/LC_MESSAGES/django.po +2 -1
  1400. wagtail/sites/locale/el/LC_MESSAGES/django.po +2 -1
  1401. wagtail/sites/locale/en/LC_MESSAGES/django.po +1 -1
  1402. wagtail/sites/locale/en_IN/LC_MESSAGES/django.mo +0 -0
  1403. wagtail/sites/locale/en_IN/LC_MESSAGES/django.po +1 -1
  1404. wagtail/sites/locale/es/LC_MESSAGES/django.po +1 -1
  1405. wagtail/sites/locale/es_419/LC_MESSAGES/django.mo +0 -0
  1406. wagtail/sites/locale/es_419/LC_MESSAGES/django.po +1 -1
  1407. wagtail/sites/locale/es_VE/LC_MESSAGES/django.mo +0 -0
  1408. wagtail/sites/locale/es_VE/LC_MESSAGES/django.po +1 -1
  1409. wagtail/sites/locale/et/LC_MESSAGES/django.po +1 -1
  1410. wagtail/sites/locale/fa/LC_MESSAGES/django.po +1 -1
  1411. wagtail/sites/locale/fi/LC_MESSAGES/django.po +1 -1
  1412. wagtail/sites/locale/fr/LC_MESSAGES/django.po +1 -1
  1413. wagtail/sites/locale/gl/LC_MESSAGES/django.po +1 -1
  1414. wagtail/sites/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1415. wagtail/sites/locale/hi/LC_MESSAGES/django.mo +0 -0
  1416. wagtail/sites/locale/hi/LC_MESSAGES/django.po +1 -1
  1417. wagtail/sites/locale/hr_HR/LC_MESSAGES/django.po +1 -1
  1418. wagtail/sites/locale/ht/LC_MESSAGES/django.po +1 -1
  1419. wagtail/sites/locale/hu/LC_MESSAGES/django.po +1 -1
  1420. wagtail/sites/locale/id_ID/LC_MESSAGES/django.po +1 -1
  1421. wagtail/sites/locale/is_IS/LC_MESSAGES/django.po +1 -1
  1422. wagtail/sites/locale/it/LC_MESSAGES/django.po +1 -1
  1423. wagtail/sites/locale/ja/LC_MESSAGES/django.po +1 -1
  1424. wagtail/sites/locale/ka/LC_MESSAGES/django.po +1 -1
  1425. wagtail/sites/locale/ko/LC_MESSAGES/django.po +1 -1
  1426. wagtail/sites/locale/lt/LC_MESSAGES/django.po +1 -1
  1427. wagtail/sites/locale/lv/LC_MESSAGES/django.po +1 -1
  1428. wagtail/sites/locale/mi/LC_MESSAGES/django.po +1 -1
  1429. wagtail/sites/locale/mn/LC_MESSAGES/django.po +1 -1
  1430. wagtail/sites/locale/my/LC_MESSAGES/django.po +1 -1
  1431. wagtail/sites/locale/nb/LC_MESSAGES/django.po +1 -1
  1432. wagtail/sites/locale/nl/LC_MESSAGES/django.po +1 -1
  1433. wagtail/sites/locale/pl/LC_MESSAGES/django.po +1 -1
  1434. wagtail/sites/locale/pt_BR/LC_MESSAGES/django.po +1 -1
  1435. wagtail/sites/locale/pt_PT/LC_MESSAGES/django.po +1 -1
  1436. wagtail/sites/locale/ro/LC_MESSAGES/django.po +2 -1
  1437. wagtail/sites/locale/ru/LC_MESSAGES/django.po +1 -1
  1438. wagtail/sites/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1439. wagtail/sites/locale/sl/LC_MESSAGES/django.po +1 -1
  1440. wagtail/sites/locale/sr/LC_MESSAGES/django.mo +0 -0
  1441. wagtail/sites/locale/sr/LC_MESSAGES/django.po +1 -1
  1442. wagtail/sites/locale/sv/LC_MESSAGES/django.po +1 -1
  1443. wagtail/sites/locale/ta/LC_MESSAGES/django.mo +0 -0
  1444. wagtail/sites/locale/ta/LC_MESSAGES/django.po +1 -1
  1445. wagtail/sites/locale/tet/LC_MESSAGES/django.po +1 -1
  1446. wagtail/sites/locale/th/LC_MESSAGES/django.po +1 -1
  1447. wagtail/sites/locale/tr/LC_MESSAGES/django.po +1 -1
  1448. wagtail/sites/locale/tr_TR/LC_MESSAGES/django.po +1 -1
  1449. wagtail/sites/locale/ug/LC_MESSAGES/django.po +1 -1
  1450. wagtail/sites/locale/uk/LC_MESSAGES/django.po +1 -1
  1451. wagtail/sites/locale/vi/LC_MESSAGES/django.po +1 -1
  1452. wagtail/sites/locale/zh_Hans/LC_MESSAGES/django.po +1 -1
  1453. wagtail/sites/locale/zh_Hant/LC_MESSAGES/django.po +1 -1
  1454. wagtail/snippets/blocks.py +11 -4
  1455. wagtail/snippets/bulk_actions/delete.py +9 -19
  1456. wagtail/snippets/bulk_actions/snippet_bulk_action.py +0 -1
  1457. wagtail/snippets/locale/af/LC_MESSAGES/django.po +1 -1
  1458. wagtail/snippets/locale/ar/LC_MESSAGES/django.mo +0 -0
  1459. wagtail/snippets/locale/ar/LC_MESSAGES/django.po +85 -37
  1460. wagtail/snippets/locale/az_AZ/LC_MESSAGES/django.po +1 -1
  1461. wagtail/snippets/locale/be/LC_MESSAGES/django.mo +0 -0
  1462. wagtail/snippets/locale/be/LC_MESSAGES/django.po +1 -9
  1463. wagtail/snippets/locale/bg/LC_MESSAGES/django.po +1 -1
  1464. wagtail/snippets/locale/bn/LC_MESSAGES/django.po +1 -1
  1465. wagtail/snippets/locale/ca/LC_MESSAGES/django.mo +0 -0
  1466. wagtail/snippets/locale/ca/LC_MESSAGES/django.po +1 -7
  1467. wagtail/snippets/locale/cs/LC_MESSAGES/django.mo +0 -0
  1468. wagtail/snippets/locale/cs/LC_MESSAGES/django.po +1 -9
  1469. wagtail/snippets/locale/cy/LC_MESSAGES/django.mo +0 -0
  1470. wagtail/snippets/locale/cy/LC_MESSAGES/django.po +1 -9
  1471. wagtail/snippets/locale/da/LC_MESSAGES/django.po +1 -1
  1472. wagtail/snippets/locale/de/LC_MESSAGES/django.mo +0 -0
  1473. wagtail/snippets/locale/de/LC_MESSAGES/django.po +1 -7
  1474. wagtail/snippets/locale/dv/LC_MESSAGES/django.mo +0 -0
  1475. wagtail/snippets/locale/dv/LC_MESSAGES/django.po +1 -7
  1476. wagtail/snippets/locale/el/LC_MESSAGES/django.mo +0 -0
  1477. wagtail/snippets/locale/el/LC_MESSAGES/django.po +1 -7
  1478. wagtail/snippets/locale/en/LC_MESSAGES/django.po +16 -23
  1479. wagtail/snippets/locale/en_IN/LC_MESSAGES/django.po +1 -1
  1480. wagtail/snippets/locale/es/LC_MESSAGES/django.mo +0 -0
  1481. wagtail/snippets/locale/es/LC_MESSAGES/django.po +1 -8
  1482. wagtail/snippets/locale/es_419/LC_MESSAGES/django.po +1 -1
  1483. wagtail/snippets/locale/es_VE/LC_MESSAGES/django.po +1 -1
  1484. wagtail/snippets/locale/et/LC_MESSAGES/django.mo +0 -0
  1485. wagtail/snippets/locale/et/LC_MESSAGES/django.po +1 -7
  1486. wagtail/snippets/locale/eu/LC_MESSAGES/django.po +1 -1
  1487. wagtail/snippets/locale/fa/LC_MESSAGES/django.mo +0 -0
  1488. wagtail/snippets/locale/fa/LC_MESSAGES/django.po +1 -7
  1489. wagtail/snippets/locale/fi/LC_MESSAGES/django.mo +0 -0
  1490. wagtail/snippets/locale/fi/LC_MESSAGES/django.po +1 -7
  1491. wagtail/snippets/locale/fr/LC_MESSAGES/django.mo +0 -0
  1492. wagtail/snippets/locale/fr/LC_MESSAGES/django.po +1 -8
  1493. wagtail/snippets/locale/gl/LC_MESSAGES/django.mo +0 -0
  1494. wagtail/snippets/locale/gl/LC_MESSAGES/django.po +1 -7
  1495. wagtail/snippets/locale/he_IL/LC_MESSAGES/django.po +1 -1
  1496. wagtail/snippets/locale/hi/LC_MESSAGES/django.po +1 -1
  1497. wagtail/snippets/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  1498. wagtail/snippets/locale/hr_HR/LC_MESSAGES/django.po +1 -8
  1499. wagtail/snippets/locale/ht/LC_MESSAGES/django.po +1 -1
  1500. wagtail/snippets/locale/hu/LC_MESSAGES/django.mo +0 -0
  1501. wagtail/snippets/locale/hu/LC_MESSAGES/django.po +9 -9
  1502. wagtail/snippets/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  1503. wagtail/snippets/locale/id_ID/LC_MESSAGES/django.po +1 -6
  1504. wagtail/snippets/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  1505. wagtail/snippets/locale/is_IS/LC_MESSAGES/django.po +7 -7
  1506. wagtail/snippets/locale/it/LC_MESSAGES/django.mo +0 -0
  1507. wagtail/snippets/locale/it/LC_MESSAGES/django.po +7 -8
  1508. wagtail/snippets/locale/ja/LC_MESSAGES/django.mo +0 -0
  1509. wagtail/snippets/locale/ja/LC_MESSAGES/django.po +1 -6
  1510. wagtail/snippets/locale/ka/LC_MESSAGES/django.po +1 -1
  1511. wagtail/snippets/locale/ko/LC_MESSAGES/django.mo +0 -0
  1512. wagtail/snippets/locale/ko/LC_MESSAGES/django.po +1 -6
  1513. wagtail/snippets/locale/lt/LC_MESSAGES/django.mo +0 -0
  1514. wagtail/snippets/locale/lt/LC_MESSAGES/django.po +1 -9
  1515. wagtail/snippets/locale/lv/LC_MESSAGES/django.po +1 -1
  1516. wagtail/snippets/locale/mi/LC_MESSAGES/django.mo +0 -0
  1517. wagtail/snippets/locale/mi/LC_MESSAGES/django.po +1 -7
  1518. wagtail/snippets/locale/mn/LC_MESSAGES/django.mo +0 -0
  1519. wagtail/snippets/locale/mn/LC_MESSAGES/django.po +1 -7
  1520. wagtail/snippets/locale/my/LC_MESSAGES/django.po +1 -1
  1521. wagtail/snippets/locale/nb/LC_MESSAGES/django.mo +0 -0
  1522. wagtail/snippets/locale/nb/LC_MESSAGES/django.po +1 -7
  1523. wagtail/snippets/locale/nl/LC_MESSAGES/django.mo +0 -0
  1524. wagtail/snippets/locale/nl/LC_MESSAGES/django.po +1 -7
  1525. wagtail/snippets/locale/pl/LC_MESSAGES/django.mo +0 -0
  1526. wagtail/snippets/locale/pl/LC_MESSAGES/django.po +1 -9
  1527. wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  1528. wagtail/snippets/locale/pt_BR/LC_MESSAGES/django.po +1 -8
  1529. wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  1530. wagtail/snippets/locale/pt_PT/LC_MESSAGES/django.po +1 -8
  1531. wagtail/snippets/locale/ro/LC_MESSAGES/django.mo +0 -0
  1532. wagtail/snippets/locale/ro/LC_MESSAGES/django.po +1 -8
  1533. wagtail/snippets/locale/ru/LC_MESSAGES/django.mo +0 -0
  1534. wagtail/snippets/locale/ru/LC_MESSAGES/django.po +1 -9
  1535. wagtail/snippets/locale/sk_SK/LC_MESSAGES/django.po +1 -1
  1536. wagtail/snippets/locale/sl/LC_MESSAGES/django.mo +0 -0
  1537. wagtail/snippets/locale/sl/LC_MESSAGES/django.po +1 -9
  1538. wagtail/snippets/locale/sr/LC_MESSAGES/django.mo +0 -0
  1539. wagtail/snippets/locale/sr/LC_MESSAGES/django.po +1 -1
  1540. wagtail/snippets/locale/sv/LC_MESSAGES/django.mo +0 -0
  1541. wagtail/snippets/locale/sv/LC_MESSAGES/django.po +1 -7
  1542. wagtail/snippets/locale/ta/LC_MESSAGES/django.po +1 -1
  1543. wagtail/snippets/locale/tet/LC_MESSAGES/django.mo +0 -0
  1544. wagtail/snippets/locale/tet/LC_MESSAGES/django.po +1 -6
  1545. wagtail/snippets/locale/th/LC_MESSAGES/django.mo +0 -0
  1546. wagtail/snippets/locale/th/LC_MESSAGES/django.po +1 -6
  1547. wagtail/snippets/locale/tr/LC_MESSAGES/django.mo +0 -0
  1548. wagtail/snippets/locale/tr/LC_MESSAGES/django.po +1 -7
  1549. wagtail/snippets/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  1550. wagtail/snippets/locale/tr_TR/LC_MESSAGES/django.po +1 -7
  1551. wagtail/snippets/locale/ug/LC_MESSAGES/django.mo +0 -0
  1552. wagtail/snippets/locale/ug/LC_MESSAGES/django.po +1 -7
  1553. wagtail/snippets/locale/uk/LC_MESSAGES/django.mo +0 -0
  1554. wagtail/snippets/locale/uk/LC_MESSAGES/django.po +1 -9
  1555. wagtail/snippets/locale/vi/LC_MESSAGES/django.mo +0 -0
  1556. wagtail/snippets/locale/vi/LC_MESSAGES/django.po +1 -6
  1557. wagtail/snippets/locale/zh/LC_MESSAGES/django.po +1 -1
  1558. wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  1559. wagtail/snippets/locale/zh_Hans/LC_MESSAGES/django.po +1 -6
  1560. wagtail/snippets/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  1561. wagtail/snippets/locale/zh_Hant/LC_MESSAGES/django.po +1 -6
  1562. wagtail/snippets/templates/wagtailsnippets/bulk_actions/confirm_bulk_delete.html +11 -8
  1563. wagtail/snippets/tests/test_bulk_actions/test_bulk_delete.py +86 -2
  1564. wagtail/snippets/tests/test_preview.py +34 -0
  1565. wagtail/snippets/tests/test_snippets.py +66 -8
  1566. wagtail/snippets/tests/test_viewset.py +28 -4
  1567. wagtail/snippets/tests/test_workflows.py +8 -6
  1568. wagtail/snippets/views/snippets.py +21 -13
  1569. wagtail/snippets/widgets.py +14 -4
  1570. wagtail/telepath.py +18 -74
  1571. wagtail/test/customuser/models.py +14 -1
  1572. wagtail/test/demosite/models.py +14 -14
  1573. wagtail/test/settings.py +1 -0
  1574. wagtail/test/testapp/migrations/0001_squashed_0073_revisablechildmodel_secret_text.py +7 -7
  1575. wagtail/test/testapp/migrations/0025_alter_importantpagesgenericsetting_options.py +2 -2
  1576. wagtail/test/testapp/migrations/0038_sociallink.py +2 -2
  1577. wagtail/test/testapp/migrations/0052_variousondeletemodel_protected_page_and_user.py +39 -0
  1578. wagtail/test/testapp/migrations/0053_pagewithexcludedcopyfield_special_stream_and_more.py +57 -0
  1579. wagtail/test/testapp/migrations/0054_delete_notyetregisteredgenericsetting_and_more.py +19 -0
  1580. wagtail/test/testapp/migrations/0055_previewable_settings.py +62 -0
  1581. wagtail/test/testapp/models.py +72 -34
  1582. wagtail/test/testapp/templates/tests/custom_button.html +9 -0
  1583. wagtail/test/testapp/templates/tests/previewable_model.html +2 -0
  1584. wagtail/test/testapp/templates/tests/previewable_setting.html +17 -0
  1585. wagtail/test/testapp/views.py +37 -0
  1586. wagtail/test/testapp/wagtail_hooks.py +6 -0
  1587. wagtail/test/urls.py +1 -1
  1588. wagtail/test/utils/wagtail_tests.py +3 -1
  1589. wagtail/tests/permission_policies/__init__.py +0 -0
  1590. wagtail/tests/{test_collection_permission_policies.py → permission_policies/test_collection_permission_policies.py} +3 -1
  1591. wagtail/tests/{test_page_permission_policies.py → permission_policies/test_page_permission_policies.py} +3 -1
  1592. wagtail/tests/permission_policies/test_site_permission_policies.py +284 -0
  1593. wagtail/tests/test_blocks.py +286 -0
  1594. wagtail/tests/test_date_validators.py +68 -0
  1595. wagtail/tests/test_page_model.py +56 -13
  1596. wagtail/tests/test_reference_index.py +352 -0
  1597. wagtail/tests/test_revision_model.py +30 -11
  1598. wagtail/tests/test_rich_text.py +35 -21
  1599. wagtail/tests/test_streamfield.py +14 -0
  1600. wagtail/tests/test_workflow.py +5 -8
  1601. wagtail/tests/tests.py +92 -0
  1602. wagtail/users/locale/ar/LC_MESSAGES/django.mo +0 -0
  1603. wagtail/users/locale/ar/LC_MESSAGES/django.po +310 -60
  1604. wagtail/users/locale/be/LC_MESSAGES/django.mo +0 -0
  1605. wagtail/users/locale/be/LC_MESSAGES/django.po +1 -7
  1606. wagtail/users/locale/bg/LC_MESSAGES/django.mo +0 -0
  1607. wagtail/users/locale/bg/LC_MESSAGES/django.po +1 -4
  1608. wagtail/users/locale/bn/LC_MESSAGES/django.po +1 -1
  1609. wagtail/users/locale/ca/LC_MESSAGES/django.mo +0 -0
  1610. wagtail/users/locale/ca/LC_MESSAGES/django.po +9 -9
  1611. wagtail/users/locale/cs/LC_MESSAGES/django.mo +0 -0
  1612. wagtail/users/locale/cs/LC_MESSAGES/django.po +1 -7
  1613. wagtail/users/locale/cy/LC_MESSAGES/django.mo +0 -0
  1614. wagtail/users/locale/cy/LC_MESSAGES/django.po +1 -7
  1615. wagtail/users/locale/da/LC_MESSAGES/django.mo +0 -0
  1616. wagtail/users/locale/da/LC_MESSAGES/django.po +1 -4
  1617. wagtail/users/locale/de/LC_MESSAGES/django.mo +0 -0
  1618. wagtail/users/locale/de/LC_MESSAGES/django.po +4 -7
  1619. wagtail/users/locale/dv/LC_MESSAGES/django.mo +0 -0
  1620. wagtail/users/locale/dv/LC_MESSAGES/django.po +1 -4
  1621. wagtail/users/locale/el/LC_MESSAGES/django.mo +0 -0
  1622. wagtail/users/locale/el/LC_MESSAGES/django.po +1 -7
  1623. wagtail/users/locale/en/LC_MESSAGES/django.po +38 -39
  1624. wagtail/users/locale/es/LC_MESSAGES/django.mo +0 -0
  1625. wagtail/users/locale/es/LC_MESSAGES/django.po +1 -7
  1626. wagtail/users/locale/es_419/LC_MESSAGES/django.po +1 -1
  1627. wagtail/users/locale/et/LC_MESSAGES/django.mo +0 -0
  1628. wagtail/users/locale/et/LC_MESSAGES/django.po +1 -7
  1629. wagtail/users/locale/eu/LC_MESSAGES/django.mo +0 -0
  1630. wagtail/users/locale/eu/LC_MESSAGES/django.po +1 -4
  1631. wagtail/users/locale/fa/LC_MESSAGES/django.mo +0 -0
  1632. wagtail/users/locale/fa/LC_MESSAGES/django.po +1 -7
  1633. wagtail/users/locale/fi/LC_MESSAGES/django.mo +0 -0
  1634. wagtail/users/locale/fi/LC_MESSAGES/django.po +4 -7
  1635. wagtail/users/locale/fr/LC_MESSAGES/django.mo +0 -0
  1636. wagtail/users/locale/fr/LC_MESSAGES/django.po +9 -9
  1637. wagtail/users/locale/gl/LC_MESSAGES/django.mo +0 -0
  1638. wagtail/users/locale/gl/LC_MESSAGES/django.po +9 -9
  1639. wagtail/users/locale/he_IL/LC_MESSAGES/django.mo +0 -0
  1640. wagtail/users/locale/he_IL/LC_MESSAGES/django.po +1 -7
  1641. wagtail/users/locale/hr_HR/LC_MESSAGES/django.mo +0 -0
  1642. wagtail/users/locale/hr_HR/LC_MESSAGES/django.po +1 -7
  1643. wagtail/users/locale/hu/LC_MESSAGES/django.mo +0 -0
  1644. wagtail/users/locale/hu/LC_MESSAGES/django.po +8 -8
  1645. wagtail/users/locale/hy/LC_MESSAGES/django.po +1 -1
  1646. wagtail/users/locale/id_ID/LC_MESSAGES/django.mo +0 -0
  1647. wagtail/users/locale/id_ID/LC_MESSAGES/django.po +1 -7
  1648. wagtail/users/locale/is_IS/LC_MESSAGES/django.mo +0 -0
  1649. wagtail/users/locale/is_IS/LC_MESSAGES/django.po +4 -7
  1650. wagtail/users/locale/it/LC_MESSAGES/django.mo +0 -0
  1651. wagtail/users/locale/it/LC_MESSAGES/django.po +4 -7
  1652. wagtail/users/locale/ja/LC_MESSAGES/django.mo +0 -0
  1653. wagtail/users/locale/ja/LC_MESSAGES/django.po +1 -7
  1654. wagtail/users/locale/ka/LC_MESSAGES/django.mo +0 -0
  1655. wagtail/users/locale/ka/LC_MESSAGES/django.po +1 -4
  1656. wagtail/users/locale/ko/LC_MESSAGES/django.mo +0 -0
  1657. wagtail/users/locale/ko/LC_MESSAGES/django.po +1 -7
  1658. wagtail/users/locale/lt/LC_MESSAGES/django.mo +0 -0
  1659. wagtail/users/locale/lt/LC_MESSAGES/django.po +1 -7
  1660. wagtail/users/locale/lv/LC_MESSAGES/django.mo +0 -0
  1661. wagtail/users/locale/lv/LC_MESSAGES/django.po +1 -4
  1662. wagtail/users/locale/mi/LC_MESSAGES/django.mo +0 -0
  1663. wagtail/users/locale/mi/LC_MESSAGES/django.po +1 -4
  1664. wagtail/users/locale/mn/LC_MESSAGES/django.mo +0 -0
  1665. wagtail/users/locale/mn/LC_MESSAGES/django.po +1 -7
  1666. wagtail/users/locale/my/LC_MESSAGES/django.mo +0 -0
  1667. wagtail/users/locale/my/LC_MESSAGES/django.po +1 -7
  1668. wagtail/users/locale/nb/LC_MESSAGES/django.mo +0 -0
  1669. wagtail/users/locale/nb/LC_MESSAGES/django.po +1 -7
  1670. wagtail/users/locale/nl/LC_MESSAGES/django.mo +0 -0
  1671. wagtail/users/locale/nl/LC_MESSAGES/django.po +4 -7
  1672. wagtail/users/locale/pl/LC_MESSAGES/django.mo +0 -0
  1673. wagtail/users/locale/pl/LC_MESSAGES/django.po +4 -7
  1674. wagtail/users/locale/pt_BR/LC_MESSAGES/django.mo +0 -0
  1675. wagtail/users/locale/pt_BR/LC_MESSAGES/django.po +4 -7
  1676. wagtail/users/locale/pt_PT/LC_MESSAGES/django.mo +0 -0
  1677. wagtail/users/locale/pt_PT/LC_MESSAGES/django.po +1 -7
  1678. wagtail/users/locale/ro/LC_MESSAGES/django.mo +0 -0
  1679. wagtail/users/locale/ro/LC_MESSAGES/django.po +4 -7
  1680. wagtail/users/locale/ru/LC_MESSAGES/django.mo +0 -0
  1681. wagtail/users/locale/ru/LC_MESSAGES/django.po +4 -7
  1682. wagtail/users/locale/sk_SK/LC_MESSAGES/django.mo +0 -0
  1683. wagtail/users/locale/sk_SK/LC_MESSAGES/django.po +1 -7
  1684. wagtail/users/locale/sl/LC_MESSAGES/django.mo +0 -0
  1685. wagtail/users/locale/sl/LC_MESSAGES/django.po +4 -7
  1686. wagtail/users/locale/sv/LC_MESSAGES/django.mo +0 -0
  1687. wagtail/users/locale/sv/LC_MESSAGES/django.po +4 -7
  1688. wagtail/users/locale/tet/LC_MESSAGES/django.mo +0 -0
  1689. wagtail/users/locale/tet/LC_MESSAGES/django.po +1 -7
  1690. wagtail/users/locale/th/LC_MESSAGES/django.mo +0 -0
  1691. wagtail/users/locale/th/LC_MESSAGES/django.po +1 -7
  1692. wagtail/users/locale/tr/LC_MESSAGES/django.mo +0 -0
  1693. wagtail/users/locale/tr/LC_MESSAGES/django.po +1 -7
  1694. wagtail/users/locale/tr_TR/LC_MESSAGES/django.mo +0 -0
  1695. wagtail/users/locale/tr_TR/LC_MESSAGES/django.po +1 -7
  1696. wagtail/users/locale/ug/LC_MESSAGES/django.mo +0 -0
  1697. wagtail/users/locale/ug/LC_MESSAGES/django.po +4 -7
  1698. wagtail/users/locale/uk/LC_MESSAGES/django.mo +0 -0
  1699. wagtail/users/locale/uk/LC_MESSAGES/django.po +4 -7
  1700. wagtail/users/locale/vi/LC_MESSAGES/django.mo +0 -0
  1701. wagtail/users/locale/vi/LC_MESSAGES/django.po +1 -4
  1702. wagtail/users/locale/zh/LC_MESSAGES/django.mo +0 -0
  1703. wagtail/users/locale/zh/LC_MESSAGES/django.po +1 -4
  1704. wagtail/users/locale/zh_Hans/LC_MESSAGES/django.mo +0 -0
  1705. wagtail/users/locale/zh_Hans/LC_MESSAGES/django.po +4 -7
  1706. wagtail/users/locale/zh_Hant/LC_MESSAGES/django.mo +0 -0
  1707. wagtail/users/locale/zh_Hant/LC_MESSAGES/django.po +1 -7
  1708. wagtail/users/migrations/0015_userprofile_keyboard_shortcuts.py +22 -0
  1709. wagtail/users/models.py +6 -0
  1710. wagtail/users/templates/wagtailusers/bulk_actions/confirm_bulk_delete.html +6 -2
  1711. wagtail/users/templates/wagtailusers/users/confirm_delete.html +0 -9
  1712. wagtail/users/templates/wagtailusers/users/create.html +5 -3
  1713. wagtail/users/templates/wagtailusers/users/edit.html +4 -2
  1714. wagtail/users/tests/test_admin_views.py +268 -15
  1715. wagtail/users/tests/test_bulk_actions/test_bulk_delete.py +117 -10
  1716. wagtail/users/views/bulk_actions/delete.py +9 -1
  1717. wagtail/users/views/bulk_actions/user_bulk_action.py +15 -6
  1718. wagtail/users/views/users.py +57 -66
  1719. wagtail/users/widgets.py +13 -3
  1720. wagtail/widget_adapters.py +16 -80
  1721. {wagtail-7.0.1.dist-info → wagtail-7.1.dist-info}/METADATA +4 -6
  1722. {wagtail-7.0.1.dist-info → wagtail-7.1.dist-info}/RECORD +1727 -1700
  1723. wagtail/admin/templates/wagtailadmin/pages/listing/_dropdown_items.html +0 -10
  1724. wagtail/contrib/settings/permissions.py +0 -3
  1725. wagtail/contrib/settings/tests/generic/test_register.py +0 -24
  1726. wagtail/contrib/settings/tests/site_specific/test_register.py +0 -24
  1727. /wagtail/tests/{test_permission_policies.py → permission_policies/test_permission_policies.py} +0 -0
  1728. {wagtail-7.0.1.dist-info → wagtail-7.1.dist-info}/WHEEL +0 -0
  1729. {wagtail-7.0.1.dist-info → wagtail-7.1.dist-info}/entry_points.txt +0 -0
  1730. {wagtail-7.0.1.dist-info → wagtail-7.1.dist-info}/licenses/LICENSE +0 -0
  1731. {wagtail-7.0.1.dist-info → wagtail-7.1.dist-info}/top_level.txt +0 -0
@@ -1 +1 @@
1
- .c-sf-add-button{align-items:center;appearance:none;background-color:var(--w-color-surface-page);color:var(--w-color-text-button-outline-default);cursor:pointer;display:grid;height:1.5rem;justify-content:center;margin-inline-start:calc(-1px + -.25rem);padding:0;width:1.5rem}.c-sf-add-button .icon{border:1px solid;border-radius:100%;height:1rem;padding:.125rem;transition:transform .3s ease;width:1rem}.c-sf-add-button[aria-expanded=true] .icon{transform:rotate(45deg)}.c-sf-add-button:focus-visible .icon,.c-sf-add-button:hover .icon{background-color:var(--w-color-text-button-outline-hover);color:var(--w-color-surface-page)}.c-sf-add-button[disabled]{opacity:.2}@media (forced-colors:active){.c-sf-add-button[disabled]{color:GrayText}}[aria-expanded=true]+.w-panel__heading .c-sf-block__title{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}[aria-expanded=false]+.w-panel__heading .c-sf-block__title:not(:empty)+.c-sf-block__type{display:none}.c-sf-help .help{margin-bottom:1rem;margin-top:0}
1
+ .c-sf-add-button{align-items:center;appearance:none;background-color:var(--w-color-surface-page);color:var(--w-color-text-button-outline-default);cursor:pointer;display:grid;height:1.5rem;justify-content:center;margin-inline-start:calc(-1px + -.25rem);padding:0;width:1.5rem}.c-sf-add-button .icon{border:1px solid;border-radius:100%;height:1rem;padding:.125rem;transition:transform .3s ease;width:1rem}.c-sf-add-button[aria-expanded=true] .icon{transform:rotate(45deg)}.c-sf-add-button:focus-visible .icon,.c-sf-add-button:hover .icon{background-color:var(--w-color-text-button-outline-hover);color:var(--w-color-surface-page)}.c-sf-add-button[disabled]{opacity:.2}@media (forced-colors:active){.c-sf-add-button[disabled]{color:GrayText}}.c-sf-block__title{color:var(--w-color-text-meta);font-size:.875rem;font-weight:400;line-height:1.3}[aria-expanded=true]+.w-panel__heading .c-sf-block__title{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.c-sf-help .help{margin-bottom:1rem;margin-top:0}
@@ -1 +1 @@
1
- (()=>{"use strict";var e,t={9786:(e,t,n)=>{var o=n(2833),r=n(2427),s=n.n(r),c=n(6931),a=n.n(c);function i(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=()=>Math.random().toString(36).substring(7).split("").join("."),u={INIT:`@@redux/INIT${m()}`,REPLACE:`@@redux/REPLACE${m()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${m()}`};function d(e,t,n){if("function"!=typeof e)throw new Error(i(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(i(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(i(1));return n(d)(e,t)}let o=e,r=t,s=new Map,c=s,a=0,m=!1;function p(){c===s&&(c=new Map,s.forEach(((e,t)=>{c.set(t,e)})))}function f(){if(m)throw new Error(i(3));return r}function h(e){if("function"!=typeof e)throw new Error(i(4));if(m)throw new Error(i(5));let t=!0;p();const n=a++;return c.set(n,e),function(){if(t){if(m)throw new Error(i(6));t=!1,p(),c.delete(n),s=null}}}function y(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(i(7));if(void 0===e.type)throw new Error(i(8));if("string"!=typeof e.type)throw new Error(i(17));if(m)throw new Error(i(9));try{m=!0,r=o(r,e)}finally{m=!1}return(s=c).forEach((e=>{e()})),e}return y({type:u.INIT}),{dispatch:y,subscribe:h,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw new Error(i(10));o=e,y({type:u.REPLACE})},[l]:function(){const e=h;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(i(11));function n(){const e=t;e.next&&e.next(f())}return n(),{unsubscribe:e(n)}},[l](){return this}}}}}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 s=t,c=!0;for(;c;){c=!1;const e=[];let t=null;for(const o of s)t&&t.position+t.height+20>o.position?(c=!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);s=e}s.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 _(){return h+=1,h}function b(){return y+=1,y}var g=Symbol.for("immer-nothing"),v=Symbol.for("immer-draftable"),E=Symbol.for("immer-state");function C(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var w=Object.getPrototypeOf;function I(e){return!!e&&!!e[E]}function N(e){return!!e&&(P(e)||Array.isArray(e)||!!e[v]||!!e.constructor?.[v]||D(e)||R(e))}var x=Object.prototype.constructor.toString();function P(e){if(!e||"object"!=typeof e)return!1;const t=w(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===x}function A(e,t){0===S(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,o)=>t(o,n,e)))}function S(e){const t=e[E];return t?t.type_:Array.isArray(e)?1:D(e)?2:R(e)?3:0}function F(e,t){return 2===S(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function k(e,t,n){const o=S(e);2===o?e.set(t,n):3===o?e.add(n):e[t]=n}function D(e){return e instanceof Map}function R(e){return e instanceof Set}function O(e){return e.copy_||e.base_}function T(e,t){if(D(e))return new Map(e);if(R(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=P(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[E];let n=Reflect.ownKeys(t);for(let o=0;o<n.length;o++){const r=n[o],s=t[r];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[r]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[r]})}return Object.create(w(e),t)}{const t=w(e);if(null!==t&&n)return{...e};const o=Object.create(t);return Object.assign(o,e)}}function M(e,t=!1){return z(e)||I(e)||!N(e)||(S(e)>1&&(e.set=e.add=e.clear=e.delete=j),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>M(t,!0)))),e}function j(){C(2)}function z(e){return Object.isFrozen(e)}var L,$={};function U(e){const t=$[e];return t||C(0),t}function H(){return L}function q(e,t){t&&(U("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function W(e){K(e),e.drafts_.forEach(B),e.drafts_=null}function K(e){e===L&&(L=e.parent_)}function V(e){return L={drafts_:[],parent_:L,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function B(e){const t=e[E];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function X(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[E].modified_&&(W(t),C(4)),N(e)&&(e=J(t,e),t.parent_||G(t,e)),t.patches_&&U("Patches").generateReplacementPatches_(n[E].base_,e,t.patches_,t.inversePatches_)):e=J(t,n,[]),W(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==g?e:void 0}function J(e,t,n){if(z(t))return t;const o=t[E];if(!o)return A(t,((r,s)=>Y(e,o,t,r,s,n))),t;if(o.scope_!==e)return t;if(!o.modified_)return G(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let r=t,s=!1;3===o.type_&&(r=new Set(t),t.clear(),s=!0),A(r,((r,c)=>Y(e,o,t,r,c,n,s))),G(e,t,!1),n&&e.patches_&&U("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function Y(e,t,n,o,r,s,c){if(I(r)){const c=J(e,r,s&&t&&3!==t.type_&&!F(t.assigned_,o)?s.concat(o):void 0);if(k(n,o,c),!I(c))return;e.canAutoFreeze_=!1}else c&&n.add(r);if(N(r)&&!z(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;J(e,r),t&&t.scope_.parent_||"symbol"==typeof o||!Object.prototype.propertyIsEnumerable.call(n,o)||G(e,r)}}function G(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&M(t,n)}var Q={get(e,t){if(t===E)return e;const n=O(e);if(!F(n,t))return function(e,t,n){const o=te(t,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}(e,n,t);const o=n[t];return e.finalized_||!N(o)?o:o===ee(e.base_,t)?(oe(e),e.copy_[t]=re(o,e)):o},has:(e,t)=>t in O(e),ownKeys:e=>Reflect.ownKeys(O(e)),set(e,t,n){const o=te(O(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const o=ee(O(e),t),c=o?.[E];if(c&&c.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((r=n)===(s=o)?0!==r||1/r==1/s:r!=r&&s!=s)&&(void 0!==n||F(e.base_,t)))return!0;oe(e),ne(e)}var r,s;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==ee(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,oe(e),ne(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=O(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},defineProperty(){C(11)},getPrototypeOf:e=>w(e.base_),setPrototypeOf(){C(12)}},Z={};function ee(e,t){const n=e[E];return(n?O(n):e)[t]}function te(e,t){if(!(t in e))return;let n=w(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=w(n)}}function ne(e){e.modified_||(e.modified_=!0,e.parent_&&ne(e.parent_))}function oe(e){e.copy_||(e.copy_=T(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function re(e,t){const n=D(e)?U("MapSet").proxyMap_(e,t):R(e)?U("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),o={type_:n?1:0,scope_:t?t.scope_:H(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=o,s=Q;n&&(r=[o],s=Z);const{revoke:c,proxy:a}=Proxy.revocable(r,s);return o.draft_=a,o.revoke_=c,a}(e,t);return(t?t.scope_:H()).drafts_.push(n),n}function se(e){if(!N(e)||z(e))return e;const t=e[E];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=T(e,t.scope_.immer_.useStrictShallowCopy_)}else n=T(e,!0);return A(n,((e,t)=>{k(n,e,se(t))})),t&&(t.finalized_=!1),n}A(Q,((e,t)=>{Z[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Z.deleteProperty=function(e,t){return Z.set.call(this,e,t,void 0)},Z.set=function(e,t,n){return Q.set.call(this,e[0],t,n,e[0])};var ce=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const o=this;return function(e=n,...r){return o.produce(e,(e=>t.call(this,e,...r)))}}let o;if("function"!=typeof t&&C(6),void 0!==n&&"function"!=typeof n&&C(7),N(e)){const r=V(this),s=re(e,void 0);let c=!0;try{o=t(s),c=!1}finally{c?W(r):K(r)}return q(r,n),X(o,r)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===g&&(o=void 0),this.autoFreeze_&&M(o,!0),n){const t=[],r=[];U("Patches").generateReplacementPatches_(e,o,t,r),n(t,r)}return o}C(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,o;return[this.produce(e,t,((e,t)=>{n=e,o=t})),n,o]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;N(e)||C(8),I(e)&&(I(t=e)||C(10),e=se(t));const n=V(this),o=re(e,void 0);return o[E].isManual_=!0,K(n),o}finishDraft(e,t){const n=e&&e[E];n&&n.isManual_||C(9);const{scope_:o}=n;return q(o,t),X(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));const o=U("Patches").applyPatches_;return I(e)?o(e,t):this.produce(e,(e=>o(e,t)))}},ae=ce.produce;ce.produceWithPatches.bind(ce),ce.setAutoFreeze.bind(ce),ce.setUseStrictShallowCopy.bind(ce),ce.applyPatches.bind(ce),ce.createDraft.bind(ce),ce.finishDraft.bind(ce);const ie="add-comment",le="update-comment",me="delete-comment",ue="resolve-comment",de="set-focused-comment",pe="add-reply",fe="update-reply",he="delete-reply",ye="invalidate-content-path";function _e(e){return{type:ie,comment:e}}function be(e,t){return{type:le,commentId:e,update:t}}function ge(e){return{type:me,commentId:e}}function ve(e){return{type:ue,commentId:e}}function Ee(e,{updatePinnedComment:t,forceFocus:n}={updatePinnedComment:!1,forceFocus:!1}){return{type:de,commentId:e,updatePinnedComment:t,forceFocus:n}}function Ce(e,t){return{type:pe,commentId:e,reply:t}}function we(e,t,n){return{type:fe,commentId:e,replyId:t,update:n}}function Ie(e,t){return{type:he,commentId:e,replyId:t}}function Ne(e){return{type:ye,contentPath:e}}const xe={addComment:_e,updateComment:be,deleteComment:ge,resolveComment:ve,setFocusedComment:Ee,addReply:Ce,updateReply:we,deleteReply:Ie,invalidateContentPath:Ne};function Pe(e,t,n,{remoteId:o=null,mode:r="default",text:s="",deleted:c=!1}){return{localId:e,remoteId:o,mode:r,author:t,date:n,text:s,originalText:s,newText:"",deleted:c}}function Ae(e,t,n,o,r,s,{remoteId:c=null,mode:a="default",text:i="",resolved:l=!1,deleted:m=!1,replies:u=new Map}){return{contentpath:e,position:t,localId:n,annotation:o,remoteId:c,mode:a,author:r,date:s,text:i,originalText:i,replies:u,newReply:"",newText:"",deleted:m,resolved:l,remoteReplyCount:Array.from(u.values()).reduce(((e,t)=>null!==t.remoteId?e+1:e),0)}}!function(){class e extends Map{constructor(e,t){super(),this[E]={type_:2,parent_:t,scope_:t?t.scope_:H(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:e,draft_:this,isManual_:!1,revoked_:!1}}get size(){return O(this[E]).size}has(e){return O(this[E]).has(e)}set(e,n){const o=this[E];return r(o),O(o).has(e)&&O(o).get(e)===n||(t(o),ne(o),o.assigned_.set(e,!0),o.copy_.set(e,n),o.assigned_.set(e,!0)),this}delete(e){if(!this.has(e))return!1;const n=this[E];return r(n),t(n),ne(n),n.base_.has(e)?n.assigned_.set(e,!1):n.assigned_.delete(e),n.copy_.delete(e),!0}clear(){const e=this[E];r(e),O(e).size&&(t(e),ne(e),e.assigned_=new Map,A(e.base_,(t=>{e.assigned_.set(t,!1)})),e.copy_.clear())}forEach(e,t){O(this[E]).forEach(((n,o,r)=>{e.call(t,this.get(o),o,this)}))}get(e){const n=this[E];r(n);const o=O(n).get(e);if(n.finalized_||!N(o))return o;if(o!==n.base_.get(e))return o;const s=re(o,n);return t(n),n.copy_.set(e,s),s}keys(){return O(this[E]).keys()}values(){const e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){const e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const t=e.next();if(t.done)return t;const n=this.get(t.value);return{done:!1,value:[t.value,n]}}}}[Symbol.iterator](){return this.entries()}}function t(e){e.copy_||(e.assigned_=new Map,e.copy_=new Map(e.base_))}class n extends Set{constructor(e,t){super(),this[E]={type_:3,parent_:t,scope_:t?t.scope_:H(),modified_:!1,finalized_:!1,copy_:void 0,base_:e,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return O(this[E]).size}has(e){const t=this[E];return r(t),t.copy_?!!t.copy_.has(e)||!(!t.drafts_.has(e)||!t.copy_.has(t.drafts_.get(e))):t.base_.has(e)}add(e){const t=this[E];return r(t),this.has(e)||(o(t),ne(t),t.copy_.add(e)),this}delete(e){if(!this.has(e))return!1;const t=this[E];return r(t),o(t),ne(t),t.copy_.delete(e)||!!t.drafts_.has(e)&&t.copy_.delete(t.drafts_.get(e))}clear(){const e=this[E];r(e),O(e).size&&(o(e),ne(e),e.copy_.clear())}values(){const e=this[E];return r(e),o(e),e.copy_.values()}entries(){const e=this[E];return r(e),o(e),e.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(e,t){const n=this.values();let o=n.next();for(;!o.done;)e.call(t,o.value,o.value,this),o=n.next()}}function o(e){e.copy_||(e.copy_=new Set,e.base_.forEach((t=>{if(N(t)){const n=re(t,e);e.drafts_.set(t,n),e.copy_.add(n)}else e.copy_.add(t)})))}function r(e){e.revoked_&&C(3,JSON.stringify(O(e)))}var s,c;c={proxyMap_:function(t,n){return new e(t,n)},proxySet_:function(e,t){return new n(e,t)}},$[s="MapSet"]||($[s]=c)}();const Se={comments:new Map,forceFocus:!1,focusedComment:null,pinnedComment:null,remoteCommentCount:0},Fe=ae(((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 ie:e.comments.set(t.comment.localId,t.comment),t.comment.remoteId&&(e.remoteCommentCount+=1);break;case le:{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 me:{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 ue:{const o=e.comments.get(t.commentId);if(!o)break;n(o);break}case de:(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 fe:{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 he:{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 ye:{const o=e.comments;for(const e of o.values())e.contentpath.startsWith(t.contentPath)&&n(e);break}}}),Se),ke="update-global-settings";function De(e){return{type:ke,update:e}}const Re={user:null,currentTab:null},Oe=function(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const r=t[o];"function"==typeof e[r]&&(n[r]=e[r])}const o=Object.keys(n);let r;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:u.INIT}))throw new Error(i(12));if(void 0===n(void 0,{type:u.PROBE_UNKNOWN_ACTION()}))throw new Error(i(13))}))}(n)}catch(e){r=e}return function(e={},t){if(r)throw r;let s=!1;const c={};for(let r=0;r<o.length;r++){const a=o[r],l=n[a],m=e[a],u=l(m,t);if(void 0===u)throw t&&t.type,new Error(i(14));c[a]=u,s=s||u!==m}return s=s||o.length!==Object.keys(e).length,s?c:e}}({comments:Fe,settings:ae(((e,t)=>{t.type===ke&&Object.assign(e,t.update)}),Re)});var Te=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var Me="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}},je=0,ze=1;function Le(){return{s:je,v:void 0,o:null,p:null}}function $e(e,t={}){let n=Le();const{resultEqualityCheck:o}=t;let r,s=0;function c(){let t=n;const{length:c}=arguments;for(let e=0,n=c;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const o=e.get(n);void 0===o?(t=Le(),e.set(n,t)):t=o}else{let e=t.p;null===e&&(t.p=e=new Map);const o=e.get(n);void 0===o?(t=Le(),e.set(n,t)):t=o}}const a=t;let i;if(t.s===ze)i=t.v;else if(i=e.apply(null,arguments),s++,o){const e=r?.deref?.()??r;null!=e&&o(e,i)&&(i=e,0!==s&&s--),r="object"==typeof i&&null!==i||"function"==typeof i?new Me(i):i}return a.s=ze,a.v=i,i}return c.clearCache=()=>{n=Le(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}function Ue(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,o=(...e)=>{let t,o=0,r=0,s={},c=e.pop();"object"==typeof c&&(s=c,c=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const a={...n,...s},{memoize:i,memoizeOptions:l=[],argsMemoize:m=$e,argsMemoizeOptions:u=[],devModeChecks:d={}}=a,p=Te(l),f=Te(u),h=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),y=i((function(){return o++,c.apply(null,arguments)}),...p),_=m((function(){r++;const e=function(e,t){const n=[],{length:o}=e;for(let r=0;r<o;r++)n.push(e[r].apply(null,t));return n}(h,arguments);return t=y.apply(null,e),t}),...f);return Object.assign(_,{resultFunc:c,memoizedResultFunc:y,dependencies:h,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>t,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:i,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var He=Ue($e),qe=Object.assign(((e,t=He)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,o)=>(e[n[o]]=t,e)),{})))}),{withTypes:()=>qe});const We=e=>e.comments.comments,Ke=e=>e.comments.focusedComment;function Ve(e){return He(We,(t=>[...t.values()].filter((t=>t.contentpath===e&&!(t.deleted||t.resolved)))))}function Be(e){return He(We,(t=>{const n=t.get(e);if(void 0===n||!n.deleted&&!n.resolved)return n}))}const Xe=He(We,(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)))))),Je=e=>[...e.comments.comments.values()].filter((e=>!e.deleted&&!e.resolved)).length;var Ye=n(1688),Ge=n.n(Ye),Qe=n(1238);const Ze=new Intl.DateTimeFormat([],{dateStyle:"medium",timeStyle:"short"}),et=({commentReply:e,store:t,onResolve:n,onEdit:c,onDelete:a,descriptionId:i,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 _=e=>{h.current&&e.target instanceof Node&&!h.current.contains(e.target)&&p(!1)};(0,r.useEffect)((()=>(document.addEventListener("click",_,!0),()=>{document.removeEventListener("click",_,!0)})),[]);const b=new Date(u).toISOString();return s().createElement("div",{className:"comment-header"},s().createElement("div",{className:"comment-header__actions"},(c||a||n)&&s().createElement("div",{className:"comment-header__action comment-header__action--more",ref:h},s().createElement("details",{open:d,onClick:y},s().createElement("summary",{"aria-label":(0,o.AP)("More actions"),"aria-haspopup":"menu",role:"button",onClick:y,"aria-expanded":d},s().createElement(Qe.A,{name:"dots-horizontal"})),s().createElement("div",{className:"comment-header__more-actions",role:"menu",ref:f},c&&s().createElement("button",{type:"button",role:"menuitem",onClick:async n=>{n.preventDefault(),c&&c(e,t)}},(0,o.AP)("Edit")),a&&s().createElement("button",{type:"button",role:"menuitem",onClick:async n=>{n.preventDefault(),a&&a(e,t)}},(0,o.AP)("Delete")),n&&s().createElement("button",{type:"button",role:"menuitem",onClick:o=>{o.preventDefault(),n&&n(e,t)}},(0,o.AP)("Resolve")))))),m&&m.avatarUrl&&s().createElement("img",{className:"comment-header__avatar",src:m.avatarUrl,alt:"",decoding:"async",loading:"lazy"}),s().createElement("span",{id:i},s().createElement("p",{className:"comment-header__author"},m?m.name:""),s().createElement("p",{className:"comment-header__date"},s().createElement("time",{dateTime:b},Ze.format(u)))))},tt=s().forwardRef((({value:e,className:t,placeholder:n,onChange:o,focusOnMount:r,focusTarget:c=!1,additionalAttributes:a={}},i)=>{const l=s().useRef(null);return s().useImperativeHandle(i,(()=>l.current)),s().useEffect((()=>{l.current&&(l.current.style.height="",l.current.style.height=l.current.scrollHeight+"px")}),[e,l]),s().useEffect((()=>{r&&l.current&&l.current.focus()}),[l]),s().createElement("textarea",{"data-focus-target":c,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 nt(e,t,n){n.dispatch(we(e.localId,t.localId,{mode:"saving"}));try{n.dispatch(we(e.localId,t.localId,{mode:"default",text:t.newText,author:t.author}))}catch(o){console.error(o),n.dispatch(we(e.localId,t.localId,{mode:"save_error"}))}}async function ot(e,t,n){n.dispatch(we(e.localId,t.localId,{mode:"deleting"}));try{n.dispatch(Ie(e.localId,t.localId))}catch(o){n.dispatch(we(e.localId,t.localId,{mode:"delete_error"}))}}class rt extends s().Component{renderEditing(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,focused:r}),s().createElement("form",{onSubmit:async o=>{o.preventDefault(),await nt(e,t,n)}},s().createElement(tt,{className:"comment-reply__input",value:t.newText,onChange:o=>{n.dispatch(we(e.localId,t.localId,{newText:o}))}}),s().createElement("div",{className:"comment__actions"},s().createElement("button",{type:"submit",disabled:0===t.newText.length,className:"comment__button comment__button--primary"},(0,o.AP)("Save")),s().createElement("button",{type:"button",className:"comment__button",onClick:o=>{o.preventDefault(),n.dispatch(we(e.localId,t.localId,{mode:"default",newText:t.text}))}},(0,o.AP)("Cancel")))))}renderSaving(){const{reply:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__progress"},(0,o.AP)("Saving...")))}renderSaveError(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,focused:r}),s().createElement("p",{className:"comment__text"},t.text),s().createElement("div",{className:"comment__error"},(0,o.AP)("Save error"),s().createElement("button",{type:"button",className:"comment__button",onClick:async o=>{o.preventDefault(),await nt(e,t,n)}},(0,o.AP)("Retry"))))}renderDeleteConfirm(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,focused:r}),s().createElement("p",{className:"comment__text"},t.text),s().createElement("div",{className:"comment__confirm-delete"},(0,o.AP)("Are you sure?"),s().createElement("button",{type:"button",className:"comment__button button button-small",onClick:o=>{o.preventDefault(),n.dispatch(we(e.localId,t.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),s().createElement("button",{type:"button",className:"comment__button button button-small no",onClick:async o=>{o.preventDefault(),await ot(e,t,n)}},(0,o.AP)("Delete"))))}renderDeleting(){const{reply:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__progress"},(0,o.AP)("Deleting")))}renderDeleteError(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,focused:r}),s().createElement("p",{className:"comment__text"},t.text),s().createElement("div",{className:"comment__error"},(0,o.AP)("Delete error"),s().createElement("button",{type:"button",className:"comment__button",onClick:async o=>{o.preventDefault(),n.dispatch(we(e.localId,t.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),s().createElement("button",{type:"button",className:"comment__button",onClick:async o=>{o.preventDefault(),await ot(e,t,n)}},(0,o.AP)("Retry"))))}renderDefault(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;let c,a;(null===t.author||this.props.user&&this.props.user.id===t.author.id)&&(c=()=>{n.dispatch(we(e.localId,t.localId,{mode:"editing",newText:t.text}))},a=()=>{n.dispatch(we(e.localId,t.localId,{mode:"delete_confirm"}))});let i="";return t.remoteId&&t.text===t.originalText||(i=(0,o.AP)("Save the page to save this reply")),s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,onEdit:c,onDelete:a,focused:r}),s().createElement("p",{className:"comment__text"},t.text),i&&s().createElement("div",{className:"comment__notice-placeholder"},s().createElement("div",{className:"comment__notice",role:"status"},s().createElement(Qe.A,{name:"info-circle"}),i)))}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 s().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 st(e,t){t.dispatch(be(e.localId,{mode:"saving"}));try{t.dispatch(be(e.localId,{mode:"default",text:e.newText,remoteId:e.remoteId,author:e.author,date:e.date}))}catch(n){console.error(n),t.dispatch(be(e.localId,{mode:"save_error"}))}}async function ct(e,t){t.dispatch(be(e.localId,{mode:"deleting"}));try{t.dispatch(ge(e.localId))}catch(n){console.error(n),t.dispatch(be(e.localId,{mode:"delete_error"}))}}function at(e,t){t.dispatch(ve(e.localId))}class it extends s().Component{renderReplies({hideNewReply:e=!1}={}){const{comment:t,isFocused:n,store:r,user:c}=this.props;if(!t.remoteId)return null;const a=[];let i,l=!1;for(const e of t.replies.values())"saving"!==e.mode&&"editing"!==e.mode||(l=!0),e.deleted||a.push(s().createElement(rt,{key:e.localId,store:r,user:c,comment:t,reply:e,isFocused:n}));if(e||l||!n&&!t.newReply){if(0===a.length)return null}else i=s().createElement("form",{onSubmit:async e=>{e.preventDefault();const n=Pe(b(),c,Date.now(),{text:t.newReply,mode:"default"});r.dispatch(Ce(t.localId,n)),r.dispatch(be(t.localId,{newReply:""}))}},s().createElement(tt,{className:"comment__reply-input",placeholder:(0,o.AP)("Enter your reply..."),value:t.newReply,onChange:e=>{r.dispatch(be(t.localId,{newReply:e}))}}),s().createElement("div",{className:"comment__reply-actions"},s().createElement("button",{disabled:0===t.newReply.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Reply")),s().createElement("button",{type:"button",onClick:e=>{e.preventDefault(),r.dispatch(be(t.localId,{newReply:""})),r.dispatch(Ee(null)),e.stopPropagation()},className:"comment__button"},(0,o.AP)("Cancel"))));return s().createElement(s().Fragment,null,s().createElement("ul",{className:"comment__replies"},a),i)}renderCreating(){const{comment:e,store:t,isFocused:n}=this.props,r=`comment-description-${e.localId}`;return s().createElement(s().Fragment,null,s().createElement(et,{descriptionId:r,commentReply:e,store:t,focused:n}),s().createElement("form",{onSubmit:async n=>{n.preventDefault(),await st(e,t)}},s().createElement(tt,{focusTarget:n,className:"comment__input",value:e.newText,onChange:n=>{t.dispatch(be(e.localId,{newText:n}))},placeholder:(0,o.AP)("Enter your comments..."),additionalAttributes:{"aria-describedby":r}}),s().createElement("div",{className:"comment__actions"},s().createElement("button",{disabled:0===e.newText.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Comment")),s().createElement("button",{type:"button",onClick:n=>{n.preventDefault(),t.dispatch(ge(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 s().createElement(s().Fragment,null,s().createElement(et,{descriptionId:r,commentReply:e,store:t,focused:n}),s().createElement("form",{onSubmit:async n=>{n.preventDefault(),await st(e,t)}},s().createElement(tt,{focusTarget:n,className:"comment__input",value:e.newText,additionalAttributes:{"aria-describedby":r},onChange:n=>{t.dispatch(be(e.localId,{newText:n}))}}),s().createElement("div",{className:"comment__actions"},s().createElement("button",{disabled:0===e.newText.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Save")),s().createElement("button",{type:"button",onClick:n=>{n.preventDefault(),t.dispatch(be(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 s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__progress"},(0,o.AP)("Saving...")),this.renderReplies({hideNewReply:!0}))}renderSaveError(){const{comment:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),this.renderReplies({hideNewReply:!0}),s().createElement("div",{className:"comment__error"},(0,o.AP)("Save error"),s().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),await st(e,t)}},(0,o.AP)("Retry"))))}renderDeleteConfirm(){const{comment:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__confirm-delete"},(0,o.AP)("Are you sure?"),s().createElement("button",{type:"button",className:"comment__button button button-small",onClick:n=>{n.preventDefault(),t.dispatch(be(e.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),s().createElement("button",{type:"button",className:"comment__button button button-small no",onClick:async n=>{n.preventDefault(),await ct(e,t)}},(0,o.AP)("Delete"))),this.renderReplies({hideNewReply:!0}))}renderDeleting(){const{comment:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__progress"},(0,o.AP)("Deleting")),this.renderReplies({hideNewReply:!0}))}renderDeleteError(){const{comment:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),this.renderReplies({hideNewReply:!0}),s().createElement("div",{className:"comment__error"},(0,o.AP)("Delete error"),s().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),t.dispatch(be(e.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),s().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),await ct(e,t)}},(0,o.AP)("Retry"))))}renderDefault(){const{comment:e,store:t,isFocused:n}=this.props;let r,c;(null===e.author||this.props.user&&this.props.user.id===e.author.id)&&(r=()=>{t.dispatch(be(e.localId,{mode:"editing",newText:e.text}))},c=()=>{t.dispatch(be(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"),s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,onResolve:at,onEdit:r,onDelete:c,focused:n}),s().createElement("p",{className:"comment__text"},e.text),a&&s().createElement("div",{className:"comment__notice-placeholder"},s().createElement("div",{className:"comment__notice",role:"status"},s().createElement(Qe.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 s().createElement(Ge(),{focusTrapOptions:{preventScroll:!0,clickOutsideDeactivates:!0,onDeactivate:()=>{this.props.store.dispatch(Ee(null,{updatePinnedComment:!0,forceFocus:!1}))},initialFocus:'[data-focus-target="true"]',delayFocus:!1},active:this.props.isFocused&&this.props.forceFocus},s().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(Ee(this.props.comment.localId,{updatePinnedComment:!1,forceFocus:this.props.isFocused&&this.props.forceFocus}))},onDoubleClick:()=>{this.props.store.dispatch(Ee(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 lt({prefix:e,value:t,fieldName:n}){return s().createElement("input",{type:"hidden",name:`${e}-${n}`,value:null===t?"":t,id:`id_${e}-${n}`})}function mt({reply:e,formNumber:t,prefix:n}){const o=`${n}-${t}`;return s().createElement("fieldset",null,s().createElement(lt,{fieldName:"DELETE",value:e.deleted?1:"",prefix:o}),s().createElement(lt,{fieldName:"id",value:e.remoteId,prefix:o}),s().createElement(lt,{fieldName:"text",value:e.text,prefix:o}))}function ut({replies:e,prefix:t,remoteReplyCount:n}){const o=`${t}-replies`,r=e.map(((e,t)=>s().createElement(mt,{key:e.localId,formNumber:t,reply:e,prefix:o})));return s().createElement(s().Fragment,null,s().createElement(lt,{fieldName:"TOTAL_FORMS",value:e.length,prefix:o}),s().createElement(lt,{fieldName:"INITIAL_FORMS",value:n,prefix:o}),s().createElement(lt,{fieldName:"MIN_NUM_FORMS",value:"0",prefix:o}),s().createElement(lt,{fieldName:"MAX_NUM_FORMS",value:"",prefix:o}),r)}function dt({comment:e,formNumber:t,prefix:n}){const o=`${n}-${t}`;return s().createElement("fieldset",null,s().createElement(lt,{fieldName:"DELETE",value:e.deleted?1:"",prefix:o}),s().createElement(lt,{fieldName:"resolved",value:e.resolved?1:"",prefix:o}),s().createElement(lt,{fieldName:"id",value:e.remoteId,prefix:o}),s().createElement(lt,{fieldName:"contentpath",value:e.contentpath,prefix:o}),s().createElement(lt,{fieldName:"text",value:e.text,prefix:o}),s().createElement(lt,{fieldName:"position",value:e.position,prefix:o}),s().createElement(ut,{replies:Array.from(e.replies.values()),prefix:o,remoteReplyCount:e.remoteReplyCount}))}function pt({comments:e,remoteCommentCount:t}){const n="comments",o=e.map(((e,t)=>s().createElement(dt,{key:e.localId,comment:e,formNumber:t,prefix:n})));return s().createElement(s().Fragment,null,s().createElement(lt,{fieldName:"TOTAL_FORMS",value:e.length,prefix:n}),s().createElement(lt,{fieldName:"INITIAL_FORMS",value:t,prefix:n}),s().createElement(lt,{fieldName:"MIN_NUM_FORMS",value:"0",prefix:n}),s().createElement(lt,{fieldName:"MAX_NUM_FORMS",value:"",prefix:n}),o)}const ft=(e,t)=>{const n=p(e,String(t),{name:"",avatar_url:""});return{id:t,name:n.name,avatarUrl:n.avatar_url}};function ht({store:e,layout:t,comments:n}){const o=e.getState(),{user:c,currentTab:a}=o.settings,{focusedComment:i,forceFocus:l}=o.comments,m=s().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;s().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)}}),[]),c||(d=[]),d=d.filter((({deleted:e,resolved:t})=>!(e||t)));const p=d.map((n=>s().createElement(it,{key:n.localId,store:e,layout:t,user:c,comment:n,isFocused:n.localId===i,forceFocus:l,isVisible:t.getCommentVisible(a,n.localId)})));return s().createElement("ol",{ref:m,className:"comments-list"},p)}class yt{store;layout;utils={selectCommentsForContentPathFactory:Ve,selectCommentFactory:Be};selectors={selectComments:We,selectFocused:Ke,selectIsDirty:Xe,selectCommentCount:Je};actions=xe;activationHandlers=[];constructor(){this.store=function(e,t,n){return d(e,t,void 0)}(Oe,{comments:Se,settings:Re}),this.layout=new f}setUser(e,t){this.store.dispatch(De({user:ft(t,e)}))}updateAnnotation(e,t){this.attachAnnotationLayout(e,t),this.store.dispatch(be(t,{annotation:e}))}attachAnnotationLayout(e,t){this.layout.setCommentAnnotation(t,e)}setCurrentTab(e){this.store.dispatch(De({currentTab:e}))}makeComment(e,t,n=""){const o=_();return this.attachAnnotationLayout(e,o),this.store.dispatch(_e(Ae(t,n,o,e,this.store.getState().settings.user,Date.now(),{mode:"creating"}))),this.store.dispatch(Ee(o,{updatePinnedComment:!0,forceFocus:!0})),o}activate(){this.activationHandlers.forEach((e=>e()))}onActivate(e){this.activationHandlers.push(e)}invalidateContentPath(e){this.store.dispatch(Ne(e))}updateContentPath(e,t){this.store.dispatch(be(e,{contentpath:t}))}renderApp(e,t,n,o,r){let c=null;this.setUser(n,r);let i=null;const l=new URLSearchParams(window.location.search).get("comment");l&&(i=parseInt(l,10));const m=()=>{const n=this.store.getState(),o=Array.from(n.comments.comments.values());a().render(s().createElement(pt,{comments:o.filter((e=>"creating"!==e.mode)),remoteCommentCount:n.comments.remoteCommentCount}),t),n.comments.pinnedComment!==c&&(this.layout.setPinnedComment(n.comments.pinnedComment),c=n.comments.pinnedComment),a().render(s().createElement(ht,{store:this.store,layout:this.layout,comments:o}),e,(()=>{this.layout.refreshDesiredPositions(n.settings.currentTab),this.layout.refreshLayout()&&a().render(s().createElement(ht,{store:this.store,layout:this.layout,comments:o}),e)}))};for(const e of o){const t=_();this.store.dispatch(_e(Ae(e.contentpath,e.position,t,null,ft(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(Ce(t,Pe(b(),ft(r,n.user),Date.parse(n.created_at),{remoteId:n.pk,text:n.text,deleted:n.deleted})));i&&e.pk===i&&this.store.dispatch(Ee(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(Ee(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 yt;function t(e){return(e.ctrlKey||e.metaKey)&&e.altKey&&77===e.keyCode}function n(e){if(!e||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,s=r.getState();let c=n(s)===t;c&&this.onFocus(),this.show(),this.unsubscribe=r.subscribe((()=>{const e=r.getState();o(e)||this.onDelete();const s=n(e)===t;s!==c&&(c?this.onUnfocus():this.onFocus(),c=s)})),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 s extends Error{constructor(e,...t){super(...t),this.name="MissingElementError",this.element=e}}class c{constructor({fieldNode:e,commentAdditionNode:t}){if(this.fieldNode=e,this.contentpath=n(e),!t)throw new s(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 s=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 c=()=>{const t=this.getAnnotationForComment(),n=e.makeComment(t,this.contentpath);t.subscribeToUpdates(n)};return this.commentAdditionNode.addEventListener("click",(()=>{e.activate(),c()})),this.fieldNode.addEventListener("keyup",(n=>{t(n)&&(0===r.length?c():e.store.dispatch(e.actions.setFocusedComment(r[0].localId,{updatePinnedComment:!0,forceFocus:!0})))})),s}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 c({fieldNode:e.closest("[data-contentpath]"),commentAdditionNode:e}).register()}function i(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 s=JSON.parse(r.textContent);e.renderApp(n,o,s.user,s.comments,new Map(Object.entries(s.authors))),t.querySelectorAll('[data-component="add-comment-button"]').forEach(a);const c=t.querySelector('[data-tabs] [role="tablist"]');c&&(e.setCurrentTab(c.querySelector('[role="tab"][aria-selected="true"]').getAttribute("href").replace("#","")),c.addEventListener("switch",(t=>{e.setCurrentTab(t.detail.tab)})));const i=document.querySelector("[data-comment-notifications]");i.hidden=!1,i.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((()=>{i(e)}))}),{once:!0}),{commentApp:e,getContentPath:n,isCommentShortcut:t,initAddCommentButton:a,initCommentsInterface:i}})()}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.m=t,e=[],o.O=(t,n,r,s)=>{if(!n){var c=1/0;for(m=0;m<e.length;m++){for(var[n,r,s]=e[m],a=!0,i=0;i<n.length;i++)(!1&s||c>=s)&&Object.keys(o.O).every((e=>o.O[e](n[i])))?n.splice(i--,1):(a=!1,s<c&&(c=s));if(a){e.splice(m--,1);var l=r();void 0!==l&&(t=l)}}return t}s=s||0;for(var m=e.length;m>0&&e[m-1][2]>s;m--)e[m]=e[m-1];e[m]=[n,r,s]},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,s,[c,a,i]=n,l=0;if(c.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(i)var m=i(o)}for(t&&t(n);l<c.length;l++)s=c[l],o.o(e,s)&&e[s]&&e[s][0](),e[s]=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(9786)));r=o.O(r)})();
1
+ (()=>{"use strict";var e,t={9786:(e,t,n)=>{var o=n(2833),r=n(2427),s=n.n(r),c=n(6931),a=n.n(c);function i(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=()=>Math.random().toString(36).substring(7).split("").join("."),u={INIT:`@@redux/INIT${m()}`,REPLACE:`@@redux/REPLACE${m()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${m()}`};function d(e,t,n){if("function"!=typeof e)throw new Error(i(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(i(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(i(1));return n(d)(e,t)}let o=e,r=t,s=new Map,c=s,a=0,m=!1;function p(){c===s&&(c=new Map,s.forEach(((e,t)=>{c.set(t,e)})))}function f(){if(m)throw new Error(i(3));return r}function h(e){if("function"!=typeof e)throw new Error(i(4));if(m)throw new Error(i(5));let t=!0;p();const n=a++;return c.set(n,e),function(){if(t){if(m)throw new Error(i(6));t=!1,p(),c.delete(n),s=null}}}function y(e){if(!function(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}(e))throw new Error(i(7));if(void 0===e.type)throw new Error(i(8));if("string"!=typeof e.type)throw new Error(i(17));if(m)throw new Error(i(9));try{m=!0,r=o(r,e)}finally{m=!1}return(s=c).forEach((e=>{e()})),e}return y({type:u.INIT}),{dispatch:y,subscribe:h,getState:f,replaceReducer:function(e){if("function"!=typeof e)throw new Error(i(10));o=e,y({type:u.REPLACE})},[l]:function(){const e=h;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(i(11));function n(){const e=t;e.next&&e.next(f())}return n(),{unsubscribe:e(n)}},[l](){return this}}}}}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 s=t,c=!0;for(;c;){c=!1;const e=[];let t=null;for(const o of s)t&&t.position+t.height+20>o.position?(c=!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);s=e}s.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 _(){return h+=1,h}function b(){return y+=1,y}var g=Symbol.for("immer-nothing"),v=Symbol.for("immer-draftable"),E=Symbol.for("immer-state");function C(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var w=Object.getPrototypeOf;function I(e){return!!e&&!!e[E]}function N(e){return!!e&&(P(e)||Array.isArray(e)||!!e[v]||!!e.constructor?.[v]||D(e)||R(e))}var x=Object.prototype.constructor.toString();function P(e){if(!e||"object"!=typeof e)return!1;const t=w(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===x}function A(e,t){0===S(e)?Reflect.ownKeys(e).forEach((n=>{t(n,e[n],e)})):e.forEach(((n,o)=>t(o,n,e)))}function S(e){const t=e[E];return t?t.type_:Array.isArray(e)?1:D(e)?2:R(e)?3:0}function F(e,t){return 2===S(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function k(e,t,n){const o=S(e);2===o?e.set(t,n):3===o?e.add(n):e[t]=n}function D(e){return e instanceof Map}function R(e){return e instanceof Set}function T(e){return e.copy_||e.base_}function O(e,t){if(D(e))return new Map(e);if(R(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=P(e);if(!0===t||"class_only"===t&&!n){const t=Object.getOwnPropertyDescriptors(e);delete t[E];let n=Reflect.ownKeys(t);for(let o=0;o<n.length;o++){const r=n[o],s=t[r];!1===s.writable&&(s.writable=!0,s.configurable=!0),(s.get||s.set)&&(t[r]={configurable:!0,writable:!0,enumerable:s.enumerable,value:e[r]})}return Object.create(w(e),t)}{const t=w(e);if(null!==t&&n)return{...e};const o=Object.create(t);return Object.assign(o,e)}}function M(e,t=!1){return z(e)||I(e)||!N(e)||(S(e)>1&&(e.set=e.add=e.clear=e.delete=j),Object.freeze(e),t&&Object.entries(e).forEach((([e,t])=>M(t,!0)))),e}function j(){C(2)}function z(e){return Object.isFrozen(e)}var L,$={};function U(e){const t=$[e];return t||C(0),t}function H(){return L}function q(e,t){t&&(U("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function W(e){K(e),e.drafts_.forEach(B),e.drafts_=null}function K(e){e===L&&(L=e.parent_)}function V(e){return L={drafts_:[],parent_:L,immer_:e,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function B(e){const t=e[E];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function X(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[E].modified_&&(W(t),C(4)),N(e)&&(e=J(t,e),t.parent_||G(t,e)),t.patches_&&U("Patches").generateReplacementPatches_(n[E].base_,e,t.patches_,t.inversePatches_)):e=J(t,n,[]),W(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==g?e:void 0}function J(e,t,n){if(z(t))return t;const o=t[E];if(!o)return A(t,((r,s)=>Y(e,o,t,r,s,n))),t;if(o.scope_!==e)return t;if(!o.modified_)return G(e,o.base_,!0),o.base_;if(!o.finalized_){o.finalized_=!0,o.scope_.unfinalizedDrafts_--;const t=o.copy_;let r=t,s=!1;3===o.type_&&(r=new Set(t),t.clear(),s=!0),A(r,((r,c)=>Y(e,o,t,r,c,n,s))),G(e,t,!1),n&&e.patches_&&U("Patches").generatePatches_(o,n,e.patches_,e.inversePatches_)}return o.copy_}function Y(e,t,n,o,r,s,c){if(I(r)){const c=J(e,r,s&&t&&3!==t.type_&&!F(t.assigned_,o)?s.concat(o):void 0);if(k(n,o,c),!I(c))return;e.canAutoFreeze_=!1}else c&&n.add(r);if(N(r)&&!z(r)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;J(e,r),t&&t.scope_.parent_||"symbol"==typeof o||!Object.prototype.propertyIsEnumerable.call(n,o)||G(e,r)}}function G(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&M(t,n)}var Q={get(e,t){if(t===E)return e;const n=T(e);if(!F(n,t))return function(e,t,n){const o=te(t,n);return o?"value"in o?o.value:o.get?.call(e.draft_):void 0}(e,n,t);const o=n[t];return e.finalized_||!N(o)?o:o===ee(e.base_,t)?(oe(e),e.copy_[t]=re(o,e)):o},has:(e,t)=>t in T(e),ownKeys:e=>Reflect.ownKeys(T(e)),set(e,t,n){const o=te(T(e),t);if(o?.set)return o.set.call(e.draft_,n),!0;if(!e.modified_){const o=ee(T(e),t),c=o?.[E];if(c&&c.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(((r=n)===(s=o)?0!==r||1/r==1/s:r!=r&&s!=s)&&(void 0!==n||F(e.base_,t)))return!0;oe(e),ne(e)}var r,s;return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==ee(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,oe(e),ne(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=T(e),o=Reflect.getOwnPropertyDescriptor(n,t);return o?{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:o.enumerable,value:n[t]}:o},defineProperty(){C(11)},getPrototypeOf:e=>w(e.base_),setPrototypeOf(){C(12)}},Z={};function ee(e,t){const n=e[E];return(n?T(n):e)[t]}function te(e,t){if(!(t in e))return;let n=w(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=w(n)}}function ne(e){e.modified_||(e.modified_=!0,e.parent_&&ne(e.parent_))}function oe(e){e.copy_||(e.copy_=O(e.base_,e.scope_.immer_.useStrictShallowCopy_))}function re(e,t){const n=D(e)?U("MapSet").proxyMap_(e,t):R(e)?U("MapSet").proxySet_(e,t):function(e,t){const n=Array.isArray(e),o={type_:n?1:0,scope_:t?t.scope_:H(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let r=o,s=Q;n&&(r=[o],s=Z);const{revoke:c,proxy:a}=Proxy.revocable(r,s);return o.draft_=a,o.revoke_=c,a}(e,t);return(t?t.scope_:H()).drafts_.push(n),n}function se(e){if(!N(e)||z(e))return e;const t=e[E];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=O(e,t.scope_.immer_.useStrictShallowCopy_)}else n=O(e,!0);return A(n,((e,t)=>{k(n,e,se(t))})),t&&(t.finalized_=!1),n}A(Q,((e,t)=>{Z[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Z.deleteProperty=function(e,t){return Z.set.call(this,e,t,void 0)},Z.set=function(e,t,n){return Q.set.call(this,e[0],t,n,e[0])};var ce=new class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const o=this;return function(e=n,...r){return o.produce(e,(e=>t.call(this,e,...r)))}}let o;if("function"!=typeof t&&C(6),void 0!==n&&"function"!=typeof n&&C(7),N(e)){const r=V(this),s=re(e,void 0);let c=!0;try{o=t(s),c=!1}finally{c?W(r):K(r)}return q(r,n),X(o,r)}if(!e||"object"!=typeof e){if(o=t(e),void 0===o&&(o=e),o===g&&(o=void 0),this.autoFreeze_&&M(o,!0),n){const t=[],r=[];U("Patches").generateReplacementPatches_(e,o,t,r),n(t,r)}return o}C(1)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,o;return[this.produce(e,t,((e,t)=>{n=e,o=t})),n,o]},"boolean"==typeof e?.autoFreeze&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof e?.useStrictShallowCopy&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){var t;N(e)||C(8),I(e)&&(I(t=e)||C(10),e=se(t));const n=V(this),o=re(e,void 0);return o[E].isManual_=!0,K(n),o}finishDraft(e,t){const n=e&&e[E];n&&n.isManual_||C(9);const{scope_:o}=n;return q(o,t),X(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}n>-1&&(t=t.slice(n+1));const o=U("Patches").applyPatches_;return I(e)?o(e,t):this.produce(e,(e=>o(e,t)))}},ae=ce.produce;ce.produceWithPatches.bind(ce),ce.setAutoFreeze.bind(ce),ce.setUseStrictShallowCopy.bind(ce),ce.applyPatches.bind(ce),ce.createDraft.bind(ce),ce.finishDraft.bind(ce);const ie="add-comment",le="update-comment",me="delete-comment",ue="resolve-comment",de="set-focused-comment",pe="add-reply",fe="update-reply",he="delete-reply",ye="invalidate-content-path";function _e(e){return{type:ie,comment:e}}function be(e,t){return{type:le,commentId:e,update:t}}function ge(e){return{type:me,commentId:e}}function ve(e){return{type:ue,commentId:e}}function Ee(e,{updatePinnedComment:t,forceFocus:n}={updatePinnedComment:!1,forceFocus:!1}){return{type:de,commentId:e,updatePinnedComment:t,forceFocus:n}}function Ce(e,t){return{type:pe,commentId:e,reply:t}}function we(e,t,n){return{type:fe,commentId:e,replyId:t,update:n}}function Ie(e,t){return{type:he,commentId:e,replyId:t}}function Ne(e){return{type:ye,contentPath:e}}const xe={addComment:_e,updateComment:be,deleteComment:ge,resolveComment:ve,setFocusedComment:Ee,addReply:Ce,updateReply:we,deleteReply:Ie,invalidateContentPath:Ne};function Pe(e,t,n,{remoteId:o=null,mode:r="default",text:s="",deleted:c=!1}){return{localId:e,remoteId:o,mode:r,author:t,date:n,text:s,originalText:s,newText:"",deleted:c}}function Ae(e,t,n,o,r,s,{remoteId:c=null,mode:a="default",text:i="",resolved:l=!1,deleted:m=!1,replies:u=new Map}){return{contentpath:e,position:t,localId:n,annotation:o,remoteId:c,mode:a,author:r,date:s,text:i,originalText:i,replies:u,newReply:"",newText:"",deleted:m,resolved:l,remoteReplyCount:Array.from(u.values()).reduce(((e,t)=>null!==t.remoteId?e+1:e),0)}}!function(){class e extends Map{constructor(e,t){super(),this[E]={type_:2,parent_:t,scope_:t?t.scope_:H(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:e,draft_:this,isManual_:!1,revoked_:!1}}get size(){return T(this[E]).size}has(e){return T(this[E]).has(e)}set(e,n){const o=this[E];return r(o),T(o).has(e)&&T(o).get(e)===n||(t(o),ne(o),o.assigned_.set(e,!0),o.copy_.set(e,n),o.assigned_.set(e,!0)),this}delete(e){if(!this.has(e))return!1;const n=this[E];return r(n),t(n),ne(n),n.base_.has(e)?n.assigned_.set(e,!1):n.assigned_.delete(e),n.copy_.delete(e),!0}clear(){const e=this[E];r(e),T(e).size&&(t(e),ne(e),e.assigned_=new Map,A(e.base_,(t=>{e.assigned_.set(t,!1)})),e.copy_.clear())}forEach(e,t){T(this[E]).forEach(((n,o,r)=>{e.call(t,this.get(o),o,this)}))}get(e){const n=this[E];r(n);const o=T(n).get(e);if(n.finalized_||!N(o))return o;if(o!==n.base_.get(e))return o;const s=re(o,n);return t(n),n.copy_.set(e,s),s}keys(){return T(this[E]).keys()}values(){const e=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const t=e.next();return t.done?t:{done:!1,value:this.get(t.value)}}}}entries(){const e=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const t=e.next();if(t.done)return t;const n=this.get(t.value);return{done:!1,value:[t.value,n]}}}}[Symbol.iterator](){return this.entries()}}function t(e){e.copy_||(e.assigned_=new Map,e.copy_=new Map(e.base_))}class n extends Set{constructor(e,t){super(),this[E]={type_:3,parent_:t,scope_:t?t.scope_:H(),modified_:!1,finalized_:!1,copy_:void 0,base_:e,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return T(this[E]).size}has(e){const t=this[E];return r(t),t.copy_?!!t.copy_.has(e)||!(!t.drafts_.has(e)||!t.copy_.has(t.drafts_.get(e))):t.base_.has(e)}add(e){const t=this[E];return r(t),this.has(e)||(o(t),ne(t),t.copy_.add(e)),this}delete(e){if(!this.has(e))return!1;const t=this[E];return r(t),o(t),ne(t),t.copy_.delete(e)||!!t.drafts_.has(e)&&t.copy_.delete(t.drafts_.get(e))}clear(){const e=this[E];r(e),T(e).size&&(o(e),ne(e),e.copy_.clear())}values(){const e=this[E];return r(e),o(e),e.copy_.values()}entries(){const e=this[E];return r(e),o(e),e.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(e,t){const n=this.values();let o=n.next();for(;!o.done;)e.call(t,o.value,o.value,this),o=n.next()}}function o(e){e.copy_||(e.copy_=new Set,e.base_.forEach((t=>{if(N(t)){const n=re(t,e);e.drafts_.set(t,n),e.copy_.add(n)}else e.copy_.add(t)})))}function r(e){e.revoked_&&C(3,JSON.stringify(T(e)))}var s,c;c={proxyMap_:function(t,n){return new e(t,n)},proxySet_:function(e,t){return new n(e,t)}},$[s="MapSet"]||($[s]=c)}();const Se={comments:new Map,forceFocus:!1,focusedComment:null,pinnedComment:null,remoteCommentCount:0},Fe=ae(((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 ie:e.comments.set(t.comment.localId,t.comment),t.comment.remoteId&&(e.remoteCommentCount+=1);break;case le:{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 me:{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 ue:{const o=e.comments.get(t.commentId);if(!o)break;n(o);break}case de:(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 fe:{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 he:{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 ye:{const o=e.comments;for(const e of o.values())e.contentpath.startsWith(t.contentPath)&&n(e);break}}}),Se),ke="update-global-settings";function De(e){return{type:ke,update:e}}const Re={user:null,currentTab:null},Te=function(e){const t=Object.keys(e),n={};for(let o=0;o<t.length;o++){const r=t[o];"function"==typeof e[r]&&(n[r]=e[r])}const o=Object.keys(n);let r;try{!function(e){Object.keys(e).forEach((t=>{const n=e[t];if(void 0===n(void 0,{type:u.INIT}))throw new Error(i(12));if(void 0===n(void 0,{type:u.PROBE_UNKNOWN_ACTION()}))throw new Error(i(13))}))}(n)}catch(e){r=e}return function(e={},t){if(r)throw r;let s=!1;const c={};for(let r=0;r<o.length;r++){const a=o[r],l=n[a],m=e[a],u=l(m,t);if(void 0===u)throw t&&t.type,new Error(i(14));c[a]=u,s=s||u!==m}return s=s||o.length!==Object.keys(e).length,s?c:e}}({comments:Fe,settings:ae(((e,t)=>{t.type===ke&&Object.assign(e,t.update)}),Re)});var Oe=e=>Array.isArray(e)?e:[e];Symbol(),Object.getPrototypeOf({});var Me="undefined"!=typeof WeakRef?WeakRef:class{constructor(e){this.value=e}deref(){return this.value}},je=0,ze=1;function Le(){return{s:je,v:void 0,o:null,p:null}}function $e(e,t={}){let n=Le();const{resultEqualityCheck:o}=t;let r,s=0;function c(){let t=n;const{length:c}=arguments;for(let e=0,n=c;e<n;e++){const n=arguments[e];if("function"==typeof n||"object"==typeof n&&null!==n){let e=t.o;null===e&&(t.o=e=new WeakMap);const o=e.get(n);void 0===o?(t=Le(),e.set(n,t)):t=o}else{let e=t.p;null===e&&(t.p=e=new Map);const o=e.get(n);void 0===o?(t=Le(),e.set(n,t)):t=o}}const a=t;let i;if(t.s===ze)i=t.v;else if(i=e.apply(null,arguments),s++,o){const e=r?.deref?.()??r;null!=e&&o(e,i)&&(i=e,0!==s&&s--),r="object"==typeof i&&null!==i||"function"==typeof i?new Me(i):i}return a.s=ze,a.v=i,i}return c.clearCache=()=>{n=Le(),c.resetResultsCount()},c.resultsCount=()=>s,c.resetResultsCount=()=>{s=0},c}function Ue(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,o=(...e)=>{let t,o=0,r=0,s={},c=e.pop();"object"==typeof c&&(s=c,c=e.pop()),function(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}(c,`createSelector expects an output function after the inputs, but received: [${typeof c}]`);const a={...n,...s},{memoize:i,memoizeOptions:l=[],argsMemoize:m=$e,argsMemoizeOptions:u=[],devModeChecks:d={}}=a,p=Oe(l),f=Oe(u),h=function(e){const t=Array.isArray(e[0])?e[0]:e;return function(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}(e),y=i((function(){return o++,c.apply(null,arguments)}),...p),_=m((function(){r++;const e=function(e,t){const n=[],{length:o}=e;for(let r=0;r<o;r++)n.push(e[r].apply(null,t));return n}(h,arguments);return t=y.apply(null,e),t}),...f);return Object.assign(_,{resultFunc:c,memoizedResultFunc:y,dependencies:h,dependencyRecomputations:()=>r,resetDependencyRecomputations:()=>{r=0},lastResult:()=>t,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:i,argsMemoize:m})};return Object.assign(o,{withTypes:()=>o}),o}var He=Ue($e),qe=Object.assign(((e,t=He)=>{!function(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,o)=>(e[n[o]]=t,e)),{})))}),{withTypes:()=>qe});const We=e=>e.comments.comments,Ke=e=>e.comments.focusedComment;function Ve(e){return He(We,(t=>[...t.values()].filter((t=>t.contentpath===e&&!(t.deleted||t.resolved)))))}function Be(e){return He(We,(t=>{const n=t.get(e);if(void 0===n||!n.deleted&&!n.resolved)return n}))}const Xe=He(We,(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)))))),Je=e=>[...e.comments.comments.values()].filter((e=>!e.deleted&&!e.resolved)).length;var Ye=n(1688),Ge=n.n(Ye),Qe=n(1238);const Ze=new Intl.DateTimeFormat([],{dateStyle:"medium",timeStyle:"short"}),et=({commentReply:e,store:t,onResolve:n,onEdit:c,onDelete:a,descriptionId:i,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 _=e=>{h.current&&e.target instanceof Node&&!h.current.contains(e.target)&&p(!1)};(0,r.useEffect)((()=>(document.addEventListener("click",_,!0),()=>{document.removeEventListener("click",_,!0)})),[]);const b=new Date(u).toISOString();return s().createElement("div",{className:"comment-header"},s().createElement("div",{className:"comment-header__actions"},(c||a||n)&&s().createElement("div",{className:"comment-header__action comment-header__action--more",ref:h},s().createElement("details",{open:d,onClick:y},s().createElement("summary",{"aria-label":(0,o.AP)("More actions"),"aria-haspopup":"menu",role:"button",onClick:y,"aria-expanded":d},s().createElement(Qe.A,{name:"dots-horizontal"})),s().createElement("div",{className:"comment-header__more-actions",role:"menu",ref:f},c&&s().createElement("button",{type:"button",role:"menuitem",onClick:async n=>{n.preventDefault(),c&&c(e,t)}},(0,o.AP)("Edit")),a&&s().createElement("button",{type:"button",role:"menuitem",onClick:async n=>{n.preventDefault(),a&&a(e,t)}},(0,o.AP)("Delete")),n&&s().createElement("button",{type:"button",role:"menuitem",onClick:o=>{o.preventDefault(),n&&n(e,t)}},(0,o.AP)("Resolve")))))),m&&m.avatarUrl&&s().createElement("img",{className:"comment-header__avatar",src:m.avatarUrl,alt:"",decoding:"async",loading:"lazy"}),s().createElement("span",{id:i},s().createElement("p",{className:"comment-header__author"},m?m.name:""),s().createElement("p",{className:"comment-header__date"},s().createElement("time",{dateTime:b},Ze.format(u)))))},tt=s().forwardRef((({value:e,className:t,placeholder:n,onChange:o,focusOnMount:r,focusTarget:c=!1,additionalAttributes:a={}},i)=>{const l=s().useRef(null);return s().useImperativeHandle(i,(()=>l.current)),s().useEffect((()=>{l.current&&(l.current.style.height="",l.current.style.height=l.current.scrollHeight+"px")}),[e,l]),s().useEffect((()=>{r&&l.current&&l.current.focus()}),[l]),s().createElement("textarea",{"data-focus-target":c,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 nt(e,t,n){n.dispatch(we(e.localId,t.localId,{mode:"saving"}));try{n.dispatch(we(e.localId,t.localId,{mode:"default",text:t.newText,author:t.author}))}catch(o){console.error(o),n.dispatch(we(e.localId,t.localId,{mode:"save_error"}))}}async function ot(e,t,n){n.dispatch(we(e.localId,t.localId,{mode:"deleting"}));try{n.dispatch(Ie(e.localId,t.localId))}catch(o){n.dispatch(we(e.localId,t.localId,{mode:"delete_error"}))}}class rt extends s().Component{renderEditing(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,focused:r}),s().createElement("form",{onSubmit:async o=>{o.preventDefault(),await nt(e,t,n)}},s().createElement(tt,{className:"comment-reply__input",value:t.newText,onChange:o=>{n.dispatch(we(e.localId,t.localId,{newText:o}))}}),s().createElement("div",{className:"comment__actions"},s().createElement("button",{type:"submit",disabled:0===t.newText.length,className:"comment__button comment__button--primary"},(0,o.AP)("Save")),s().createElement("button",{type:"button",className:"comment__button",onClick:o=>{o.preventDefault(),n.dispatch(we(e.localId,t.localId,{mode:"default",newText:t.text}))}},(0,o.AP)("Cancel")))))}renderSaving(){const{reply:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__progress"},(0,o.AP)("Saving...")))}renderSaveError(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,focused:r}),s().createElement("p",{className:"comment__text"},t.text),s().createElement("div",{className:"comment__error"},(0,o.AP)("Save error"),s().createElement("button",{type:"button",className:"comment__button",onClick:async o=>{o.preventDefault(),await nt(e,t,n)}},(0,o.AP)("Retry"))))}renderDeleteConfirm(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,focused:r}),s().createElement("p",{className:"comment__text"},t.text),s().createElement("div",{className:"comment__confirm-delete"},(0,o.AP)("Are you sure?"),s().createElement("button",{type:"button",className:"comment__button button button-small",onClick:o=>{o.preventDefault(),n.dispatch(we(e.localId,t.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),s().createElement("button",{type:"button",className:"comment__button button button-small no",onClick:async o=>{o.preventDefault(),await ot(e,t,n)}},(0,o.AP)("Delete"))))}renderDeleting(){const{reply:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__progress"},(0,o.AP)("Deleting")))}renderDeleteError(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,focused:r}),s().createElement("p",{className:"comment__text"},t.text),s().createElement("div",{className:"comment__error"},(0,o.AP)("Delete error"),s().createElement("button",{type:"button",className:"comment__button",onClick:async o=>{o.preventDefault(),n.dispatch(we(e.localId,t.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),s().createElement("button",{type:"button",className:"comment__button",onClick:async o=>{o.preventDefault(),await ot(e,t,n)}},(0,o.AP)("Retry"))))}renderDefault(){const{comment:e,reply:t,store:n,isFocused:r}=this.props;let c,a;(null===t.author||this.props.user&&this.props.user.id===t.author.id)&&(c=()=>{n.dispatch(we(e.localId,t.localId,{mode:"editing",newText:t.text}))},a=()=>{n.dispatch(we(e.localId,t.localId,{mode:"delete_confirm"}))});let i="";return t.remoteId&&t.text===t.originalText||(i=(0,o.AP)("Save the page to save this reply")),s().createElement(s().Fragment,null,s().createElement(et,{commentReply:t,store:n,onEdit:c,onDelete:a,focused:r}),s().createElement("p",{className:"comment__text"},t.text),i&&s().createElement("div",{className:"comment__notice-placeholder"},s().createElement("div",{className:"comment__notice",role:"status"},s().createElement(Qe.A,{name:"info-circle"}),i)))}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 s().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 st(e,t){t.dispatch(be(e.localId,{mode:"saving"}));try{t.dispatch(be(e.localId,{mode:"default",text:e.newText,remoteId:e.remoteId,author:e.author,date:e.date}))}catch(n){console.error(n),t.dispatch(be(e.localId,{mode:"save_error"}))}}async function ct(e,t){t.dispatch(be(e.localId,{mode:"deleting"}));try{t.dispatch(ge(e.localId))}catch(n){console.error(n),t.dispatch(be(e.localId,{mode:"delete_error"}))}}function at(e,t){t.dispatch(ve(e.localId))}class it extends s().Component{renderReplies({hideNewReply:e=!1}={}){const{comment:t,isFocused:n,store:r,user:c}=this.props;if(!t.remoteId)return null;const a=[];let i,l=!1;for(const e of t.replies.values())"saving"!==e.mode&&"editing"!==e.mode||(l=!0),e.deleted||a.push(s().createElement(rt,{key:e.localId,store:r,user:c,comment:t,reply:e,isFocused:n}));if(e||l||!n&&!t.newReply){if(0===a.length)return null}else i=s().createElement("form",{onSubmit:async e=>{e.preventDefault();const n=Pe(b(),c,Date.now(),{text:t.newReply,mode:"default"});r.dispatch(Ce(t.localId,n)),r.dispatch(be(t.localId,{newReply:""}))}},s().createElement(tt,{className:"comment__reply-input",placeholder:(0,o.AP)("Enter your reply..."),value:t.newReply,onChange:e=>{r.dispatch(be(t.localId,{newReply:e}))}}),s().createElement("div",{className:"comment__reply-actions"},s().createElement("button",{disabled:0===t.newReply.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Reply")),s().createElement("button",{type:"button",onClick:e=>{e.preventDefault(),r.dispatch(be(t.localId,{newReply:""})),r.dispatch(Ee(null)),e.stopPropagation()},className:"comment__button"},(0,o.AP)("Cancel"))));return s().createElement(s().Fragment,null,s().createElement("ul",{className:"comment__replies"},a),i)}renderCreating(){const{comment:e,store:t,isFocused:n}=this.props,r=`comment-description-${e.localId}`;return s().createElement(s().Fragment,null,s().createElement(et,{descriptionId:r,commentReply:e,store:t,focused:n}),s().createElement("form",{onSubmit:async n=>{n.preventDefault(),await st(e,t)}},s().createElement(tt,{focusTarget:n,className:"comment__input",value:e.newText,onChange:n=>{t.dispatch(be(e.localId,{newText:n}))},placeholder:(0,o.AP)("Enter your comments..."),additionalAttributes:{"aria-describedby":r}}),s().createElement("div",{className:"comment__actions"},s().createElement("button",{disabled:0===e.newText.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Comment")),s().createElement("button",{type:"button",onClick:n=>{n.preventDefault(),t.dispatch(ge(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 s().createElement(s().Fragment,null,s().createElement(et,{descriptionId:r,commentReply:e,store:t,focused:n}),s().createElement("form",{onSubmit:async n=>{n.preventDefault(),await st(e,t)}},s().createElement(tt,{focusTarget:n,className:"comment__input",value:e.newText,additionalAttributes:{"aria-describedby":r},onChange:n=>{t.dispatch(be(e.localId,{newText:n}))}}),s().createElement("div",{className:"comment__actions"},s().createElement("button",{disabled:0===e.newText.length,type:"submit",className:"comment__button comment__button--primary"},(0,o.AP)("Save")),s().createElement("button",{type:"button",onClick:n=>{n.preventDefault(),t.dispatch(be(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 s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__progress"},(0,o.AP)("Saving...")),this.renderReplies({hideNewReply:!0}))}renderSaveError(){const{comment:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),this.renderReplies({hideNewReply:!0}),s().createElement("div",{className:"comment__error"},(0,o.AP)("Save error"),s().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),await st(e,t)}},(0,o.AP)("Retry"))))}renderDeleteConfirm(){const{comment:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__confirm-delete"},(0,o.AP)("Are you sure?"),s().createElement("button",{type:"button",className:"comment__button button button-small",onClick:n=>{n.preventDefault(),t.dispatch(be(e.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),s().createElement("button",{type:"button",className:"comment__button button button-small no",onClick:async n=>{n.preventDefault(),await ct(e,t)}},(0,o.AP)("Delete"))),this.renderReplies({hideNewReply:!0}))}renderDeleting(){const{comment:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),s().createElement("div",{className:"comment__progress"},(0,o.AP)("Deleting")),this.renderReplies({hideNewReply:!0}))}renderDeleteError(){const{comment:e,store:t,isFocused:n}=this.props;return s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,focused:n}),s().createElement("p",{className:"comment__text"},e.text),this.renderReplies({hideNewReply:!0}),s().createElement("div",{className:"comment__error"},(0,o.AP)("Delete error"),s().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),t.dispatch(be(e.localId,{mode:"default"}))}},(0,o.AP)("Cancel")),s().createElement("button",{type:"button",className:"comment__button",onClick:async n=>{n.preventDefault(),await ct(e,t)}},(0,o.AP)("Retry"))))}renderDefault(){const{comment:e,store:t,isFocused:n}=this.props;let r,c;(null===e.author||this.props.user&&this.props.user.id===e.author.id)&&(r=()=>{t.dispatch(be(e.localId,{mode:"editing",newText:e.text}))},c=()=>{t.dispatch(be(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"),s().createElement(s().Fragment,null,s().createElement(et,{commentReply:e,store:t,onResolve:at,onEdit:r,onDelete:c,focused:n}),s().createElement("p",{className:"comment__text"},e.text),a&&s().createElement("div",{className:"comment__notice-placeholder"},s().createElement("div",{className:"comment__notice",role:"status"},s().createElement(Qe.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 s().createElement(Ge(),{focusTrapOptions:{preventScroll:!0,clickOutsideDeactivates:!0,onDeactivate:()=>{this.props.store.dispatch(Ee(null,{updatePinnedComment:!0,forceFocus:!1}))},checkCanFocusTrap:e=>e.some((e=>e.matches('[data-form-side="comments"].form-side--comments [data-focus-target="true"]')))?Promise.resolve():new Promise((e=>{setTimeout(e,250)})),initialFocus:'[data-focus-target="true"]',delayInitialFocus:!0},active:this.props.isFocused&&this.props.forceFocus},s().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(Ee(this.props.comment.localId,{updatePinnedComment:!1,forceFocus:this.props.isFocused&&this.props.forceFocus}))},onDoubleClick:()=>{this.props.store.dispatch(Ee(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 lt({prefix:e,value:t,fieldName:n}){return s().createElement("input",{type:"hidden",name:`${e}-${n}`,value:null===t?"":t,id:`id_${e}-${n}`})}function mt({reply:e,formNumber:t,prefix:n}){const o=`${n}-${t}`;return s().createElement("fieldset",null,s().createElement(lt,{fieldName:"DELETE",value:e.deleted?1:"",prefix:o}),s().createElement(lt,{fieldName:"id",value:e.remoteId,prefix:o}),s().createElement(lt,{fieldName:"text",value:e.text,prefix:o}))}function ut({replies:e,prefix:t,remoteReplyCount:n}){const o=`${t}-replies`,r=e.map(((e,t)=>s().createElement(mt,{key:e.localId,formNumber:t,reply:e,prefix:o})));return s().createElement(s().Fragment,null,s().createElement(lt,{fieldName:"TOTAL_FORMS",value:e.length,prefix:o}),s().createElement(lt,{fieldName:"INITIAL_FORMS",value:n,prefix:o}),s().createElement(lt,{fieldName:"MIN_NUM_FORMS",value:"0",prefix:o}),s().createElement(lt,{fieldName:"MAX_NUM_FORMS",value:"",prefix:o}),r)}function dt({comment:e,formNumber:t,prefix:n}){const o=`${n}-${t}`;return s().createElement("fieldset",null,s().createElement(lt,{fieldName:"DELETE",value:e.deleted?1:"",prefix:o}),s().createElement(lt,{fieldName:"resolved",value:e.resolved?1:"",prefix:o}),s().createElement(lt,{fieldName:"id",value:e.remoteId,prefix:o}),s().createElement(lt,{fieldName:"contentpath",value:e.contentpath,prefix:o}),s().createElement(lt,{fieldName:"text",value:e.text,prefix:o}),s().createElement(lt,{fieldName:"position",value:e.position,prefix:o}),s().createElement(ut,{replies:Array.from(e.replies.values()),prefix:o,remoteReplyCount:e.remoteReplyCount}))}function pt({comments:e,remoteCommentCount:t}){const n="comments",o=e.map(((e,t)=>s().createElement(dt,{key:e.localId,comment:e,formNumber:t,prefix:n})));return s().createElement(s().Fragment,null,s().createElement(lt,{fieldName:"TOTAL_FORMS",value:e.length,prefix:n}),s().createElement(lt,{fieldName:"INITIAL_FORMS",value:t,prefix:n}),s().createElement(lt,{fieldName:"MIN_NUM_FORMS",value:"0",prefix:n}),s().createElement(lt,{fieldName:"MAX_NUM_FORMS",value:"",prefix:n}),o)}const ft=(e,t)=>{const n=p(e,String(t),{name:"",avatar_url:""});return{id:t,name:n.name,avatarUrl:n.avatar_url}};function ht({store:e,layout:t,comments:n}){const o=e.getState(),{user:c,currentTab:a}=o.settings,{focusedComment:i,forceFocus:l}=o.comments,m=s().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;s().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)}}),[]),c||(d=[]),d=d.filter((({deleted:e,resolved:t})=>!(e||t)));const p=d.map((n=>s().createElement(it,{key:n.localId,store:e,layout:t,user:c,comment:n,isFocused:n.localId===i,forceFocus:l,isVisible:t.getCommentVisible(a,n.localId)})));return s().createElement("ol",{ref:m,className:"comments-list"},p)}class yt{store;layout;utils={selectCommentsForContentPathFactory:Ve,selectCommentFactory:Be};selectors={selectComments:We,selectFocused:Ke,selectIsDirty:Xe,selectCommentCount:Je};actions=xe;activationHandlers=[];constructor(){this.store=function(e,t,n){return d(e,t,void 0)}(Te,{comments:Se,settings:Re}),this.layout=new f}setUser(e,t){this.store.dispatch(De({user:ft(t,e)}))}updateAnnotation(e,t){this.attachAnnotationLayout(e,t),this.store.dispatch(be(t,{annotation:e}))}attachAnnotationLayout(e,t){this.layout.setCommentAnnotation(t,e)}setCurrentTab(e){this.store.dispatch(De({currentTab:e}))}makeComment(e,t,n=""){const o=_();return this.attachAnnotationLayout(e,o),this.store.dispatch(_e(Ae(t,n,o,e,this.store.getState().settings.user,Date.now(),{mode:"creating"}))),this.store.dispatch(Ee(o,{updatePinnedComment:!0,forceFocus:!0})),o}activate(){this.activationHandlers.forEach((e=>e()))}onActivate(e){this.activationHandlers.push(e)}invalidateContentPath(e){this.store.dispatch(Ne(e))}updateContentPath(e,t){this.store.dispatch(be(e,{contentpath:t}))}renderApp(e,t,n,o,r){let c=null;this.setUser(n,r);let i=null;const l=new URLSearchParams(window.location.search).get("comment");l&&(i=parseInt(l,10));const m=()=>{const n=this.store.getState(),o=Array.from(n.comments.comments.values());a().render(s().createElement(pt,{comments:o.filter((e=>"creating"!==e.mode)),remoteCommentCount:n.comments.remoteCommentCount}),t),n.comments.pinnedComment!==c&&(this.layout.setPinnedComment(n.comments.pinnedComment),c=n.comments.pinnedComment),a().render(s().createElement(ht,{store:this.store,layout:this.layout,comments:o}),e,(()=>{this.layout.refreshDesiredPositions(n.settings.currentTab),this.layout.refreshLayout()&&a().render(s().createElement(ht,{store:this.store,layout:this.layout,comments:o}),e)}))};for(const e of o){const t=_();this.store.dispatch(_e(Ae(e.contentpath,e.position,t,null,ft(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(Ce(t,Pe(b(),ft(r,n.user),Date.parse(n.created_at),{remoteId:n.pk,text:n.text,deleted:n.deleted})));i&&e.pk===i&&this.store.dispatch(Ee(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(Ee(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 yt;function t(e){return(e.ctrlKey||e.metaKey)&&e.altKey&&77===e.keyCode}function n(e){if(!e||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,s=r.getState();let c=n(s)===t;c&&this.onFocus(),this.show(),this.unsubscribe=r.subscribe((()=>{const e=r.getState();o(e)||this.onDelete();const s=n(e)===t;s!==c&&(c?this.onUnfocus():this.onFocus(),c=s)})),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 s extends Error{constructor(e,...t){super(...t),this.name="MissingElementError",this.element=e}}class c{constructor({fieldNode:e,commentAdditionNode:t}){if(this.fieldNode=e,this.contentpath=n(e),!t)throw new s(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 s=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 c=()=>{const t=this.getAnnotationForComment(),n=e.makeComment(t,this.contentpath);t.subscribeToUpdates(n)};return this.commentAdditionNode.addEventListener("click",(()=>{e.activate(),c()})),this.fieldNode.addEventListener("keyup",(n=>{t(n)&&(0===r.length?c():e.store.dispatch(e.actions.setFocusedComment(r[0].localId,{updatePinnedComment:!0,forceFocus:!0})))})),s}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 c({fieldNode:e.closest("[data-contentpath]"),commentAdditionNode:e}).register()}function i(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 s=JSON.parse(r.textContent);e.renderApp(n,o,s.user,s.comments,new Map(Object.entries(s.authors))),t.querySelectorAll('[data-component="add-comment-button"]').forEach(a);const c=t.querySelector('[data-controller~="w-tabs"]');if(c){const t=c.getAttribute("data-w-tabs-active-panel-id-value");e.setCurrentTab(t),c.addEventListener("w-tabs:changed",(({detail:{current:t}})=>setTimeout((()=>e.setCurrentTab(t)))))}const i=document.querySelector("[data-comment-notifications]");i.hidden=!1,i.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((()=>{i(e)}))}),{once:!0}),{commentApp:e,getContentPath:n,isCommentShortcut:t,initAddCommentButton:a,initCommentsInterface:i}})()}},n={};function o(e){var r=n[e];if(void 0!==r)return r.exports;var s=n[e]={exports:{}};return t[e](s,s.exports,o),s.exports}o.m=t,e=[],o.O=(t,n,r,s)=>{if(!n){var c=1/0;for(m=0;m<e.length;m++){for(var[n,r,s]=e[m],a=!0,i=0;i<n.length;i++)(!1&s||c>=s)&&Object.keys(o.O).every((e=>o.O[e](n[i])))?n.splice(i--,1):(a=!1,s<c&&(c=s));if(a){e.splice(m--,1);var l=r();void 0!==l&&(t=l)}}return t}s=s||0;for(var m=e.length;m>0&&e[m-1][2]>s;m--)e[m]=e[m-1];e[m]=[n,r,s]},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,s,[c,a,i]=n,l=0;if(c.some((t=>0!==e[t]))){for(r in a)o.o(a,r)&&(o.m[r]=a[r]);if(i)var m=i(o)}for(t&&t(n);l<c.length;l++)s=c[l],o.o(e,s)&&e[s]&&e[s][0](),e[s]=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(9786)));r=o.O(r)})();