alchemy_cms 7.0.8 → 7.1.0.pre.b2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (394) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +162 -0
  3. data/Gemfile +9 -11
  4. data/README.md +11 -9
  5. data/alchemy_cms.gemspec +4 -3
  6. data/app/assets/config/alchemy_manifest.js +3 -5
  7. data/app/assets/images/alchemy/missing-image.svg +1 -1
  8. data/app/assets/javascripts/alchemy/admin.js +1 -23
  9. data/app/assets/javascripts/alchemy/alchemy.confirm_dialog.js.coffee +2 -3
  10. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +19 -34
  11. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +38 -13
  12. data/app/assets/javascripts/alchemy/alchemy.file_progress.js.coffee +1 -1
  13. data/app/assets/javascripts/alchemy/alchemy.fixed_elements.js +32 -25
  14. data/app/assets/javascripts/alchemy/alchemy.growler.js.coffee +1 -1
  15. data/app/assets/javascripts/alchemy/alchemy.image_overlay.coffee +3 -5
  16. data/app/assets/javascripts/alchemy/alchemy.initializer.js.coffee +0 -57
  17. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +24 -65
  18. data/app/assets/javascripts/alchemy/alchemy.list_filter.js.coffee +2 -2
  19. data/app/assets/javascripts/alchemy/alchemy.preview.js.coffee +5 -4
  20. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +5 -5
  21. data/app/assets/javascripts/alchemy/templates/index.js +0 -2
  22. data/app/assets/javascripts/alchemy/templates/node_folder.hbs +1 -1
  23. data/app/assets/javascripts/alchemy/templates/page.hbs +1 -1
  24. data/app/assets/javascripts/alchemy/templates/page_folder.hbs +2 -2
  25. data/app/assets/javascripts/tinymce/icons/remixicons/icons.js +93 -0
  26. data/app/assets/javascripts/tinymce/plugins/alchemy_link/plugin.min.js +37 -18
  27. data/app/assets/stylesheets/alchemy/_custom-properties.scss +82 -0
  28. data/app/assets/stylesheets/alchemy/_mixins.scss +38 -30
  29. data/app/assets/stylesheets/alchemy/_variables.scss +23 -8
  30. data/app/assets/stylesheets/alchemy/admin.scss +3 -4
  31. data/app/assets/stylesheets/alchemy/archive.scss +110 -50
  32. data/app/assets/stylesheets/alchemy/attachments.scss +5 -4
  33. data/app/assets/stylesheets/alchemy/buttons.scss +41 -166
  34. data/app/assets/stylesheets/alchemy/dashboard.scss +31 -6
  35. data/app/assets/stylesheets/alchemy/dialogs.scss +12 -28
  36. data/app/assets/stylesheets/alchemy/elements.scss +272 -282
  37. data/app/assets/stylesheets/alchemy/flash.scss +20 -12
  38. data/app/assets/stylesheets/alchemy/forms.scss +21 -34
  39. data/app/assets/stylesheets/alchemy/frame.scss +11 -32
  40. data/app/assets/stylesheets/alchemy/hints.scss +4 -62
  41. data/app/assets/stylesheets/alchemy/image_library.scss +36 -33
  42. data/app/assets/stylesheets/alchemy/menubar.scss +7 -6
  43. data/app/assets/stylesheets/alchemy/navigation.scss +27 -15
  44. data/app/assets/stylesheets/alchemy/nodes.scss +11 -7
  45. data/app/assets/stylesheets/alchemy/notices.scss +16 -4
  46. data/app/assets/stylesheets/alchemy/page-select.scss +10 -2
  47. data/app/assets/stylesheets/alchemy/pagination.scss +22 -13
  48. data/app/assets/stylesheets/alchemy/resource_info.scss +7 -5
  49. data/app/assets/stylesheets/alchemy/selects.scss +49 -42
  50. data/app/assets/stylesheets/alchemy/shoelace.scss +345 -0
  51. data/app/assets/stylesheets/alchemy/sitemap.scss +24 -14
  52. data/app/assets/stylesheets/alchemy/spinner.scss +9 -19
  53. data/app/assets/stylesheets/alchemy/tables.scss +16 -24
  54. data/app/assets/stylesheets/alchemy/tags.scss +4 -0
  55. data/app/assets/stylesheets/alchemy/toolbar.scss +29 -25
  56. data/app/assets/stylesheets/alchemy/upload.scss +140 -89
  57. data/app/assets/stylesheets/tinymce/skins/content/alchemy/content.min.scss +69 -0
  58. data/app/assets/stylesheets/tinymce/skins/skintool.json +38 -0
  59. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.css +711 -0
  60. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.css +705 -0
  61. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.min.css +7 -0
  62. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.min.css +7 -0
  63. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.css +29 -0
  64. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.min.css +7 -0
  65. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/fonts/tinymce-mobile.woff +0 -0
  66. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.min.scss +3798 -0
  67. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.css +677 -0
  68. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.min.css +7 -0
  69. data/app/components/alchemy/admin/node_select.rb +39 -0
  70. data/app/components/alchemy/admin/page_select.rb +42 -0
  71. data/app/controllers/alchemy/admin/base_controller.rb +5 -6
  72. data/app/controllers/alchemy/admin/elements_controller.rb +63 -35
  73. data/app/controllers/alchemy/admin/pages_controller.rb +9 -4
  74. data/app/controllers/alchemy/base_controller.rb +4 -2
  75. data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +1 -1
  76. data/app/controllers/concerns/alchemy/site_redirects.rb +1 -1
  77. data/app/decorators/alchemy/element_editor.rb +0 -2
  78. data/app/helpers/alchemy/admin/attachments_helper.rb +6 -5
  79. data/app/helpers/alchemy/admin/base_helper.rb +17 -12
  80. data/app/helpers/alchemy/admin/ingredients_helper.rb +4 -1
  81. data/app/helpers/alchemy/admin/pages_helper.rb +5 -11
  82. data/app/helpers/alchemy/base_helper.rb +47 -13
  83. data/app/javascript/alchemy_admin/clipboard.js +16 -0
  84. data/app/javascript/alchemy_admin/components/alchemy_html_element.js +129 -0
  85. data/app/javascript/alchemy_admin/components/button.js +59 -0
  86. data/app/javascript/alchemy_admin/components/char_counter.js +40 -0
  87. data/app/javascript/alchemy_admin/components/datepicker.js +39 -0
  88. data/app/javascript/alchemy_admin/components/dialog_link.js +45 -0
  89. data/app/javascript/alchemy_admin/components/element_editor/publish_element_button.js +36 -0
  90. data/app/javascript/alchemy_admin/components/element_editor.js +553 -0
  91. data/app/javascript/alchemy_admin/components/ingredient_group.js +54 -0
  92. data/app/javascript/alchemy_admin/components/link_buttons/link_button.js +48 -0
  93. data/app/javascript/alchemy_admin/components/link_buttons/unlink_button.js +38 -0
  94. data/app/javascript/alchemy_admin/components/link_buttons.js +79 -0
  95. data/app/javascript/alchemy_admin/components/node_select.js +45 -0
  96. data/app/javascript/alchemy_admin/components/overlay.js +18 -0
  97. data/app/javascript/alchemy_admin/components/page_select.js +63 -0
  98. data/app/javascript/alchemy_admin/components/remote_select.js +134 -0
  99. data/app/javascript/alchemy_admin/components/select.js +12 -0
  100. data/app/javascript/alchemy_admin/components/spinner.js +31 -0
  101. data/app/javascript/alchemy_admin/components/tinymce.js +134 -0
  102. data/app/javascript/alchemy_admin/components/uploader/file_upload.js +266 -0
  103. data/app/javascript/alchemy_admin/components/uploader/progress.js +258 -0
  104. data/app/javascript/alchemy_admin/components/uploader.js +132 -0
  105. data/app/javascript/alchemy_admin/dirty.js +49 -0
  106. data/app/javascript/alchemy_admin/file_editors.js +1 -1
  107. data/app/javascript/alchemy_admin/gui.js +14 -0
  108. data/app/javascript/alchemy_admin/i18n.js +12 -8
  109. data/app/javascript/alchemy_admin/image_cropper.js +6 -3
  110. data/app/javascript/alchemy_admin/image_loader.js +7 -15
  111. data/app/javascript/alchemy_admin/ingredient_anchor_link.js +2 -5
  112. data/app/javascript/alchemy_admin/initializer.js +65 -0
  113. data/app/javascript/alchemy_admin/locales/en.js +31 -0
  114. data/app/javascript/alchemy_admin/picture_editors.js +6 -4
  115. data/app/javascript/alchemy_admin/picture_selector.js +38 -0
  116. data/app/javascript/alchemy_admin/please_wait_overlay.js +8 -0
  117. data/app/javascript/alchemy_admin/sortable_elements.js +78 -0
  118. data/app/javascript/alchemy_admin/spinner.js +36 -0
  119. data/app/javascript/alchemy_admin/tags_autocomplete.js +46 -0
  120. data/app/javascript/alchemy_admin/utils/ajax.js +6 -5
  121. data/app/javascript/alchemy_admin/utils/debounce.js +10 -0
  122. data/app/javascript/alchemy_admin/utils/dom_helpers.js +20 -0
  123. data/app/javascript/alchemy_admin/utils/format.js +11 -0
  124. data/app/javascript/alchemy_admin/utils/max.js +3 -0
  125. data/app/javascript/alchemy_admin/utils/string_conversions.js +10 -0
  126. data/app/javascript/alchemy_admin.js +64 -13
  127. data/app/javascript/menubar.js +10 -0
  128. data/app/models/alchemy/attachment.rb +9 -11
  129. data/app/models/alchemy/element.rb +11 -0
  130. data/app/models/alchemy/ingredients/richtext.rb +1 -10
  131. data/app/models/alchemy/node.rb +4 -0
  132. data/app/models/alchemy/page/page_naming.rb +7 -0
  133. data/app/models/alchemy/page/page_natures.rb +10 -2
  134. data/app/models/alchemy/page.rb +11 -51
  135. data/app/models/alchemy/picture/url.rb +1 -9
  136. data/app/models/alchemy/picture_variant.rb +11 -2
  137. data/app/models/concerns/alchemy/picture_thumbnails.rb +1 -1
  138. data/app/serializers/alchemy/page_tree_serializer.rb +2 -1
  139. data/app/services/alchemy/copy_page.rb +98 -0
  140. data/app/views/alchemy/_menubar.html.erb +17 -13
  141. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +14 -10
  142. data/app/views/alchemy/admin/attachments/_attachment.html.erb +44 -36
  143. data/app/views/alchemy/admin/attachments/_replace_button.html.erb +15 -21
  144. data/app/views/alchemy/admin/attachments/archive_overlay.js.erb +0 -1
  145. data/app/views/alchemy/admin/attachments/assign.js.erb +1 -1
  146. data/app/views/alchemy/admin/attachments/index.html.erb +6 -4
  147. data/app/views/alchemy/admin/attachments/show.html.erb +10 -23
  148. data/app/views/alchemy/admin/clipboard/clear.js.erb +1 -1
  149. data/app/views/alchemy/admin/clipboard/index.html.erb +3 -7
  150. data/app/views/alchemy/admin/clipboard/insert.js.erb +1 -1
  151. data/app/views/alchemy/admin/crop.html.erb +1 -1
  152. data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +1 -1
  153. data/app/views/alchemy/admin/dashboard/index.html.erb +13 -11
  154. data/app/views/alchemy/admin/dashboard/info.html.erb +7 -7
  155. data/app/views/alchemy/admin/elements/_add_nested_element_form.html.erb +21 -23
  156. data/app/views/alchemy/admin/elements/_element.html.erb +52 -44
  157. data/app/views/alchemy/admin/elements/_footer.html.erb +1 -1
  158. data/app/views/alchemy/admin/elements/_form.html.erb +1 -1
  159. data/app/views/alchemy/admin/elements/_header.html.erb +11 -12
  160. data/app/views/alchemy/admin/elements/_toolbar.html.erb +33 -45
  161. data/app/views/alchemy/admin/elements/create.js.erb +7 -15
  162. data/app/views/alchemy/admin/elements/destroy.js.erb +0 -2
  163. data/app/views/alchemy/admin/elements/index.html.erb +27 -24
  164. data/app/views/alchemy/admin/elements/new.html.erb +9 -11
  165. data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +2 -2
  166. data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +3 -3
  167. data/app/views/alchemy/admin/ingredients/_video_fields.html.erb +1 -2
  168. data/app/views/alchemy/admin/languages/_form.html.erb +2 -3
  169. data/app/views/alchemy/admin/languages/_language.html.erb +15 -8
  170. data/app/views/alchemy/admin/languages/_table.html.erb +1 -0
  171. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +28 -16
  172. data/app/views/alchemy/admin/layoutpages/index.html.erb +2 -2
  173. data/app/views/alchemy/admin/legacy_page_urls/_legacy_page_url.html.erb +12 -8
  174. data/app/views/alchemy/admin/legacy_page_urls/_new.html.erb +1 -1
  175. data/app/views/alchemy/admin/nodes/_form.html.erb +20 -21
  176. data/app/views/alchemy/admin/nodes/_node.html.erb +39 -34
  177. data/app/views/alchemy/admin/nodes/index.html.erb +1 -1
  178. data/app/views/alchemy/admin/pages/_anchor_link.html.erb +4 -4
  179. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +2 -2
  180. data/app/views/alchemy/admin/pages/_current_page.html.erb +1 -1
  181. data/app/views/alchemy/admin/pages/_external_link.html.erb +4 -4
  182. data/app/views/alchemy/admin/pages/_file_link.html.erb +5 -5
  183. data/app/views/alchemy/admin/pages/_form.html.erb +10 -21
  184. data/app/views/alchemy/admin/pages/_internal_link.html.erb +4 -4
  185. data/app/views/alchemy/admin/pages/_locked_page.html.erb +2 -2
  186. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +4 -17
  187. data/app/views/alchemy/admin/pages/_page.html.erb +76 -72
  188. data/app/views/alchemy/admin/pages/_page_infos.html.erb +23 -7
  189. data/app/views/alchemy/admin/pages/_page_layout_filter.html.erb +2 -1
  190. data/app/views/alchemy/admin/pages/_page_status.html.erb +11 -21
  191. data/app/views/alchemy/admin/pages/_publication_fields.html.erb +2 -5
  192. data/app/views/alchemy/admin/pages/_table.html.erb +1 -1
  193. data/app/views/alchemy/admin/pages/_table_row.html.erb +43 -39
  194. data/app/views/alchemy/admin/pages/_toolbar.html.erb +43 -38
  195. data/app/views/alchemy/admin/pages/configure.html.erb +12 -14
  196. data/app/views/alchemy/admin/pages/edit.html.erb +80 -103
  197. data/app/views/alchemy/admin/pages/info.html.erb +20 -11
  198. data/app/views/alchemy/admin/pages/link.html.erb +22 -16
  199. data/app/views/alchemy/admin/pages/new.html.erb +9 -11
  200. data/app/views/alchemy/admin/pages/unlock.js.erb +10 -3
  201. data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +15 -13
  202. data/app/views/alchemy/admin/partials/_main_navigation_entry.html.erb +3 -5
  203. data/app/views/alchemy/admin/partials/_routes.html.erb +10 -2
  204. data/app/views/alchemy/admin/partials/_site_select.html.erb +6 -5
  205. data/app/views/alchemy/admin/partials/_toolbar_button.html.erb +28 -23
  206. data/app/views/alchemy/admin/pictures/_archive.html.erb +5 -5
  207. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +1 -1
  208. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +21 -23
  209. data/app/views/alchemy/admin/pictures/_infos.html.erb +2 -6
  210. data/app/views/alchemy/admin/pictures/_picture.html.erb +17 -21
  211. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +17 -16
  212. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +1 -1
  213. data/app/views/alchemy/admin/pictures/archive_overlay.js.erb +1 -1
  214. data/app/views/alchemy/admin/pictures/assign.js.erb +1 -1
  215. data/app/views/alchemy/admin/pictures/index.html.erb +34 -30
  216. data/app/views/alchemy/admin/pictures/show.html.erb +3 -3
  217. data/app/views/alchemy/admin/resources/_filter.html.erb +2 -2
  218. data/app/views/alchemy/admin/resources/_form.html.erb +2 -2
  219. data/app/views/alchemy/admin/resources/_per_page_select.html.erb +1 -1
  220. data/app/views/alchemy/admin/resources/_resource.html.erb +16 -9
  221. data/app/views/alchemy/admin/resources/_table.html.erb +4 -1
  222. data/app/views/alchemy/admin/resources/index.html.erb +22 -19
  223. data/app/views/alchemy/admin/sites/index.html.erb +2 -1
  224. data/app/views/alchemy/admin/styleguide/index.html.erb +54 -28
  225. data/app/views/alchemy/admin/tags/_tag.html.erb +16 -14
  226. data/app/views/alchemy/admin/tags/index.html.erb +15 -12
  227. data/app/views/alchemy/admin/tinymce/_setup.html.erb +28 -0
  228. data/app/views/alchemy/admin/uploader/_button.html.erb +23 -29
  229. data/app/views/alchemy/admin/uploader/_setup.html.erb +3 -8
  230. data/app/views/alchemy/base/500.html.erb +1 -1
  231. data/app/views/alchemy/base/error_notice.js.erb +0 -1
  232. data/app/views/alchemy/ingredients/_boolean_editor.html.erb +1 -1
  233. data/app/views/alchemy/ingredients/_datetime_editor.html.erb +1 -1
  234. data/app/views/alchemy/ingredients/_file_editor.html.erb +5 -5
  235. data/app/views/alchemy/ingredients/_link_editor.html.erb +1 -1
  236. data/app/views/alchemy/ingredients/_node_editor.html.erb +6 -19
  237. data/app/views/alchemy/ingredients/_page_editor.html.erb +7 -19
  238. data/app/views/alchemy/ingredients/_picture_editor.html.erb +2 -2
  239. data/app/views/alchemy/ingredients/_richtext_editor.html.erb +6 -15
  240. data/app/views/alchemy/ingredients/_select_editor.html.erb +2 -1
  241. data/app/views/alchemy/ingredients/_text_editor.html.erb +1 -1
  242. data/app/views/alchemy/ingredients/shared/_anchor.html.erb +1 -1
  243. data/app/views/alchemy/ingredients/shared/_link_tools.html.erb +10 -20
  244. data/app/views/alchemy/ingredients/shared/_picture_tools.html.erb +42 -49
  245. data/app/views/kaminari/alchemy/_first_page.html.erb +4 -2
  246. data/app/views/kaminari/alchemy/_gap.html.erb +1 -1
  247. data/app/views/kaminari/alchemy/_last_page.html.erb +4 -2
  248. data/app/views/kaminari/alchemy/_next_page.html.erb +4 -2
  249. data/app/views/kaminari/alchemy/_prev_page.html.erb +4 -2
  250. data/app/views/layouts/alchemy/admin.html.erb +10 -29
  251. data/bundles/shoelace.js +10 -0
  252. data/bundles/tinymce.js +20 -0
  253. data/config/alchemy/config.yml +11 -10
  254. data/config/alchemy/modules.yml +30 -30
  255. data/config/brakeman.ignore +0 -34
  256. data/config/importmap.rb +9 -5
  257. data/config/initializers/dragonfly.rb +1 -0
  258. data/config/initializers/rails_live_reload.rb +13 -0
  259. data/config/locales/alchemy.en.yml +25 -9
  260. data/config/routes.rb +2 -1
  261. data/lib/alchemy/auth_accessors.rb +6 -1
  262. data/lib/alchemy/config.rb +24 -2
  263. data/lib/alchemy/dev_support/live_reload_watcher.rb +5 -0
  264. data/lib/alchemy/engine.rb +10 -3
  265. data/lib/alchemy/forms/builder.rb +18 -12
  266. data/lib/alchemy/resources_helper.rb +3 -3
  267. data/lib/alchemy/test_support/capybara_helpers.rb +8 -5
  268. data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +6 -6
  269. data/lib/alchemy/test_support/rspec_matchers.rb +14 -0
  270. data/lib/alchemy/test_support/shared_uploader_examples.rb +1 -1
  271. data/lib/alchemy/tinymce.rb +19 -3
  272. data/lib/alchemy/version.rb +1 -1
  273. data/package.json +30 -9
  274. data/rollup.config.mjs +65 -0
  275. data/vendor/assets/fonts/remixicon.eot +0 -0
  276. data/vendor/assets/fonts/remixicon.svg +7816 -0
  277. data/vendor/assets/fonts/remixicon.ttf +0 -0
  278. data/vendor/assets/fonts/remixicon.woff +0 -0
  279. data/vendor/assets/fonts/remixicon.woff2 +0 -0
  280. data/vendor/assets/stylesheets/remixicon.scss +10480 -0
  281. data/vendor/assets/stylesheets/tinymce/skins/content/default/content.min.css +1 -0
  282. data/vendor/javascript/clipboard.min.js +7 -0
  283. data/vendor/javascript/flatpickr.min.js +1 -0
  284. data/vendor/javascript/keymaster.min.js +1 -0
  285. data/vendor/javascript/rails-ujs.min.js +1 -0
  286. data/vendor/javascript/shoelace.min.js +995 -0
  287. data/vendor/javascript/sortable.min.js +7 -0
  288. data/vendor/javascript/tinymce.min.js +1 -0
  289. data/vendor/javascript/ungap-custom-elements.min.js +3 -0
  290. metadata +111 -124
  291. data/.codeclimate.yml +0 -35
  292. data/.editorconfig +0 -23
  293. data/.github/FUNDING.yml +0 -4
  294. data/.github/ISSUE_TEMPLATE/Bug_report.md +0 -22
  295. data/.github/ISSUE_TEMPLATE/Feature_request.md +0 -17
  296. data/.github/PULL_REQUEST_TEMPLATE.md +0 -18
  297. data/.github/workflows/brakeman-analysis.yml +0 -46
  298. data/.github/workflows/lint.yml +0 -37
  299. data/.github/workflows/stale.yml +0 -33
  300. data/.github/workflows/test.yml +0 -124
  301. data/.gitignore +0 -31
  302. data/.hound.yml +0 -9
  303. data/.localeapp/config.rb +0 -8
  304. data/.prettierrc +0 -6
  305. data/.rspec +0 -1
  306. data/.rubocop.yml +0 -7
  307. data/.standard.yml +0 -4
  308. data/.yardopts +0 -5
  309. data/app/assets/javascripts/alchemy/alchemy.autocomplete.js.coffee +0 -30
  310. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +0 -53
  311. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +0 -45
  312. data/app/assets/javascripts/alchemy/alchemy.char_counter.js.coffee +0 -19
  313. data/app/assets/javascripts/alchemy/alchemy.dirty.js.coffee +0 -59
  314. data/app/assets/javascripts/alchemy/alchemy.dragndrop.js.coffee +0 -79
  315. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +0 -267
  316. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +0 -27
  317. data/app/assets/javascripts/alchemy/alchemy.spinner.js +0 -32
  318. data/app/assets/javascripts/alchemy/alchemy.tooltips.coffee +0 -10
  319. data/app/assets/javascripts/alchemy/alchemy.uploader.js.coffee +0 -131
  320. data/app/assets/javascripts/alchemy/menubar.js.coffee +0 -8
  321. data/app/assets/javascripts/alchemy/node_select.js +0 -39
  322. data/app/assets/javascripts/alchemy/page_select.js +0 -46
  323. data/app/assets/javascripts/alchemy/templates/node.hbs +0 -16
  324. data/app/assets/javascripts/alchemy/templates/spinner.hbs +0 -7
  325. data/app/assets/stylesheets/alchemy/jquery-ui.scss +0 -435
  326. data/app/assets/stylesheets/tinymce/skins/alchemy/content.min.css.scss +0 -94
  327. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.svg +0 -63
  328. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.ttf +0 -0
  329. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce-small.woff +0 -0
  330. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.svg +0 -129
  331. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.ttf +0 -0
  332. data/app/assets/stylesheets/tinymce/skins/alchemy/fonts/tinymce.woff +0 -0
  333. data/app/assets/stylesheets/tinymce/skins/alchemy/img/anchor.gif +0 -0
  334. data/app/assets/stylesheets/tinymce/skins/alchemy/img/loader.gif +0 -0
  335. data/app/assets/stylesheets/tinymce/skins/alchemy/img/object.gif +0 -0
  336. data/app/assets/stylesheets/tinymce/skins/alchemy/img/trans.gif +0 -0
  337. data/app/assets/stylesheets/tinymce/skins/alchemy/skin.min.css.scss +0 -2105
  338. data/app/javascript/alchemy_admin/datepicker.js +0 -33
  339. data/app/javascript/alchemy_admin/tinymce.js +0 -146
  340. data/app/javascript/alchemy_admin/translations.js +0 -32
  341. data/app/views/alchemy/admin/elements/fold.js.erb +0 -33
  342. data/app/views/alchemy/admin/elements/order.js.erb +0 -11
  343. data/app/views/alchemy/admin/elements/publish.js.erb +0 -21
  344. data/app/views/alchemy/admin/elements/update.js.erb +0 -27
  345. data/vendor/assets/fonts/fa-regular-400.eot +0 -0
  346. data/vendor/assets/fonts/fa-regular-400.svg +0 -803
  347. data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
  348. data/vendor/assets/fonts/fa-regular-400.woff +0 -0
  349. data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
  350. data/vendor/assets/fonts/fa-solid-900.eot +0 -0
  351. data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
  352. data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
  353. data/vendor/assets/fonts/fa-solid-900.woff +0 -0
  354. data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
  355. data/vendor/assets/javascripts/clipboard.min.js +0 -7
  356. data/vendor/assets/javascripts/fileupload/jquery.fileupload-process.js +0 -178
  357. data/vendor/assets/javascripts/fileupload/jquery.fileupload-validate.js +0 -125
  358. data/vendor/assets/javascripts/fileupload/jquery.fileupload.js +0 -1502
  359. data/vendor/assets/javascripts/fileupload/jquery.iframe-transport.js +0 -224
  360. data/vendor/assets/javascripts/jquery-ui/data.js +0 -45
  361. data/vendor/assets/javascripts/jquery-ui/ie.js +0 -20
  362. data/vendor/assets/javascripts/jquery-ui/keycode.js +0 -51
  363. data/vendor/assets/javascripts/jquery-ui/plugin.js +0 -49
  364. data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +0 -46
  365. data/vendor/assets/javascripts/jquery-ui/safe-blur.js +0 -27
  366. data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +0 -50
  367. data/vendor/assets/javascripts/jquery-ui/unique-id.js +0 -54
  368. data/vendor/assets/javascripts/jquery-ui/version.js +0 -20
  369. data/vendor/assets/javascripts/jquery-ui/widget.js +0 -754
  370. data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +0 -1268
  371. data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +0 -241
  372. data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +0 -1623
  373. data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +0 -931
  374. data/vendor/assets/javascripts/jquery_plugins/jquery.scrollTo.min.js +0 -7
  375. data/vendor/assets/javascripts/jquery_plugins/jquery.ui.tabspaging.js +0 -296
  376. data/vendor/assets/javascripts/keymaster.js +0 -296
  377. data/vendor/assets/javascripts/requestAnimationFrame.js +0 -31
  378. data/vendor/assets/javascripts/tinymce/license.txt +0 -504
  379. data/vendor/assets/javascripts/tinymce/tinymce.min.js +0 -2
  380. data/vendor/assets/stylesheets/fontawesome/_animated.scss +0 -20
  381. data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +0 -20
  382. data/vendor/assets/stylesheets/fontawesome/_core.scss +0 -21
  383. data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +0 -6
  384. data/vendor/assets/stylesheets/fontawesome/_icons.scss +0 -1441
  385. data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
  386. data/vendor/assets/stylesheets/fontawesome/_list.scss +0 -18
  387. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +0 -56
  388. data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +0 -24
  389. data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +0 -5
  390. data/vendor/assets/stylesheets/fontawesome/_stacked.scss +0 -31
  391. data/vendor/assets/stylesheets/fontawesome/_variables.scss +0 -1458
  392. data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +0 -16
  393. data/vendor/assets/stylesheets/fontawesome/regular.scss +0 -23
  394. data/vendor/assets/stylesheets/fontawesome/solid.scss +0 -24
