spina 1.1.2 → 2.0.0.beta

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

Potentially problematic release.


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

Files changed (199) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/fonts/spina/ics_spina.eot +0 -0
  3. data/app/assets/fonts/spina/ics_spina.svg +285 -267
  4. data/app/assets/fonts/spina/ics_spina.ttf +0 -0
  5. data/app/assets/fonts/spina/ics_spina.woff +0 -0
  6. data/app/assets/fonts/spina/ics_spina.woff2 +0 -0
  7. data/app/assets/icons/spina/bold.svg +1 -1
  8. data/app/assets/icons/spina/code.svg +1 -1
  9. data/app/assets/icons/spina/image.svg +1 -10
  10. data/app/assets/icons/spina/indent.svg +1 -0
  11. data/app/assets/icons/spina/italic.svg +1 -1
  12. data/app/assets/icons/spina/link.svg +1 -1
  13. data/app/assets/icons/spina/list-ol.svg +1 -0
  14. data/app/assets/icons/spina/list.svg +1 -0
  15. data/app/assets/icons/spina/outdent.svg +1 -0
  16. data/app/assets/icons/spina/preview/icons_spina-preview.html +0 -2
  17. data/app/assets/icons/spina/preview/ics_spina-preview.html +121 -3
  18. data/app/assets/icons/spina/quote-right.svg +1 -0
  19. data/app/assets/icons/spina/redo.svg +1 -0
  20. data/app/assets/icons/spina/strikethrough.svg +1 -0
  21. data/app/assets/icons/spina/undo.svg +1 -0
  22. data/app/assets/images/spina/favicon.png +0 -0
  23. data/app/assets/javascripts/spina/admin/application.js +1 -2
  24. data/app/assets/javascripts/spina/admin/controllers/attachment_picker_controller.js +15 -0
  25. data/app/assets/javascripts/spina/admin/controllers/image_form_controller.js +5 -4
  26. data/app/assets/javascripts/spina/admin/controllers/infinite_scroll_controller.js +20 -22
  27. data/app/assets/javascripts/spina/admin/controllers/media_picker_controller.js +171 -0
  28. data/app/assets/javascripts/spina/admin/controllers/modal_controller.js +18 -0
  29. data/app/assets/javascripts/spina/admin/controllers/repeater_form_controller.js +38 -0
  30. data/app/assets/javascripts/spina/admin/media_gallery.coffee +0 -3
  31. data/app/assets/javascripts/spina/admin/notifications.coffee +1 -1
  32. data/app/assets/javascripts/spina/admin/pages.coffee.erb +3 -20
  33. data/app/assets/javascripts/spina/admin/scaffold.coffee +1 -3
  34. data/app/assets/javascripts/spina/admin/trix.coffee.erb +14 -18
  35. data/app/assets/stylesheets/spina.sass +10 -8
  36. data/app/assets/stylesheets/spina/_buttons.sass +57 -31
  37. data/app/assets/stylesheets/spina/_configuration.sass.erb +1 -1
  38. data/app/assets/stylesheets/spina/_forms.sass +72 -77
  39. data/app/assets/stylesheets/spina/_gallery.sass +22 -4
  40. data/app/assets/stylesheets/spina/_ics_spina.scss +8 -0
  41. data/app/assets/stylesheets/spina/_media_picker.sass +133 -0
  42. data/app/assets/stylesheets/spina/_modal.sass +35 -2
  43. data/app/assets/stylesheets/spina/_notifications.sass +20 -14
  44. data/app/assets/stylesheets/spina/_pages.sass +131 -0
  45. data/app/assets/stylesheets/spina/_sortable_lists.sass +14 -8
  46. data/app/assets/stylesheets/spina/_tables.sass +7 -4
  47. data/app/assets/stylesheets/spina/_trix_custom.sass +29 -32
  48. data/app/controllers/concerns/spina/current_methods.rb +26 -0
  49. data/app/controllers/concerns/spina/frontend.rb +9 -0
  50. data/app/controllers/spina/admin/accounts_controller.rb +9 -13
  51. data/app/controllers/spina/admin/admin_controller.rb +5 -1
  52. data/app/controllers/spina/admin/attachments_controller.rb +0 -22
  53. data/app/controllers/spina/admin/images_controller.rb +1 -1
  54. data/app/controllers/spina/admin/media_picker_controller.rb +18 -19
  55. data/app/controllers/spina/admin/pages_controller.rb +3 -7
  56. data/app/controllers/spina/admin/resources_controller.rb +9 -4
  57. data/app/controllers/spina/application_controller.rb +6 -23
  58. data/app/controllers/spina/pages_controller.rb +11 -13
  59. data/app/controllers/spina/sitemaps_controller.rb +6 -6
  60. data/app/helpers/spina/admin/pages_helper.rb +22 -20
  61. data/app/helpers/spina/{files_helper.rb → attachments_helper.rb} +1 -1
  62. data/app/helpers/spina/images_helper.rb +9 -10
  63. data/app/helpers/spina/pages_helper.rb +23 -4
  64. data/app/models/concerns/spina/partable.rb +19 -7
  65. data/app/models/concerns/spina/translated_content.rb +19 -0
  66. data/app/models/spina/account.rb +3 -10
  67. data/app/models/spina/attachment.rb +0 -4
  68. data/app/models/spina/current.rb +1 -0
  69. data/app/models/spina/image.rb +0 -4
  70. data/app/models/spina/page.rb +31 -23
  71. data/app/models/spina/parts/attachment.rb +22 -0
  72. data/app/models/spina/parts/base.rb +12 -0
  73. data/app/models/spina/parts/image.rb +39 -0
  74. data/app/models/spina/parts/image_collection.rb +23 -0
  75. data/app/models/spina/parts/image_variant.rb +19 -0
  76. data/app/models/spina/parts/line.rb +7 -0
  77. data/app/models/spina/parts/multi_line.rb +7 -0
  78. data/app/models/spina/parts/option.rb +13 -0
  79. data/app/models/spina/parts/repeater.rb +10 -0
  80. data/app/models/spina/parts/repeater_content.rb +15 -0
  81. data/app/models/spina/parts/text.rb +7 -0
  82. data/app/models/spina/resource.rb +4 -12
  83. data/app/presenters/spina/content_presenter.rb +51 -0
  84. data/app/presenters/spina/menu_presenter.rb +2 -1
  85. data/app/views/layouts/spina/admin/admin.html.haml +3 -7
  86. data/app/views/layouts/spina/admin/pages.html.haml +5 -4
  87. data/app/views/layouts/spina/login.html.haml +0 -3
  88. data/app/views/spina/admin/accounts/_form.html.haml +13 -7
  89. data/app/views/spina/admin/accounts/analytics.html.haml +5 -3
  90. data/app/views/spina/admin/accounts/social.html.haml +13 -7
  91. data/app/views/spina/admin/accounts/style.html.haml +26 -21
  92. data/app/views/spina/admin/attachments/index.html.haml +1 -1
  93. data/app/views/spina/admin/images/_image.html.haml +1 -1
  94. data/app/views/spina/admin/images/index.html.haml +7 -5
  95. data/app/views/spina/admin/media_folders/_media_folder.html.haml +1 -1
  96. data/app/views/spina/admin/media_folders/show.html.haml +2 -2
  97. data/app/views/spina/admin/media_picker/_image.html.haml +3 -0
  98. data/app/views/spina/admin/media_picker/_media_picker.html.haml +32 -0
  99. data/app/views/spina/admin/media_picker/_media_picker_grid.html.haml +25 -0
  100. data/app/views/spina/admin/media_picker/_modal.html.haml +1 -1
  101. data/app/views/spina/admin/media_picker/infinite_scroll.js.erb +4 -4
  102. data/app/views/spina/admin/media_picker/select.js.erb +2 -0
  103. data/app/views/spina/admin/media_picker/show.html.haml +1 -0
  104. data/app/views/spina/admin/media_picker/show.js.erb +1 -1
  105. data/app/views/spina/admin/pages/_form.html.haml +9 -7
  106. data/app/views/spina/admin/pages/_form_advanced.html.haml +19 -17
  107. data/app/views/spina/admin/pages/_form_page_content.html.haml +14 -13
  108. data/app/views/spina/admin/pages/_form_page_seo.html.haml +15 -4
  109. data/app/views/spina/admin/pages/_page.html.haml +5 -3
  110. data/app/views/spina/admin/pages/_page_nested_list.html.haml +2 -3
  111. data/app/views/spina/admin/pages/index.html.haml +5 -4
  112. data/app/views/spina/admin/parts/attachments/_form.html.haml +6 -0
  113. data/app/views/spina/admin/parts/image_collections/_fields.html.haml +7 -0
  114. data/app/views/spina/admin/parts/image_collections/_form.html.haml +12 -0
  115. data/app/views/spina/admin/parts/images/_form.html.haml +18 -0
  116. data/app/views/spina/admin/parts/lines/_form.html.haml +2 -0
  117. data/app/views/spina/admin/parts/multi_lines/_form.html.haml +2 -0
  118. data/app/views/spina/admin/parts/options/_form.html.haml +3 -0
  119. data/app/views/spina/admin/parts/repeaters/_fields.html.haml +15 -0
  120. data/app/views/spina/admin/parts/repeaters/_form.html.haml +17 -0
  121. data/app/views/spina/admin/parts/texts/_form.html.haml +6 -0
  122. data/app/views/spina/admin/resources/edit.html.haml +28 -12
  123. data/app/views/spina/admin/resources/show.html.haml +6 -3
  124. data/app/views/spina/admin/shared/_notifications.html.haml +4 -4
  125. data/config/locales/TH.yml +10 -0
  126. data/config/locales/bg.yml +10 -0
  127. data/config/locales/de.yml +10 -0
  128. data/config/locales/en.yml +10 -0
  129. data/config/locales/es.yml +39 -29
  130. data/config/locales/fr.yml +10 -0
  131. data/config/locales/id.yml +10 -0
  132. data/config/locales/it.yml +10 -0
  133. data/config/locales/nl.yml +10 -0
  134. data/config/locales/pl.yml +24 -14
  135. data/config/locales/pt-BR.yml +10 -0
  136. data/config/locales/ro.yml +10 -0
  137. data/config/locales/ru.yml +10 -0
  138. data/config/locales/sv.yml +10 -0
  139. data/config/locales/tr.yml +10 -0
  140. data/config/locales/zh-CN.yml +10 -0
  141. data/config/routes.rb +13 -0
  142. data/db/migrate/11_create_spina_resources.rb +0 -2
  143. data/db/migrate/12_add_url_title_to_spina_page_translations.rb +5 -0
  144. data/db/migrate/13_add_json_attributes_to_spina_accounts.rb +5 -0
  145. data/db/migrate/14_add_json_attributes_to_spina_pages.rb +5 -0
  146. data/db/migrate/15_add_slug_to_spina_resources.rb +5 -0
  147. data/lib/generators/spina/templates/app/views/demo/pages/demo.html.haml +13 -21
  148. data/lib/generators/spina/templates/app/views/demo/pages/homepage.html.haml +1 -1
  149. data/lib/generators/spina/templates/config/initializers/mobility.rb +13 -4
  150. data/lib/generators/spina/templates/config/initializers/spina.rb +4 -0
  151. data/lib/generators/spina/templates/config/initializers/themes/default.rb +7 -7
  152. data/lib/generators/spina/templates/config/initializers/themes/demo.rb +32 -44
  153. data/lib/spina.rb +18 -3
  154. data/lib/spina/attr_json_spina_parts_model.rb +29 -0
  155. data/lib/spina/engine.rb +14 -6
  156. data/lib/spina/part.rb +19 -0
  157. data/lib/spina/theme.rb +1 -1
  158. data/lib/spina/version.rb +1 -1
  159. data/lib/tasks/spina_tasks.rake +1 -1
  160. data/vendor/assets/javascripts/spina/sortable.js +2 -2
  161. metadata +83 -53
  162. data/app/assets/javascripts/spina/admin/account.coffee +0 -16
  163. data/app/models/concerns/spina/image_collectable.rb +0 -23
  164. data/app/models/concerns/spina/optionable.rb +0 -12
  165. data/app/models/concerns/spina/part.rb +0 -38
  166. data/app/models/spina/attachment_collection.rb +0 -20
  167. data/app/models/spina/image_collection.rb +0 -23
  168. data/app/models/spina/image_collections_image.rb +0 -6
  169. data/app/models/spina/layout_part.rb +0 -22
  170. data/app/models/spina/line.rb +0 -10
  171. data/app/models/spina/option.rb +0 -17
  172. data/app/models/spina/page_part.rb +0 -22
  173. data/app/models/spina/structure.rb +0 -14
  174. data/app/models/spina/structure_item.rb +0 -22
  175. data/app/models/spina/structure_part.rb +0 -20
  176. data/app/models/spina/text.rb +0 -10
  177. data/app/views/dummy/show.html.haml +0 -1
  178. data/app/views/spina/admin/attachments/_attachment_collection.html.haml +0 -2
  179. data/app/views/spina/admin/attachments/_select.html.haml +0 -17
  180. data/app/views/spina/admin/attachments/_select_collection.html.haml +0 -18
  181. data/app/views/spina/admin/attachments/insert.js.erb +0 -5
  182. data/app/views/spina/admin/attachments/insert_collection.js.coffee +0 -7
  183. data/app/views/spina/admin/attachments/select.js.erb +0 -2
  184. data/app/views/spina/admin/attachments/select_collection.js.erb +0 -2
  185. data/app/views/spina/admin/image_collections/_image_collection.html.haml +0 -5
  186. data/app/views/spina/admin/layout_partables/lines/_form.html.haml +0 -2
  187. data/app/views/spina/admin/partables/attachment_collections/_form.html.haml +0 -14
  188. data/app/views/spina/admin/partables/attachments/_form.html.haml +0 -13
  189. data/app/views/spina/admin/partables/image_collections/_form.html.haml +0 -16
  190. data/app/views/spina/admin/partables/images/_form.html.haml +0 -21
  191. data/app/views/spina/admin/partables/lines/_form.html.haml +0 -5
  192. data/app/views/spina/admin/partables/options/_form.html.haml +0 -7
  193. data/app/views/spina/admin/partables/photo_collections/_form.html.haml +0 -4
  194. data/app/views/spina/admin/partables/photos/_form.html.haml +0 -4
  195. data/app/views/spina/admin/partables/structures/_form.html.haml +0 -21
  196. data/app/views/spina/admin/partables/texts/_form.html.haml +0 -8
  197. data/app/views/spina/admin/structure_items/_fields.html.haml +0 -15
  198. data/app/views/spina/admin/structure_partables/attachment_collections/_form.html.haml +0 -14
  199. data/app/views/spina/admin/structure_partables/attachments/_form.html.haml +0 -13
