16 lines
73 KiB
JavaScript
16 lines
73 KiB
JavaScript
|
/*!
|
||
|
* Select2 4.0.3
|
||
|
* https://select2.github.io
|
||
|
*
|
||
|
* Released under the MIT license
|
||
|
* https://github.com/select2/select2/blob/master/LICENSE.md
|
||
|
*/
|
||
|
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?e(require("jquery")):e(jQuery)}(function(e){var t=function(){if(e&&e.fn&&e.fn.select2&&e.fn.select2.amd)var t=e.fn.select2.amd;var n,i,o,r;return t&&t.requirejs||(t?i=t:t={},function(e){var t,r,s,a,l={},c={},u={},d={},p=Object.prototype.hasOwnProperty,h=[].slice,f=/\.js$/;function g(e,t){return p.call(e,t)}function m(e,t){var n,i,o,r,s,a,l,c,d,p,h,g=t&&t.split("/"),m=u.map,v=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(s=(e=e.split("/")).length-1,u.nodeIdCompat&&f.test(e[s])&&(e[s]=e[s].replace(f,"")),e=g.slice(0,g.length-1).concat(e),d=0;d<e.length;d+=1)if("."===(h=e[d]))e.splice(d,1),d-=1;else if(".."===h){if(1===d&&(".."===e[2]||".."===e[0]))break;d>0&&(e.splice(d-1,2),d-=2)}e=e.join("/")}else 0===e.indexOf("./")&&(e=e.substring(2));if((g||v)&&m){for(d=(n=e.split("/")).length;d>0;d-=1){if(i=n.slice(0,d).join("/"),g)for(p=g.length;p>0;p-=1)if((o=m[g.slice(0,p).join("/")])&&(o=o[i])){r=o,a=d;break}if(r)break;!l&&v&&v[i]&&(l=v[i],c=d)}!r&&l&&(r=l,a=c),r&&(n.splice(0,a,r),e=n.join("/"))}return e}function v(t,n){return function(){var i=h.call(arguments,0);return"string"!=typeof i[0]&&1===i.length&&i.push(null),r.apply(e,i.concat([t,n]))}}function y(e){return function(t){l[e]=t}}function _(n){if(g(c,n)){var i=c[n];delete c[n],d[n]=!0,t.apply(e,i)}if(!g(l,n)&&!g(d,n))throw new Error("No "+n);return l[n]}function w(e){var t,n=e?e.indexOf("!"):-1;return n>-1&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}s=function(e,t){var n,i=w(e),o=i[0];return e=i[1],o&&(n=_(o=m(o,t))),o?e=n&&n.normalize?n.normalize(e,function(e){return function(t){return m(t,e)}}(t)):m(e,t):(o=(i=w(e=m(e,t)))[0],e=i[1],o&&(n=_(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},a={require:function(e){return v(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:function(e){return function(){return u&&u.config&&u.config[e]||{}}}(e)}}},t=function(t,n,i,o){var r,u,p,h,f,m,w=[],$=typeof i;if(o=o||t,"undefined"===$||"function"===$){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if("require"===(u=(h=s(n[f],o)).f))w[f]=a.require(t);else if("exports"===u)w[f]=a.exports(t),m=!0;else if("module"===u)r=w[f]=a.module(t);else if(g(l,u)||g(c,u)||g(d,u))w[f]=_(u);else{if(!h.p)throw new Error(t+" missing "+u);h.p.load(h.n,v(o,!0),y(u),{}),w[f]=l[u]}p=i?i.apply(l[t],w):undefined,t&&(r&&r.exports!==e&&r.exports!==l[t]?l[t]=r.exports:p===e&&m||(l[t]=p))}else t&&(l[t]=i)},n=i=r=function(n,i,o,l,c){if("string"==typeof n)return a[n]?a[n](i):_(s(n,i).f);if(!n.splice){if((u=n).deps&&r(u.deps,u.callback),!i)return;i.splice?(n=i,i=o,o=null):n=e}return i=i||function(){},"function"==typeof o&&(o=l,l=c),l?t(e,n,i,o):setTimeout(function(){t(e,n,i,o)},4),r},r.config=function(e){return r(e)},n._defined=l,(o=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),g(l,e)||g(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0}}(),t.requirejs=n,t.require=i,t.define=o),t.define("almond",function(){}),t.define("jquery",[],function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t}),t.define("select2/utils",["jquery"],function(e){var t={};function n(e){var t=e.prototype,n=[];for(var i in t){"function"==typeof t[i]&&("constructor"!==i&&n.push(i))}return n}t.Extend=function(e,t){var n={}.hasOwnProperty;function i(){this.constructor=e}for(var o in t)n.call(t,o)&&(e[o]=t[o]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),o=n(e);function r(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,o=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),o=t.prototype.constructor),o.apply(this,arguments)}t.displayName=e.displayName,r.prototype=new function(){this.constructor=r};for(var s=0;
|
||
|
/*!
|
||
|
* jQuery Mousewheel 3.1.13
|
||
|
*
|
||
|
* Copyright jQuery Foundation and other contributors
|
||
|
* Released under the MIT license
|
||
|
* http://jquery.org/license
|
||
|
*/
|
||
|
r=function(e){var t,n,i=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],o="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice;if(e.event.fixHooks)for(var s=i.length;s;)e.event.fixHooks[i[--s]]=e.event.mouseHooks;var a=e.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var t=o.length;t;)this.addEventListener(o[--t],l,!1);else this.onmousewheel=l;e.data(this,"mousewheel-line-height",a.getLineHeight(this)),e.data(this,"mousewheel-page-height",a.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var t=o.length;t;)this.removeEventListener(o[--t],l,!1);else this.onmousewheel=null;e.removeData(this,"mousewheel-line-height"),e.removeData(this,"mousewheel-page-height")},getLineHeight:function(t){var n=e(t),i=n["offsetParent"in e.fn?"offsetParent":"parent"]();return i.length||(i=e("body")),parseInt(i.css("fontSize"),10)||parseInt(n.css("fontSize"),10)||16},getPageHeight:function(t){return e(t).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function l(i){var o,s=i||window.event,l=r.call(arguments,1),d=0,p=0,h=0,f=0,g=0;if((i=e.event.fix(s)).type="mousewheel","detail"in s&&(h=-1*s.detail),"wheelDelta"in s&&(h=s.wheelDelta),"wheelDeltaY"in s&&(h=s.wheelDeltaY),"wheelDeltaX"in s&&(p=-1*s.wheelDeltaX),"axis"in s&&s.axis===s.HORIZONTAL_AXIS&&(p=-1*h,h=0),d=0===h?p:h,"deltaY"in s&&(d=h=-1*s.deltaY),"deltaX"in s&&(p=s.deltaX,0===h&&(d=-1*p)),0!==h||0!==p){if(1===s.deltaMode){var m=e.data(this,"mousewheel-line-height");d*=m,h*=m,p*=m}else if(2===s.deltaMode){var v=e.data(this,"mousewheel-page-height");d*=v,h*=v,p*=v}if(o=Math.max(Math.abs(h),Math.abs(p)),(!n||o<n)&&(n=o,u(s,o)&&(n/=40)),u(s,o)&&(d/=40,p/=40,h/=40),d=Math[d>=1?"floor":"ceil"](d/n),p=Math[p>=1?"floor":"ceil"](p/n),h=Math[h>=1?"floor":"ceil"](h/n),a.settings.normalizeOffset&&this.getBoundingClientRect){var y=this.getBoundingClientRect();f=i.clientX-y.left,g=i.clientY-y.top}return i.deltaX=p,i.deltaY=h,i.deltaFactor=n,i.offsetX=f,i.offsetY=g,i.deltaMode=0,l.unshift(i,d,p,h),t&&clearTimeout(t),t=setTimeout(c,200),(e.event.dispatch||e.event.handle).apply(this,l)}}function c(){n=null}function u(e,t){return a.settings.adjustOldDeltas&&"mousewheel"===e.type&&t%120==0}e.fn.extend({mousewheel:function(e){return e?this.bind("mousewheel",e):this.trigger("mousewheel")},unmousewheel:function(e){return this.unbind("mousewheel",e)}})},"function"==typeof t.define&&t.define.amd?t.define("jquery-mousewheel",["jquery"],r):"object"==typeof exports?module.exports=r:r(e),t.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(e,t,n,i){if(null==e.fn.select2){var o=["open","close","destroy"];e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each(function(){var i=e.extend(!0,{},t);new n(e(this),i)}),this;if("string"==typeof t){var i,r=Array.prototype.slice.call(arguments,1);return this.each(function(){var n=e(this).data("select2");null==n&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),i=n[t].apply(n,r)}),e.inArray(t,o)>-1?this:i}throw new Error("Invalid arguments for Select2: "+t)}}return null==e.fn.select2.defaults&&(e.fn.select2.defaults=i),n}),{define:t.define,require:t.require}}(),n=t.require("jquery.select2");return e.fn.select2.amd=t,n});
|