@@ -0,0 +1 @@
1
+ body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,Oxygen,Ubuntu,Cantarell,'Open Sans','Helvetica Neue',sans-serif;line-height:1.4;margin:1rem}table{border-collapse:collapse}table:not([cellpadding]) td,table:not([cellpadding]) th{padding:.4rem}table[border]:not([border="0"]):not([style*=border-width]) td,table[border]:not([border="0"]):not([style*=border-width]) th{border-width:1px}table[border]:not([border="0"]):not([style*=border-style]) td,table[border]:not([border="0"]):not([style*=border-style]) th{border-style:solid}table[border]:not([border="0"]):not([style*=border-color]) td,table[border]:not([border="0"]):not([style*=border-color]) th{border-color:#ccc}figure{display:table;margin:1rem auto}figure figcaption{color:#999;display:block;margin-top:.25rem;text-align:center}hr{border-color:#ccc;border-style:solid;border-width:1px 0 0 0}code{background-color:#e8e8e8;border-radius:3px;padding:.1rem .2rem}.mce-content-body:not([dir=rtl]) blockquote{border-left:2px solid #ccc;margin-left:1.5rem;padding-left:1rem}.mce-content-body[dir=rtl] blockquote{border-right:2px solid #ccc;margin-right:1.5rem;padding-right:1rem}
@@ -0,0 +1,7 @@
1
+ /*!
2
+ * clipboard.js v2.0.11
3
+ * https://clipboardjs.com/
4
+ *
5
+ * Licensed MIT © Zeno Rocha
6
+ */
7
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e();}(window,function(){return n={686:function(t,e,n){n.d(e,{default:function(){return b}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),r=n.n(e);function c(t){try{return document.execCommand(t)}catch(t){return}}var a=function(t){t=r()(t);return c("cut"),t};function o(t,e){var n,o,t=(n=t,o="rtl"===document.documentElement.getAttribute("dir"),(t=document.createElement("textarea")).style.fontSize="12pt",t.style.border="0",t.style.padding="0",t.style.margin="0",t.style.position="absolute",t.style[o?"right":"left"]="-9999px",o=window.pageYOffset||document.documentElement.scrollTop,t.style.top="".concat(o,"px"),t.setAttribute("readonly",""),t.value=n,t);return e.container.appendChild(t),e=r()(t),c("copy"),t.remove(),e}var f=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return "string"==typeof t?n=o(t,e):t instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==t?void 0:t.type)?n=o(t.value,e):(n=r()(t),c("copy")),n};function l(t){return (l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==l(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?f(t,{container:o}):e?"cut"===n?a(e):f(e,{container:o}):void 0};function p(t){return (p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function d(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o);}}function y(t,e){return (y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return !1;if(Reflect.construct.sham)return !1;if("function"==typeof Proxy)return !0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return !1}}();return function(){var t,e=v(n);return t=o?(t=v(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==p(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function v(t){return (v=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function m(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var b=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e);}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(t,e)}},{key:"cut",value:function(t){return a(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t);}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===p(t.container)?t.container:document.body;}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)});}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,n=this.action(e)||"copy",t=s({action:n,container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:n,text:t,trigger:e,clearSelection:function(){e&&e.focus(),window.getSelection().removeAllRanges();}});}},{key:"defaultAction",value:function(t){return m("action",t)}},{key:"defaultTarget",value:function(t){t=m("target",t);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(t){return m("text",t)}},{key:"destroy",value:function(){this.listener.destroy();}}])&&d(t.prototype,e),n&&d(t,n),r}();},828:function(t){var e;"undefined"==typeof Element||Element.prototype.matches||((e=Element.prototype).matches=e.matchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector||e.webkitMatchesSelector),t.exports=function(t,e){for(;t&&9!==t.nodeType;){if("function"==typeof t.matches&&t.matches(e))return t;t=t.parentNode;}};},438:function(t,e,n){var u=n(828);function i(t,e,n,o,r){var i=function(e,n,t,o){return function(t){t.delegateTarget=u(t.target,n),t.delegateTarget&&o.call(e,t);}}.apply(this,arguments);return t.addEventListener(n,i,r),{destroy:function(){t.removeEventListener(n,i,r);}}}t.exports=function(t,e,n,o,r){return "function"==typeof t.addEventListener?i.apply(null,arguments):"function"==typeof n?i.bind(null,document).apply(null,arguments):("string"==typeof t&&(t=document.querySelectorAll(t)),Array.prototype.map.call(t,function(t){return i(t,e,n,o,r)}))};},879:function(t,n){n.node=function(t){return void 0!==t&&t instanceof HTMLElement&&1===t.nodeType},n.nodeList=function(t){var e=Object.prototype.toString.call(t);return void 0!==t&&("[object NodeList]"===e||"[object HTMLCollection]"===e)&&"length"in t&&(0===t.length||n.node(t[0]))},n.string=function(t){return "string"==typeof t||t instanceof String},n.fn=function(t){return "[object Function]"===Object.prototype.toString.call(t)};},370:function(t,e,n){var f=n(879),l=n(438);t.exports=function(t,e,n){if(!t&&!e&&!n)throw new Error("Missing required arguments");if(!f.string(e))throw new TypeError("Second argument must be a String");if(!f.fn(n))throw new TypeError("Third argument must be a Function");if(f.node(t))return c=e,a=n,(u=t).addEventListener(c,a),{destroy:function(){u.removeEventListener(c,a);}};if(f.nodeList(t))return o=t,r=e,i=n,Array.prototype.forEach.call(o,function(t){t.addEventListener(r,i);}),{destroy:function(){Array.prototype.forEach.call(o,function(t){t.removeEventListener(r,i);});}};if(f.string(t))return t=t,e=e,n=n,l(document.body,t,e,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var o,r,i,u,c,a;};},817:function(t){t.exports=function(t){var e,n="SELECT"===t.nodeName?(t.focus(),t.value):"INPUT"===t.nodeName||"TEXTAREA"===t.nodeName?((e=t.hasAttribute("readonly"))||t.setAttribute("readonly",""),t.select(),t.setSelectionRange(0,t.value.length),e||t.removeAttribute("readonly"),t.value):(t.hasAttribute("contenteditable")&&t.focus(),n=window.getSelection(),(e=document.createRange()).selectNodeContents(t),n.removeAllRanges(),n.addRange(e),n.toString());return n};},279:function(t){function e(){}e.prototype={on:function(t,e,n){var o=this.e||(this.e={});return (o[t]||(o[t]=[])).push({fn:e,ctx:n}),this},once:function(t,e,n){var o=this;function r(){o.off(t,r),e.apply(n,arguments);}return r._=e,this.on(t,r,n)},emit:function(t){for(var e=[].slice.call(arguments,1),n=((this.e||(this.e={}))[t]||[]).slice(),o=0,r=n.length;o<r;o++)n[o].fn.apply(n[o].ctx,e);return this},off:function(t,e){var n=this.e||(this.e={}),o=n[t],r=[];if(o&&e)for(var i=0,u=o.length;i<u;i++)o[i].fn!==e&&o[i].fn._!==e&&r.push(o[i]);return r.length?n[t]=r:delete n[t],this}},t.exports=e,t.exports.TinyEmitter=e;}},r={},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,{a:e}),e},o.d=function(t,e){for(var n in e)o.o(e,n)&&!o.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]});},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o(686).default;function o(t){if(r[t])return r[t].exports;var e=r[t]={exports:{}};return n[t](e,e.exports,o),e.exports}var n,r;});
@@ -0,0 +1 @@
1
+ var e=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],n={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var n=new Date(e.getTime());n.setHours(0,0,0,0),n.setDate(n.getDate()+3-(n.getDay()+6)%7);var t=new Date(n.getFullYear(),0,4);return 1+Math.round(((n.getTime()-t.getTime())/864e5-3+(t.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",nextArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,prevArrow:"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1},t={weekdays:{shorthand:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longhand:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},months:{shorthand:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longhand:["January","February","March","April","May","June","July","August","September","October","November","December"]},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],firstDayOfWeek:0,ordinal:function(e){var n=e%100;if(n>3&&n<21)return"th";switch(n%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}},rangeSeparator:" to ",weekAbbreviation:"Wk",scrollTitle:"Scroll to increment",toggleTitle:"Click to toggle",amPM:["AM","PM"],yearAriaLabel:"Year",monthAriaLabel:"Month",hourAriaLabel:"Hour",minuteAriaLabel:"Minute",time_24hr:!1},a=function(e,n){return void 0===n&&(n=2),("000"+e).slice(-1*n)},i=function(e){return!0===e?1:0};function o(e,n){var t;return function(){var a=this,i=arguments;clearTimeout(t),t=setTimeout((function(){return e.apply(a,i)}),n)}}var r=function(e){return e instanceof Array?e:[e]};function l(e,n,t){if(!0===t)return e.classList.add(n);e.classList.remove(n)}function c(e,n,t){var a=window.document.createElement(e);return n=n||"",t=t||"",a.className=n,void 0!==t&&(a.textContent=t),a}function s(e){for(;e.firstChild;)e.removeChild(e.firstChild)}function d(e,n){return n(e)?e:e.parentNode?d(e.parentNode,n):void 0}function u(e,n){var t=c("div","numInputWrapper"),a=c("input","numInput "+e),i=c("span","arrowUp"),o=c("span","arrowDown");if(-1===navigator.userAgent.indexOf("MSIE 9.0")?a.type="number":(a.type="text",a.pattern="\\d*"),void 0!==n)for(var r in n)a.setAttribute(r,n[r]);return t.appendChild(a),t.appendChild(i),t.appendChild(o),t}function f(e){try{return"function"==typeof e.composedPath?e.composedPath()[0]:e.target}catch(n){return e.target}}var m=function(){},g=function(e,n,t){return t.months[n?"shorthand":"longhand"][e]},p={D:m,F:function(e,n,t){e.setMonth(t.months.longhand.indexOf(n))},G:function(e,n){e.setHours((e.getHours()>=12?12:0)+parseFloat(n))},H:function(e,n){e.setHours(parseFloat(n))},J:function(e,n){e.setDate(parseFloat(n))},K:function(e,n,t){e.setHours(e.getHours()%12+12*i(new RegExp(t.amPM[1],"i").test(n)))},M:function(e,n,t){e.setMonth(t.months.shorthand.indexOf(n))},S:function(e,n){e.setSeconds(parseFloat(n))},U:function(e,n){return new Date(1e3*parseFloat(n))},W:function(e,n,t){var a=parseInt(n),i=new Date(e.getFullYear(),0,2+7*(a-1),0,0,0,0);return i.setDate(i.getDate()-i.getDay()+t.firstDayOfWeek),i},Y:function(e,n){e.setFullYear(parseFloat(n))},Z:function(e,n){return new Date(n)},d:function(e,n){e.setDate(parseFloat(n))},h:function(e,n){e.setHours((e.getHours()>=12?12:0)+parseFloat(n))},i:function(e,n){e.setMinutes(parseFloat(n))},j:function(e,n){e.setDate(parseFloat(n))},l:m,m:function(e,n){e.setMonth(parseFloat(n)-1)},n:function(e,n){e.setMonth(parseFloat(n)-1)},s:function(e,n){e.setSeconds(parseFloat(n))},u:function(e,n){return new Date(parseFloat(n))},w:m,y:function(e,n){e.setFullYear(2e3+parseFloat(n))}},h={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},v={Z:function(e){return e.toISOString()},D:function(e,n,t){return n.weekdays.shorthand[v.w(e,n,t)]},F:function(e,n,t){return g(v.n(e,n,t)-1,!1,n)},G:function(e,n,t){return a(v.h(e,n,t))},H:function(e){return a(e.getHours())},J:function(e,n){return void 0!==n.ordinal?e.getDate()+n.ordinal(e.getDate()):e.getDate()},K:function(e,n){return n.amPM[i(e.getHours()>11)]},M:function(e,n){return g(e.getMonth(),!0,n)},S:function(e){return a(e.getSeconds())},U:function(e){return e.getTime()/1e3},W:function(e,n,t){return t.getWeek(e)},Y:function(e){return a(e.getFullYear(),4)},d:function(e){return a(e.getDate())},h:function(e){return e.getHours()%12?e.getHours()%12:12},i:function(e){return a(e.getMinutes())},j:function(e){return e.getDate()},l:function(e,n){return n.weekdays.longhand[e.getDay()]},m:function(e){return a(e.getMonth()+1)},n:function(e){return e.getMonth()+1},s:function(e){return e.getSeconds()},u:function(e){return e.getTime()},w:function(e){return e.getDay()},y:function(e){return String(e.getFullYear()).substring(2)}},D=function(e){var a=e.config,i=void 0===a?n:a,o=e.l10n,r=void 0===o?t:o,l=e.isMobile,c=void 0!==l&&l;return function(e,n,t){var a=t||r;return void 0===i.formatDate||c?n.split("").map((function(n,t,o){return v[n]&&"\\"!==o[t-1]?v[n](e,a,i):"\\"!==n?n:""})).join(""):i.formatDate(e,n,a)}},w=function(e){var a=e.config,i=void 0===a?n:a,o=e.l10n,r=void 0===o?t:o;return function(e,t,a,o){if(0===e||e){var l,c=o||r,s=e;if(e instanceof Date)l=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)l=new Date(e);else if("string"==typeof e){var d=t||(i||n).dateFormat,u=String(e).trim();if("today"===u)l=new Date,a=!0;else if(i&&i.parseDate)l=i.parseDate(e,d);else if(/Z$/.test(u)||/GMT$/.test(u))l=new Date(e);else{for(var f=void 0,m=[],g=0,v=0,D="";g<d.length;g++){var w=d[g],b="\\"===w,C="\\"===d[g-1]||b;if(h[w]&&!C){D+=h[w];var M=new RegExp(D).exec(e);M&&(f=!0)&&m["Y"!==w?"push":"unshift"]({fn:p[w],val:M[++v]})}else b||(D+=".")}l=i&&i.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),m.forEach((function(e){var n=e.fn,t=e.val;return l=n(l,t,c)||l})),l=f?l:void 0}}if(l instanceof Date&&!isNaN(l.getTime()))return!0===a&&l.setHours(0,0,0,0),l;i.errorHandler(new Error("Invalid date provided: "+s))}}};function b(e,n,t){return void 0===t&&(t=!0),!1!==t?new Date(e.getTime()).setHours(0,0,0,0)-new Date(n.getTime()).setHours(0,0,0,0):e.getTime()-n.getTime()}var C=function(e,n,t){return e>Math.min(n,t)&&e<Math.max(n,t)},M=function(e,n,t){return 3600*e+60*n+t},y=function(e){var n=Math.floor(e/3600),t=(e-3600*n)/60;return[n,t,e-3600*n-60*t]},x={DAY:864e5};function E(e){var n=e.defaultHour,t=e.defaultMinute,a=e.defaultSeconds;if(void 0!==e.minDate){var i=e.minDate.getHours(),o=e.minDate.getMinutes(),r=e.minDate.getSeconds();n<i&&(n=i),n===i&&t<o&&(t=o),n===i&&t===o&&a<r&&(a=e.minDate.getSeconds())}if(void 0!==e.maxDate){var l=e.maxDate.getHours(),c=e.maxDate.getMinutes();(n=Math.min(n,l))===l&&(t=Math.min(c,t)),n===l&&t===c&&(a=e.maxDate.getSeconds())}return{hours:n,minutes:t,seconds:a}}"function"!=typeof Object.assign&&(Object.assign=function(e){for(var n=[],t=1;t<arguments.length;t++)n[t-1]=arguments[t];if(!e)throw TypeError("Cannot convert undefined or null to object");for(var a=function(n){n&&Object.keys(n).forEach((function(t){return e[t]=n[t]}))},i=0,o=n;i<o.length;i++){a(o[i])}return e});var k=window&&window.__assign||function(){return k=Object.assign||function(e){for(var n,t=1,a=arguments.length;t<a;t++)for(var i in n=arguments[t])Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i]);return e},k.apply(this,arguments)},T=window&&window.__spreadArrays||function(){for(var e=0,n=0,t=arguments.length;n<t;n++)e+=arguments[n].length;var a=Array(e),i=0;for(n=0;n<t;n++)for(var o=arguments[n],r=0,l=o.length;r<l;r++,i++)a[i]=o[r];return a},I=300;function S(m,p){var v={config:k(k({},n),O.defaultConfig),l10n:t};function S(){var e;return(null===(e=v.calendarContainer)||void 0===e?void 0:e.getRootNode()).activeElement||document.activeElement}function _(e){return e.bind(v)}function F(){var e=v.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==v.calendarContainer&&(v.calendarContainer.style.visibility="hidden",v.calendarContainer.style.display="block"),void 0!==v.daysContainer){var n=(v.days.offsetWidth+1)*e.showMonths;v.daysContainer.style.width=n+"px",v.calendarContainer.style.width=n+(void 0!==v.weekWrapper?v.weekWrapper.offsetWidth:0)+"px",v.calendarContainer.style.removeProperty("visibility"),v.calendarContainer.style.removeProperty("display")}}))}function A(e){if(0===v.selectedDates.length){var n=void 0===v.config.minDate||b(new Date,v.config.minDate)>=0?new Date:new Date(v.config.minDate.getTime()),t=E(v.config);n.setHours(t.hours,t.minutes,t.seconds,n.getMilliseconds()),v.selectedDates=[n],v.latestSelectedDateObj=n}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var n="keydown"===e.type,t=f(e),o=t;void 0!==v.amPM&&t===v.amPM&&(v.amPM.textContent=v.l10n.amPM[i(v.amPM.textContent===v.l10n.amPM[0])]);var r=parseFloat(o.getAttribute("min")),l=parseFloat(o.getAttribute("max")),c=parseFloat(o.getAttribute("step")),s=parseInt(o.value,10),d=e.delta||(n?38===e.which?1:-1:0),u=s+c*d;if(void 0!==o.value&&2===o.value.length){var m=o===v.hourElement,g=o===v.minuteElement;u<r?(u=l+u+i(!m)+(i(m)&&i(!v.amPM)),g&&B(void 0,-1,v.hourElement)):u>l&&(u=o===v.hourElement?u-l-i(!v.amPM):r,g&&B(void 0,1,v.hourElement)),v.amPM&&m&&(1===c?u+s===23:Math.abs(u-s)>c)&&(v.amPM.textContent=v.l10n.amPM[i(v.amPM.textContent===v.l10n.amPM[0])]),o.value=a(u)}}(e);var o=v._input.value;N(),ke(),v._input.value!==o&&v._debouncedChange()}function N(){if(void 0!==v.hourElement&&void 0!==v.minuteElement){var e,n,t=(parseInt(v.hourElement.value.slice(-2),10)||0)%24,a=(parseInt(v.minuteElement.value,10)||0)%60,o=void 0!==v.secondElement?(parseInt(v.secondElement.value,10)||0)%60:0;void 0!==v.amPM&&(e=t,n=v.amPM.textContent,t=e%12+12*i(n===v.l10n.amPM[1]));var r=void 0!==v.config.minTime||v.config.minDate&&v.minDateHasTime&&v.latestSelectedDateObj&&0===b(v.latestSelectedDateObj,v.config.minDate,!0),l=void 0!==v.config.maxTime||v.config.maxDate&&v.maxDateHasTime&&v.latestSelectedDateObj&&0===b(v.latestSelectedDateObj,v.config.maxDate,!0);if(void 0!==v.config.maxTime&&void 0!==v.config.minTime&&v.config.minTime>v.config.maxTime){var c=M(v.config.minTime.getHours(),v.config.minTime.getMinutes(),v.config.minTime.getSeconds()),s=M(v.config.maxTime.getHours(),v.config.maxTime.getMinutes(),v.config.maxTime.getSeconds()),d=M(t,a,o);if(d>s&&d<c){var u=y(c);t=u[0],a=u[1],o=u[2]}}else{if(l){var f=void 0!==v.config.maxTime?v.config.maxTime:v.config.maxDate;(t=Math.min(t,f.getHours()))===f.getHours()&&(a=Math.min(a,f.getMinutes())),a===f.getMinutes()&&(o=Math.min(o,f.getSeconds()))}if(r){var m=void 0!==v.config.minTime?v.config.minTime:v.config.minDate;(t=Math.max(t,m.getHours()))===m.getHours()&&a<m.getMinutes()&&(a=m.getMinutes()),a===m.getMinutes()&&(o=Math.max(o,m.getSeconds()))}}Y(t,a,o)}}function P(e){var n=e||v.latestSelectedDateObj;n&&n instanceof Date&&Y(n.getHours(),n.getMinutes(),n.getSeconds())}function Y(e,n,t){void 0!==v.latestSelectedDateObj&&v.latestSelectedDateObj.setHours(e%24,n,t||0,0),v.hourElement&&v.minuteElement&&!v.isMobile&&(v.hourElement.value=a(v.config.time_24hr?e:(12+e)%12+12*i(e%12==0)),v.minuteElement.value=a(n),void 0!==v.amPM&&(v.amPM.textContent=v.l10n.amPM[i(e>=12)]),void 0!==v.secondElement&&(v.secondElement.value=a(t)))}function j(e){var n=f(e),t=parseInt(n.value)+(e.delta||0);(t/1e3>1||"Enter"===e.key&&!/[^\d]/.test(t.toString()))&&ae(t)}function H(e,n,t,a){return n instanceof Array?n.forEach((function(n){return H(e,n,t,a)})):e instanceof Array?e.forEach((function(e){return H(e,n,t,a)})):(e.addEventListener(n,t,a),void v._handlers.push({remove:function(){return e.removeEventListener(n,t,a)}}))}function L(){Ce("onChange")}function R(e,n){var t=void 0!==e?v.parseDate(e):v.latestSelectedDateObj||(v.config.minDate&&v.config.minDate>v.now?v.config.minDate:v.config.maxDate&&v.config.maxDate<v.now?v.config.maxDate:v.now),a=v.currentYear,i=v.currentMonth;try{void 0!==t&&(v.currentYear=t.getFullYear(),v.currentMonth=t.getMonth())}catch(e){e.message="Invalid date supplied: "+t,v.config.errorHandler(e)}n&&v.currentYear!==a&&(Ce("onYearChange"),z()),!n||v.currentYear===a&&v.currentMonth===i||Ce("onMonthChange"),v.redraw()}function W(e){var n=f(e);~n.className.indexOf("arrow")&&B(e,n.classList.contains("arrowUp")?1:-1)}function B(e,n,t){var a=e&&f(e),i=t||a&&a.parentNode&&a.parentNode.firstChild,o=Me("increment");o.delta=n,i&&i.dispatchEvent(o)}function J(e,n,t,a){var i=ie(n,!0),o=c("span",e,n.getDate().toString());return o.dateObj=n,o.$i=a,o.setAttribute("aria-label",v.formatDate(n,v.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===b(n,v.now)&&(v.todayDateElem=o,o.classList.add("today"),o.setAttribute("aria-current","date")),i?(o.tabIndex=-1,ye(n)&&(o.classList.add("selected"),v.selectedDateElem=o,"range"===v.config.mode&&(l(o,"startRange",v.selectedDates[0]&&0===b(n,v.selectedDates[0],!0)),l(o,"endRange",v.selectedDates[1]&&0===b(n,v.selectedDates[1],!0)),"nextMonthDay"===e&&o.classList.add("inRange")))):o.classList.add("flatpickr-disabled"),"range"===v.config.mode&&function(e){return!("range"!==v.config.mode||v.selectedDates.length<2)&&(b(e,v.selectedDates[0])>=0&&b(e,v.selectedDates[1])<=0)}(n)&&!ye(n)&&o.classList.add("inRange"),v.weekNumbers&&1===v.config.showMonths&&"prevMonthDay"!==e&&a%7==6&&v.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+v.config.getWeek(n)+"</span>"),Ce("onDayCreate",o),o}function K(e){e.focus(),"range"===v.config.mode&&ce(e)}function U(e){for(var n=e>0?0:v.config.showMonths-1,t=e>0?v.config.showMonths:-1,a=n;a!=t;a+=e)for(var i=v.daysContainer.children[a],o=e>0?0:i.children.length-1,r=e>0?i.children.length:-1,l=o;l!=r;l+=e){var c=i.children[l];if(-1===c.className.indexOf("hidden")&&ie(c.dateObj))return c}}function q(e,n){var t=S(),a=oe(t||document.body),i=void 0!==e?e:a?t:void 0!==v.selectedDateElem&&oe(v.selectedDateElem)?v.selectedDateElem:void 0!==v.todayDateElem&&oe(v.todayDateElem)?v.todayDateElem:U(n>0?1:-1);void 0===i?v._input.focus():a?function(e,n){for(var t=-1===e.className.indexOf("Month")?e.dateObj.getMonth():v.currentMonth,a=n>0?v.config.showMonths:-1,i=n>0?1:-1,o=t-v.currentMonth;o!=a;o+=i)for(var r=v.daysContainer.children[o],l=t-v.currentMonth===o?e.$i+n:n<0?r.children.length-1:0,c=r.children.length,s=l;s>=0&&s<c&&s!=(n>0?c:-1);s+=i){var d=r.children[s];if(-1===d.className.indexOf("hidden")&&ie(d.dateObj)&&Math.abs(e.$i-s)>=Math.abs(n))return K(d)}v.changeMonth(i),q(U(i),0)}(i,n):K(i)}function $(e,n){for(var t=(new Date(e,n,1).getDay()-v.l10n.firstDayOfWeek+7)%7,a=v.utils.getDaysInMonth((n-1+12)%12,e),i=v.utils.getDaysInMonth(n,e),o=window.document.createDocumentFragment(),r=v.config.showMonths>1,l=r?"prevMonthDay hidden":"prevMonthDay",s=r?"nextMonthDay hidden":"nextMonthDay",d=a+1-t,u=0;d<=a;d++,u++)o.appendChild(J("flatpickr-day "+l,new Date(e,n-1,d),0,u));for(d=1;d<=i;d++,u++)o.appendChild(J("flatpickr-day",new Date(e,n,d),0,u));for(var f=i+1;f<=42-t&&(1===v.config.showMonths||u%7!=0);f++,u++)o.appendChild(J("flatpickr-day "+s,new Date(e,n+1,f%i),0,u));var m=c("div","dayContainer");return m.appendChild(o),m}function V(){if(void 0!==v.daysContainer){s(v.daysContainer),v.weekNumbers&&s(v.weekNumbers);for(var e=document.createDocumentFragment(),n=0;n<v.config.showMonths;n++){var t=new Date(v.currentYear,v.currentMonth,1);t.setMonth(v.currentMonth+n),e.appendChild($(t.getFullYear(),t.getMonth()))}v.daysContainer.appendChild(e),v.days=v.daysContainer.firstChild,"range"===v.config.mode&&1===v.selectedDates.length&&ce()}}function z(){if(!(v.config.showMonths>1||"dropdown"!==v.config.monthSelectorType)){var e=function(e){return!(void 0!==v.config.minDate&&v.currentYear===v.config.minDate.getFullYear()&&e<v.config.minDate.getMonth())&&!(void 0!==v.config.maxDate&&v.currentYear===v.config.maxDate.getFullYear()&&e>v.config.maxDate.getMonth())};v.monthsDropdownContainer.tabIndex=-1,v.monthsDropdownContainer.innerHTML="";for(var n=0;n<12;n++)if(e(n)){var t=c("option","flatpickr-monthDropdown-month");t.value=new Date(v.currentYear,n).getMonth().toString(),t.textContent=g(n,v.config.shorthandCurrentMonth,v.l10n),t.tabIndex=-1,v.currentMonth===n&&(t.selected=!0),v.monthsDropdownContainer.appendChild(t)}}}function G(){var e,n=c("div","flatpickr-month"),t=window.document.createDocumentFragment();v.config.showMonths>1||"static"===v.config.monthSelectorType?e=c("span","cur-month"):(v.monthsDropdownContainer=c("select","flatpickr-monthDropdown-months"),v.monthsDropdownContainer.setAttribute("aria-label",v.l10n.monthAriaLabel),H(v.monthsDropdownContainer,"change",(function(e){var n=f(e),t=parseInt(n.value,10);v.changeMonth(t-v.currentMonth),Ce("onMonthChange")})),z(),e=v.monthsDropdownContainer);var a=u("cur-year",{tabindex:"-1"}),i=a.getElementsByTagName("input")[0];i.setAttribute("aria-label",v.l10n.yearAriaLabel),v.config.minDate&&i.setAttribute("min",v.config.minDate.getFullYear().toString()),v.config.maxDate&&(i.setAttribute("max",v.config.maxDate.getFullYear().toString()),i.disabled=!!v.config.minDate&&v.config.minDate.getFullYear()===v.config.maxDate.getFullYear());var o=c("div","flatpickr-current-month");return o.appendChild(e),o.appendChild(a),t.appendChild(o),n.appendChild(t),{container:n,yearElement:i,monthElement:e}}function Z(){s(v.monthNav),v.monthNav.appendChild(v.prevMonthNav),v.config.showMonths&&(v.yearElements=[],v.monthElements=[]);for(var e=v.config.showMonths;e--;){var n=G();v.yearElements.push(n.yearElement),v.monthElements.push(n.monthElement),v.monthNav.appendChild(n.container)}v.monthNav.appendChild(v.nextMonthNav)}function Q(){v.weekdayContainer?s(v.weekdayContainer):v.weekdayContainer=c("div","flatpickr-weekdays");for(var e=v.config.showMonths;e--;){var n=c("div","flatpickr-weekdaycontainer");v.weekdayContainer.appendChild(n)}return X(),v.weekdayContainer}function X(){if(v.weekdayContainer){var e=v.l10n.firstDayOfWeek,n=T(v.l10n.weekdays.shorthand);e>0&&e<n.length&&(n=T(n.splice(e,n.length),n.splice(0,e)));for(var t=v.config.showMonths;t--;)v.weekdayContainer.children[t].innerHTML="\n <span class='flatpickr-weekday'>\n "+n.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function ee(e,n){void 0===n&&(n=!0);var t=n?e:e-v.currentMonth;t<0&&!0===v._hidePrevMonthArrow||t>0&&!0===v._hideNextMonthArrow||(v.currentMonth+=t,(v.currentMonth<0||v.currentMonth>11)&&(v.currentYear+=v.currentMonth>11?1:-1,v.currentMonth=(v.currentMonth+12)%12,Ce("onYearChange"),z()),V(),Ce("onMonthChange"),xe())}function ne(e){return v.calendarContainer.contains(e)}function te(e){if(v.isOpen&&!v.config.inline){var n=f(e),t=ne(n),a=!(n===v.input||n===v.altInput||v.element.contains(n)||e.path&&e.path.indexOf&&(~e.path.indexOf(v.input)||~e.path.indexOf(v.altInput)))&&!t&&!ne(e.relatedTarget),i=!v.config.ignoredFocusElements.some((function(e){return e.contains(n)}));a&&i&&(v.config.allowInput&&v.setDate(v._input.value,!1,v.config.altInput?v.config.altFormat:v.config.dateFormat),void 0!==v.timeContainer&&void 0!==v.minuteElement&&void 0!==v.hourElement&&""!==v.input.value&&void 0!==v.input.value&&A(),v.close(),v.config&&"range"===v.config.mode&&1===v.selectedDates.length&&v.clear(!1))}}function ae(e){if(!(!e||v.config.minDate&&e<v.config.minDate.getFullYear()||v.config.maxDate&&e>v.config.maxDate.getFullYear())){var n=e,t=v.currentYear!==n;v.currentYear=n||v.currentYear,v.config.maxDate&&v.currentYear===v.config.maxDate.getFullYear()?v.currentMonth=Math.min(v.config.maxDate.getMonth(),v.currentMonth):v.config.minDate&&v.currentYear===v.config.minDate.getFullYear()&&(v.currentMonth=Math.max(v.config.minDate.getMonth(),v.currentMonth)),t&&(v.redraw(),Ce("onYearChange"),z())}}function ie(e,n){var t;void 0===n&&(n=!0);var a=v.parseDate(e,void 0,n);if(v.config.minDate&&a&&b(a,v.config.minDate,void 0!==n?n:!v.minDateHasTime)<0||v.config.maxDate&&a&&b(a,v.config.maxDate,void 0!==n?n:!v.maxDateHasTime)>0)return!1;if(!v.config.enable&&0===v.config.disable.length)return!0;if(void 0===a)return!1;for(var i=!!v.config.enable,o=null!==(t=v.config.enable)&&void 0!==t?t:v.config.disable,r=0,l=void 0;r<o.length;r++){if("function"==typeof(l=o[r])&&l(a))return i;if(l instanceof Date&&void 0!==a&&l.getTime()===a.getTime())return i;if("string"==typeof l){var c=v.parseDate(l,void 0,!0);return c&&c.getTime()===a.getTime()?i:!i}if("object"==typeof l&&void 0!==a&&l.from&&l.to&&a.getTime()>=l.from.getTime()&&a.getTime()<=l.to.getTime())return i}return!i}function oe(e){return void 0!==v.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&v.daysContainer.contains(e))}function re(e){var n=e.target===v._input,t=v._input.value.trimEnd()!==Ee();!n||!t||e.relatedTarget&&ne(e.relatedTarget)||v.setDate(v._input.value,!0,e.target===v.altInput?v.config.altFormat:v.config.dateFormat)}function le(e){var n=f(e),t=v.config.wrap?m.contains(n):n===v._input,a=v.config.allowInput,i=v.isOpen&&(!a||!t),o=v.config.inline&&t&&!a;if(13===e.keyCode&&t){if(a)return v.setDate(v._input.value,!0,n===v.altInput?v.config.altFormat:v.config.dateFormat),v.close(),n.blur();v.open()}else if(ne(n)||i||o){var r=!!v.timeContainer&&v.timeContainer.contains(n);switch(e.keyCode){case 13:r?(e.preventDefault(),A(),pe()):he(e);break;case 27:e.preventDefault(),pe();break;case 8:case 46:t&&!v.config.allowInput&&(e.preventDefault(),v.clear());break;case 37:case 39:if(r||t)v.hourElement&&v.hourElement.focus();else{e.preventDefault();var l=S();if(void 0!==v.daysContainer&&(!1===a||l&&oe(l))){var c=39===e.keyCode?1:-1;e.ctrlKey?(e.stopPropagation(),ee(c),q(U(1),0)):q(void 0,c)}}break;case 38:case 40:e.preventDefault();var s=40===e.keyCode?1:-1;v.daysContainer&&void 0!==n.$i||n===v.input||n===v.altInput?e.ctrlKey?(e.stopPropagation(),ae(v.currentYear-s),q(U(1),0)):r||q(void 0,7*s):n===v.currentYearElement?ae(v.currentYear-s):v.config.enableTime&&(!r&&v.hourElement&&v.hourElement.focus(),A(e),v._debouncedChange());break;case 9:if(r){var d=[v.hourElement,v.minuteElement,v.secondElement,v.amPM].concat(v.pluginElements).filter((function(e){return e})),u=d.indexOf(n);if(-1!==u){var g=d[u+(e.shiftKey?-1:1)];e.preventDefault(),(g||v._input).focus()}}else!v.config.noCalendar&&v.daysContainer&&v.daysContainer.contains(n)&&e.shiftKey&&(e.preventDefault(),v._input.focus())}}if(void 0!==v.amPM&&n===v.amPM)switch(e.key){case v.l10n.amPM[0].charAt(0):case v.l10n.amPM[0].charAt(0).toLowerCase():v.amPM.textContent=v.l10n.amPM[0],N(),ke();break;case v.l10n.amPM[1].charAt(0):case v.l10n.amPM[1].charAt(0).toLowerCase():v.amPM.textContent=v.l10n.amPM[1],N(),ke()}(t||ne(n))&&Ce("onKeyDown",e)}function ce(e,n){if(void 0===n&&(n="flatpickr-day"),1===v.selectedDates.length&&(!e||e.classList.contains(n)&&!e.classList.contains("flatpickr-disabled"))){for(var t=e?e.dateObj.getTime():v.days.firstElementChild.dateObj.getTime(),a=v.parseDate(v.selectedDates[0],void 0,!0).getTime(),i=Math.min(t,v.selectedDates[0].getTime()),o=Math.max(t,v.selectedDates[0].getTime()),r=!1,l=0,c=0,s=i;s<o;s+=x.DAY)ie(new Date(s),!0)||(r=r||s>i&&s<o,s<a&&(!l||s>l)?l=s:s>a&&(!c||s<c)&&(c=s));Array.from(v.rContainer.querySelectorAll("*:nth-child(-n+"+v.config.showMonths+") > ."+n)).forEach((function(n){var i=n.dateObj.getTime(),o=l>0&&i<l||c>0&&i>c;if(o)return n.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(e){n.classList.remove(e)}));r&&!o||(["startRange","inRange","endRange","notAllowed"].forEach((function(e){n.classList.remove(e)})),void 0!==e&&(e.classList.add(t<=v.selectedDates[0].getTime()?"startRange":"endRange"),a<t&&i===a?n.classList.add("startRange"):a>t&&i===a&&n.classList.add("endRange"),i>=l&&(0===c||i<=c)&&C(i,a,t)&&n.classList.add("inRange")))}))}}function se(){!v.isOpen||v.config.static||v.config.inline||me()}function de(e){return function(n){var t=v.config["_"+e+"Date"]=v.parseDate(n,v.config.dateFormat),a=v.config["_"+("min"===e?"max":"min")+"Date"];void 0!==t&&(v["min"===e?"minDateHasTime":"maxDateHasTime"]=t.getHours()>0||t.getMinutes()>0||t.getSeconds()>0),v.selectedDates&&(v.selectedDates=v.selectedDates.filter((function(e){return ie(e)})),v.selectedDates.length||"min"!==e||P(t),ke()),v.daysContainer&&(ge(),void 0!==t?v.currentYearElement[e]=t.getFullYear().toString():v.currentYearElement.removeAttribute(e),v.currentYearElement.disabled=!!a&&void 0!==t&&a.getFullYear()===t.getFullYear())}}function ue(){return v.config.wrap?m.querySelector("[data-input]"):m}function fe(){"object"!=typeof v.config.locale&&void 0===O.l10ns[v.config.locale]&&v.config.errorHandler(new Error("flatpickr: invalid locale "+v.config.locale)),v.l10n=k(k({},O.l10ns.default),"object"==typeof v.config.locale?v.config.locale:"default"!==v.config.locale?O.l10ns[v.config.locale]:void 0),h.D="("+v.l10n.weekdays.shorthand.join("|")+")",h.l="("+v.l10n.weekdays.longhand.join("|")+")",h.M="("+v.l10n.months.shorthand.join("|")+")",h.F="("+v.l10n.months.longhand.join("|")+")",h.K="("+v.l10n.amPM[0]+"|"+v.l10n.amPM[1]+"|"+v.l10n.amPM[0].toLowerCase()+"|"+v.l10n.amPM[1].toLowerCase()+")",void 0===k(k({},p),JSON.parse(JSON.stringify(m.dataset||{}))).time_24hr&&void 0===O.defaultConfig.time_24hr&&(v.config.time_24hr=v.l10n.time_24hr),v.formatDate=D(v),v.parseDate=w({config:v.config,l10n:v.l10n})}function me(e){if("function"!=typeof v.config.position){if(void 0!==v.calendarContainer){Ce("onPreCalendarPosition");var n=e||v._positionElement,t=Array.prototype.reduce.call(v.calendarContainer.children,(function(e,n){return e+n.offsetHeight}),0),a=v.calendarContainer.offsetWidth,i=v.config.position.split(" "),o=i[0],r=i.length>1?i[1]:null,c=n.getBoundingClientRect(),s=window.innerHeight-c.bottom,d="above"===o||"below"!==o&&s<t&&c.top>t,u=window.pageYOffset+c.top+(d?-t-2:n.offsetHeight+2);if(l(v.calendarContainer,"arrowTop",!d),l(v.calendarContainer,"arrowBottom",d),!v.config.inline){var f=window.pageXOffset+c.left,m=!1,g=!1;"center"===r?(f-=(a-c.width)/2,m=!0):"right"===r&&(f-=a-c.width,g=!0),l(v.calendarContainer,"arrowLeft",!m&&!g),l(v.calendarContainer,"arrowCenter",m),l(v.calendarContainer,"arrowRight",g);var p=window.document.body.offsetWidth-(window.pageXOffset+c.right),h=f+a>window.document.body.offsetWidth,D=p+a>window.document.body.offsetWidth;if(l(v.calendarContainer,"rightMost",h),!v.config.static)if(v.calendarContainer.style.top=u+"px",h)if(D){var w=function(){for(var e=null,n=0;n<document.styleSheets.length;n++){var t=document.styleSheets[n];if(t.cssRules){try{t.cssRules}catch(e){continue}e=t;break}}return null!=e?e:(a=document.createElement("style"),document.head.appendChild(a),a.sheet);var a}();if(void 0===w)return;var b=window.document.body.offsetWidth,C=Math.max(0,b/2-a/2),M=w.cssRules.length,y="{left:"+c.left+"px;right:auto;}";l(v.calendarContainer,"rightMost",!1),l(v.calendarContainer,"centerMost",!0),w.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+y,M),v.calendarContainer.style.left=C+"px",v.calendarContainer.style.right="auto"}else v.calendarContainer.style.left="auto",v.calendarContainer.style.right=p+"px";else v.calendarContainer.style.left=f+"px",v.calendarContainer.style.right="auto"}}}else v.config.position(v,e)}function ge(){v.config.noCalendar||v.isMobile||(z(),xe(),V())}function pe(){v._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(v.close,0):v.close()}function he(e){e.preventDefault(),e.stopPropagation();var n=d(f(e),(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")}));if(void 0!==n){var t=n,a=v.latestSelectedDateObj=new Date(t.dateObj.getTime()),i=(a.getMonth()<v.currentMonth||a.getMonth()>v.currentMonth+v.config.showMonths-1)&&"range"!==v.config.mode;if(v.selectedDateElem=t,"single"===v.config.mode)v.selectedDates=[a];else if("multiple"===v.config.mode){var o=ye(a);o?v.selectedDates.splice(parseInt(o),1):v.selectedDates.push(a)}else"range"===v.config.mode&&(2===v.selectedDates.length&&v.clear(!1,!1),v.latestSelectedDateObj=a,v.selectedDates.push(a),0!==b(a,v.selectedDates[0],!0)&&v.selectedDates.sort((function(e,n){return e.getTime()-n.getTime()})));if(N(),i){var r=v.currentYear!==a.getFullYear();v.currentYear=a.getFullYear(),v.currentMonth=a.getMonth(),r&&(Ce("onYearChange"),z()),Ce("onMonthChange")}if(xe(),V(),ke(),i||"range"===v.config.mode||1!==v.config.showMonths?void 0!==v.selectedDateElem&&void 0===v.hourElement&&v.selectedDateElem&&v.selectedDateElem.focus():K(t),void 0!==v.hourElement&&void 0!==v.hourElement&&v.hourElement.focus(),v.config.closeOnSelect){var l="single"===v.config.mode&&!v.config.enableTime,c="range"===v.config.mode&&2===v.selectedDates.length&&!v.config.enableTime;(l||c)&&pe()}L()}}v.parseDate=w({config:v.config,l10n:v.l10n}),v._handlers=[],v.pluginElements=[],v.loadedPlugins=[],v._bind=H,v._setHoursFromDate=P,v._positionCalendar=me,v.changeMonth=ee,v.changeYear=ae,v.clear=function(e,n){void 0===e&&(e=!0);void 0===n&&(n=!0);v.input.value="",void 0!==v.altInput&&(v.altInput.value="");void 0!==v.mobileInput&&(v.mobileInput.value="");v.selectedDates=[],v.latestSelectedDateObj=void 0,!0===n&&(v.currentYear=v._initialDate.getFullYear(),v.currentMonth=v._initialDate.getMonth());if(!0===v.config.enableTime){var t=E(v.config);Y(t.hours,t.minutes,t.seconds)}v.redraw(),e&&Ce("onChange")},v.close=function(){v.isOpen=!1,v.isMobile||(void 0!==v.calendarContainer&&v.calendarContainer.classList.remove("open"),void 0!==v._input&&v._input.classList.remove("active"));Ce("onClose")},v.onMouseOver=ce,v._createElement=c,v.createDay=J,v.destroy=function(){void 0!==v.config&&Ce("onDestroy");for(var e=v._handlers.length;e--;)v._handlers[e].remove();if(v._handlers=[],v.mobileInput)v.mobileInput.parentNode&&v.mobileInput.parentNode.removeChild(v.mobileInput),v.mobileInput=void 0;else if(v.calendarContainer&&v.calendarContainer.parentNode)if(v.config.static&&v.calendarContainer.parentNode){var n=v.calendarContainer.parentNode;if(n.lastChild&&n.removeChild(n.lastChild),n.parentNode){for(;n.firstChild;)n.parentNode.insertBefore(n.firstChild,n);n.parentNode.removeChild(n)}}else v.calendarContainer.parentNode.removeChild(v.calendarContainer);v.altInput&&(v.input.type="text",v.altInput.parentNode&&v.altInput.parentNode.removeChild(v.altInput),delete v.altInput);v.input&&(v.input.type=v.input._type,v.input.classList.remove("flatpickr-input"),v.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete v[e]}catch(e){}}))},v.isEnabled=ie,v.jumpToDate=R,v.updateValue=ke,v.open=function(e,n){void 0===n&&(n=v._positionElement);if(!0===v.isMobile){if(e){e.preventDefault();var t=f(e);t&&t.blur()}return void 0!==v.mobileInput&&(v.mobileInput.focus(),v.mobileInput.click()),void Ce("onOpen")}if(v._input.disabled||v.config.inline)return;var a=v.isOpen;v.isOpen=!0,a||(v.calendarContainer.classList.add("open"),v._input.classList.add("active"),Ce("onOpen"),me(n));!0===v.config.enableTime&&!0===v.config.noCalendar&&(!1!==v.config.allowInput||void 0!==e&&v.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return v.hourElement.select()}),50))},v.redraw=ge,v.set=function(n,t){if(null!==n&&"object"==typeof n)for(var a in Object.assign(v.config,n),n)void 0!==ve[a]&&ve[a].forEach((function(e){return e()}));else v.config[n]=t,void 0!==ve[n]?ve[n].forEach((function(e){return e()})):e.indexOf(n)>-1&&(v.config[n]=r(t));v.redraw(),ke(!0)},v.setDate=function(e,n,t){void 0===n&&(n=!1);void 0===t&&(t=v.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return v.clear(n);De(e,t),v.latestSelectedDateObj=v.selectedDates[v.selectedDates.length-1],v.redraw(),R(void 0,n),P(),0===v.selectedDates.length&&v.clear(!1);ke(n),n&&Ce("onChange")},v.toggle=function(e){if(!0===v.isOpen)return v.close();v.open(e)};var ve={locale:[fe,X],showMonths:[Z,F,Q],minDate:[R],maxDate:[R],positionElement:[be],clickOpens:[function(){!0===v.config.clickOpens?(H(v._input,"focus",v.open),H(v._input,"click",v.open)):(v._input.removeEventListener("focus",v.open),v._input.removeEventListener("click",v.open))}]};function De(e,n){var t=[];if(e instanceof Array)t=e.map((function(e){return v.parseDate(e,n)}));else if(e instanceof Date||"number"==typeof e)t=[v.parseDate(e,n)];else if("string"==typeof e)switch(v.config.mode){case"single":case"time":t=[v.parseDate(e,n)];break;case"multiple":t=e.split(v.config.conjunction).map((function(e){return v.parseDate(e,n)}));break;case"range":t=e.split(v.l10n.rangeSeparator).map((function(e){return v.parseDate(e,n)}))}else v.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));v.selectedDates=v.config.allowInvalidPreload?t:t.filter((function(e){return e instanceof Date&&ie(e,!1)})),"range"===v.config.mode&&v.selectedDates.sort((function(e,n){return e.getTime()-n.getTime()}))}function we(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?v.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:v.parseDate(e.from,void 0),to:v.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function be(){v._positionElement=v.config.positionElement||v._input}function Ce(e,n){if(void 0!==v.config){var t=v.config[e];if(void 0!==t&&t.length>0)for(var a=0;t[a]&&a<t.length;a++)t[a](v.selectedDates,v.input.value,v,n);"onChange"===e&&(v.input.dispatchEvent(Me("change")),v.input.dispatchEvent(Me("input")))}}function Me(e){var n=document.createEvent("Event");return n.initEvent(e,!0,!0),n}function ye(e){for(var n=0;n<v.selectedDates.length;n++){var t=v.selectedDates[n];if(t instanceof Date&&0===b(t,e))return""+n}return!1}function xe(){v.config.noCalendar||v.isMobile||!v.monthNav||(v.yearElements.forEach((function(e,n){var t=new Date(v.currentYear,v.currentMonth,1);t.setMonth(v.currentMonth+n),v.config.showMonths>1||"static"===v.config.monthSelectorType?v.monthElements[n].textContent=g(t.getMonth(),v.config.shorthandCurrentMonth,v.l10n)+" ":v.monthsDropdownContainer.value=t.getMonth().toString(),e.value=t.getFullYear().toString()})),v._hidePrevMonthArrow=void 0!==v.config.minDate&&(v.currentYear===v.config.minDate.getFullYear()?v.currentMonth<=v.config.minDate.getMonth():v.currentYear<v.config.minDate.getFullYear()),v._hideNextMonthArrow=void 0!==v.config.maxDate&&(v.currentYear===v.config.maxDate.getFullYear()?v.currentMonth+1>v.config.maxDate.getMonth():v.currentYear>v.config.maxDate.getFullYear()))}function Ee(e){var n=e||(v.config.altInput?v.config.altFormat:v.config.dateFormat);return v.selectedDates.map((function(e){return v.formatDate(e,n)})).filter((function(e,n,t){return"range"!==v.config.mode||v.config.enableTime||t.indexOf(e)===n})).join("range"!==v.config.mode?v.config.conjunction:v.l10n.rangeSeparator)}function ke(e){void 0===e&&(e=!0),void 0!==v.mobileInput&&v.mobileFormatStr&&(v.mobileInput.value=void 0!==v.latestSelectedDateObj?v.formatDate(v.latestSelectedDateObj,v.mobileFormatStr):""),v.input.value=Ee(v.config.dateFormat),void 0!==v.altInput&&(v.altInput.value=Ee(v.config.altFormat)),!1!==e&&Ce("onValueUpdate")}function Te(e){var n=f(e),t=v.prevMonthNav.contains(n),a=v.nextMonthNav.contains(n);t||a?ee(t?-1:1):v.yearElements.indexOf(n)>=0?n.select():n.classList.contains("arrowUp")?v.changeYear(v.currentYear+1):n.classList.contains("arrowDown")&&v.changeYear(v.currentYear-1)}return function(){v.element=v.input=m,v.isOpen=!1,function(){var t=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],a=k(k({},JSON.parse(JSON.stringify(m.dataset||{}))),p),i={};v.config.parseDate=a.parseDate,v.config.formatDate=a.formatDate,Object.defineProperty(v.config,"enable",{get:function(){return v.config._enable},set:function(e){v.config._enable=we(e)}}),Object.defineProperty(v.config,"disable",{get:function(){return v.config._disable},set:function(e){v.config._disable=we(e)}});var o="time"===a.mode;if(!a.dateFormat&&(a.enableTime||o)){var l=O.defaultConfig.dateFormat||n.dateFormat;i.dateFormat=a.noCalendar||o?"H:i"+(a.enableSeconds?":S":""):l+" H:i"+(a.enableSeconds?":S":"")}if(a.altInput&&(a.enableTime||o)&&!a.altFormat){var c=O.defaultConfig.altFormat||n.altFormat;i.altFormat=a.noCalendar||o?"h:i"+(a.enableSeconds?":S K":" K"):c+" h:i"+(a.enableSeconds?":S":"")+" K"}Object.defineProperty(v.config,"minDate",{get:function(){return v.config._minDate},set:de("min")}),Object.defineProperty(v.config,"maxDate",{get:function(){return v.config._maxDate},set:de("max")});var s=function(e){return function(n){v.config["min"===e?"_minTime":"_maxTime"]=v.parseDate(n,"H:i:S")}};Object.defineProperty(v.config,"minTime",{get:function(){return v.config._minTime},set:s("min")}),Object.defineProperty(v.config,"maxTime",{get:function(){return v.config._maxTime},set:s("max")}),"time"===a.mode&&(v.config.noCalendar=!0,v.config.enableTime=!0);Object.assign(v.config,i,a);for(var d=0;d<t.length;d++)v.config[t[d]]=!0===v.config[t[d]]||"true"===v.config[t[d]];e.filter((function(e){return void 0!==v.config[e]})).forEach((function(e){v.config[e]=r(v.config[e]||[]).map(_)})),v.isMobile=!v.config.disableMobile&&!v.config.inline&&"single"===v.config.mode&&!v.config.disable.length&&!v.config.enable&&!v.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(d=0;d<v.config.plugins.length;d++){var u=v.config.plugins[d](v)||{};for(var f in u)e.indexOf(f)>-1?v.config[f]=r(u[f]).map(_).concat(v.config[f]):void 0===a[f]&&(v.config[f]=u[f])}a.altInputClass||(v.config.altInputClass=ue().className+" "+v.config.altInputClass);Ce("onParseConfig")}(),fe(),function(){if(v.input=ue(),!v.input)return void v.config.errorHandler(new Error("Invalid input element specified"));v.input._type=v.input.type,v.input.type="text",v.input.classList.add("flatpickr-input"),v._input=v.input,v.config.altInput&&(v.altInput=c(v.input.nodeName,v.config.altInputClass),v._input=v.altInput,v.altInput.placeholder=v.input.placeholder,v.altInput.disabled=v.input.disabled,v.altInput.required=v.input.required,v.altInput.tabIndex=v.input.tabIndex,v.altInput.type="text",v.input.setAttribute("type","hidden"),!v.config.static&&v.input.parentNode&&v.input.parentNode.insertBefore(v.altInput,v.input.nextSibling));v.config.allowInput||v._input.setAttribute("readonly","readonly");be()}(),function(){v.selectedDates=[],v.now=v.parseDate(v.config.now)||new Date;var e=v.config.defaultDate||("INPUT"!==v.input.nodeName&&"TEXTAREA"!==v.input.nodeName||!v.input.placeholder||v.input.value!==v.input.placeholder?v.input.value:null);e&&De(e,v.config.dateFormat);v._initialDate=v.selectedDates.length>0?v.selectedDates[0]:v.config.minDate&&v.config.minDate.getTime()>v.now.getTime()?v.config.minDate:v.config.maxDate&&v.config.maxDate.getTime()<v.now.getTime()?v.config.maxDate:v.now,v.currentYear=v._initialDate.getFullYear(),v.currentMonth=v._initialDate.getMonth(),v.selectedDates.length>0&&(v.latestSelectedDateObj=v.selectedDates[0]);void 0!==v.config.minTime&&(v.config.minTime=v.parseDate(v.config.minTime,"H:i"));void 0!==v.config.maxTime&&(v.config.maxTime=v.parseDate(v.config.maxTime,"H:i"));v.minDateHasTime=!!v.config.minDate&&(v.config.minDate.getHours()>0||v.config.minDate.getMinutes()>0||v.config.minDate.getSeconds()>0),v.maxDateHasTime=!!v.config.maxDate&&(v.config.maxDate.getHours()>0||v.config.maxDate.getMinutes()>0||v.config.maxDate.getSeconds()>0)}(),v.utils={getDaysInMonth:function(e,n){return void 0===e&&(e=v.currentMonth),void 0===n&&(n=v.currentYear),1===e&&(n%4==0&&n%100!=0||n%400==0)?29:v.l10n.daysInMonth[e]}},v.isMobile||function(){var e=window.document.createDocumentFragment();if(v.calendarContainer=c("div","flatpickr-calendar"),v.calendarContainer.tabIndex=-1,!v.config.noCalendar){if(e.appendChild((v.monthNav=c("div","flatpickr-months"),v.yearElements=[],v.monthElements=[],v.prevMonthNav=c("span","flatpickr-prev-month"),v.prevMonthNav.innerHTML=v.config.prevArrow,v.nextMonthNav=c("span","flatpickr-next-month"),v.nextMonthNav.innerHTML=v.config.nextArrow,Z(),Object.defineProperty(v,"_hidePrevMonthArrow",{get:function(){return v.__hidePrevMonthArrow},set:function(e){v.__hidePrevMonthArrow!==e&&(l(v.prevMonthNav,"flatpickr-disabled",e),v.__hidePrevMonthArrow=e)}}),Object.defineProperty(v,"_hideNextMonthArrow",{get:function(){return v.__hideNextMonthArrow},set:function(e){v.__hideNextMonthArrow!==e&&(l(v.nextMonthNav,"flatpickr-disabled",e),v.__hideNextMonthArrow=e)}}),v.currentYearElement=v.yearElements[0],xe(),v.monthNav)),v.innerContainer=c("div","flatpickr-innerContainer"),v.config.weekNumbers){var n=function(){v.calendarContainer.classList.add("hasWeeks");var e=c("div","flatpickr-weekwrapper");e.appendChild(c("span","flatpickr-weekday",v.l10n.weekAbbreviation));var n=c("div","flatpickr-weeks");return e.appendChild(n),{weekWrapper:e,weekNumbers:n}}(),t=n.weekWrapper,o=n.weekNumbers;v.innerContainer.appendChild(t),v.weekNumbers=o,v.weekWrapper=t}v.rContainer=c("div","flatpickr-rContainer"),v.rContainer.appendChild(Q()),v.daysContainer||(v.daysContainer=c("div","flatpickr-days"),v.daysContainer.tabIndex=-1),V(),v.rContainer.appendChild(v.daysContainer),v.innerContainer.appendChild(v.rContainer),e.appendChild(v.innerContainer)}v.config.enableTime&&e.appendChild(function(){v.calendarContainer.classList.add("hasTime"),v.config.noCalendar&&v.calendarContainer.classList.add("noCalendar");var e=E(v.config);v.timeContainer=c("div","flatpickr-time"),v.timeContainer.tabIndex=-1;var n=c("span","flatpickr-time-separator",":"),t=u("flatpickr-hour",{"aria-label":v.l10n.hourAriaLabel});v.hourElement=t.getElementsByTagName("input")[0];var o=u("flatpickr-minute",{"aria-label":v.l10n.minuteAriaLabel});v.minuteElement=o.getElementsByTagName("input")[0],v.hourElement.tabIndex=v.minuteElement.tabIndex=-1,v.hourElement.value=a(v.latestSelectedDateObj?v.latestSelectedDateObj.getHours():v.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),v.minuteElement.value=a(v.latestSelectedDateObj?v.latestSelectedDateObj.getMinutes():e.minutes),v.hourElement.setAttribute("step",v.config.hourIncrement.toString()),v.minuteElement.setAttribute("step",v.config.minuteIncrement.toString()),v.hourElement.setAttribute("min",v.config.time_24hr?"0":"1"),v.hourElement.setAttribute("max",v.config.time_24hr?"23":"12"),v.hourElement.setAttribute("maxlength","2"),v.minuteElement.setAttribute("min","0"),v.minuteElement.setAttribute("max","59"),v.minuteElement.setAttribute("maxlength","2"),v.timeContainer.appendChild(t),v.timeContainer.appendChild(n),v.timeContainer.appendChild(o),v.config.time_24hr&&v.timeContainer.classList.add("time24hr");if(v.config.enableSeconds){v.timeContainer.classList.add("hasSeconds");var r=u("flatpickr-second");v.secondElement=r.getElementsByTagName("input")[0],v.secondElement.value=a(v.latestSelectedDateObj?v.latestSelectedDateObj.getSeconds():e.seconds),v.secondElement.setAttribute("step",v.minuteElement.getAttribute("step")),v.secondElement.setAttribute("min","0"),v.secondElement.setAttribute("max","59"),v.secondElement.setAttribute("maxlength","2"),v.timeContainer.appendChild(c("span","flatpickr-time-separator",":")),v.timeContainer.appendChild(r)}v.config.time_24hr||(v.amPM=c("span","flatpickr-am-pm",v.l10n.amPM[i((v.latestSelectedDateObj?v.hourElement.value:v.config.defaultHour)>11)]),v.amPM.title=v.l10n.toggleTitle,v.amPM.tabIndex=-1,v.timeContainer.appendChild(v.amPM));return v.timeContainer}());l(v.calendarContainer,"rangeMode","range"===v.config.mode),l(v.calendarContainer,"animate",!0===v.config.animate),l(v.calendarContainer,"multiMonth",v.config.showMonths>1),v.calendarContainer.appendChild(e);var r=void 0!==v.config.appendTo&&void 0!==v.config.appendTo.nodeType;if((v.config.inline||v.config.static)&&(v.calendarContainer.classList.add(v.config.inline?"inline":"static"),v.config.inline&&(!r&&v.element.parentNode?v.element.parentNode.insertBefore(v.calendarContainer,v._input.nextSibling):void 0!==v.config.appendTo&&v.config.appendTo.appendChild(v.calendarContainer)),v.config.static)){var s=c("div","flatpickr-wrapper");v.element.parentNode&&v.element.parentNode.insertBefore(s,v.element),s.appendChild(v.element),v.altInput&&s.appendChild(v.altInput),s.appendChild(v.calendarContainer)}v.config.static||v.config.inline||(void 0!==v.config.appendTo?v.config.appendTo:window.document.body).appendChild(v.calendarContainer)}(),function(){v.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(v.element.querySelectorAll("[data-"+e+"]"),(function(n){return H(n,"click",v[e])}))}));if(v.isMobile)return void function(){var e=v.config.enableTime?v.config.noCalendar?"time":"datetime-local":"date";v.mobileInput=c("input",v.input.className+" flatpickr-mobile"),v.mobileInput.tabIndex=1,v.mobileInput.type=e,v.mobileInput.disabled=v.input.disabled,v.mobileInput.required=v.input.required,v.mobileInput.placeholder=v.input.placeholder,v.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",v.selectedDates.length>0&&(v.mobileInput.defaultValue=v.mobileInput.value=v.formatDate(v.selectedDates[0],v.mobileFormatStr));v.config.minDate&&(v.mobileInput.min=v.formatDate(v.config.minDate,"Y-m-d"));v.config.maxDate&&(v.mobileInput.max=v.formatDate(v.config.maxDate,"Y-m-d"));v.input.getAttribute("step")&&(v.mobileInput.step=String(v.input.getAttribute("step")));v.input.type="hidden",void 0!==v.altInput&&(v.altInput.type="hidden");try{v.input.parentNode&&v.input.parentNode.insertBefore(v.mobileInput,v.input.nextSibling)}catch(e){}H(v.mobileInput,"change",(function(e){v.setDate(f(e).value,!1,v.mobileFormatStr),Ce("onChange"),Ce("onClose")}))}();var e=o(se,50);v._debouncedChange=o(L,I),v.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&H(v.daysContainer,"mouseover",(function(e){"range"===v.config.mode&&ce(f(e))}));H(v._input,"keydown",le),void 0!==v.calendarContainer&&H(v.calendarContainer,"keydown",le);v.config.inline||v.config.static||H(window,"resize",e);void 0!==window.ontouchstart?H(window.document,"touchstart",te):H(window.document,"mousedown",te);H(window.document,"focus",te,{capture:!0}),!0===v.config.clickOpens&&(H(v._input,"focus",v.open),H(v._input,"click",v.open));void 0!==v.daysContainer&&(H(v.monthNav,"click",Te),H(v.monthNav,["keyup","increment"],j),H(v.daysContainer,"click",he));if(void 0!==v.timeContainer&&void 0!==v.minuteElement&&void 0!==v.hourElement){var n=function(e){return f(e).select()};H(v.timeContainer,["increment"],A),H(v.timeContainer,"blur",A,{capture:!0}),H(v.timeContainer,"click",W),H([v.hourElement,v.minuteElement],["focus","click"],n),void 0!==v.secondElement&&H(v.secondElement,"focus",(function(){return v.secondElement&&v.secondElement.select()})),void 0!==v.amPM&&H(v.amPM,"click",(function(e){A(e)}))}v.config.allowInput&&H(v._input,"blur",re)}(),(v.selectedDates.length||v.config.noCalendar)&&(v.config.enableTime&&P(v.config.noCalendar?v.latestSelectedDateObj:void 0),ke(!1)),F();var t=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!v.isMobile&&t&&me(),Ce("onReady")}(),v}function _(e,n){for(var t=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],i=0;i<t.length;i++){var o=t[i];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=S(o,n||{}),a.push(o._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return _(this,e)},HTMLElement.prototype.flatpickr=function(e){return _([this],e)});var O=function(e,n){return"string"==typeof e?_(window.document.querySelectorAll(e),n):e instanceof Node?_([e],n):_(e,n)};O.defaultConfig={},O.l10ns={en:k({},t),default:k({},t)},O.localize=function(e){O.l10ns.default=k(k({},O.l10ns.default),e)},O.setDefaults=function(e){O.defaultConfig=k(k({},O.defaultConfig),e)},O.parseDate=w({}),O.formatDate=D({}),O.compareDates=b,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return _(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=O);export{O as default};
@@ -0,0 +1 @@
1
+ !function(e){var n,t={},o={16:!1,18:!1,17:!1,91:!1},r="all",i={"⇧":16,shift:16,"⌥":18,alt:18,option:18,"⌃":17,ctrl:17,control:17,"⌘":91,command:91},l={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,",":188,".":190,"/":191,"`":192,"-":189,"=":187,";":186,"'":222,"[":219,"]":221,"\\":220},f=function(e){return l[e]||e.toUpperCase().charCodeAt(0)},c=[];for(n=1;n<20;n++)l["f"+n]=111+n;function u(e,n){for(var t=e.length;t--;)if(e[t]===n)return t;return-1}function a(e,n){if(e.length!=n.length)return!1;for(var t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}var s={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};function d(e){for(n in o)o[n]=e[s[n]]}function p(e,n,o){var r,i;r=g(e),void 0===o&&(o=n,n="all");for(var l=0;l<r.length;l++)i=[],(e=r[l].split("+")).length>1&&(i=v(e),e=[e[e.length-1]]),e=e[0],(e=f(e))in t||(t[e]=[]),t[e].push({shortcut:r[l],scope:n,method:o,key:r[l],mods:i})}for(n in i)p[n]=!1;function h(){return r||"all"}function g(e){var n;return""==(n=(e=e.replace(/\s/g,"")).split(","))[n.length-1]&&(n[n.length-2]+=","),n}function v(e){for(var n=e.slice(0,e.length-1),t=0;t<n.length;t++)n[t]=i[n[t]];return n}function y(e,n,t){e.addEventListener?e.addEventListener(n,t,!1):e.attachEvent&&e.attachEvent("on"+n,(function(){t(window.event)}))}y(document,"keydown",(function(e){!function(e){var n,r,l,f,a,s;if(n=e.keyCode,-1==u(c,n)&&c.push(n),93!=n&&224!=n||(n=91),n in o)for(l in o[n]=!0,i)i[l]==n&&(p[l]=!0);else if(d(e),p.filter.call(this,e)&&n in t)for(s=h(),f=0;f<t[n].length;f++)if((r=t[n][f]).scope==s||"all"==r.scope){for(l in a=r.mods.length>0,o)(!o[l]&&u(r.mods,+l)>-1||o[l]&&-1==u(r.mods,+l))&&(a=!1);(0!=r.mods.length||o[16]||o[18]||o[17]||o[91])&&!a||!1===r.method(e,r)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}(e)})),y(document,"keyup",(function(e){var n,t=e.keyCode,r=u(c,t);if(r>=0&&c.splice(r,1),93!=t&&224!=t||(t=91),t in o)for(n in o[t]=!1,i)i[n]==t&&(p[n]=!1)})),y(window,"focus",(function(){for(n in o)o[n]=!1;for(n in i)p[n]=!1}));var k=e.key;e.key=p,e.key.setScope=function(e){r=e||"all"},e.key.getScope=h,e.key.deleteScope=function(e){var n,o,r;for(n in t)for(o=t[n],r=0;r<o.length;)o[r].scope===e?o.splice(r,1):r++},e.key.filter=function(e){var n=(e.target||e.srcElement).tagName;return!("INPUT"==n||"SELECT"==n||"TEXTAREA"==n)},e.key.isPressed=function(e){return"string"==typeof e&&(e=f(e)),-1!=u(c,e)},e.key.getPressedKeyCodes=function(){return c.slice(0)},e.key.noConflict=function(){var n=e.key;return e.key=k,n},e.key.unbind=function(e,n){var o,r,i,l,c,u=[];for(o=g(e),l=0;l<o.length;l++){if((r=o[l].split("+")).length>1&&(u=v(r),e=r[r.length-1]),e=f(e),void 0===n&&(n=h()),!t[e])return;for(i=0;i<t[e].length;i++)(c=t[e][i]).scope===n&&a(c.mods,u)&&(t[e][i]={})}},"undefined"!=typeof module&&(module.exports=p)}(window);
@@ -0,0 +1 @@
1
+ const t="a[data-confirm], a[data-method], a[data-remote]:not([disabled]), a[data-disable-with], a[data-disable]",e={selector:"button[data-remote]:not([form]), button[data-confirm]:not([form])",exclude:"form button"},n="select[data-remote], input[data-remote], textarea[data-remote]",a="form:not([data-turbo=true])",o="form:not([data-turbo=true]) input[type=submit], form:not([data-turbo=true]) input[type=image], form:not([data-turbo=true]) button[type=submit], form:not([data-turbo=true]) button:not([type]), input[type=submit][form], input[type=image][form], button[type=submit][form], button[form]:not([type])",r="input[data-disable-with]:enabled, button[data-disable-with]:enabled, textarea[data-disable-with]:enabled, input[data-disable]:enabled, button[data-disable]:enabled, textarea[data-disable]:enabled",i="input[data-disable-with]:disabled, button[data-disable-with]:disabled, textarea[data-disable-with]:disabled, input[data-disable]:disabled, button[data-disable]:disabled, textarea[data-disable]:disabled",u="a[data-disable-with], a[data-disable]",c="button[data-remote][data-disable-with], button[data-remote][data-disable]";let s=null;const l=()=>{const t=document.querySelector("meta[name=csp-nonce]");return s=t&&t.content},d=()=>s||l(),m=Element.prototype.matches||Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector,p=function(t,e){return e.exclude?m.call(t,e.selector)&&!m.call(t,e.exclude):m.call(t,e)},f="_ujsData",b=(t,e)=>t[f]?t[f][e]:void 0,h=function(t,e,n){return t[f]||(t[f]={}),t[f][e]=n},y=t=>Array.prototype.slice.call(document.querySelectorAll(t)),j=function(t){var e=!1;do{if(t.isContentEditable){e=!0;break}t=t.parentElement}while(t);return e},v=()=>{const t=document.querySelector("meta[name=csrf-token]");return t&&t.content},E=()=>{const t=document.querySelector("meta[name=csrf-param]");return t&&t.content},g=t=>{const e=v();if(e)return t.setRequestHeader("X-CSRF-Token",e)},w=()=>{const t=v(),e=E();if(t&&e)return y('form input[name="'+e+'"]').forEach((e=>e.value=t))},x={"*":"*/*",text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript",script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},S=t=>{t=k(t);var e=C(t,(function(){const n=T(null!=e.response?e.response:e.responseText,e.getResponseHeader("Content-Type"));return 2===Math.floor(e.status/100)?"function"==typeof t.success&&t.success(n,e.statusText,e):"function"==typeof t.error&&t.error(n,e.statusText,e),"function"==typeof t.complete?t.complete(e,e.statusText):void 0}));return!(t.beforeSend&&!t.beforeSend(e,t))&&(e.readyState===XMLHttpRequest.OPENED?e.send(t.data):void 0)};var k=function(t){return t.url=t.url||location.href,t.type=t.type.toUpperCase(),"GET"===t.type&&t.data&&(t.url.indexOf("?")<0?t.url+="?"+t.data:t.url+="&"+t.data),t.dataType in x||(t.dataType="*"),t.accept=x[t.dataType],"*"!==t.dataType&&(t.accept+=", */*; q=0.01"),t},C=function(t,e){const n=new XMLHttpRequest;return n.open(t.type,t.url,!0),n.setRequestHeader("Accept",t.accept),"string"==typeof t.data&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),t.crossDomain||(n.setRequestHeader("X-Requested-With","XMLHttpRequest"),g(n)),n.withCredentials=!!t.withCredentials,n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE)return e(n)},n},T=function(t,e){if("string"==typeof t&&"string"==typeof e)if(e.match(/\bjson\b/))try{t=JSON.parse(t)}catch(t){}else if(e.match(/\b(?:java|ecma)script\b/)){const e=document.createElement("script");e.setAttribute("nonce",d()),e.text=t,document.head.appendChild(e).parentNode.removeChild(e)}else if(e.match(/\b(xml|html|svg)\b/)){const n=new DOMParser;e=e.replace(/;.+/,"");try{t=n.parseFromString(t,e)}catch(t){}}return t};const A=function(t){const e=document.createElement("a");e.href=location.href;const n=document.createElement("a");try{return n.href=t,!((!n.protocol||":"===n.protocol)&&!n.host||e.protocol+"//"+e.host==n.protocol+"//"+n.host)}catch(t){return!0}};let D,{CustomEvent:M}=window;"function"!=typeof M&&(M=function(t,e){const n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n},M.prototype=window.Event.prototype,({preventDefault:D}=M.prototype),M.prototype.preventDefault=function(){const t=D.call(this);return this.cancelable&&!this.defaultPrevented&&Object.defineProperty(this,"defaultPrevented",{get:()=>!0}),t});const L=(t,e,n)=>{const a=new M(e,{bubbles:!0,cancelable:!0,detail:n});return t.dispatchEvent(a),!a.defaultPrevented},R=t=>{L(t.target,"ujs:everythingStopped"),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation()},q=(t,e,n,a)=>t.addEventListener(n,(function(t){let{target:n}=t;for(;n instanceof Element&&!p(n,e);)n=n.parentNode;n instanceof Element&&!1===a.call(n,t)&&(t.preventDefault(),t.stopPropagation())})),H=t=>Array.prototype.slice.call(t),P=(t,e)=>{let n=[t];p(t,"form")&&(n=H(t.elements));const a=[];return n.forEach((function(t){t.name&&!t.disabled&&(p(t,"fieldset[disabled] *")||(p(t,"select")?H(t.options).forEach((function(e){e.selected&&a.push({name:t.name,value:e.value})})):(t.checked||-1===["radio","checkbox","submit"].indexOf(t.type))&&a.push({name:t.name,value:t.value})))})),e&&a.push(e),a.map((function(t){return t.name?`${encodeURIComponent(t.name)}=${encodeURIComponent(t.value)}`:t})).join("&")},O=(t,e)=>p(t,"form")?H(t.elements).filter((t=>p(t,e))):H(t.querySelectorAll(e));var I=function(t,e){let n;const a=t.getAttribute("data-confirm");if(!a)return!0;let o=!1;if(L(t,"confirm")){try{o=e.confirm(a,t)}catch(t){}n=L(t,"confirm:complete",[o])}return o&&n};const N=function(t){this.disabled&&R(t)},X=t=>{let e;if(t instanceof Event){if(K(t))return;e=t.target}else e=t;if(!j(e))return p(e,u)?F(e):p(e,c)||p(e,i)?z(e):p(e,a)?G(e):void 0},$=t=>{const e=t instanceof Event?t.target:t;if(!j(e))return p(e,u)?_(e):p(e,c)||p(e,r)?U(e):p(e,a)?Q(e):void 0};var _=function(t){if(b(t,"ujs:disabled"))return;const e=t.getAttribute("data-disable-with");return null!=e&&(h(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e),t.addEventListener("click",R),h(t,"ujs:disabled",!0)},F=function(t){const e=b(t,"ujs:enable-with");return null!=e&&(t.innerHTML=e,h(t,"ujs:enable-with",null)),t.removeEventListener("click",R),h(t,"ujs:disabled",null)},Q=t=>O(t,r).forEach(U),U=function(t){if(b(t,"ujs:disabled"))return;const e=t.getAttribute("data-disable-with");return null!=e&&(p(t,"button")?(h(t,"ujs:enable-with",t.innerHTML),t.innerHTML=e):(h(t,"ujs:enable-with",t.value),t.value=e)),t.disabled=!0,h(t,"ujs:disabled",!0)},G=t=>O(t,i).forEach((t=>z(t))),z=function(t){const e=b(t,"ujs:enable-with");return null!=e&&(p(t,"button")?t.innerHTML=e:t.value=e,h(t,"ujs:enable-with",null)),t.disabled=!1,h(t,"ujs:disabled",null)},K=function(t){const e=t.detail?t.detail[0]:void 0;return e&&e.getResponseHeader("X-Xhr-Redirect")};const B=function(t){const e=this,{form:n}=e;if(n)return e.name&&h(n,"ujs:submit-button",{name:e.name,value:e.value}),h(n,"ujs:formnovalidate-button",e.formNoValidate),h(n,"ujs:submit-button-formaction",e.getAttribute("formaction")),h(n,"ujs:submit-button-formmethod",e.getAttribute("formmethod"))},J=function(t){const e=(this.getAttribute("data-method")||"GET").toUpperCase(),n=this.getAttribute("data-params"),a=(t.metaKey||t.ctrlKey)&&"GET"===e&&!n;(null!=t.button&&0!==t.button||a)&&t.stopImmediatePropagation()},V={$:y,ajax:S,buttonClickSelector:e,buttonDisableSelector:c,confirm:(t,e)=>window.confirm(t),cspNonce:d,csrfToken:v,csrfParam:E,CSRFProtection:g,delegate:q,disableElement:$,enableElement:X,fileInputSelector:"input[name][type=file]:not([disabled])",fire:L,formElements:O,formEnableSelector:i,formDisableSelector:r,formInputClickSelector:o,formSubmitButtonClick:B,formSubmitSelector:a,getData:b,handleDisabledElement:N,href:t=>t.href,inputChangeSelector:n,isCrossDomain:A,linkClickSelector:t,linkDisableSelector:u,loadCSPNonce:l,matches:p,preventInsignificantClick:J,refreshCSRFTokens:w,serializeElement:P,setData:h,stopEverything:R},W=(Y=V,function(t){I(this,Y)||R(t)});var Y;V.handleConfirm=W;const Z=(t=>function(e){const n=this,a=n.getAttribute("data-method");if(!a)return;if(j(this))return;const o=t.href(n),r=v(),i=E(),u=document.createElement("form");let c=`<input name='_method' value='${a}' type='hidden' />`;i&&r&&!A(o)&&(c+=`<input name='${i}' value='${r}' type='hidden' />`),c+='<input type="submit" />',u.method="post",u.action=o,u.target=n.target,u.innerHTML=c,u.style.display="none",document.body.appendChild(u),u.querySelector('[type="submit"]').click(),R(e)})(V);V.handleMethod=Z;const tt=(t=>function(o){let r,i,u;const c=this;if(!function(t){const e=t.getAttribute("data-remote");return null!=e&&"false"!==e}(c))return!0;if(!L(c,"ajax:before"))return L(c,"ajax:stopped"),!1;if(j(c))return L(c,"ajax:stopped"),!1;const s=c.getAttribute("data-with-credentials"),l=c.getAttribute("data-type")||"script";if(p(c,a)){const t=b(c,"ujs:submit-button");i=b(c,"ujs:submit-button-formmethod")||c.getAttribute("method")||"get",u=b(c,"ujs:submit-button-formaction")||c.getAttribute("action")||location.href,"GET"===i.toUpperCase()&&(u=u.replace(/\?.*$/,"")),"multipart/form-data"===c.enctype?(r=new FormData(c),null!=t&&r.append(t.name,t.value)):r=P(c,t),h(c,"ujs:submit-button",null),h(c,"ujs:submit-button-formmethod",null),h(c,"ujs:submit-button-formaction",null)}else p(c,e)||p(c,n)?(i=c.getAttribute("data-method"),u=c.getAttribute("data-url"),r=P(c,c.getAttribute("data-params"))):(i=c.getAttribute("data-method"),u=t.href(c),r=c.getAttribute("data-params"));S({type:i||"GET",url:u,data:r,dataType:l,beforeSend:(t,e)=>L(c,"ajax:beforeSend",[t,e])?L(c,"ajax:send",[t]):(L(c,"ajax:stopped"),!1),success:(...t)=>L(c,"ajax:success",t),error:(...t)=>L(c,"ajax:error",t),complete:(...t)=>L(c,"ajax:complete",t),crossDomain:A(u),withCredentials:null!=s&&"false"!==s}),R(o)})(V);V.handleRemote=tt;if(V.start=function(){if(window._rails_loaded)throw new Error("rails-ujs has already been loaded!");return window.addEventListener("pageshow",(function(){y(i).forEach((function(t){b(t,"ujs:disabled")&&X(t)})),y(u).forEach((function(t){b(t,"ujs:disabled")&&X(t)}))})),q(document,u,"ajax:complete",X),q(document,u,"ajax:stopped",X),q(document,c,"ajax:complete",X),q(document,c,"ajax:stopped",X),q(document,t,"click",J),q(document,t,"click",N),q(document,t,"click",W),q(document,t,"click",$),q(document,t,"click",tt),q(document,t,"click",Z),q(document,e,"click",J),q(document,e,"click",N),q(document,e,"click",W),q(document,e,"click",$),q(document,e,"click",tt),q(document,n,"change",N),q(document,n,"change",W),q(document,n,"change",tt),q(document,a,"submit",N),q(document,a,"submit",W),q(document,a,"submit",tt),q(document,a,"submit",(t=>setTimeout((()=>$(t)),13))),q(document,a,"ajax:send",$),q(document,a,"ajax:complete",X),q(document,o,"click",J),q(document,o,"click",N),q(document,o,"click",W),q(document,o,"click",B),document.addEventListener("DOMContentLoaded",w),document.addEventListener("DOMContentLoaded",l),window._rails_loaded=!0},"undefined"!=typeof jQuery&&jQuery&&jQuery.ajax){if(jQuery.rails)throw new Error("If you load both jquery_ujs and rails-ujs, use rails-ujs only.");jQuery.rails=V,jQuery.ajaxPrefilter((function(t,e,n){if(!t.crossDomain)return g(n)}))}export{V as default};