@@ -0,0 +1,29 @@
1
+ require 'attr_json/type/polymorphic_model'
2
+
3
+ # Extending the PolymorphicModel to use the Spina::PARTS array as input
4
+ # as opposed to arguments
5
+ module AttrJson
6
+ module Type
7
+ class SpinaPartsModel < PolymorphicModel
8
+
9
+ def model_names
10
+ spina_parts_lookup.keys
11
+ end
12
+
13
+ def model_types
14
+ spina_parts_lookup.values
15
+ end
16
+
17
+ def spina_parts_lookup
18
+ @spina_parts_lookup ||= Spina::PARTS.map(&:to_type).map do |type|
19
+ [type.model.name, type]
20
+ end.to_h
21
+ end
22
+
23
+ def type_for_model_name(model_name)
24
+ spina_parts_lookup[model_name]
25
+ end
26
+
27
+ end
28
+ end
29
+ end
data/lib/spina/engine.rb CHANGED
@@ -1,16 +1,15 @@
1
- require 'spina'
2
1
  require 'haml-rails'
3
2
  require 'sass-rails'
4
3
  require 'coffee-rails'
5
4
  require 'jquery-rails'
6
5
  require 'turbolinks'
7
- require 'mini_magick'
8
6
  require 'ancestry'
9
7
  require 'breadcrumbs_on_rails'
10
8
  require 'kaminari'
11
9
  require 'mobility'
12
10
  require 'rack-rewrite'
13
11
  require 'jsonb_accessor'
12
+ require 'attr_json'
14
13
 
15
14
  module Spina
16
15
  class Engine < ::Rails::Engine
@@ -19,14 +18,23 @@ module Spina
19
18
 
