/** 
 * Kendo UI v2016.3.1118 (http://www.telerik.com/kendo-ui)                                                                                                                                              
 * Copyright 2016 Telerik AD. All rights reserved.                                                                                                                                                      
 *                                                                                                                                                                                                      
 * Kendo UI commercial licenses may be obtained at                                                                                                                                                      
 * http://www.telerik.com/purchase/license-agreement/kendo-ui-complete                                                                                                                                  
 * If you do not own a commercial license, this file shall be governed by the trial license terms.                                                                                                      
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       
                                                                                                                                                                                                       

*/
!function(e,define){define("kendo.selectable.min",["kendo.core.min","kendo.userevents.min"],e)}(function(){return function(e,t){function n(e,t){if(!e.is(":visible"))return!1;var n=s.getOffset(e),i=t.left+t.width,l=t.top+t.height;return n.right=n.left+s._outerWidth(e),n.bottom=n.top+s._outerHeight(e),!(n.left>i||n.right<t.left||n.top>l||n.bottom<t.top)}var i,s=window.kendo,l=s.ui.Widget,a=e.proxy,o=Math.abs,r="aria-selected",c="k-state-selected",u="k-state-selecting",d="k-selectable",f="change",v=".kendoSelectable",m="k-state-unselecting",h="input,a,textarea,.k-multiselect-wrap,select,button,.k-button>span,.k-button>img,span.k-icon.k-i-expand,span.k-icon.k-i-collapse",p=s.support.browser.msie,_=!1;!function(e){!function(){e('<div class="parent"><span /></div>').on("click",">*",function(){_=!0}).find("span").click().end().off()}()}(e),i=l.extend({init:function(t,n){var i,o=this;l.fn.init.call(o,t,n),o._marquee=e("<div class='k-marquee'><div class='k-marquee-color'></div></div>"),o._lastActive=null,o.element.addClass(d),o.relatedTarget=o.options.relatedTarget,i=o.options.multiple,this.options.aria&&i&&o.element.attr("aria-multiselectable",!0),o.userEvents=new s.UserEvents(o.element,{global:!0,allowSelection:!0,filter:(_?"":"."+d+" ")+o.options.filter,tap:a(o._tap,o)}),i&&o.userEvents.bind("start",a(o._start,o)).bind("move",a(o._move,o)).bind("end",a(o._end,o)).bind("select",a(o._select,o))},events:[f],options:{name:"Selectable",filter:">*",multiple:!1,relatedTarget:e.noop},_isElement:function(e){var t,n=this.element,i=n.length,s=!1;for(e=e[0],t=0;t<i;t++)if(n[t]===e){s=!0;break}return s},_tap:function(t){var n,i=e(t.target),s=this,l=t.event.ctrlKey||t.event.metaKey,a=s.options.multiple,o=a&&t.event.shiftKey,r=t.event.which,u=t.event.button;!s._isElement(i.closest("."+d))||r&&3==r||u&&2==u||this._allowSelection(t.event.target)&&(n=i.hasClass(c),a&&l||s.clear(),i=i.add(s.relatedTarget(i)),o?s.selectRange(s._firstSelectee(),i):(n&&l?(s._unselect(i),s._notify(f)):s.value(i),s._lastActive=s._downTarget=i))},_start:function(n){var i,s=this,l=e(n.target),a=l.hasClass(c),o=n.event.ctrlKey||n.event.metaKey;if(this._allowSelection(n.event.target)){if(s._downTarget=l,!s._isElement(l.closest("."+d)))return s.userEvents.cancel(),t;s.options.useAllItems?s._items=s.element.find(s.options.filter):(i=l.closest(s.element),s._items=i.find(s.options.filter)),n.sender.capture(),s._marquee.appendTo(document.body).css({left:n.x.client+1,top:n.y.client+1,width:0,height:0}),o||s.clear(),l=l.add(s.relatedTarget(l)),a&&(s._selectElement(l,!0),o&&l.addClass(m))}},_move:function(e){var t=this,n={left:e.x.startLocation>e.x.location?e.x.location:e.x.startLocation,top:e.y.startLocation>e.y.location?e.y.location:e.y.startLocation,width:o(e.x.initialDelta),height:o(e.y.initialDelta)};t._marquee.css(n),t._invalidateSelectables(n,e.event.ctrlKey||e.event.metaKey),e.preventDefault()},_end:function(){var e,t=this;t._marquee.remove(),t._unselect(t.element.find(t.options.filter+"."+m)).removeClass(m),e=t.element.find(t.options.filter+"."+u),e=e.add(t.relatedTarget(e)),t.value(e),t._lastActive=t._downTarget,t._items=null},_invalidateSelectables:function(e,t){var i,s,l,a,o=this._downTarget[0],r=this._items;for(i=0,s=r.length;i<s;i++)a=r.eq(i),l=a.add(this.relatedTarget(a)),n(a,e)?a.hasClass(c)?t&&o!==a[0]&&l.removeClass(c).addClass(m):a.hasClass(u)||a.hasClass(m)||l.addClass(u):a.hasClass(u)?l.removeClass(u):t&&a.hasClass(m)&&l.removeClass(m).addClass(c)},value:function(e){var n=this,i=a(n._selectElement,n);return e?(e.each(function(){i(this)}),n._notify(f),t):n.element.find(n.options.filter+"."+c)},_firstSelectee:function(){var e,t=this;return null!==t._lastActive?t._lastActive:(e=t.value(),e.length>0?e[0]:t.element.find(t.options.filter)[0])},_selectElement:function(t,n){var i=e(t),s=!n&&this._notify("select",{element:t});i.removeClass(u),s||(i.addClass(c),this.options.aria&&i.attr(r,!0))},_notify:function(e,t){return t=t||{},this.trigger(e,t)},_unselect:function(e){return e.removeClass(c),this.options.aria&&e.attr(r,!1),e},_select:function(t){this._allowSelection(t.event.target)&&(!p||p&&!e(s._activeElement()).is(h))&&t.preventDefault()},_allowSelection:function(t){return!e(t).is(h)||(this.userEvents.cancel(),this._downTarget=null,!1)},resetTouchEvents:function(){this.userEvents.cancel()},clear:function(){var e=this.element.find(this.options.filter+"."+c);this._unselect(e)},selectRange:function(t,n){var i,s,l,a=this;for(a.clear(),a.element.length>1&&(l=a.options.continuousItems()),l&&l.length||(l=a.element.find(a.options.filter)),t=e.inArray(e(t)[0],l),n=e.inArray(e(n)[0],l),t>n&&(s=t,t=n,n=s),a.options.useAllItems||(n+=a.element.length-1),i=t;i<=n;i++)a._selectElement(l[i]);a._notify(f)},destroy:function(){var e=this;l.fn.destroy.call(e),e.element.off(v),e.userEvents.destroy(),e._marquee=e._lastActive=e.element=e.userEvents=null}}),i.parseOptions=function(e){var t="string"==typeof e&&e.toLowerCase();return{multiple:t&&t.indexOf("multiple")>-1,cell:t&&t.indexOf("cell")>-1}},s.ui.plugin(i)}(window.kendo.jQuery),window.kendo},"function"==typeof define&&define.amd?define:function(e,t,n){(n||t)()});
//# sourceMappingURL=kendo.selectable.min.js.map
