/*
* Kendo UI Complete v2013.1.514 (http://kendoui.com)
* Copyright 2013 Telerik AD. All rights reserved.
*
* Kendo UI Complete commercial licenses may be obtained at
* https://www.kendoui.com/purchase/license-agreement/kendo-ui-complete-commercial.aspx
* If you do not own a commercial license, this file shall be governed by the trial license terms.
*/
("function"==typeof define&&define.amd?define:function(t,e){return e()})(["./kendo.mobile.application.min","./kendo.userevents.min"],function(){(function(t){function e(e,n,i){t(n.target).closest(".km-button,.km-detail").toggleClass("km-state-active",i),c&&e.deactivateTimeoutID&&(clearTimeout(e.deactivateTimeoutID),e.deactivateTimeoutID=0)}function n(e){return t(''+e+"")}var i=window.kendo,a=i.mobile,s=a.ui,o=s.Widget,l=i.support,m=l.mobileOS,c=m.android&&m.flatVersion>=300,d="click",u=o.extend({init:function(t,n){var a=this;o.fn.init.call(a,t,n),a._wrap(),a._style(),a._userEvents=new i.UserEvents(a.element,{press:function(t){a._activate(t)},tap:function(t){a._release(t)},end:function(t){e(a,t,!1)}}),c&&a.element.on("move","_timeoutDeactivate")},destroy:function(){o.fn.destroy.call(this),this._userEvents.destroy()},events:[d],options:{name:"Button",icon:"",style:"",badge:""},badge:function(t){var e=this.badgeElement=this.badgeElement||n(t).appendTo(this.element);return t?(e.html(t),this):t===!1?(e.empty().remove(),this.badgeElement=!1,this):e.html()},_timeoutDeactivate:function(t){this.deactivateTimeoutID||(this.deactivateTimeoutID=setTimeout(e,500,this,t,!1))},_activate:function(t){var n=document.activeElement,i=n?n.nodeName:"";e(this,t,!0),("INPUT"==i||"TEXTAREA"==i)&&n.blur()},_release:function(e){var n=this;e.which>1||n.trigger(d,{target:t(e.target),button:n.element})&&e.preventDefault()},_style:function(){var e,n=this.options.style,i=this.element;n&&(e=n.split(" "),t.each(e,function(){i.addClass("km-"+this)}))},_wrap:function(){var e=this,i=e.options.icon,a=e.options.badge,s='').children("span.km-text")),!m[0]&&i&&(l[0]||(s+=" km-notext"),e.iconElement=o.prepend(t(s+'" />'))),a&&(e.badgeElement=n(a).appendTo(o))}}),r=u.extend({options:{name:"BackButton",style:"back"},init:function(t,e){var n=this;u.fn.init.call(n,t,e),n.element.attr("href")===undefined&&n.element.attr("href","#:back")}}),p=u.extend({options:{name:"DetailButton",style:""},init:function(t,e){u.fn.init.call(this,t,e)},_style:function(){var e,n=this.options.style+" detail",i=this.element;n&&(e=n.split(" "),t.each(e,function(){i.addClass("km-"+this)}))},_wrap:function(){var e=this,n=e.options.icon,i='')))}});s.plugin(u),s.plugin(r),s.plugin(p)})(window.kendo.jQuery)});