20
19
  config.autoload_paths += %W( #{config.root}/lib )
21
20
 
22
- config.to_prepare do
23
- # Load helpers from main application
24
- Spina::ApplicationController.helper Rails.application.helpers
25
-
21
+ config.to_prepare do
26
22
  # Require decorators from main application
27
23
  [Rails.root].flatten.map { |p| Dir[p.join('app', 'decorators', '**', '*_decorator.rb')]}.flatten.uniq.each do |decorator|
28
24
  Rails.configuration.cache_classes ? require(decorator) : load(decorator)
29
25
  end
26
+
27
+ # Register JSON part types for editing content
28
+ Spina::Part.register(
29
+ Spina::Parts::Line,
30
+ Spina::Parts::MultiLine,
31
+ Spina::Parts::Text,
32
+ Spina::Parts::Image,
33
+ Spina::Parts::ImageCollection,
34
+ Spina::Parts::Repeater,
35
+ Spina::Parts::Option,
36
+ Spina::Parts::Attachment
37
+ )
30
38
  end
31
39
  end
32
40
  end
data/lib/spina/part.rb ADDED
@@ -0,0 +1,19 @@
1
+ module Spina
2
+ class Part
3
+
4
+ class << self
5
+
6
+ def all
7
+ ::Spina::PARTS
8
+ end
9
+
10
+ def register(*parts)
11
+ parts.each{|part| all << part}
12
+ end
13
+
14
+ end
15
+
16
+
17
+ end
18
+ end
19
+
data/lib/spina/theme.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  module Spina
2
2
  class Theme
3
3
 
4
- attr_accessor :name, :title, :page_parts, :structures, :view_templates, :layout_parts, :custom_pages, :plugins, :public_theme, :config, :navigations, :resources
4
+ attr_accessor :name, :title, :parts, :page_parts, :structures, :view_templates, :layout_parts, :custom_pages, :plugins, :public_theme, :config, :navigations, :resources
5
5
 
6
6
  class << self
7
7
 
data/lib/spina/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spina
2
- VERSION = "1.1.2"
2
+ VERSION = "2.0.0.beta"
3
3
  end
@@ -11,7 +11,7 @@ namespace :spina do
11
11
  Mobility.with_locale(locale) do
12
12
 
13
13
  Spina::Page.all.order(:id).each do |page|
14
- page.title = page.title(fallback: Mobility.new_fallbacks[locale])
14
+ page.title = page.title(fallback: I18n.fallbacks[locale])
15
15
  page.save
16
16
  end
17
17
 
@@ -1,2 +1,2 @@
1
- /*! Sortable 1.4.2 - MIT | git://github.com/rubaxa/Sortable.git */
2
- !function(a){"use strict";"function"==typeof define&&define.amd?define(a):"undefined"!=typeof module&&"undefined"!=typeof module.exports?module.exports=a():"undefined"!=typeof Package?Sortable=a():window.Sortable=a()}(function(){"use strict";function a(a,b){if(!a||!a.nodeType||1!==a.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(a);this.el=a,this.options=b=s({},b),a[M]=this;var c={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(a.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(a,b){a.setData("Text",b.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var d in c)!(d in b)&&(b[d]=c[d]);W(b);for(var f in this)"_"===f.charAt(0)&&(this[f]=this[f].bind(this));this.nativeDraggable=b.forceFallback?!1:Q,e(a,"mousedown",this._onTapStart),e(a,"touchstart",this._onTapStart),this.nativeDraggable&&(e(a,"dragover",this),e(a,"dragenter",this)),U.push(this._onDragOver),b.store&&this.sort(b.store.get(this))}function b(a){w&&w.state!==a&&(h(w,"display",a?"none":""),!a&&w.state&&x.insertBefore(w,t),w.state=a)}function c(a,b,c){if(a){c=c||O;do if(">*"===b&&a.parentNode===c||q(a,b))return a;while(a!==c&&(a=a.parentNode))}return null}function d(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.preventDefault()}function e(a,b,c){a.addEventListener(b,c,!1)}function f(a,b,c){a.removeEventListener(b,c,!1)}function g(a,b,c){if(a)if(a.classList)a.classList[c?"add":"remove"](b);else{var d=(" "+a.className+" ").replace(L," ").replace(" "+b+" "," ");a.className=(d+(c?" "+b:"")).replace(L," ")}}function h(a,b,c){var d=a&&a.style;if(d){if(void 0===c)return O.defaultView&&O.defaultView.getComputedStyle?c=O.defaultView.getComputedStyle(a,""):a.currentStyle&&(c=a.currentStyle),void 0===b?c:c[b];b in d||(b="-webkit-"+b),d[b]=c+("string"==typeof c?"":"px")}}function i(a,b,c){if(a){var d=a.getElementsByTagName(b),e=0,f=d.length;if(c)for(;f>e;e++)c(d[e],e);return d}return[]}function j(a,b,c,d,e,f,g){var h=O.createEvent("Event"),i=(a||b[M]).options,j="on"+c.charAt(0).toUpperCase()+c.substr(1);h.initEvent(c,!0,!0),h.to=b,h.from=e||b,h.item=d||b,h.clone=w,h.oldIndex=f,h.newIndex=g,b.dispatchEvent(h),i[j]&&i[j].call(a,h)}function k(a,b,c,d,e,f){var g,h,i=a[M],j=i.options.onMove;return g=O.createEvent("Event"),g.initEvent("move",!0,!0),g.to=b,g.from=a,g.dragged=c,g.draggedRect=d,g.related=e||b,g.relatedRect=f||b.getBoundingClientRect(),a.dispatchEvent(g),j&&(h=j.call(i,g)),h}function l(a){a.draggable=!1}function m(){S=!1}function n(a,b){var c=a.lastElementChild,d=c.getBoundingClientRect();return(b.clientY-(d.top+d.height)>5||b.clientX-(d.right+d.width)>5)&&c}function o(a){for(var b=a.tagName+a.className+a.src+a.href+a.textContent,c=b.length,d=0;c--;)d+=b.charCodeAt(c);return d.toString(36)}function p(a,b){var c=0;if(!a||!a.parentNode)return-1;for(;a&&(a=a.previousElementSibling);)"TEMPLATE"!==a.nodeName.toUpperCase()&&q(a,b)&&c++;return c}function q(a,b){if(a){b=b.split(".");var c=b.shift().toUpperCase(),d=new RegExp("\\s("+b.join("|")+")(?=\\s)","g");return!(""!==c&&a.nodeName.toUpperCase()!=c||b.length&&((" "+a.className+" ").match(d)||[]).length!=b.length)}return!1}function r(a,b){var c,d;return function(){void 0===c&&(c=arguments,d=this,setTimeout(function(){1===c.length?a.call(d,c[0]):a.apply(d,c),c=void 0},b))}}function s(a,b){if(a&&b)for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}if("undefined"==typeof window||"undefined"==typeof window.document)return function(){throw new Error("Sortable.js requires a window with a document")};var t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K={},L=/\s+/g,M="Sortable"+(new Date).getTime(),N=window,O=N.document,P=N.parseInt,Q=!!("draggable"in O.createElement("div")),R=function(a){return a=O.createElement("x"),a.style.cssText="pointer-events:auto","auto"===a.style.pointerEvents}(),S=!1,T=Math.abs,U=([].slice,[]),V=r(function(a,b,c){if(c&&b.scroll){var d,e,f,g,h=b.scrollSensitivity,i=b.scrollSpeed,j=a.clientX,k=a.clientY,l=window.innerWidth,m=window.innerHeight;if(A!==c&&(z=b.scroll,A=c,z===!0)){z=c;do if(z.offsetWidth<z.scrollWidth||z.offsetHeight<z.scrollHeight)break;while(z=z.parentNode)}z&&(d=z,e=z.getBoundingClientRect(),f=(T(e.right-j)<=h)-(T(e.left-j)<=h),g=(T(e.bottom-k)<=h)-(T(e.top-k)<=h)),f||g||(f=(h>=l-j)-(h>=j),g=(h>=m-k)-(h>=k),(f||g)&&(d=N)),(K.vx!==f||K.vy!==g||K.el!==d)&&(K.el=d,K.vx=f,K.vy=g,clearInterval(K.pid),d&&(K.pid=setInterval(function(){d===N?N.scrollTo(N.pageXOffset+f*i,N.pageYOffset+g*i):(g&&(d.scrollTop+=g*i),f&&(d.scrollLeft+=f*i))},24)))}},30),W=function(a){var b=a.group;b&&"object"==typeof b||(b=a.group={name:b}),["pull","put"].forEach(function(a){a in b||(b[a]=!0)}),a.groups=" "+b.name+(b.put.join?" "+b.put.join(" "):"")+" "};return a.prototype={constructor:a,_onTapStart:function(a){var b=this,d=this.el,e=this.options,f=a.type,g=a.touches&&a.touches[0],h=(g||a).target,i=h,k=e.filter;if(!("mousedown"===f&&0!==a.button||e.disabled)&&(h=c(h,e.draggable,d))){if(E=p(h,e.draggable),"function"==typeof k){if(k.call(this,a,h,this))return j(b,i,"filter",h,d,E),void a.preventDefault()}else if(k&&(k=k.split(",").some(function(a){return a=c(i,a.trim(),d),a?(j(b,a,"filter",h,d,E),!0):void 0})))return void a.preventDefault();(!e.handle||c(i,e.handle,d))&&this._prepareDragStart(a,g,h)}},_prepareDragStart:function(a,b,c){var d,f=this,h=f.el,j=f.options,k=h.ownerDocument;c&&!t&&c.parentNode===h&&(H=a,x=h,t=c,u=t.parentNode,y=t.nextSibling,G=j.group,d=function(){f._disableDelayedDrag(),t.draggable=!0,g(t,f.options.chosenClass,!0),f._triggerDragStart(b)},j.ignore.split(",").forEach(function(a){i(t,a.trim(),l)}),e(k,"mouseup",f._onDrop),e(k,"touchend",f._onDrop),e(k,"touchcancel",f._onDrop),j.delay?(e(k,"mouseup",f._disableDelayedDrag),e(k,"touchend",f._disableDelayedDrag),e(k,"touchcancel",f._disableDelayedDrag),e(k,"mousemove",f._disableDelayedDrag),e(k,"touchmove",f._disableDelayedDrag),f._dragStartTimer=setTimeout(d,j.delay)):d())},_disableDelayedDrag:function(){var a=this.el.ownerDocument;clearTimeout(this._dragStartTimer),f(a,"mouseup",this._disableDelayedDrag),f(a,"touchend",this._disableDelayedDrag),f(a,"touchcancel",this._disableDelayedDrag),f(a,"mousemove",this._disableDelayedDrag),f(a,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(a){a?(H={target:t,clientX:a.clientX,clientY:a.clientY},this._onDragStart(H,"touch")):this.nativeDraggable?(e(t,"dragend",this),e(x,"dragstart",this._onDragStart)):this._onDragStart(H,!0);try{O.selection?setTimeout(function(){O.selection.empty()}):window.getSelection().removeAllRanges()}catch(b){}},_dragStarted:function(){x&&t&&(g(t,this.options.ghostClass,!0),a.active=this,j(this,x,"start",t,x,E))},_emulateDragOver:function(){if(I){if(this._lastX===I.clientX&&this._lastY===I.clientY)return;this._lastX=I.clientX,this._lastY=I.clientY,R||h(v,"display","none");var a=O.elementFromPoint(I.clientX,I.clientY),b=a,c=" "+this.options.group.name,d=U.length;if(b)do{if(b[M]&&b[M].options.groups.indexOf(c)>-1){for(;d--;)U[d]({clientX:I.clientX,clientY:I.clientY,target:a,rootEl:b});break}a=b}while(b=b.parentNode);R||h(v,"display","")}},_onTouchMove:function(b){if(H){a.active||this._dragStarted(),this._appendGhost();var c=b.touches?b.touches[0]:b,d=c.clientX-H.clientX,e=c.clientY-H.clientY,f=b.touches?"translate3d("+d+"px,"+e+"px,0)":"translate("+d+"px,"+e+"px)";J=!0,I=c,h(v,"webkitTransform",f),h(v,"mozTransform",f),h(v,"msTransform",f),h(v,"transform",f),b.preventDefault()}},_appendGhost:function(){if(!v){var a,b=t.getBoundingClientRect(),c=h(t),d=this.options;v=t.cloneNode(!0),g(v,d.ghostClass,!1),g(v,d.fallbackClass,!0),h(v,"top",b.top-P(c.marginTop,10)),h(v,"left",b.left-P(c.marginLeft,10)),h(v,"width",b.width),h(v,"height",b.height),h(v,"opacity","0.8"),h(v,"position","fixed"),h(v,"zIndex","100000"),h(v,"pointerEvents","none"),d.fallbackOnBody&&O.body.appendChild(v)||x.appendChild(v),a=v.getBoundingClientRect(),h(v,"width",2*b.width-a.width),h(v,"height",2*b.height-a.height)}},_onDragStart:function(a,b){var c=a.dataTransfer,d=this.options;this._offUpEvents(),"clone"==G.pull&&(w=t.cloneNode(!0),h(w,"display","none"),x.insertBefore(w,t)),b?("touch"===b?(e(O,"touchmove",this._onTouchMove),e(O,"touchend",this._onDrop),e(O,"touchcancel",this._onDrop)):(e(O,"mousemove",this._onTouchMove),e(O,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(c&&(c.effectAllowed="move",d.setData&&d.setData.call(this,c,t)),e(O,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(a){var d,e,f,g=this.el,i=this.options,j=i.group,l=j.put,o=G===j,p=i.sort;if(void 0!==a.preventDefault&&(a.preventDefault(),!i.dragoverBubble&&a.stopPropagation()),J=!0,G&&!i.disabled&&(o?p||(f=!x.contains(t)):G.pull&&l&&(G.name===j.name||l.indexOf&&~l.indexOf(G.name)))&&(void 0===a.rootEl||a.rootEl===this.el)){if(V(a,i,this.el),S)return;if(d=c(a.target,i.draggable,g),e=t.getBoundingClientRect(),f)return b(!0),void(w||y?x.insertBefore(t,w||y):p||x.appendChild(t));if(0===g.children.length||g.children[0]===v||g===a.target&&(d=n(g,a))){if(d){if(d.animated)return;r=d.getBoundingClientRect()}b(o),k(x,g,t,e,d,r)!==!1&&(t.contains(g)||(g.appendChild(t),u=g),this._animate(e,t),d&&this._animate(r,d))}else if(d&&!d.animated&&d!==t&&void 0!==d.parentNode[M]){B!==d&&(B=d,C=h(d),D=h(d.parentNode));var q,r=d.getBoundingClientRect(),s=r.right-r.left,z=r.bottom-r.top,A=/left|right|inline/.test(C.cssFloat+C.display)||"flex"==D.display&&0===D["flex-direction"].indexOf("row"),E=d.offsetWidth>t.offsetWidth,F=d.offsetHeight>t.offsetHeight,H=(A?(a.clientX-r.left)/s:(a.clientY-r.top)/z)>.5,I=d.nextElementSibling,K=k(x,g,t,e,d,r);if(K!==!1){if(S=!0,setTimeout(m,30),b(o),1===K||-1===K)q=1===K;else if(A){var L=t.offsetTop,N=d.offsetTop;q=L===N?d.previousElementSibling===t&&!E||H&&E:N>L}else q=I!==t&&!F||H&&F;t.contains(g)||(q&&!I?g.appendChild(t):d.parentNode.insertBefore(t,q?I:d)),u=t.parentNode,this._animate(e,t),this._animate(r,d)}}}},_animate:function(a,b){var c=this.options.animation;if(c){var d=b.getBoundingClientRect();h(b,"transition","none"),h(b,"transform","translate3d("+(a.left-d.left)+"px,"+(a.top-d.top)+"px,0)"),b.offsetWidth,h(b,"transition","all "+c+"ms"),h(b,"transform","translate3d(0,0,0)"),clearTimeout(b.animated),b.animated=setTimeout(function(){h(b,"transition",""),h(b,"transform",""),b.animated=!1},c)}},_offUpEvents:function(){var a=this.el.ownerDocument;f(O,"touchmove",this._onTouchMove),f(a,"mouseup",this._onDrop),f(a,"touchend",this._onDrop),f(a,"touchcancel",this._onDrop)},_onDrop:function(b){var c=this.el,d=this.options;clearInterval(this._loopId),clearInterval(K.pid),clearTimeout(this._dragStartTimer),f(O,"mousemove",this._onTouchMove),this.nativeDraggable&&(f(O,"drop",this),f(c,"dragstart",this._onDragStart)),this._offUpEvents(),b&&(J&&(b.preventDefault(),!d.dropBubble&&b.stopPropagation()),v&&v.parentNode.removeChild(v),t&&(this.nativeDraggable&&f(t,"dragend",this),l(t),g(t,this.options.ghostClass,!1),g(t,this.options.chosenClass,!1),x!==u?(F=p(t,d.draggable),F>=0&&(j(null,u,"sort",t,x,E,F),j(this,x,"sort",t,x,E,F),j(null,u,"add",t,x,E,F),j(this,x,"remove",t,x,E,F))):(w&&w.parentNode.removeChild(w),t.nextSibling!==y&&(F=p(t,d.draggable),F>=0&&(j(this,x,"update",t,x,E,F),j(this,x,"sort",t,x,E,F)))),a.active&&((null==F||-1===F)&&(F=E),j(this,x,"end",t,x,E,F),this.save()))),this._nulling()},_nulling:function(){a.active===this&&(x=t=u=v=y=w=z=A=H=I=J=F=B=C=G=a.active=null)},handleEvent:function(a){var b=a.type;"dragover"===b||"dragenter"===b?t&&(this._onDragOver(a),d(a)):("drop"===b||"dragend"===b)&&this._onDrop(a)},toArray:function(){for(var a,b=[],d=this.el.children,e=0,f=d.length,g=this.options;f>e;e++)a=d[e],c(a,g.draggable,this.el)&&b.push(a.getAttribute(g.dataIdAttr)||o(a));return b},sort:function(a){var b={},d=this.el;this.toArray().forEach(function(a,e){var f=d.children[e];c(f,this.options.draggable,d)&&(b[a]=f)},this),a.forEach(function(a){b[a]&&(d.removeChild(b[a]),d.appendChild(b[a]))})},save:function(){var a=this.options.store;a&&a.set(this)},closest:function(a,b){return c(a,b||this.options.draggable,this.el)},option:function(a,b){var c=this.options;return void 0===b?c[a]:(c[a]=b,void("group"===a&&W(c)))},destroy:function(){var a=this.el;a[M]=null,f(a,"mousedown",this._onTapStart),f(a,"touchstart",this._onTapStart),this.nativeDraggable&&(f(a,"dragover",this),f(a,"dragenter",this)),Array.prototype.forEach.call(a.querySelectorAll("[draggable]"),function(a){a.removeAttribute("draggable")}),U.splice(U.indexOf(this._onDragOver),1),this._onDrop(),this.el=a=null}},a.utils={on:e,off:f,css:h,find:i,is:function(a,b){return!!c(a,b,a)},extend:s,throttle:r,closest:c,toggleClass:g,index:p},a.create=function(b,c){return new a(b,c)},a.version="1.4.2",a});
1
+ /*! Sortable 1.10.2 - MIT | git://github.com/SortableJS/Sortable.git */
2
+ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t=t||self).Sortable=e()}(this,function(){"use strict";function o(t){return(o="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 a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}function I(i){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},e=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(e=e.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),e.forEach(function(t){var e,n,o;e=i,o=r[n=t],n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o})}return i}function l(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],0<=e.indexOf(n)||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],0<=e.indexOf(n)||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function e(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function t(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var w=t(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),E=t(/Edge/i),c=t(/firefox/i),s=t(/safari/i)&&!t(/chrome/i)&&!t(/android/i),n=t(/iP(ad|od|hone)/i),i=t(/chrome/i)&&t(/android/i),r={capture:!1,passive:!1};function u(t,e,n){t.addEventListener(e,n,!w&&r)}function d(t,e,n){t.removeEventListener(e,n,!w&&r)}function h(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function P(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&h(t,e):h(t,e))||o&&t===n)return t;if(t===n)break}while(t=(i=t).host&&i!==document&&i.host.nodeType?i.host:i.parentNode)}var i;return null}var f,p=/\s+/g;function k(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(p," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(p," ")}}function R(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function v(t,e){var n="";if("string"==typeof t)n=t;else do{var o=R(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function g(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function N(){var t=document.scrollingElement;return t||document.documentElement}function X(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,a,l,s,c,u,d;if(d=t!==window&&t!==N()?(a=(r=t.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,u=r.height,r.width):(l=a=0,s=window.innerHeight,c=window.innerWidth,u=window.innerHeight,window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!w))do{if(i&&i.getBoundingClientRect&&("none"!==R(i,"transform")||n&&"static"!==R(i,"position"))){var h=i.getBoundingClientRect();a-=h.top+parseInt(R(i,"border-top-width")),l-=h.left+parseInt(R(i,"border-left-width")),s=a+r.height,c=l+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var f=v(i||t),p=f&&f.a,g=f&&f.d;f&&(s=(a/=g)+(u/=g),c=(l/=p)+(d/=p))}return{top:a,left:l,bottom:s,right:c,width:d,height:u}}}function Y(t,e,n){for(var o=H(t,!0),i=X(t)[e];o;){var r=X(o)[n];if(!("top"===n||"left"===n?r<=i:i<=r))return o;if(o===N())break;o=H(o,!1)}return!1}function m(t,e,n){for(var o=0,i=0,r=t.children;i<r.length;){if("none"!==r[i].style.display&&r[i]!==Rt.ghost&&r[i]!==Rt.dragged&&P(r[i],n.draggable,t,!1)){if(o===e)return r[i];o++}i++}return null}function B(t,e){for(var n=t.lastElementChild;n&&(n===Rt.ghost||"none"===R(n,"display")||e&&!h(n,e));)n=n.previousElementSibling;return n||null}function F(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Rt.clone||e&&!h(t,e)||n++;return n}function b(t){var e=0,n=0,o=N();if(t)do{var i=v(t),r=i.a,a=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*a}while(t!==o&&(t=t.parentNode));return[e,n]}function H(t,e){if(!t||!t.getBoundingClientRect)return N();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=R(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return N();if(o||e)return n;o=!0}}}while(n=n.parentNode);return N()}function y(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function D(e,n){return function(){if(!f){var t=arguments;1===t.length?e.call(this,t[0]):e.apply(this,t),f=setTimeout(function(){f=void 0},n)}}}function L(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function S(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function _(t,e){R(t,"position","absolute"),R(t,"top",e.top),R(t,"left",e.left),R(t,"width",e.width),R(t,"height",e.height)}function C(t){R(t,"position",""),R(t,"top",""),R(t,"left",""),R(t,"width",""),R(t,"height","")}var j="Sortable"+(new Date).getTime();function T(){var e,o=[];return{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach(function(t){if("none"!==R(t,"display")&&t!==Rt.ghost){o.push({target:t,rect:X(t)});var e=I({},o[o.length-1].rect);if(t.thisAnimationDuration){var n=v(t,!0);n&&(e.top-=n.f,e.left-=n.e)}t.fromRect=e}})},addAnimationState:function(t){o.push(t)},removeAnimationState:function(t){o.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(o,{target:t}),1)},animateAll:function(t){var c=this;if(!this.options.animation)return clearTimeout(e),void("function"==typeof t&&t());var u=!1,d=0;o.forEach(function(t){var e=0,n=t.target,o=n.fromRect,i=X(n),r=n.prevFromRect,a=n.prevToRect,l=t.rect,s=v(n,!0);s&&(i.top-=s.f,i.left-=s.e),n.toRect=i,n.thisAnimationDuration&&y(r,i)&&!y(o,i)&&(l.top-i.top)/(l.left-i.left)==(o.top-i.top)/(o.left-i.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(l,r,a,c.options)),y(i,o)||(n.prevFromRect=o,n.prevToRect=i,e||(e=c.options.animation),c.animate(n,l,i,e)),e&&(u=!0,d=Math.max(d,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout(function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null},e),n.thisAnimationDuration=e)}),clearTimeout(e),u?e=setTimeout(function(){"function"==typeof t&&t()},d):"function"==typeof t&&t(),o=[]},animate:function(t,e,n,o){if(o){R(t,"transition",""),R(t,"transform","");var i=v(this.el),r=i&&i.a,a=i&&i.d,l=(e.left-n.left)/(r||1),s=(e.top-n.top)/(a||1);t.animatingX=!!l,t.animatingY=!!s,R(t,"transform","translate3d("+l+"px,"+s+"px,0)"),function(t){t.offsetWidth}(t),R(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),R(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){R(t,"transition",""),R(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},o)}}}}var x=[],M={initializeByDefault:!0},O={mount:function(t){for(var e in M)!M.hasOwnProperty(e)||e in t||(t[e]=M[e]);x.push(t)},pluginEvent:function(e,n,o){var t=this;this.eventCanceled=!1,o.cancel=function(){t.eventCanceled=!0};var i=e+"Global";x.forEach(function(t){n[t.pluginName]&&(n[t.pluginName][i]&&n[t.pluginName][i](I({sortable:n},o)),n.options[t.pluginName]&&n[t.pluginName][e]&&n[t.pluginName][e](I({sortable:n},o)))})},initializePlugins:function(o,i,r,t){for(var e in x.forEach(function(t){var e=t.pluginName;if(o.options[e]||t.initializeByDefault){var n=new t(o,i,o.options);n.sortable=o,n.options=o.options,o[e]=n,a(r,n.defaults)}}),o.options)if(o.options.hasOwnProperty(e)){var n=this.modifyOption(o,e,o.options[e]);void 0!==n&&(o.options[e]=n)}},getEventProperties:function(e,n){var o={};return x.forEach(function(t){"function"==typeof t.eventProperties&&a(o,t.eventProperties.call(n[t.pluginName],e))}),o},modifyOption:function(e,n,o){var i;return x.forEach(function(t){e[t.pluginName]&&t.optionListeners&&"function"==typeof t.optionListeners[n]&&(i=t.optionListeners[n].call(e[t.pluginName],o))}),i}};function A(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,a=t.toEl,l=t.fromEl,s=t.oldIndex,c=t.newIndex,u=t.oldDraggableIndex,d=t.newDraggableIndex,h=t.originalEvent,f=t.putSortable,p=t.extraEventProperties;if(e=e||n&&n[j]){var g,v=e.options,m="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||w||E?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=a||n,g.from=l||n,g.item=i||n,g.clone=r,g.oldIndex=s,g.newIndex=c,g.oldDraggableIndex=u,g.newDraggableIndex=d,g.originalEvent=h,g.pullMode=f?f.lastPutMode:void 0;var b=I({},p,O.getEventProperties(o,e));for(var y in b)g[y]=b[y];n&&n.dispatchEvent(g),v[m]&&v[m].call(e,g)}}function K(t,e,n){var o=2<arguments.length&&void 0!==n?n:{},i=o.evt,r=l(o,["evt"]);O.pluginEvent.bind(Rt)(t,e,I({dragEl:z,parentEl:G,ghostEl:U,rootEl:q,nextEl:V,lastDownEl:Z,cloneEl:Q,cloneHidden:$,dragStarted:dt,putSortable:it,activeSortable:Rt.active,originalEvent:i,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt,hideGhostForTarget:Nt,unhideGhostForTarget:It,cloneNowHidden:function(){$=!0},cloneNowShown:function(){$=!1},dispatchSortableEvent:function(t){W({sortable:e,name:t,originalEvent:i})}},r))}function W(t){A(I({putSortable:it,cloneEl:Q,targetEl:z,rootEl:q,oldIndex:J,oldDraggableIndex:et,newIndex:tt,newDraggableIndex:nt},t))}var z,G,U,q,V,Z,Q,$,J,tt,et,nt,ot,it,rt,at,lt,st,ct,ut,dt,ht,ft,pt,gt,vt=!1,mt=!1,bt=[],yt=!1,wt=!1,Et=[],Dt=!1,St=[],_t="undefined"!=typeof document,Ct=n,Tt=E||w?"cssFloat":"float",xt=_t&&!i&&!n&&"draggable"in document.createElement("div"),Mt=function(){if(_t){if(w)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Ot=function(t,e){var n=R(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=m(t,0,e),r=m(t,1,e),a=i&&R(i),l=r&&R(r),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+X(i).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+X(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return i&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||o<=s&&"none"===n[Tt]||r&&"none"===n[Tt]&&o<s+c)?"vertical":"horizontal"},At=function(t){function s(a,l){return function(t,e,n,o){var i=t.options.group.name&&e.options.group.name&&t.options.group.name===e.options.group.name;if(null==a&&(l||i))return!0;if(null==a||!1===a)return!1;if(l&&"clone"===a)return a;if("function"==typeof a)return s(a(t,e,n,o),l)(t,e,n,o);var r=(l?t:e).options.group.name;return!0===a||"string"==typeof a&&a===r||a.join&&-1<a.indexOf(r)}}var e={},n=t.group;n&&"object"==o(n)||(n={name:n}),e.name=n.name,e.checkPull=s(n.pull,!0),e.checkPut=s(n.put),e.revertClone=n.revertClone,t.group=e},Nt=function(){!Mt&&U&&R(U,"display","none")},It=function(){!Mt&&U&&R(U,"display","")};_t&&document.addEventListener("click",function(t){if(mt)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),mt=!1},!0);function Pt(t){if(z){var e=function(r,a){var l;return bt.some(function(t){if(!B(t)){var e=X(t),n=t[j].options.emptyInsertThreshold,o=r>=e.left-n&&r<=e.right+n,i=a>=e.top-n&&a<=e.bottom+n;return n&&o&&i?l=t:void 0}}),l}((t=t.touches?t.touches[0]:t).clientX,t.clientY);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[j]._onDragOver(n)}}}function kt(t){z&&z.parentNode[j]._isOutsideThisEl(t.target)}function Rt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=a({},e),t[j]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Ot(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Rt.supportPointer&&"PointerEvent"in window,emptyInsertThreshold:5};for(var o in O.initializePlugins(this,t,n),n)o in e||(e[o]=n[o]);for(var i in At(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&xt,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?u(t,"pointerdown",this._onTapStart):(u(t,"mousedown",this._onTapStart),u(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(u(t,"dragover",this),u(t,"dragenter",this)),bt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),a(this,T())}function Xt(t,e,n,o,i,r,a,l){var s,c,u=t[j],d=u.options.onMove;return!window.CustomEvent||w||E?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=e,s.from=t,s.dragged=n,s.draggedRect=o,s.related=i||e,s.relatedRect=r||X(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),d&&(c=d.call(u,s,a)),c}function Yt(t){t.draggable=!1}function Bt(){Dt=!1}function Ft(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Ht(t){return setTimeout(t,0)}function Lt(t){return clearTimeout(t)}Rt.prototype={constructor:Rt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ht=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,o=this.el,t=this.options,i=t.preventOnFilter,r=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=t.filter;if(function(t){St.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&St.push(o)}}(o),!z&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||t.disabled||s.isContentEditable||(l=P(l,t.draggable,o,!1))&&l.animated||Z===l)){if(J=F(l),et=F(l,t.draggable),"function"==typeof c){if(c.call(this,e,l,this))return W({sortable:n,rootEl:s,name:"filter",targetEl:l,toEl:o,fromEl:o}),K("filter",n,{evt:e}),void(i&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some(function(t){if(t=P(s,t.trim(),o,!1))return W({sortable:n,rootEl:t,name:"filter",targetEl:l,fromEl:o,toEl:o}),K("filter",n,{evt:e}),!0})))return void(i&&e.cancelable&&e.preventDefault());t.handle&&!P(s,t.handle,o,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,a=i.options,l=r.ownerDocument;if(n&&!z&&n.parentNode===r){var s=X(n);if(q=r,G=(z=n).parentNode,V=z.nextSibling,Z=n,ot=a.group,rt={target:Rt.dragged=z,clientX:(e||t).clientX,clientY:(e||t).clientY},ct=rt.clientX-s.left,ut=rt.clientY-s.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,z.style["will-change"]="all",o=function(){K("delayEnded",i,{evt:t}),Rt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!c&&i.nativeDraggable&&(z.draggable=!0),i._triggerDragStart(t,e),W({sortable:i,name:"choose",originalEvent:t}),k(z,a.chosenClass,!0))},a.ignore.split(",").forEach(function(t){g(z,t.trim(),Yt)}),u(l,"dragover",Pt),u(l,"mousemove",Pt),u(l,"touchmove",Pt),u(l,"mouseup",i._onDrop),u(l,"touchend",i._onDrop),u(l,"touchcancel",i._onDrop),c&&this.nativeDraggable&&(this.options.touchStartThreshold=4,z.draggable=!0),K("delayStart",this,{evt:t}),!a.delay||a.delayOnTouchOnly&&!e||this.nativeDraggable&&(E||w))o();else{if(Rt.eventCanceled)return void this._onDrop();u(l,"mouseup",i._disableDelayedDrag),u(l,"touchend",i._disableDelayedDrag),u(l,"touchcancel",i._disableDelayedDrag),u(l,"mousemove",i._delayedDragTouchMoveHandler),u(l,"touchmove",i._delayedDragTouchMoveHandler),a.supportPointer&&u(l,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,a.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){z&&Yt(z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;d(t,"mouseup",this._disableDelayedDrag),d(t,"touchend",this._disableDelayedDrag),d(t,"touchcancel",this._disableDelayedDrag),d(t,"mousemove",this._delayedDragTouchMoveHandler),d(t,"touchmove",this._delayedDragTouchMoveHandler),d(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?u(document,"pointermove",this._onTouchMove):u(document,e?"touchmove":"mousemove",this._onTouchMove):(u(z,"dragend",this),u(q,"dragstart",this._onDragStart));try{document.selection?Ht(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(vt=!1,q&&z){K("dragStarted",this,{evt:e}),this.nativeDraggable&&u(document,"dragover",kt);var n=this.options;t||k(z,n.dragClass,!1),k(z,n.ghostClass,!0),Rt.active=this,t&&this._appendGhost(),W({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(at){this._lastX=at.clientX,this._lastY=at.clientY,Nt();for(var t=document.elementFromPoint(at.clientX,at.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(at.clientX,at.clientY))!==e;)e=t;if(z.parentNode[j]._isOutsideThisEl(t),e)do{if(e[j]){if(e[j]._onDragOver({clientX:at.clientX,clientY:at.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);It()}},_onTouchMove:function(t){if(rt){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=U&&v(U,!0),a=U&&r&&r.a,l=U&&r&&r.d,s=Ct&&gt&&b(gt),c=(i.clientX-rt.clientX+o.x)/(a||1)+(s?s[0]-Et[0]:0)/(a||1),u=(i.clientY-rt.clientY+o.y)/(l||1)+(s?s[1]-Et[1]:0)/(l||1);if(!Rt.active&&!vt){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(U){r?(r.e+=c-(lt||0),r.f+=u-(st||0)):r={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");R(U,"webkitTransform",d),R(U,"mozTransform",d),R(U,"msTransform",d),R(U,"transform",d),lt=c,st=u,at=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!U){var t=this.options.fallbackOnBody?document.body:q,e=X(z,!0,Ct,!0,t),n=this.options;if(Ct){for(gt=t;"static"===R(gt,"position")&&"none"===R(gt,"transform")&&gt!==document;)gt=gt.parentNode;gt!==document.body&&gt!==document.documentElement?(gt===document&&(gt=N()),e.top+=gt.scrollTop,e.left+=gt.scrollLeft):gt=N(),Et=b(gt)}k(U=z.cloneNode(!0),n.ghostClass,!1),k(U,n.fallbackClass,!0),k(U,n.dragClass,!0),R(U,"transition",""),R(U,"transform",""),R(U,"box-sizing","border-box"),R(U,"margin",0),R(U,"top",e.top),R(U,"left",e.left),R(U,"width",e.width),R(U,"height",e.height),R(U,"opacity","0.8"),R(U,"position",Ct?"absolute":"fixed"),R(U,"zIndex","100000"),R(U,"pointerEvents","none"),Rt.ghost=U,t.appendChild(U),R(U,"transform-origin",ct/parseInt(U.style.width)*100+"% "+ut/parseInt(U.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;K("dragStart",this,{evt:t}),Rt.eventCanceled?this._onDrop():(K("setupClone",this),Rt.eventCanceled||((Q=S(z)).draggable=!1,Q.style["will-change"]="",this._hideClone(),k(Q,this.options.chosenClass,!1),Rt.clone=Q),n.cloneId=Ht(function(){K("clone",n),Rt.eventCanceled||(n.options.removeCloneOnHide||q.insertBefore(Q,z),n._hideClone(),W({sortable:n,name:"clone"}))}),e||k(z,i.dragClass,!0),e?(mt=!0,n._loopId=setInterval(n._emulateDragOver,50)):(d(document,"mouseup",n._onDrop),d(document,"touchend",n._onDrop),d(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,z)),u(document,"drop",n),R(z,"transform","translateZ(0)")),vt=!0,n._dragStartId=Ht(n._dragStarted.bind(n,e,t)),u(document,"selectstart",n),dt=!0,s&&R(document.body,"user-select","none"))},_onDragOver:function(n){var o,i,r,a,l=this.el,s=n.target,e=this.options,t=e.group,c=Rt.active,u=ot===t,d=e.sort,h=it||c,f=this,p=!1;if(!Dt){if(void 0!==n.preventDefault&&n.cancelable&&n.preventDefault(),s=P(s,e.draggable,l,!0),M("dragOver"),Rt.eventCanceled)return p;if(z.contains(n.target)||s.animated&&s.animatingX&&s.animatingY||f._ignoreWhileAnimating===s)return A(!1);if(mt=!1,c&&!e.disabled&&(u?d||(r=!q.contains(z)):it===this||(this.lastPutMode=ot.checkPull(this,c,z,n))&&t.checkPut(this,c,z,n))){if(a="vertical"===this._getDirection(n,s),o=X(z),M("dragOverValid"),Rt.eventCanceled)return p;if(r)return G=q,O(),this._hideClone(),M("revert"),Rt.eventCanceled||(V?q.insertBefore(z,V):q.appendChild(z)),A(!0);var g=B(l,e.draggable);if(!g||function(t,e,n){var o=X(B(n.el,n.options.draggable));return e?t.clientX>o.right+10||t.clientX<=o.right&&t.clientY>o.bottom&&t.clientX>=o.left:t.clientX>o.right&&t.clientY>o.top||t.clientX<=o.right&&t.clientY>o.bottom+10}(n,a,this)&&!g.animated){if(g===z)return A(!1);if(g&&l===n.target&&(s=g),s&&(i=X(s)),!1!==Xt(q,l,z,o,s,i,n,!!s))return O(),l.appendChild(z),G=l,N(),A(!0)}else if(s.parentNode===l){i=X(s);var v,m,b,y=z.parentNode!==l,w=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,a=n?e.left:e.top,l=n?e.right:e.bottom,s=n?e.width:e.height;return o===a||i===l||o+r/2===a+s/2}(z.animated&&z.toRect||o,s.animated&&s.toRect||i,a),E=a?"top":"left",D=Y(s,"top","top")||Y(z,"top","top"),S=D?D.scrollTop:void 0;if(ht!==s&&(m=i[E],yt=!1,wt=!w&&e.invertSwap||y),0!==(v=function(t,e,n,o,i,r,a,l){var s=o?t.clientY:t.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,h=!1;if(!a)if(l&&pt<c*i){if(!yt&&(1===ft?u+c*r/2<s:s<d-c*r/2)&&(yt=!0),yt)h=!0;else if(1===ft?s<u+pt:d-pt<s)return-ft}else if(u+c*(1-i)/2<s&&s<d-c*(1-i)/2)return function(t){return F(z)<F(t)?1:-1}(e);if((h=h||a)&&(s<u+c*r/2||d-c*r/2<s))return u+c/2<s?1:-1;return 0}(n,s,i,a,w?1:e.swapThreshold,null==e.invertedSwapThreshold?e.swapThreshold:e.invertedSwapThreshold,wt,ht===s)))for(var _=F(z);_-=v,(b=G.children[_])&&("none"===R(b,"display")||b===U););if(0===v||b===s)return A(!1);ft=v;var C=(ht=s).nextElementSibling,T=!1,x=Xt(q,l,z,o,s,i,n,T=1===v);if(!1!==x)return 1!==x&&-1!==x||(T=1===x),Dt=!0,setTimeout(Bt,30),O(),T&&!C?l.appendChild(z):s.parentNode.insertBefore(z,T?C:s),D&&L(D,0,S-D.scrollTop),G=z.parentNode,void 0===m||wt||(pt=Math.abs(m-X(s)[E])),N(),A(!0)}if(l.contains(z))return A(!1)}return!1}function M(t,e){K(t,f,I({evt:n,isOwner:u,axis:a?"vertical":"horizontal",revert:r,dragRect:o,targetRect:i,canSort:d,fromSortable:h,target:s,completed:A,onMove:function(t,e){return Xt(q,l,z,o,t,X(t),n,e)},changed:N},e))}function O(){M("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function A(t){return M("dragOverCompleted",{insertion:t}),t&&(u?c._hideClone():c._showClone(f),f!==h&&(k(z,it?it.options.ghostClass:c.options.ghostClass,!1),k(z,e.ghostClass,!0)),it!==f&&f!==Rt.active?it=f:f===Rt.active&&it&&(it=null),h===f&&(f._ignoreWhileAnimating=s),f.animateAll(function(){M("dragOverAnimationComplete"),f._ignoreWhileAnimating=null}),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(s===z&&!z.animated||s===l&&!s.animated)&&(ht=null),e.dragoverBubble||n.rootEl||s===document||(z.parentNode[j]._isOutsideThisEl(n.target),t||Pt(n)),!e.dragoverBubble&&n.stopPropagation&&n.stopPropagation(),p=!0}function N(){tt=F(z),nt=F(z,e.draggable),W({sortable:f,name:"change",toEl:l,newIndex:tt,newDraggableIndex:nt,originalEvent:n})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){d(document,"mousemove",this._onTouchMove),d(document,"touchmove",this._onTouchMove),d(document,"pointermove",this._onTouchMove),d(document,"dragover",Pt),d(document,"mousemove",Pt),d(document,"touchmove",Pt)},_offUpEvents:function(){var t=this.el.ownerDocument;d(t,"mouseup",this._onDrop),d(t,"touchend",this._onDrop),d(t,"pointerup",this._onDrop),d(t,"touchcancel",this._onDrop),d(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;tt=F(z),nt=F(z,n.draggable),K("drop",this,{evt:t}),G=z&&z.parentNode,tt=F(z),nt=F(z,n.draggable),Rt.eventCanceled||(yt=wt=vt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Lt(this.cloneId),Lt(this._dragStartId),this.nativeDraggable&&(d(document,"drop",this),d(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),s&&R(document.body,"user-select",""),R(z,"transform",""),t&&(dt&&(t.cancelable&&t.preventDefault(),n.dropBubble||t.stopPropagation()),U&&U.parentNode&&U.parentNode.removeChild(U),(q===G||it&&"clone"!==it.lastPutMode)&&Q&&Q.parentNode&&Q.parentNode.removeChild(Q),z&&(this.nativeDraggable&&d(z,"dragend",this),Yt(z),z.style["will-change"]="",dt&&!vt&&k(z,it?it.options.ghostClass:this.options.ghostClass,!1),k(z,this.options.chosenClass,!1),W({sortable:this,name:"unchoose",toEl:G,newIndex:null,newDraggableIndex:null,originalEvent:t}),q!==G?(0<=tt&&(W({rootEl:G,name:"add",toEl:G,fromEl:q,originalEvent:t}),W({sortable:this,name:"remove",toEl:G,originalEvent:t}),W({rootEl:G,name:"sort",toEl:G,fromEl:q,originalEvent:t}),W({sortable:this,name:"sort",toEl:G,originalEvent:t})),it&&it.save()):tt!==J&&0<=tt&&(W({sortable:this,name:"update",toEl:G,originalEvent:t}),W({sortable:this,name:"sort",toEl:G,originalEvent:t})),Rt.active&&(null!=tt&&-1!==tt||(tt=J,nt=et),W({sortable:this,name:"end",toEl:G,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){K("nulling",this),q=z=G=U=V=Q=Z=$=rt=at=dt=tt=nt=J=et=ht=ft=it=ot=Rt.dragged=Rt.ghost=Rt.clone=Rt.active=null,St.forEach(function(t){t.checked=!0}),St.length=lt=st=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":z&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)P(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Ft(t));return e},sort:function(t){var o={},i=this.el;this.toArray().forEach(function(t,e){var n=i.children[e];P(n,this.options.draggable,i,!1)&&(o[t]=n)},this),t.forEach(function(t){o[t]&&(i.removeChild(o[t]),i.appendChild(o[t]))})},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return P(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=O.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&At(n)},destroy:function(){K("destroy",this);var t=this.el;t[j]=null,d(t,"mousedown",this._onTapStart),d(t,"touchstart",this._onTapStart),d(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(d(t,"dragover",this),d(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),bt.splice(bt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!$){if(K("hideClone",this),Rt.eventCanceled)return;R(Q,"display","none"),this.options.removeCloneOnHide&&Q.parentNode&&Q.parentNode.removeChild(Q),$=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if($){if(K("showClone",this),Rt.eventCanceled)return;q.contains(z)&&!this.options.group.revertClone?q.insertBefore(Q,z):V?q.insertBefore(Q,V):q.appendChild(Q),this.options.group.revertClone&&this.animate(z,Q),R(Q,"display",""),$=!1}}else this._hideClone()}},_t&&u(document,"touchmove",function(t){(Rt.active||vt)&&t.cancelable&&t.preventDefault()}),Rt.utils={on:u,off:d,css:R,find:g,is:function(t,e){return!!P(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:D,closest:P,toggleClass:k,clone:S,index:F,nextTick:Ht,cancelNextTick:Lt,detectDirection:Ot,getChild:m},Rt.get=function(t){return t[j]},Rt.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Rt.utils=I({},Rt.utils,t.utils)),O.mount(t)})},Rt.create=function(t,e){return new Rt(t,e)};var jt,Kt,Wt,zt,Gt,Ut,qt=[],Vt=!(Rt.version="1.10.2");function Zt(){qt.forEach(function(t){clearInterval(t.pid)}),qt=[]}function Qt(){clearInterval(Ut)}function $t(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,a=t.hideGhostForTarget,l=t.unhideGhostForTarget;if(e){var s=n||i;a();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}}var Jt,te=D(function(n,t,e,o){if(t.scroll){var i,r=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=N(),u=!1;Kt!==e&&(Kt=e,Zt(),jt=t.scroll,i=t.scrollFn,!0===jt&&(jt=H(e,!0)));var d=0,h=jt;do{var f=h,p=X(f),g=p.top,v=p.bottom,m=p.left,b=p.right,y=p.width,w=p.height,E=void 0,D=void 0,S=f.scrollWidth,_=f.scrollHeight,C=R(f),T=f.scrollLeft,x=f.scrollTop;D=f===c?(E=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(E=y<S&&("auto"===C.overflowX||"scroll"===C.overflowX),w<_&&("auto"===C.overflowY||"scroll"===C.overflowY));var M=E&&(Math.abs(b-r)<=l&&T+y<S)-(Math.abs(m-r)<=l&&!!T),O=D&&(Math.abs(v-a)<=l&&x+w<_)-(Math.abs(g-a)<=l&&!!x);if(!qt[d])for(var A=0;A<=d;A++)qt[A]||(qt[A]={});qt[d].vx==M&&qt[d].vy==O&&qt[d].el===f||(qt[d].el=f,qt[d].vx=M,qt[d].vy=O,clearInterval(qt[d].pid),0==M&&0==O||(u=!0,qt[d].pid=setInterval(function(){o&&0===this.layer&&Rt.active._onTouchMove(Gt);var t=qt[this.layer].vy?qt[this.layer].vy*s:0,e=qt[this.layer].vx?qt[this.layer].vx*s:0;"function"==typeof i&&"continue"!==i.call(Rt.dragged.parentNode[j],e,t,n,Gt,qt[this.layer].el)||L(qt[this.layer].el,e,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&h!==c&&(h=H(h,!1)));Vt=u}},30);function ee(){}function ne(){}ee.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=m(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:$t},a(ee,{pluginName:"revertOnSpill"}),ne.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:$t},a(ne,{pluginName:"removeOnSpill"});var oe,ie,re,ae,le,se=[],ce=[],ue=!1,de=!1,he=!1;function fe(o,i){ce.forEach(function(t,e){var n=i.children[t.sortableIndex+(o?Number(e):0)];n?i.insertBefore(t,n):i.appendChild(t)})}function pe(){se.forEach(function(t){t!==re&&t.parentNode&&t.parentNode.removeChild(t)})}return Rt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?u(document,"dragover",this._handleAutoScroll):this.options.supportPointer?u(document,"pointermove",this._handleFallbackAutoScroll):e.touches?u(document,"touchmove",this._handleFallbackAutoScroll):u(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?d(document,"dragover",this._handleAutoScroll):(d(document,"pointermove",this._handleFallbackAutoScroll),d(document,"touchmove",this._handleFallbackAutoScroll),d(document,"mousemove",this._handleFallbackAutoScroll)),Qt(),Zt(),clearTimeout(f),f=void 0},nulling:function(){Gt=Kt=jt=Vt=Ut=Wt=zt=null,qt.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(e,n){var o=this,i=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,t=document.elementFromPoint(i,r);if(Gt=e,n||E||w||s){te(e,this.options,t,n);var a=H(t,!0);!Vt||Ut&&i===Wt&&r===zt||(Ut&&Qt(),Ut=setInterval(function(){var t=H(document.elementFromPoint(i,r),!0);t!==a&&(a=t,Zt()),te(e,o.options,t,n)},10),Wt=i,zt=r)}else{if(!this.options.bubbleScroll||H(t,!0)===N())return void Zt();te(e,this.options,H(t,!1),!1)}}},a(t,{pluginName:"scroll",initializeByDefault:!0})}),Rt.mount(ne,ee),Rt.mount(new function(){function t(){this.defaults={swapClass:"sortable-swap-highlight"}}return t.prototype={dragStart:function(t){var e=t.dragEl;Jt=e},dragOverValid:function(t){var e=t.completed,n=t.target,o=t.onMove,i=t.activeSortable,r=t.changed,a=t.cancel;if(i.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=Jt;Jt=!1!==o(n)?(k(n,s.swapClass,!0),n):null,c&&c!==Jt&&k(c,s.swapClass,!1)}r(),e(!0),a()}},drop:function(t){var e=t.activeSortable,n=t.putSortable,o=t.dragEl,i=n||this.sortable,r=this.options;Jt&&k(Jt,r.swapClass,!1),Jt&&(r.swap||n&&n.options.swap)&&o!==Jt&&(i.captureAnimationState(),i!==e&&e.captureAnimationState(),function(t,e){var n,o,i=t.parentNode,r=e.parentNode;if(!i||!r||i.isEqualNode(e)||r.isEqualNode(t))return;n=F(t),o=F(e),i.isEqualNode(r)&&n<o&&o++;i.insertBefore(e,i.children[n]),r.insertBefore(t,r.children[o])}(o,Jt),i.animateAll(),i!==e&&e.animateAll())},nulling:function(){Jt=null}},a(t,{pluginName:"swap",eventProperties:function(){return{swapItem:Jt}}})}),Rt.mount(new function(){function t(o){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));o.options.supportPointer?u(document,"pointerup",this._deselectMultiDrag):(u(document,"mouseup",this._deselectMultiDrag),u(document,"touchend",this._deselectMultiDrag)),u(document,"keydown",this._checkKeyDown),u(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,e){var n="";se.length&&ie===o?se.forEach(function(t,e){n+=(e?", ":"")+t.textContent}):n=e.textContent,t.setData("Text",n)}}}return t.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(t){var e=t.dragEl;re=e},delayEnded:function(){this.isMultiDrag=~se.indexOf(re)},setupClone:function(t){var e=t.sortable,n=t.cancel;if(this.isMultiDrag){for(var o=0;o<se.length;o++)ce.push(S(se[o])),ce[o].sortableIndex=se[o].sortableIndex,ce[o].draggable=!1,ce[o].style["will-change"]="",k(ce[o],this.options.selectedClass,!1),se[o]===re&&k(ce[o],this.options.chosenClass,!1);e._hideClone(),n()}},clone:function(t){var e=t.sortable,n=t.rootEl,o=t.dispatchSortableEvent,i=t.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||se.length&&ie===e&&(fe(!0,n),o("clone"),i()))},showClone:function(t){var e=t.cloneNowShown,n=t.rootEl,o=t.cancel;this.isMultiDrag&&(fe(!1,n),ce.forEach(function(t){R(t,"display","")}),e(),le=!1,o())},hideClone:function(t){var e=this,n=(t.sortable,t.cloneNowHidden),o=t.cancel;this.isMultiDrag&&(ce.forEach(function(t){R(t,"display","none"),e.options.removeCloneOnHide&&t.parentNode&&t.parentNode.removeChild(t)}),n(),le=!0,o())},dragStartGlobal:function(t){t.sortable;!this.isMultiDrag&&ie&&ie.multiDrag._deselectMultiDrag(),se.forEach(function(t){t.sortableIndex=F(t)}),se=se.sort(function(t,e){return t.sortableIndex-e.sortableIndex}),he=!0},dragStarted:function(t){var e=this,n=t.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){se.forEach(function(t){t!==re&&R(t,"position","absolute")});var o=X(re,!1,!0,!0);se.forEach(function(t){t!==re&&_(t,o)}),ue=de=!0}n.animateAll(function(){ue=de=!1,e.options.animation&&se.forEach(function(t){C(t)}),e.options.sort&&pe()})}},dragOver:function(t){var e=t.target,n=t.completed,o=t.cancel;de&&~se.indexOf(e)&&(n(!1),o())},revert:function(t){var e=t.fromSortable,n=t.rootEl,o=t.sortable,i=t.dragRect;1<se.length&&(se.forEach(function(t){o.addAnimationState({target:t,rect:de?X(t):i}),C(t),t.fromRect=i,e.removeAnimationState(t)}),de=!1,function(o,i){se.forEach(function(t,e){var n=i.children[t.sortableIndex+(o?Number(e):0)];n?i.insertBefore(t,n):i.appendChild(t)})}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(t){var e=t.sortable,n=t.isOwner,o=t.insertion,i=t.activeSortable,r=t.parentEl,a=t.putSortable,l=this.options;if(o){if(n&&i._hideClone(),ue=!1,l.animation&&1<se.length&&(de||!n&&!i.options.sort&&!a)){var s=X(re,!1,!0,!0);se.forEach(function(t){t!==re&&(_(t,s),r.appendChild(t))}),de=!0}if(!n)if(de||pe(),1<se.length){var c=le;i._showClone(e),i.options.animation&&!le&&c&&ce.forEach(function(t){i.addAnimationState({target:t,rect:ae}),t.fromRect=ae,t.thisAnimationDuration=null})}else i._showClone(e)}},dragOverAnimationCapture:function(t){var e=t.dragRect,n=t.isOwner,o=t.activeSortable;if(se.forEach(function(t){t.thisAnimationDuration=null}),o.options.animation&&!n&&o.multiDrag.isMultiDrag){ae=a({},e);var i=v(re,!0);ae.top-=i.f,ae.left-=i.e}},dragOverAnimationComplete:function(){de&&(de=!1,pe())},drop:function(t){var e=t.originalEvent,n=t.rootEl,o=t.parentEl,i=t.sortable,r=t.dispatchSortableEvent,a=t.oldIndex,l=t.putSortable,s=l||this.sortable;if(e){var c=this.options,u=o.children;if(!he)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),k(re,c.selectedClass,!~se.indexOf(re)),~se.indexOf(re))se.splice(se.indexOf(re),1),oe=null,A({sortable:i,rootEl:n,name:"deselect",targetEl:re,originalEvt:e});else{if(se.push(re),A({sortable:i,rootEl:n,name:"select",targetEl:re,originalEvt:e}),e.shiftKey&&oe&&i.el.contains(oe)){var d,h,f=F(oe),p=F(re);if(~f&&~p&&f!==p)for(d=f<p?(h=f,p):(h=p,f+1);h<d;h++)~se.indexOf(u[h])||(k(u[h],c.selectedClass,!0),se.push(u[h]),A({sortable:i,rootEl:n,name:"select",targetEl:u[h],originalEvt:e}))}else oe=re;ie=s}if(he&&this.isMultiDrag){if((o[j].options.sort||o!==n)&&1<se.length){var g=X(re),v=F(re,":not(."+this.options.selectedClass+")");if(!ue&&c.animation&&(re.thisAnimationDuration=null),s.captureAnimationState(),!ue&&(c.animation&&(re.fromRect=g,se.forEach(function(t){if(t.thisAnimationDuration=null,t!==re){var e=de?X(t):g;t.fromRect=e,s.addAnimationState({target:t,rect:e})}})),pe(),se.forEach(function(t){u[v]?o.insertBefore(t,u[v]):o.appendChild(t),v++}),a===F(re))){var m=!1;se.forEach(function(t){t.sortableIndex===F(t)||(m=!0)}),m&&r("update")}se.forEach(function(t){C(t)}),s.animateAll()}ie=s}(n===o||l&&"clone"!==l.lastPutMode)&&ce.forEach(function(t){t.parentNode&&t.parentNode.removeChild(t)})}},nullingGlobal:function(){this.isMultiDrag=he=!1,ce.length=0},destroyGlobal:function(){this._deselectMultiDrag(),d(document,"pointerup",this._deselectMultiDrag),d(document,"mouseup",this._deselectMultiDrag),d(document,"touchend",this._deselectMultiDrag),d(document,"keydown",this._checkKeyDown),d(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(t){if(!(void 0!==he&&he||ie!==this.sortable||t&&P(t.target,this.options.draggable,this.sortable.el,!1)||t&&0!==t.button))for(;se.length;){var e=se[0];k(e,this.options.selectedClass,!1),se.shift(),A({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:e,originalEvt:t})}},_checkKeyDown:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(t){t.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},a(t,{pluginName:"multiDrag",utils:{select:function(t){var e=t.parentNode[j];e&&e.options.multiDrag&&!~se.indexOf(t)&&(ie&&ie!==e&&(ie.multiDrag._deselectMultiDrag(),ie=e),k(t,e.options.selectedClass,!0),se.push(t))},deselect:function(t){var e=t.parentNode[j],n=se.indexOf(t);e&&e.options.multiDrag&&~n&&(k(t,e.options.selectedClass,!1),se.splice(n,1))}},eventProperties:function(){var n=this,o=[],i=[];return se.forEach(function(t){var e;o.push({multiDragElement:t,index:t.sortableIndex}),e=de&&t!==re?-1:de?F(t,":not(."+n.options.selectedClass+")"):F(t),i.push({multiDragElement:t,index:e})}),{items:e(se),clones:[].concat(ce),oldIndicies:o,newIndicies:i}},optionListeners:{multiDragKey:function(t){return"ctrl"===(t=t.toLowerCase())?t="Control":1<t.length&&(t=t.charAt(0).toUpperCase()+t.substr(1)),t}}})}),Rt});
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 2.0.0.beta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram Jetten
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-20 00:00:00.000000000 Z
11
+ date: 2021-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '5.2'
19
+ version: '6.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '5.2'
26
+ version: '6.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pg
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: mini_magick
112
+ name: image_processing
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -182,16 +182,16 @@ dependencies:
182
182
  name: mobility
183
183
  requirement: !ruby/object:Gem::Requirement
184
184
  requirements:
185
- - - ">="
185
+ - - '='
186
186
  - !ruby/object:Gem::Version
187
- version: 0.8.9
187
+ version: 1.1.1
188
188
  type: :runtime
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
- - - ">="
192
+ - - '='
193
193
  - !ruby/object:Gem::Version
194
- version: 0.8.9
194
+ version: 1.1.1
195
195
  - !ruby/object:Gem::Dependency
196
196
  name: rack-rewrite
197
197
  requirement: !ruby/object:Gem::Requirement
@@ -220,6 +220,20 @@ dependencies:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: 1.0.0
223
+ - !ruby/object:Gem::Dependency
224
+ name: attr_json
225
+ requirement: !ruby/object:Gem::Requirement
226
+ requirements:
227
+ - - ">="
228
+ - !ruby/object:Gem::Version
229
+ version: '0'
230
+ type: :runtime
231
+ prerelease: false
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ requirements:
234
+ - - ">="
235
+ - !ruby/object:Gem::Version
236
+ version: '0'
223
237
  description: CMS
224
238
  email:
225
239
  - bram@denkgroot.com
@@ -285,17 +299,21 @@ files:
285
299
  - app/assets/icons/spina/home.svg
286
300
  - app/assets/icons/spina/image.svg
287
301
  - app/assets/icons/spina/inbox-outline.svg
302
+ - app/assets/icons/spina/indent.svg
288
303
  - app/assets/icons/spina/info.svg
289
304
  - app/assets/icons/spina/italic.svg
290
305
  - app/assets/icons/spina/large-check.svg
291
306
  - app/assets/icons/spina/link.svg
307
+ - app/assets/icons/spina/list-ol.svg
292
308
  - app/assets/icons/spina/list-ul.svg
309
+ - app/assets/icons/spina/list.svg
293
310
  - app/assets/icons/spina/lock.svg
294
311
  - app/assets/icons/spina/mail-outline.svg
295
312
  - app/assets/icons/spina/mail.svg
296
313
  - app/assets/icons/spina/media-library.svg
297
314
  - app/assets/icons/spina/megaphone.svg
298
315
  - app/assets/icons/spina/min.svg
316
+ - app/assets/icons/spina/outdent.svg
299
317
  - app/assets/icons/spina/pages.svg
300
318
  - app/assets/icons/spina/pencil-outline.svg
301
319
  - app/assets/icons/spina/pencil.svg
@@ -306,28 +324,36 @@ files:
306
324
  - app/assets/icons/spina/preview/icons_spina-preview.html
307
325
  - app/assets/icons/spina/preview/ics_spina-preview.html
308
326
  - app/assets/icons/spina/product-outline.svg
327
+ - app/assets/icons/spina/quote-right.svg
309
328
  - app/assets/icons/spina/random.svg
329
+ - app/assets/icons/spina/redo.svg
310
330
  - app/assets/icons/spina/refresh.svg
311
331
  - app/assets/icons/spina/search.svg
312
332
  - app/assets/icons/spina/shop.svg
313
333
  - app/assets/icons/spina/social-outline.svg
334
+ - app/assets/icons/spina/strikethrough.svg
314
335
  - app/assets/icons/spina/trash.svg
336
+ - app/assets/icons/spina/undo.svg
315
337
  - app/assets/icons/spina/upload-outline.svg
316
338
  - app/assets/icons/spina/users-outline.svg
317
339
  - app/assets/images/spina/arrow-left.svg
318
340
  - app/assets/images/spina/arrow-right.svg
319
341
  - app/assets/images/spina/datepicker.svg
320
342
  - app/assets/images/spina/divider.svg
343
+ - app/assets/images/spina/favicon.png
321
344
  - app/assets/images/spina/media_folder_placeholder.svg
322
345
  - app/assets/images/spina/spina.png
323
346
  - app/assets/images/spina/spina.svg
324
- - app/assets/javascripts/spina/admin/account.coffee
325
347
  - app/assets/javascripts/spina/admin/application.js
326
348
  - app/assets/javascripts/spina/admin/confirm_delete.coffee.erb
349
+ - app/assets/javascripts/spina/admin/controllers/attachment_picker_controller.js
327
350
  - app/assets/javascripts/spina/admin/controllers/gallery_select_controller.js
328
351
  - app/assets/javascripts/spina/admin/controllers/image_form_controller.js
329
352
  - app/assets/javascripts/spina/admin/controllers/infinite_scroll_controller.js
353
+ - app/assets/javascripts/spina/admin/controllers/media_picker_controller.js
354
+ - app/assets/javascripts/spina/admin/controllers/modal_controller.js
330
355
  - app/assets/javascripts/spina/admin/controllers/page_collapse_controller.js
356
+ - app/assets/javascripts/spina/admin/controllers/repeater_form_controller.js
331
357
  - app/assets/javascripts/spina/admin/dropdown.coffee
332
358
  - app/assets/javascripts/spina/admin/forms.coffee
333
359
  - app/assets/javascripts/spina/admin/media_gallery.coffee
@@ -351,10 +377,12 @@ files:
351
377
  - app/assets/stylesheets/spina/_ics_spina.scss
352
378
  - app/assets/stylesheets/spina/_labels.sass
353
379
  - app/assets/stylesheets/spina/_login.sass
380
+ - app/assets/stylesheets/spina/_media_picker.sass
354
381
  - app/assets/stylesheets/spina/_mixins.sass
355
382
  - app/assets/stylesheets/spina/_modal.sass
356
383
  - app/assets/stylesheets/spina/_normalize.scss
357
384
  - app/assets/stylesheets/spina/_notifications.sass
385
+ - app/assets/stylesheets/spina/_pages.sass
358
386
  - app/assets/stylesheets/spina/_sortable_lists.sass
359
387
  - app/assets/stylesheets/spina/_tables.sass
360
388
  - app/assets/stylesheets/spina/_trix_custom.sass
@@ -362,6 +390,7 @@ files:
362
390
  - app/assets/stylesheets/spina/admin/application.css.sass
363
391
  - app/assets/stylesheets/spina/application.sass
364
392
  - app/assets/stylesheets/spina_front_end.sass
393
+ - app/controllers/concerns/spina/current_methods.rb
365
394
  - app/controllers/concerns/spina/frontend.rb
366
395
  - app/controllers/spina/admin/accounts_controller.rb
367
396
  - app/controllers/spina/admin/admin_controller.rb
@@ -382,40 +411,38 @@ files:
382
411
  - app/helpers/spina/admin/admin_helper.rb
383
412
  - app/helpers/spina/admin/pages_helper.rb
384
413
  - app/helpers/spina/admin_nav_helper.rb
385
- - app/helpers/spina/files_helper.rb
414
+ - app/helpers/spina/attachments_helper.rb
386
415
  - app/helpers/spina/images_helper.rb
387
416
  - app/helpers/spina/pages_helper.rb
388
417
  - app/mailers/spina/user_mailer.rb
389
- - app/models/concerns/spina/image_collectable.rb
390
- - app/models/concerns/spina/optionable.rb
391
- - app/models/concerns/spina/part.rb
392
418
  - app/models/concerns/spina/partable.rb
419
+ - app/models/concerns/spina/translated_content.rb
393
420
  - app/models/spina/account.rb
394
421
  - app/models/spina/application_record.rb
395
422
  - app/models/spina/attachment.rb
396
- - app/models/spina/attachment_collection.rb
397
423
  - app/models/spina/current.rb
398
424
  - app/models/spina/image.rb
399
- - app/models/spina/image_collection.rb
400
- - app/models/spina/image_collections_image.rb
401
- - app/models/spina/layout_part.rb
402
- - app/models/spina/line.rb
403
425
  - app/models/spina/media_folder.rb
404
426
  - app/models/spina/navigation.rb
405
427
  - app/models/spina/navigation_item.rb
406
- - app/models/spina/option.rb
407
428
  - app/models/spina/page.rb
408
- - app/models/spina/page_part.rb
429
+ - app/models/spina/parts/attachment.rb
430
+ - app/models/spina/parts/base.rb
431
+ - app/models/spina/parts/image.rb
432
+ - app/models/spina/parts/image_collection.rb
433
+ - app/models/spina/parts/image_variant.rb
434
+ - app/models/spina/parts/line.rb
435
+ - app/models/spina/parts/multi_line.rb
436
+ - app/models/spina/parts/option.rb
437
+ - app/models/spina/parts/repeater.rb
438
+ - app/models/spina/parts/repeater_content.rb
439
+ - app/models/spina/parts/text.rb
409
440
  - app/models/spina/resource.rb
410
441
  - app/models/spina/rewrite_rule.rb
411
442
  - app/models/spina/setting.rb
412
- - app/models/spina/structure.rb
413
- - app/models/spina/structure_item.rb
414
- - app/models/spina/structure_part.rb
415
- - app/models/spina/text.rb
416
443
  - app/models/spina/user.rb
444
+ - app/presenters/spina/content_presenter.rb
417
445
  - app/presenters/spina/menu_presenter.rb
418
- - app/views/dummy/show.html.haml
419
446
  - app/views/layouts/spina/admin/admin.html.haml
420
447
  - app/views/layouts/spina/admin/media_library.html.haml
421
448
  - app/views/layouts/spina/admin/pages.html.haml
@@ -428,30 +455,25 @@ files:
428
455
  - app/views/spina/admin/accounts/social.html.haml
429
456
  - app/views/spina/admin/accounts/style.html.haml
430
457
  - app/views/spina/admin/attachments/_attachment.html.haml
431
- - app/views/spina/admin/attachments/_attachment_collection.html.haml
432
- - app/views/spina/admin/attachments/_select.html.haml
433
- - app/views/spina/admin/attachments/_select_collection.html.haml
434
458
  - app/views/spina/admin/attachments/create.js.erb
435
459
  - app/views/spina/admin/attachments/index.html.haml
436
- - app/views/spina/admin/attachments/insert.js.erb
437
- - app/views/spina/admin/attachments/insert_collection.js.coffee
438
- - app/views/spina/admin/attachments/select.js.erb
439
- - app/views/spina/admin/attachments/select_collection.js.erb
440
- - app/views/spina/admin/image_collections/_image_collection.html.haml
441
460
  - app/views/spina/admin/images/_form.html.haml
442
461
  - app/views/spina/admin/images/_image.html.haml
443
462
  - app/views/spina/admin/images/create.js.erb
444
463
  - app/views/spina/admin/images/index.html.haml
445
464
  - app/views/spina/admin/images/index.js.erb
446
- - app/views/spina/admin/layout_partables/lines/_form.html.haml
447
465
  - app/views/spina/admin/media_folders/_form.html.haml
448
466
  - app/views/spina/admin/media_folders/_media_folder.html.haml
449
467
  - app/views/spina/admin/media_folders/edit.js.erb
450
468
  - app/views/spina/admin/media_folders/new.js.erb
451
469
  - app/views/spina/admin/media_folders/show.html.haml
470
+ - app/views/spina/admin/media_picker/_image.html.haml
471
+ - app/views/spina/admin/media_picker/_media_picker.html.haml
472
+ - app/views/spina/admin/media_picker/_media_picker_grid.html.haml
452
473
  - app/views/spina/admin/media_picker/_modal.html.haml
453
474
  - app/views/spina/admin/media_picker/infinite_scroll.js.erb
454
475
  - app/views/spina/admin/media_picker/select.js.erb
476
+ - app/views/spina/admin/media_picker/show.html.haml
455
477
  - app/views/spina/admin/media_picker/show.js.erb
456
478
  - app/views/spina/admin/navigations/_navigation_item_nested_list.html.haml
457
479
  - app/views/spina/admin/navigations/_page.html.haml
@@ -469,16 +491,16 @@ files:
469
491
  - app/views/spina/admin/pages/index.html.haml
470
492
  - app/views/spina/admin/pages/new.html.haml
471
493
  - app/views/spina/admin/pages/update.js.coffee
472
- - app/views/spina/admin/partables/attachment_collections/_form.html.haml
473
- - app/views/spina/admin/partables/attachments/_form.html.haml
474
- - app/views/spina/admin/partables/image_collections/_form.html.haml
475
- - app/views/spina/admin/partables/images/_form.html.haml
476
- - app/views/spina/admin/partables/lines/_form.html.haml
477
- - app/views/spina/admin/partables/options/_form.html.haml
478
- - app/views/spina/admin/partables/photo_collections/_form.html.haml
479
- - app/views/spina/admin/partables/photos/_form.html.haml
480
- - app/views/spina/admin/partables/structures/_form.html.haml
481
- - app/views/spina/admin/partables/texts/_form.html.haml
494
+ - app/views/spina/admin/parts/attachments/_form.html.haml
495
+ - app/views/spina/admin/parts/image_collections/_fields.html.haml
496
+ - app/views/spina/admin/parts/image_collections/_form.html.haml
497
+ - app/views/spina/admin/parts/images/_form.html.haml
498
+ - app/views/spina/admin/parts/lines/_form.html.haml
499
+ - app/views/spina/admin/parts/multi_lines/_form.html.haml
500
+ - app/views/spina/admin/parts/options/_form.html.haml
501
+ - app/views/spina/admin/parts/repeaters/_fields.html.haml
502
+ - app/views/spina/admin/parts/repeaters/_form.html.haml
503
+ - app/views/spina/admin/parts/texts/_form.html.haml
482
504
  - app/views/spina/admin/password_resets/edit.html.haml
483
505
  - app/views/spina/admin/password_resets/new.html.haml
484
506
  - app/views/spina/admin/resources/edit.html.haml
@@ -491,9 +513,6 @@ files:
491
513
  - app/views/spina/admin/shared/_notifications.html.haml
492
514
  - app/views/spina/admin/shared/_primary_navigation.html.haml
493
515
  - app/views/spina/admin/shared/_rich_text_field.html.haml
494
- - app/views/spina/admin/structure_items/_fields.html.haml
495
- - app/views/spina/admin/structure_partables/attachment_collections/_form.html.haml
496
- - app/views/spina/admin/structure_partables/attachments/_form.html.haml
497
516
  - app/views/spina/admin/users/_form.html.haml
498
517
  - app/views/spina/admin/users/edit.html.haml
499
518
  - app/views/spina/admin/users/index.html.haml
@@ -528,6 +547,10 @@ files:
528
547
  - config/routes.rb
529
548
  - db/migrate/10_create_spina_image_collections.rb
530
549
  - db/migrate/11_create_spina_resources.rb
550
+ - db/migrate/12_add_url_title_to_spina_page_translations.rb
551
+ - db/migrate/13_add_json_attributes_to_spina_accounts.rb
552
+ - db/migrate/14_add_json_attributes_to_spina_pages.rb
553
+ - db/migrate/15_add_slug_to_spina_resources.rb
531
554
  - db/migrate/1_create_spina_tables.rb
532
555
  - db/migrate/2_create_spina_translation_tables.rb
533
556
  - db/migrate/3_create_spina_navigations.rb
@@ -556,8 +579,10 @@ files:
556
579
  - lib/generators/spina/templates/config/initializers/themes/default.rb
557
580
  - lib/generators/spina/templates/config/initializers/themes/demo.rb
558
581
  - lib/spina.rb
582
+ - lib/spina/attr_json_spina_parts_model.rb
559
583
  - lib/spina/engine.rb
560
584
  - lib/spina/fontcustom/_ics_spina.scss
585
+ - lib/spina/part.rb
561
586
  - lib/spina/plugin.rb
562
587
  - lib/spina/railtie.rb
563
588
  - lib/spina/theme.rb
@@ -572,10 +597,15 @@ files:
572
597
  - vendor/assets/stylesheets/spina/_animate.scss
573
598
  - vendor/assets/stylesheets/spina/_normalize.scss
574
599
  - vendor/assets/stylesheets/spina/_trix.css
575
- homepage: http://www.denkgroot.com
600
+ homepage: https://www.spinacms.com
576
601
  licenses:
577
602
  - MIT
578
- metadata: {}
603
+ metadata:
604
+ homepage_uri: https://www.spinacms.com
605
+ bug_tracker_uri: https://github.com/SpinaCMS/Spina/issues
606
+ documentation_uri: https://www.spinacms.com/guide
607
+ changelog_uri: https://github.com/SpinaCMS/Spina/blob/master/CHANGELOG.md
608
+ source_code_uri: https://github.com/SpinaCMS/Spina
579
609
  post_install_message:
580
610
  rdoc_options: []
581
611
  require_paths:
@@ -587,11 +617,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
587
617
  version: '0'
588
618
  required_rubygems_version: !ruby/object:Gem::Requirement
589
619
  requirements:
590
- - - ">="
620
+ - - ">"
591
621
  - !ruby/object:Gem::Version
592
- version: '0'
622
+ version: 1.3.1
593
623
  requirements: []
594
- rubygems_version: 3.0.3
624
+ rubygems_version: 3.1.4
595
625
  signing_key:
596
626
  specification_version: 4
597
627
  summary: Spina