8 lines
65 KiB
JavaScript
8 lines
65 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,r;return t&&t.requirejs||(t?i=t:t={},function(e){var t,s,o,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,r,s,o,a,l,c,d,p,h,g=t&&t.split("/"),m=u.map,v=m&&m["*"]||{};if(e&&"."===e.charAt(0))if(t){for(o=(e=e.split("/")).length-1,u.nodeIdCompat&&f.test(e[o])&&(e[o]=e[o].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((r=m[g.slice(0,p).join("/")])&&(r=r[i])){s=r,a=d;break}if(s)break;!l&&v&&v[i]&&(l=v[i],c=d)}!s&&l&&(s=l,a=c),s&&(n.splice(0,a,s),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),s.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 $(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]}o=function(e,t){var n,i=$(e),r=i[0];return e=i[1],r&&(n=_(r=m(r,t))),r?e=n&&n.normalize?n.normalize(e,function(e){return function(t){return m(t,e)}}(t)):m(e,t):(r=(i=$(e=m(e,t)))[0],e=i[1],r&&(n=_(r))),{f:r?r+"!"+e:e,n:e,pr:r,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,r){var s,u,p,h,f,m,$=[],w=typeof i;if(r=r||t,"undefined"===w||"function"===w){for(n=!n.length&&i.length?["require","exports","module"]:n,f=0;f<n.length;f+=1)if("require"===(u=(h=o(n[f],r)).f))$[f]=a.require(t);else if("exports"===u)$[f]=a.exports(t),m=!0;else if("module"===u)s=$[f]=a.module(t);else if(g(l,u)||g(c,u)||g(d,u))$[f]=_(u);else{if(!h.p)throw new Error(t+" missing "+u);h.p.load(h.n,v(r,!0),y(u),{}),$[f]=l[u]}p=i?i.apply(l[t],$):undefined,t&&(s&&s.exports!==e&&s.exports!==l[t]?l[t]=s.exports:p===e&&m||(l[t]=p))}else t&&(l[t]=i)},n=i=s=function(n,i,r,l,c){if("string"==typeof n)return a[n]?a[n](i):_(o(n,i).f);if(!n.splice){if((u=n).deps&&s(u.deps,u.callback),!i)return;i.splice?(n=i,i=r,r=null):n=e}return i=i||function(){},"function"==typeof r&&(r=l,l=c),l?t(e,n,i,r):setTimeout(function(){t(e,n,i,r)},4),s},s.config=function(e){return s(e)},n._defined=l,(r=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=r),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 r in t)n.call(t,r)&&(e[r]=t[r]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var i=n(t),r=n(e);function s(){var n=Array.prototype.unshift,i=t.prototype.constructor.length,r=e.prototype.constructor;i>0&&(n.call(arguments,e.prototype.constructor),r=t.prototype.constructor),r.apply(this,arguments)}t.displayName=e.displayName,s.prototype=new function(){this.constructor=s};for(var o=0;o<
|