PageSourceSearch

https://nbcf.org.au/wp-content/plugins/spark-nbcf-bucket-list/public/js/jquery-sortable.js?ver=1.0.0

js nbcf.org.au collected 2026-10-02 03:58:33 UTC 1,739 bytes, 76 lines download raw bytes

vendor: 1,739 bytes, lines 1-76
1(function (factory) {
2	"use strict";
3	var sortable,
4		jq,
5		_this = this
6	;
7
8	if (typeof define === "function" && define.amd) {
9		try {
10			define(["sortablejs", "jquery"], function(Sortable, $) {
11				sortable = Sortable;
12				jq = $;
13				checkErrors();
14				factory(Sortable, $);
15			});
16		} catch(err) {
17			checkErrors();
18		}
19		return;
20	} else if (typeof exports === 'object') {
21		try {
22			sortable = require('sortablejs');
23			jq = require('jquery');
24		} catch(err) { }
25	}
26
27	if (typeof jQuery === 'function' || typeof $ === 'function') {
28		jq = jQuery || $;
29	}
30
31	if (typeof Sortable !== 'undefined') {
32		sortable = Sortable;
33	}
34
35	function checkErrors() {
36		if (!jq) {
37			throw new Error('jQuery is required for jquery-sortablejs');
38		}
39
40		if (!sortable) {
41			throw new Error('SortableJS is required for jquery-sortablejs (https://github.com/SortableJS/Sortable)');
42		}
43	}
44	checkErrors();
45	factory(sortable, jq);
46})(function (Sortable, $) {
47	"use strict";
48
49	$.fn.sortable = function (options) {
50		var retVal,
51			args = arguments;
52
53		this.each(function () {
54			var $el = $(this),
55				sortable = $el.data('sortable');
56
57			if (!sortable && (options instanceof Object || !options)) {
58				sortable = new Sortable(this, options);
59				$el.data('sortable', sortable);
60			} else if (sortable) {
61				if (options === 'destroy') {
62					sortable.destroy();
63					$el.removeData('sortable');
64				} else if (options === 'widget') {
65					retVal = sortable;
66				} else if (typeof sortable[options] === 'function') {
67					retVal = sortable[options].apply(sortable, [].slice.call(args, 1));
68				} else if (options in sortable.options) {
69					retVal = sortable.option.apply(sortable, args);
70				}
71			}
72		});
73
74		return (retVal === void 0) ? this : retVal;
75	};
76});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.