Jonathan Ouellette 580e90f6a2 initial add
2022-09-27 14:10:30 -07:00

10 lines
14 KiB
JavaScript

/*
* Kendo UI Complete v2013.3.1119 (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(define){return define(["./kendo.dataviz.core.min"],function(){!function(){function t(t){this.view=t}function e(t){this.view=t}function n(){return d.support.browser.msie&&!T()&&void 0!==window.performance}function i(t,e,n){var i=new h(t),r=new h(e),s=o(i.r,r.r,n),a=o(i.g,r.g,n),l=o(i.b,r.b,n);return new h(s,a,l).toHex()}function o(t,e,n){return p.round(n*e+(1-n)*t)}function r(t,e){var n,o,r,s=e.stops,a=s.length,l=u({},e);for(l.stops=[],n=0;a>n;n++)o=s[n],r=l.stops[n]=u({},s[n]),r.color=i(t,o.color,o.opacity),r.opacity=0;return l}var s,a=jQuery,l=document,p=Math,d=window.kendo,c=d.Class,u=d.deepExtend,f=d.dataviz,h=f.Color,m=f.Box2D,y=f.Point2D,x=f.ExpandAnimation,v=f.ViewBase,b=f.ViewElement,w=f.defined,g=f.renderTemplate,k=f.uniqueId,C=f.rotatePoint,L=f.round,T=f.supportsSVG,M="#000",A=f.CLIP,D=f.COORD_PRECISION,V=f.DEFAULT_WIDTH,P=f.DEFAULT_HEIGHT,O=f.DEFAULT_FONT,E="object",_="linear",I="radial",z="transparent",G=v.extend({init:function(i){var o=this;v.fn.init.call(o,i),o.decorators.push(new t(o),new e(o)),f.ui.Chart&&o.decorators.push(new f.BarAnimationDecorator(o),new f.PieAnimationDecorator(o),new f.BubbleAnimationDecorator(o)),o.decorators.push(new s(o)),n()||o.decorators.push(new f.FadeAnimationDecorator(o)),f.Gauge&&o.decorators.push(new f.RadialPointerAnimationDecorator(o),new f.ArrowPointerAnimationDecorator(o),new f.BarIndicatorAnimationDecorator(o)),o.template=G.template,o.tagName=o.options.inline?"span":"div",o.template||(o.template=G.template=g("<#= d.tagName # style='width:#= d.options.width #px; height:#= d.options.height #px; position: relative;'>#= d.renderContent() #</#= d.tagName #>"))},options:{width:V,height:P},renderTo:function(t){var e,n=this;return l.namespaces&&l.namespaces.add("kvml","urn:schemas-microsoft-com:vml","#default#VML"),n.setupAnimations(),t.innerHTML=n.render(),n.playAnimations(),e=t.firstChild,n._viewElement=e,e},renderElement:function(t){var e,n=l.createElement("div");return n.style.display="none",l.body.appendChild(n),n.innerHTML=t.render(),e=n.firstChild,l.body.removeChild(n),e},createText:function(t,e){return this.decorate(e&&e.rotation?new R(t,e):new N(t,e))},createRect:function(t,e){return this.decorate(new W(t.points(),!0,this.setDefaults(e)))},createCubicCurve:function(t,e,n){return new S(t,e,n)},createLine:function(t,e,n,i,o){return this.decorate(new W([new y(t,e),new y(n,i)],!1,this.setDefaults(o)))},createMultiLine:function(t,e){return this.decorate(new B(t,!1,this.setDefaults(e)))},createPolyline:function(t,e,n){return this.decorate(new W(t,e,this.setDefaults(n)))},createCircle:function(t,e,n){return this.decorate(new Q(t,e,n))},createSector:function(t,e){return this.decorate(new X(t,e))},createRing:function(t,e){return this.decorate(new U(t,this.setDefaults(e)))},createGroup:function(t){return this.decorate(new q(this.setDefaults(t)))},createGradient:function(t){var e=w(t.cx)&&w(t.cy)&&w(t.bbox);return t.type===I&&e?new Z(t):t.type===_?new Y(t):M}}),N=b.extend({init:function(t,e){var n=this;b.fn.init.call(n,e),n.content=t,n.template=N.template,n.template||(n.template=N.template=g("<kvml:textbox #= d.renderId() # #= d.renderDataAttributes() #style='position: absolute; left: #= d.options.x #px; top: #= d.options.y #px; font: #= d.options.font #; color: #= d.options.color #; visibility: #= d.renderVisibility() #; white-space: nowrap; #= d.renderCursor() #'>#= d.content #</kvml:textbox>"))},options:{x:0,y:0,font:O,color:M,fillOpacity:1,cursor:{}},refresh:function(t){a(t).css("visibility",this.renderVisibility())},clone:function(){var t=this;return new N(t.content,u({},t.options))},renderVisibility:function(){return this.options.fillOpacity>0?"visible":"hidden"},renderCursor:function(){var t=this.options,e="";return w(t.cursor.style)&&(e+="cursor: "+t.cursor.style+";"),e}}),R=b.extend({init:function(t,e){var n=this;b.fn.init.call(n,e),n.content=t,n.template=R.template,n.template||(n.template=R.template=g("<kvml:shape #= d.renderId() # #= d.renderDataAttributes() #style='position: absolute; top: 0px; left: 0px; width: 1px; height: 1px;' stroked='false' coordsize='1,1'>#= d.renderPath() #<kvml:fill color='#= d.options.color #' /><kvml:textpath on='true' style='font: #= d.options.font #;' fitpath='false' string='#= d.content #' /></kvml:shape>"))},options:{x:0,y:0,font:O,color:M,size:{width:0,height:0}},renderPath:function(){var t=this,e=t.options,n=e.size.width,i=e.size.height,o=e.x+n/2,r=e.y+i/2,s=-e.rotation,a=C(e.x,r,o,r,s),l=C(e.x+n,r,o,r,s);return"<kvml:path textpathok='true' v='m "+L(a.x)+","+L(a.y)+" l "+L(l.x)+","+L(l.y)+"' />"}}),F=b.extend({init:function(t){var e=this;b.fn.init.call(e,t),e.template=F.template,e.template||(e.template=F.template=g('<kvml:stroke on=\'#= !!d.options.stroke && !!d.options.strokeWidth #\' #= d.renderAttr("color", d.options.stroke) #weight=\'#= d.options.strokeWidth || 0 #px\' #= d.renderAttr("dashstyle", d.options.dashType) ##= d.renderAttr("opacity", d.options.strokeOpacity) # />'))},refresh:function(t){try{t.opacity=this.options.strokeOpacity}catch(e){}}}),H=b.extend({init:function(t){var e=this;b.fn.init.call(e,t),e.template=H.template,e.template||(e.template=H.template=g('<kvml:fill on=\'#= d.isEnabled() #\' #= d.renderAttr("color", d.options.fill) ##= d.renderAttr("weight", d.options.fillWidth) ##= d.renderAttr("opacity", d.options.fillOpacity) # />'))},isEnabled:function(){var t=this.options.fill;return!!t&&t.toLowerCase()!==z},refresh:function(t){try{t.opacity=this.options.fillOpacity}catch(e){}}}),j=b.extend({init:function(t){var e=this;b.fn.init.call(e,t),e.template=j.template,e.template||(e.template=j.template=g("<kvml:shape #= d.renderId() # #= d.renderDataAttributes() #style='position:absolute; #= d.renderSize() # display:#= d.renderDisplay() #; #= d.renderCursor() #' coordorigin='0 0' #= d.renderCoordsize() #><kvml:path v='#= d.renderPoints() # e' />#= d.fill.render() + d.stroke.render() #</kvml:shape>")),e.stroke=new F(e.options),e.fill=new H(e.options)},options:{fill:"",fillOpacity:1,strokeOpacity:1,rotation:[0,0,0],visible:!0,cursor:{}},renderCoordsize:function(){var t=this.options.align===!1?1e4:1;return"coordsize='"+t+" "+t+"'"},renderSize:function(){var t=this.options.align===!1?100:1;return"width:"+t+"px; height:"+t+"px;"},render:function(){var t=this;return t.fill.options.fillOpacity=t.options.fillOpacity,t.stroke.options.strokeOpacity=t.options.strokeOpacity,b.fn.render.call(t)},renderDisplay:function(){return this.options.visible?"block":"none"},renderPoints:function(){},refresh:function(t){if(t){var e=this,n=a(t),i=n[0].parentNode,o=e.fill,r=e.stroke;i&&(n.find("path")[0].v=this.renderPoints(),o.options=r.options=e.options,o.refresh(n.find("fill")[0]),r.refresh(n.find("stroke")[0]),n.css("display",e.renderDisplay()),i.style.cssText=i.style.cssText)}},renderCursor:function(){var t=this.options,e="";return w(t.cursor.style)&&(e+="cursor: "+t.cursor.style+";"),e}}),S=j.extend({init:function(t,e,n){var i=this;j.fn.init.call(i,e),i.points=t,i.areaPoints=n},renderPoints:function(){var t,e,n,i,o=this,r=o.areaPoints,s=o.points,a=[];for(t=1;t<s.length;t+=3){for(n=[],i=0;3>i;i++)e=s[t+i],n.push(L(e.x)+","+L(e.y));a.push("C "+n.join(" "))}if(r&&r.length){for(t=0;t<r.length;t++)a.push("L "+L(r[t].x)+","+L(r[t].y));a.push("X")}return"M "+p.round(s[0].x)+","+p.round(s[0].y)+" "+a.join(" ")+" E"}}),W=j.extend({init:function(t,e,n){var i=this;j.fn.init.call(i,n),i.points=t,i.closed=e},renderPoints:function(){var t=this,e=t.points;return t._renderPoints(e)},_renderPoints:function(t){var e,n=this,i=t.length,o=function(t){var e=n.options.rotation;return C(t.x,t.y,e[1],e[2],-e[0])},r="m "+n._print(o(t[0]));if(i>1)for(r+=" l ",e=1;i>e;e++)r+=n._print(o(t[e])),i-1>e&&(r+=", ");return n.closed&&(r+=" x"),r},clone:function(){var t=this;return new W(u([],t.points),t.closed,u({},t.options))},_print:function(t){var e=this.options.align===!1?100:1;return p.round(t.x*e)+","+p.round(t.y*e)}}),B=W.extend({renderPoints:function(){var t,e=this,n=e.points,i=[];for(t=0;t<n.length;t++)i.push(e._renderPoints(n[t]));return i.join(" ")}}),U=j.extend({init:function(t,e){var n=this;j.fn.init.call(n,e),n.pathTemplate=U.pathTemplate,n.pathTemplate||(n.pathTemplate=U.pathTemplate=g("M #= d.osp.x #,#= d.osp.y # WA #= d.obb.l #,#= d.obb.t # #= d.obb.r #,#= d.obb.b # #= d.osp.x #,#= d.osp.y # #= d.oep.x #,#= d.oep.y # L #= d.iep.x #,#= d.iep.y # AT #= d.ibb.l #,#= d.ibb.t # #= d.ibb.r #,#= d.ibb.b # #= d.iep.x #,#= d.iep.y # #= d.isp.x #,#= d.isp.y # X E")),n.config=t},renderPoints:function(){function t(t){return new y(L(t.x),L(t.y))}var e,n,i,o,r=this,s=r.config,a=p.max(L(s.r),0),l=p.max(L(s.ir),0),d=L(s.c.x),c=L(s.c.y),u=s.startAngle,f=s.angle+u,h=f-u,m={l:d-a,t:c-a,r:d+a,b:c+a},x={l:d-l,t:c-l,r:d+l,b:c+l};return 1>=h?f+=1-h:h>359&&(f-=1-h),e=t(s.point(u)),n=t(s.point(u,!0)),o=t(s.point(f)),i=t(s.point(f,!0)),r.pathTemplate({obb:m,ibb:x,osp:e,isp:n,oep:o,iep:i,cx:d,cy:c})},clone:function(){var t=this;return new U(u({},t.config),u({},t.options))}}),X=U.extend({init:function(t,e){var n=this;U.fn.init.call(n,t,e),n.pathTemplate=X.pathTemplate,n.pathTemplate||(n.pathTemplate=X.pathTemplate=g("M #= d.osp.x #,#= d.osp.y # WA #= d.obb.l #,#= d.obb.t # #= d.obb.r #,#= d.obb.b # #= d.osp.x #,#= d.osp.y # #= d.oep.x #,#= d.oep.y # L #= d.cx #,#= d.cy # X E"))},clone:function(){var t=this;return new X(u({},t.config),u({},t.options))}}),Q=b.extend({init:function(t,e,n){var i=this;b.fn.init.call(i,n),i.c=t,i.r=e,i.template=Q.template,i.template||(i.template=Q.template=g("<kvml:oval #= d.renderId() # #= d.renderDataAttributes() #style='position:absolute; width:#= d.r * 2 #px; height:#= d.r * 2 #px; top:#= d.c.y - d.r #px; left:#= d.c.x - d.r #px;'>#= d.fill.render() + d.stroke.render() #</kvml:oval>")),i.stroke=new F(i.options),i.fill=new H(i.options)},options:{fill:"",fillOpacity:1},refresh:function(t){var e=this,n=e.c,i=p.max(0,e.r),o=2*i,r=a(t);r.css({width:o,height:o,top:n.y-i,left:n.x-i}),e.fill.options=e.options,e.fill.refresh(r.find("fill")[0])},clone:function(){var t=this;return new Q(u({},t.c),t.r,u({},t.options))}}),q=b.extend({init:function(t){var e=this;b.fn.init.call(e,t),e.tagName=e.options.inline?"span":"div",e.template=q.template,e.template||(e.template=q.template=g("<#= d.tagName # #= d.renderId() ##= d.renderDataAttributes() #style='position: absolute; white-space: nowrap;'>#= d.renderContent() #</#= d.tagName #>"))}}),J=b.extend({init:function(t,e){var n=this;b.fn.init.call(n,e),n.tagName=n.options.inline?"span":"div",n.template=J.template,n.clipTemplate=J.clipTemplate,n.template||(n.template=J.template=g("<#= d.tagName # #= d.renderId() #style='position:absolute; width:#= d.box.width() #px; height:#= d.box.height() #px; top:#= d.box.y1 #px; left:#= d.box.x1 #px; clip:#= d._renderClip() #;' >#= d.renderContent() #</#= d.tagName #>"),n.clipTemplate=J.clipTemplate=g("rect(#= d.points[0].y #px #= d.points[1].x #px #= d.points[2].y #px #= d.points[0].x #px)")),n.box=t,n.points=t.points()},clone:function(){var t=this;return new J(t.box,u({},t.options))},refresh:function(t){t&&(t.style.clip=this._renderClip())},_renderClip:function(){return this.clipTemplate(this)},destroy:function(){a("#"+this.options.id+">*").unwrap()}}),K=b.extend({init:function(t){var e=this;b.fn.init.call(e,t)},options:{opacity:1},renderColors:function(){var t,e,n=this,i=n.options,o=i.stops,r=o.length,s=[],a=p.round;for(e=0;r>e;e++)t=o[e],s.push(a(100*t.offset)+"% "+t.color);return s.join(",")}}),Y=K.extend({init:function(t){var e=this;K.fn.init.call(e,t),e.template=Y.template,e.template||(e.template=Y.template=g("<kvml:fill type='gradient' angle='#= 270 - d.options.rotation #' colors='#= d.renderColors() #' opacity='#= d.options.opacity #' />"))},options:{rotation:0}}),Z=K.extend({init:function(t){var e=this;K.fn.init.call(e,t),e.template=Z.template,e.template||(e.template=Z.template=g("<kvml:fill type='gradienttitle' focus='100%' focusposition='#= d.focusPosition() #'colors='#= d.renderColors() #' color='#= d.firstColor() #' color2='#= d.lastColor() #' opacity='#= d.options.opacity #' />"))},focusPosition:function(){var t=this.options,e=t.bbox,n=t.cx,i=t.cy,o=Math.max(0,Math.min(1,(n-e.x1)/e.width())),r=Math.max(0,Math.min(1,(i-e.y1)/e.height()));return L(o,D)+" "+L(r,D)},firstColor:function(){var t=this.options.stops;return t[0].color},lastColor:function(){var t=this.options.stops;return t[t.length-1].color}});t.prototype={decorate:function(t){var e,n,i=t.options,o=this.view;return i.overlay&&(n=i.overlay.bbox,e=o.buildGradient(u({},i.overlay,{_overlayFill:i.fill,_bboxHash:w(n)?n.getHash():""}))),e?(delete i.overlay,i.fill=u(r(i.fill,e),{opacity:i.fillOpacity}),t):t}},e.prototype={decorate:function(t){var e=this,n=e.view,i=t.options,o=i.fill;return o&&o.supportVML!==!1&&(o.gradient&&(o=n.buildGradient(o)),typeof o===E&&(t.fill=n.createGradient(o))),t}},s=c.extend({init:function(t){this.view=t},decorate:function(t){var e,n=this,i=n.view,o=i.options,r=t.options.animation;return r&&r.type===A&&o.transitions?(e=new J(new m(0,0,o.width,o.height),{id:k(),inline:o.inline}),i.animations.push(new x(e,{size:o.width})),e.children.push(t),e):t}}),d.support.browser.msie&&f.ViewFactory.current.register("vml",G,20),u(f,{VMLCircle:Q,VMLClipAnimationDecorator:s,VMLClipRect:J,VMLFill:H,VMLGroup:q,VMLLine:W,VMLMultiLine:B,VMLLinearGradient:Y,VMLOverlayDecorator:t,VMLPath:j,VMLRadialGradient:Z,VMLRing:U,VMLRotatedText:R,VMLSector:X,VMLStroke:F,VMLText:N,VMLView:G,blendColors:i,blendGradient:r})}(window.kendo.jQuery)})}("function"==typeof define&&define.amd?define:function(t,e){return e()});
//@ sourceMappingURL=kendo.dataviz.vml.min.js.map