UNPKG

@progress/kendo-ui

Version:

This package is part of the [Kendo UI for jQuery](http://www.telerik.com/kendo-ui) suite.

1 lines 5.95 kB
module.exports=function(t){function n(e){if(i[e])return i[e].exports;var r=i[e]={exports:{},id:e,loaded:!1};return t[e].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}var i={};return n.m=t,n.c=i,n.p="",n(0)}({0:function(t,n,i){t.exports=i(882)},3:function(t,n){t.exports=function(){throw Error("define cannot be used indirect")}},862:function(t,n){t.exports=require("../../kendo.core")},882:function(t,n,i){var e,r,a;!function(o,define){r=[i(862)],e=o,a="function"==typeof e?e.apply(n,r):e,!(void 0!==a&&(t.exports=a))}(function(){!function(t,n){function i(t,i,e){function r(t){for(var n=1;t*n%1;)n*=10;return n}var a,o,s,u;if(n===t||n===i)return[];if(e&&f.sign(i-t)!=f.sign(e))throw"The sign of the increment should allow to reach the stop-value.";if(e=e||1,t=t||0,i=i||t,(i-t)/e===1/0)throw"Infinite range defined.";if(a=[],o=-1,u=r(Math.abs(e)),t*=u,i*=u,e*=u,t>i&&e>0&&(e=-e),e<0)for(;(s=t+e*++o)>=i;)a.push(s/u);else for(;(s=t+e*++o)<=i;)a.push(s/u);return a}function e(t,n){if(t==n)return 0;var i=n.x-t.x,e=t.y-n.y,r=Math.atan(i/e);return e>=0?i<0?r+2*Math.PI:r:r+Math.PI}var r,a,o=window.kendo,s=o.dataviz.diagram={},u=o.deepExtend,h=t.isArray,l=1e-6,f={};u(f,{isNearZero:function(t){return Math.abs(t)<l},isDefined:function(t){return n!==t},isUndefined:function(t){return n===t||null===t},isObject:function(t){return t===Object(t)},has:function(t,n){return Object.hasOwnProperty.call(t,n)},isString:function(t){return"[object String]"==Object.prototype.toString.call(t)},isBoolean:function(t){return"[object Boolean]"==Object.prototype.toString.call(t)},isType:function(t,n){return Object.prototype.toString.call(t)=="[object "+n+"]"},isNumber:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},isEmpty:function(t){if(null===t)return!0;if(h(t)||f.isString(t))return 0===t.length;for(var n in t)if(f.has(t,n))return!1;return!0},simpleExtend:function(t,n){if(f.isObject(n))for(var i in n)t[i]=n[i]},initArray:function(t,n){var i,e=[];for(i=0;i<t;++i)e[i]=n;return e},serializePoints:function(t){var n,i,e=[];for(n=0;n<t.length;n++)i=t[n],e.push(i.x+";"+i.y);return e.join(";")},deserializePoints:function(t){var n,i=t.split(";"),e=[];if(i.length%2!==0)throw"Not an array of points.";for(n=0;n<i.length;n+=2)e.push(new s.Point(parseInt(i[n],10),parseInt(i[n+1],10)));return e},randomInteger:function(t,n){return parseInt(Math.floor(Math.random()*n)+t,10)},DFT:function(t,n){var i,e;if(n(t),t.childNodes)for(i=0;i<t.childNodes.length;i++)e=t.childNodes[i],this.DFT(e,n)},getMatrixAngle:function(t){return null===t||0===t.d?0:180*Math.atan2(t.b,t.d)/Math.PI},getMatrixScaling:function(t){var n=Math.sqrt(t.a*t.a+t.c*t.c),i=Math.sqrt(t.b*t.b+t.d*t.d);return[n,i]}}),f.sign=function(t){return t?t<0?-1:1:0},f.findAngle=function(t,n){return 180*e(t,n)/Math.PI},f.forEach=function(t,n,i){for(var e=0;e<t.length;e++)n.call(i,t[e],e,t)},f.any=function(t,n){for(var i=0;i<t.length;++i)if(n(t[i]))return t[i];return null},f.remove=function(t,n){for(var i;(i=f.indexOf(t,n))!==-1;)t.splice(i,1);return t},f.contains=function(t,n){return f.indexOf(t,n)!==-1},f.indexOf=function(n,i){return t.inArray(i,n)},f.fold=function(t,n,i,e){var r,a,o=arguments.length>2;for(r=0;r<t.length;r++)a=t[r],o?i=n.call(e,i,a,r,t):(i=a,o=!0);if(!o)throw"Reduce of empty array with no initial value";return i},f.find=function(t,n,i){var e;return f.any(t,function(t,r,a){return!!n.call(i,t,r,a)&&(e=t,!0)}),e},f.first=function(t,n,i){return 0===t.length?null:f.isUndefined(n)?t[0]:f.find(t,n,i)},f.insert=function(t,n,i){return t.splice(i,0,n),t},f.all=function(t,n,i){var e,r,a=!0;for(r=0;r<t.length&&(e=t[r],a=a&&n.call(i,e,r,t),a);r++);return a},f.clear=function(t){t.splice(0,t.length)},f.bisort=function(t,n,i){if(f.isUndefined(t))throw"First array is not specified.";if(f.isUndefined(n))throw"Second array is not specified.";if(t.length!=n.length)throw"The two arrays should have equal length";var e,r=[];for(e=0;e<t.length;e++)r.push({x:t[e],y:n[e]});for(r.sort(f.isUndefined(i)?function(t,n){return t.x-n.x}:function(t,n){return i(t.x,n.x)}),f.clear(t),f.clear(n),e=0;e<r.length;e++)t.push(r[e].x),n.push(r[e].y)},f.addRange=function(t,n){t.push.apply(t,n)},r={easeInOut:function(t){return-Math.cos(t*Math.PI)/2+.5}},a=o.Class.extend({init:function(){this.adapters=[],this.target=0,this.tick=0,this.interval=20,this.duration=800,this.lastTime=null,this.handlers=[];var t=this;this.transition=r.easeInOut,this.timerDelegate=function(){t.onTimerEvent()}},addAdapter:function(t){this.adapters.push(t)},onComplete:function(t){this.handlers.push(t)},removeHandler:function(n){this.handlers=t.grep(this.handlers,function(t){return t!==n})},trigger:function(){var t=this;this.handlers&&f.forEach(this.handlers,function(n){return n.call(null!==t.caller?t.caller:t)})},onStep:function(){},seekTo:function(t){this.seekFromTo(this.tick,t)},seekFromTo:function(t,n){this.target=Math.max(0,Math.min(1,n)),this.tick=Math.max(0,Math.min(1,t)),this.lastTime=(new Date).getTime(),this.intervalId||(this.intervalId=window.setInterval(this.timerDelegate,this.interval))},stop:function(){this.intervalId&&(window.clearInterval(this.intervalId),this.intervalId=null,this.trigger())},play:function(t){0!==this.adapters.length&&(null!==t&&(this.caller=t),this.initState(),this.seekFromTo(0,1))},reverse:function(){this.seekFromTo(1,0)},initState:function(){if(0!==this.adapters.length)for(var t=0;t<this.adapters.length;t++)this.adapters[t].initState()},propagate:function(){var t,n=this.transition(this.tick);for(t=0;t<this.adapters.length;t++)this.adapters[t].update(n)},onTimerEvent:function(){var t,n=(new Date).getTime(),i=n-this.lastTime;this.lastTime=n,t=i/this.duration*(this.tick<this.target?1:-1),Math.abs(t)>=Math.abs(this.tick-this.target)?this.tick=this.target:this.tick+=t;try{this.propagate()}finally{this.onStep.call(this),this.target==this.tick&&this.stop()}}}),o.deepExtend(s,{init:function(t){o.init(t,s.ui)},Utils:f,Range:i,Ticker:a})}(window.kendo.jQuery)},i(3))}});