text: /*
  * Kendo UI Complete v2012.2.710 (http://kendoui.com)
  * Copyright 2012 Telerik AD. All rights reserved.
  *
  * Kendo UI Complete commercial licenses may be obtained at http://kendoui.com/complete-license
  * If you do not own a commercial license, this file shall be governed by the trial license terms.
  */
  ;(function(a,b){function P(b){b.preventDefault();var c=a(b.target),d=c.closest(".k-widget").parent();d[0]||(d=c.parent()),d.trigger(b.type)}function O(a,b){return a.replace(/ /g,b+" ")}function N(a,b){var c=a.offset(),d=c.left+L(a,"borderLeftWidth")+L(a,"paddingLeft"),e=c.top+L(a,"borderTopWidth")+L(a,"paddingTop"),f=d+a.width()-b.outerWidth(!0),g=e+a.height()-b.outerHeight(!0);return{x:{min:d,max:f},y:{min:e,max:g}}}function M(a,b){return Math.min(Math.max(a,b.min),b.max)}function L(a,b){return parseInt(a.css(b),10)||0}function K(a){return f.elementFromPoint(a.x.client,a.y.client)}function J(b,c){try{return a.contains(b,c)||b==c}catch(d){return!1}}var c=window.kendo,d=c.support,e=d.pointers,f=window.document,g=a(f.documentElement),h=c.Class,i=c.ui.Widget,j=c.Observable,k=a.proxy,l=a.now,m=a.extend,n=c.getOffset,o={},p={},q,r=d.mobileOS&&d.mobileOS.android,s="mousedown",t="mousemove",u="mouseup mouseleave",v="keyup",w="change",x="dragstart",y="drag",z="dragend",A="dragcancel",B="dragenter",C="dragleave",D="drop",E="start",F="move",G="end",H="cancel",I="tap";d.touch&&(s="touchstart",t="touchmove",u="touchend touchcancel"),e&&(s="MSPointerDown",t="MSPointerMove",u="MSPointerUp MSPointerCancel");var Q=h.extend({init:function(a){this.axis=a},start:function(a,b){var c=this,d=a["page"+c.axis];c.startLocation=c.location=d,c.client=a["client"+c.axis],c.velocity=c.delta=0,c.timeStamp=b},move:function(a,b){var c=this,d=a["page"+c.axis];if(!!d||!r)c.delta=d-c.location,c.location=d,c.client=a["client"+c.axis],c.initialDelta=d-c.startLocation,c.velocity=c.delta/(b-c.timeStamp),c.timeStamp=b}}),R=j.extend({init:function(b,f){var h=this,i={},l,n,o="."+c.guid();f=f||{},l=h.filter=f.filter,h.threshold=f.threshold||0,b=a(b),j.fn.init.call(h),i[O(t,o)]=k(h._move,h),i[O(u,o)]=k(h._end,h),m(h,{x:new Q("X"),y:new Q("Y"),element:b,surface:f.global?g:f.surface||b,stopPropagation:f.stopPropagation,pressed:!1,eventMap:i,ns:o}),b.on(s,l,k(h._start,h)).on("dragstart",l,c.preventDefault),e&&b.css("-ms-touch-action","pinch-zoom double-tap-zoom");if(!f.allowSelection){var p=["mousedown selectstart",l,P];l instanceof a&&p.splice(2,0,null),b.on.apply(b,p)}d.eventCapture&&(n=function(a){h.moved&&a.preventDefault()},h.surface[0].addEventListener(d.mouseup,n,!0)),h.bind([I,E,F,G,H],f)},capture:function(){R.captured=!0},cancel:function(){this._cancel(),this.trigger(H)},skip:function(){this._cancel()},_cancel:function(){var a=this;a.moved=a.pressed=!1,a.surface.off(a.ns)},_start:function(b){var c=this,f=c.filter,g=b.originalEvent,h,i=b;if(!c.pressed){f?c.target=a(b.target).is(f)?a(b.target):a(b.target).closest(f):c.target=c.element;if(!c.target.length)return;c.currentTarget=b.currentTarget,c.stopPropagation&&b.stopPropagation(),c.pressed=!0,c.moved=!1,c.startTime=null,d.touch&&(h=g.changedTouches[0],c.touchID=h.identifier,i=h),e&&(c.touchID=g.pointerId,i=g),c._perAxis(E,i,l()),c.surface.off(c.eventMap).on(c.eventMap),R.captured=!1}},_move:function(a){var b=this,c,d,e;!b.pressed||b._withEvent(a,function(f){b._perAxis(F,f,l());if(!b.moved){c=b.x.initialDelta,d=b.y.initialDelta,e=Math.sqrt(c*c+d*d);if(e<=b.threshold)return;if(!R.captured)b.startTime=l(),b._trigger(E,a),b.moved=!0;else return b._cancel()}b.pressed&&b._trigger(F,a)})},_end:function(a){var b=this;!b.pressed||b._withEvent(a,function(){b.moved?(b.endTime=l(),b._trigger(G,a),b.moved=!1):b._trigger(I,a),b._cancel()})},_perAxis:function(a,b,c){this.x[a](b,c),this.y[a](b,c)},_trigger:function(a,b){var c={x:this.x,y:this.y,target:this.target,event:b};this.trigger(a,c)&&b.preventDefault()},_withEvent:function(a,b){var c=this,f=c.touchID,g=a.originalEvent,h,i;if(d.touch){h=g.changedTouches,i=h.length;while(i){i--;if(h[i].identifier===f)return b(h[i])}}else{if(!e)return b(a);if(f===g.pointerId)return b(g)}}}),S=j.extend({init:function(b,c){var d=this,e=b[0];d.capture=!1,e.addEventListener(s,k(d._press,d),!0),a.each(u.split(" "),function(){e.addEventListener(this,k(d._release,d),!0)}),j.fn.init.call(d),d.bind(["press","release"],c||{})},_press:function(a){var b=this;b.trigger("press"),b.capture&&a.preventDefault()},_release:function(a){var b=this;b.trigger("release"),b.capture&&(a.preventDefault(),b.cancelCapture())},captureNext:function(){this.capture=!0},cancelCapture:function(){this.capture=!1}}),T=j.extend({init:function(b){var c=this;j.fn.init.call(c),a.extend(c,b),c.max=0,c.horizontal?(c.measure="width",c.scrollSize="scrollWidth",c.axis="x"):(c.measure="height",c.scrollSize="scrollHeight",c.axis="y")},outOfBounds:function(a){return a>this.max||a<this.min},present:function(){return this.max-this.min},getSize:function(){return this.container[this.measure]()},getTotal:function(){return this.element[0][this.scrollSize]},update:function(a){var b=this;b.size=b.getSize(),b.total=b.getTotal(),b.min=Math.min(b.max,b.size-b.total),a||b.trigger(w,b)}}),U=j.extend({init:function(a){var b=this,d=k(b.refresh,b);j.fn.init.call(b),b.x=new T(m({horizontal:!0},a)),b.y=new T(m({horizontal:!1},a)),b.bind(w,a),c.onResize(d)},present:function(){return this.x.present()||this.y.present()},refresh:function(){this.x.update(),this.y.update(),this.trigger(w)}}),V=j.extend({init:function(a){var b=this;m(b,a),j.fn.init.call(b)},dragMove:function(a){var b=this,c=b.dimension,d=b.axis,e=b.movable,f=e[d]+a;if(!!c.present()){if(f<c.min&&a<0||f>c.max&&a>0)a*=b.resistance;e.translateAxis(d,a),b.trigger(w,b)}}}),W=h.extend({init:function(a){var b=this,c,d,e;m(b,{elastic:!0},a),e=b.elastic?.5:0,b.x=c=new V({axis:"x",dimension:b.dimensions.x,resistance:e,movable:b.movable}),b.y=d=new V({axis:"y",dimension:b.dimensions.y,resistance:e,movable:b.movable}),b.drag.bind(["move","end"],{move:function(a){c.dimension.present()||d.dimension.present()?(c.dragMove(a.x.delta),d.dragMove(a.y.delta),a.preventDefault()):b.drag.skip()},end:function(a){a.preventDefault()}})}}),X=d.transitions.prefix+"Transform",Y=Math.round,Z;d.hasHW3D?Z=function(a,b){return"translate3d("+Y(a)+"px,"+Y(b)+"px,0)"}:Z=function(a,b){return"translate("+Y(a)+"px,"+Y(b)+"px)"};var $=j.extend({init:function(b){var c=this;j.fn.init.call(c),c.element=a(b),c.x=0,c.y=0,c._saveCoordinates(Z(c.x,c.y))},translateAxis:function(a,b){this[a]+=b,this.refresh()},translate:function(a){this.x+=a.x,this.y+=a.y,this.refresh()},moveAxis:function(a,b){this[a]=b,this.refresh()},moveTo:function(a){m(this,a),this.refresh()},refresh:function(){var a=this,b=Z(a.x,a.y);b!=a.coordinates&&(a.element[0].style[X]=b,a._saveCoordinates(b),a.trigger(w))},_saveCoordinates:function(a){this.coordinates=a}}),_=i.extend({init:function(a,b){var c=this;i.fn.init.call(c,a,b);var d=c.options.group;d in p?p[d].push(c):p[d]=[c]},events:[B,C,D],options:{name:"DropTarget",group:"default"},_trigger:function(a,b){var c=this,d=o[c.options.group];if(d)return c.trigger(a,m({},b.event,{draggable:d}))},_over:function(a){this._trigger(B,a)},_out:function(a){this._trigger(C,a)},_drop:function(a){var b=this,c=o[b.options.group];c&&(c.dropped=!b._trigger(D,a))}}),ba=i.extend({init:function(a,b){var d=this;i.fn.init.call(d,a,b),d.drag=new R(d.element,{global:!0,stopPropagation:!0,filter:d.options.filter,threshold:d.options.distance,start:k(d._start,d),move:k(d._drag,d),end:k(d._end,d),cancel:k(d._cancel,d)}),d.destroy=k(d._destroy,d),d.captureEscape=function(a){a.keyCode===c.keys.ESC&&(d._trigger(A,{event:a}),d.drag.cancel())}},events:[x,y,z,A],options:{name:"Draggable",distance:5,group:"default",cursorOffset:null,axis:null,container:null,dropped:!1},_start:function(b){var c=this,d=c.options,e=d.container,g=d.hint;c.currentTarget=c.drag.target,c.currentTargetOffset=n(c.currentTarget);if(g){c.hint=a.isFunction(g)?a(g(c.currentTarget)):g;var h=n(c.currentTarget);c.hintOffset=h,c.hint.css({position:"absolute",zIndex:2e4,left:h.left,top:h.top}).appendTo(f.body)}o[d.group]=c,c.dropped=!1,e&&(c.boundaries=N(e,c.hint)),c._trigger(x,b)&&(c.drag.cancel(),c.destroy()),a(f).on(v,c.captureEscape)},updateHint:function(b){var c=this,d,e=c.options,f=c.boundaries,g=e.axis,h=c.options.cursorOffset;h?d={left:b.x.location+h.left,top:b.y.location+h.top}:(c.hintOffset.left+=b.x.delta,c.hintOffset.top+=b.y.delta,d=a.extend({},c.hintOffset)),f&&(d.top=M(d.top,f.y),d.left=M(d.left,f.x)),g==="x"?delete d.top:g==="y"&&delete d.left,c.hint.css(d)},_drag:function(a){var b=this;a.preventDefault(),b._withDropTarget(a,function(b){if(!b)q&&(q._trigger(C,a),q=null);else{if(q){if(b.element[0]===q.element[0])return;q._trigger(C,a)}b._trigger(B,a),q=b}}),b._trigger(y,a),b.hint&&b.updateHint(a)},_end:function(a){var b=this;b._withDropTarget(a,function(b){b&&(b._drop(a),q=null)}),b._trigger(z,a),b._cancel(a.event)},_cancel:function(a){var b=this;b.hint&&!b.dropped?b.hint.animate(b.currentTargetOffset,"fast",b.destroy):b.destroy()},_trigger:function(a,b){var c=this;return c.trigger(a,m({},b.event,{x:b.x,y:b.y,currentTarget:c.currentTarget}))},_withDropTarget:function(a,b){var c=this,d,e,f,g=c.options,h=p[g.group],i=0,j=h&&h.length;if(j){d=K(a),c.hint&&J(c.hint,d)&&(c.hint.hide(),d=K(a),c.hint.show());outer:while(d){for(i=0;i<j;i++){e=h[i];if(e.element[0]===d){f=e;break outer}}d=d.parentNode}b(f)}},_destroy:function(){var b=this;b.hint&&b.hint.remove(),delete o[b.options.group],b.trigger("destroy"),a(f).off(v,b.captureEscape)}});c.ui.plugin(_),c.ui.plugin(ba),c.Drag=R,c.Tap=S,c.containerBoundaries=N,m(c.ui,{Pane:W,PaneDimensions:U,Movable:$})})(jQuery);