{"version":3,"sources":["html.sortable.js"],"names":["root","factory","define","amd","exports","module","require","sortable","jQuery","this","$","dragging","draggingHeight","placeholders","sortables","_removeItemEvents","items","off","_removeSortableEvents","_attachGhost","event","ghost","dataTransfer","effectAllowed","setData","setDragImage","item","x","y","_addGhostPos","e","parseInt","pageX","draggedItem","offset","left","pageY","top","_makeGhost","$draggedItem","_getGhost","_getOptions","soptions","options","_removeSortableData","removeData","removeAttr","_removeItemData","_listsConnected","curList","destList","undefined","data","_destroySortable","opts","children","handles","handle","find","_enableSortable","attr","spanEl","document","window","createElement","dragDrop","disableIEFix","on","index","parents","_disableSortable","_reloadSortable","selector","$sortables","method","String","extend","connectWith","placeholder","dragImage","placeholderClass","draggingClass","hoverClass","each","$sortable","test","startParent","newParent","tagName","addClass","id","length","add","hover","removeClass","stopImmediatePropagation","originalEvent","console","log","height","parent","triggerHandler","startparent","show","detach","get","oldindex","elementIndex","oldElementIndex","endparent","stopPropagation","filter","after","trigger","preventDefault","dropEffect","is","thisHeight","forcePlaceholderSize","deadZone","offsetTop","hide","before","not","append","destroy","enable","disable","fn"],"mappings":"CAAE,SAASA,EAAMC,GACO,kBAAXC,SAAyBA,OAAOC,IACzCD,QAAQ,UAAWD,GACS,gBAAZG,SAChBC,OAAOD,QAAUH,EAAQK,QAAQ,WAEjCN,EAAKO,SAAWN,EAAQD,EAAKQ,SAE/BC,KAAM,SAASC,GAWjB,YAIA,IAAIC,GACAC,EACAC,EAAeH,IACfI,KAMAC,EAAoB,SAASC,GAC/BA,EAAMC,IAAI,iBACVD,EAAMC,IAAI,eACVD,EAAMC,IAAI,mBACVD,EAAMC,IAAI,gBACVD,EAAMC,IAAI,iBACVD,EAAMC,IAAI,aAORC,EAAwB,SAASX,GACnCA,EAASU,IAAI,gBACbV,EAASU,IAAI,iBACbV,EAASU,IAAI,aAOXE,EAAe,SAASC,EAAOC,GAEjCD,EAAME,aAAaC,cAAgB,OACnCH,EAAME,aAAaE,QAAQ,OAAQ,IAG/BJ,E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EAAEkE,cAAc5D,MAAQoF,EAAYH,EAAaE,EACnD,OAAO,EAIX5G,EAAS8G,OACL3C,EAAYV,QAAU1D,EAAED,MAAM2D,QAChC1D,EAAED,MAAMuG,MAAMlC,GAEdpE,EAAED,MAAMiH,OAAO5C,GAEjBjE,EAAa8G,IAAI7C,GAAa0B,aAEzB3F,GAAauG,GAAG3G,OAAUC,EAAED,MAAM8C,SAASZ,EAAQ3B,OAAO2E,SAC7D9E,EAAa2F,SACb9F,EAAED,MAAMmH,OAAO9C,GAGnB,QAAO,OAqBb,OAhBAvE,GAASsH,QAAU,SAAStH,GAC1B8C,EAAiB9C,IAGnBA,EAASuH,OAAS,SAASvH,GACzBoD,EAAgBpD,IAGlBA,EAASwH,QAAU,SAASxH,GAC1B+D,EAAiB/D,IAGnBG,EAAEsH,GAAGzH,SAAW,SAASoC,GACvB,MAAOpC,GAASE,KAAMkC,IAGjBpC","file":"html.sortable.min.js","sourcesContent":[";(function(root, factory) {\n if (typeof define === 'function' && define.amd) {\n define(['jquery'], factory);\n } else if (typeof exports === 'object') {\n module.exports = factory(require('jquery'));\n } else {\n root.sortable = factory(root.jQuery);\n }\n}(this, function($) {\n/*\n * HTML5 Sortable jQuery Plugin\n * https://github.com/voidberg/html5sortable\n *\n * Original code copyright 2012 Ali Farhadi.\n * This version is mantained by Alexandru Badiu & Lukas Oppermann \n *\n *\n * Released under the MIT license.\n */\n'use strict';\n/*\n * variables global to the plugin\n */\nvar dragging;\nvar draggingHeight;\nvar placeholders = $();\nvar sortables = [];\n/*\n * remove event handlers from items\n * @param [jquery Collection] items\n * @info event.h5s (jquery way of namespacing events, to bind multiple handlers to the event)\n */\nvar _removeItemEvents = function(items) {\n items.off('dragstart.h5s');\n items.off('dragend.h5s');\n items.off('selectstart.h5s');\n items.off('dragover.h5s');\n items.off('dragenter.h5s');\n items.off('drop.h5s');\n};\n/*\n * remove event handlers from sortable\n * @param [jquery Collection] sortable\n * @info event.h5s (jquery way of namespacing events, to bind multiple handlers to the event)\n */\nvar _removeSortableEvents = function(sortable) {\n sortable.off('dragover.h5s');\n sortable.off('dragenter.h5s');\n sortable.off('drop.h5s');\n};\n/*\n * attache ghost to dataTransfer object\n * @param [event] original event\n * @param [object] ghost-object with item, x and y coordinates\n */\nvar _attachGhost = function(event, ghost) {\n // this needs to be set for HTML5 drag & drop to work\n event.dataTransfer.effectAllowed = 'move';\n event.dataTransfer.setData('text', '');\n\n // check if setDragImage method is available\n if (event.dataTransfer.setDragImage) {\n event.dataTransfer.setDragImage(ghost.item, ghost.x, ghost.y);\n }\n};\n/**\n * _addGhostPos clones the dragged item and adds it as a Ghost item\n * @param [object] event - the event fired when dragstart is triggered\n * @param [object] ghost - .item = node, draggedItem = jQuery collection\n */\nvar _addGhostPos = function(e, ghost) {\n if (!ghost.x) {\n ghost.x = parseInt(e.pageX - ghost.draggedItem.offset().left);\n }\n if (!ghost.y) {\n ghost.y = parseInt(e.pageY - ghost.draggedItem.offset().top);\n }\n return ghost;\n};\n/**\n * _makeGhost decides which way to make a ghost and passes it to attachGhost\n * @param [jQuery selection] $draggedItem - the item that the user drags\n */\nvar _makeGhost = function($draggedItem) {\n return {\n item: $draggedItem[0],\n draggedItem: $draggedItem\n };\n};\n/**\n * _getGhost constructs ghost and attaches it to dataTransfer\n * @param [event] event - the original drag event object\n * @param [jQuery selection] $draggedItem - the item that the user drags\n * @param [object] ghostOpt - the ghost options\n */\n// TODO: could $draggedItem be replaced by event.target in all instances\nvar _getGhost = function(event, $draggedItem) {\n // add ghost item & draggedItem to ghost object\n var ghost = _makeGhost($draggedItem);\n // attach ghost position\n ghost = _addGhostPos(event, ghost);\n // attach ghost to dataTransfer\n _attachGhost(event, ghost);\n};\n/*\n * return options if not set on sortable already\n * @param [object] soptions\n * @param [object] options\n */\nvar _getOptions = function(soptions, options) {\n if (typeof soptions === 'undefined') {\n return options;\n }\n return soptions;\n};\n/*\n * remove data from sortable\n * @param [jquery Collection] a single sortable\n */\nvar _removeSortableData = function(sortable) {\n sortable.removeData('opts');\n sortable.removeData('connectWith');\n sortable.removeData('items');\n sortable.removeAttr('aria-dropeffect');\n};\n/*\n * remove data from items\n * @param [jquery Collection] items\n */\nvar _removeItemData = function(items) {\n items.removeAttr('aria-grabbed');\n items.removeAttr('draggable');\n items.removeAttr('role');\n};\n/*\n * check if two lists are connected\n * @param [jquery Collection] items\n */\nvar _listsConnected = function(curList, destList) {\n if (curList[0] === destList[0]) {\n return true;\n }\n if (curList.data('connectWith') !== undefined) {\n return curList.data('connectWith') === destList.data('connectWith');\n }\n return false;\n};\n/*\n * destroy the sortable\n * @param [jquery Collection] a single sortable\n */\nvar _destroySortable = function(sortable) {\n var opts = sortable.data('opts') || {};\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n // remove event handlers & data from sortable\n _removeSortableEvents(sortable);\n _removeSortableData(sortable);\n // remove event handlers & data from items\n handles.off('mousedown.h5s');\n _removeItemEvents(items);\n _removeItemData(items);\n};\n/*\n * enable the sortable\n * @param [jquery Collection] a single sortable\n */\nvar _enableSortable = function(sortable) {\n var opts = sortable.data('opts');\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n sortable.attr('aria-dropeffect', 'move');\n handles.attr('draggable', 'true');\n // IE FIX for ghost\n // can be disabled as it has the side effect that other events\n // (e.g. click) will be ignored\n var spanEl = (document || window.document).createElement('span');\n if (typeof spanEl.dragDrop === 'function' && !opts.disableIEFix) {\n handles.on('mousedown.h5s', function() {\n if (items.index(this) !== -1) {\n this.dragDrop();\n } else {\n $(this).parents(opts.items)[0].dragDrop();\n }\n });\n }\n};\n/*\n * disable the sortable\n * @param [jquery Collection] a single sortable\n */\nvar _disableSortable = function(sortable) {\n var opts = sortable.data('opts');\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n sortable.attr('aria-dropeffect', 'none');\n handles.attr('draggable', false);\n handles.off('mousedown.h5s');\n};\n/*\n * reload the sortable\n * @param [jquery Collection] a single sortable\n * @description events need to be removed to not be double bound\n */\nvar _reloadSortable = function(sortable) {\n var opts = sortable.data('opts');\n var items = sortable.children(opts.items);\n var handles = opts.handle ? items.find(opts.handle) : items;\n // remove event handlers from items\n _removeItemEvents(items);\n handles.off('mousedown.h5s');\n // remove event handlers from sortable\n _removeSortableEvents(sortable);\n};\n/*\n * public sortable object\n * @param [object|string] options|method\n */\nvar sortable = function(selector, options) {\n\n var $sortables = $(selector);\n var method = String(options);\n\n options = $.extend({\n connectWith: false,\n placeholder: null,\n // dragImage can be null or a jQuery element\n dragImage: null,\n disableIEFix: false,\n placeholderClass: 'sortable-placeholder',\n draggingClass: 'sortable-dragging',\n hoverClass: false\n }, options);\n\n /* TODO: maxstatements should be 25, fix and remove line below */\n /*jshint maxstatements:false */\n return $sortables.each(function() {\n\n var $sortable = $(this);\n\n if (/enable|disable|destroy/.test(method)) {\n sortable[method]($sortable);\n return;\n }\n\n // get options & set options on sortable\n options = _getOptions($sortable.data('opts'), options);\n $sortable.data('opts', options);\n // reset sortable\n _reloadSortable($sortable);\n // initialize\n var items = $sortable.children(options.items);\n var index;\n var startParent;\n var newParent;\n var placeholder = (options.placeholder === null) ? $('<' + (/^ul|ol$/i.test(this.tagName) ? 'li' : 'div') + ' class=\"' + options.placeholderClass + '\"/>') : $(options.placeholder).addClass(options.placeholderClass);\n\n // setup sortable ids\n if (!$sortable.attr('data-sortable-id')) {\n var id = sortables.length;\n sortables[id] = $sortable;\n $sortable.attr('data-sortable-id', id);\n items.attr('data-item-sortable-id', id);\n }\n\n $sortable.data('items', options.items);\n placeholders = placeholders.add(placeholder);\n if (options.connectWith) {\n $sortable.data('connectWith', options.connectWith);\n }\n\n _enableSortable($sortable);\n items.attr('role', 'option');\n items.attr('aria-grabbed', 'false');\n\n // Mouse over class\n if (options.hoverClass) {\n var hoverClass = 'sortable-over';\n if (typeof options.hoverClass === 'string') {\n hoverClass = options.hoverClass;\n }\n\n items.hover(function() {\n $(this).addClass(hoverClass);\n }, function() {\n $(this).removeClass(hoverClass);\n });\n }\n\n // Handle drag events on draggable items\n items.on('dragstart.h5s', function(e) {\n e.stopImmediatePropagation();\n\n if (options.dragImage) {\n _attachGhost(e.originalEvent, {\n item: options.dragImage,\n x: 0,\n y: 0\n });\n console.log('WARNING: dragImage option is deprecated' +\n ' and will be removed in the future!');\n } else {\n // add transparent clone or other ghost to cursor\n _getGhost(e.originalEvent, $(this), options.dragImage);\n }\n // cache selsection & add attr for dragging\n dragging = $(this);\n dragging.addClass(options.draggingClass);\n dragging.attr('aria-grabbed', 'true');\n // grab values\n index = dragging.index();\n draggingHeight = dragging.height();\n startParent = $(this).parent();\n // trigger sortstar update\n dragging.parent().triggerHandler('sortstart', {\n item: dragging,\n placeholder: placeholder,\n startparent: startParent\n });\n });\n // Handle drag events on draggable items\n items.on('dragend.h5s', function() {\n if (!dragging) {\n return;\n }\n // remove dragging attributes and show item\n dragging.removeClass(options.draggingClass);\n dragging.attr('aria-grabbed', 'false');\n dragging.show();\n\n placeholders.detach();\n newParent = $(this).parent();\n dragging.parent().triggerHandler('sortstop', {\n item: dragging,\n startparent: startParent,\n });\n if (index !== dragging.index() ||\n startParent.get(0) !== newParent.get(0)) {\n dragging.parent().triggerHandler('sortupdate', {\n item: dragging,\n index: newParent.children(newParent.data('items')).index(dragging),\n oldindex: items.index(dragging),\n elementIndex: dragging.index(),\n oldElementIndex: index,\n startparent: startParent,\n endparent: newParent\n });\n }\n dragging = null;\n draggingHeight = null;\n });\n // Handle drop event on sortable & placeholder\n // TODO: REMOVE placeholder?????\n $(this).add([placeholder]).on('drop.h5s', function(e) {\n if (!_listsConnected($sortable, $(dragging).parent())) {\n return;\n }\n\n e.stopPropagation();\n placeholders.filter(':visible').after(dragging);\n dragging.trigger('dragend.h5s');\n return false;\n });\n\n // Handle dragover and dragenter events on draggable items\n items.add([this]).on('dragover.h5s dragenter.h5s', function(e) {\n if (!_listsConnected($sortable, $(dragging).parent())) {\n return;\n }\n\n e.preventDefault();\n e.originalEvent.dataTransfer.dropEffect = 'move';\n if (items.is(this)) {\n var thisHeight = $(this).height();\n if (options.forcePlaceholderSize) {\n placeholder.height(draggingHeight);\n }\n\n // Check if $(this) is bigger than the draggable. If it is, we have to define a dead zone to prevent flickering\n if (thisHeight > draggingHeight) {\n // Dead zone?\n var deadZone = thisHeight - draggingHeight;\n var offsetTop = $(this).offset().top;\n if (placeholder.index() < $(this).index() &&\n e.originalEvent.pageY < offsetTop + deadZone) {\n return false;\n }\n if (placeholder.index() > $(this).index() &&\n e.originalEvent.pageY > offsetTop + thisHeight - deadZone) {\n return false;\n }\n }\n\n dragging.hide();\n if (placeholder.index() < $(this).index()) {\n $(this).after(placeholder);\n } else {\n $(this).before(placeholder);\n }\n placeholders.not(placeholder).detach();\n } else {\n if (!placeholders.is(this) && !$(this).children(options.items).length) {\n placeholders.detach();\n $(this).append(placeholder);\n }\n }\n return false;\n });\n });\n};\n\nsortable.destroy = function(sortable) {\n _destroySortable(sortable);\n};\n\nsortable.enable = function(sortable) {\n _enableSortable(sortable);\n};\n\nsortable.disable = function(sortable) {\n _disableSortable(sortable);\n};\n\n$.fn.sortable = function(options) {\n return sortable(this, options);\n};\n\nreturn sortable;\n}));\n"],"sourceRoot":"/source/"}