text: /**
   * Copyright (c) 2014, 2016, Oracle and/or its affiliates.
   * The Universal Permissive License (UPL), Version 1.0
   */
  "use strict";
  define(['jquery'], function($) {
    // Internal use only.  All APIs and functionality are subject to change at any time.
  
    // Declare dvt, since it will be used in the toolkit source.
    var dvt;
  
  dvt=function(){var t={exportProperty:function(t,e,i){t[e]=i},Obj:function(){}};t.Obj._GET_FUNCTION_NAME_REGEXP=/function\s+([\S^]+)\s*\(/,t.Obj.createSubclass=function(e,i,n){if(null!=e&&(void 0===i&&(i=Object),e!=i)){var o=t.Obj._tempSubclassConstructor;o.prototype=i.prototype,e.prototype=new o,e.prototype.constructor=e,e.superclass=i.prototype,n&&(e._typeName=n)}},t.Obj._tempSubclassConstructor=function(){},t.Obj.getTypeName=function(e){var i=e._typeName;if(null==i){var n=e.toString(),o=t.Obj._GET_FUNCTION_NAME_REGEXP.exec(n);o&&(i=o[1],e._typeName=i)}return i},t.Obj.prototype.getTypeName=function(){return t.Obj.getTypeName(this.constructor)},t.Obj.prototype.clone=function(){return null},t.Obj.prototype.mergeProps=function(t){},t.Obj.createCallback=function(t,e){return function(){return e.apply(t,arguments)}},t.Obj.defineConstant=function(t){return t},t.ArrayUtils=new Object,t.Obj.createSubclass(t.ArrayUtils,t.Obj),t.ArrayUtils.NONE=0,t.ArrayUtils.ADD=1,t.ArrayUtils.SUB=2,t.ArrayUtils.DIV=3,t.ArrayUtils.MULT=4,t.ArrayUtils.MOD=5,t.ArrayUtils.argsToArray=function(t){if(t){var e=new Array(t.length);if(t.length>0)for(var i=0;i<t.length;i++)e[i]=t[i];return e}return t},t.ArrayUtils.isArray=function(t){return void 0!==t&&"[object Array]"===Object.prototype.toString.apply(t)},t.ArrayUtils.toFloat=function(e,i,n){if(!t.ArrayUtils.isArray(e))return e;i||(n=t.ArrayUtils.NONE),(n=null===n||isNaN(n)?t.ArrayUtils.NONE:n)!==t.ArrayUtils.NONE&&("number"!=typeof i&&(i=parseFloat(i)),isNaN(i)&&(n=t.ArrayUtils.NONE));var o,r=e.length;if(n===t.ArrayUtils.NONE)for(o=0;o<r;o++)e[o]=parseFloat(e[o]);else for(o=0;o<r;o++){var s=parseFloat(e[o]);switch(n){case t.ArrayUtils.MULT:s*=i;break;case t.ArrayUtils.ADD:s+=i;break;case t.ArrayUtils.SUB:s-=i;break;case t.ArrayUtils.DIV:s/=i;break;case t.ArrayUtils.MOD:s%=i}e[o]=s}return e},t.ArrayUtils.copy=function(t){var e;if(t){e=[];for(var i=t.length,n=0;n<i;n++)e.push(t[n])}return e},t.ArrayUtils.getIndex=function(t,e){if(t){if(t.indexOf)return t.indexOf(e);for(var i=0;i<t.length;i++)if(t[i]===e)return i}return-1},t.ArrayUtils.getLastIndex=function(t,e){if(t.lastIndexOf)return t.lastIndexOf(e);for(var i=t.length-1;i>=0;i--)if(t[i]===e)return i;return-1},t.ArrayUtils.removeItem=function(e,i){var n=t.ArrayUtils.getIndex(e,i);n>-1&&e.splice(n,1)},t.ArrayUtils.insert=function(e,i,n){if(!t.ArrayUtils.isArray(e))return null;if(!t.ArrayUtils.isArray(i))return e;var o;if(0===n)o=i.concat(e);else if(n>0&&n<e.length){var r=e.splice(0,n);o=(r=r.concat(i)).concat(e)}else o=e.concat(i);return o},t.ArrayUtils.equals=function(t,e){if(!t&&e)return!1;if(t&&!e)return!1;if(t||e){if(t.length!=e.length)return!1;for(var i=0;i<=t.length;i++)if(t[i]!==e[i])return!1;return!0}return!0},t.ArrayUtils.hasAnyMapItem=function(t,e){if(!t||!e)return!1;for(var i=0;i<e.length;i++)if(t[e[i]])return!0;return!1},t.ArrayUtils.hasAllMapItems=function(t,e){if(!t||!e)return!1;for(var i=0;i<e.length;i++)if(!t[e[i]])return!1;return!0},t.ArrayUtils.hasAnyItem=function(e,i){return t.ArrayUtils.hasAnyMapItem(t.ArrayUtils.createBooleanMap(e),i)},t.ArrayUtils.hasAllItems=function(e,i){return t.ArrayUtils.hasAllMapItems(t.ArrayUtils.createBooleanMap(e),i)},t.ArrayUtils.createBooleanMap=function(t){if(!t)return null;for(var e={},i=0;i<t.length;i++)e[t[i]]=!0;return e},t.ArrayUtils.reduce=function(t,e){if(t.reduce)return t.reduce(e);for(var i=t.length,n=t[0],o=1;o<i;o++)n=e(n,t[o],o,t);return n},t.ArrayUtils.map=function(t,e){if(t.map)return t.map(e);for(var i=t.length,n=[],o=0;o<i;o++)n[o]=e(t[o],o,t);return n},t.ArrayUtils.forEach=function(t,e){if(t.map)t.forEach(e);else for(var i=t.length,n=0;n<i;n++)e(t[n],n,t)},t.StringUtils={},t.Obj.createSubclass(t.StringUtils,t.Obj),t.StringUtils._hasTrim=null!="hello".trim,t.StringUtils._hasEndsWith=null!="hello".endsWith,t.StringUtils.trim=function(e){return t.StringUtils._hasTrim?e.trim():e.replace(/^\s+|\s+$/g,"")},t.StringUtils.endsWith=function(e,i){return t.StringUtils._hasEndsWith?e.endsWith(i):e.match(i+"$")==i},t.StringUtils.processAriaLabel=function(t){var e=t;return e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/(<|&#60;)/g,"&lt;")).replace(/(>|&#62;)/g,"&gt;")).replace(/&lt;b&gt;/g,"")).replace(/&lt;\/b&gt;/g,"")).replace(/&lt;i&gt;/g,"")).replace(/&lt;\/i&gt;/g,"")).replace(/\n/g,"; ")).replace(/&#92;n/g,"; ")).replace(/&lt;br&gt;/g,"; ")).replace(/&lt;br\/&gt;/g,"; ")},t.Context=function(e,i,n){var o=i?i+"_svg":null;this._root=t.ToolkitUtils.createSvgDocument(o),e.appendChild(this._root),this._parentDiv=e,this._referenceDiv=n,this._implFactory=new G(this),this._defs=this._implFactory.newDefs(),t.ToolkitUtils.appendChildElem(this._root,this._defs),this._keyboardFocusArray=[],this._keyboardFocusIndex=0,this._dndEventManagers=[],this.Init(this._implFactory,this._root,i),t.ToolkitUtils.appendChildElem(this._root,this._stage.getElem()),this.oj=null},t.Obj.createSubclass(t.Context,t.Obj),t.Context._DATATIP_POPUP_STYLE_CLASS="OraDVTDatatipPopup",t.Context._TOOLTIP_POPUP_STYLE_CLASS="OraDVTTooltipPopup",t.Context._DEFAULT_FONT_FAMILY="-apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif",t.Context._DEFAULT_FONT_SIZE="12px",t.Context._DEFAULT_FONT_WEIGHT="400",t.Context._id=0,t.Context.prototype.Init=function(e,i,n){this._implFactory=e;var o=(n||"_dvt"+t.Context._id)+"_stage";this._stage=new T(this,i,o),t.Context._id++,this._normalizedFontFamilyCache={},this.setDefaultFontFamily(t.Context._DEFAULT_FONT_FAMILY),this.setDefaultFontSize(t.Context._DEFAULT_FONT_SIZE),this.setDefaultFontWeight(t.Context._DEFAULT_FONT_WEIGHT),this._tooltipManagers=new Object,this._customTooltipManagers=new Object,this._scheduler=null,this._globalDefsMap={}},t.Context.prototype.getDefaultFontFamily=function(){return this._defaultFontFamily},t.Context.prototype.setDefaultFontFamily=function(e){e&&(this._defaultFontFamily=this._normalizeFontFamily(e),t.ToolkitUtils.setAttrNullNS(this._stage.getElem(),"font-family",this.getDefaultFontFamily()))},t.Context.prototype.isDefaultFontFamily=function(t){return!!t&&this._defaultFontFamily===this._normalizeFontFamily(t)},t.Context.prototype.getDefaultFontSize=function(){return this._defaultFontSize},t.Context.prototype.setDefaultFontSize=function(e){e&&(this._defaultFontSize=e,t.ToolkitUtils.setAttrNullNS(this._stage.getElem(),"font-size",this.getDefaultFontSize()))},t.Context.prototype.getDefaultFontWeight=function(){return this._defaultFontWeight},t.Context.prototype.setDefaultFontWeight=function(e){e&&(this._defaultFontWeight=e,t.ToolkitUtils.setAttrNullNS(this._stage.getElem(),"font-weight",this.getDefaultFontWeight()))},t.Context.prototype._normalizeFontFamily=function(t){var e=this._normalizedFontFamilyCache[t];return e||(e=t.replace(/, /g,",").replace(/"/g,"'"),this._normalizedFontFamilyCache[t]=e),e},t.Context.prototype.getImplFactory=function(){return this._implFactory},t.Context.prototype.getStage=function(){return this._stage},t.Context.prototype.isReadyToRender=function(){if(this._destroyed)return!1;if(null!=this._parentDiv.offsetParent)return!0;var t=window.getComputedStyle(this._parentDiv);return!(!t||"fixed"!=t.position)&&"none"!=t.display},t.Context.prototype.getSvgDocument=function(){return this._root},t.Context.prototype.setReadingDirection=function(t){this._readingDirection=t},t.Context.prototype.getReadingDirection=function(){return this._readingDirection},t.Context.prototype.existsGlobalDefReference=function(t){return this._globalDefsMap[t]>0},t.Context.prototype.increaseGlobalDefReference=function(t){null!=t&&(this._globalDefsMap[t]?this._globalDefsMap[t]++:this._globalDefsMap[t]=1)},t.Context.prototype.decreaseGlobalDefReference=function(t){if(null!=t){var e=this._globalDefsMap[t];e&&(1==e?delete this._globalDefsMap[t]:this._globalDefsMap[t]=e-1),this._globalDefsMap[t]||this.removeDefsById(t)}},t.Context.prototype.getTooltipManager=function(t){return t||(t="_dvtTooltip"),t+=this.getStage().getId(),this._tooltipManagers[t]||(this._tooltipManagers[t]=this._implFactory.newTooltipManager(t)),this._tooltipManagers[t]},t.Context.prototype.hideTooltips=function(){for(var t in this._tooltipManagers)this._tooltipManagers[t].hideTooltip()},t.Context.prototype.getScheduler=function(){return this._scheduler||(this._scheduler=new n(this)),this._scheduler},t.Context.prototype.getDocumentUtils=function(){return this._implFactory.getDocumentUtils()},t.Context.prototype.pageToStageCoords=function(e,i){var n=this.getStageAbsolutePosition(),o=e-n.x,r=i-n.y;return new t.Point(o,r)},t.Context.prototype.stageToPageCoords=function(e,i){var n=this.getStageAbsolutePosition(),o=e+n.x,r=i+n.y;return new t.Point(o,r)},t.Context.prototype.getStageAbsolutePosition=function(){var e=this._referenceDiv;if(!e){var i=this.getStage().getImpl().getSVGRoot();e=i.parentNode?i.parentNode:i}var n=t.Agent.getElementPosition(e);return new t.Point(parseInt(n.x),parseInt(n.y))},t.Context.prototype.isOffscreen=function(){if(null!=this._bOffscreen)return this._bOffscreen;var t=this.getStage().getSVGRoot();try{var e=t.getBoundingClientRect();this._bOffscreen=e.bottom<0||e.right<0||e.top>(window.innerHeight||document.documentElement.clientHeight)||e.left>(window.innerWidth||document.documentElement.clientWidth)}catch(t){this._bOffscreen=!0}return this._bOffscreen},t.Context.prototype.resetIsOffscreen=function(){this._bOffscreen=null},t.Context.prototype.getCustomTooltipManager=function(t){return t||(t="_dvtCustomTooltip"),t+=this.getStage().getId(),this._customTooltipManagers[t]||(this._customTooltipManagers[t]=new N(this,t)),this._customTooltipManagers[t]},t.Context.prototype.appendDefs=function(e){t.ToolkitUtils.appendChildElem(this._defs,e)},t.Context.prototype.getDefs=function(){return this._defs},t.Context.prototype.getImplFactory=function(){return this._implFactory},t.Context.prototype.removeDefs=function(t){t._obj&&t._obj.destroy(),this._defs.removeChild(t)},t.Context.prototype.removeDefsById=function(t){for(var e=this._defs.childNodes,i=e.length,n=0;n<i;n++){var o=e[n];if(o.id===t)return void this.removeDefs(o)}},t.Context.prototype.getRootAttribute=function(e){return t.ToolkitUtils.getAttrNullNS(this._root,e)},t.Context.resetUniqueSeeds=function(){t.Agent.isEnvironmentBrowser()||(void 0!==t.AfComponent&&(t.AfComponent._uniqueSeed=0),K._counter=0,t.ClipPath._uniqueSeed=0,t.SvgShapeUtils._uniqueSeed=0,t.Mask._uniqueSeed=0,t.Agent._bInitialized=!1)},t.Context.resetCaches=function(){t.Agent.isEnvironmentBrowser()||(void 0!==t.AfComponent&&t.AfStyleUtils.resetStyles(),t.TextUtils.clearCaches(),t.LedGaugeRenderer&&(t.LedGaugeRenderer._cache=null))},t.Context.prototype.setActiveElement=function(e){if(t.Agent.isEnvironmentBrowser()){this._activeElement&&(t.ToolkitUtils.removeAttrNullNS(this._activeElement.getElem(),"id"),this._activeElement=null);var i=e.getElem(),n=t.ToolkitUtils.getAttrNullNS(i,"id");n||((n=e.getActiveElementId())?t.ToolkitUtils.setAttrNullNS(i,"id",n):(n=t.EventManager._getActiveElementId(),t.ToolkitUtils.setAttrNullNS(i,"id",n),this._activeElement=e)),e.applyAriaProperties(),"application"==this._role&&this._parentDiv.setAttribute("aria-activedescendant",n)}},t.Context.prototype.setAriaLabel=function(e){this._parentDiv.getAttribute("aria-label")||(e?this._parentDiv.setAttribute("aria-label",t.StringUtils.processAriaLabel(e)):this._parentDiv.removeAttribute("aria-label"))},t.Context.prototype.setAriaRole=function(t){t?this._parentDiv.setAttribute("role",t):this._parentDiv.removeAttribute("role"),this._role=t},t.Context.prototype.setTooltipAttachedCallback=function(t){this._tooltipAttachedCallback=t},t.Context.prototype.getTooltipAttachedCallback=function(){return this._tooltipAttachedCallback},t.Context.prototype.setTooltipStyleClass=function(t){this._tooltipStyleClass=t},t.Context.prototype.getTooltipStyleClass=function(){return this._tooltipStyleClass?this._tooltipStyleClass:t.Context._TOOLTIP_POPUP_STYLE_CLASS},t.Context.prototype.setDatatipStyleClass=function(t){this._datatipStyleClass=t},t.Context.prototype.getDatatipStyleClass=function(){return this._datatipStyleClass?this._datatipStyleClass:t.Context._DATATIP_POPUP_STYLE_CLASS},t.Context.prototype.resetCurrentKeyboardFocus=function(e){this._keyboardFocusArray&&0!==this._keyboardFocusArray.length&&(e.keyCode==t.KeyboardEvent.TAB&&e.shiftKey?this.setCurrentKeyboardFocus(this._keyboardFocusArray[this._keyboardFocusArray.length-1]):e.keyCode==t.KeyboardEvent.TAB&&this.setCurrentKeyboardFocus(this._keyboardFocusArray[0]))},t.Context.prototype.setKeyboardFocusArray=function(t){(this._keyboardFocusArray=t,this._keyboardFocusIndex=0,t.length>0)&&(this._root.parentNode._currentObj=this._keyboardFocusArray[this._keyboardFocusIndex])},t.Context.prototype.getCurrentKeyboardFocus=function(){return this._keyboardFocusArray.length<=this._keyboardFocusIndex?null:this._keyboardFocusArray[this._keyboardFocusIndex]},t.Context.prototype.setCurrentKeyboardFocus=function(e){var i=t.ArrayUtils.getIndex(this._keyboardFocusArray,e);if(-1==i)return!1;var n=this._keyboardFocusArray[i];return this._keyboardFocusIndex=i,this._root.parentNode._currentObj=n,!0},t.Context.prototype.nextKeyboardFocus=function(){var t=this._keyboardFocusArray[this._keyboardFocusIndex+1];return t?(this._keyboardFocusIndex++,this._root.parentNode._currentObj=t,t):null},t.Context.prototype.previousKeyboardFocus=function(){var t=this._keyboardFocusArray[this._keyboardFocusIndex-1];return t?(this._keyboardFocusIndex--,this._root.parentNode._currentObj=t,t):null},t.Context.prototype.getNumberConverter=function(t){var e=this.getLocaleHelpers();return e.numberConverterFactory?e.numberConverterFactory.createConverter(t):null},t.Context.prototype.getLocaleHelpers=function(){return this._localeHelpers?this._localeHelpers:{}},t.Context.prototype.setLocaleHelpers=function(t){this._localeHelpers=t},t.Context.requestAnimationFrame=function(e){return t.Agent.isTouchDevice()&&t.Agent.isBrowserChrome()?window.setTimeout(e,1e3/60):window.requestAnimationFrame(e)},t.Context.cancelAnimationFrame=function(e){t.Agent.isTouchDevice()&&t.Agent.isBrowserChrome()?clearTimeout(e):window.cancelAnimationFrame(e)},t.Context.prototype.getContainer=function(){return this._parentDiv},t.Context.prototype.createOverlayDiv=function(){var t=document.createElement("div");return t.style.top="-100%",t.style.position="relative",t},t.Context.prototype.setOverlayAttachedCallback=function(t){this._overlayAttachedCallback=t},t.Context.prototype.getOverlayAttachedCallback=function(){return this._overlayAttachedCallback},t.Context.prototype.addDndEventManager=function(t){this._dndEventManagers.push(t)},t.Context.prototype.removeDndEventManager=function(t){var e=this._dndEventManagers.indexOf(t);this._dndEventManagers.splice(e,1)},t.Context.prototype.isLastDndEventManager=function(t){return this._dndEventManagers[this._dndEventManagers.length-1]===t},t.Context.prototype.setFixContextCallback=function(t){this._fixContextCallback=t},t.Context.prototype.fixRendererContext=function(t){return this._fixContextCallback?this._fixContextCallback(t):t},t.Context.prototype.setCustomElement=function(t){this._customElement=t},t.Context.prototype.isCustomElement=function(){return this._customElement},t.Context.prototype.destroy=function(){this._destroyed=!0};var e=function(){this._Init()};t.Obj.createSubclass(e,t.Obj),e.prototype._Init=function(){this._bLocked=!1},e.prototype.isLocked=function(){return this._bLocked},e.prototype.__lock=function(){this._bLocked=!0};var i=function(t,e,i,n,o){this.Init(t,e,i,n,o)};t.Obj.createSubclass(i,t.Obj),i._STATE_INITIALIZE=0,i._STATE_BEGIN=1,i._STATE_RUN=2,i.CalcProgress=function(t,e,i){var n=i-e;if(0==n)return.5;var o=(t-e)/n;return o>1&&(o=1),o},i.prototype.Init=function(t,e,n,o,r){this._context=t,this._scheduler=e,this.setDuration(n),this.setDelay(o),this.setEasing(r),this._bRunning=!1,this._startTime=null,this._progress=0,this._state=i._STATE_INITIALIZE,this._onInit=null,this._onInitObj=null,this._onEnd=null,this._onEndObj=null},i.prototype.getDuration=function(){return this._duration},i.prototype.setDuration=function(t){this._duration=t||.5},i.prototype.getDelay=function(){return this._delay},i.prototype.setDelay=function(t){this._delay=t||0},i.prototype.getEasing=function(){return this._easing},i.prototype.setEasing=function(e){this._easing=e||t.Easing.cubicInOut},i.prototype.setOnInit=function(t,e){this._onInit=t,this._onInitObj=e||null},i.prototype.getOnInit=function(){return[this._onInit,this._onInitObj]},i.prototype.setOnEnd=function(t,e){this._onEnd=t,this._onEndObj=e||null},i.prototype.getOnEnd=function(){return[this._onEnd,this._onEndObj]},i.prototype.isRunning=function(){return this._bRunning},i.prototype.play=function(e){e?this._play():this._animationRequestId=t.Context.requestAnimationFrame(t.Obj.createCallback(this,this._play))},i.prototype._play=function(){this._bRunning||(this._bRunning=!0,this.ProcessPlay(),this._scheduler.addScheduled(this)),this._context.isOffscreen()&&this.stop(!0),this._animationRequestId=null},i.prototype.stop=function(e){this._animationRequestId&&(t.Context.cancelAnimationFrame(this._animationRequestId),this._animationRequestId=null),this._scheduler.removeScheduled(this),e&&this.ProcessStep(1),this.ProcessEnd()},i.prototype.processTime=function(t){if(this._bRunning){var e=t-this._startTime;if(e<0)return!1;var i=1e3*this.GetTotalDuration(),n=1;0!=i&&(n=e/i),n>1&&(n=1),this.ProcessStep(n);var o=n>=1;return o&&this.ProcessEnd(),o}},i.prototype.GetTotalDuration=function(){return this._delay+this._duration},i.prototype.ProcessPlay=function(){if(this._state==i._STATE_INITIALIZE&&this.ProcessInitialize(),this._state==i._STATE_BEGIN)this._startTime=(new Date).getTime(),this.ProcessStart();else{var t=1e3*this._progress*this.GetTotalDuration();this._startTime=(new Date).getTime()-t}this._state=i._STATE_RUN},i.prototype.ProcessInitialize=function(){this._onInit&&this._onInit.call(this._onInitObj),this.Initialize(),this._state=i._STATE_BEGIN},i.prototype.ProcessStart=function(){this._bRunning=!0,this._progress=0},i.prototype.ProcessStep=function(t){this._progress=t;var e=t;this._delay>0&&(e=i.CalcProgress(t,this._delay/this.GetTotalDuration(),1)),e>=0&&(this._easing&&(e=this._easing(e)),this.Step(e))},i.prototype.ProcessEnd=function(){this._bRunning&&(this._bRunning=!1,this._progress=1,this._state=i._STATE_BEGIN),this._onEnd&&this._onEnd.call(this._onEndObj)},i.prototype.Initialize=function(){},i.prototype.Step=function(t){};var n=function(t){this.Init(t)};t.Obj.createSubclass(n,t.Obj),n.prototype.Init=function(t){this._scheduledItems=new Array,this._bRunning=!1},n.prototype.HandleTimer=function(){for(var e=(new Date).getTime(),i=0;i<this._scheduledItems.length;i++){var o=this._scheduledItems[i];o.processTime(e)&&this.removeScheduled(o)}this._scheduledItems.length<1?(this._bRunning&&(this._bRunning=!1,this._animationRequestId&&t.Context.cancelAnimationFrame(this._animationRequestId)),this._animationRequestId=null):this._animationRequestId=t.Context.requestAnimationFrame(t.Obj.createCallback(this,this.HandleTimer)),n._frameCount++},n.prototype.addScheduled=function(e){t.ArrayUtils.getIndex(this._scheduledItems,e)<0&&this._scheduledItems.push(e),this.play()},n.prototype.removeScheduled=function(e){var i=t.ArrayUtils.getIndex(this._scheduledItems,e);i>=0&&this._scheduledItems.splice(i,1)},n.prototype.play=function(){if(!this._bRunning){for(var e=0;e<this._scheduledItems.length;e++){var i=this._scheduledItems[e];i.isRunning()||i.play()}this._bRunning=!0,this._animationRequestId=t.Context.requestAnimationFrame(t.Obj.createCallback(this,this.HandleTimer))}},t.Animator=function(t,e,i,n){this.Init(t,e,i,n)},t.Obj.createSubclass(t.Animator,i),t.Animator.TYPE_NUMBER="typeNumber",t.Animator.TYPE_MATRIX="typeMatrix",t.Animator.TYPE_NUMBER_ARRAY="typeNumberArray",t.Animator.TYPE_COLOR="typeColor",t.Animator.TYPE_COLOR_ARRAY="typeColorArray",t.Animator.TYPE_GROW_POLYLINE="typeGrowPolyline",t.Animator.TYPE_RECTANGLE="typeRectangle",t.Animator.TYPE_POINT="typePoint",t.Animator.TYPE_PATH="typePath",t.Animator.TYPE_GROW_PATH="typeGrowPath",t.Animator.TYPE_FILL="typeFill",t.Animator.TYPE_STROKE="typeStroke",t.Animator.TYPE_POLYLINE="typePolyline",t.Animator._KEY_PREFIX="dvtAnimPropMap_",t.Animator.prototype.Init=function(e,i,n,o){t.Animator.superclass.Init.call(this,e,e.getScheduler(),i,n,o),this._context=e,this._props={}},t.Animator.prototype.addProp=function(e,i,n,r,s){if(a=this.GetPropItem(i,n))a.destVal=s;else{var a=new o(e,i,n,r,s),l=t.Animator.GetKey(i);this._props[l]||(this._props[l]={}),this._props[l][t.Animator.GetKey(n)]=a}},t.Animator.prototype.removeProp=function(e,i){var n=this.GetPropItem(e,i);if(n){var o=n.destVal;return delete this._props[t.Animator.GetKey(e)][t.Animator.GetKey(i)],o}return null},t.Animator.prototype.getDestVal=function(t,e,i){var n=this.GetPropItem(t,e);return n?n.destVal:i?e.call(t):null},t.Animator.prototype.GetPropItem=function(e,i){var n=t.Animator.GetKey(e);return this._props[n]?this._props[n][t.Animator.GetKey(i)]:null},t.Animator.GetKey=function(e){return e._dvtAnimPropMapKey||(e._dvtAnimPropMapKey=t.Animator._KEY_PREFIX+Math.random()),e._dvtAnimPropMapKey},t.Animator.prototype.Initialize=function(){for(var t in this._props)for(var e in this._props[t]){var i=this._props[t][e];i.startVal=i.getter.call(i.obj)}},t.Animator.prototype.Step=function(t){for(var e in this._props)for(var i in this._props[e]){var n=this._props[e][i],o=n.type,s=n.obj,a=n.setter,l=n.destVal,h=n.startVal,u=r.interpolate(this._context,o,h,l,t);a.call(s,u)}};var o=function(t,e,i,n,o){this.type=t,this.obj=e,this.getter=i,this.setter=n,this.destVal=o,this.startVal=null};t.Obj.createSubclass(o,t.Obj),t.Playable=function(t){this.Init(t)},t.Obj.createSubclass(t.Playable,t.Obj),t.Playable.appendOnEnd=function(t,e,i){if(t&&e){var n=t.getOnEnd();if(n&&n[0]){t.setOnEnd(function(){n[0].call(n[1]),e.call(i)})}else t.setOnEnd(e,i)}},t.Playable.prependOnEnd=function(t,e,i){if(t&&e){var n=t.getOnEnd();if(n&&n[0]){t.setOnEnd(function(){e.call(i),n[0].call(n[1])})}else t.setOnEnd(e,i)}},t.Playable.appendOnInit=function(t,e,i){if(t&&e&&t.getOnInit&&t.setOnInit){var n=t.getOnInit();if(n&&n[0]){t.setOnInit(function(){n[0].call(n[1]),e.call(i)})}else t.setOnInit(e,i)}},t.Playable.prependOnInit=function(t,e,i){if(t&&e&&t.getOnInit&&t.setOnInit){var n=t.getOnInit();if(n&&n[0]){t.setOnInit(function(){e.call(i),n[0].call(n[1])})}else t.setOnInit(e,i)}},t.Playable.prototype.Init=function(t){this.Context=t,this._onEnd=null,this._onEndObj=null},t.Playable.prototype.setOnEnd=function(t,e){this._onEnd=t,this._onEndObj=e||null,this.OnEndUpdated()},t.Playable.prototype.getOnEnd=function(){return[this._onEnd,this._onEndObj]},t.Playable.prototype.OnEndUpdated=function(){},t.Playable.prototype.getDuration=function(){return 0},t.Playable.prototype.initialize=function(){},t.Playable.prototype.play=function(t){},t.Playable.prototype.stop=function(t){},t.ParallelPlayable=function(e){var i;arguments&&arguments.length>1&&arguments[1]instanceof Array?i=arguments[1]:(i=t.ArrayUtils.argsToArray(arguments)).splice(0,1),this.Init(e,i)},t.Obj.createSubclass(t.ParallelPlayable,t.Playable),t.ParallelPlayable.prototype.Init=function(e,i){t.ParallelPlayable.superclass.Init.call(this,e),this._runningCounter=0,this._arPlayables=i||[],this._bStarted=!1},t.ParallelPlayable.prototype.getPlayables=function(){return this._arPlayables},t.ParallelPlayable.prototype.getDuration=function(){for(var e=0,i=0;i<this._arPlayables.length;i++){var n=this._arPlayables[i];n instanceof t.Playable&&(e=Math.max(e,n.getDuration()))}return e},t.ParallelPlayable.prototype.initialize=function(){for(var e=0;e<this._arPlayables.length;e++)this._arPlayables[e]instanceof t.Playable&&this._arPlayables[e].initialize()},t.ParallelPlayable.prototype.play=function(e){this._arPlayables.length>0?e?this._play():(this.initialize(),this._animationRequestId=t.Context.requestAnimationFrame(t.Obj.createCallback(this,this._play))):this._animationRequestId=t.Context.requestAnimationFrame(t.Obj.createCallback(this,this.DoEnd))},t.ParallelPlayable.prototype._play=function(){var e;if(!this._bStarted)for(var i=0;i<this._arPlayables.length;i++)(e=this._arPlayables[i])instanceof t.Playable&&(this._runningCounter++,t.Playable.appendOnEnd(e,this.OnPlayableEnd,this));for(i=0;i<this._arPlayables.length;i++)(e=this._arPlayables[i])instanceof t.Playable&&e.play(!0);this._bStarted=!0,this._animationRequestId=null},t.ParallelPlayable.prototype.stop=function(e){if(this._animationRequestId)return t.Context.cancelAnimationFrame(this._animationRequestId),void this.DoEnd();for(var i,n=0;n<this._arPlayables.length;n++)(i=this._arPlayables[n])instanceof t.Playable&&i.stop(e)},t.ParallelPlayable.prototype.OnPlayableEnd=function(){this._runningCounter--,this._runningCounter<1&&this.DoEnd()},t.ParallelPlayable.prototype.DoEnd=function(){this._onEnd&&this._onEnd.call(this._onEndObj),this._animationRequestId=null},t.SequentialPlayable=function(e){var i;arguments&&arguments.length>1&&arguments[1]instanceof Array?i=arguments[1]:(i=t.ArrayUtils.argsToArray(arguments)).splice(0,1),this.Init(e,i)},t.Obj.createSubclass(t.SequentialPlayable,t.Playable),t.SequentialPlayable.prototype.Init=function(e,i){t.SequentialPlayable.superclass.Init.call(this,e),this._arPlayables=i||[],this._currIndex=-1,this._bStarted=!1},t.SequentialPlayable.prototype.getPlayables=function(){return this._arPlayables},t.SequentialPlayable.prototype.getDuration=function(){for(var e=0,i=0;i<this._arPlayables.length;i++){var n=this._arPlayables[i];n instanceof t.Playable&&(e+=n.getDuration())}return e},t.SequentialPlayable.prototype.initialize=function(){this._arPlayables.length>0&&this._arPlayables[0]instanceof t.Playable&&this._arPlayables[0].initialize()},t.SequentialPlayable.prototype.play=function(e){this._arPlayables&&this._arPlayables.length>0?e?this._play():(this.initialize(),this._animationRequestId=t.Context.requestAnimationFrame(t.Obj.createCallback(this,this._play))):this._animationRequestId=t.Context.requestAnimationFrame(t.Obj.createCallback(this,this.DoEnd))},t.SequentialPlayable.prototype._play=function(){if(this._bStarted){var e=this._arPlayables[this._currIndex];e instanceof t.Playable&&e.play(!0)}else{var i,n,o;this._arPlayables[0]instanceof t.Playable&&(i=this._arPlayables[0]),this._arPlayables[this._arPlayables.length-1]instanceof t.Playable&&(n=this._arPlayables[this._arPlayables.length-1]);for(var r=0;r<this._arPlayables.length-1;r++)(o=this._arPlayables[r])instanceof t.Playable&&t.Playable.appendOnEnd(o,this.DoSequenceStep,this);n&&t.Playable.appendOnEnd(n,this.DoEnd,this),this._bStarted=!0,this._currIndex=0,i&&i.play(!0),this._animationRequestId=null}},t.SequentialPlayable.prototype.DoSequenceStep=function(){var e=this._arPlayables[++this._currIndex];e instanceof t.Playable?e.play(!0):this.DoSequenceStep()},t.SequentialPlayable.prototype.stop=function(e){if(this._animationRequestId)return t.Context.cancelAnimationFrame(this._animationRequestId),void this.DoEnd();if(this._arPlayables)for(var i,n=this._currIndex;n<this._arPlayables.length;n++)(i=this._arPlayables[n])&&i instanceof t.Playable&&i.stop(e)},t.SequentialPlayable.prototype.DoEnd=function(){this._onEnd&&this._onEnd.call(this._onEndObj),this._animationRequestId=null},t.BlackBoxAnimationHandler=function(){},t.Obj.createSubclass(t.BlackBoxAnimationHandler,t.Obj),t.BlackBoxAnimationHandler.ALPHA_FADE="alphaFade",t.BlackBoxAnimationHandler.CONVEYOR_FROM_RIGHT="conveyorFromRight",t.BlackBoxAnimationHandler.CONVEYOR_FROM_LEFT="conveyorFromLeft",t.BlackBoxAnimationHandler.CUBE_TO_RIGHT="cubeToRight",t.BlackBoxAnimationHandler.CUBE_TO_LEFT="cubeToLeft",t.BlackBoxAnimationHandler.FLIP_RIGHT="flipRight",t.BlackBoxAnimationHandler.FLIP_LEFT="flipLeft",t.BlackBoxAnimationHandler.TRANSITION_TO_RIGHT="transitionToRight",t.BlackBoxAnimationHandler.TRANSITION_TO_LEFT="transitionToLeft",t.BlackBoxAnimationHandler.SLIDE_TO_RIGHT="slideToRight",t.BlackBoxAnimationHandler.SLIDE_TO_LEFT="slideToLeft",t.BlackBoxAnimationHandler.ZOOM="zoom",t.BlackBoxAnimationHandler.isSupported=function(e){return e==t.BlackBoxAnimationHandler.ALPHA_FADE||e==t.BlackBoxAnimationHandler.CONVEYOR_FROM_RIGHT||e==t.BlackBoxAnimationHandler.CONVEYOR_FROM_LEFT||e==t.BlackBoxAnimationHandler.CUBE_TO_RIGHT||e==t.BlackBoxAnimationHandler.CUBE_TO_LEFT||e==t.BlackBoxAnimationHandler.FLIP_RIGHT||e==t.BlackBoxAnimationHandler.FLIP_LEFT||e==t.BlackBoxAnimationHandler.TRANSITION_TO_RIGHT||e==t.BlackBoxAnimationHandler.TRANSITION_TO_LEFT||e==t.BlackBoxAnimationHandler.SLIDE_TO_RIGHT||e==t.BlackBoxAnimationHandler.SLIDE_TO_LEFT||e==t.BlackBoxAnimationHandler.ZOOM},t.BlackBoxAnimationHandler.getInAnimation=function(e,i,n,o,r){return i==t.BlackBoxAnimationHandler.ALPHA_FADE?new t.AnimFadeIn(e,n,r):i==t.BlackBoxAnimationHandler.CONVEYOR_FROM_RIGHT?new s(e,n,t.BaseAnimation.DIR_E,r):i==t.BlackBoxAnimationHandler.CONVEYOR_FROM_LEFT?new s(e,n,t.BaseAnimation.DIR_W,r):i==t.BlackBoxAnimationHandler.CUBE_TO_RIGHT?new u(e,n,t.BaseAnimation.AXIS_Y,t.BaseAnimation.ROT_DIR_CLOCKWISE,r):i==t.BlackBoxAnimationHandler.CUBE_TO_LEFT?new u(e,n,t.BaseAnimation.AXIS_Y,t.BaseAnimation.ROT_DIR_COUNTERCLOCKWISE,r):i==t.BlackBoxAnimationHandler.FLIP_RIGHT?new l(e,n,t.BaseAnimation.AXIS_Y,t.BaseAnimation.ROT_DIR_CLOCKWISE,r):i==t.BlackBoxAnimationHandler.FLIP_LEFT?new l(e,n,t.BaseAnimation.AXIS_Y,t.BaseAnimation.ROT_DIR_COUNTERCLOCKWISE,r):i==t.BlackBoxAnimationHandler.TRANSITION_TO_RIGHT?new t.AnimScaleFadeIn(e,n,o,t.BaseAnimation.DIR_NW,.5,r):i==t.BlackBoxAnimationHandler.TRANSITION_TO_LEFT?new t.AnimScaleFadeIn(e,n,o,t.BaseAnimation.DIR_NE,.5,r):i==t.BlackBoxAnimationHandler.SLIDE_TO_RIGHT?(t.BlackBoxAnimationHandler._offsetObjects(n,-o.w,0),new t.AnimMoveBy(e,n,new t.Point(o.w,0),r)):i==t.BlackBoxAnimationHandler.SLIDE_TO_LEFT?(t.BlackBoxAnimationHandler._offsetObjects(n,o.w,0),new t.AnimMoveBy(e,n,new t.Point(-o.w,0),r)):i==t.BlackBoxAnimationHandler.ZOOM?new t.AnimScaleFadeIn(e,n,o,t.BaseAnimation.DIR_C,.5,r):null},t.BlackBoxAnimationHandler.getCombinedAnimation=function(e,i,n,o,r,s){return i==t.BlackBoxAnimationHandler.ALPHA_FADE?new _(e,n,o,s):i==t.BlackBoxAnimationHandler.CONVEYOR_FROM_RIGHT?new p(e,n,o,t.BaseAnimation.DIR_W,t.BaseAnimation.DIR_E,s):i==t.BlackBoxAnimationHandler.CONVEYOR_FROM_LEFT?new p(e,n,o,t.BaseAnimation.DIR_E,t.BaseAnimation.DIR_W,s):i==t.BlackBoxAnimationHandler.CUBE_TO_RIGHT?new t.CombinedAnimCube(e,n,o,t.BaseAnimation.AXIS_Y,t.BaseAnimation.ROT_DIR_CLOCKWISE,s):i==t.BlackBoxAnimationHandler.CUBE_TO_LEFT?new t.CombinedAnimCube(e,n,o,t.BaseAnimation.AXIS_Y,t.BaseAnimation.ROT_DIR_COUNTERCLOCKWISE,s):i==t.BlackBoxAnimationHandler.FLIP_RIGHT?new t.CombinedAnimFlip(e,n,o,t.BaseAnimation.AXIS_Y,t.BaseAnimation.ROT_DIR_CLOCKWISE,s):i==t.BlackBoxAnimationHandler.FLIP_LEFT?new t.CombinedAnimFlip(e,n,o,t.BaseAnimation.AXIS_Y,t.BaseAnimation.ROT_DIR_COUNTERCLOCKWISE,s):i==t.BlackBoxAnimationHandler.TRANSITION_TO_RIGHT?new g(e,n,o,r,t.BaseAnimation.DIR_SE,t.BaseAnimation.DIR_NW,.5,s):i==t.BlackBoxAnimationHandler.TRANSITION_TO_LEFT?new g(e,n,o,r,t.BaseAnimation.DIR_SW,t.BaseAnimation.DIR_NE,.5,s):i==t.BlackBoxAnimationHandler.SLIDE_TO_RIGHT?(t.BlackBoxAnimationHandler._offsetObjects(o,-r.w,0),new t.CombinedAnimMoveBy(e,n,o,new t.Point(r.w,0),new t.Point(r.w,0),s)):i==t.BlackBoxAnimationHandler.SLIDE_TO_LEFT?(t.BlackBoxAnimationHandler._offsetObjects(o,r.w,0),new t.CombinedAnimMoveBy(e,n,o,new t.Point(-r.w,0),new t.Point(-r.w,0),s)):i==t.BlackBoxAnimationHandler.ZOOM?new g(e,n,o,r,t.BaseAnimation.DIR_C,t.BaseAnimation.DIR_C,.5,s):null},t.BlackBoxAnimationHandler._offsetObjects=function(e,i,n){if(e.length)for(var o=0;o<e.length;o++)t.BlackBoxAnimationHandler._offsetObjects(e[o],i,n);else e&&e.setTranslate(e.getTranslateX()+i,e.getTranslateY()+n)},t.DataAnimationHandler=function(t,e){this.Init(t,e)},t.Obj.createSubclass(t.DataAnimationHandler,t.Obj),t.DataAnimationHandler._OVERLAP_RATIO=.4,t.DataAnimationHandler.prototype.Init=function(t,e){this._context=t,this._deleteContainer=e,this._playables=[]},t.DataAnimationHandler.prototype.getCtx=function(){return this._context},t.DataAnimationHandler.prototype.constructAnimation=function(t,e){if(e&&!this._context.isOffscreen()){if(e=e.slice(0),t)for(var i=0;i<t.length;i++){var n=t[i];if(n){for(var o=n.getId(),r=!1,s=0;s<e.length;s++){var a=e[s];if(a){var l=a.getId();if(o===l||o&&o.equals&&o.equals(l)){a.animateUpdate(this,n),e.splice(s,1),r=!0;break}}}r||n.animateDelete(this,this._deleteContainer)}}for(var h=0;h<e.length;h++)e[h]&&e[h].animateInsert(this)}},t.DataAnimationHandler.prototype.add=function(t,e){if(t){for(e||(e=0);this._playables.length<=e;)this._playables.push(new Array);this._playables[e].push(t)}},t.DataAnimationHandler.prototype.getAnimation=function(e){for(var i=[],n=0;n<this._playables.length;n++)if(this._playables[n].length>0){var o=new t.ParallelPlayable(this._context,this._playables[n]);i.push(o)}if(e){for(var r=[],s=0,a=0;a<i.length;a++){if(s>0){var l=new t.CustomAnimation(this._context,null,s);r.push(new t.SequentialPlayable(this._context,[l,i[a]]))}else r.push(i[a]);s+=(1-t.DataAnimationHandler._OVERLAP_RATIO)*i[a].getDuration()}return new t.ParallelPlayable(this._context,r)}return new t.SequentialPlayable(this._context,i)},t.DataAnimationHandler.prototype.getNumPlayables=function(){return this._playables.length},t.Easing=function(){this.Init()},t.Obj.createSubclass(t.Easing,t.Obj),t.Easing.linear=function(t){return t},t.Easing.quadraticIn=function(e){return t.Easing.PolyIn(e,2)},t.Easing.quadraticOut=function(e){return t.Easing.PolyOut(e,2)},t.Easing.quadraticInOut=function(e){return t.Easing.PolyInOut(e,2)},t.Easing.cubicIn=function(e){return t.Easing.PolyIn(e,3)},t.Easing.cubicOut=function(e){return t.Easing.PolyOut(e,3)},t.Easing.cubicInOut=function(e){return t.Easing.PolyInOut(e,3)},t.Easing.backOut=function(t,e){return e||(e=1.70158),1-(t=1-t)*t*((e+1)*t-e)},t.Easing.backIn=function(t,e){return e||(e=1.70158),t*t*((e+1)*t-e)},t.Easing.elasticIn=function(t,e,i){return t<=0||t>=1?t:(i||(i=.45),!e||e<1?(e=1,n=i/4):n=i/(2*Math.PI)*Math.asin(1/e),-e*Math.pow(2,10*(t-=1))*Math.sin((t-n)*(2*Math.PI)/i));var n},t.Easing.elasticOut=function(e,i,n){return 1-t.Easing.elasticIn(1-e,i,n)},t.Easing.PolyIn=function(t,e){return t<0?0:t>1?1:Math.pow(t,e)},t.Easing.PolyOut=function(t,e){return t<0?0:t>1?1:1-Math.pow(1-t,e)},t.Easing.PolyInOut=function(t,e){return t<0?0:t>1?1:t<.5?.5*Math.pow(2*t,e):.5*(2-Math.pow(2*(1-t),e))},t.Easing.prototype.Init=function(){};var r=function(){this.Init()};t.Obj.createSubclass(r,t.Obj),r.addInterpolator=function(t,e){r._map[t]=e},r.removeInterpolator=function(t){delete r._map[t]},r.interpolate=function(t,e,i,n,o){var s=r._getInterpolator(e);return s?s(t,i,n,o):n},r._getInterpolator=function(t){return r._map[t]},r.InterpolateNumber=function(e,i,n,o){return t.Math.interpolateNumber(i,n,o)},r.InterpolateNumberArray=function(t,e,i,n){for(var o=e.length,s=i.length,a=[],l=0;l<Math.max(o,s);l++){var h,u;h=l<o?e[l]:e[o-1],u=l<s?i[l]:i[s-1],a.push(r.InterpolateNumber(t,h,u,n))}return a},r.InterpolateMatrix=function(e,i,n,o){var s=r.InterpolateNumber(e,i.getA(),n.getA(),o),a=r.InterpolateNumber(e,i.getB(),n.getB(),o),l=r.InterpolateNumber(e,i.getC(),n.getC(),o),h=r.InterpolateNumber(e,i.getD(),n.getD(),o),u=r.InterpolateNumber(e,i.getTx(),n.getTx(),o),c=r.InterpolateNumber(e,i.getTy(),n.getTy(),o);return new t.Matrix(s,a,l,h,u,c)},r.InterpolateColor=function(e,i,n,o){return t.ColorUtils.interpolateColor(i,n,o)},r.InterpolateColorArray=function(t,e,i,n){for(var o=e.length,s=i.length,a=[],l=0;l<Math.max(o,s);l++){var h,u;h=l<o?e[l]:e[o-1],u=l<s?i[l]:i[s-1],a.push(r.InterpolateColor(t,h,u,n))}return a},r.InterpolateGrowPolyline=function(t,e,i,n){if(0===n)return[i[0],i[1]];if(1===n)return i;for(var o,s=i.length,a=[i[0],i[1]],l=n*r.CalcPolylineLength(i),h=0,u=2;u<s-1;u+=2){var c=i[u-2],p=i[u-1],_=i[u],g=i[u+1];if(h+(o=r.CalcPolylineLength([c,p,_,g]))>l){var d=(l-h)/o,S=_-c,f=g-p;a.push(c+d*S),a.push(p+d*f);break}h+=o,a.push(_),a.push(g)}return a},r.InterpolateGrowPath=function(t,e,i,n){if(0===n)return[i[0],i[1]];if(1===n)return i;for(var o,s,a,l,h,u,c,p,_,g=i.length,d=[],S=n*r.CalcPathLength(i),f=0,y=0;y<g;y++){var E,T=i[y];switch(T){case"M":E=[p=s=i[++y],_=a=i[++y],p,_];break;case"L":E=[p,_,s=i[++y],a=i[++y]];break;case"Q":l=i[++y],h=i[++y],E=[p,_,s=i[++y],a=i[++y]];break;case"C":l=i[++y],h=i[++y],u=i[++y],c=i[++y],E=[p,_,s=i[++y],a=i[++y]]}if(f+(o=r.CalcPolylineLength(E))>S){var v=(S-f)/o;switch(d.push(T),T){case"Q":d.push(p+v*(l-p),_+v*(h-_));break;case"C":d.push(p+v*(l-p),_+v*(h-_),p+v*(u-p),_+v*(c-_))}d.push(p+v*(s-p),_+v*(a-_));break}switch(f+=o,d.push(T),T){case"Q":d.push(l,h);break;case"C":d.push(l,h,u,c)}d.push(s),d.push(a),p=s,_=a}return d},r.CalcPolylineLength=function(t){for(var e,i,n,o,r=0,s=0;s<t.length;s+=2){if(n=t[s],o=t[s+1],s>0)if(n===e)r+=Math.abs(o-i);else if(o===i)r+=Math.abs(n-e);else{var a=Math.abs(n-e),l=Math.abs(o-i);r+=Math.sqrt(a*a+l*l)}e=n,i=o}return r},r.CalcPathLength=function(t){for(var e,i,n,o,r=0,s=0;s<t.length;){switch(t[s]){case"M":e=n=t[s+1],i=o=t[s+2],s+=3;continue;case"L":n=t[s+1],o=t[s+2],s+=3;break;case"Q":n=t[s+3],o=t[s+4],s+=5;break;case"C":n=t[s+5],o=t[s+6],s+=7}if(s>0)if(n===e)r+=Math.abs(o-i);else if(o===i)r+=Math.abs(n-e);else{var a=Math.abs(n-e),l=Math.abs(o-i);r+=Math.sqrt(a*a+l*l)}e=n,i=o}return r},r.InterpolateRectangle=function(e,i,n,o){var s=r.InterpolateNumber(e,i.x,n.x,o),a=r.InterpolateNumber(e,i.y,n.y,o),l=r.InterpolateNumber(e,i.w,n.w,o),h=r.InterpolateNumber(e,i.h,n.h,o);return new t.Rectangle(s,a,l,h)},r.InterpolatePoint=function(e,i,n,o){var s=r.InterpolateNumber(e,i.x,n.x,o),a=r.InterpolateNumber(e,i.y,n.y,o);return new t.Point(s,a)},r.InterpolatePath=function(t,e,i,n){var o=e.length,s=i.length;if(o!=s)return i;for(var a=[],l=0,h=0;l<o&&h<s;){var u=e[l],c=i[h],p=!isNaN(u),_=!isNaN(c);p||_?p&&_&&a.push(r.InterpolateNumber(t,u,c,n)):u===c&&a.push(u),l++,h++}return a},r.InterpolateFill=function(e,i,n,o){if(i instanceof t.SolidFill&&n instanceof t.SolidFill){var s=r.InterpolateColor(e,i.getColor(),n.getColor(),o),a=r.InterpolateNumber(e,i.getAlpha(),n.getAlpha(),o);return new t.SolidFill(s,a)}return n},r.InterpolateStroke=function(e,i,n,o){if(i instanceof t.SolidStroke&&n instanceof t.SolidStroke){var s=r.InterpolateColor(e,i.getColor(),n.getColor(),o),a=r.InterpolateNumber(e,i.getAlpha(),n.getAlpha(),o),l=r.InterpolateNumber(e,i.getWidth(),n.getWidth(),o),h=n.clone();return h.setColor(s),h.setAlpha(a),h.setWidth(l),h}return n},r.InterpolatePolyline=function(t,e,i,n){for(var o=e.length,s=i.length,a=[],l=0;l<Math.max(o,s);l++){var h,u,c=2;l%2==1&&(c=1),h=l<o?e[l]:e[o-c],u=l<s?i[l]:i[s-c],a.push(r.InterpolateNumber(t,h,u,n))}if(s<o){var p=a.length,_=a[p-2],g=a[p-1];for(l=p-4;l>=0;l-=2){var d=a[l],S=a[l+1];if(d!=_||S!=g)break;a.splice(l,2)}}return a},r.prototype.Init=function(){},r._map={},r._map[t.Animator.TYPE_NUMBER]=r.InterpolateNumber,r._map[t.Animator.TYPE_MATRIX]=r.InterpolateMatrix,r._map[t.Animator.TYPE_NUMBER_ARRAY]=r.InterpolateNumberArray,r._map[t.Animator.TYPE_COLOR]=r.InterpolateColor,r._map[t.Animator.TYPE_COLOR_ARRAY]=r.InterpolateColorArray,r._map[t.Animator.TYPE_GROW_POLYLINE]=r.InterpolateGrowPolyline,r._map[t.Animator.TYPE_RECTANGLE]=r.InterpolateRectangle,r._map[t.Animator.TYPE_POINT]=r.InterpolatePoint,r._map[t.Animator.TYPE_PATH]=r.InterpolatePath,r._map[t.Animator.TYPE_GROW_PATH]=r.InterpolateGrowPath,r._map[t.Animator.TYPE_FILL]=r.InterpolateFill,r._map[t.Animator.TYPE_STROKE]=r.InterpolateStroke,r._map[t.Animator.TYPE_POLYLINE]=r.InterpolatePolyline,t.Timer=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.Timer,t.Obj),t.Timer.prototype.Init=function(t,e,i,n,o){this._interval=e,this._callback=i,this._callbackObj=n,this._repeatCount=o,this._bRunning=!1,this._numIterations=0},t.Timer.prototype.start=function(){this._bRunning||(this._bRunning=!0,this.StartTimer())},t.Timer.prototype.stop=function(){this._bRunning&&(this._bRunning=!1,this.StopTimer())},t.Timer.prototype.reset=function(){this._bRunning&&this.stop(),this._numIterations=0},t.Timer.prototype.isRunning=function(){return this._bRunning},t.Timer.prototype.HandleTimer=function(){this._callback&&(this._callback.call(this._callbackObj),this._repeatCount&&(this._numIterations++,this._numIterations>=this._repeatCount&&this.stop()))},t.Timer.prototype.setInterval=function(t){var e=t;e<0&&(e=0);var i=this._bRunning;i&&this.stop(),this._interval=e,i&&this.start()},t.Timer.prototype.getInterval=function(){return this._interval},t.Timer.prototype.StartTimer=function(){var t=this,e=this.HandleTimer;this._timerId=window.setInterval(function(){e.call(t)},this.getInterval())},t.Timer.prototype.StopTimer=function(){this._timerId&&(window.clearInterval(this._timerId),this._timerId=null)},t.BaseAnimation=function(t,e,i,n){this.Init(t,e,i,n)},t.Obj.createSubclass(t.BaseAnimation,t.Playable),t.BaseAnimation.EASING_LINEAR=1,t.BaseAnimation.EASING_CUBIC_IN_OUT=2,t.BaseAnimation.EASING_CUBIC_IN=3,t.BaseAnimation.EASING_CUBIC_OUT=4,t.BaseAnimation.EASING_QUADRATIC_IN_OUT=5,t.BaseAnimation.EASING_QUADRATIC_IN=6,t.BaseAnimation.EASING_QUADRATIC_OUT=7,t.BaseAnimation.EASING_BOUNCE_IN=8,t.BaseAnimation.EASING_BOUNCE_OUT=9,t.BaseAnimation.EASING_ELASTIC_IN=10,t.BaseAnimation.EASING_ELASTIC_OUT=11,t.BaseAnimation.DIR_C=1,t.BaseAnimation.DIR_N=2,t.BaseAnimation.DIR_NE=3,t.BaseAnimation.DIR_E=4,t.BaseAnimation.DIR_SE=5,t.BaseAnimation.DIR_S=6,t.BaseAnimation.DIR_SW=7,t.BaseAnimation.DIR_W=8,t.BaseAnimation.DIR_NW=9,t.BaseAnimation.AXIS_X=1,t.BaseAnimation.AXIS_Y=2,t.BaseAnimation.ROT_DIR_CLOCKWISE=1,t.BaseAnimation.ROT_DIR_COUNTERCLOCKWISE=2,t.BaseAnimation.GetEasingFunction=function(e){switch(e){case t.BaseAnimation.EASING_LINEAR:return t.Easing.linear;case t.BaseAnimation.EASING_CUBIC_IN:return t.Easing.cubicIn;case t.BaseAnimation.EASING_CUBIC_OUT:return t.Easing.cubicOut;case t.BaseAnimation.EASING_QUADRATIC_IN_OUT:return t.Easing.quadraticInOut;case t.BaseAnimation.EASING_QUADRATIC_IN:return t.Easing.quadraticIn;case t.BaseAnimation.EASING_QUADRATIC_OUT:return t.Easing.quadraticOut;case t.BaseAnimation.EASING_BOUNCE_IN:return t.Easing.backIn;case t.BaseAnimation.EASING_BOUNCE_OUT:return t.Easing.backOut;case t.BaseAnimation.EASING_ELASTIC_IN:return t.Easing.elasticIn;case t.BaseAnimation.EASING_ELASTIC_OUT:return t.Easing.elasticOut;case t.BaseAnimation.EASING_CUBIC_IN_OUT:default:return t.Easing.cubicInOut}},t.BaseAnimation.GetCompassPoint=function(e,i){switch(i){case t.BaseAnimation.DIR_N:return new t.Point(e.x+.5*e.w,e.y);case t.BaseAnimation.DIR_NE:return new t.Point(e.x+e.w,e.y);case t.BaseAnimation.DIR_E:return new t.Point(e.x+e.w,e.y+.5*e.h);case t.BaseAnimation.DIR_SE:return new t.Point(e.x+e.w,e.y+e.h);case t.BaseAnimation.DIR_S:return new t.Point(e.x+.5*e.w,e.y+e.h);case t.BaseAnimation.DIR_SW:return new t.Point(e.x,e.y+e.h);case t.BaseAnimation.DIR_W:return new t.Point(e.x,e.y+.5*e.h);case t.BaseAnimation.DIR_NW:return new t.Point(e.x,e.y);case t.BaseAnimation.DIR_C:default:return new t.Point(e.x+.5*e.w,e.y+.5*e.h)}},t.BaseAnimation.GetAlignCompassPoint=function(e,i,n){var o=t.BaseAnimation.GetCompassPoint(i,n);switch(n){case t.BaseAnimation.DIR_N:return new t.Point(o.x-.5*e.w,o.y);case t.BaseAnimation.DIR_NE:return new t.Point(o.x-e.w,o.y);case t.BaseAnimation.DIR_E:return new t.Point(o.x-e.w,o.y-.5*e.h);case t.BaseAnimation.DIR_SE:return new t.Point(o.x-e.w,o.y-e.h);case t.BaseAnimation.DIR_S:return new t.Point(o.x-.5*e.w,o.y-e.h);case t.BaseAnimation.DIR_SW:return new t.Point(o.x,o.y-e.h);case t.BaseAnimation.DIR_W:return new t.Point(o.x,o.y-.5*e.h);case t.BaseAnimation.DIR_NW:return new t.Point(o.x,o.y);case t.BaseAnimation.DIR_C:default:return new t.Point(o.x-.5*e.w,o.y-.5*e.h)}},t.BaseAnimation.prototype.Init=function(e,i,n,o){t.BaseAnimation.superclass.Init.call(this,e),this._context=e,i instanceof Array?this._arObjects=i:this._arObjects=[i],this._duration=n||.5,this._delay=o||0,this._easing=t.BaseAnimation.EASING_CUBIC_IN_OUT,this._bInitialized=!1,this._bSaveAndRestoreOriginalMatrices=!1,this._origMatrixArray=null,this._bHideObjectsOnEnd=!1,this.CreateAnimator(e)},t.BaseAnimation.prototype.GetContext=function(){return this._context},t.BaseAnimation.prototype.isRunning=function(){return!!this._animator&&this._animator.isRunning()},t.BaseAnimation.prototype.initialize=function(){this._bInitialized||(this._initializeEndStates(this._arObjects),this._initializeStartStates(this._arObjects),this.InitializePlay(),this._bInitialized=!0)},t.BaseAnimation.prototype.play=function(t){this.initialize(),this._animator&&this._animator.play(t)},t.BaseAnimation.prototype.stop=function(t){this._animator&&this._animator.stop(t)},t.BaseAnimation.prototype.getDuration=function(){return this._duration},t.BaseAnimation.prototype.setDuration=function(t){this._duration=t||0,this._animator&&this._animator.setDuration(this._duration)},t.BaseAnimation.prototype.getDelay=function(){return this._delay},t.BaseAnimation.prototype.setDelay=function(t){this._delay=t||0,this._animator&&this._animator.setDelay(this._delay)},t.BaseAnimation.prototype.getEasing=function(){return this._easing},t.BaseAnimation.prototype.setEasing=function(e){this._easing=e,this._animator&&this._animator.setEasing(t.BaseAnimation.GetEasingFunction(this._easing))},t.BaseAnimation.prototype.CreateAnimator=function(e){this._animator=new t.Animator(e,this._duration,this._delay,t.BaseAnimation.GetEasingFunction(this._easing)),this._animator.setOnEnd(this.OnAnimEnd,this)},t.BaseAnimation.prototype.OnAnimEnd=function(){this._bHideObjectsOnEnd&&this.HideObjects(),this._bSaveAndRestoreOriginalMatrices&&this.RestoreOriginalMatrices(),this._onEnd&&this._onEnd.call(this._onEndObj)},t.BaseAnimation.prototype.InitializePlay=function(){},t.BaseAnimation.prototype._initializeStartStates=function(t){if(t)for(var e,i=0;i<t.length;i++)(e=t[i])&&(this._bSaveAndRestoreOriginalMatrices&&(this._origMatrixArray||(this._origMatrixArray=[]),this._origMatrixArray.push(e.getMatrix())),this.InitStartState(e))},t.BaseAnimation.prototype._initializeEndStates=function(t){if(t)for(var e,i=0;i<t.length;i++)(e=t[i])&&this.InitEndState(e)},t.BaseAnimation.prototype.InitStartState=function(t){},t.BaseAnimation.prototype.InitEndState=function(t){},t.BaseAnimation.prototype.ShowObjects=function(){this.SetObjectsVisible(!0)},t.BaseAnimation.prototype.HideObjects=function(){this.SetObjectsVisible(!1)},t.BaseAnimation.prototype.SetObjectsVisible=function(t){if(this._arObjects)for(var e,i=this._arObjects.length-1;i>=0;i--)(e=this._arObjects[i])&&e.setVisible(t)},t.BaseAnimation.prototype.RestoreOriginalMatrices=function(){if(this._arObjects)for(var t,e=this._arObjects.length-1;e>=0;e--)(t=this._arObjects[e])&&this._origMatrixArray&&t.setMatrix(this._origMatrixArray.pop())},t.CustomAnimation=function(t,e,i,n){this.Init(t,e,i,n)},t.Obj.createSubclass(t.CustomAnimation,t.BaseAnimation),t.CustomAnimation.prototype.getAnimator=function(){return this._animator};var s=function(t,e,i,n,o){this.Init(t,e,i,n,o)};t.Obj.createSubclass(s,t.BaseAnimation),s.prototype.Init=function(t,e,i,n,o){s.superclass.Init.call(this,t,e,n,o),this._direction=i,this._SCALE=.2,this._SKEW_ANGLE=Math.PI/12,this._bSaveAndRestoreOriginalMatrices=!0},s.prototype.CreateAnimator=function(e){s.superclass.CreateAnimator.call(this,e),this.setEasing(t.BaseAnimation.EASING_CUBIC_IN),this._animator.setDuration(this.getDuration()/2),this._animator.setOnEnd(this.PlayEndAnim,this),this._endAnim=new t.Animator(e,this.getDuration()/2,0,t.BaseAnimation.GetEasingFunction(t.BaseAnimation.EASING_CUBIC_OUT)),this._endAnim.setOnEnd(this.OnAnimEnd,this)},s.prototype.InitializePlay=function(){s.superclass.InitializePlay.call(this),this.ShowObjects()},s.prototype.InitStartState=function(e){s.superclass.InitStartState.call(this,e),e.setVisible(!1);var i=1-this._SCALE,n=e.getDimensions(),o=(n.w,n.h,this.GetConcatenatedRotationMatrix(e,n)),r=new t.Matrix;this._direction===t.BaseAnimation.DIR_W||this._direction===t.BaseAnimation.DIR_E?this._direction===t.BaseAnimation.DIR_W?r.translate(n.w,0):r.translate(-n.w,0):this._direction===t.BaseAnimation.DIR_N?r.translate(0,n.h):r.translate(0,-n.h),r.concat(o),e.setMatrix(r),e.setAlpha(0)},s.prototype.InitEndState=function(e){s.superclass.InitEndState.call(this,e);var i=e.getDimensions(),n=this.GetConcatenatedRotationMatrix(e,i);this._animator.addProp(t.Animator.TYPE_MATRIX,e,e.getMatrix,e.setMatrix,n),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,1);var o=e.getMatrix();this._endAnim.addProp(t.Animator.TYPE_MATRIX,e,e.getMatrix,e.setMatrix,o)},s.prototype.PlayEndAnim=function(){this._endAnim.play(!0)},s.prototype.GetConcatenatedRotationMatrix=function(e,i){var n=this._SCALE,o=1-n,r=i.w*o,s=i.h*o,a=this._SKEW_ANGLE;this._direction!==t.BaseAnimation.DIR_W&&this._direction!==t.BaseAnimation.DIR_S||(a=-a);var l=Math.tan(a),h=e.getMatrix(),u=new t.Matrix;return this._direction===t.BaseAnimation.DIR_W||this._direction===t.BaseAnimation.DIR_E?(u.skew(0,a),u.scale(n,1),this._direction===t.BaseAnimation.DIR_W?u.translate(0,0):u.translate(r,-i.w*l)):(u.skew(a,0),u.scale(1,n),this._direction===t.BaseAnimation.DIR_N?u.translate(0,0):u.translate(-i.h*l,s)),u.concat(h),u};var a=function(t,e,i,n,o){this.Init(t,e,i,n,o)};t.Obj.createSubclass(a,t.BaseAnimation),a.prototype.Init=function(t,e,i,n,o){a.superclass.Init.call(this,t,e,n,o),this._direction=i,this._bSaveAndRestoreOriginalMatrices=!0,this._bHideObjectsOnEnd=!0},a.prototype.CreateAnimator=function(e){a.superclass.CreateAnimator.call(this,e),this.setEasing(t.BaseAnimation.EASING_CUBIC_IN),this._animator.setDuration(this.getDuration()/2),this._animator.setOnEnd(this.PlayEndAnim,this),this._endAnim=new t.Animator(e,this.getDuration()/2,0,t.BaseAnimation.GetEasingFunction(t.BaseAnimation.EASING_CUBIC_OUT)),this._endAnim.setOnEnd(this.OnAnimEnd,this)},a.prototype.InitEndState=function(e){a.superclass.InitEndState.call(this,e);var i=e.getDimensions(),n=.8*i.w,o=.8*i.h,r=Math.PI/12;this._direction!==t.BaseAnimation.DIR_W&&this._direction!==t.BaseAnimation.DIR_S||(r=-r);var s=Math.tan(r),l=e.getMatrix(),h=new t.Matrix;this._direction===t.BaseAnimation.DIR_W||this._direction===t.BaseAnimation.DIR_E?(h.skew(0,r),h.scale(.2,1),this._direction===t.BaseAnimation.DIR_W?h.translate(0,0):h.translate(n,-i.w*s)):(h.skew(r,0),h.scale(1,.2),this._direction===t.BaseAnimation.DIR_N?h.translate(0,0):h.translate(-i.h*s,o)),h.concat(l),this._animator.addProp(t.Animator.TYPE_MATRIX,e,e.getMatrix,e.setMatrix,h);var u=new t.Matrix;this._direction===t.BaseAnimation.DIR_W||this._direction===t.BaseAnimation.DIR_E?this._direction===t.BaseAnimation.DIR_W?u.translate(i.w,0):u.translate(-i.w,0):this._direction===t.BaseAnimation.DIR_N?u.translate(0,i.h):u.translate(0,-i.h),u.concat(h),this._endAnim.addProp(t.Animator.TYPE_MATRIX,e,e.getMatrix,e.setMatrix,u),this._endAnim.addProp(t.Animator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,0)},a.prototype.PlayEndAnim=function(){this._endAnim.play(!0)};var l=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)};t.Obj.createSubclass(l,t.BaseAnimation),l.prototype.Init=function(t,e,i,n,o,r){l.superclass.Init.call(this,t,e,o,r),this._axis=i,this._rotationDir=n,this._bSaveAndRestoreOriginalMatrices=!0,this._cubeEffect=!1},l.prototype.InitStartState=function(e){l.superclass.InitStartState.call(this,e),e.setVisible(!1);var i=e.getDimensions(),n=i.w/2,o=i.h/2,r=Math.PI/6;this._rotationDir===t.BaseAnimation.ROT_DIR_COUNTERCLOCKWISE&&(r=-r);var s=Math.tan(r),a=e.getMatrix(),h=new t.Matrix;this._axis===t.BaseAnimation.AXIS_Y?(h.skew(0,r),h.scale(0,1),this._cubeEffect?this._rotationDir===t.BaseAnimation.ROT_DIR_COUNTERCLOCKWISE?h.translate(i.w,0):h.translate(0,-i.w*s):h.translate(n,-n*s)):(h.skew(r,0),h.scale(1,0),this._cubeEffect?this._rotationDir===t.BaseAnimation.ROT_DIR_COUNTERCLOCKWISE?h.translate(-i.h*s,0):h.translate(0,i.h):h.translate(-o*s,o)),h.concat(a),e.setMatrix(h),this._cubeEffect&&e.setAlpha(0)},l.prototype.InitEndState=function(e){l.superclass.InitEndState.call(this,e);var i=e.getMatrix();this._animator.addProp(t.Animator.TYPE_MATRIX,e,e.getMatrix,e.setMatrix,i),this._cubeEffect&&this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,1)},l.prototype.InitializePlay=function(){l.superclass.InitializePlay.call(this),this.ShowObjects()};var h=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)};t.Obj.createSubclass(h,t.BaseAnimation),h.prototype.Init=function(t,e,i,n,o,r){h.superclass.Init.call(this,t,e,o,r),this._axis=i,this._rotationDir=n,this._bSaveAndRestoreOriginalMatrices=!0,this._bHideObjectsOnEnd=!0,this._cubeEffect=!1},h.prototype.InitEndState=function(e){h.superclass.InitEndState.call(this,e);var i=e.getDimensions(),n=i.w/2,o=i.h/2,r=Math.PI/6;this._rotationDir===t.BaseAnimation.ROT_DIR_CLOCKWISE&&(r=-r);var s=Math.tan(r),a=e.getMatrix(),l=new t.Matrix;this._axis===t.BaseAnimation.AXIS_Y?(l.skew(0,r),l.scale(0,1),this._cubeEffect?this._rotationDir===t.BaseAnimation.ROT_DIR_CLOCKWISE?l.translate(i.w,0):l.translate(0,-i.w*s):l.translate(n,-n*s)):(l.skew(r,0),l.scale(1,0),this._cubeEffect?this._rotationDir===t.BaseAnimation.ROT_DIR_CLOCKWISE?l.translate(-i.h*s,0):l.translate(0,i.h):l.translate(-o*s,o)),l.concat(a),this._animator.addProp(t.Animator.TYPE_MATRIX,e,e.getMatrix,e.setMatrix,l),this._cubeEffect&&this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,0)};var u=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)};t.Obj.createSubclass(u,l),u.prototype.Init=function(t,e,i,n,o,r){u.superclass.Init.call(this,t,e,i,n,o,r),this._cubeEffect=!0};var c=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)};t.Obj.createSubclass(c,h),c.prototype.Init=function(t,e,i,n,o,r){c.superclass.Init.call(this,t,e,i,n,o,r),this._cubeEffect=!0},t.AnimFadeIn=function(t,e,i,n){this.Init(t,e,i,n)},t.Obj.createSubclass(t.AnimFadeIn,t.BaseAnimation),t.AnimFadeIn.prototype.Init=function(e,i,n,o){t.AnimFadeIn.superclass.Init.call(this,e,i,n,o)},t.AnimFadeIn.prototype.InitStartState=function(t){t.setAlpha(0)},t.AnimFadeIn.prototype.InitEndState=function(e){this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,1)},t.AnimFadeOut=function(t,e,i,n){this.Init(t,e,i,n)},t.Obj.createSubclass(t.AnimFadeOut,t.BaseAnimation),t.AnimFadeOut.prototype.Init=function(e,i,n,o){t.AnimFadeOut.superclass.Init.call(this,e,i,n,o)},t.AnimFadeOut.prototype.InitEndState=function(e){this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getAlpha,e.setAlpha,0)},t.AnimMoveBy=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.AnimMoveBy,t.BaseAnimation),t.AnimMoveBy.prototype.Init=function(e,i,n,o,r){n instanceof Array?this._arOffsets=n:n instanceof t.Point?this._arOffsets=[n]:this._arOffsets=[new t.Point(0,0)],this._currIndex=0,t.AnimMoveBy.superclass.Init.call(this,e,i,o,r)},t.AnimMoveBy.prototype.InitEndState=function(e){var i;i=this._currIndex<this._arOffsets.length?this._arOffsets[this._currIndex]:this._arOffsets[this._arOffsets.length-1],this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getTranslateX,e.setTranslateX,e.getTranslateX()+i.x),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getTranslateY,e.setTranslateY,e.getTranslateY()+i.y),this._currIndex++},t.AnimMoveTo=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.AnimMoveTo,t.BaseAnimation),t.AnimMoveTo.prototype.Init=function(e,i,n,o,r){n instanceof Array?this._arPoints=n:n instanceof t.Point?this._arPoints=[n]:this._arPoints=[new t.Point(0,0)],this._currIndex=0,t.AnimMoveTo.superclass.Init.call(this,e,i,o,r)},t.AnimMoveTo.prototype.InitEndState=function(e){var i;i=this._currIndex<this._arPoints.length?this._arPoints[this._currIndex]:this._arPoints[this._arPoints.length-1],this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getTranslateX,e.setTranslateX,i.x),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getTranslateY,e.setTranslateY,i.y),this._currIndex++},t.AnimScaleBy=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.AnimScaleBy,t.BaseAnimation),t.AnimScaleBy.prototype.Init=function(e,i,n,o,r){n instanceof Array?this._arScales=n:n instanceof t.Point?this._arScales=[n]:this._arScales=[new t.Point(1,1)],this._currIndex=0,t.AnimScaleBy.superclass.Init.call(this,e,i,o,r)},t.AnimScaleBy.prototype.InitEndState=function(e){var i;i=this._currIndex<this._arScales.length?this._arScales[this._currIndex]:this._arScales[this._arScales.length-1],this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleX,e.setScaleX,e.getScaleX()*i.x),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleY,e.setScaleY,e.getScaleY()*i.y),this._currIndex++},t.AnimScaleFadeIn=function(t,e,i,n,o,r,s){this.Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.AnimScaleFadeIn,t.AnimFadeIn),t.AnimScaleFadeIn.prototype.Init=function(e,i,n,o,r,s,a){this._boundsRect=n,this._direction=o||t.BaseAnimation.DIR_NW,this._minScale=r||.5,t.AnimScaleFadeIn.superclass.Init.call(this,e,i,s,a),this._bSaveAndRestoreOriginalMatrices=!0},t.AnimScaleFadeIn.prototype.InitStartState=function(e){t.AnimScaleFadeIn.superclass.InitStartState.call(this,e);var i=this._minScale*e.getScaleX(),n=this._minScale*e.getScaleY(),o=e.getDimensions(),r=new t.Rectangle(0,0,i*o.w,n*o.h),s=t.BaseAnimation.GetAlignCompassPoint(r,this._boundsRect,this._direction);e.setTranslate(s.x,s.y),e.setScale(i,n)},t.AnimScaleFadeIn.prototype.InitEndState=function(e){t.AnimScaleFadeIn.superclass.InitEndState.call(this,e);var i=e.getMatrix();this._animator.addProp(t.Animator.TYPE_MATRIX,e,e.getMatrix,e.setMatrix,i)},t.AnimScaleFadeOut=function(t,e,i,n,o,r,s){this.Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.AnimScaleFadeOut,t.AnimFadeOut),t.AnimScaleFadeOut.prototype.Init=function(e,i,n,o,r,s,a){this._boundsRect=n,this._direction=o||t.BaseAnimation.DIR_NE,this._minScale=r||.5,t.AnimScaleFadeOut.superclass.Init.call(this,e,i,s,a),this._bSaveAndRestoreOriginalMatrices=!0},t.AnimScaleFadeOut.prototype.InitEndState=function(e){t.AnimScaleFadeOut.superclass.InitEndState.call(this,e);var i=this._minScale*e.getScaleX(),n=this._minScale*e.getScaleY(),o=e.getDimensions(),r=new t.Rectangle(0,0,i*o.w,n*o.h),s=t.BaseAnimation.GetAlignCompassPoint(r,this._boundsRect,this._direction);this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleX,e.setScaleX,i),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleY,e.setScaleY,n),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getTranslateX,e.setTranslateX,s.x),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getTranslateY,e.setTranslateY,s.y)},t.AnimScaleTo=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.AnimScaleTo,t.BaseAnimation),t.AnimScaleTo.prototype.Init=function(e,i,n,o,r){n instanceof Array?this._arScales=n:n instanceof t.Point?this._arScales=[n]:this._arScales=[new t.Point(1,1)],this._currIndex=0,t.AnimScaleTo.superclass.Init.call(this,e,i,o,r)},t.AnimScaleTo.prototype.InitEndState=function(e){var i;i=this._currIndex<this._arScales.length?this._arScales[this._currIndex]:this._arScales[this._arScales.length-1],this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleX,e.setScaleX,i.x),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleY,e.setScaleY,i.y),this._currIndex++},t.AnimPopIn=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.AnimPopIn,t.BaseAnimation),t.AnimPopIn.BackOut=function(e){return t.Easing.backOut(e,2.5)},t.AnimPopIn.prototype.Init=function(e,i,n,o,r){this._bCenter=n,this._bCenter&&(this._tempContainers=[],this._currIndex=0),t.AnimPopIn.superclass.Init.call(this,e,i,o,r)},t.AnimPopIn.prototype.setEasing=function(t){},t.AnimPopIn.prototype.CreateAnimator=function(e){t.AnimPopIn.superclass.CreateAnimator.call(this,e),this._animator.setEasing(t.AnimPopIn.BackOut),this._bCenter&&t.Playable.appendOnEnd(this._animator,this.RemoveTempContainers,this)},t.AnimPopIn.prototype.InitStartState=function(t){if(this._bCenter){var e=this._tempContainers[this._currIndex],i=t.getDimensions();e._dvtAnimPopInOrigTx=t.getTranslateX(),e._dvtAnimPopInOrigTy=t.getTranslateY();var n=i.x+.5*i.w,o=i.y+.5*i.h;e.setTranslate(e._dvtAnimPopInOrigTx+n,e._dvtAnimPopInOrigTy+o),t.setTranslate(-n,-o);var r=t.getParent().getChildIndex(t);e._dvtAnimPopInChildIndex=r,t.getParent().addChildAt(e,r),e.addChild(t),e.setScale(.01,.01),this._currIndex++}else t.setScale(.01,.01);t.setVisible(!0)},t.AnimPopIn.prototype.InitEndState=function(e){if(this._bCenter){var i=new t.Container(this._context);this._tempContainers.push(i),this._animator.addProp(t.Animator.TYPE_NUMBER,i,i.getScaleX,i.setScaleX,1),this._animator.addProp(t.Animator.TYPE_NUMBER,i,i.getScaleY,i.setScaleY,1)}else this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleX,e.setScaleX,1),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleY,e.setScaleY,1)},t.AnimPopIn.prototype.RemoveTempContainers=function(){if(this._tempContainers){for(var t=0;t<this._tempContainers.length;t++){var e=this._tempContainers[t];if(this._tempContainers[t]=null,e.getNumChildren()>0){var i=e.getChildAt(0);i&&(i.setTranslate(e._dvtAnimPopInOrigTx,e._dvtAnimPopInOrigTy),e.getParent().addChildAt(i,e._dvtAnimPopInChildIndex))}e.getParent().removeChild(e)}this._tempContainers=null}},t.AnimPopOut=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.AnimPopOut,t.BaseAnimation),t.AnimPopOut.BackIn=function(e){return t.Easing.backIn(e,2.5)},t.AnimPopOut.prototype.Init=function(e,i,n,o,r){this._bCenter=n,this._bCenter&&(this._tempContainers=[],this._currIndex=0),t.AnimPopOut.superclass.Init.call(this,e,i,o,r),this._bSaveAndRestoreOriginalMatrices=!this._bCenter,this._bHideObjectsOnEnd=!0},t.AnimPopOut.prototype.setEasing=function(t){},t.AnimPopOut.prototype.CreateAnimator=function(e){t.AnimPopOut.superclass.CreateAnimator.call(this,e),this._animator.setEasing(t.AnimPopOut.BackIn),this._bCenter&&t.Playable.appendOnEnd(this._animator,this.RemoveTempContainers,this)},t.AnimPopOut.prototype.InitStartState=function(t){if(this._bCenter){var e=this._tempContainers[this._currIndex],i=t.getDimensions();e._dvtAnimPopInOrigTx=t.getTranslateX(),e._dvtAnimPopInOrigTy=t.getTranslateY();var n=i.x+.5*i.w,o=i.y+.5*i.h;e.setTranslate(e._dvtAnimPopInOrigTx+n,e._dvtAnimPopInOrigTy+o),t.setTranslate(-n,-o);var r=t.getParent().getChildIndex(t);e._dvtAnimPopInChildIndex=r,t.getParent().addChildAt(e,r),e.addChild(t),this._currIndex++}},t.AnimPopOut.prototype.InitEndState=function(e){if(this._bCenter){var i=new t.Container(this._context);this._tempContainers.push(i),this._animator.addProp(t.Animator.TYPE_NUMBER,i,i.getScaleX,i.setScaleX,.01),this._animator.addProp(t.Animator.TYPE_NUMBER,i,i.getScaleY,i.setScaleY,.01)}else this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleX,e.setScaleX,.01),this._animator.addProp(t.Animator.TYPE_NUMBER,e,e.getScaleY,e.setScaleY,.01)},t.AnimPopOut.prototype.RemoveTempContainers=function(){if(this._tempContainers){for(var t=0;t<this._tempContainers.length;t++){var e=this._tempContainers[t];if(this._tempContainers[t]=null,e.getNumChildren()>0){var i=e.getChildAt(0);i&&(i.setTranslate(e._dvtAnimPopInOrigTx,e._dvtAnimPopInOrigTy),e.getParent().addChildAt(i,e._dvtAnimPopInChildIndex))}e.getParent().removeChild(e)}this._tempContainers=null}};var p=function(t,e,i,n,o,r,s){this.Init(t,e,i,n,o,r,s)};t.Obj.createSubclass(p,t.ParallelPlayable),p.prototype.Init=function(t,e,i,n,o,r,l){r||(r=.5),l||(l=0);var h=new a(t,e,n,r,l),u=new s(t,i,o,r,r/3+l);p.superclass.Init.call(this,t,[h,u])},t.CombinedAnimCube=function(t,e,i,n,o,r,s){this.Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.CombinedAnimCube,t.ParallelPlayable),t.CombinedAnimCube.prototype.Init=function(e,i,n,o,r,s,a){s||(s=.5),a||(a=0);var l=new c(e,i,o,r,s,a),h=new u(e,n,o,r,s,a);t.CombinedAnimCube.superclass.Init.call(this,e,[l,h])};var _=function(t,e,i,n,o){this.Init(t,e,i,n,o)};t.Obj.createSubclass(_,t.ParallelPlayable),_.prototype.Init=function(e,i,n,o,r){o||(o=.5),r||(r=0);var s=new t.AnimFadeOut(e,i,o,r),a=new t.AnimFadeIn(e,n,o,.5*s.getDuration()+r);_.superclass.Init.call(this,e,[s,a])},t.CombinedAnimFlip=function(t,e,i,n,o,r,s){this.Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.CombinedAnimFlip,t.SequentialPlayable),t.CombinedAnimFlip.prototype.Init=function(e,i,n,o,r,s,a){s||(s=.5),a||(a=0);var u=new h(e,i,o,r,s,a);u.setEasing(t.BaseAnimation.EASING_CUBIC_IN);var c=new l(e,n,o,r,s,a);c.setEasing(t.BaseAnimation.EASING_CUBIC_OUT),c.HideObjects(),t.CombinedAnimFlip.superclass.Init.call(this,e,[u,c])},t.CombinedAnimMoveBy=function(t,e,i,n,o,r,s){this.Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.CombinedAnimMoveBy,t.ParallelPlayable),t.CombinedAnimMoveBy.prototype.Init=function(e,i,n,o,r,s,a){s||(s=.5),a||(a=0);var l=new t.AnimMoveBy(e,i,o,s,a),h=new t.AnimMoveBy(e,n,r,s,a);t.CombinedAnimMoveBy.superclass.Init.call(this,e,[l,h])};var g=function(t,e,i,n,o,r,s,a,l){this.Init(t,e,i,n,o,r,s,a,l)};t.Obj.createSubclass(g,t.ParallelPlayable),g.prototype.Init=function(e,i,n,o,r,s,a,l,h){r||(r=t.BaseAnimation.DIR_NE),s||(s=t.BaseAnimation.DIR_NW),a||(a=.5),l||(l=.5),h||(h=0);var u=new t.AnimScaleFadeOut(e,i,o,r,a,l,h),c=new t.AnimScaleFadeIn(e,n,o,s,a,l,.3*u.getDuration()+h);g.superclass.Init.call(this,e,[u,c])},t.CombinedAnimPopIn=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)},t.Obj.createSubclass(t.CombinedAnimPopIn,t.ParallelPlayable),t.CombinedAnimPopIn.prototype.Init=function(e,i,n,o,r,s){var a,l=[];a=i instanceof Array?i:[i],s=null===s||isNaN(s)?0:s;for(var h=0;h<a.length;h++){var u=a[h],c=s+Math.random()*(r-o),p=new t.AnimPopIn(e,u,n,o,c);l.push(p)}t.CombinedAnimPopIn.superclass.Init.call(this,e,l)};var d=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)};t.Obj.createSubclass(d,t.ParallelPlayable),d.prototype.Init=function(e,i,n,o,r,s){var a,l=[];a=i instanceof Array?i:[i],s=null===s||isNaN(s)?0:s;for(var h=0;h<a.length;h++){var u=a[h],c=s+Math.random()*(r-o),p=new t.AnimPopOut(e,u,n,o,c);l.push(p)}d.superclass.Init.call(this,e,l)};var S=function(){this._Init()};t.Obj.createSubclass(S,e),S.prototype._Init=function(){S.superclass._Init.call(this)},S.prototype.getId=function(){return this._id},S.prototype.setId=function(t){this._id=t},S.prototype.mergeProps=function(t){t.setId(this._id)},t.ColorUtils={},t.Obj.createSubclass(t.ColorUtils,t.Obj),t.ColorUtils._RED=0,t.ColorUtils._GREEN=1,t.ColorUtils._BLUE=2,t.ColorUtils._ALPHA=3,t.ColorUtils._RGBA="rgba(",t.ColorUtils._RGB="rgb(",t.ColorUtils._POUND="#",t.ColorUtils._FACTOR=.15,t.ColorUtils._names,t.ColorUtils._CONTRASTING_TEXT_COLOR_CACHE={},t.ColorUtils.getColorFromName=function(e){if(!t.ColorUtils._names){var i=[];i.aliceblue="#f0f8ff",i.antiquewhite="#faEbd7",i.aqua="#00ffff",i.aquamarine="#7fffd4",i.azure="#f0ffff",i.beige="#f5f5dc",i.bisque="#ffE4c4",i.black="#000000",i.blanchedalmond="#ffEbcd",i.blue="#0000ff",i.blueviolet="#8a2bE2",i.brown="#a52a2a",i.burlywood="#dEb887",i.cadetblue="#5f9Ea0",i.chartreuse="#7fff00",i.chocolate="#d2691E",i.coral="#ff7f50",i.cornflowerblue="#6495Ed",i.cornsilk="#fff8dc",i.crimson="#dc143c",i.cyan="#00ffff",i.darkblue="#00008b",i.darkcyan="#008b8b",i.darkgoldenrod="#b8860b",i.darkgray="#a9a9a9",i.darkgreen="#006400",i.darkkhaki="#bdb76b",i.darkmagenta="#8b008b",i.darkolivegreen="#556b2f",i.darkorange="#ff8c00",i.darkorchid="#9932cc",i.darkred="#8b0000",i.darksalmon="#E9967a",i.darkseagreen="#8fbc8f",i.darkslateblue="#483d8b",i.darkslategray="#2f4f4f",i.darkturquoise="#00cEd1",i.darkviolet="#9400d3",i.deeppink="#ff1493",i.deepskyblue="#00bfff",i.dimgray="#696969",i.dodgerblue="#1E90ff",i.firebrick="#b22222",i.floralwhite="#fffaf0",i.forestgreen="#228b22",i.fuchsia="#ff00ff",i.gainsboro="#dcdcdc",i.ghostwhite="#f8f8ff",i.gold="#ffd700",i.goldenrod="#daa520",i.gray="#808080",i.green="#008000",i.greenyellow="#adff2f",i.honeydew="#f0fff0",i.hotpink="#ff69b4",i["indianred "]="#cd5c5c",i["indigo "]="#4b0082",i.ivory="#fffff0",i.khaki="#f0E68c",i.lavender="#E6E6fa",i.lavenderblush="#fff0f5",i.lawngreen="#7cfc00",i.lemonchiffon="#fffacd",i.lightblue="#add8E6",i.lightcoral="#f08080",i.lightcyan="#E0ffff",i.lightgoldenrodyellow="#fafad2",i.lightgray="#d3d3d3",i.lightgreen="#90EE90",i.lightpink="#ffb6c1",i.lightsalmon="#ffa07a",i.lightseagreen="#20b2aa",i.lightskyblue="#87cEfa",i.lightslategray="#778899",i.lightsteelblue="#b0c4dE",i.lightyellow="#ffffE0",i.lime="#00ff00",i.limegreen="#32cd32",i.linen="#faf0E6",i.magenta="#ff00ff",i.maroon="#800000",i.mediumaquamarine="#66cdaa",i.mediumblue="#0000cd",i.mediumorchid="#ba55d3",i.mediumpurple="#9370db",i.mediumseagreen="#3cb371",i.mediumslateblue="#7b68EE",i.mediumspringgreen="#00fa9a",i.mediumturquoise="#48d1cc",i.mediumvioletred="#c71585",i.midnightblue="#191970",i.mintcream="#f5fffa",i.mistyrose="#ffE4E1",i.moccasin="#ffE4b5",i.navajowhite="#ffdEad",i.navy="#000080",i.oldlace="#fdf5E6",i.olive="#808000",i.olivedrab="#6b8E23",i.orange="#ffa500",i.orangered="#ff4500",i.orchid="#da70d6",i.palegoldenrod="#EEE8aa",i.palegreen="#98fb98",i.paleturquoise="#afEEEE",i.palevioletred="#db7093",i.papayawhip="#ffEfd5",i.peachpuff="#ffdab9",i.peru="#cd853f",i.pink="#ffc0cb",i.plum="#dda0dd",i.powderblue="#b0E0E6",i.purple="#800080",i.rebeccapurple="#663399",i.red="#ff0000",i.rosybrown="#bc8f8f",i.royalblue="#4169E1",i.saddlebrown="#8b4513",i.salmon="#fa8072",i.sandybrown="#f4a460",i.seagreen="#2E8b57",i.seashell="#fff5EE",i.sienna="#a0522d",i.silver="#c0c0c0",i.skyblue="#87cEEb",i.slateblue="#6a5acd",i.slategray="#708090",i.snow="#fffafa",i.springgreen="#00ff7f",i.steelblue="#4682b4",i.tan="#d2b48c",i.teal="#008080",i.thistle="#d8bfd8",i.tomato="#ff6347",i.turquoise="#40E0d0",i.violet="#EE82EE",i.wheat="#f5dEb3",i.white="#ffffff",i.whitesmoke="#f5f5f5",i.yellow="#ffff00",i.yellowgreen="#9acd32",i.transparent="rgba(255,255,255,0)",t.ColorUtils._names=i}return t.ColorUtils._names[e.toLowerCase()]},t.ColorUtils.isColor=function(e,i){if(!i)return e.charAt(0)===t.ColorUtils._POUND||0===e.indexOf(t.ColorUtils._RGBA)||0===e.indexOf(t.ColorUtils._RGB);var n=!1;if((e=(e=t.StringUtils.trim(e)).toLowerCase()).charAt(0)===t.ColorUtils._POUND){if(7===e.length)n=new RegExp(/^#[0-9a-f]{6}$/i).test(e)}else{var o,r=0===e.indexOf(t.ColorUtils._RGBA);if(r||(o=0===e.indexOf(t.ColorUtils._RGB)),r||o){var s=e.indexOf(")");if(s>=0){for(var a=e.substring(r?5:4,s).split(","),l=a.length,h=!0,u=0;u<l;u++){var c=a[u];if(c<0||c>255||u>3&&(c<0||c>1)){h=!1;break}}h&&(n=r?4===l:3===l)}}}return n},t.ColorUtils.getAlpha=function(e){return t.ColorUtils._getChannel(e,t.ColorUtils._ALPHA)},t.ColorUtils.setAlpha=function(e,i){return t.ColorUtils._setChannel(e,t.ColorUtils._ALPHA,i)},t.ColorUtils.getRed=function(e){return t.ColorUtils._getChannel(e,t.ColorUtils._RED)},t.ColorUtils.setRed=function(e,i){return t.ColorUtils._setChannel(e,t.ColorUtils._RED,i)},t.ColorUtils.getBlue=function(e){return t.ColorUtils._getChannel(e,t.ColorUtils._BLUE)},t.ColorUtils.setBlue=function(e,i){return t.ColorUtils._setChannel(e,t.ColorUtils._BLUE,i)},t.ColorUtils.getGreen=function(e){return t.ColorUtils._getChannel(e,t.ColorUtils._GREEN)},t.ColorUtils.setGreen=function(e,i){return t.ColorUtils._setChannel(e,t.ColorUtils._GREEN,i)},t.ColorUtils._getChannel=function(e,i){var n=e,o=null,r=t.ColorUtils.getColorFromName(n);if(r&&(n=r),i===t.ColorUtils._ALPHA){if("#"===n.charAt(0))return n.length>7?parseInt(n.substring(1,3),16)/255:1;if("none"===n)return 0}var s=n.indexOf("(");if(s<0)a=[],n.length>7?(a[0]=parseInt(n.substr(3,2),16),a[1]=parseInt(n.substr(5,2),16),a[2]=parseInt(n.substr(7,2),16),a[3]=parseInt(n.substr(1,2),16)/255):(a[0]=parseInt(n.substr(1,2),16),a[1]=parseInt(n.substr(3,2),16),a[2]=parseInt(n.substr(5,2),16),a[3]=1),o=a[i];else{var a=n.substring(s+1).match(/[^,|)]+/gm);o=3===a.length&&i===t.ColorUtils._ALPHA?1:parseFloat(a[i])}return o},t.ColorUtils.getDarker=function(e,i){var n=t.ColorUtils._getChannel(e,t.ColorUtils._RED),o=t.ColorUtils._getChannel(e,t.ColorUtils._GREEN),r=t.ColorUtils._getChannel(e,t.ColorUtils._BLUE),s=t.ColorUtils._getChannel(e,t.ColorUtils._ALPHA);return i||(i=t.ColorUtils._FACTOR),n=Math.max(parseInt(n*(1-i)),0),o=Math.max(parseInt(o*(1-i)),0),r=Math.max(parseInt(r*(1-i)),0),t.ColorUtils.makeRGBA(n,o,r,s)},t.ColorUtils.getBrighter=function(e,i){var n=t.ColorUtils._getChannel(e,t.ColorUtils._ALPHA),o=t.ColorUtils._getChannel(e,t.ColorUtils._RED),r=t.ColorUtils._getChannel(e,t.ColorUtils._GREEN),s=t.ColorUtils._getChannel(e,t.ColorUtils._BLUE);i||(i=t.ColorUtils._FACTOR);var a=Math.min(o+parseInt((255-o)*i),255),l=Math.min(r+parseInt((255-r)*i),255),h=Math.min(s+parseInt((255-s)*i),255);return t.ColorUtils.makeRGBA(a,l,h,n)},t.ColorUtils.getGrey=function(e){var i=t.ColorUtils._getChannel(e,t.ColorUtils._RED),n=t.ColorUtils._getChannel(e,t.ColorUtils._BLUE),o=t.ColorUtils._getChannel(e,t.ColorUtils._GREEN),r=Math.round(.3*i+.59*n+.11*o);return this.setRGB(e,r,r,r)},t.ColorUtils.invert=function(e){var i=255-t.ColorUtils._getChannel(e,t.ColorUtils._RED),n=255-t.ColorUtils._getChannel(e,t.ColorUtils._BLUE),o=255-t.ColorUtils._getChannel(e,t.ColorUtils._GREEN);return"#"===e.charAt(0)?t.ColorUtils.makePound(i,n,o):e.substr(0,4)===t.ColorUtils._RGB?t.ColorUtils.makeRGB(i,n,o):t.ColorUtils.makeRGBA(i,n,o,t.ColorUtils._getChannel(e,t.ColorUtils._ALPHA))},t.ColorUtils.isRGBA=function(e){return e.substr(0,5)===t.ColorUtils._RGBA},t.ColorUtils.makeRGB=function(e,i,n){return n=null===n||isNaN(n)?0:n,i=null===i||isNaN(i)?0:i,e=null===e||isNaN(e)?0:e,t.ColorUtils._RGB+e+","+i+","+n+")"},t.ColorUtils.makeRGBA=function(e,i,n,o){return n=null===n||isNaN(n)?0:Math.round(n),i=null===i||isNaN(i)?0:Math.round(i),e=null===e||isNaN(e)?0:Math.round(e),o=null===o||isNaN(o)?1:o,t.ColorUtils._RGBA+e+","+i+","+n+","+o+")"},t.ColorUtils.makePound=function(t,e,i){var n=Math.round(t),o=Math.round(e),r=Math.round(i),s=n.toString(16),a=o.toString(16),l=r.toString(16);return"#"+(1===s.length?"0":"")+s+(1===a.length?"0":"")+a+(1===l.length?"0":"")+l},t.ColorUtils.getPound=function(e){var i;if("#"===e.charAt(0)){if(e.length<=7)return e;i=t.ColorUtils._POUND,i+=e.substring(3,5)+e.substring(5,7)+e.substring(7,9)}else{var n=t.ColorUtils.getRed(e),o=t.ColorUtils.getGreen(e),r=t.ColorUtils.getBlue(e);i=t.ColorUtils.makePound(n,o,r)}return i},t.ColorUtils.getRGB=function(e){var i,n=t.ColorUtils.getColorFromName(e);if(n&&(e=n),"#"===e.charAt(0)){i=t.ColorUtils._RGB;var o=e.length;if(o>7)i+=parseInt(e.substring(3,5),16)+","+parseInt(e.substring(5,7),16)+","+parseInt(e.substring(7,9),16);else if(7===o)i+=parseInt(e.substring(1,3),16)+","+parseInt(e.substring(3,5),16)+","+parseInt(e.substr(5),16);else if(4===o){var r=e.substring(1,2);r+=r;var s=e.substring(2,3);s+=s;var a=e.substring(3);a+=a,i+=parseInt(r,16)+","+parseInt(s,16)+","+parseInt(a,16)}else 5===o?i+=parseInt(e.substring(1,3),16)+","+parseInt(e.substring(3,5),16)+",0,1":3===o&&(i+=parseInt(e.substring(1,3),16)+",0,0,1");i+=")"}else if(e.substr(0,5)===t.ColorUtils._RGBA){var l=e.lastIndexOf(",");i=t.ColorUtils._RGB,i+=e.substring(5,l),i+=")"}else i=e;return i},t.ColorUtils.getRGBA=function(e){var i,n=t.ColorUtils.getColorFromName(e);if(n&&(e=n),"#"===e.charAt(0)){i=t.ColorUtils._RGBA;var o=e.length;if(o>7)i+=parseInt(e.substring(3,5),16)+","+parseInt(e.substring(5,7),16)+","+parseInt(e.substring(7,9),16)+","+parseInt(e.substring(1,3),16)/255;else if(7===o)i+=parseInt(e.substring(1,3),16)+","+parseInt(e.substring(3,5),16)+","+parseInt(e.substr(5),16)+",1";else if(5===o)i+=parseInt(e.substring(1,3),16)+","+parseInt(e.substring(3,5),16)+",0,1";else if(4===o){var r=e.substring(1,2);r+=r;var s=e.substring(2,3);s+=s;var a=e.substring(3);a+=a,i+=parseInt(r,16)+","+parseInt(s,16)+","+parseInt(a,16)+",1"}else 3===o&&(i+=parseInt(e.substring(1,3),16)+",0,0,1");i+=")"}else e.substr(0,4)===t.ColorUtils._RGB?(i=t.ColorUtils._RGBA,i+=e.substring(4,e.length-1)+",1)"):i=e;return i},t.ColorUtils._setChannel=function(e,i,n){if(void 0===i||void 0===n||i<t.ColorUtils._RED||i>t.ColorUtils._ALPHA)return e;var o=t.ColorUtils.getColorFromName(e);o&&(e=o);var r="#"===e.charAt(0);if(r)(h=[]).push(parseInt(e.substr(1,2),16)),h.push(parseInt(e.substr(3,2),16)),h.push(parseInt(e.substr(5,2),16)),i===t.ColorUtils._ALPHA&&(h.push(n),r=!1,s=!0);else{var s=e.substr(0,5)===t.ColorUtils._RGBA,a=e.indexOf("("),l=e.indexOf(")"),h=e.substring(a+1,l).split(",");s||i!==t.ColorUtils._ALPHA||(h.push(n),s=!0)}return h[i]=n,r?t.ColorUtils.makePound(h[0],h[1],h[2]):s?t.ColorUtils.makeRGBA(h[0],h[1],h[2],h[3]):t.ColorUtils.makeRGB(h[0],h[1],h[2])},t.ColorUtils.setRGB=function(e,i,n,o){if(o=null===o||isNaN(o)?0:o,n=null===n||isNaN(n)?0:n,i=null===i||isNaN(i)?0:i,"#"===e.charAt(0))return t.ColorUtils.makePound(i,n,o);var r=e.substr(0,5)===t.ColorUtils._RGBA,s=(r?t.ColorUtils._RGBA:t.ColorUtils._RGB)+i+","+n+","+o;if(r){var a=e.lastIndexOf(5,","),l=e.indexOf(")");s+=","+e.substring(a+1,l)}return s+=")"},t.ColorUtils.rgb2hsl=function(t,e,i){t/=255,e/=255,i/=255;var n,o,r=Math.max(t,e,i),s=Math.min(t,e,i),a=r+s,l=a/2;if(r==s)n=0,o=0;else{var h=r-s;o=l>.5?h/(2-a):h/a,r==t?n=(e-i)/h+(e<i?6:0):r==e?n=(i-t)/h+2:r==i&&(n=(t-e)/h+4),n/=6}return{h:360*n,s:o,l:l}},t.ColorUtils.hsl2rgb=function(e,i,n){var o,r,s;if(e/=360,0==i)o=r=s=n;else{var a=n<.5?n*(1+i):n+i-n*i,l=2*n-a;o=t.ColorUtils._hue2rgb(l,a,e+1/3),r=t.ColorUtils._hue2rgb(l,a,e),s=t.ColorUtils._hue2rgb(l,a,e-1/3)}return{r:255*o,g:255*r,b:255*s}},t.ColorUtils._hue2rgb=function(t,e,i){return i<0?i+=1:i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t},t.ColorUtils.hsv2rgb=function(t,e,i){var n,o,r,s,a,l,h,u;return t%=360,0==i?{r:0,g:0,v:0}:(l=(i/=100)*(1-(e/=100)),h=i*(1-e*(a=(t/=60)-(s=Math.floor(t)))),u=i*(1-e*(1-a)),0==s?(n=i,o=u,r=l):1==s?(n=h,o=i,r=l):2==s?(n=l,o=i,r=u):3==s?(n=l,o=h,r=i):4==s?(n=u,o=l,r=i):5==s&&(n=i,o=l,r=h),{r:n=Math.floor(255*n),g:o=Math.floor(255*o),b:r=Math.floor(255*r)})},t.ColorUtils.rgb2hsv=function(t,e,i){var n,o,r,s;return t/=255,e/=255,i/=255,(n=Math.min(t,e,i))==(o=Math.max(t,e,i))?{h:void 0,s:0,v:100*o}:(r=t==n?e-i:e==n?i-t:t-e,s=t==n?3:e==n?5:1,{h:Math.floor(60*(s-r/(o-n)))%360,s:Math.floor((o-n)/o*100),v:o=Math.floor(100*o)})},t.ColorUtils.adjustHSL=function(e,i,n,o){t.ColorUtils._hslCache||(t.ColorUtils._hslCache=new t.Cache(100));var r=e+":"+i+":"+n+":"+o,s=t.ColorUtils._hslCache.get(r);if(null!=s)return s;var a=t.ColorUtils._getChannel(e,t.ColorUtils._RED),l=t.ColorUtils._getChannel(e,t.ColorUtils._GREEN),h=t.ColorUtils._getChannel(e,t.ColorUtils._BLUE),u=t.ColorUtils._getChannel(e,t.ColorUtils._ALPHA),c=t.ColorUtils.rgb2hsl(a,l,h),p=Math.min(Math.max(0,c.h+i),360),_=Math.min(Math.max(0,c.s+n),1),g=Math.min(Math.max(0,c.l+o),1),d=t.ColorUtils.hsl2rgb(p,_,g);return s=1==u?t.ColorUtils.makePound(d.r,d.g,d.b):t.ColorUtils.makeRGBA(d.r,d.g,d.b,u),t.ColorUtils._hslCache.put(r,s),s},t.ColorUtils.interpolateColor=function(e,i,n){var o=t.ColorUtils.getRed(e),r=t.ColorUtils.getGreen(e),s=t.ColorUtils.getBlue(e),a=t.ColorUtils.getAlpha(e),l=t.ColorUtils.getRed(i),h=t.ColorUtils.getGreen(i),u=t.ColorUtils.getBlue(i),c=t.ColorUtils.getAlpha(i),p=Math.round(t.Math.interpolateNumber(o,l,n)),_=Math.round(t.Math.interpolateNumber(r,h,n)),g=Math.round(t.Math.interpolateNumber(s,u,n)),d=t.Math.interpolateNumber(a,c,n);return t.ColorUtils.makeRGBA(p,_,g,d)},t.ColorUtils.inferColor=function(e,i,n){if(e==i)return n;if(n==e)return i;var o,r,s,a=t.ColorUtils.getRed(e),l=t.ColorUtils.getRed(i);return a==l?o=t.ColorUtils.getRed(n):(0==a&&(a=1),o=l/a*t.ColorUtils.getRed(n)),(a=t.ColorUtils.getGreen(e))==(l=t.ColorUtils.getGreen(i))?r=t.ColorUtils.getGreen(n):(0==a&&(a=1),r=l/a*t.ColorUtils.getGreen(n)),(a=t.ColorUtils.getBlue(e))==(l=t.ColorUtils.getBlue(i))?s=t.ColorUtils.getBlue(n):(0==a&&(a=1),s=l/a*t.ColorUtils.getBlue(n)),t.ColorUtils.makePound(o,r,s)},t.ColorUtils.getLuminance=function(e){var i=function(t){var e=t/255;return e<.03928?e/12.92:Math.pow((e+.055)/1.055,2.4)},n=t.ColorUtils.getRed(e),o=t.ColorUtils.getGreen(e),r=t.ColorUtils.getBlue(e);return.2126*i(n)+.7152*i(o)+.0722*i(r)},t.ColorUtils.getContrastRatio=function(e,i){return t.ColorUtils.getContrastRatioByLuminance(t.ColorUtils.getLuminance(e),t.ColorUtils.getLuminance(i))},t.ColorUtils.getContrastRatioByLuminance=function(t,e){var i=t+.05,n=e+.05;return i>n?i/n:n/i},t.ColorUtils.getContrastingTextColor=function(e){if(!t.ColorUtils._CONTRASTING_TEXT_COLOR_CACHE[e]){var i=t.ColorUtils.getLuminance(e),n=t.ColorUtils.getContrastRatioByLuminance(i,1)>t.ColorUtils.getContrastRatioByLuminance(i,0)?"#FFFFFF":"#000000";t.ColorUtils._CONTRASTING_TEXT_COLOR_CACHE[e]=n}return t.ColorUtils._CONTRASTING_TEXT_COLOR_CACHE[e]},t.ColorUtils.fixColorForPlatform=function(e,i){if(!e)return null;"#"==e.charAt(0)&&e.length>8&&(e=t.ColorUtils.getRGBA(e));var n={};return t.Agent.isEnvironmentBatik()&&-1!==e.indexOf("rgba")?(n.color=t.ColorUtils.getRGB(e),n.alpha=null!=i?t.ColorUtils.getAlpha(e)*i:t.ColorUtils.getAlpha(e)):(n.color=e,null!=i&&(n.alpha=i)),n},t.ClipPath=function(e){this._id=(e?e+"$":"")+"cp"+t.ClipPath._uniqueSeed++,this._regions=[]},t.Obj.createSubclass(t.ClipPath,t.Obj),t.ClipPath._uniqueSeed=0,t.ClipPath.NONE=0,t.ClipPath.RECT=1,t.ClipPath.PATH=2,t.ClipPath.POLYGON=3,t.ClipPath.ELLIPSE=4,t.ClipPath.CIRCLE=5,t.ClipPath.prototype._addRegion=function(t){t&&this._regions.push(t)},t.ClipPath.prototype.getId=function(){return this._id},t.ClipPath.prototype.getRegions=function(t){return this._regions},t.ClipPath.prototype.addRect=function(e,i,n,o,r,s){var a={};a.type=t.ClipPath.RECT,a.x=e,a.y=i,a.w=n,a.h=o,a.rx=r,a.ry=s,this._addRegion(a)},t.ClipPath.prototype.addCircle=function(e,i,n){var o={};o.type=t.ClipPath.CIRCLE,o.cx=e,o.cy=i,o.r=n,this._addRegion(o)},t.ClipPath.prototype.addEllipse=function(e,i,n,o){var r={};r.type=t.ClipPath.ELLIPSE,r.cx=e,r.cy=i,r.rx=n,r.ry=o,this._addRegion(r)},t.ClipPath.prototype.addPolygon=function(e){var i={};i.type=t.ClipPath.POLYGON,i.points=e,this._addRegion(i)},t.ClipPath.prototype.addPath=function(e){var i={};i.type=t.ClipPath.PATH,i.d=e,this._addRegion(i)},t.Mask=function(e,i){this._id="mask"+t.Mask._uniqueSeed++,this._gradient=e,this._bounds=i},t.Obj.createSubclass(t.Mask,t.Obj),t.Mask._uniqueSeed=0,t.Mask.prototype.getId=function(){return this._id},t.Mask.prototype.getGradient=function(){return this._gradient},t.Mask.prototype.getBounds=function(){return this._bounds},t.Fill=function(){this._Init()},t.Obj.createSubclass(t.Fill,e),t.Fill.NONE=0,t.Fill.COLOR=1,t.Fill.GRADIENT=2,t.Fill.PATTERN=3,t.Fill.IMAGE=4,t.Fill.prototype._Init=function(){t.Fill.superclass._Init.call(this)},t.Fill.prototype.getId=function(){return this._id},t.Fill.prototype.setId=function(t){this._id=t},t.Fill.prototype.equals=function(t){return!0},t.SolidFill=function(t,e){this._Init(t,e)},t.Obj.createSubclass(t.SolidFill,t.Fill),t.SolidFill.prototype.clone=function(){var e=new t.SolidFill;return this.mergeProps(e),e},t.SolidFill.prototype._Init=function(e,i){t.SolidFill.superclass._Init.call(this),this._fc=e,this._fa=null!=i?i:1},t.SolidFill.prototype.getColor=function(){return this._fc},t.SolidFill.prototype.setColor=function(t){this.isLocked()||(this._fc=t)},t.SolidFill.prototype.getAlpha=function(){return this._fa},t.SolidFill.prototype.setAlpha=function(t){this.isLocked()||(this._fa=t)},t.SolidFill.prototype.mergeProps=function(e){t.SolidFill.superclass.mergeProps.call(this,e),e._fc=this._fc,e._fa=this._fa},t.SolidFill.invisibleFill=function(){return t.SolidFill._INVISIBLE_FILL||(t.SolidFill._INVISIBLE_FILL=new t.SolidFill("rgba(0,0,0,0)")),t.SolidFill._INVISIBLE_FILL},t.SolidFill.prototype.equals=function(e){return e instanceof t.SolidFill&&e._fc==this._fc&&e._fa==this._fa&&t.SolidFill.superclass.equals.call(this,e)},t.Stroke=function(t,e){this._Init(t,e)},t.Obj.createSubclass(t.Stroke,e),t.Stroke.SOLID=0,t.Stroke.DASHED=1,t.Stroke.DOTTED=2,t.Stroke.DASHED_DOTTED=3,t.Stroke.SQUARE="square",t.Stroke.ROUND="round",t.Stroke.BEVEL="bevel",t.Stroke.MITER="miter",t.Stroke.BUTT="butt",t.Stroke.OUTER="outer",t.Stroke.INNER="inner",t.Stroke.CENTER="center",t.Stroke.convertTypeString=function(e){return"solid"==e?t.Stroke.SOLID:"dashed"==e?t.Stroke.DASHED:"dotted"==e?t.Stroke.DOTTED:t.Stroke.SOLID},t.Stroke.prototype._Init=function(e){this._sw=null===e||isNaN(e)?1:e,t.Stroke.superclass._Init.call(this),this._bFixedWidth=!1},t.Stroke.prototype.getId=function(){return this._id},t.Stroke.prototype.setId=function(t){this._id=t},t.Stroke.prototype.mergeProps=function(e){e._sw=this._sw,e._st=this._st,e._sd=this._sd,e._sdo=this._sdo,e._sj=this._sj,e._se=this._se,e._sm=this._sm,e._bFixedWidth=this._bFixedWidth,t.Stroke.superclass.mergeProps.call(this,e)},t.Stroke.prototype.setStyle=function(e,i,n,o,r){this.isLocked()||(e&&!i&&(i=t.Stroke.getDefaultDash(e,this._sw)),this._st=e,this._sd=i,n&&(this._sj=n),o&&(this._se=o),r&&(this._sm=r))},t.Stroke.prototype.getDash=function(){return this._sd},t.Stroke.prototype.getDashOffset=function(){return this._sdo},t.Stroke.prototype.getLineJoin=function(){return this._sj},t.Stroke.prototype.setLineJoin=function(t){this.isLocked()||(this._sj=t)},t.Stroke.prototype.getLineEnd=function(){return this._se},t.Stroke.prototype.setLineEnd=function(t){this.isLocked()||(this._se=t)},t.Stroke.prototype.getMiterLimit=function(){return this._sm},t.Stroke.prototype.setMiterLimit=function(t){this.isLocked()||(this._sm=t)},t.Stroke.prototype.getType=function(){return this._st},t.Stroke.prototype.setType=function(e,i,n){this.isLocked()||(e===t.Stroke.SOLID?(i=null,n=null):i||(i=t.Stroke.getDefaultDash(e,this._sw)),this._st=e,this._sd=i,this._sdo=n)},t.Stroke.prototype.getWidth=function(){return this._sw},t.Stroke.prototype.setWidth=function(t){this.isLocked()||(this._sw=t)},t.Stroke.prototype.setFixedWidth=function(t){this._bFixedWidth=t},t.Stroke.prototype.isFixedWidth=function(){return this._bFixedWidth},t.Stroke.getDefaultDash=function(e,i){i=Math.ceil(i);var n=Math.max(6,2*i),o=Math.max(2,i),r=Math.floor((n+o)/2);return e==t.Stroke.DASHED?""+n:e==t.Stroke.DOTTED?""+o:e==t.Stroke.DASHED_DOTTED?n+","+r+","+o+","+r:null},t.GradientStroke=function(t,e,i,n,o,r){this._Init(t,e,i,n,o,r)},t.Obj.createSubclass(t.GradientStroke,t.Stroke),t.GradientStroke.prototype.getAlpha=function(){return 1},t.GradientStroke.prototype.getAlphas=function(){return this._arAlphas},t.GradientStroke.prototype.getBounds=function(){return this._arBounds},t.GradientStroke.prototype.getColors=function(){return this._arColors},t.GradientStroke.prototype.getStops=function(){return this._arStops},t.GradientStroke.prototype._Init=function(e,i,n,o,r,s){t.GradientStroke.superclass._Init.call(this,r,s),this._arColors=e,this._arBounds=o;var a=0;e&&(a=e.length-1),i||(i=t.GradientStroke.createDefaultAlphas(a)),this._arAlphas=i,n||(n=t.GradientStroke.createDefaultStops(a)),this._arStops=n},t.GradientStroke.createDefaultAlphas=function(t){if(t<0)return null;for(var e=[],i=0;i<t;i++)e.push(1);return e},t.GradientStroke.createDefaultStops=function(t){var e=[],i=1/t,n=0;do{e.push(n),n+=i}while(--t>0);return e.push(1),e},t.GradientStroke.prototype.mergeProps=function(e){e._arColors=this._arColors,e._arStops=this._arStops,e._arAlphas=this._arAlphas,e._arBounds=this._arBounds,t.GradientStroke.superclass.mergeProps.call(this,e)},t.LinearGradientStroke=function(t,e,i,n,o,r,s){this._Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.LinearGradientStroke,t.GradientStroke),t.LinearGradientStroke.prototype.clone=function(){var e=new t.LinearGradientStroke;return this.mergeProps(e),e},t.LinearGradientStroke.prototype._Init=function(e,i,n,o,r,s,a){t.LinearGradientStroke.superclass._Init.call(this,i,n,o,r,s,a),this._angle=null===e||isNaN(e)?0:e},t.LinearGradientStroke.prototype.getAngle=function(){return this._angle},t.LinearGradientStroke.prototype.mergeProps=function(e){t.LinearGradientStroke.superclass.mergeProps.call(this,e),e._angle=this._angle},t.LinearGradientStroke.prototype.setAngle=function(t){this.isLocked()||0!==t&&(Math.abs(t)>360&&(t%=360),this._angle=t)},t.SolidStroke=function(t,e,i){this._Init(t,e,i)},t.Obj.createSubclass(t.SolidStroke,t.Stroke),t.SolidStroke.prototype.clone=function(){var e=new t.SolidStroke;return this.mergeProps(e),e},t.SolidStroke.prototype._Init=function(e,i,n){this._sc=e,this._sa=null!=i?i:1,this._st=t.Stroke.SOLID,t.SolidStroke.superclass._Init.call(this,n)},t.SolidStroke.prototype.getAlpha=function(){return this._sa},t.SolidStroke.prototype.setAlpha=function(t){this.bLocked||(this._sa=t)},t.SolidStroke.prototype.getColor=function(){return this._sc},t.SolidStroke.prototype.setColor=function(t){this.bLocked||(this._sc=t)},t.SolidStroke.prototype.mergeProps=function(e){t.SolidStroke.superclass.mergeProps.call(this,e),e._sc=this._sc,e._sa=this._sa},t.Shadow=function(t,e,i,n,o,r,s,a,l,h){this._Init(t,e,i,n,o,r,s,a,l,h)},t.Obj.createSubclass(t.Shadow,S),t.Shadow._uniqueId=1,t.Shadow.prototype._Init=function(e,i,n,o,r,s,a,l,h,u){t.Shadow.superclass._Init.call(this),this.__type="shadow",this._rgba=e||"rgba(48,48,48,0.35)",this._distance=null===i||isNaN(i)?4:i,this._strength=null===s||isNaN(s)?1:s,this._blurX=null===n||isNaN(n)?4:n,this._blurY=null===o||isNaN(o)?4:o,this._angle=null===r||isNaN(r)?45:r,this._quality=null===a||isNaN(a)?1:a,this._bInner=!!l,this._bKnockout=!1,this._bHide=!1,this._Id="ds"+t.Shadow._uniqueId++},t.Shadow.prototype.clone=function(){var e=new t.Shadow;return this.mergeProps(e),e},t.Shadow.prototype.mergeProps=function(e){t.Shadow.superclass.mergeProps.call(this,e),e._rgba=this._rgba,e._distance=this._distance,e._strength=this._strength,e._blurX=this._blurX,e._blurY=this._blurY,e._angle=this._angle,e._quality=this._quality,e._bInner=this._bInner,e._bKnockout=this._bKnockout,e._bHide=this._bHide,e._Id=this._Id},t.GradientFill=function(t,e,i,n){this._Init(t,e,i,n)},t.Obj.createSubclass(t.GradientFill,t.Fill),t.GradientFill.prototype.getAlphas=function(){return this._arAlphas},t.GradientFill.prototype.getBounds=function(){return this._arBounds},t.GradientFill.prototype.getColors=function(){return this._arColors},t.GradientFill.prototype.getStops=function(){return this._arStops},t.GradientFill.prototype._Init=function(e,i,n,o){if(t.GradientFill.superclass._Init.call(this),this._arColors=e,this._arBounds=o,!i&&(i=[],e))for(var r=0;r<e.length;r++)i.push(1);this._arAlphas=i;var s=e?e.length-1:0;if(!n){n=[];var a=s>0?1/s:0,l=0;do{n.push(l),l+=a}while(--s>0);n.push(1)}this._arStops=n},t.GradientFill.prototype.mergeProps=function(e){e._arColors=this._arColors,e._arStops=this._arStops,e._arAlphas=this._arAlphas,e._arBounds=this._arBounds,t.GradientFill.superclass.mergeProps.call(this,e)},t.GradientFill.prototype.equals=function(e){return!!(e instanceof t.GradientFill&&t.ArrayUtils.equals(this._arColors,e._arColors)&&t.ArrayUtils.equals(this._arStops,e._arStops)&&t.ArrayUtils.equals(this._arAlphas,e._arAlphas)&&t.ArrayUtils.equals(this._arBounds,e._arBounds))&&t.GradientFill.superclass.equals.call(this,e)},t.LinearGradientFill=function(t,e,i,n,o){this._Init(t,e,i,n,o)},t.Obj.createSubclass(t.LinearGradientFill,t.GradientFill),t.LinearGradientFill.prototype.clone=function(){var e=new t.LinearGradientFill;return this.mergeProps(e),e},t.LinearGradientFill.prototype._Init=function(e,i,n,o,r){t.LinearGradientFill.superclass._Init.call(this,i,n,o,r),this._angle=null===e||isNaN(e)?0:e},t.LinearGradientFill.prototype.getAngle=function(){return this._angle},t.LinearGradientFill.prototype.clone=function(){var e=new t.LinearGradientFill;return this.mergeProps(e),e},t.LinearGradientFill.prototype.mergeProps=function(e){t.LinearGradientFill.superclass.mergeProps.call(this,e),e._angle=this._angle},t.LinearGradientFill.prototype.setAngle=function(t){this.isLocked()||0!==t&&(Math.abs(t)>360&&(t%=360),this._angle=t)},t.LinearGradientFill.prototype.equals=function(e){return e instanceof t.LinearGradientFill&&e._angle==this._angle&&t.LinearGradientFill.superclass.equals.call(this,e)},t.ImageFill=function(t,e,i){this._Init(t,e,i)},t.Obj.createSubclass(t.ImageFill,t.Fill),t.ImageFill.prototype.getBound=function(){return this._bound},t.ImageFill.prototype.getSrc=function(){return this._src},t.ImageFill.prototype.getRepeat=function(){return this._repeat},t.ImageFill.prototype._Init=function(e,i,n){t.ImageFill.superclass._Init.call(this),this._src=e,this._bound=i,this._repeat=n},t.ImageFill.prototype.clone=function(){var e=new t.ImageFill;return this.mergeProps(e),e},t.ImageFill.prototype.mergeProps=function(e){e._src=this._src,e._bound=this._bound,e._repeat=this._repeat,t.ImageFill.superclass.mergeProps.call(this)},t.ImageFill.prototype.equals=function(e){if(e instanceof t.ImageFill&&e._src==this._src&&e._repeat==this._repeat){if(this._bound&&e._bound&&this._bound.x==e.bound.x&&this._bound.y==e.bound.y&&this._bound.w==e.bound.w&&this._bound.h==e.bound.h)return t.ImageFill.superclass.equals.call(this,e);if(!this._bound&&!e._bound)return t.ImageFill.superclass.equals.call(this,e)}return!1},t.PatternFill=function(t,e,i){this.Init(t,e,i)},t.Obj.createSubclass(t.PatternFill,t.Fill),t.PatternFill.SM_DIAG_UP_LT="sDUL",t.PatternFill.LG_DIAG_UP_LT="lDUL",t.PatternFill.SM_DIAG_UP_RT="sDUR",t.PatternFill.LG_DIAG_UP_RT="lDUR",t.PatternFill.SM_CROSSHATCH="sC",t.PatternFill.LG_CROSSHATCH="lC",t.PatternFill.SM_CHECK="sCh",t.PatternFill.LG_CHECK="lCh",t.PatternFill.SM_TRIANGLE_CHECK="sTCh",t.PatternFill.LG_TRIANGLE_CHECK="lTCh",t.PatternFill.SM_DIAMOND_CHECK="sDCh",t.PatternFill.LG_DIAMOND_CHECK="lDCh",t.PatternFill.prototype.Init=function(e,i,n){t.PatternFill.superclass._Init.call(this),this._pattern=e?t.PatternFill._convertPatternValue(e):t.PatternFill.SM_DIAG_UP_LT,this._fillColor=i||"#000000",this._backgroundColor=n||"#ffffff"},t.PatternFill.prototype.getPattern=function(){return this._pattern},t.PatternFill.prototype.getColor=function(){return this._fillColor},t.PatternFill.prototype.getBackgroundColor=function(){return this._backgroundColor},t.PatternFill.prototype.clone=function(){var e=new t.PatternFill;return this.mergeProps(e),e},t.PatternFill.prototype.mergeProps=function(e){e._pattern=this._pattern,e._fillColor=this._fillColor,e._backgroundColor=this._backgroundColor,t.PatternFill.superclass.mergeProps.call(this)},t.PatternFill.prototype.equals=function(e){return e instanceof t.PatternFill&&e._pattern==this._pattern&&e._fillColor==this._fillColor&&e._backgroundColor==this._backgroundColor&&t.PatternFill.superclass.equals.call(this,e)},t.PatternFill.prototype.getMatrix=function(){return this._matrix?this._matrix:new t.Matrix},t.PatternFill.prototype.setMatrix=function(t){this._matrix=t,this._matrix&&!this._matrix.isLocked()&&this._matrix.__lock()},t.PatternFill._convertPatternValue=function(e){return"smallDiagonalLeft"==e?t.PatternFill.SM_DIAG_UP_LT:"largeDiagonalLeft"==e?t.PatternFill.LG_DIAG_UP_LT:"smallDiagonalRight"==e?t.PatternFill.SM_DIAG_UP_RT:"largeDiagonalRight"==e?t.PatternFill.LG_DIAG_UP_RT:"smallCrosshatch"==e?t.PatternFill.SM_CROSSHATCH:"largeCrosshatch"==e?t.PatternFill.LG_CROSSHATCH:"smallChecker"==e?t.PatternFill.SM_CHECK:"largeChecker"==e?t.PatternFill.LG_CHECK:"smallTriangle"==e?t.PatternFill.SM_TRIANGLE_CHECK:"largeTriangle"==e?t.PatternFill.LG_TRIANGLE_CHECK:"smallDiamond"==e?t.PatternFill.SM_DIAMOND_CHECK:"largeDiamond"==e?t.PatternFill.LG_DIAMOND_CHECK:e},t.RadialGradientFill=function(t,e,i,n,o,r,s){this._Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.RadialGradientFill,t.GradientFill),t.RadialGradientFill.prototype.clone=function(){var e=new t.RadialGradientFill;return this.mergeProps(e),e},t.RadialGradientFill.prototype.getRadius=function(){return this._r},t.RadialGradientFill.prototype.getCx=function(){return this._cx},t.RadialGradientFill.prototype.getCy=function(){return this._cy},t.RadialGradientFill.prototype._Init=function(e,i,n,o,r,s,a){t.RadialGradientFill.superclass._Init.call(this,e,i,n,a),this._cx=o,this._cy=r,this._r=s},t.RadialGradientFill.prototype.clone=function(){var e=new t.RadialGradientFill;return this.mergeProps(e),e},t.RadialGradientFill.prototype.mergeProps=function(e){t.RadialGradientFill.superclass.mergeProps.call(this,e),e._cx=this._cx,e._cy=this._cy,e._r=this._r},t.RadialGradientFill.prototype.equals=function(e){return e instanceof t.RadialGradientFill&&e._cx==this._cx&&e._cy==this._cy&&e._r==this._r&&t.RadialGradientFill.superclass.equals.call(this,e)},t.SelectionEffectUtils={},t.Obj.createSubclass(t.SelectionEffectUtils,t.Obj),t.SelectionEffectUtils.getHoverBorderColor=function(e){return t.ColorUtils.adjustHSL(e,0,0,.15)},t.SelectionEffectUtils.applyDrawEffect=function(t,e){if(0==t.getNumDrawEffects())t.addDrawEffect(e);else{var i=t.getDrawEffectIndex(e);i>-1?(t.removeDrawEffectAt(i),t.addDrawEffectAt(e,i)):t.addDrawEffect(e)}},t.SelectionEffectUtils.createSelectingStroke=function(e){var i=new t.SolidStroke(t.SelectionEffectUtils.getHoverBorderColor(e),1,2);return i.setMiterLimit(1),i},t.SelectionEffectUtils.getSelectingCursor=function(){return"pointer"},t.KeyboardFocusEffect=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)},t.Obj.createSubclass(t.KeyboardFocusEffect,t.Obj),t.KeyboardFocusEffect.FOCUS_BORDER_RADIUS=1,t.KeyboardFocusEffect.FOCUS_STROKE_WIDTH=1,t.KeyboardFocusEffect.FOCUS_STROKE_ALPHA=1,t.KeyboardFocusEffect.FOCUS_STROKE_TYPE=t.Stroke.DOTTED,t.KeyboardFocusEffect.prototype.Init=function(e,i,n,o,r,s){this._container=i,this._focusEffect=new t.Rect(e,n.x,n.y,n.w,n.h,r);var a=this.CreateStroke();this._focusEffect.setStroke(a),this._focusEffect.setRx(t.KeyboardFocusEffect.FOCUS_BORDER_RADIUS),this._focusEffect.setRy(t.KeyboardFocusEffect.FOCUS_BORDER_RADIUS),o&&this._focusEffect.setMatrix(o),this._focusEffect.setFill(null),this._appendLast=s},t.KeyboardFocusEffect.prototype.CreateStroke=function(){var e=t.Agent.getFocusColor(),i=t.KeyboardFocusEffect.FOCUS_STROKE_WIDTH,n=t.KeyboardFocusEffect.FOCUS_STROKE_ALPHA,o=t.KeyboardFocusEffect.FOCUS_STROKE_TYPE;t.Agent.isPlatformWebkit()&&(i=2,o=t.Stroke.SOLID);var r=new t.SolidStroke(e,n,i);return r.setType(o,i,i),r},t.KeyboardFocusEffect.prototype.getEffect=function(){return this._focusEffect},t.KeyboardFocusEffect.prototype.setEffect=function(t){this._focusEffect=t},t.KeyboardFocusEffect.prototype.show=function(){this._focusEffect instanceof t.Shape&&(this._appendLast?this._container.addChild(this._focusEffect):this._container.addChildAt(this._focusEffect,0))},t.KeyboardFocusEffect.prototype.hide=function(){this._focusEffect instanceof t.Shape&&this._container.removeChild(this._focusEffect)},t.Dimension=function(t,e){this.Init(t,e)},t.Obj.createSubclass(t.Dimension,t.Obj),t.Dimension.prototype.Init=function(t,e){this.w=null===t||isNaN(t)?0:t,this.h=null===e||isNaN(e)?0:e},t.Dimension.prototype.getWidth=function(){return this.w},t.Dimension.prototype.getHeight=function(){return this.h},t.Matrix=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)},t.Obj.createSubclass(t.Matrix,e),t.Matrix._DECOMP_TX=0,t.Matrix._DECOMP_TY=1,t.Matrix._DECOMP_R=2,t.Matrix._DECOMP_SKEWX=3,t.Matrix._DECOMP_SX=4,t.Matrix._DECOMP_SY=5,t.Matrix.prototype.Init=function(e,i,n,o,r,s){this._a=null==e?1:e,this._b=null==i?0:i,this._c=null==n?0:n,this._d=null==o?1:o,this._tx=null==r?0:r,this._ty=null==s?0:s,this._u=0,this._v=0,this._w=1,t.Matrix.superclass._Init.call(this)},t.Matrix.prototype.Identity=function(){this._a=1,this._b=0,this._c=0,this._d=1,this._tx=0,this._ty=0},t.Matrix.prototype.getA=function(){return this._a},t.Matrix.prototype.getB=function(){return this._b},t.Matrix.prototype.getC=function(){return this._c},t.Matrix.prototype.getD=function(){return this._d},t.Matrix.prototype.getTx=function(){return this._tx},t.Matrix.prototype.getTy=function(){return this._ty},t.Matrix.prototype.clone=function(){return new t.Matrix(this._a,this._b,this._c,this._d,this._tx,this._ty)},t.Matrix.prototype.concat=function(t){if(!this.isLocked()){var e=this._a*t._a+this._c*t._b+this._u*t._tx,i=this._b*t._a+this._d*t._b+this._v*t._tx,n=this._tx*t._a+this._ty*t._b+this._w*t._tx,o=this._a*t._c+this._c*t._d+this._u*t._ty,r=this._b*t._c+this._d*t._d+this._v*t._ty,s=this._tx*t._c+this._ty*t._d+this._w*t._ty;this._a=e,this._b=i,this._c=o,this._d=r,this._tx=n,this._ty=s}},t.Matrix.prototype.translate=function(e,i){if(!this.isLocked()){var n=new t.Matrix;n._tx=e,n._ty=i,this.concat(n)}},t.Matrix.prototype.scale=function(e,i,n,o){if(!this.isLocked()){(n||o)&&this.translate(-n,-o);var r=new t.Matrix;r._a=e,r._d=i,this.concat(r),(n||o)&&this.translate(n,o)}},t.Matrix.prototype.rotate=function(e){if(!this.isLocked()){var i=new t.Matrix;i._a=Math.cos(e),i._d=i._a,i._c=Math.sin(e),i._b=-i._c,this.concat(i)}},t.Matrix.prototype.skew=function(e,i){if(!this.isLocked()){var n=new t.Matrix;n._b=Math.tan(e),n._c=Math.tan(i),this.concat(n)}},t.Matrix.prototype.Determinant=function(){return this._a*(this._d*this._w-this._ty*this._v)-this._b*(this._c*this._w-this._ty*this._u)+this._tx*(this._c*this._v-this._d*this._u)},t.Matrix.prototype.invert=function(){if(!this.isLocked()){var t=this.Determinant(),e=this._d*this._w-this._ty*this._v,i=this._tx*this._v-this._b*this._w,n=this._b*this._ty-this._tx*this._d,o=this._ty*this._u-this._c*this._w,r=this._a*this._w-this._tx*this._u,s=this._tx*this._c-this._a*this._ty;this._a=e/t,this._b=i/t,this._tx=n/t,this._c=o/t,this._d=r/t,this._ty=s/t}},t.Matrix.prototype._decompose=function(){var t=this._a,e=this._b,i=this._c,n=this._d,o=this._tx,r=this._ty;if(t*n-e*i==0)return null;var s=Math.sqrt(t*t+i*i),a=(t/=s)*e+(i/=s)*n;e-=t*a,n-=i*a;var l=Math.sqrt(e*e+n*n);return a/=l,-1===t*(n/=l)-(e/=l)*i&&(a=-a,l=-l),[o,r,Math.atan2(i,t),Math.atan(a),s,l]},t.Matrix.prototype._recompose=function(t){if(!this.isLocked()){this.Identity();var e=t[0],i=t[1],n=t[2],o=t[3],r=t[4],s=t[5];this.scale(r,s),this.skew(o,0),this.rotate(n),this.translate(e,i)}},t.Matrix.prototype.equals=function(t){return!(!this&&t)&&(!(this&&!t)&&(!this&&!t||this._a==t._a&&this._b==t._b&&this._c==t._c&&this._d==t._d&&this._tx==t._tx&&this._ty==t._ty))},t.Matrix.prototype.transformPoint=function(e){var i=this._a*e.x+this._b*e.y+1*this._tx,n=this._c*e.x+this._d*e.y+1*this._ty;return new t.Point(i,n)},t.Matrix.prototype.isIdentity=function(){return 1==this._a&&0==this._b&&0==this._c&&1==this._d&&0==this._tx&&0==this._ty},t.Point=function(t,e){this.Init(t,e)},t.Obj.createSubclass(t.Point,t.Obj),t.Point.prototype.Init=function(t,e){this.x=null===t||isNaN(t)?0:t,this.y=null===e||isNaN(e)?0:e},t.Point.prototype.equals=function(e){return e instanceof t.Point&&this.x===e.x&&this.y===e.y},t.Rectangle=function(t,e,i,n){this.x=null===t||isNaN(t)?0:t,this.y=null===e||isNaN(e)?0:e,this.w=null===i||isNaN(i)?0:i,this.h=null===n||isNaN(n)?0:n},t.Obj.createSubclass(t.Rectangle,t.Obj),t.Rectangle.create=function(e){return new t.Rectangle(e[0],e[1],e[2],e[3])},t.Rectangle.prototype.containsPoint=function(t,e){return t>=this.x&&t<=this.x+this.w&&e>=this.y&&e<=this.y+this.h},t.Rectangle.prototype.getCenter=function(){return new t.Point(this.x+this.w/2,this.y+this.h/2)},t.Rectangle.prototype.getUnion=function(e){var i=new t.Rectangle;if(e&&0!==e.w&&0!==e.h)if(0!==this.w&&0!==this.h){var n=this.x+this.w,o=this.y+this.h,r=e.x+e.w,s=e.y+e.h,a=Math.min(this.x,e.x),l=Math.min(this.y,e.y);i.w=n<r?r-a:n-a,i.h=o>s?o-l:s-l,i.x=a,i.y=l}else i.x=e.x,i.y=e.y,i.w=e.w,i.h=e.h;else i.x=this.x,i.y=this.y,i.w=this.w,i.h=this.h;return i},t.Rectangle.prototype.getIntersection=function(e){var i=new t.Rectangle;if(!e||0===e.w||0===e.h)return null;if(0===this.w||0===this.h)return null;var n=this.x+this.w,o=this.y+this.h,r=e.x+e.w,s=e.y+e.h,a=Math.max(this.x,e.x),l=Math.max(this.y,e.y);return a>=n||a>=r||l>=o||l>=s?null:(i.w=n<r?n-a:r-a,i.h=o>s?s-l:o-l,i.x=a,i.y=l,i)},t.Rectangle.prototype.grow=function(t,e){var i=this.x,n=this.y,o=this.x+this.w,r=this.y+this.h;t<i&&(i=t),t>o&&(o=t),e<n&&(n=e),e>r&&(r=e),this.x=i,this.y=n,this.w=o-i,this.h=r-n},t.Rectangle.prototype.intersects=function(t){if(t&&0!==t.w&&0!==t.h&&0!==this.w&&0!==this.h){var e=this.x+this.w,i=this.y+this.h,n=t.x+t.w,o=t.y+t.h;return!(t.x>e||n<this.x||t.y>i||o<this.y)}return!1},t.Rectangle.prototype.clone=function(){return new t.Rectangle(this.x,this.y,this.w,this.h)},t.Rectangle.prototype.equals=function(e){return e instanceof t.Rectangle&&this.x==e.x&&this.y==e.y&&this.w==e.w&&this.h==e.h},t.Rectangle.prototype.toString=function(){return this.x+", "+this.y+", "+this.w+", "+this.h},t.VectorUtils={},t.Obj.createSubclass(t.VectorUtils,t.Obj),t.VectorUtils.createVector=function(t,e){var i={};return i.x=t,i.y=e,i},t.VectorUtils.addVectors=function(e,i){return t.VectorUtils.createVector(e.x+i.x,e.y+i.y)},t.VectorUtils.subtractVectors=function(e,i){return t.VectorUtils.createVector(e.x-i.x,e.y-i.y)},t.VectorUtils.scaleVector=function(e,i){return t.VectorUtils.createVector(e.x*i,e.y*i)},t.VectorUtils.getMagnitude=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},t.Array2D=function(){this.Init()},t.Obj.createSubclass(t.Array2D,t.Obj),t.Array2D.prototype.Init=function(){this._data=[]},t.Array2D.prototype.get=function(t,e){return this._getInner(t)[e]},t.Array2D.prototype.put=function(t,e,i){var n=this._getInner(t),o=n[e];return n[e]=i,o},t.Array2D.prototype._getInner=function(t){var e=this._data[t];return e||(e=[],this._data[t]=e),e},t.Cache=function(t){this.Init(t)},t.Obj.createSubclass(t.Cache,t.Obj),t.Cache._TARGET_SIZE=1e3,t.Cache._BUFFER_SIZE=.5,t.Cache.prototype.Init=function(e){this._targetSize=null!=e?e:t.Cache._TARGET_SIZE,this._maxSize=Math.ceil(this._targetSize*(1+t.Cache._BUFFER_SIZE)),this._cache={},this._lruArray=[],this._hits=0,this._misses=0},t.Cache.prototype.get=function(t){var e=this._cache[t];return null!=e?(this._hits++,e):(this._misses++,null)},t.Cache.prototype.put=function(e,i){var n=null!=this._cache[e];if(this._cache[e]=i,n){var o=t.ArrayUtils.getIndex(this._lruArray,e);this._lruArray.splice(o,1),this._lruArray.push(e)}else if(this._lruArray.push(e),this._lruArray.length>this._maxSize)for(var r=this._lruArray.splice(0,this._maxSize-this._targetSize),s=0;s<r.length;s++)delete this._cache[r[s]]},t.Cache.prototype.toString=function(){var t="Cache Size: "+this._lruArray.length;return t+="\nHits: "+this._hits,t+="\nMisses: "+this._misses,t+="\nHit %: "+Math.round(1e4*this._hits/(this._hits+this._misses))/100},t.DragAndDropUtils={},t.Obj.createSubclass(t.DragAndDropUtils,t.Obj),t.DragAndDropUtils.getDragFeedbackBounds=function(t,e){if(!t)return null;var i=null;if(t instanceof Array){if(t.length>0){i=t[0].getDimensions(e||t[0].getParent());for(var n=1;n<t.length;n++){var o=t[n],r=o.getDimensions(e||o.getParent());r.x<i.x&&(i.w+=i.x-r.x,i.x=r.x),r.y<i.y&&(i.h+=i.y-r.y,i.y=r.y),r.x+r.w>i.x+i.w&&(i.w=r.x+r.w-i.x),r.y+r.h>i.y+i.h&&(i.h=r.y+r.h-i.y)}}}else i=t.getDimensions(e||t.getParent());return i},t.LayoutUtils={},t.Obj.createSubclass(t.LayoutUtils,t.Obj),t.LayoutUtils.position=function(e,i,n,o,r,s){n&&(s=o*r>0?s:0,"start"==i?i=t.Agent.isRightToLeft(n.getCtx())?"right":"left":"end"==i&&(i=t.Agent.isRightToLeft(n.getCtx())?"left":"right"),"top"==i?(n.setTranslate(e.x+e.w/2-o/2,e.y),e.y+=r+s,e.h-=r+s):"bottom"==i?(n.setTranslate(e.x+e.w/2-o/2,e.y+e.h-r),e.h-=r+s):"left"==i?(n.setTranslate(e.x,e.y+e.h/2-r/2),e.x+=o+s,e.w-=o+s):"right"==i&&(n.setTranslate(e.x+e.w-o,e.y+e.h/2-r/2),e.w-=o+s))},t.LayoutUtils.align=function(e,i,n,o){if(n){var r=i;"start"==r?r=t.Agent.isRightToLeft(n.getCtx())?"right":"left":"end"==r&&(r=t.Agent.isRightToLeft(n.getCtx())?"left":"right"),"left"==r?n.setX(e.x):"center"==r?n.setX(e.x+e.w/2-o/2):"right"==r&&n.setX(e.x+e.w-o)}},t.LayoutUtils.getBubbleSize=function(t,e,i,n,o){if(t<=0)return 0;var r=n*n,s=o*o;if(i/e<s/r){var a=Math.sqrt(r*s),l=Math.sqrt(e*i);if(t==l)return Math.sqrt(a);s=i/l*a,r=e/l*a}var h=r+(t-e)/(i-e)*(s-r);return Math.sqrt(h)},t.Math=new Object,t.Obj.createSubclass(t.Math,t.Obj),t.Math.RADS_PER_DEGREE=Math.PI/180,t.Math.DEGREES_PER_RAD=180/Math.PI,t.Math.TWO_PI=2*Math.PI,t.Math.HALF_PI=Math.PI/2,t.Math.QUARTER_PI=Math.PI/4,t.Math.TOLERANCE=.1,t.Math.cantorPairing=function(t,e){return t<0||e<0?-1:(t+e)*(t+e+1)/2+t},t.Math.degreesToRads=function(e){return e*t.Math.RADS_PER_DEGREE},t.Math.radsToDegrees=function(e){return e*t.Math.DEGREES_PER_RAD},t.Math.interpolateNumber=function(t,e,i){return t+i*(e-t)},t.Math.log10=function(t){return Math.log(t)/Math.LN10},t.Math.calculateAngleBetweenTwoVectors=function(e,i,n,o){var r=Math.atan2(o,n)-Math.atan2(i,e);return r<0?r+t.Math.TWO_PI:r},t.Map2D=function(){this.Init()},t.Obj.createSubclass(t.Map2D,t.Obj),t.Map2D.prototype.Init=function(){this._map={}},t.Map2D.prototype.get=function(t,e){return this._getInnerMap(t)[e]},t.Map2D.prototype.put=function(t,e,i){var n=this._getInnerMap(t),o=n[e];return n[e]=i,o},t.Map2D.prototype._getInnerMap=function(t){var e=this._map[t];return e||(e={},this._map[t]=e),e},t.PixelMap=function(t,e){this.Init(t,e)},t.Obj.createSubclass(t.PixelMap,t.Array2D),t.PixelMap._INITIAL_SIZE=1500,t.PixelMap.prototype.Init=function(e,i){t.PixelMap.superclass.Init.call(this),this._innerMap=i,this._innerMap&&(this._innerMap._outerMap=this,this._innerMap._bOuterMap=!0),this._scale=e||1,this._capacity=this._scale*this._scale,this._bInnerMap=null!=this._innerMap,this._bOuterMap=!1;for(var n=t.PixelMap._INITIAL_SIZE/this._scale,o=0;o<n;o++)for(var r=0;r<n;r++)this.put(o,r,0)},t.PixelMap.prototype.isObscured=function(t,e,i,n){for(var o=this._adjustForScale(t),r=this._adjustForScale(e),s=this._adjustForScale(i),a=this._adjustForScale(n),l=o;l<=s;l++)for(var h=r;h<=a;h++){if(!0!==this.get(l,h)){if(!this._bInnerMap)return!1;var u=Math.max(t,l*this._scale),c=Math.max(e,h*this._scale),p=Math.min(i,(l+1)*this._scale-1),_=Math.min(n,(h+1)*this._scale-1);if(!this._innerMap.isObscured(u,c,p,_))return!1}}return!0},t.PixelMap.prototype.obscure=function(t,e,i,n,o){for(var r=this._adjustForScale(t),s=this._adjustForScale(e),a=this._adjustForScale(i),l=this._adjustForScale(n),h=r;h<=a;h++)for(var u=s;u<=l;u++){if(!0!==this.get(h,u))if(this._bInnerMap){var c=Math.max(t,h*this._scale),p=Math.max(e,u*this._scale),_=Math.min(i,(h+1)*this._scale-1),g=Math.min(n,(u+1)*this._scale-1);this._innerMap.obscure(c,p,_,g,o)}else this._increment(h,u,o)}},t.PixelMap.prototype._increment=function(t,e,i){var n=this._adjustForScale(t),o=this._adjustForScale(e),r=this.get(n,o);(r=null!=r?r+i:i)>=this._capacity&&(r=!0),this.put(n,o,r),!0===r&&this._bOuterMap&&this._outerMap._increment(t,e,this._capacity)},t.PixelMap.prototype._adjustForScale=function(t){return Math.floor(t/this._scale)},t.PropMap=function(){this.Init()},t.PropMap.REGEXP=new RegExp("#\\{([^\\}]*)\\}","g"),t.Obj.createSubclass(t.PropMap,t.Obj),t.PropMap.prototype.Init=function(){this._props={}},t.PropMap.prototype.getProperty=function(t){return this._props[t]},t.PropMap.prototype.setProperty=function(t,e){this._props[t]=e},t.PropMap.prototype.getStringProp=function(t,e){var i=this._props[t];return i||e},t.PropMap.prototype.getBooleanProp=function(t,e){var i=this._props[t],n=e;return"boolean"==typeof i?n=i:0===i?n=!1:1===i?n=!0:"string"==typeof i&&(n="true"===i.toLowerCase()||"yes"===i.toLowerCase()||"on"===i.toLowerCase()),n},t.PropMap.prototype.getIntegerProp=function(t,e){var i,n=this._props[t];return n&&(i=parseInt(n)),i||e},t.PropMap.prototype.getFloatProp=function(t,e){var i,n=this._props[t];return n&&(i=parseFloat(n)),i||e},t.PropMap.prototype.getId=function(){return this.getProperty("id")},t.PropMap.prototype.setId=function(t){this.setProperty("id",t)},t.PropMap.prototype.setProperties=function(t){for(var e=0;e<t.length;e++){var i=t[e];i.name&&void 0!==i.value&&this.setProperty(i.name,i.value)}},t.PropMap.prototype.stamp=function(e){var i=new this.constructor,n={};for(var o in this._props)this._props[o]&&this._props[o].replace?n[o]=this._props[o].replace(t.PropMap.REGEXP,function(t,i){return e&&void 0!==e[i]?e[i]:t}):n[o]=this._props[o];return i._props=n,i},t.PropMap.toELContext=function(t){for(var e,i=t.getAttributes(),n={},o=0;o<i.length;o++)n[(e=i[o]).name]=e.value;return n},t.ImageLoader={},t.Obj.createSubclass(t.ImageLoader,t.Obj),t.ImageLoader.loadImage=function(t,e,i){return t.getImplFactory().getImageLoader().loadImage(e,i)},t.JsonUtils=new Object,t.Obj.createSubclass(t.JsonUtils,t.Obj),t.JsonUtils.clone=function(e,i,n){if(null==e)return null;var o=null;if(e instanceof Array){o=[];for(var r=0;r<e.length;r++)t.JsonUtils._isDeepClonable(e[r])?o[r]=t.JsonUtils.clone(e[r],i,n):o[r]=e[r]}else if(e instanceof t.CSSStyle)o=e.clone();else if(e instanceof Date)o=e.getTime();else if(t.JsonUtils._isClonableObject(e))for(var s in o={},e)if(!i||i(s)){var a=e[s];if(n&&1==n[s]||!t.JsonUtils._isDeepClonable(a)||"_widgetConstructor"==s)o[s]=a;else{var l=n?n[s]:null;o[s]=t.JsonUtils.clone(a,i,l)}}return o},t.JsonUtils.merge=function(e,i,n){var o=t.JsonUtils.clone(e,null,n),r=t.JsonUtils.clone(i,null,n);return null==o?r:null==r?o:(t.JsonUtils._copy(o,r),r)},t.JsonUtils._copy=function(e,i){for(var n in e){var o=e[n];void 0!==o&&(o&&o instanceof Array||"_widgetConstructor"==n?i[n]=o:i[n]&&i[n]instanceof t.CSSStyle?o instanceof t.CSSStyle?i[n].merge(o):i[n].merge(new t.CSSStyle(o)):t.JsonUtils._isDeepClonable(o)&&i[n]?t.JsonUtils._copy(o,i[n]):i[n]=o)}},t.JsonUtils._isDeepClonable=function(t){return t instanceof Object&&(!t.has&&!(t instanceof Boolean||t instanceof String||t instanceof Number||t instanceof Function||t.then))},t.JsonUtils._isClonableObject=function(t){return t instanceof Object&&(!t.then&&(!t.jquery&&(!t.has&&(!("undefined"!=typeof NodeList&&t instanceof NodeList)&&!("undefined"!=typeof Node&&t instanceof Node)))))},t.BaseEvent=function(){},t.Obj.createSubclass(t.BaseEvent,t.Obj),t.BaseEvent.prototype.Init=function(e){this.type=e.type,this.type=this.type,this.target=t.BaseEvent.FindDisplayable(e.target),this._isPropagationStopped=!1,this._event=e},t.BaseEvent.prototype.getNativeEvent=function(){return this._event},t.BaseEvent.prototype.preventDefault=function(){this._event.cancelable&&this._event.preventDefault()},t.BaseEvent.prototype.stopPropagation=function(){this._event.stopPropagation&&this._event.stopPropagation(),this._event.cancelBubble=!0,this._event.cancel=!0,this._event.returnValue=!1,this._isPropagationStopped=!0},t.BaseEvent.prototype.isPropagationStopped=function(){return this._isPropagationStopped},t.BaseEvent.prototype.getType=function(){return this.type},t.BaseEvent.FindDisplayable=function(t){for(;t;){if(t._obj&&t._obj.getObj&&t._obj.getObj())return t._obj.getObj();t=t.parentNode}return null},t.BaseComponentEvent=function(){},t.Obj.createSubclass(t.BaseComponentEvent,t.Obj),t.BaseComponentEvent.CLIENT_ROW_KEY="clientRowKey",t.BaseComponentEvent.prototype.Init=function(t){this._type=t,this.type=t},t.BaseComponentEvent.prototype.getType=function(){return this._type},t.BaseComponentEvent.prototype.addParam=function(t,e){this._paramKeys||(this._paramKeys=[],this._paramValues=[]),this._paramKeys.push(t),this._paramValues.push(e),this[t]=e},t.BaseComponentEvent.prototype.getParamValue=function(t){if(!t||!this._paramKeys||!this._paramValues)return null;for(var e=-1,i=0;i<this._paramKeys.length;i++)if(this._paramKeys[i]==t){e=i;break}return-1!=e?this._paramValues[e]:this[t]};var f=function(t){this.Init(t)};t.Obj.createSubclass(f,t.BaseEvent),f.FOCUS=t.Obj.defineConstant("focus"),f.FOCUSIN=t.Obj.defineConstant("focusin"),f.FOCUSOUT=t.Obj.defineConstant("focusout"),f.BLUR=t.Obj.defineConstant("blur"),f.prototype.Init=function(e){f.superclass.Init.call(this,e),this.bubbles=e.bubbles,this.cancelable=e.cancelable,this.view=e.view,null!=e.relatedTarget&&(this.relatedTarget=t.BaseEvent.FindDisplayable(e.relatedTarget))},t.KeyboardEvent=function(t){this.Init(t)},t.Obj.createSubclass(t.KeyboardEvent,t.BaseEvent),t.KeyboardEvent.KEYDOWN=t.Obj.defineConstant("keydown"),t.KeyboardEvent.KEYUP=t.Obj.defineConstant("keyup"),t.KeyboardEvent.KEYPRESS=t.Obj.defineConstant("keypress"),t.KeyboardEvent.TAB=9,t.KeyboardEvent.ENTER=13,t.KeyboardEvent.SHIFT=16,t.KeyboardEvent.CONTROL=17,t.KeyboardEvent.HOME=36,t.KeyboardEvent.END=35,t.KeyboardEvent.ESCAPE=27,t.KeyboardEvent.SPACE=32,t.KeyboardEvent.PAGE_UP=33,t.KeyboardEvent.PAGE_DOWN=34,t.KeyboardEvent.UP_ARROW=38,t.KeyboardEvent.DOWN_ARROW=40,t.KeyboardEvent.DELETE=46,t.KeyboardEvent.LEFT_ARROW=37,t.KeyboardEvent.RIGHT_ARROW=39,t.KeyboardEvent.OPEN_BRACKET=219,t.KeyboardEvent.CLOSE_BRACKET=221,t.KeyboardEvent.BACK_SLASH=220,t.KeyboardEvent.FORWARD_SLASH=191,t.KeyboardEvent.ZERO=48,t.KeyboardEvent.NUMPAD_ZERO=96,t.KeyboardEvent.ONE=49,t.KeyboardEvent.NUMPAD_ONE=97,t.KeyboardEvent.TWO=50,t.KeyboardEvent.NUMPAD_TWO=98,t.KeyboardEvent.THREE=51,t.KeyboardEvent.NUMPAD_THREE=99,t.KeyboardEvent.FOUR=52,t.KeyboardEvent.NUMPAD_FOUR=100,t.KeyboardEvent.FIVE=53,t.KeyboardEvent.NUMPAD_FIVE=101,t.KeyboardEvent.SIX=54,t.KeyboardEvent.NUMPAD_PLUS=107,t.KeyboardEvent.NUMPAD_MINUS=109,t.KeyboardEvent.WEBKIT_PLUS=187,t.KeyboardEvent.WEBKIT_MINUS=189,t.KeyboardEvent.GECKO_PLUS=61,t.KeyboardEvent.GECKO_MINUS=173,t.KeyboardEvent.WEBKIT_SEMICOLON=186,t.KeyboardEvent.GECKO_SEMICOLON=59,t.KeyboardEvent.A=65,t.KeyboardEvent.F=70,t.KeyboardEvent.L=76,t.KeyboardEvent.M=77,t.KeyboardEvent.N=78,t.KeyboardEvent.PERIOD=190,t.KeyboardEvent.NUMPAD_PERIOD=110,t.KeyboardEvent.SINGLE_QUOTE=222,t.KeyboardEvent.STAR=56,t.KeyboardEvent.NUMPAD_STAR=144,t.KeyboardEvent.OPEN_ANGLED_BRACKET=188,t.KeyboardEvent.CLOSE_ANGLED_BRACKET=190,t.KeyboardEvent.GRAVE_ACCENT=192,t.KeyboardEvent.prototype.Init=function(e){t.KeyboardEvent.superclass.Init.call(this,e),this.bubbles=e.bubbles,this.cancelable=e.cancelable,this.view=e.view,this.charCode=e.charCode,this.keyCode=e.keyCode,this.location=e.location,this.ctrlKey=e.ctrlKey||e.metaKey,this.altKey=e.altKey,this.shiftKey=e.shiftKey,this.repeat=e.repeat,this.locale=e.locale},t.KeyboardEvent.isPlus=function(e){var i=e.keyCode;return i==t.KeyboardEvent.NUMPAD_PLUS||(t.Agent.isPlatformGecko()?!(i!=t.KeyboardEvent.GECKO_PLUS||!e.shiftKey):!(i!=t.KeyboardEvent.WEBKIT_PLUS||!e.shiftKey))},t.KeyboardEvent.isEquals=function(e){var i=e.keyCode;return t.Agent.isPlatformGecko()?i==t.KeyboardEvent.GECKO_PLUS&&!e.shiftKey:i==t.KeyboardEvent.WEBKIT_PLUS&&!e.shiftKey},t.KeyboardEvent.isMinus=function(e){var i=e.keyCode;return i==t.KeyboardEvent.NUMPAD_MINUS||(t.Agent.isPlatformGecko()?i==t.KeyboardEvent.GECKO_MINUS&&!e.shiftKey:i==t.KeyboardEvent.WEBKIT_MINUS&&!e.shiftKey)},t.KeyboardEvent.isUnderscore=function(e){var i=e.keyCode;return t.Agent.isPlatformGecko()?!(i!=t.KeyboardEvent.GECKO_MINUS||!e.shiftKey):!(i!=t.KeyboardEvent.WEBKIT_MINUS||!e.shiftKey)},t.KeyboardEvent.isSemicolon=function(e){var i=e.keyCode;return t.Agent.isPlatformGecko()?i==t.KeyboardEvent.GECKO_SEMICOLON:i==t.KeyboardEvent.WEBKIT_SEMICOLON},t.MouseEvent=function(t){this.Init(t)},t.Obj.createSubclass(t.MouseEvent,t.BaseEvent),t.MouseEvent.CLICK=t.Obj.defineConstant("click"),t.MouseEvent.DBLCLICK=t.Obj.defineConstant("dblclick"),t.MouseEvent.MOUSEOVER=t.Obj.defineConstant("mouseover"),t.MouseEvent.MOUSEOUT=t.Obj.defineConstant("mouseout"),t.MouseEvent.MOUSEDOWN=t.Obj.defineConstant("mousedown"),t.MouseEvent.MOUSEUP=t.Obj.defineConstant("mouseup"),t.MouseEvent.MOUSEMOVE=t.Obj.defineConstant("mousemove"),t.MouseEvent.MOUSEWHEEL=t.Obj.defineConstant("wheel"),t.MouseEvent.RIGHT_CLICK_BUTTON=2,t.MouseEvent.prototype.Init=function(e){t.MouseEvent.superclass.Init.call(this,e),null!=e.relatedTarget&&(this.relatedTarget=t.BaseEvent.FindDisplayable(e.relatedTarget)),this.button=e.button,this.ctrlKey=e.ctrlKey||e.metaKey,this.shiftKey=e.shiftKey,this.pageX=e.pageX,this.pageY=e.pageY,this._isEventModifiedForIE=!1,null!=e.wheelDeltaY?this.wheelDelta=e.wheelDeltaY/40:null!=e.deltaY?(this.deltaMode=e.deltaMode,this.deltaY=e.deltaY,e.deltaMode==e.DOM_DELTA_LINE?this.wheelDelta=-e.deltaY:e.deltaMode==e.DOM_DELTA_PIXEL&&(this.wheelDelta=-e.deltaY/15)):null!=e.wheelDelta?this.wheelDelta=e.wheelDelta/40:this.wheelDelta=e.detail},t.MouseEvent.prototype.modifyEventForIE=function(e,i){this._isEventModifiedForIE||(this.type=e,this.relatedTarget=this.target,this.target=t.BaseEvent.FindDisplayable(i),this._isEventModifiedForIE=!0)},t.TouchEvent=function(t){this.Init(t)},t.Obj.createSubclass(t.TouchEvent,t.BaseEvent),t.TouchEvent.TOUCHSTART=t.Obj.defineConstant("touchstart"),t.TouchEvent.TOUCHMOVE=t.Obj.defineConstant("touchmove"),t.TouchEvent.TOUCHEND=t.Obj.defineConstant("touchend"),t.TouchEvent.TOUCHCANCEL=t.Obj.defineConstant("touchcancel"),t.TouchEvent.prototype.Init=function(e){t.TouchEvent.superclass.Init.call(this,e),e.type==t.TouchEvent.TOUCHCANCEL&&(this.type=t.TouchEvent.TOUCHEND),this.touches=t.TouchEvent.createTouchArray(e.touches),this.targetTouches=t.TouchEvent.createTouchArray(e.targetTouches),this.changedTouches=t.TouchEvent.createTouchArray(e.changedTouches),this._touchManager=null},t.TouchEvent.prototype.blockTouchHold=function(){this.getNativeEvent()._touchHoldBlocked=!0},t.TouchEvent.prototype.isInitialTouch=function(){return this.touches.length-this.changedTouches.length==0},t.TouchEvent.prototype.isTouchHoldBlocked=function(){return!!this.getNativeEvent()._touchHoldBlocked},t.TouchEvent.createTouchArray=function(e){for(var i=new Array,n=0;n<e.length;n++){var o=e[n],r=new t.Touch(o);i.push(r)}return i},t.TouchEvent.prototype.stopPropagation=function(){t.TouchEvent.superclass.stopPropagation.call(this),this._touchManager&&this._touchManager.postEventBubble(this)},t.TouchEvent.prototype.setTouchManager=function(t){this._touchManager=t},t.Touch=function(t){this.Init(t)},t.Obj.createSubclass(t.Touch,t.Obj),t.Touch.prototype.Init=function(t){this.clientX=t.clientX,this.clientY=t.clientY,this.screenX=t.screenX,this.screenY=t.screenY,this.pageX=t.pageX,this.pageY=t.pageY,this.target=t.target,this.identifier=null==t.identifier||isNaN(t.identifier)?1:t.identifier},t.TouchManager=function(t,e,i){this.Init(t,e,i)},t.Obj.createSubclass(t.TouchManager,t.Obj),t.TouchManager.TOUCH_MODE="mode",t.TouchManager.TOUCH_MODE_DEFAULT="defaultMode",t.TouchManager.TOUCH_MODE_LONG_PRESS="longPressMode",t.TouchManager.PREV_HOVER_OBJ="prevHoverObj",t.TouchManager.HOVER_TOUCH_KEY="hoverTouch",t.TouchManager.prototype.Init=function(e,i,n){this._context=i,this._id=e,this._eventManager=n,this._touchCount=0,this._touchHoldTimer=new t.Timer(this._context,200,this._handleTouchHoldStartTimer,this),this._blockTouchHold=!1,this._touchMap=new Object,this._savedTouchInfo=new Array,this._addTouchHoldMoveEventListener(this._onTouchHoldHover,this),this._doubleTapTimer=new t.Timer(this._context,600,this._handleDoubleTapTimer,this,1),this._dvtTouchEvent=null},t.TouchManager.prototype.blockTouchHold=function(){this._stopTouchHoldTimer(),this._blockTouchHold=!0},t.TouchManager.prototype.unblockTouchHold=function(){this._blockTouchHold=!1},t.TouchManager.prototype._addTouchHoldMoveEventListener=function(e,i){this.addTouchEventListener(t.ComponentTouchEvent.TOUCH_HOLD_START_TYPE,e,i),this.addTouchEventListener(t.ComponentTouchEvent.TOUCH_HOLD_MOVE_TYPE,e,i),this.addTouchEventListener(t.ComponentTouchEvent.TOUCH_HOLD_END_TYPE,e,i)},t.TouchManager.prototype._onTouchHoldHover=function(e){var i=e.getType(),n=e.touch,o=e.getNativeEvent(),r=this._touchMap[n.identifier],s=e.target;if(i==t.ComponentTouchEvent.TOUCH_HOLD_END_TYPE){var a=new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOVER_END_TYPE,n,s,null,o);a._isCancelEvent=this._isCancelEvent,null!=s&&this.FireListener(new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,n,s,null,o)),r[t.TouchManager.PREV_HOVER_OBJ]=null,this.FireListener(a)}else i==t.ComponentTouchEvent.TOUCH_HOLD_START_TYPE?(r[t.TouchManager.PREV_HOVER_OBJ]=null,null!=s&&this.FireListener(new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,n,s,null,o)),r[t.TouchManager.PREV_HOVER_OBJ]=s,this.FireListener(new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOVER_START_TYPE,n,s,null,o))):i==t.ComponentTouchEvent.TOUCH_HOLD_MOVE_TYPE&&(this._fireHoverOverOutEvents(s,r[t.TouchManager.PREV_HOVER_OBJ],n,o),r[t.TouchManager.PREV_HOVER_OBJ]=s,this.FireListener(new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE,n,s,null,o)))},t.TouchManager.prototype._getObjFromTouch=function(t){var e=null;if(t){var i=this._context.getDocumentUtils();i&&(e=i.elementFromTouch(t))}return e},t.TouchManager.prototype._fireHoverOverOutEvents=function(e,i,n,o){i!=e&&(null!=i&&this.FireListener(new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,n,i,e,o)),null!=e&&this.FireListener(new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,n,e,i,o)))},t.TouchManager.prototype.addTouchEventListener=function(t,e,i){var n=this._getListeners(t,!0);n.push(e),n.push(i)},t.TouchManager.prototype.removeTouchEventListener=function(t,e,i){var n=this._getListeners(t,!1);if(n)for(var o=0;o<n.length;o+=2)if(n[o]===e&&n[o+1]===i){n.splice(o,2);break}},t.TouchManager.prototype._getListeners=function(t,e){if(!this._listenerObj){if(!e)return null;this._listenerObj={}}var i=t,n=this._listenerObj[i];return!n&&e&&(n=[],this._listenerObj[i]=n),n},t.TouchManager.prototype.FireListener=function(t){var e=this._getListeners(t.getType(),!1);if(e)for(var i=0;i<e.length;i+=2){var n=e[i+1];e[i].call(n,t)}},t.TouchManager.prototype.startTouchHold=function(e){var i=this._startSingleFingerTouchId;if(null!=i&&!isNaN(i)){var n=this._touchMap[i];if(n){for(var o=n.startTarget,r=n.startTouch,s=e.getNativeEvent(),a=this._findMatches("touchId",i),l=0;l<a.length;l++){var h=a[l],u=h.touchObj,c=h.touchId;if(u!=t.TouchManager.HOVER_TOUCH_KEY){var p=this.getTouchInfo(c).startTouch;this.performAssociatedTouchEnd(p,u,null)}}n[t.TouchManager.TOUCH_MODE]=t.TouchManager.TOUCH_MODE_LONG_PRESS,this.saveProcessedTouch(i,t.TouchManager.HOVER_TOUCH_KEY,null,t.TouchManager.HOVER_TOUCH_KEY,t.TouchManager.HOVER_TOUCH_KEY,this.HoverMoveInternal,this.HoverEndInternal,this);var _=new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOLD_START_TYPE,r,o,null,s);this.FireListener(_)}}},t.TouchManager.prototype.fireLogicalEvents=function(e){var i=e.type,n=e.getNativeEvent();if(i==t.TouchEvent.TOUCHSTART?(e.isTouchHoldBlocked()||this.processAssociatedTouchAttempt(e,t.TouchManager.HOVER_TOUCH_KEY,this.HoverStartInternal,this),this._doubleTapAttemptStarted&&e.preventDefault()):i==t.TouchEvent.TOUCHMOVE?this.processAssociatedTouchMove(e,t.TouchManager.HOVER_TOUCH_KEY):i==t.TouchEvent.TOUCHEND&&this.processAssociatedTouchEnd(e,t.TouchManager.HOVER_TOUCH_KEY),i==t.TouchEvent.TOUCHEND)for(var o=this._getStoredTouches(e.changedTouches),r=0;r<o.length;r++){var s=o[r],a=s.identifier,l=this.getTouchInfo(a),h=l.currentObj;if(l[t.TouchManager.TOUCH_MODE]!=t.TouchManager.TOUCH_MODE_LONG_PRESS&&l.fireClick){var u=new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_CLICK_TYPE,s,h,null,n);if(u.touchEvent=e,this._doubleTapAttemptStarted){var c=this._doubleTapAttemptObj;if(this.resetDoubleTap(),h==c||c.contains(h)){var p=new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE,s,h,null,n);p.touchEvent=e,this.FireListener(p)}else this.FireListener(u)}else this.FireListener(u),this.resetDoubleTap(),this._doubleTapTimer.start(),this._doubleTapAttemptStarted=!0,this._doubleTapAttemptObj=h}}},t.TouchManager.prototype.getTouchInfo=function(t){return this._touchMap[t]},t.TouchManager.prototype.HoverStartInternal=function(t,e){if(!this._blockTouchHold){var i=e.identifier;this._startSingleFingerTouchId=i,this._stopTouchHoldTimer(),this._startTouchHoldTimer(t)}},t.TouchManager.prototype.HoverMoveInternal=function(e,i){var n=i.identifier,o=this.getTouchInfo(n).currentObj,r=new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOLD_MOVE_TYPE,i,o,null,e.getNativeEvent());this.FireListener(r),e.preventDefault()},t.TouchManager.prototype.HoverEndInternal=function(e,i){var n=i.identifier,o=this.getTouchInfo(n).currentObj,r=new t.ComponentTouchEvent(t.ComponentTouchEvent.TOUCH_HOLD_END_TYPE,i,o,null,e.getNativeEvent());this.FireListener(r),e&&e.preventDefault()},t.TouchManager.prototype.resetTouchHold=function(){this._startSingleFingerTouchId=null,this._stopTouchHoldTimer()},t.TouchManager.prototype.preEventBubble=function(e){e.setTouchManager&&e.setTouchManager(this);var i=e.type;i==t.TouchEvent.TOUCHSTART?this.processTouchStart(e):i==t.TouchEvent.TOUCHMOVE?this.processTouchMove(e):i==t.TouchEvent.TOUCHEND&&this.processTouchEnd(e)},t.TouchManager.prototype.postEventBubble=function(e){var i=e.type;if(i==t.TouchEvent.TOUCHSTART);else if(i==t.TouchEvent.TOUCHMOVE);else if(i==t.TouchEvent.TOUCHEND)for(var n=this._getStoredTouches(e.changedTouches),o=0;o<n.length;o++){var r=n[o].identifier;delete this._touchMap[r],this._startSingleFingerTouchId==r&&(this._startSingleFingerTouchId=null);for(var s=this._findMatches("touchId",r),a=0;a<s.length;a++){var l=s[a];this.removeTooltipInfo(l.touchId,l.touchObj)}}},t.TouchManager.prototype.saveProcessedTouch=function(e,i,n,o,r,s,a,l){if(null!=e&&!isNaN(e)){var h=t.TouchManager.createSavedTouchInfo(e,i,n,o,r,s,a,l);return this._savedTouchInfo.push(h),!0}return!1},t.TouchManager.prototype.saveProcessedTouchDefault=function(t,e,i,n,o,r){var s=null;r.immediateTouchMoved&&(s=r.immediateTouchMoved);var a=null;r.immediateTouchEnded&&(a=r.immediateTouchEnded),this.saveProcessedTouch(t,e,i,n,o,s,a,r)},t.TouchManager.prototype.processAssociatedTouch=function(e,i,n,o){var r=e.type;r==t.TouchEvent.TOUCHSTART?this.processAssociatedTouchAttempt(e,i,n,o):r==t.TouchEvent.TOUCHMOVE?this.processAssociatedTouchMove(e,i):r==t.TouchEvent.TOUCHEND&&this.processAssociatedTouchEnd(e,i)},t.TouchManager.prototype.processAssociatedTouchDefault=function(t,e){this.processAssociatedTouch(t,e,e.immediateTouchAttempted,e)},t.TouchManager.prototype.cancelTouchHold=function(){for(var e=t.TouchManager.HOVER_TOUCH_KEY,i=this.getTouchIdsForObj(e),n=0;n<i.length;n++){var o=i[n],r=this.getTouchInfo(o).startTouch;r&&(this._isCancelEvent=!0,this.performAssociatedTouchEnd(r,e,null),this._isCancelEvent=!1,delete this._touchMap[o])}},t.TouchManager.prototype.performAssociatedTouchEnd=function(t,e,i){for(var n=t.identifier,o=this._getSavedTouchInfo(n,e),r=0;r<o.length;r++){var s=o[r],a=s.listenerObj,l=s.endListener;this.removeTooltipInfo(n,e),l&&l.call(a,i,t,s)}},t.TouchManager.prototype.processAssociatedTouchAttempt=function(t,e,i,n){for(var o=t.changedTouches,r=0;r<o.length;r++){var s=o[r];s&&i&&i.call(n,t,s)}},t.TouchManager.prototype.processAssociatedTouchMove=function(e,i){for(var n=this.getTouchIdsForObj(i),o=0;o<n.length;o++){var r=n[o];if(null!=r&&!isNaN(r)){var s=t.TouchManager.getTouchById(r,this._getStoredTouches(e.changedTouches));if(s){var a=this._getSavedTouchInfo(s.identifier,i);for(o=0;o<a.length;o++){var l=a[o],h=l.listenerObj,u=l.moveListener;u&&u.call(h,e,s)}}}}},t.TouchManager.prototype.processAssociatedTouchEnd=function(e,i){for(var n=this.getTouchIdsForObj(i),o=0;o<n.length;o++){var r=n[o],s=t.TouchManager.getTouchById(r,this._getStoredTouches(e.changedTouches));s&&this.performAssociatedTouchEnd(s,i,e)}},t.TouchManager.prototype._findMatch=function(t,e){for(var i=-1,n=0;n<this._savedTouchInfo.length;n++){this._savedTouchInfo[n][t]==e&&(i=n)}return i},t.TouchManager.prototype._findMatches=function(t,e){for(var i=new Array,n=0;n<this._savedTouchInfo.length;n++){var o=this._savedTouchInfo[n];o[t]==e&&i.push(o)}return i},t.TouchManager.prototype._getSavedTouchInfo=function(t,e){for(var i=this._findMatches("touchId",t),n=[],o=0;o<i.length;o++){var r=i[o];r.touchObj==e&&n.push(r)}return n},t.TouchManager.prototype.containsTouchId=function(t){return this._findMatches("touchId",t).length>0},t.TouchManager.prototype.getTouchIdsForObj=function(t){for(var e=new Array,i=this._findMatches("touchObj",t),n=0;n<i.length;n++){var o=i[n].touchId;e.push(o)}return e},t.TouchManager.prototype.removeTooltipInfo=function(t,e){for(var i=this._findMatches("touchId",t),n=new Array,o=0;o<i.length;o++){(l=i[o]).touchObj==e&&n.push(l)}for(o=0;o<n.length;o++){for(var r=n[o],s=-1,a=0;a<this._savedTouchInfo.length;a++){var l;(l=this._savedTouchInfo[a])==r&&(s=a)}-1!=s&&(this._savedTouchInfo.splice(s,1),0==this._savedTouchInfo.length&&this._context.getTooltipManager().hideTooltip())}},t.TouchManager.prototype.setTooltipEnabled=function(t,e){for(var i=this._savedTouchInfo,n=0;n<i.length;n++){var o=i[n];o.touchId==t&&(o.allowTooltips=e)}},t.TouchManager.prototype.getTooltipInfo=function(){for(var t=new Object,e=new Array,i=null,n=null,o=!1,r=this._findMatches("allowTooltips",!0),s=0;s<r.length;s++){var a,l=r[s],h=l.touchId;n?l.grouping!=n&&(o=!0):n=l.grouping;var u=this._touchMap[h];u&&(a=u.currentObj),l.tooltipObjOverride&&(a=l.tooltipObjOverride),e.push(h),i=a}return o&&(e=new Array),t.touchIds=e,t.tooltipTarget=i,t},t.TouchManager.prototype.containsGrouping=function(t){return this._findMatches("grouping",t).length>0},t.TouchManager.prototype.processTouchStart=function(e){var i=e.changedTouches,n=e.touches;this._touchCount=n.length;for(var o=0;o<i.length;o++){var r=i[o],s=r.screenX,a=r.screenY,l=r.identifier,h=this._getObjFromTouch(r),u={x:s,y:a,prevX:s,prevY:a,pageX:r.pageX,pageY:r.pageY,prevPageX:r.pageX,prevPageY:r.pageY,dx:0,dy:0,fireClick:!0,startTarget:h,currentObj:h,touchMoved:!1,touchtype:null,startTouch:r};u[t.TouchManager.TOUCH_MODE]=t.TouchManager.TOUCH_MODE_DEFAULT,u.origx=s,u.origy=a,this._touchMap[l]=u}return!this._isHovering()&&this._isTouchHoldAllowed()||e.blockTouchHold(),!0},t.TouchManager.prototype._isTouchHoldAllowed=function(){var t=!1,e=0;for(var i in this._touchMap){this.getTouchInfo(i).touchMoved&&(t=!0),e++}return!(e>1&&!t)||(this.resetTouchHold(),!1)},t.TouchManager.prototype._isHovering=function(){for(var e in this._touchMap){if(this.getTouchInfo(e)[t.TouchManager.TOUCH_MODE]==t.TouchManager.TOUCH_MODE_LONG_PRESS)return!0}return!1},t.TouchManager.prototype._getStoredTouches=function(t){for(var e=new Array,i=0;i<t.length;i++){var n=t[i],o=n.identifier;this.getTouchInfo(o)&&e.push(n)}return e},t.TouchManager.prototype.processTouchMove=function(e){for(var i=this._getStoredTouches(e.changedTouches),n=this._getStoredTouches(e.touches),o=0;o<i.length;o++){var r=i[o],s=this._getObjFromTouch(r),a=r.identifier;if((c=this.getTouchInfo(a)).currentObj=s,c.touchMoved=!0,c[t.TouchManager.TOUCH_MODE]!=t.TouchManager.TOUCH_MODE_LONG_PRESS){var l=Math.abs(c.pageX-r.pageX),h=Math.abs(c.pageY-r.pageY);this._startSingleFingerTouchId==a&&(l>0||h>0)&&this.resetTouchHold(),c.touchMoved=l>3||h>3}(c.touchMoved||c.fireClick&&c[t.TouchManager.TOUCH_MODE]!=t.TouchManager.TOUCH_MODE_LONG_PRESS&&c.currentObj!=c.startTarget&&c.currentObj!=this._eventManager.getMarqueeGlassPane())&&(c.fireClick=!1)}for(o=0;o<n.length;o++){var u=(r=n[o]).identifier,c=this.getTouchInfo(u),p=r.screenX,_=r.screenY,g=p-c.x,d=_-c.y;c.prevX=c.x,c.prevY=c.y,c.dx=g,c.dy=d,c.x=p,c.y=_,c.prevPageX=c.pageX,c.prevPageY=c.pageY,c.pageX=r.pageX,c.pageY=r.pageY}return!0},t.TouchManager.prototype.processTouchEnd=function(e){var i=e.changedTouches;this._touchCount=e.touches.length;for(var n=0;n<i.length;n++){var o=i[n],r=this._getObjFromTouch(o),s=o.identifier,a=this.getTouchInfo(s);if(a&&a.fireClick)if(a[t.TouchManager.TOUCH_MODE]==t.TouchManager.TOUCH_MODE_LONG_PRESS)this._startSingleFingerTouchId=null;else{var l=r==a.startTarget,h=a.touchMoved,u=l&&!h;a.fireClick=u}}return!0},t.TouchManager.getTouchById=function(t,e){if(null!=t&&!isNaN(t))for(var i=0;i<e.length;i++){var n=e[i];if(n.identifier==t)return n}return null},t.TouchManager.createSavedTouchInfo=function(t,e,i,n,o,r,s,a){var l={touchId:t,tooltipObjOverride:i,grouping:n,type:o,touchObj:e,allowTooltips:!0};return l.moveListener=r,l.endListener=s,l.listenerObj=a,l},t.TouchManager.prototype._handleTouchHoldStartTimer=function(){var t=this._dvtTouchEvent;this._stopTouchHoldTimer(),this.startTouchHold(t)},t.TouchManager.prototype._startTouchHoldTimer=function(t){this._dvtTouchEvent=t,this._touchHoldTimer&&this._touchHoldTimer.start()},t.TouchManager.prototype._stopTouchHoldTimer=function(){this._dvtTouchEvent=null,this._touchHoldTimer&&this._touchHoldTimer.stop()},t.TouchManager.prototype._handleDoubleTapTimer=function(){this.resetDoubleTap()},t.TouchManager.prototype.resetDoubleTap=function(){this._doubleTapAttemptStarted=!1,this._doubleTapAttemptObj=null,this._doubleTapTimer.stop()},t.TouchManager.prototype.getMultiTouchData=function(t){if(2==t.length){var e=this._touchMap[t[0]],i=this._touchMap[t[1]];if(null==e||null==i)return null;if(0==e.dx&&0==i.dy)return null;var n=e.pageX-i.pageX,o=e.pageY-i.pageY,r=Math.sqrt(n*n+o*o),s=e.prevPageX-i.prevPageX,a=e.prevPageY-i.prevPageY,l=r-Math.sqrt(s*s+a*a),h=(e.pageX+i.pageX)/2,u=(e.pageY+i.pageY)/2;return{dz:l,cx:h,cy:u,dcx:h-(e.prevPageX+i.prevPageX)/2,dcy:u-(e.prevPageY+i.prevPageY)/2,dist:r}}return null},t.TouchManager.prototype.getMultiTouchDelta=function(t){if(t){var e,i;if(2==t.length){var n=this._touchMap[t[0]],o=this._touchMap[t[1]];if(null==n||null==o)return;if(null==n.touchtype){var r=this._determineTouchDirection(n);if(null!=r){var s=this._determineTouchDirection(o);null!=s&&(i=this._isSameDirection(r,s)?"scroll":"pinch",n.touchtype=i)}}if(null==(i=n.touchtype))return;if("pinch"==i)return null}for(var a=0,l=0,h=0;h<t.length;h++)a+=(e=this._touchMap[t[h]]).dx,l+=e.dy;return{deltaX:1*(a/=t.length),deltaY:1*(l/=t.length)}}return null},t.TouchManager.prototype._isSameDirection=function(t,e){return t==e||(2==t.length&&1==e.length?t.charAt(0)==e||t.charAt(1)==e:1==t.length&&2==e.length&&(t==e.charAt(0)||e==t.charAt(1)))},t.TouchManager.prototype._determineTouchDirection=function(t){var e=t.origx,i=t.origy;if(null==e||null==i)return null;var n=t.x-e,o=t.y-i;if(Math.sqrt(Math.pow(n,2)+Math.pow(o,2))<.01*window.innerWidth)return null;var r=null;Math.abs(n/o)>=.25&&(r=n<0?"l":"r");var s=null;return Math.abs(o/n)>=.25&&(s=o<0?"u":"d"),null!=r&&null!=s?s+r:null==r?s:null==s?r:null},t.TouchManager.prototype.calcAveragePosition=function(e){for(var i=0,n=0,o=e.length,r=0;r<o;r++){var s=e[r],a=this.getTouchInfo(s);i+=a.pageX,n+=a.pageY}return i/=o,n/=o,new t.Point(i,n)},t.TouchManager.prototype.getStartTargetsByIds=function(t){for(var e=new Array,i=0;i<t.length;i++){var n=this.getTouchInfo(t[i]);e.push(n.startTarget)}return e},t.TouchManager.prototype.reset=function(){this._touchMap=new Object,this._savedTouchInfo=new Array,this.resetTouchHold(),this.resetDoubleTap()},t.ViewportChangeEvent=function(e,i,n){this.Init(t.ViewportChangeEvent.TYPE),this._oldDim=e,this._newDim=i,this._evt=n},t.ViewportChangeEvent.TYPE="viewportChange",t.Obj.createSubclass(t.ViewportChangeEvent,t.BaseComponentEvent),t.ViewportChangeEvent.prototype.getNativeEvent=function(){return this._evt},t.ViewportChangeEvent.prototype.getOldDimensions=function(){return this._oldDim},t.ViewportChangeEvent.prototype.getNewDimensions=function(){return this._newDim};var y=function(t,e){this.Init(t),this.target=e};y.TOOLTIP_CLOSED_TYPE="actiontooltipclosed",y.TOOLTIP_STARTED_TYPE="actiontooltipstarted",t.Obj.createSubclass(y,t.BaseComponentEvent),y.prototype.Init=function(t){y.superclass.Init.call(this,t)},t.ComponentTouchEvent=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.ComponentTouchEvent.TOUCH_HOLD_START_TYPE="touchholdstart",t.ComponentTouchEvent.TOUCH_HOLD_MOVE_TYPE="touchholdmove",t.ComponentTouchEvent.TOUCH_HOLD_END_TYPE="touchholdend",t.ComponentTouchEvent.TOUCH_HOVER_START_TYPE="touchhoverstart",t.ComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE="touchhovermove",t.ComponentTouchEvent.TOUCH_HOVER_END_TYPE="touchhoverend",t.ComponentTouchEvent.TOUCH_HOVER_OVER_TYPE="touchhoverover",t.ComponentTouchEvent.TOUCH_HOVER_OUT_TYPE="touchhoverout",t.ComponentTouchEvent.TOUCH_CLICK_TYPE="touchclick",t.ComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE="touchdblclick",t.Obj.createSubclass(t.ComponentTouchEvent,t.BaseComponentEvent),t.ComponentTouchEvent.prototype.Init=function(e,i,n,o,r){t.ComponentTouchEvent.superclass.Init.call(this,e),this.target=n,this.touch=i,this.relatedTarget=o,this._isPropagationStopped=!1,this._nativeEvent=r},t.ComponentTouchEvent.prototype.preventDefault=function(){},t.ComponentTouchEvent.prototype.stopPropagation=function(){this._isPropagationStopped=!0},t.ComponentTouchEvent.prototype.isPropagationStopped=function(){return this._isPropagationStopped},t.ComponentTouchEvent.prototype.getNativeEvent=function(){return this._nativeEvent},t.ResizeEvent=function(t,e,i,n){this.Init(t,e,i,n)},t.Obj.createSubclass(t.ResizeEvent,t.Obj),t.ResizeEvent.RESIZE_EVENT="dvtResizeEvent",t.ResizeEvent.prototype.Init=function(e,i,n,o){this.type=t.ResizeEvent.RESIZE_EVENT,this._ww=e,this._hh=i,this._xx=n,this._yy=o},t.ResizeEvent.prototype.getWidth=function(){return this._ww},t.ResizeEvent.prototype.getHeight=function(){return this._hh},t.ResizeEvent.prototype.getX=function(){return this._xx},t.ResizeEvent.prototype.getY=function(){return this._yy},t.ResizeEvent.prototype.getType=function(){return this.type},t.ScrollEvent=function(t,e){this.Init(t,e)},t.Obj.createSubclass(t.ScrollEvent,t.Obj),t.ScrollEvent.SCROLL_EVENT="dvtScrollEvent",t.ScrollEvent.prototype.Init=function(e,i){this.type=t.ScrollEvent.SCROLL_EVENT,this._x=e,this._y=i},t.ScrollEvent.prototype.getX=function(){return this._x},t.ScrollEvent.prototype.getY=function(){return this._y},t.ScrollEvent.prototype.getType=function(){return this.type},t.MarqueeEvent=function(e,i,n,o,r,s){this.Init(t.MarqueeEvent.TYPE),this.subtype=e,this.x=i,this.y=n,this.w=o,this.h=r,this.ctrlKey=s},t.Obj.createSubclass(t.MarqueeEvent,t.BaseComponentEvent),t.MarqueeEvent.TYPE="dvtMarquee",t.MarqueeEvent.SUBTYPE_START="dvtMarqueeStartEvent",t.MarqueeEvent.SUBTYPE_MOVE="dvtMarqueeMoveEvent",t.MarqueeEvent.SUBTYPE_END="dvtMarqueeEndEvent",t.MarqueeEvent.prototype.getSubtype=function(){return this.subtype},t.PanZoomEvent=function(e,i,n,o,r,s,a,l,h){this.Init(t.PanZoomEvent.TYPE),this.subtype=e,this.dxMin=i,this.dxMax=n,this.dyMin=o,this.dyMax=r,this.dxMinTotal=s,this.dxMaxTotal=a,this.dyMinTotal=l,this.dyMaxTotal=h},t.Obj.createSubclass(t.PanZoomEvent,t.BaseComponentEvent),t.PanZoomEvent.TYPE="dvtPanZoom",t.PanZoomEvent.SUBTYPE_PAN_START="dvtPanStartEvent",t.PanZoomEvent.SUBTYPE_PAN_MOVE="dvtPanMoveEvent",t.PanZoomEvent.SUBTYPE_PAN_END="dvtPanEndEvent",t.PanZoomEvent.SUBTYPE_ZOOM="dvtZoomEvent",t.PanZoomEvent.SUBTYPE_PINCH_START="dvtPinchStartEvent",t.PanZoomEvent.SUBTYPE_PINCH_MOVE="dvtPinchMoveEvent",t.PanZoomEvent.SUBTYPE_PINCH_END="dvtPinchEndEvent",t.PanZoomEvent.prototype.getSubtype=function(){return this.subtype},t.SimpleScrollbarEvent=function(e,i,n){this.Init(t.SimpleScrollbarEvent.TYPE),this._subtype=e,this._newMin=i,this._newMax=n},t.Obj.createSubclass(t.SimpleScrollbarEvent,t.BaseComponentEvent),t.SimpleScrollbarEvent.TYPE="dvtSimpleScrollbar",t.SimpleScrollbarEvent.SUBTYPE_MOVE="dvtMoveEvent",t.SimpleScrollbarEvent.SUBTYPE_END="dvtEndEvent",t.SimpleScrollbarEvent.prototype.getSubtype=function(){return this._subtype},t.SimpleScrollbarEvent.prototype.getNewMin=function(){return this._newMin},t.SimpleScrollbarEvent.prototype.getNewMax=function(){return this._newMax},t.DomEventFactory=new Object,t.Obj.createSubclass(t.DomEventFactory,t.Obj),t.DomEventFactory.newEvent=function(e,i){var n=e.type;return n==t.TouchEvent.TOUCHSTART||n==t.TouchEvent.TOUCHMOVE||n==t.TouchEvent.TOUCHEND||n==t.TouchEvent.TOUCHCANCEL?new t.TouchEvent(e):n==t.KeyboardEvent.KEYDOWN||n==t.KeyboardEvent.KEYUP||n==t.KeyboardEvent.KEYPRESS?new t.KeyboardEvent(e):(i._nativeEvent!=e&&(i._nativeEvent=e,i._logicalEvent=n==f.FOCUS||n==f.FOCUSIN||n==f.FOCUSOUT||n==f.BLUR?new f(e):new t.MouseEvent(e)),i._logicalEvent)},t.DomEventFactory.generateMouseEventFromKeyboardEvent=function(e,i,n,o,r,s){var a=null;if(document.createEvent){a=document.createEvent("MouseEvents");var l=i.stageToPageCoords(r,s);a.initMouseEvent(n,!0,!0,window,1,l.x,l.y,l.x,l.y,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,0,null)}if(a){var h=t.DomEventFactory.newEvent(a,i);return h.target=e.target,h}return null},t.PanEvent=function(e,i,n,o,r,s){this.Init(t.PanEvent.TYPE),this.type=this.getType(),this._subtype=e,this._newX=i,this._newY=n,this._oldX=o,this._oldY=r,this._animator=s},t.Obj.createSubclass(t.PanEvent,t.BaseComponentEvent),t.PanEvent.TYPE="dvtPan",t.PanEvent.SUBTYPE_DRAG_PAN_BEGIN="dragPanBegin",t.PanEvent.SUBTYPE_DRAG_PAN_END="dragPanEnd",t.PanEvent.SUBTYPE_PANNED="panned",t.PanEvent.SUBTYPE_PANNING="panning",t.PanEvent.SUBTYPE_ELASTIC_ANIM_BEGIN="elasticAnimBegin",t.PanEvent.SUBTYPE_ELASTIC_ANIM_END="elasticAnimEnd",t.PanEvent.prototype.getSubType=function(){return this._subtype},t.PanEvent.prototype.getNewX=function(){return this._newX},t.PanEvent.prototype.getNewY=function(){return this._newY},t.PanEvent.prototype.getOldX=function(){return this._oldX},t.PanEvent.prototype.getOldY=function(){return this._oldY},t.PanEvent.prototype.getAnimator=function(){return this._animator},t.ZoomEvent=function(e,i,n,o,r,s,a,l){this.Init(t.ZoomEvent.TYPE),this.type=this.getType(),this._subtype=e,this._newZoom=i,this._oldZoom=n,this._animator=o,this._zoomToFitBounds=r,this._centerPoint=s,this._tx=a,this._ty=l},t.Obj.createSubclass(t.ZoomEvent,t.BaseComponentEvent),t.ZoomEvent.TYPE="dvtZoom",t.ZoomEvent.SUBTYPE_ZOOMED="zoomed",t.ZoomEvent.SUBTYPE_ZOOMING="zooming",t.ZoomEvent.SUBTYPE_ZOOM_END="zoomEnd",t.ZoomEvent.SUBTYPE_DRAG_ZOOM_BEGIN="dragZoomBegin",t.ZoomEvent.SUBTYPE_DRAG_ZOOM_END="dragZoomEnd",t.ZoomEvent.SUBTYPE_ZOOM_AND_CENTER="zoomAndCenter",t.ZoomEvent.SUBTYPE_ZOOM_TO_FIT_CALC_BOUNDS="zoomToFitCalcBounds",t.ZoomEvent.SUBTYPE_ZOOM_TO_FIT_BEGIN="zoomToFitBegin",t.ZoomEvent.SUBTYPE_ZOOM_TO_FIT_END="zoomToFitEnd",t.ZoomEvent.SUBTYPE_ELASTIC_ANIM_BEGIN="elasticAnimBegin",t.ZoomEvent.SUBTYPE_ELASTIC_ANIM_END="elasticAnimEnd",t.ZoomEvent.SUBTYPE_ADJUST_PAN_CONSTRAINTS="adjustPanConstraints",t.ZoomEvent.prototype.getSubType=function(){return this._subtype},t.ZoomEvent.prototype.getNewZoom=function(){return this._newZoom},t.ZoomEvent.prototype.getOldZoom=function(){return this._oldZoom},t.ZoomEvent.prototype.getAnimator=function(){return this._animator},t.ZoomEvent.prototype.setZoomToFitBounds=function(t){this._zoomToFitBounds=t},t.ZoomEvent.prototype.getZoomToFitBounds=function(){return this._zoomToFitBounds},t.ZoomEvent.prototype.getCenterPoint=function(){return this._centerPoint},t.ZoomEvent.prototype.getTx=function(){return this._tx},t.ZoomEvent.prototype.getTy=function(){return this._ty};var E={};t.Obj.createSubclass(E,t.Obj),E.lineLinear=function(t){return t.join("L")},E.lineCardinalClosed=function(t,e){return t.length<3?E.lineLinear(t):t[0]+E.lineHermite((t.push(t[0]),t),E.lineCardinalTangents([t[t.length-2]].concat(t,[t[1]]),e))},E.lineCardinal=function(t,e){return t.length<3?E.lineLinear(t):t[0]+E.lineHermite(t,E.lineCardinalTangents(t,e))},E.lineHermite=function(t,e){if(e.length<1||t.length!=e.length&&t.length!=e.length+2)return E.lineLinear(t);var i=t.length!=e.length,n="",o=t[0],r=t[1],s=e[0],a=s,l=1;if(i&&(n+="Q"+Math.round(r[0]-2*s[0]/3)+","+Math.round(r[1]-2*s[1]/3)+","+Math.round(r[0])+","+Math.round(r[1]),o=t[1],l=2),e.length>1){a=e[1],r=t[l],l++,n+="C"+Math.round(o[0]+s[0])+","+Math.round(o[1]+s[1])+","+Math.round(r[0]-a[0])+","+Math.round(r[1]-a[1])+","+Math.round(r[0])+","+Math.round(r[1]);for(var h=2;h<e.length;h++,l++)r=t[l],a=e[h],n+="S"+Math.round(r[0]-a[0])+","+Math.round(r[1]-a[1])+","+Math.round(r[0])+","+Math.round(r[1])}if(i){var u=t[l];n+="Q"+Math.round(r[0]+2*a[0]/3)+","+Math.round(r[1]+2*a[1]/3)+","+Math.round(u[0])+","+Math.round(u[1])}return n},E.lineCardinalTangents=function(t,e){for(var i,n=[],o=(1-e)/2,r=t[0],s=t[1],a=1,l=t.length;++a<l;)i=r,r=s,s=t[a],n.push([o*(s[0]-i[0]),o*(s[1]-i[1])]);return n},E.lineSlope=function(t,e){return(e[1]-t[1])/(e[0]-t[0])},E.lineFiniteDifferences=function(t){for(var e=0,i=t.length-1,n=[],o=t[0],r=t[1],s=n[0]=E.lineSlope(o,r);++e<i;)n[e]=(s+(s=E.lineSlope(o=r,r=t[e+1])))/2;return n[e]=s,n},E.lineMonotoneTangents=function(t,e){e&&(t=E._rotatePoints(t));for(var i,n,o,r,s=[],a=E.lineFiniteDifferences(t),l=-1,h=t.length-1;++l<h;)i=E.lineSlope(t[l],t[l+1]),Math.abs(i)<1e-6?a[l]=a[l+1]=0:(r=(n=a[l]/i)*n+(o=a[l+1]/i)*o)>9&&(r=3*i/Math.sqrt(r),a[l]=r*n,a[l+1]=r*o);for(l=-1;++l<=h;)r=(t[Math.min(h,l+1)][0]-t[Math.max(0,l-1)][0])/(6*(1+a[l]*a[l])),s.push([r||0,a[l]*r||0]);return e&&(s=E._rotatePoints(s)),s},E.lineMonotone=function(t,e){return t.length<3?E.lineLinear(t):t[0]+E.lineHermite(t,E.lineMonotoneTangents(t,e))},E._rotatePoints=function(t){for(var e=[],i=0;i<t.length;i++)e.push([t[i][1],t[i][0]]);return e},t.DisplayableUtils=function(){},t.Obj.createSubclass(t.DisplayableUtils,t.Obj),t.DisplayableUtils.getDimensionsForced=function(t,e){var i,n=e.getParent();n&&(i=n.getChildIndex(e));var o=t.getStage();o.addChild(e);var r=e.getDimensions();return o.removeChild(e),n&&n.addChildAt(e,i),r},t.DisplayableUtils.getDimForced=function(e,i){if(i._dim||!e)return i._dim;var n=t.DisplayableUtils.getDimensionsForced(e,i);return t.DisplayableUtils._setDimForced(i,n),n},t.DisplayableUtils._setDimForced=function(t,e){t._dim=e},t.DisplayableUtils.isAncestor=function(e,i){for(var n=i;n;){if(n==e)return!0;n instanceof t.Container&&(n=n.getParent())}return!1},t.PathUtils={},t.Obj.createSubclass(t.PathUtils,t.Obj),t.PathUtils.SPLINE_TYPE_MONOTONE_VERTICAL="mv",t.PathUtils.SPLINE_TYPE_MONOTONE_HORIZONTAL="mh",t.PathUtils.SPLINE_TYPE_CARDINAL_CLOSED="cc",t.PathUtils.SPLINE_TYPE_CARDINAL="c",t.PathUtils.moveTo=function(e,i){return"M"+t.ToolkitUtils.roundDecimal(e)+","+t.ToolkitUtils.roundDecimal(i)},t.PathUtils.lineTo=function(e,i){return"L"+t.ToolkitUtils.roundDecimal(e)+","+t.ToolkitUtils.roundDecimal(i)},t.PathUtils.quadTo=function(e,i,n,o){return"Q"+t.ToolkitUtils.roundDecimal(e)+","+t.ToolkitUtils.roundDecimal(i)+","+t.ToolkitUtils.roundDecimal(n)+","+t.ToolkitUtils.roundDecimal(o)},t.PathUtils.horizontalLineTo=function(e){return"H"+t.ToolkitUtils.roundDecimal(e)},t.PathUtils.verticalLineTo=function(e){return"V"+t.ToolkitUtils.roundDecimal(e)},t.PathUtils.cubicTo=function(e,i,n,o,r,s){return"C"+t.ToolkitUtils.roundDecimal(e)+","+t.ToolkitUtils.roundDecimal(i)+","+t.ToolkitUtils.roundDecimal(n)+","+t.ToolkitUtils.roundDecimal(o)+","+t.ToolkitUtils.roundDecimal(r)+","+t.ToolkitUtils.roundDecimal(s)},t.PathUtils.arcTo=function(e,i,n,o,r,s){var a="A"+t.ToolkitUtils.roundDecimal(e)+","+t.ToolkitUtils.roundDecimal(i)+",0,";return n>Math.PI?a+="1,":a+="0,",a+=o+","+t.ToolkitUtils.roundDecimal(r)+","+t.ToolkitUtils.roundDecimal(s)},t.PathUtils.closePath=function(){return"Z"},t.PathUtils.roundedRectangle=function(e,i,n,o,r,s,a,l){return t.PathUtils._roundedRectangle(e,i,n,o,r,r,s,s,a,a,l,l)},t.PathUtils.rectangleWithBorderRadius=function(e,i,n,o,r,s,a){var l=a,h=a,u=a,c=a,p=a,_=a,g=a,d=a;if(r)if(-1!=r.indexOf("/")){var S=r.split("/"),f=t.StringUtils.trim(S[0]).split(/\s+/),y=t.StringUtils.trim(S[1]).split(/\s+/);1==f.length?l=u=p=g=f[0]:2==f.length?(l=p=f[0],u=g=f[1]):3==f.length?(l=f[0],u=g=f[1],p=f[2]):4==f.length&&(l=f[0],u=f[1],p=f[2],g=f[3]),1==y.length?h=c=_=d=y[0]:2==y.length?(h=_=y[0],c=d=y[1]):3==y.length?(h=y[0],c=d=y[1],_=y[2]):4==y.length&&(h=y[0],c=y[1],_=y[2],d=y[3])}else if("auto"!=r){var E=t.StringUtils.trim(r).split(/\s+/);1==E.length?l=u=p=g=h=c=_=d=E[0]:2==E.length?(l=p=h=_=E[0],u=g=c=d=E[1]):3==E.length?(l=h=E[0],u=g=c=d=E[1],p=_=E[2]):4==E.length&&(l=h=E[0],u=c=E[1],p=_=E[2],g=d=E[3])}return r&&"0"!=r?t.PathUtils._roundedRectangle(e,i,n,o,t.PathUtils._parseBorderRadiusItem(l,s),t.PathUtils._parseBorderRadiusItem(h,s),t.PathUtils._parseBorderRadiusItem(u,s),t.PathUtils._parseBorderRadiusItem(c,s),t.PathUtils._parseBorderRadiusItem(p,s),t.PathUtils._parseBorderRadiusItem(_,s),t.PathUtils._parseBorderRadiusItem(g,s),t.PathUtils._parseBorderRadiusItem(d,s)):t.PathUtils._rectangle(e,i,n,o)},t.PathUtils._parseBorderRadiusItem=function(t,e){var i=Math.min(parseFloat(t),e/2);return-1!=t.indexOf("%")&&(i=.01*Math.min(50,parseFloat(t))*e),i},t.PathUtils._roundedRectangle=function(e,i,n,o,r,s,a,l,h,u,c,p){return s=Math.min(s,.5*o),l=Math.min(l,.5*o),u=Math.min(u,.5*o),p=Math.min(p,.5*o),r=Math.min(r,.5*n),a=Math.min(a,.5*n),h=Math.min(h,.5*n),c=Math.min(c,.5*n),t.PathUtils.moveTo(e+r,i)+t.PathUtils.lineTo(e+n-a,i)+t.PathUtils.arcTo(a,l,Math.PI/2,1,e+n,i+l)+t.PathUtils.lineTo(e+n,i+o-u)+t.PathUtils.arcTo(h,u,Math.PI/2,1,e+n-h,i+o)+t.PathUtils.lineTo(e+c,i+o)+t.PathUtils.arcTo(c,p,Math.PI/2,1,e,i+o-p)+t.PathUtils.lineTo(e,i+s)+t.PathUtils.arcTo(r,s,Math.PI/2,1,e+r,i)+t.PathUtils.closePath()},t.PathUtils.polyline=function(e,i){if(e.length<2)return"";for(var n=i?t.PathUtils.lineTo(e[0],e[1]):t.PathUtils.moveTo(e[0],e[1]),o=2;o<e.length;o+=2)n+=t.PathUtils.lineTo(e[o],e[o+1]);return n},t.PathUtils.curveThroughPoints=function(e,i,n){if(0==e.length)return"";for(var o=[],r=0;r<e.length;r+=2)o.push([e[r],e[r+1]]);var s=i?"L":"M";return n==t.PathUtils.SPLINE_TYPE_MONOTONE_VERTICAL?s+E.lineMonotone(o,!1):n==t.PathUtils.SPLINE_TYPE_MONOTONE_HORIZONTAL?s+E.lineMonotone(o,!0):n==t.PathUtils.SPLINE_TYPE_CARDINAL_CLOSED?s+E.lineCardinalClosed(o,.7):s+E.lineCardinal(o,.7)},t.PathUtils.createPathArray=function(t){if(!t)return null;var e,i=(t=t.replace(/([0-9])([\-])/g,"$1 $2")).replace(/([mlqhvzcast])/gi,",$1,").split(/[ ,]/g),n=i.length;for(e=0;e<n;e++){var o=i[e];o?isNaN(o)||(i[e]=parseFloat(o)):(i.splice(e,1),e--,n--)}return i},t.PathUtils.getDimensions=function(e){if(!e||!e.length)return new t.Rectangle;var i,n,o,r,s,a,l,h,u,c,p,_,g=e.length,d=!0,S=Number.MAX_VALUE,f=Number.MIN_VALUE,y=Number.MAX_VALUE,E=Number.MIN_VALUE,T=[];for(c=0;c<g;c++){o=!1;var v=0;switch(p=0,e[c]){case"m":o=!0;case"M":do{r=e[c+1],s=e[c+2],d?d=!1:o&&(r+=i,s+=n),i=r,n=s,T[p++]=r,T[p++]=s,v++,c+=2}while(!isNaN(e[c+1]));break;case"c":o=!0;case"C":do{r=e[c+1],s=e[c+2],a=e[c+3],l=e[c+4],h=e[c+5],u=e[c+6],o&&(r+=i,s+=n,a+=i,l+=n,h+=i,u+=n),i=h,n=u,T[p++]=h,T[p++]=u,v++,c+=6}while(!isNaN(e[c+1]));break;case"q":o=!0;case"Q":do{r=e[c+1],s=e[c+2],a=e[c+3],l=e[c+4],o&&(r+=i,s+=n,a+=i,l+=n),i=a,n=l,T[p++]=a,T[p++]=l,v++,c+=4}while(!isNaN(e[c+1]));break;case"l":o=!0;case"L":do{r=e[c+1],s=e[c+2],o&&(r+=i,s+=n),i=r,n=s,T[p++]=r,T[p++]=s,v++,c+=2}while(!isNaN(e[c+1]));break;case"h":o=!0;case"H":do{r=e[c+1],o&&(r+=i),i=r,T[p++]=r,T[p++]=n,v++,c+=1}while(!isNaN(e[c+1]));break;case"v":o=!0;case"V":do{s=e[c+1],o&&(s+=n),n=s,T[p++]=i,T[p++]=s,v++,c+=1}while(!isNaN(e[c+1]))}for(p=0,_=0;_<v;_++)r=T[p++],s=T[p++],S=Math.min(S,r),f=Math.max(f,r),y=Math.min(y,s),E=Math.max(E,s)}return new t.Rectangle(S,y,Math.abs(f-S),Math.abs(E-y))},t.PathUtils.getPathString=function(t){for(var e="",i=t.length,n=0;n<i;n++)null!=t[n]&&(e+=(n>0?" ":"")+t[n]);return e},t.PathUtils.transformPath=function(e,i,n,o,r){if(e){for(var s,a="",l="",h=0;h<e.length;h++){"string"==typeof e[h]&&(s=(l=e[h])===l.toUpperCase(),a+=l+" ");for(var u=[];h<e.length-1&&"number"==typeof e[h+1];)h++,u.push(e[h]);if("A"===l.toUpperCase())for(var c=0;c<u.length;c+=7)a+=t.ToolkitUtils.roundDecimal(parseFloat(u[c])*o)+" ",a+=t.ToolkitUtils.roundDecimal(parseFloat(u[c+1])*r)+" ",a+=t.ToolkitUtils.roundDecimal(u[c+2])+" ",a+=t.ToolkitUtils.roundDecimal(u[c+3])+" ",a+=t.ToolkitUtils.roundDecimal(u[c+4])+" ",a+=t.ToolkitUtils.roundDecimal(parseFloat(u[c+5])*o+(s?i:0))+" ",a+=t.ToolkitUtils.roundDecimal(parseFloat(u[c+6])*r+(s?n:0))+" ";else{var p=[],_=[];"H"===l.toUpperCase()?(p.push(o),_.push(s?i:0)):"V"===l.toUpperCase()?(p.push(r),_.push(s?n:0)):(p.push(o),p.push(r),_.push(s?i:0),_.push(s?n:0));for(c=0;c<u.length;c++){var g=p[c%p.length],d=_[c%_.length];a+=t.ToolkitUtils.roundDecimal(parseFloat(u[c])*g+d)+" "}}}return a}},t.PathUtils._fitsInScale=function(t,e,i){return Math.abs(t)>i||Math.abs(e)>i},t.PathUtils.simplifyPath=function(e,i){for(var n,o,r="",s="",a=0,l=0,h=0,u=0,c=0,p=0;p<e.length;p++)if(isNaN(e[p]))"Z"!=(n=e[p])&&"z"!=n||(o=n,s+=n,c>0&&(r+=s,h=0,u=0),s="",c=0,a=0,l=0);else switch(n){case"M":h=0,u=0;case"m":s=s+n+(h+=e[p])+" "+(u+=e[p+1]),o=n,p++;break;case"l":a+=e[p],l+=e[p+1],t.PathUtils._fitsInScale(a,l,i)&&(o!=n?(o=n,s+=n):s+=" ",s=s+a+" "+l,a=0,l=0,c++),p++;break;case"h":case"v":"h"==n?a+=e[p]:l+=e[p],t.PathUtils._fitsInScale(a,l,i)&&(0!=a&&0!=l?("l"!=o?(o="l",s+="l"):s+=" ",s=s+a+" "+l):(o=n,s=s+n+("h"==n?a:l)),a=0,l=0,c++)}return r},t.PathUtils._rectangle=function(e,i,n,o){return t.PathUtils.moveTo(e,i)+t.PathUtils.horizontalLineTo(e+n)+t.PathUtils.verticalLineTo(i+o)+t.PathUtils.horizontalLineTo(e)+t.PathUtils.closePath()},t.MarkerGradient=function(){},t.Obj.createSubclass(t.MarkerGradient,t.Obj),t.MarkerGradient.createMarkerGradient=function(e,i,n){var o=[],r=[],s=[n,n,n,n],a=null,l=i.getType(),h=t.DisplayableUtils.getDimForced(i.getCtx(),i),u=h.getCenter(),c=Math.min(h.w,h.h);if(l!=t.SimpleMarker.HUMAN){r=[0,.5,.75,1];var p=t.ColorUtils.getBrighter(e,.2),_=t.ColorUtils.getBrighter(e,.1),g=t.ColorUtils.getDarker(e,.2),d=c/2,S=u.x,f=u.y,y=(o=[t.ColorUtils.getPound(p),t.ColorUtils.getPound(_),e,t.ColorUtils.getPound(g)],[(E=new t.Rectangle(-d,-d,2*d,2*d)).x,E.y,E.w,E.h]);a=new t.RadialGradientFill(o,s,r,S,f,d,y)}else{r=[0,.3,.7,1];var E;p=t.ColorUtils.getBrighter(e,.2),_=t.ColorUtils.getDarker(e,.1),g=t.ColorUtils.getDarker(e,.2),o=[t.ColorUtils.getPound(p),t.ColorUtils.getPound(_),e,t.ColorUtils.getPound(g)],y=[(E=new t.Rectangle(-c/2,-c/2,c,c)).x,E.y,E.w,E.h];a=new t.LinearGradientFill(135,o,s,r,y)}return a},t.PolygonUtils={},t.Obj.createSubclass(t.PolygonUtils,t.Obj),t.PolygonUtils.getDimensions=function(e){if(!e||0===e.length)return new t.Rectangle;for(var i,n,o=Number.MAX_VALUE,r=Number.MIN_VALUE,s=Number.MAX_VALUE,a=Number.MIN_VALUE,l=e.length,h=0;h<l;h++)i=e[h++],n=e[h],o=Math.min(o,i),r=Math.max(r,i),s=Math.min(s,n),a=Math.max(a,n);return new t.Rectangle(o,s,Math.abs(r-o),Math.abs(a-s))},t.PolygonUtils.getRegularPolygonPoints=function(t,e,i,n,o,r){for(var s,a=[],l=0;l<i;l++)s=o+l/i*2*Math.PI*(0==r?-1:1),a.push(t+n*Math.sin(s),e-n*Math.cos(s));return a},t.PolygonUtils.scale=function(t,e,i){for(var n=[],o=0;o<t.length-1;o+=2)n.push(t[o]*e),n.push(t[o+1]*i);return n},t.PolygonUtils.translate=function(t,e,i){for(var n=[],o=0;o<t.length-1;o+=2)n.push(t[o]+e),n.push(t[o+1]+i);return n},t.TextUtils={},t.Obj.createSubclass(t.TextUtils,t.Obj),t.TextUtils._cachedTextWidth={},t.TextUtils._cachedRepTextDimensions={},t.TextUtils._canvasCtx=document.createElement("CANVAS").getContext("2d"),t.TextUtils.EMPTY_TEXT_BUFFER=2,t.TextUtils.getMaxTextDimensions=function(e){for(var i=0,n=0,o=0;o<e.length;o++)if(null!=e[o]){var r=e[o].getDimensions();i=Math.max(i,r.w),n=Math.max(n,r.h)}return new t.Dimension(i,n)},t.TextUtils.getMaxTextStringWidth=function(e,i,n){for(var o=0,r=t.ArrayUtils.isArray(n),s=0;s<i.length;s++)if(null!=i[s]&&0!=i[s].length){var a=n?r?n[s]:n:null,l=t.TextUtils.getTextStringWidth(e,i[s],a);l>o&&(o=l)}return o},t.TextUtils.getTextStringDimensions=function(e,i,n){var o=t.TextUtils._getRepresentativeDimensions(e,n);return new t.Rectangle(0,o.y,t.TextUtils.getTextStringWidth(e,i,n),o.h)},t.TextUtils.getTextStringWidth=function(e,i,n){if(null==i||0==i.length)return 0;var o=i+(null!=n?n.hashCodeForTextMeasurement():""),r=t.TextUtils._cachedTextWidth[o];if(null!=r)return r;var s=t.TextUtils._getCanvasTextWidth(e,i,n);return t.TextUtils._cachedTextWidth[o]=s,s},t.TextUtils.getTextStringHeight=function(e,i){return t.TextUtils._getRepresentativeDimensions(e,i).h},t.TextUtils.fitText=function(e,i,n,o,r,s){var a=e.getTextString();if(e instanceof t.OutputText){var l=t.TextUtils.getTextStringDimensions(e.getCtx(),a,e.getCSSStyle());if(l.h>n)return s||e.removeFromParent(),!1;if(l.w<=i)return o.addChild(e),!0}return o.addChild(e),r="number"!=typeof r||null==r?1:r,e instanceof t.MultilineText||e instanceof t.BackgroundMultilineText?e.__fitText(i,n,r):(e instanceof t.OutputText||e instanceof t.BackgroundOutputText?t.TextUtils._truncateOutputText(e,i,r):e.setMaxWidth(i,r),""==e.getTextString()?(s||o.removeChild(e),e.setTextString(a),!1):(e.getTextString()!=a&&e.setUntruncatedTextString(a),!0))},t.TextUtils.renderEmptyText=function(e,i,n,o,r){var s=new t.MultilineText(e.getCtx(),i,n.x+n.w/2,n.y+n.h/2);r&&s.setCSSStyle(r),s.alignCenter(),s.alignMiddle();var a=n.w-2*t.TextUtils.EMPTY_TEXT_BUFFER;return t.TextUtils.fitText(s,a,1/0,e,0)&&(s.isTruncated()&&o.associate(s,new t.SimpleObjPeer(s.getUntruncatedTextString())),s.setAriaProperty("hidden",null)),s},t.TextUtils.centerTextVertically=function(e,i){t.Agent.isPlatformIE()?(e.setY(i),e.alignMiddle()):e.setY(i-e.getDimensions().h/2)},t.TextUtils._truncateOutputText=function(e,i,n){if(i<=0)e.setTextString("");else{var o=e.getDimensions();if(!(o.w<=i)){var r=e.getTextString(),s=r.length,a=o.w/t.TextUtils._getTextLength(r),l=Math.max(Math.floor(i/a)-2,n),h=r.substring(0,l)+t.OutputText.ELLIPSIS;e.setTextString(h);for(var u=h,c=o=e.getDimensions();o.w<i&&!(l>=r.length);){var p=i-o.w,_=Math.min(s-l,Math.max(Math.floor(p/a),1));if(l+=_,h=r.substring(0,l)+t.OutputText.ELLIPSIS,e.setTextString(h),o=e.getDimensions(),1==_&&o.w>i){e.setTextString(u),o=c;break}u=h,c=o}for(;o.w>i;){if(l<=n){e.setTextString("");break}l-=1,h=r.substring(0,l)+t.OutputText.ELLIPSIS,e.setTextString(h),o=e.getDimensions()}}}},t.TextUtils._getTextLength=function(t){return(t=t.replace(/[\u200A\u200B\u200C\u200D\u200E\u200F\uFEFF]/g,"")).length},t.TextUtils._getRepresentativeDimensions=function(e,i){var n=null!=i?i.hashCodeForTextMeasurement():"",o=t.TextUtils._cachedRepTextDimensions[n];if(null==o){var r=new t.OutputText(e,t.OutputText.REPRESENTATIVE_TEXT);r.alignAuto(),r.setCSSStyle(i);var s=r.getCtx().getStage();s.addChild(r);var a=r.GetSvgDimensions();s.removeChild(r),o={x:a.x,y:a.y,w:.5*a.w,h:a.h},t.TextUtils._cachedRepTextDimensions[n]=o}return o},t.TextUtils.getBaselineTranslation=function(e){var i=e.getVertAlignment();if(i!=t.OutputText.V_ALIGN_AUTO){var n=t.TextUtils._getRepresentativeDimensions(e.getCtx(),e.getCSSStyle());if(i==t.OutputText.V_ALIGN_TOP)return-n.y;if(i==t.OutputText.V_ALIGN_MIDDLE)return-n.y-n.h/2;if(i==t.OutputText.V_ALIGN_BOTTOM)return-n.y-n.h}return 0},t.TextUtils._getCanvasTextWidth=function(e,i,n){var o=(n?n.getStyle("font-style"):null)||"normal",r=(n?n.getStyle("font-variant"):null)||"normal",s=(n?n.getStyle("font-weight"):null)||"normal",a=(n?n.getStyle("font-family"):null)||e.getDefaultFontFamily()||"",l=(n?n.getFontSize():null)||e.getDefaultFontSize()||"12px";return isNaN(l)||(l+="px"),t.Agent.isPlatformIE()&&(a=a.replace(/-apple-system(-\w+)*,?/g,"")),t.TextUtils._canvasCtx.font=o+" "+r+" "+s+" "+l+" "+a,t.TextUtils._canvasCtx.measureText(i).width},t.TextUtils.clearCaches=function(){t.TextUtils._cachedTextWidth={},t.TextUtils._cachedRepTextDimensions={}},t.TextUtils.getOptimalFontSize=function(e,i,n,o){n=n?n.clone():new t.CSSStyle;for(var r=Math.max(Math.min(o.w/i.length,o.h/2),9);r<51;r+=1){n.setFontSize("font-size",r+"px");var s=t.TextUtils.getTextStringDimensions(e,i,n);if(s.w>o.w||s.h>o.h)return Math.min(r-1,50)+"px"}return"50px"},t.SvgShapeUtils=function(){},t.Obj.createSubclass(t.SvgShapeUtils,t.Obj),t.SvgShapeUtils._uniqueSeed=0,t.SvgShapeUtils.addClipPath=function(e,i){var n=e.getId();if(!n)return!1;var o=i.getDefs();if(!o)return!1;for(var r=o.childNodes,s=r.length,a=0;a<s;a++){if(r[a].id===n)return!0}var l=t.SvgShapeUtils.createElement("clipPath",n);i.appendDefs(l);var h=e.getRegions();for(a=0;a<h.length;a++){var u=h[a];if(u){var c=null;u.type===t.ClipPath.RECT?(c=t.SvgShapeUtils.createElement("rect"),t.ToolkitUtils.setAttrNullNS(c,"x",u.x),t.ToolkitUtils.setAttrNullNS(c,"y",u.y),t.ToolkitUtils.setAttrNullNS(c,"width",u.w),t.ToolkitUtils.setAttrNullNS(c,"height",u.h),u.rx&&t.ToolkitUtils.setAttrNullNS(c,"rx",u.rx),u.ry&&t.ToolkitUtils.setAttrNullNS(c,"ry",u.ry)):u.type===t.ClipPath.PATH?(c=t.SvgShapeUtils.createElement("path"),t.ToolkitUtils.setAttrNullNS(c,"d",u.d)):u.type===t.ClipPath.POLYGON?(c=t.SvgShapeUtils.createElement("polygon"),t.ToolkitUtils.setAttrNullNS(c,"points",u.points)):u.type===t.ClipPath.ELLIPSE?(c=t.SvgShapeUtils.createElement("ellipse"),t.ToolkitUtils.setAttrNullNS(c,"cx",u.cx),t.ToolkitUtils.setAttrNullNS(c,"cy",u.cy),t.ToolkitUtils.setAttrNullNS(c,"rx",u.rx),t.ToolkitUtils.setAttrNullNS(c,"ry",u.ry)):u.type===t.ClipPath.CIRCLE&&(c=t.SvgShapeUtils.createElement("circle"),t.ToolkitUtils.setAttrNullNS(c,"cx",u.cx),t.ToolkitUtils.setAttrNullNS(c,"cy",u.cy),t.ToolkitUtils.setAttrNullNS(c,"r",u.r)),c&&t.ToolkitUtils.appendChildElem(l,c)}}return!0},t.SvgShapeUtils.addMask=function(e,i){var n=e.getId();if(!n)return!1;var o=i.getDefs();if(!o)return!1;for(var r=o.childNodes,s=r.length,a=0;a<s;a++){if(r[a].id===n)return!0}var l=t.SvgShapeUtils.createElement("mask",n);i.appendDefs(l);var h=e.getGradient();t.SvgShapeUtils.addSpecialFill(h,i);var u=e.getBounds(),c=t.SvgShapeUtils.createElement("rect");return t.ToolkitUtils.setAttrNullNS(c,"x",u.x),t.ToolkitUtils.setAttrNullNS(c,"y",u.y),t.ToolkitUtils.setAttrNullNS(c,"width",u.w),t.ToolkitUtils.setAttrNullNS(c,"height",u.h),t.ToolkitUtils.setAttrNullNS(c,"fill",t.ToolkitUtils.getUrlById(h.getId())),t.ToolkitUtils.appendChildElem(l,c),!0},t.SvgShapeUtils.addSpecialFill=function(e,i){var n;if(e.isLocked()?n=e.getId():(n=e.getId())||(n=e instanceof t.PatternFill?t.SvgShapeUtils.getUniqueId("pat"):t.SvgShapeUtils.getUniqueId("Gr"),e.setId(n)),!e._defPresent){var o=e._defElem;o||(e instanceof t.GradientFill?o=j.createElem(e,n):e instanceof t.ImageFill?o=W.createElem(e,n):e instanceof t.PatternFill&&(o=V.createElem(e,n))),e._defElem=o,i.appendDefs(o),e._defPresent=!0}},t.SvgShapeUtils.addSpecialStroke=function(e,i){var n;if(e.isLocked()?n=e.getId():(n=e.getId())||(n=t.SvgShapeUtils.getUniqueId("Gr"),e.setId(n)),!e._defPresent){var o=e._defElem;o||(o=j.createElem(e,n)),e._defElem=o,i.appendDefs(o),e._defPresent=!0}},t.SvgShapeUtils.createElement=function(e,i){var n=document.createElementNS(t.ToolkitUtils.SVG_NS,e);return i&&t.ToolkitUtils.setAttrNullNS(n,"id",i),n},t.SvgShapeUtils.getUniqueId=function(e){return(e||"$")+t.SvgShapeUtils._uniqueSeed++},t.SvgShapeUtils.convertPointsArray=function(e){for(var i=e.length,n="",o=0;o<i;o++)o>0&&(n+=" "),n+=t.ToolkitUtils.roundDecimal(e[o]);return n},t.Displayable=function(){},t.Obj.createSubclass(t.Displayable,t.Obj),t.Displayable._ATTRS_TRANSFERABLE_TO_OUTER=["clip-path"],t.Displayable._CREATE_EVENT_TYPE_MAP={click:t.MouseEvent.CLICK,mouseover:t.MouseEvent.MOUSEOVER,mouseout:t.MouseEvent.MOUSEOUT,mousemove:t.MouseEvent.MOUSEMOVE,keydown:t.KeyboardEvent.KEYDOWN,keyup:t.KeyboardEvent.KEYUP,keypress:t.KeyboardEvent.KEYPRESS},t.Displayable.SET_ID_ON_DOM=!1,t.Displayable.prototype.Init=function(e,i,n){this._context=e,this._elem=t.SvgShapeUtils.createElement(i),this._elem._obj=this,this.setId(n),this._bVisible=!0,this._pixelHinting=!1,this._cursor=null,this._bMouseEnabled=!0,this._alpha=1,this._matrix=null,this._ariaProperties={},this._properties={}},t.Displayable.prototype.getCtx=function(){return this._context},t.Displayable.prototype.getImpl=function(){return this},t.Displayable.prototype.getObj=function(){return this},t.Displayable.prototype.getElem=function(){return this._elem},t.Displayable.prototype.getOuterElem=function(){return this._outerElem?this._outerElem:this.getElem()},t.Displayable.prototype.getId=function(){return this._id},t.Displayable.prototype.setId=function(e,i){this._id!==e&&(e&&0===e.length&&(e=null),this._id=e,(t.Displayable.SET_ID_ON_DOM||i)&&(e?t.ToolkitUtils.setAttrNullNS(this.getOuterElem(),"id",e):t.ToolkitUtils.removeAttrNullNS(this.getOuterElem(),"id")))},t.Displayable.prototype.getParent=function(){return this._parent},t.Displayable.prototype.setParent=function(t){this._parent=t},t.Displayable.prototype.isDescendantOf=function(t){return!(!t||!this.getParent())&&(this.getParent()==t||this.getParent().isDescendantOf(t))},t.Displayable.prototype.getPixelHinting=function(){return this._pixelHinting},t.Displayable.prototype.setPixelHinting=function(e){this._pixelHinting=e,e?t.ToolkitUtils.setAttrNullNS(this._elem,"shape-rendering","crispEdges"):t.ToolkitUtils.removeAttrNullNS(this._elem,"shape-rendering")},t.Displayable.prototype.getVisible=function(){return this._bVisible},t.Displayable.prototype.setVisible=function(e){if(this._bVisible!==e){this._bVisible=e;var i=this.getElem();e?t.ToolkitUtils.removeAttrNullNS(i,"visibility"):t.ToolkitUtils.setAttrNullNS(i,"visibility","hidden")}},t.Displayable.prototype.setClipPath=function(e){if(e){if(this.ClipPathId==e.getId())return;this.ClipPathId&&this._context.decreaseGlobalDefReference(this.ClipPathId),this.ClipPathId=e.getId(),this._context.increaseGlobalDefReference(this.ClipPathId),!this._outerElem&&this._matrix&&this._createOuterGroupElem();var i=e.getId();if(i){var n=this.getCtx();t.SvgShapeUtils.addClipPath(e,n)&&t.ToolkitUtils.setAttrNullNS(this.getOuterElem(),"clip-path",t.ToolkitUtils.getUrlById(i))}}else if(!e&&this.ClipPathId)return this._context.decreaseGlobalDefReference(this.ClipPathId),this.ClipPathId=null,void t.ToolkitUtils.removeAttrNullNS(this.getOuterElem(),"clip-path")},t.Displayable.prototype.setMask=function(e){if(e){if(this.MaskId==e.getId())return;this.MaskId&&this._context.decreaseGlobalDefReference(this.MaskId),this.MaskId=e.getId(),this._context.increaseGlobalDefReference(this.MaskId),!this._outerElem&&this._matrix&&this._createOuterGroupElem();var i=e.getId();if(i){var n=this.getCtx();t.SvgShapeUtils.addMask(e,n)&&t.ToolkitUtils.setAttrNullNS(this.getOuterElem(),"mask",t.ToolkitUtils.getUrlById(i))}}else if(!e&&this.MaskId)return this._context.decreaseGlobalDefReference(this.MaskId),this.MaskId=null,void t.ToolkitUtils.removeAttrNullNS(this.getOuterElem(),"mask")},t.Displayable.prototype.ConvertCoordSpaceRect=function(e,i){if(!i||i===this)return e;var n=this.localToStage(new t.Point(e.x,e.y)),o=this.localToStage(new t.Point(e.x+e.w,e.y+e.h)),r=i.stageToLocal(n),s=i.stageToLocal(o);return new t.Rectangle(Math.min(r.x,s.x),Math.min(r.y,s.y),Math.abs(s.x-r.x),Math.abs(s.y-r.y))},t.Displayable.prototype.GetSvgDimensions=function(){try{var e=this.getElem().getBBox()}catch(e){return t.Agent.isEnvironmentTest()&&print("Error in dvt.Displayable.prototype.GetSvgDimensions: "+e),null}return new t.Rectangle(e.x,e.y,e.width,e.height)},t.Displayable.prototype.getDimensions=function(t){var e=this.GetSvgDimensions();return this.ConvertCoordSpaceRect(e,t)},t.Displayable.prototype.getDimensionsWithStroke=function(t){var e=this.GetDimensionsWithStroke();return this.ConvertCoordSpaceRect(e,t)},t.Displayable.prototype.GetDimensionsWithStroke=function(t){var e=this.GetElemDimensionsWithStroke();return t&&t!==this?this.ConvertCoordSpaceRect(e,t):e},t.Displayable.prototype.GetElemDimensionsWithStroke=function(){return this.GetSvgDimensions()},t.Displayable.HasAttributes=function(e,i){if(i)for(var n=i.length,o=0;o<n;o++)if(t.ToolkitUtils.getAttrNullNS(e,i[o]))return!0;return!1},t.Displayable.TransferAttributes=function(e,i,n){if(n)for(var o,r,s=n.length,a=0;a<s;a++)o=n[a],(r=t.ToolkitUtils.getAttrNullNS(e,o))&&(t.ToolkitUtils.removeAttrNullNS(e,o),t.ToolkitUtils.setAttrNullNS(i,o,r),t.Agent.isPlatformIE()&&t.ToolkitUtils.setAttrNullNS(e,o,null))},t.Displayable.prototype._createOuterGroupElem=function(){if(!this._outerElem){var e=this._id?this._id+"_outer":null;this._outerElem=t.SvgShapeUtils.createElement("g",e);var i=this.getParent();if(i)i.getElem().replaceChild(this._outerElem,this.getElem());t.ToolkitUtils.appendChildElem(this._outerElem,this.getElem()),t.Displayable.TransferAttributes(this.getElem(),this._outerElem,t.Displayable._ATTRS_TRANSFERABLE_TO_OUTER)}},t.Displayable.prototype.getCSSStyle=function(){return this._cssStyle},t.Displayable.prototype.setCSSStyle=function(t){this._cssStyle=t},t.Displayable.prototype.setCursor=function(e){this._cursor=e,t.Agent.isEnvironmentBatik()||(e?t.ToolkitUtils.setAttrNullNS(this.getElem(),"cursor",e):t.ToolkitUtils.removeAttrNullNS(this.getElem(),"cursor"))},t.Displayable.prototype.getCursor=function(){return this._cursor},t.Displayable.prototype.setMouseEnabled=function(e){this._bMouseEnabled=e;var i=e?"visiblePainted":"none";t.ToolkitUtils.setAttrNullNS(this.getElem(),"pointer-events",i)},t.Displayable.prototype.isMouseEnabled=function(){return this._bMouseEnabled},t.Displayable.prototype.getAlpha=function(){return this._alpha},t.Displayable.prototype.setAlpha=function(e){e<1e-5&&(e=0),e!==this._alpha&&(this._alpha=e,t.ToolkitUtils.setAttrNullNS(this.getElem(),"opacity",this._alpha,1))},t.Displayable.prototype.applyAriaProperties=function(){if(t.Agent.deferAriaCreation())for(var e in this._ariaRole&&this._setAriaRole(this._ariaRole),this._ariaProperties)this._setAriaProperty(e,this._ariaProperties[e])},t.Displayable.prototype.setAriaRole=function(e){t.Agent.deferAriaCreation()||this._setAriaRole(e),this._ariaRole=e},t.Displayable.prototype._setAriaRole=function(e){var i=this.GetAriaElem();e?t.ToolkitUtils.setAttrNullNS(i,"role",e):t.ToolkitUtils.removeAttrNullNS(i,"role")},t.Displayable.prototype.getActiveElementId=function(){return this.getId()},t.Displayable.prototype.getAriaRole=function(){return this._ariaRole},t.Displayable.prototype.GetAriaElem=function(){return this.getElem()},t.Displayable.prototype.setAriaProperty=function(e,i){e&&(t.Agent.deferAriaCreation()||this._setAriaProperty(e,i),this._ariaProperties[e]=i)},t.Displayable.prototype._setAriaProperty=function(e,i){var n=this.GetAriaElem();null!=i&&""!==i?("label"==e&&(i=t.StringUtils.processAriaLabel(i)),t.ToolkitUtils.setAttrNullNS(n,"aria-"+e,i)):t.ToolkitUtils.removeAttrNullNS(n,"aria-"+e)},t.Displayable.prototype.getAriaProperty=function(t){return t?this._ariaProperties[t]:null},t.Displayable.prototype.stageToLocal=function(t){for(var e,i=this.getPathToStage(),n=t,o=i.length-1;o>=0;o--)(e=i[o].getMatrix().clone()).invert(),n=e.transformPoint(n);return n},t.Displayable.prototype.localToStage=function(t){for(var e=this.getPathToStage(),i=t,n=0;n<e.length;n++)i=e[n].getMatrix().transformPoint(i);return i},t.Displayable.prototype.getPathToStage=function(){for(var t=this,e=[];t;)e.push(t),t=t.getParent();return e},t.Displayable.prototype.removeFromParent=function(){this._parent&&this._parent.removeChild(this)},t.Displayable.prototype.destroy=function(){this.removeAllDrawEffects(),this.ClipPathId&&this.setClipPath(null)},t.Displayable.prototype.createCopy=function(){var e=new t.Container(this.getCtx(),"clonedContainer"),i=this.getElem().cloneNode(!0);return t.ToolkitUtils.appendChildElem(e.getElem(),i),this._disableEvents(i),e},t.Displayable.prototype._disableEvents=function(e){for(var i=e.firstChild;null!=i;)i.setAttributeNS&&(t.ToolkitUtils.setAttrNullNS(i,"pointer-events","none"),t.ToolkitUtils.setAttrNullNS(i,"id",null)),this._disableEvents(i),i=i.nextSibling},t.Displayable.prototype.dispatchNativeEvent=function(t){},t.Displayable.prototype.GetProperty=function(t){return this._properties[t]},t.Displayable.prototype.SetProperty=function(t,e){return e!==this._properties[t]&&(this._properties[t]=e),this},t.Displayable.prototype.SetSvgProperty=function(e,i,n){return i!==this._properties[e]&&(this._properties[e]=i,t.ToolkitUtils.setAttrNullNS(this._elem,e,i,n),this.SvgPropertyChanged(e)),this},t.Displayable.prototype.SvgPropertyChanged=function(t){},t.Displayable.generateAriaLabel=function(e,i){var n="",o=i&&i.length>0;if(e){var r=t.Bundle.getTranslatedString(t.Bundle.UTIL_PREFIX,"ARIA_LABEL_DESC_DELIMITER");n=e,o&&(n+=r)}if(o)for(var s=t.Bundle.getTranslatedString(t.Bundle.UTIL_PREFIX,"ARIA_LABEL_STATE_DELIMITER"),a=0;a<i.length;a++)n+=i[a],a!=i.length-1&&(n+=s);return n},t.Displayable.prototype.getNumDrawEffects=function(){return this._drawEffects?this._drawEffects.length:0},t.Displayable.prototype.addDrawEffect=function(t){this._drawEffects||(this._drawEffects=[]),t.__lock(),this._drawEffects.push(t),this._applyDrawEffects(this._drawEffects)},t.Displayable.prototype.addDrawEffectAt=function(t,e){this._drawEffects||(this._drawEffects=[]),t.__lock(),e>=this._drawEffects.length?this._drawEffects.push(t):this._drawEffects.splice(e,0,t),this._applyDrawEffects(this._drawEffects)},t.Displayable.prototype.removeDrawEffect=function(t){var e=this.getDrawEffectIndex(t);e>-1&&(this._drawEffects.splice(e,1),this._applyDrawEffects(this._drawEffects))},t.Displayable.prototype.removeDrawEffectAt=function(t){if(this._drawEffects){var e=this._drawEffects.length;t>=0&&t<e&&(this._drawEffects.splice(t,1),this._applyDrawEffects(this._drawEffects))}},t.Displayable.prototype.removeAllDrawEffects=function(){this._drawEffects&&(this._drawEffects=null,this._applyDrawEffects(this._drawEffects))},t.Displayable.prototype.getDrawEffectIndex=function(t){if(this._drawEffects)for(var e=this._drawEffects.length,i=0;i<e;i++)if(t===this._drawEffects[i])return i;return-1},t.Displayable.prototype._applyDrawEffects=function(){var e=this._drawEffects;if(this._filter&&(t.ToolkitUtils.removeAttrNullNS(this.getOuterElem(),"filter"),this.getCtx().removeDefs(this._filter),this._filter=null),!this._outerElem&&this._matrix&&this._createOuterGroupElem(),e&&e.length>0&&(this._filter=K.createFilter(e,this),this._filter)){this.getCtx().appendDefs(this._filter);var i=t.ToolkitUtils.getAttrNullNS(this._filter,"id");t.ToolkitUtils.setAttrNullNS(this.getOuterElem(),"filter",t.ToolkitUtils.getUrlById(i))}},t.Displayable.prototype.addEvtListener=function(t,e,i,n){var o=this._getListeners(t,i,!0);o.push(e),o.push(n),this._addListener(t,i)},t.Displayable.prototype.removeEvtListener=function(t,e,i,n){var o=this._getListeners(t,i,!1);if(o)for(var r=0;r<o.length;r+=2)if(o[r]===e&&o[r+1]===n){o.splice(r,2);break}o&&o.length<=0&&this._removeListener(t,i)},t.Displayable.prototype.dispatchDisplayableEvent=function(e,i){var n,o=t.Displayable._CREATE_EVENT_TYPE_MAP[e];if(t.MouseEvent.CLICK==o||t.MouseEvent.MOUSEOVER==o||t.MouseEvent.MOUSEOUT==o||t.MouseEvent.MOUSEMOVE==o){if(document.createEvent){n=this.getCtx();var r=this.getDimensions(),s=this.localToStage(new t.Point(r.x,r.y)),a=n.getStageAbsolutePosition(),l=new t.Point(a.x+s.x,a.y+s.y),h=document.createEvent("MouseEvents");h.initMouseEvent(o,!0,!0,window,1,l.x,l.y,l.x,l.y,!1,!1,!1,!1,0,null),this.getElem().dispatchEvent(h)}}else if((t.KeyboardEvent.KEYDOWN==o||t.KeyboardEvent.KEYUP==o||t.KeyboardEvent.KEYPRESS==o)&&document.createEvent){var u,c=document.createEvent("KeyboardEvent");i instanceof t.KeyboardEvent?(u=i.keyCode,this._ctrlKeyPressed=i.ctrlKey,this._shiftKeyPressed=i.shiftKey):(u=parseInt(i),void 0===this._ctrlKeyPressed&&(this._ctrlKeyPressed=!1),void 0===this._shiftKeyPressed&&(this._shiftKeyPressed=!1),u==t.KeyboardEvent.CONTROL?this._ctrlKeyPressed&&o==t.KeyboardEvent.KEYUP?this._ctrlKeyPressed=!1:this._ctrlKeyPressed||o!=t.KeyboardEvent.KEYDOWN||(this._ctrlKeyPressed=!0):u==t.KeyboardEvent.SHIFT&&(this._shiftKeyPressed&&o==t.KeyboardEvent.KEYUP?this._shiftKeyPressed=!1:this._shiftKeyPressed||o!=t.KeyboardEvent.KEYDOWN||(this._shiftKeyPressed=!0))),void 0!==c.initKeyboardEvent?c.initKeyboardEvent(o,!0,!0,window,this._ctrlKeyPressed,!1,this._shiftKeyPressed,!1,u,u):c.initKeyEvent(o,!0,!0,window,this._ctrlKeyPressed,!1,!1,this._shiftKeyPressed,u,u);var p=t.DomEventFactory.newEvent(c);p.keyCode=u,p.ctrlKey=this._ctrlKeyPressed,p.shiftKey=this._shiftKeyPressed;var _=(n=this.getCtx()).getStage().getSVGRoot().parentNode;t.HtmlKeyboardListenerUtils._bubbleListener.call(_,p)}},t.Displayable.prototype.AddElemListener=function(e,i,n){t.ToolkitUtils.addDomEventListener(this.getElem(),e,i,n),e==t.TouchEvent.TOUCHEND&&t.ToolkitUtils.addDomEventListener(this.getElem(),t.TouchEvent.TOUCHCANCEL,i,n)},t.Displayable.prototype.FireListener=function(t,e){var i=t.getType?t.getType():t.type,n=this._getListeners(i,e,!1);if(n)for(var o=0;o<n.length;o+=2){var r=n[o+1];n[o]&&n[o].call(r,t)}},t.Displayable.prototype.fireKeyboardListener=function(t,e){this.FireListener(t,e)},t.Displayable.prototype._getListeners=function(t,e,i){if(!this._listenerObj){if(!i)return null;this._listenerObj={}}var n=t+"_"+!!e,o=this._listenerObj[n];return!o&&i&&(o=[],this._listenerObj[n]=o),o},t.Displayable.prototype._addListener=function(e,i){var n=this._getListener(i);if(e==t.KeyboardEvent.KEYUP||e==t.KeyboardEvent.KEYDOWN||e==t.KeyboardEvent.KEYPRESS||e==f.FOCUS||e==f.FOCUSIN||e==f.FOCUSOUT||e==f.BLUR){var o=this.getCtx().getStage().getSVGRoot().parentNode;if(!o)return;o._obj||(o._obj=[]),-1==t.ArrayUtils.getIndex(o._obj,this)&&o._obj.push(this),n=t.HtmlKeyboardListenerUtils.getListener(i),t.ToolkitUtils.addDomEventListener(o,e,n,i)}else this.AddElemListener(e,n,i)},t.Displayable.prototype._removeListener=function(e,i){var n=this._getListener(i);if(e==t.KeyboardEvent.KEYUP||e==t.KeyboardEvent.KEYDOWN||e==t.KeyboardEvent.KEYPRESS||e==f.FOCUS||e==f.FOCUSIN||e==f.FOCUSOUT||e==f.BLUR){var o=this.getCtx().getStage().getSVGRoot().parentNode;t.ToolkitUtils.removeDomEventListener(o,e,n,i);var r=t.ArrayUtils.getIndex(o._obj,this);-1!==r&&o._obj.splice(r,1)}else t.ToolkitUtils.removeDomEventListener(this.getElem(),e,n,i)},t.Displayable.prototype._getListener=function(t){var e=this;return t?(this._captureClosure||(this._captureClosure=function(t){e._captureListener(t)}),this._captureClosure):(this._bubbleClosure||(this._bubbleClosure=function(t){e._bubbleListener(t)}),this._bubbleClosure)},t.Displayable.prototype._bubbleListener=function(e){if(t.Agent.isPlatformIE())if(e.type==t.MouseEvent.MOUSEOVER){if(this._bubbleHoverItem){if(this._bubbleHoverItem==e.target)return;(i=t.DomEventFactory.newEvent(e,this.getCtx())).modifyEventForIE(t.MouseEvent.MOUSEOUT,this._bubbleHoverItem),this.FireListener(i,!1)}this._bubbleHoverItem=e.target}else e.type==t.MouseEvent.MOUSEOUT&&(this._bubbleHoverItem=null);var i=t.DomEventFactory.newEvent(e,this.getCtx());this.FireListener(i,!1)},t.Displayable.prototype._captureListener=function(e){if(t.Agent.isPlatformIE())if(e.type==t.MouseEvent.MOUSEOVER){if(this._captureHoverItem){if(this._captureHoverItem==e.target)return;(i=t.DomEventFactory.newEvent(e,this.getCtx())).modifyEventForIE(t.MouseEvent.MOUSEOUT,this._captureHoverItem),this.FireListener(i,!0)}this._captureHoverItem=e.target}else e.type==t.MouseEvent.MOUSEOUT&&(this._captureHoverItem=null);var i=t.DomEventFactory.newEvent(e,this.getCtx());this.FireListener(i,!0)},t.Displayable.prototype.getFill=function(){return this.GetProperty("fill")},t.Displayable.prototype.setFill=function(e){if(this._manageDefinitions(this.GetProperty("fill"),e),!e)return t.ToolkitUtils.setAttrNullNS(this._elem,"fill","none"),t.ToolkitUtils.removeAttrNullNS(this._elem,"fill-opacity"),void this.SetProperty("fill",null);if(this.GetProperty("fill")!==e){if(this.SetProperty("fill",e),e instanceof t.GradientFill||e instanceof t.ImageFill||e instanceof t.PatternFill)t.SvgShapeUtils.addSpecialFill(e,this.getCtx()),t.ToolkitUtils.setAttrNullNS(this._elem,"fill",t.ToolkitUtils.getUrlById(e.getId()));else{var i=t.ColorUtils.fixColorForPlatform(e.getColor(),e.getAlpha());i&&i.color&&(t.ToolkitUtils.setAttrNullNS(this._elem,"fill",i.color),null!=i.alpha&&t.ToolkitUtils.setAttrNullNS(this._elem,"fill-opacity",i.alpha,1))}e.__lock(),this.UpdateSelectionEffect()}},t.Displayable.prototype.getClassName=function(){return this._className},t.Displayable.prototype.setClassName=function(e){return this._className&&!e?t.ToolkitUtils.removeAttrNullNS(this._elem,"class"):e&&t.ToolkitUtils.setAttrNullNS(this._elem,"class",e),this._className=e,this},t.Displayable.prototype.getStyle=function(){return this._style},t.Displayable.prototype.setStyle=function(e){return this._style&&!e?t.ToolkitUtils.removeAttrNullNS(this._elem,"style"):e&&t.ToolkitUtils.setAttrNullNS(this._elem,"style",t.CSSStyle.cssObjectToString(e),""),this._style=e,this},t.Displayable.prototype.setSolidFill=function(e,i){this.setFill(new t.SolidFill(e,i))},t.Displayable.prototype.setInvisibleFill=function(){this.setFill(t.SolidFill.invisibleFill())},t.Displayable.prototype.getStroke=function(){return this._stroke},t.Displayable.prototype.setStroke=function(e){if(this._manageDefinitions(this._stroke,e),this._stroke=e,!e)return t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke"),t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-opacity"),t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-width"),t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-dasharray"),t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-dashoffset"),t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-linejoin"),t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-linecap"),void t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-miterlimit");if(e instanceof t.GradientStroke){t.SvgShapeUtils.addSpecialStroke(e,this.getCtx()),t.ToolkitUtils.setAttrNullNS(this._elem,"stroke",t.ToolkitUtils.getUrlById(e.getId()));var i=e.getAlpha();null!=i&&t.ToolkitUtils.setAttrNullNS(this._elem,"stroke-opacity",i)}else{var n=t.ColorUtils.fixColorForPlatform(e.getColor(),e.getAlpha());n&&n.color?(t.ToolkitUtils.setAttrNullNS(this._elem,"stroke",n.color),null!=n.alpha&&t.ToolkitUtils.setAttrNullNS(this._elem,"stroke-opacity",n.alpha,1)):(t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke"),t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-opacity"))}t.ToolkitUtils.setAttrNullNS(this._elem,"stroke-width",e.getWidth(),1),e.isFixedWidth()&&t.ToolkitUtils.setAttrNullNS(this._elem,"vector-effect","non-scaling-stroke"),e.getType()!==t.Stroke.SOLID?(e.getDash()&&t.ToolkitUtils.setAttrNullNS(this._elem,"stroke-dasharray",e.getDash()),e.getDashOffset()&&t.ToolkitUtils.setAttrNullNS(this._elem,"stroke-dashoffset",e.getDashOffset())):(t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-dasharray"),t.ToolkitUtils.removeAttrNullNS(this._elem,"stroke-dashoffset"));var o=e.getLineJoin();o&&t.ToolkitUtils.setAttrNullNS(this._elem,"stroke-linejoin",o),(o=e.getLineEnd())&&t.ToolkitUtils.setAttrNullNS(this._elem,"stroke-linecap",o),(o=e.getMiterLimit())&&t.ToolkitUtils.setAttrNullNS(this._elem,"stroke-miterlimit",o),e.__lock()},t.Displayable.prototype.setSolidStroke=function(e,i,n){this.setStroke(new t.SolidStroke(e,i,n))},t.Displayable.prototype._manageDefinitions=function(t,e){t!=e&&(t&&(t._referenceCount--,0==t._referenceCount&&t._defElem&&(this.getCtx().removeDefs(t._defElem),t._defPresent=!1)),e&&(e._referenceCount||(e._referenceCount=0),e._referenceCount++))},t.Displayable.prototype.setTranslate=function(t,e){this._modifyMatrix(null,null,t,e)},t.Displayable.prototype.getTranslateX=function(){var e=this.getMatrix();return e?e._decompose()[t.Matrix._DECOMP_TX]:0},t.Displayable.prototype.setTranslateX=function(t){this._modifyMatrix(null,null,t)},t.Displayable.prototype.getTranslateY=function(){var e=this.getMatrix();return e?e._decompose()[t.Matrix._DECOMP_TY]:0},t.Displayable.prototype.setTranslateY=function(t){this._modifyMatrix(null,null,null,t)},t.Displayable.prototype.setScale=function(t,e){this._modifyMatrix(t,e)},t.Displayable.prototype.getScaleX=function(){var e=this.getMatrix();return e?e._decompose()[t.Matrix._DECOMP_SX]:1},t.Displayable.prototype.setScaleX=function(t){this._modifyMatrix(t)},t.Displayable.prototype.getScaleY=function(){var e=this.getMatrix();return e?e._decompose()[t.Matrix._DECOMP_SY]:1},t.Displayable.prototype.setScaleY=function(t){this._modifyMatrix(null,t)},t.Displayable.prototype.getRotation=function(){var e=this.getMatrix();return e?e._decompose()[t.Matrix._DECOMP_R]:0},t.Displayable.prototype.setRotation=function(t){this._modifyMatrix(null,null,null,null,t)},t.Displayable.prototype.getMatrix=function(){return this._matrix?this._matrix:new t.Matrix},t.Displayable.prototype.setMatrix=function(e){if(e&&e.isIdentity()&&(e=null),this._matrix!=e)if(this._matrix=e,this._matrix&&!this._matrix.isLocked()&&this._matrix.__lock(),!this._outerElem&&t.Displayable.HasAttributes(this.getElem(),t.Displayable._ATTRS_TRANSFERABLE_TO_OUTER)&&this._createOuterGroupElem(),this._matrix=e,e){var i="matrix("+t.ToolkitUtils.roundDecimal(e.getA())+","+t.ToolkitUtils.roundDecimal(e.getC())+","+t.ToolkitUtils.roundDecimal(e.getB())+","+t.ToolkitUtils.roundDecimal(e.getD())+","+t.ToolkitUtils.roundDecimal(e.getTx())+","+t.ToolkitUtils.roundDecimal(e.getTy())+")";t.ToolkitUtils.setAttrNullNS(this.getElem(),"transform",i,"matrix(1,0,0,1,0,0)")}else{t.ToolkitUtils.getAttrNullNS(this.getElem(),"transform")&&(t.ToolkitUtils.removeAttrNullNS(this.getElem(),"transform"),t.Agent.isPlatformIE()&&t.ToolkitUtils.setAttrNullNS(this.getElem(),"transform",null))}},t.Displayable.prototype._modifyMatrix=function(e,i,n,o,r){var s=this.getMatrix()._decompose(),a=s[t.Matrix._DECOMP_SX],l=s[t.Matrix._DECOMP_SY],h=s[t.Matrix._DECOMP_TX],u=s[t.Matrix._DECOMP_TY],c=s[t.Matrix._DECOMP_R],p=!1;if(null!=e&&a!=e&&(s[t.Matrix._DECOMP_SX]=e,p=!0),null!=i&&l!=i&&(s[t.Matrix._DECOMP_SY]=i,p=!0),null!=n&&h!=n&&(s[t.Matrix._DECOMP_TX]=n,p=!0),null!=o&&u!=o&&(s[t.Matrix._DECOMP_TY]=o,p=!0),null!=r&&c!=r&&(s[t.Matrix._DECOMP_R]=r,p=!0),p){var _=this.getMatrix().clone();_._recompose(s),this.setMatrix(_)}},t.Container=function(t,e){this.Init(t,"g",e)},t.Obj.createSubclass(t.Container,t.Displayable),t.Container.prototype.Init=function(e,i,n){this._bShapeContainer=this instanceof t.Shape,t.Container.superclass.Init.call(this,e,null!=i?i:"g",n),this._childGroupElem=null},t.Container.AttributesTransferableToGroup=["transform","opacity","visibility","pointer-events","clip-path","cursor"],t.Container.prototype.addChild=function(e){if(e){var i=e.getParent();i&&i.removeChild(e),this._arList||(this._arList=[]),e.setParent(this),this._bShapeContainer&&this.CreateChildGroupElem(!1);var n=this.getContainerElem();t.ToolkitUtils.appendChildElem(n,e.getOuterElem()),this._arList.push(e)}},t.Container.prototype.addChildAt=function(t,e){this.AddChildAt(t,e)},t.Container.prototype.AddChildAt=function(t,e){if(e>=0&&e<=this.getNumChildren()&&t){var i=this._findChild(t);if(i>=0&&i==e)return;var n=t.getParent();n&&n.removeChild(t),t.setParent(this),i>=0&&e==this.getNumChildren()+1&&e--;var o=e;this._bShapeContainer&&(this.CreateChildGroupElem(!1),o++);var r=this.getContainerElem(),s=r.childNodes[o];s||(s=null),r.insertBefore(t.getOuterElem(),s),this._arList||(this._arList=[]),this._arList.splice(e,0,t)}},t.Container.prototype.contains=function(t){return this._findChild(t)>=0},t.Container.prototype._findChild=function(t){var e=-1;if(this._arList)for(var i=this._arList.length,n=0;n<i;n++)if(this._arList[n]===t){e=n;break}return e},t.Container.prototype.getChildAfter=function(t){var e=null,i=this._findChild(t);return i>=0&&++i<this._arList.length&&(e=this._arList[i]),e},t.Container.prototype.getChildBefore=function(t){var e=null,i=this._findChild(t);return i>0&&(e=this._arList[--i]),e},t.Container.prototype.getChildAt=function(t){var e=null;return this._arList&&this._arList.length>t&&t>=0&&(e=this._arList[t]),e},t.Container.prototype.getChildIndex=function(t){return this._findChild(t)},t.Container.prototype.getNumChildren=function(){return this._arList?this._arList.length:0},t.Container.prototype.removeChild=function(t){var e=this._findChild(t);-1!==e&&this._removeObj(t,e)},t.Container.prototype.removeChildImpl=function(e){var i=e.getOuterElem(),n=e.getParent();i&&n&&this.getContainerElem().removeChild(i);if(!this._anchorElem&&this._bShapeContainer&&1===this.getNumChildren()){var o=this._childGroupElem,r=o?o.parentNode:null;r&&(t.Displayable.TransferAttributes(o,this._elem,this.GetAttributesTransferableToGroup()),r.replaceChild(this._elem,o),this._childGroupElem=null)}},t.Container.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e&&this._removeObj(e,t),e},t.Container.prototype.removeChildren=function(){if(this._arList)for(var t=this._arList;this.getNumChildren()>0;)this._removeObj(t[0],0)},t.Container.prototype._removeObj=function(t,e){this.removeChildImpl(t),t.setParent(null),this._arList.splice(e,1),0===this._arList.length&&(this._arList=null)},t.Container.prototype.destroy=function(){t.Container.superclass.destroy.call(this);for(var e=this.getNumChildren(),i=0;i<e;i++){this.getChildAt(i).destroy()}},t.Container.prototype.getHyperlink=function(){return this._linkObj},t.Container.prototype.GetAttributesTransferableToGroup=function(){return t.Container.AttributesTransferableToGroup},t.Container.prototype.getElem=function(){return this._childGroupElem?this._childGroupElem:this._elem},t.Container.prototype.CreateChildGroupElem=function(e,i){if(this._childGroupElem||!i&&0!==this.getNumChildren())e&&this.removeChildren();else{var n=t.Displayable.SET_ID_ON_DOM&&this._id?this._id+"_g":null;this._childGroupElem=t.SvgShapeUtils.createElement("g",n);var o=this.getParent();o&&o.getElem().replaceChild(this._childGroupElem,this._elem),e||t.ToolkitUtils.appendChildElem(this._childGroupElem,this._elem),t.Displayable.TransferAttributes(this._elem,this._childGroupElem,this.GetAttributesTransferableToGroup()),this._elem._obj&&(this._childGroupElem._obj=this._elem._obj),t.Agent.isEnvironmentTest()&&document.shapeContainerCount++}},t.Container.prototype.getDimensionsWithStroke=function(){for(var t=[],e=this.getNumChildren(),i=0;i<e;i++)t.push(this.getChildAt(i));for(var n=null;t.length>0;){var o=t.shift(),r=o.GetDimensionsWithStroke(this);if(r&&(n=n?n.getUnion(r):r),!o.includeChildSubtree||o.includeChildSubtree()){e=o.getNumChildren();for(i=0;i<e;i++)t.push(o.getChildAt(i))}}return n},t.Container.prototype.GetDimensionsWithStroke=function(t){return null},t.Container._reparentChildren=function(e,i){var n=i.childNodes;if(n)for(var o,r,s=n.length-1;s>=0;s--)o=n[s],r?e.insertBefore(o,r):t.ToolkitUtils.appendChildElem(e,o),r=o},t.Container.prototype.getContainerElem=function(){return this._anchorElem?this._anchorElem:this.getElem()},t.Container.prototype.dispatchNativeEvent=function(t){var e=t.getNativeEvent(),i=null;(i=this._bShapeContainer?this._childGroupElem:this._anchorElem?this._anchorElem:this._elem).dispatchEvent&&i.dispatchEvent(e)},t.Container.prototype.UpdateSelectionEffect=function(){},t.Container.prototype.setHollow=function(t,e){for(var i=0;i<this.getNumChildren();i++){var n=this.getChildAt(i),o=n.getFill()?n.getFill().getColor():t;n.setHollow(o,e)}},t.Container.prototype.includeChildSubtree=function(){return!0};var T=function(t,e,i){this.Init(t,"g",i),this._SVGRoot=e,this.disableSelection(this._elem),this.setCursor("default")};t.Obj.createSubclass(T,t.Container),T.prototype.addChild=function(t){T.superclass.addChild.call(this,t)},T.prototype.appendDefs=function(e){t.ToolkitUtils.appendChildElem(this._elemDefs,e)},T.prototype.getDefs=function(){return this._elemDefs},T.prototype.getSVGRoot=function(){return this._SVGRoot},T.prototype.disableSelection=function(t){t.onselectstart=function(){return!1},t.onselect=function(){return!1}},t.Shape=function(){},t.Obj.createSubclass(t.Shape,t.Container),t.Shape.prototype.Init=function(e,i,n){t.Shape.superclass.Init.call(this,e,i,n),this._bSelectable=!1,this.IsSelected=!1,this.InnerShape=null,this.HoverInnerStroke=null,this.HoverOuterStroke=null,this.SelectedInnerStroke=null,this.SelectedOuterStroke=null,this.SelectedHoverInnerStroke=null,this.SelectedHoverOuterStroke=null,this.OriginalStroke=null,this._isOriginalStrokeSet=!1,this.IsShowingHoverEffect=!1},t.Shape.prototype.setHollow=function(e,i){if(this._bHollow)this.setFill(this._origFill),this.setStroke(this._origStroke),this._bHollow=!1;else{this._origFill=this.GetProperty("fill"),this._origStroke=this.getStroke();var n,o=t.SolidFill.invisibleFill();n=e?new t.SolidStroke(t.ColorUtils.getRGB(e),t.ColorUtils.getAlpha(e),i):new t.SolidStroke(this.GetProperty("fill").getColor(),this.GetProperty("fill").getAlpha(),i),this.setFill(o),this.setStroke(n),this._bHollow=!0}},t.Shape.prototype.isHollow=function(){return this._bHollow},t.Shape.prototype.destroy=function(){t.Shape.superclass.destroy.call(this),this.setFill(null),this.setStroke(null)},t.Shape.prototype.getDimensionsWithStroke=function(){var e=this.GetElemDimensionsWithStroke(),i=t.Shape.superclass.getDimensionsWithStroke.call(this);return e&&i?e=e.getUnion(i):i&&(e=i),e},t.Shape.prototype.GetDimensionsWithStroke=function(t){var e=this.GetElemDimensionsWithStroke();return t&&t!==this?this.ConvertCoordSpaceRect(e,t):e},t.Shape.prototype.GetElemDimensionsWithStroke=function(){var e=this.getDimensionsSelf&&this.getNumChildren()-this._getInnerShapeCount()==0?this.getDimensionsSelf():t.Shape.superclass.getDimensions.call(this),i=this.getStroke();if(e&&i){var n=i.getWidth();if(n){var o=.5*n;e.x-=o,e.y-=o,e.w+=n,e.h+=n}}return e},t.Shape.prototype.UpdateSelectionEffect=function(){var e;(this.isSelected()||this.isHoverEffectShown())&&(this.InnerShape&&(e=this.InnerShape.getStroke(),this.removeChild(this.InnerShape)),this.InnerShape=this.copyShape(),this.InnerShape._setOuterShape(this),this.InnerShape.setMouseEnabled(!1),this.InnerShape.setFill(this.getFill()),this.InnerShape.setStyle(this.getStyle()).setClassName(this.getClassName()),e&&this.InnerShape.setStroke(e),this.InnerShape.setMouseEnabled(!1),this.InnerShape.setCursor(t.SelectionEffectUtils.getSelectingCursor()),this.AddChildAt(this.InnerShape,0))},t.Shape.prototype._setOuterShape=function(t){this._outerShape=t},t.Shape.prototype.GetHoverSelectionInnerStroke=function(){var t;return this.InnerShape&&(this.isSelected()?t=this.isHoverEffectShown()?this.SelectedHoverInnerStroke:this.SelectedInnerStroke:this.isHoverEffectShown()&&(t=this.HoverInnerStroke)),t},t.Shape.prototype.GetHoverSelectionOuterStroke=function(){var t;return this._outerShape&&(this._outerShape.isSelected()?t=this._outerShape.isHoverEffectShown()?this._outerShape.SelectedHoverOuterStroke:this._outerShape.SelectedOuterStroke:this._outerShape.isHoverEffectShown()&&(t=this._outerShape.HoverOuterStroke)),t},t.Shape.prototype.setHoverStroke=function(t,e){return this.HoverInnerStroke=t,this.HoverOuterStroke=e,this},t.Shape.prototype.setSelectedStroke=function(t,e){return this.SelectedInnerStroke=t,this.SelectedOuterStroke=e,this},t.Shape.prototype.setSelectedHoverStroke=function(t,e){return this.SelectedHoverInnerStroke=t,this.SelectedHoverOuterStroke=e,this},t.Shape.prototype.setSelectable=function(e){this._bSelectable=e,this._bSelectable?this.setCursor(t.SelectionEffectUtils.getSelectingCursor()):this.setCursor(null)},t.Shape.prototype.isSelectable=function(){return this._bSelectable},t.Shape.prototype.isSelected=function(){return this.IsSelected},t.Shape.prototype.setSelected=function(t){this.IsSelected!=t&&(this._isOriginalStrokeSet||(this._isOriginalStrokeSet=!0,this.OriginalStroke=this.getStroke()),this.IsSelected=t,this.isSelected()?(this.UpdateSelectionEffect(),this.isHoverEffectShown()?(this.CreateSelectedHoverStrokes(),this.InnerShape.setStroke(this.SelectedHoverInnerStroke),this.setStroke(this.SelectedHoverOuterStroke)):(this.InnerShape.setStroke(this.SelectedInnerStroke),this.setStroke(this.SelectedOuterStroke))):(this.removeChild(this.InnerShape),this.setStroke(this.OriginalStroke)))},t.Shape.prototype.showHoverEffect=function(){this.IsShowingHoverEffect||(this.IsShowingHoverEffect=!0,this._isOriginalStrokeSet||(this._isOriginalStrokeSet=!0,this.OriginalStroke=this.getStroke()),this.UpdateSelectionEffect(),this.isSelected()?(this.CreateSelectedHoverStrokes(),this.InnerShape.setStroke(this.SelectedHoverInnerStroke),this.setStroke(this.SelectedHoverOuterStroke)):(this.InnerShape.setStroke(this.HoverInnerStroke),this.setStroke(this.HoverOuterStroke)))},t.Shape.prototype.CreateSelectedHoverStrokes=function(){this.SelectedHoverInnerStroke||(this.SelectedHoverInnerStroke=this.HoverInnerStroke.clone()),this.SelectedHoverOuterStroke||(this.SelectedHoverOuterStroke=this.SelectedOuterStroke.clone(),this.SelectedHoverOuterStroke.setWidth(this.SelectedOuterStroke.getWidth()+(this.HoverInnerStroke.getWidth()-this.SelectedInnerStroke.getWidth())))},t.Shape.prototype.hideHoverEffect=function(){this.IsShowingHoverEffect&&(this.IsShowingHoverEffect=!1,this.isSelected()?(this.InnerShape.setStroke(this.SelectedInnerStroke),this.setStroke(this.SelectedOuterStroke)):(this.removeChild(this.InnerShape),this.setStroke(this.OriginalStroke)))},t.Shape.prototype.isHoverEffectShown=function(){return this.IsShowingHoverEffect},t.Shape.prototype.addChildAt=function(e,i){t.Shape.superclass.addChildAt.call(this,e,i+this._getInnerShapeCount())},t.Shape.prototype.getChildAt=function(e,i){return t.Shape.superclass.getChildAt.call(this,e,i+this._getInnerShapeCount())},t.Shape.prototype.getChildIndex=function(e){return t.Shape.superclass.getChildIndex.call(this,e)-this._getInnerShapeCount()},t.Shape.prototype.removeChildAt=function(e){t.Shape.superclass.removeChildAt.call(this,e+this._getInnerShapeCount())},t.Shape.prototype.getDimensions=function(e){return this.getDimensionsSelf&&this.getNumChildren()-this._getInnerShapeCount()==0?this.getDimensionsSelf(e):t.Shape.superclass.getDimensions.call(this,e)},t.Shape.prototype._getInnerShapeCount=function(){return this.isSelected()||this.isHoverEffectShown()?1:0},t.Shape.prototype.SvgPropertyChanged=function(t){this.UpdateSelectionEffect()},t.Shape.prototype.copyShape=function(){return null};var v=function(){};t.Obj.createSubclass(v,t.Shape),v.prototype.Init=function(t,e,i,n,o){v.superclass.Init.call(this,t,e,o),this.setCx(i).setCy(n)},v.prototype.getCx=function(){return this.GetProperty("cx")},v.prototype.setCx=function(t){return this.SetSvgProperty("cx",t,0)},v.prototype.getCy=function(){return this.GetProperty("cy")},v.prototype.setCy=function(t){return this.SetSvgProperty("cy",t,0)};var m=function(){};t.Obj.createSubclass(m,t.Shape),m.prototype.Init=function(t,e,i,n){m.superclass.Init.call(this,t,e,n),i&&this.setPoints(i)},m.prototype.getPoints=function(){return this.GetProperty("arPoints")},m.prototype.setPoints=function(e){return this.SetProperty("arPoints",e),this.SetSvgProperty("points",t.SvgShapeUtils.convertPointsArray(e))},m.prototype.getDimensionsSelf=function(e){var i=t.PolygonUtils.getDimensions(this.getPoints());return this.ConvertCoordSpaceRect(i,e)},t.Arc=function(t,e,i,n,o,r,s,a,l){this.Init(t,e,i,n,o,r,s,a,l)},t.Obj.createSubclass(t.Arc,t.Shape),t.Arc.OPEN="OPEN",t.Arc.CHORD="CHORD",t.Arc.PIE="PIE",t.Arc.prototype.Init=function(e,i,n,o,r,s,a,l,h){t.Arc.superclass.Init.call(this,e,"path",h),this._sa=0,this._ae=0,r=null===r||isNaN(r)?o:r,this._bInInit=!0,this.setCx(i),this.setCy(n),this.setRx(o),this.setRy(r),this.setAngleStart(s),this.setAngleExtent(a),this.setClosure(l||t.Arc.OPEN),this._bInInit=!1,this._createArc()},t.Arc.prototype._addClosure=function(e){return this._ct===t.Arc.CHORD?e+=" z":this._ct===t.Arc.PIE?e+=" L "+this._cx+","+this._cy+" z":this._ct===t.Arc.OPEN&&this.setFill(null),e},t.Arc.prototype._createArc=function(){if(!this._bInInit){var e=this._sa*t.Math.RADS_PER_DEGREE,i=this._ae*t.Math.RADS_PER_DEGREE,n=this._cx+this._rx*Math.cos(e),o=this._cy-this._ry*Math.sin(e),r=this._cx+this._rx*Math.cos(e+i),s=this._cy-this._ry*Math.sin(e+i),a=Math.abs(this._ae)>180?"1":"0",l=this._ae>0?"0":"1",h="M "+t.ToolkitUtils.roundDecimal(n)+" "+t.ToolkitUtils.roundDecimal(o)+" A "+t.ToolkitUtils.roundDecimal(this._rx)+","+t.ToolkitUtils.roundDecimal(this._ry)+" 0 "+a+","+l+" "+t.ToolkitUtils.roundDecimal(r)+","+t.ToolkitUtils.roundDecimal(s);h=this._addClosure(h),t.ToolkitUtils.setAttrNullNS(this._elem,"d",h),null!==this._stroke&&this.setStroke(this._stroke)}},t.Arc.prototype.getAngleExtent=function(){return this._ae},t.Arc.prototype.setAngleExtent=function(t){t=null===t||isNaN(t)?0:t,this._ae!==t&&(360===t&&(t=359.99),this._ae=t,this._createArc(),this.UpdateSelectionEffect())},t.Arc.prototype.getAngleStart=function(){return this._sa},t.Arc.prototype.setAngleStart=function(t){t=null===t||isNaN(t)?0:t,this._sa!==t&&(this._sa=t,this._createArc(),this.UpdateSelectionEffect())},t.Arc.prototype.getClosure=function(){return this._ct},t.Arc.prototype.setClosure=function(t){t!==this._ct&&(this._ct=t,this._createArc(),this.UpdateSelectionEffect())},t.Arc.prototype.getCx=function(){return this._cx},t.Arc.prototype.setCx=function(e){e!==this._cx&&(this._cx=e,t.ToolkitUtils.setAttrNullNS(this._elem,"cx",e),this.UpdateSelectionEffect())},t.Arc.prototype.getCy=function(){return this._cy},t.Arc.prototype.setCy=function(e){e!==this._cy&&(this._cy=e,t.ToolkitUtils.setAttrNullNS(this._elem,"cy",e),this.UpdateSelectionEffect())},t.Arc.prototype.getRx=function(){return this._rx},t.Arc.prototype.setRx=function(e){e!==this._rx&&(this._rx=e,t.ToolkitUtils.setAttrNullNS(this._elem,"rx",this._rx),this._createArc(),this.UpdateSelectionEffect())},t.Arc.prototype.getRy=function(){return this._ry},t.Arc.prototype.setRy=function(e){e!==this._ry&&(this._ry=e,t.ToolkitUtils.setAttrNullNS(this._elem,"ry",this._ry),this._createArc(),this.UpdateSelectionEffect())},t.Arc.prototype.setArc=function(t,e){this.setAngleStart(t),this.setAngleExtentStart(e)},t.Arc.prototype.setRadius=function(t,e){this.setRx(t),this.setRy(e)},t.Arc.prototype.copyShape=function(){return new t.Arc(this.getCtx(),this.getCx(),this.getCy(),this.getRx(),this.getRy(),this.getAngleStart(),this.getAngleExtent(),this.getClosure())},t.Arc.prototype.GetAriaElem=function(){return t.Agent.isTouchDevice()&&this.CreateChildGroupElem(!1,!0),t.Arc.superclass.GetAriaElem.call(this)},t.Circle=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.Circle,v),t.Circle.prototype.Init=function(e,i,n,o,r){t.Circle.superclass.Init.call(this,e,"circle",i,n,r),this.setRadius(o)},t.Circle.prototype.getRadius=function(){return this.GetProperty("r")},t.Circle.prototype.setRadius=function(t){return this.SetSvgProperty("r",t)},t.Circle.prototype.copyShape=function(){return new t.Circle(this.getCtx(),this.getCx(),this.getCy(),this.getRadius())},t.Circle.prototype.getDimensionsSelf=function(e){var i=new t.Rectangle(this.getCx()-this.getRadius(),this.getCy()-this.getRadius(),2*this.getRadius(),2*this.getRadius());return this.ConvertCoordSpaceRect(i,e)},t.Image=function(t,e,i,n,o,r,s){this.Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.Image,t.Shape),t.Image.prototype.Init=function(e,i,n,o,r,s,a){t.Image.superclass.Init.call(this,e,"image",a),i=t.ToolkitUtils.getImageUrl(e,i),t.Agent.isPlatformIE()&&(t.ToolkitUtils.setAttrNullNS(this._elem,"fill","#FFFFFF"),t.ToolkitUtils.setAttrNullNS(this._elem,"fill-opacity","0")),this.setImage(i,n,o,r,s),this.setAriaProperty("hidden","true")},t.Image.prototype.getX=function(){return this.GetProperty("x")},t.Image.prototype.setX=function(t){return this.SetSvgProperty("x",t)},t.Image.prototype.getY=function(){return this.GetProperty("y")},t.Image.prototype.setY=function(t){return this.SetSvgProperty("y",t)},t.Image.prototype.getWidth=function(){return this.GetProperty("width")},t.Image.prototype.setWidth=function(t){return this.SetSvgProperty("width",t)},t.Image.prototype.getHeight=function(){return this.GetProperty("height")},t.Image.prototype.setHeight=function(t){return this.SetSvgProperty("height",t)},t.Image.prototype.getSrc=function(){return this._src},t.Image.prototype.setSrc=function(e){if(e!==this._src){var i=e;if(this._src=e,t.Agent.isEnvironmentBatik()){var n=t.JavaImageLoader.getImageInfo(e);n&&(i=n.uri)}t.ToolkitUtils.setHref(this._elem,i)}return this},t.Image.prototype.getPos=function(){return new t.Point(this._x,this._y)},t.Image.prototype.setPos=function(t,e){this.setX(t).setY(e)},t.Image.prototype.setImage=function(e,i,n,o,r){i instanceof t.Image?(this.setSrc(e.src),this.setPos(e.x,e.y),this.setWidth(e.w),this.setHeight(e.h)):(this.setSrc(e),this.setPos(i,n),this.setWidth(o),this.setHeight(r)),t.ToolkitUtils.setAttrNullNS(this._elem,"preserveAspectRatio","none")},t.Image.prototype.getDimensions=function(e){if(this.getDimensionsSelf&&this.getNumChildren()-this._getInnerShapeCount()==0)return this.getDimensionsSelf(e);var i=this.getElem().getBBox();return i=i.width&&i.height?new t.Rectangle(i.x,i.y,i.width,i.height):new t.Rectangle(i.x,i.y,this.getWidth(),this.getHeight()),this.ConvertCoordSpaceRect(i,e)},t.Image.prototype.__setDimensions=function(t){this.setWidth(t.width),this.setHeight(t.height)},t.Image.prototype.UpdateSelectionEffect=function(){},t.Image.prototype.copyShape=function(){return new t.Image(this.getCtx(),this.getSrc(),this.getX(),this.getY(),this.getWidth(),this.getHeight())},t.Image.prototype.getDimensionsSelf=function(e){var i=new t.Rectangle(this.getX(),this.getY(),this.getWidth(),this.getHeight());return this.ConvertCoordSpaceRect(i,e)},t.Image.prototype.setAriaProperty=function(e,i){t.Image.superclass.setAriaProperty.call(this,e,i),"hidden"!=e&&t.Image.superclass.setAriaProperty.call(this,"hidden",null)},t.Line=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)},t.Obj.createSubclass(t.Line,t.Shape),t.Line.prototype.Init=function(e,i,n,o,r,s){t.Line.superclass.Init.call(this,e,"line",s),this.setX1(i).setY1(n).setX2(o).setY2(r),this._bHollow=!1},t.Line.prototype.getX1=function(){return this.GetProperty("x1")},t.Line.prototype.setX1=function(t){return this.SetSvgProperty("x1",t,0)},t.Line.prototype.getY1=function(){return this.GetProperty("y1")},t.Line.prototype.setY1=function(t){return this.SetSvgProperty("y1",t,0)},t.Line.prototype.getX2=function(){return this.GetProperty("x2")},t.Line.prototype.setX2=function(t){return this.SetSvgProperty("x2",t,0)},t.Line.prototype.getY2=function(){return this.GetProperty("y2")},t.Line.prototype.setY2=function(t){return this.SetSvgProperty("y2",t,0)},t.Line.prototype.setHollow=function(){var e=this._elem.parentNode;if(this._bHollow)this._origElem&&(e.replaceChild(this._origElem,this._elem),t.ToolkitUtils.setAttrNullNS(this._origElem,"opacity",this._alpha),this._elem=this._origElem,this._origElem=null,this._bHollow=!1);else{var i;this._origElem=this._elem;var n=this.getX2()-this.getX1(),o=n,r=this.getY1()-n/2,s=this.getStroke();i=t.SvgShapeUtils.createElement("rect"),t.ToolkitUtils.setAttrNullNS(i,"x",this.getX1()),t.ToolkitUtils.setAttrNullNS(i,"y",r),t.ToolkitUtils.setAttrNullNS(i,"width",this.getX2()-this.getX1()),t.ToolkitUtils.setAttrNullNS(i,"height",o);var a=s.getColor();if(a){var l=s.getAlpha();t.Agent.isBrowserSafari()&&-1!==a.indexOf("rgba")?(t.ToolkitUtils.setAttrNullNS(i,"stroke",t.ColorUtils.getRGB(a)),null!=l?t.ToolkitUtils.setAttrNullNS(i,"stroke-opacity",t.ColorUtils.getAlpha(a)*l):t.ToolkitUtils.setAttrNullNS(i,"stroke-opacity",t.ColorUtils.getAlpha(a))):(t.ToolkitUtils.setAttrNullNS(i,"stroke",a),null!=l&&t.ToolkitUtils.setAttrNullNS(i,"stroke-opacity",l))}t.ToolkitUtils.setAttrNullNS(i,"fill","#ffffff"),t.ToolkitUtils.setAttrNullNS(i,"fill-opacity","0.001"),t.ToolkitUtils.setAttrNullNS(i,"shape-rendering","crispEdges"),i._obj=this,e.replaceChild(i,this._elem),this._elem=i,t.ToolkitUtils.setAttrNullNS(this._elem,"opacity",this._alpha),this._bHollow=!0}},t.Line.prototype.getDimensions=function(e){var i=t.Line.superclass.getDimensions.call(this,e);if(this._childGroupElem&&this._elem){var n=this._childGroupElem.getBBox();if(0==n.x&&0==n.y&&0==n.width&&0==n.height){var o=this._elem.getBBox();i=new t.Rectangle(o.x,o.y,o.width,o.height)}}return i},t.Line.prototype.copyShape=function(){return new t.Line(this.getCtx(),this.getX1(),this.getY1(),this.getX2(),this.getY2())},t.Line.prototype.getDimensionsSelf=function(e){var i=Math.min(this.getX1(),this.getX2()),n=Math.min(this.getY1(),this.getY2()),o=Math.abs(this.getX1()-this.getX2()),r=Math.abs(this.getY1()-this.getY2()),s=new t.Rectangle(i,n,o,r);return this.ConvertCoordSpaceRect(s,e)},t.Line.prototype._adjustDimensionsForStyle=function(){this.getX1()==this.getX2()?this.setX2(this.getX2()+.001):this.getY1()==this.getY2()&&this.setY2(this.getY2()+.001)},t.Line.prototype.setStyle=function(e,i){return e&&!i&&this._adjustDimensionsForStyle(),t.Line.superclass.setStyle.call(this,e)},t.Line.prototype.setClassName=function(e,i){return e&&!i&&this._adjustDimensionsForStyle(),t.Line.superclass.setClassName.call(this,e)},t.SimpleMarker=function(t,e,i,n,o,r,s,a,l,h,u){this.Init(t,e,i,n,o,r,s,a,l,h,u)},t.Obj.createSubclass(t.SimpleMarker,t.Shape),t.SimpleMarker.CIRCLE="circle",t.SimpleMarker.ELLIPSE="ellipse",t.SimpleMarker.SQUARE="square",t.SimpleMarker.RECTANGLE="rectangle",t.SimpleMarker.DIAMOND="diamond",t.SimpleMarker.TRIANGLE_UP="triangleUp",t.SimpleMarker.TRIANGLE_DOWN="triangleDown",t.SimpleMarker.PLUS="plus",t.SimpleMarker.HUMAN="human",t.SimpleMarker.STAR="star",t.SimpleMarker._CIRCLE_ELEM="circle",t.SimpleMarker._ELLIPSE_ELEM="ellipse",t.SimpleMarker._RECT_ELEM="rect",t.SimpleMarker._PATH_ELEM="path",t.SimpleMarker._POLYGON_ELEM="polygon",t.SimpleMarker._SHAPE_ELEM_MAP={},t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.CIRCLE]=t.SimpleMarker._CIRCLE_ELEM,t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.ELLIPSE]=t.SimpleMarker._ELLIPSE_ELEM,t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.SQUARE]=t.SimpleMarker._PATH_ELEM,t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.RECTANGLE]=t.SimpleMarker._PATH_ELEM,t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.DIAMOND]=t.SimpleMarker._POLYGON_ELEM,t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.TRIANGLE_UP]=t.SimpleMarker._POLYGON_ELEM,t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.TRIANGLE_DOWN]=t.SimpleMarker._POLYGON_ELEM,t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.PLUS]=t.SimpleMarker._POLYGON_ELEM,t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.HUMAN]=t.SimpleMarker._PATH_ELEM,t.SimpleMarker._SHAPE_ELEM_MAP[t.SimpleMarker.STAR]=t.SimpleMarker._POLYGON_ELEM,t.SimpleMarker.DEFAULT_BORDER_RADIUS="6",t.SimpleMarker._HUMAN_CMDS="M 38.07,36.467856 q 13.414,0 13.414,-13.406 l 0,-9.258 q 0,-13.4039999 -13.414,-13.4039999 -13.414,0 -13.414,13.4039999 l 0,9.258 q 0,13.406 13.414,13.406 l 0,0 z m 16.219,7.275 -32.435999,0 q -10.139552,0 -15.9400009,7.443875 Q 0.5,58.133383 0.5,69.156856 l 0,54.396004 12.746001,0 0,-51.609004 q 0,-2.824 0.793,-2.824 0.742,0 0.742,2.709 l 0,124.267994 q 0,2.82401 2.823999,2.82401 l 12.531,0 q 2.824,0 2.824,-2.824 l 0,-66.25 10.219,0 0,66.25 q 0,2.824 2.824,2.824 l 12.528,0 q 2.825,0 2.825,-2.824 l 0,-124.268004 q 0,-2.709 0.839,-2.709 0.792,0 0.792,2.824 l 0,51.609004 12.65,0 0,-54.396004 Q 75.6386,58.132927 70.227626,51.186731 64.428999,43.742856 54.289,43.742856 l 0,0 z",t.SimpleMarker._HUMAN2_CMDS="M 306.40625 386.78125 C 304.19988 386.78125 302.40625 389.07579 302.40625 391.90625 C 302.40625 394.73671 304.19988 397.03125 306.40625 397.03125 C 308.61263 397.03125 310.40625 394.73671 310.40625 391.90625 C 310.40625 389.07579 308.61263 386.78125 306.40625 386.78125 z M 301.78125 396.0625 C 300.43025 397.2945 298.28125 400.28125 298.90625 403.15625 C 302.41725 405.79925 309.20225 406.154 314.03125 403 C 314.21825 399.828 312.68325 397.5635 310.90625 396.0625 C 308.65625 400.7185 304.28125 399.7815 301.78125 396.0625 z ",t.SimpleMarker._SHAPE_STAR_CMDS=[-50,-11.22,-16.69,-17.94,0,-47.55,16.69,-17.94,50,-11.22,26.69,13.8,30.9,47.56,0,33.42,-30.9,47.56,-26.69,13.8],t.SimpleMarker.prototype.Init=function(e,i,n,o,r,s,a,l,h,u,c){u&&(o=Math.round(o),r=Math.round(r),s=Math.round(s),a=(a=Math.round(a))%2==1?a+1:a,s=s%2==1?s+1:s),this._bMaintainAspectRatio=!0,!1===h&&(this._bMaintainAspectRatio=!1,i==t.SimpleMarker.CIRCLE&&(i=t.SimpleMarker.ELLIPSE)),l&&"0"!=l&&(this._borderRadius=l),this._skin=n,this._shape=i||t.SimpleMarker.RECTANGLE,this._dataColor="#000000";var p=i?t.SimpleMarker._SHAPE_ELEM_MAP[i]:t.SimpleMarker._PATH_ELEM;null==p&&(this._isCustomShape=!0,this._path=new t.Path(e,i),p=t.SimpleMarker._PATH_ELEM),t.SimpleMarker.superclass.Init.call(this,e,p,c),this._shape!=t.SimpleMarker.SQUARE&&this._shape!=t.SimpleMarker.RECTANGLE||(this._path=this._getBorderRadiusPath(e,o,r,s,a,l)),this._shape==t.SimpleMarker.HUMAN&&(this._path=new t.Path(e,t.CSSStyle.afterSkinAlta(this._skin)?t.SimpleMarker._HUMAN2_CMDS:t.SimpleMarker._HUMAN_CMDS)),this._propertyChange={},this.setCenter(o,r,!0).setSize(s,a)},t.SimpleMarker.prototype.setCenterDimensions=function(t){return this.setCenter(t.x,t.y,!0).setSize(t.w,t.h)},t.SimpleMarker.prototype.getCenterDimensions=function(){return new t.Rectangle(this._cx,this._cy,this._width,this._height)},t.SimpleMarker.prototype.setSize=function(t,e,i){return this.setWidth(t,!0).setHeight(e,i)},t.SimpleMarker.prototype.setCenter=function(t,e,i){return this.setCx(t,!0).setCy(e,i)},t.SimpleMarker.prototype._updateSvgProperties=function(){if(this._propertyChange.width||this._propertyChange.height){var e=Math.min(this._width,this._height);this._propertyChange.s=this._s!=e,this._s=e}if(this._shape!=t.SimpleMarker.RECTANGLE&&this._shape!=t.SimpleMarker.SQUARE||this._borderRadius)this._shape==t.SimpleMarker.CIRCLE||this._shape==t.SimpleMarker.ELLIPSE?(this._propertyChange.cx&&t.ToolkitUtils.setAttrNullNS(this._elem,"cx",this._cx,0),this._propertyChange.cy&&t.ToolkitUtils.setAttrNullNS(this._elem,"cy",this._cy,0),this._shape==t.SimpleMarker.CIRCLE?this._propertyChange.s&&t.ToolkitUtils.setAttrNullNS(this._elem,"r",this._s/2,0):(this._propertyChange.width&&t.ToolkitUtils.setAttrNullNS(this._elem,"rx",this._width/2,0),this._propertyChange.height&&t.ToolkitUtils.setAttrNullNS(this._elem,"ry",this._height/2,0))):this._isPolygon()?(this._propertyChange.s||this._propertyChange.cx||this._propertyChange.cy)&&this._setPolygon(this._getPolygonArray()):this._isPath()&&(this._propertyChange.width||this._propertyChange.height||this._propertyChange.cx||this._propertyChange.cy)&&this._setCmds(this._getCmds());else if(this._propertyChange.width||this._propertyChange.height||this._propertyChange.cx||this._propertyChange.cy){var i=t.PathUtils.rectangleWithBorderRadius(this._cx-this._width/2,this._cy-this._height/2,this._width,this._height);this._setCmds(i)}return this.UpdateSelectionEffect(),this._propertyChange={},this},t.SimpleMarker.prototype.getCx=function(){return this._cx},t.SimpleMarker.prototype.setCx=function(t,e){return this._propertyChange.cx=this._cx!=t,this._cx=t,e?this:this._updateSvgProperties()},t.SimpleMarker.prototype.getCy=function(){return this._cy},t.SimpleMarker.prototype.setCy=function(t,e){return this._propertyChange.cy=this._cy!=t,this._cy=t,e?this:this._updateSvgProperties()},t.SimpleMarker.prototype.getSize=function(){return this._s},t.SimpleMarker.prototype.getWidth=function(){return this._width},t.SimpleMarker.prototype.setWidth=function(t,e){return this._propertyChange.width=this._width!=t,this._width=t,e?this:this._updateSvgProperties()},t.SimpleMarker.prototype.getHeight=function(){return this._height},t.SimpleMarker.prototype.setHeight=function(t,e){return this._propertyChange.height=this._height!=t,this._height=t,e?this:this._updateSvgProperties()},t.SimpleMarker.prototype._getPolygonArray=function(){var e=[],i=this._cx,n=this._cy,o=this.getMaintainAspectRatio()?this._s/2:this._width/2,r=this.getMaintainAspectRatio()?this._s/2:this._height/2,s=this.getMaintainAspectRatio()?this._s/6:this._width/6,a=this.getMaintainAspectRatio()?this._s/6:this._height/6;return this._shape==t.SimpleMarker.TRIANGLE_UP?e=[i-o,n+r,i,n-r,i+o,n+r]:this._shape==t.SimpleMarker.TRIANGLE_DOWN?e=[i-o,n-r,i,n+r,i+o,n-r]:this._shape==t.SimpleMarker.DIAMOND?e=[i-o,n,i,n-r,i+o,n,i,n+r]:this._shape==t.SimpleMarker.PLUS?e=[i-o,n-a,i-s,n-a,i-s,n-r,i+s,n-r,i+s,n-a,i+o,n-a,i+o,n+a,i+s,n+a,i+s,n+r,i-s,n+r,i-s,n+a,i-o,n+a]:this._shape==t.SimpleMarker.STAR&&(e=t.SimpleMarker._SHAPE_STAR_CMDS,e=t.PolygonUtils.scale(e,this.getMaintainAspectRatio()?this._s/100:this._width/100,this.getMaintainAspectRatio()?this._s/100:this._height/100),e=t.PolygonUtils.translate(e,i,n)),e},t.SimpleMarker.prototype._setPolygon=function(e){t.ToolkitUtils.setAttrNullNS(this._elem,"points",t.SvgShapeUtils.convertPointsArray(e))},t.SimpleMarker.prototype._getCmds=function(){var e=t.DisplayableUtils.getDimForced(this.getCtx(),this._path),i=Math.max(e.w,e.h),n=this.getMaintainAspectRatio();this._shape==t.SimpleMarker.RECTANGLE&&(n=!1);var o=n?this._s/i:this._width/e.w,r=n?this._s/i:this._height/e.h,s=this._cx-e.x*o-e.w*o/2,a=this._cy-e.y*r-e.h*r/2;return t.PathUtils.transformPath(this._path.getCommandsArray(),s,a,o,r)},t.SimpleMarker.prototype._setCmds=function(e){t.ToolkitUtils.setAttrNullNS(this._elem,"d",e)},t.SimpleMarker.prototype.getType=function(){return this._shape},t.SimpleMarker.prototype._isPolygon=function(){return t.SimpleMarker._SHAPE_ELEM_MAP[this._shape]==t.SimpleMarker._POLYGON_ELEM},t.SimpleMarker.prototype._isPath=function(){return t.SimpleMarker._SHAPE_ELEM_MAP[this._shape]==t.SimpleMarker._PATH_ELEM||this._isCustomShape},t.SimpleMarker.prototype.SetStrokeWidth=function(t){var e=this.getStroke();e&&((e=e.clone()).setWidth(t),this.setStroke(e))},t.SimpleMarker.prototype.GetStrokeWidth=function(){var t=this.getStroke();return t?t.getWidth():0},t.SimpleMarker.prototype._getBorderRadiusPath=function(e,i,n,o,r,s){if(this._shape==t.SimpleMarker.SQUARE||this._shape==t.SimpleMarker.RECTANGLE){var a=Math.min(o,r),l=this._shape==t.SimpleMarker.SQUARE?a:o,h=this._shape==t.SimpleMarker.SQUARE?a:r,u=i-l/2,c=n-h/2,p=t.PathUtils.rectangleWithBorderRadius(u,c,l,h,s,a,"0");return new t.Path(e,p)}return null},t.SimpleMarker.prototype._getBorderRadius=function(){return this._borderRadius},t.SimpleMarker.prototype.setDataColor=function(e,i){if(this._dataColor=e,!i){var n=t.SelectionEffectUtils.getHoverBorderColor(e);this.setHoverStroke(new t.SolidStroke("#FFFFFF",1,1),new t.SolidStroke(n,1,3.5)),this.setSelectedStroke(new t.SolidStroke("#FFFFFF",1,1.5),new t.SolidStroke("#5A5A5A",1,4.5)),this.setSelectedHoverStroke(new t.SolidStroke("#FFFFFF",1,1.5),new t.SolidStroke(n,1,4.5)),this.HoverInnerStroke.setFixedWidth(!0),this.HoverOuterStroke.setFixedWidth(!0),this.SelectedInnerStroke.setFixedWidth(!0),this.SelectedOuterStroke.setFixedWidth(!0),this.SelectedHoverInnerStroke.setFixedWidth(!0),this.SelectedHoverOuterStroke.setFixedWidth(!0)}},t.SimpleMarker.prototype.getDataColor=function(){return this._dataColor},t.SimpleMarker.prototype.setHollow=function(e){var i=this.GetStrokeWidth();i=i||1,t.SimpleMarker.superclass.setHollow.call(this,e,i)},t.SimpleMarker.prototype.setText=function(t){this._markerText=t},t.SimpleMarker.prototype.setAlpha=function(e){t.SimpleMarker.superclass.setAlpha.call(this,e),e!==this.getAlpha()&&(this._markerText&&this._markerText.setAlpha(e),this.UpdateSelectionEffect())},t.SimpleMarker.prototype.copyShape=function(){return new t.SimpleMarker(this.getCtx(),this._shape,this._skin,this.getCx(),this.getCy(),this.getWidth(),this.getHeight(),this._getBorderRadius(),this.getMaintainAspectRatio())},t.SimpleMarker.prototype.getDimensions=function(t){return this.getDimensionsSelf(t)},t.SimpleMarker.prototype.getDimensionsSelf=function(e){var i=this.getCx()-this.getWidth()/2,n=this.getCy()-this.getHeight()/2,o=new t.Rectangle(i,n,this.getWidth(),this.getHeight());return this.ConvertCoordSpaceRect(o,e)},t.SimpleMarker.prototype.setMaintainAspectRatio=function(t){this._bMaintainAspectRatio=t},t.SimpleMarker.prototype.getMaintainAspectRatio=function(){return this._bMaintainAspectRatio},t.ImageMarker=function(t,e,i,n,o,r,s,a,l,h,u){this.Init(t,e,i,n,o,r,s,a,l,h,u)},t.Obj.createSubclass(t.ImageMarker,t.Shape),t.ImageMarker.prototype.Init=function(e,i,n,o,r,s,a,l,h,u,c){t.ImageMarker.superclass.Init.call(this,e,"image",c),this._setMarkerImageStates(a,l,h,u);var p=this._getImage();this._setSource(p),this._propertyChange={},this.setCenter(i,n,!0).setSize(o,r),this._updateBorder(s),t.Agent.isPlatformIE()&&(t.ToolkitUtils.setAttrNullNS(this._elem,"fill","#FFFFFF"),t.ToolkitUtils.setAttrNullNS(this._elem,"fill-opacity","0"))},t.ImageMarker.prototype.setPreserveAspectRatio=function(e){t.ToolkitUtils.setAttrNullNS(this._elem,"preserveAspectRatio",e,"xMidYMid")},t.ImageMarker.prototype.setCenterDimensions=function(t){return this.setCenter(t.x,t.y,!0).setSize(t.w,t.h)},t.ImageMarker.prototype.getCenterDimensions=function(){return new t.Rectangle(this._cx,this._cy,this._width,this._height)},t.ImageMarker.prototype.setSize=function(t,e,i){return this.setWidth(t,!0).setHeight(e,i)},t.ImageMarker.prototype.getSize=function(){return Math.max(this.getWidth(),this.getHeight())},t.ImageMarker.prototype.setCenter=function(t,e,i){return this.setCx(t,!0).setCy(e,i)},t.ImageMarker.prototype._updateSvgProperties=function(){return(this._propertyChange.cx||this._propertyChange.width)&&t.ToolkitUtils.setAttrNullNS(this._elem,"x",this._cx-this._width/2,0),(this._propertyChange.cy||this._propertyChange.height)&&t.ToolkitUtils.setAttrNullNS(this._elem,"y",this._cy-this._height/2,0),this._propertyChange.width&&t.ToolkitUtils.setAttrNullNS(this._elem,"width",this._width,0),this._propertyChange.height&&t.ToolkitUtils.setAttrNullNS(this._elem,"height",this._height,0),this._updateBorder(this._borderRadius),this.UpdateSelectionEffect(),this._propertyChange={},this},t.ImageMarker.prototype.getCx=function(){return this._cx},t.ImageMarker.prototype.setCx=function(t,e){return this._propertyChange.cx=this._cx!=t,this._cx=t,e?this:this._updateSvgProperties()},t.ImageMarker.prototype.getCy=function(){return this._cy},t.ImageMarker.prototype.setCy=function(t,e){return this._propertyChange.cy=this._cy!=t,this._cy=t,e?this:this._updateSvgProperties()},t.ImageMarker.prototype.getWidth=function(){return this._width},t.ImageMarker.prototype.setWidth=function(t,e){return this._propertyChange.width=this._width!=t,this._width=t,e?this:this._updateSvgProperties()},t.ImageMarker.prototype.getHeight=function(){return this._height},t.ImageMarker.prototype.setHeight=function(t,e){return this._propertyChange.height=this._height!=t,this._height=t,e?this:this._updateSvgProperties()},t.ImageMarker.prototype._setSource=function(e){if(t.Agent.isEnvironmentBatik()){var i=t.JavaImageLoader.getImageInfo(e);i&&(e=i.uri)}t.ToolkitUtils.setHref(this._elem,e)},t.ImageMarker.prototype._setMarkerImageStates=function(t,e,i,n){var o=t;this._imageStates=[o],this._imageStates.push(e||o),this._imageStates.push(i||o),this._imageStates.push(n||this._imageStates[1])},t.ImageMarker.prototype._getImage=function(){return this._imageStates[0]},t.ImageMarker.prototype._getImageSelected=function(){return this._imageStates[1]},t.ImageMarker.prototype._getImageHover=function(){return this._imageStates[2]},t.ImageMarker.prototype._getImageHoverSelected=function(){return this._imageStates[3]},t.ImageMarker.prototype.showHoverEffect=function(){this.IsShowingHoverEffect=!0,this.isSelected()?this._setSource(this._getImageHoverSelected()):this._setSource(this._getImageHover())},t.ImageMarker.prototype.hideHoverEffect=function(){this.IsShowingHoverEffect=!1,this.isSelected()?this._setSource(this._getImageSelected()):this._setSource(this._getImage())},t.ImageMarker.prototype.setSelected=function(t){this.IsSelected!=t&&(this.IsSelected=t,t?this.isHoverEffectShown()?this._setSource(this._getImageHoverSelected()):this._setSource(this._getImageSelected()):this._setSource(this._getImage()))},t.ImageMarker.prototype._updateBorder=function(e){if(e||this._borderPath){if(e&&"0"!=e){var i=t.PathUtils.rectangleWithBorderRadius(this._cx-this._width/2,this._cy-this._height/2,this._width,this._height,e,Math.min(this._width,this._height),"0"),n=new t.ClipPath;n.addPath(i),this.setClipPath(n)}if(this._borderPath){var o=t.PathUtils.rectangleWithBorderRadius(this._cx-this._width/2+this._borderWidth/2,this._cy-this._height/2+this._borderWidth/2,this._width-this._borderWidth,this._height-this._borderWidth,e,Math.min(this._width,this._height),"0");this._borderPath.setCmds(o)}}this._borderRadius=e},t.ImageMarker.prototype._getBorderRadius=function(){return this._borderRadius},t.ImageMarker.prototype.setStroke=function(e){if(!e||e.getWidth()<=0)return this._borderWidth=0,void(this._borderPath&&(this.removeChild(this._borderPath),this._borderPath=null));var i=e.getWidth();if(!this._borderPath||i!=this._borderWidth){var n=t.PathUtils.rectangleWithBorderRadius(this._cx-this._width/2+i/2,this._cy-this._height/2+i/2,this._width-i,this._height-i,this._borderRadius,Math.min(this._width,this._height),"0");this._borderPath?this._borderPath.setCmds(n):(this._borderPath=new t.Path(this.getCtx(),n),this._borderPath.setInvisibleFill(),this.addChild(this._borderPath))}this._borderWidth=i,this._borderPath.setStroke(e)},t.ImageMarker.prototype.setHollow=function(e,i){t.ImageMarker.superclass.setHollow.call(this,e,i);var n=this.isHollow();n?(this._imageContainer=this._elem.parentNode,this._imageContainer.removeChild(this._elem)):!n&&this._imageContainer&&this._imageContainer.appendChild(this._elem)},t.ImageMarker.prototype.copyShape=function(){return new t.ImageMarker(this.getCtx(),this.getCx(),this.getCy(),this.getWidth(),this.getHeight(),this._getBorderRadius(),this._getImage(),this._getImageSelected(),this._getImageHover(),this._getImageHoverSelected(),null)},t.ImageMarker.prototype.getDimensionsSelf=function(e){var i=this.getCx()-this.getWidth()/2,n=this.getCy()-this.getHeight()/2,o=new t.Rectangle(i,n,this.getWidth(),this.getHeight());return this.ConvertCoordSpaceRect(o,e)},t.Oval=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)},t.Obj.createSubclass(t.Oval,v),t.Oval.prototype.Init=function(e,i,n,o,r,s){t.Oval.superclass.Init.call(this,e,"ellipse",i,n,s),this.setRx(o).setRy(r)},t.Oval.prototype.getRx=function(){return this.GetProperty("rx")},t.Oval.prototype.setRx=function(t){return this.SetSvgProperty("rx",t)},t.Oval.prototype.getRy=function(){return this.GetProperty("ry")},t.Oval.prototype.setRy=function(t){return this.SetSvgProperty("ry",t)},t.Oval.prototype.copyShape=function(){return new t.Oval(this.getCtx(),this.getCx(),this.getCy(),this.getRx(),this.getRy())},t.Oval.prototype.getDimensionsSelf=function(e){var i=new t.Rectangle(this.getCx()-this.getRx(),this.getCy()-this.getRy(),2*this.getRx(),2*this.getRy());return this.ConvertCoordSpaceRect(i,e)},t.Path=function(t,e,i){this.Init(t,e,i)},t.Obj.createSubclass(t.Path,t.Shape),t.Path.prototype.Init=function(e,i,n){t.Path.superclass.Init.call(this,e,"path",n),t.ArrayUtils.isArray(i)?this.setCmds(t.PathUtils.getPathString(i)):this.setCmds(i)},t.Path.prototype.getCmds=function(){return this.GetProperty("d")},t.Path.prototype.setCmds=function(t){return t&&this.SetSvgProperty("d",t),this.SetProperty("arCmds",null),this},t.Path.prototype.getCommandsArray=function(){var e=this.GetProperty("arCmds");return e||(e=t.PathUtils.createPathArray(this.getCmds()),this.SetProperty("arCmds",e)),e},t.Path.prototype.setCommandsArray=function(e){var i=e?t.PathUtils.getPathString(e):null;return this.setCmds(i),this.SetProperty("arCmds",e),this},t.Path.prototype.copyShape=function(){return new t.Path(this.getCtx(),this.getCmds())},t.Path.prototype.GetAriaElem=function(){return t.Agent.isTouchDevice()&&this.CreateChildGroupElem(!1,!0),t.Path.superclass.GetAriaElem.call(this)},t.Polygon=function(t,e,i){this.Init(t,e,i)},t.Obj.createSubclass(t.Polygon,m),t.Polygon.prototype.Init=function(e,i,n){t.Polygon.superclass.Init.call(this,e,"polygon",i,n)},t.Polygon.prototype.copyShape=function(){return new t.Polygon(this.getCtx(),this.getPoints())},t.Polygon.prototype.GetAriaElem=function(){return t.Agent.isTouchDevice()&&this.CreateChildGroupElem(!1,!0),t.Polygon.superclass.GetAriaElem.call(this)},t.Polyline=function(t,e,i){this.Init(t,e,i)},t.Obj.createSubclass(t.Polyline,m),t.Polyline.prototype.Init=function(e,i,n){t.Polyline.superclass.Init.call(this,e,"polyline",i,n),t.ToolkitUtils.setAttrNullNS(this._elem,"fill","none")},t.Polyline.prototype.copyShape=function(){return new t.Polyline(this.getCtx(),this.getPoints())},t.Rect=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)},t.Obj.createSubclass(t.Rect,t.Shape),t.Rect._cssAttrs=["background-color","border-color","border-width"],t.Rect.prototype.Init=function(e,i,n,o,r,s){t.Rect.superclass.Init.call(this,e,"rect",s),this._strokeAlignment=t.Stroke.CENTER,this.setX(i).setY(n).setWidth(o).setHeight(r)},t.Rect.prototype.getX=function(){return this.GetProperty("x")},t.Rect.prototype.setX=function(t){return this.SetSvgProperty("x",t,0)},t.Rect.prototype.getY=function(){return this.GetProperty("y")},t.Rect.prototype.setY=function(t){return this.SetSvgProperty("y",t,0)},t.Rect.prototype.getWidth=function(){return this.GetProperty("width")},t.Rect.prototype.setWidth=function(t){return this.SetSvgProperty("width",null!=t?t:0)},t.Rect.prototype.getHeight=function(){return this.GetProperty("height")},t.Rect.prototype.setHeight=function(t){return this.SetSvgProperty("height",null!=t?t:0)},t.Rect.prototype.getRx=function(){return this.GetProperty("rx")},t.Rect.prototype.setRx=function(t){return this.SetSvgProperty("rx",t)},t.Rect.prototype.getRy=function(){return this.GetProperty("ry")},t.Rect.prototype.setRy=function(t){return this.SetSvgProperty("ry",t)},t.Rect.prototype.setCSSStyle=function(e){t.Rect.superclass.setCSSStyle.call(this,e);var i=this._elem;if(e){var n=e.getStyle("background-color");if(n&&t.ToolkitUtils.setAttrNullNS(i,"fill",n),(n=e.getStyle("border-color"))&&t.ToolkitUtils.setAttrNullNS(i,"stroke",n),(n=e.getStyle("border-width"))&&t.ToolkitUtils.setAttrNullNS(i,"stroke-width",n),n=e.getStyle("border-radius")){var o=t.StringUtils.trim(n).split(" ");o.length>0&&o[0]&&this.setRx(o[0]),o.length>1&&o[1]&&this.setRy(o[1])}}else t.ToolkitUtils.removeAttrNullNS(this._elem,"style")},t.Rect.prototype.SetSvgProperty=function(t,e,i){return e!==this.GetProperty(t)&&(this.SetProperty(t,e),this._setAttributeWithStroke(t,e,i),this.SvgPropertyChanged(t)),this},t.Rect.prototype._setAttributeWithStroke=function(e,i,n){if(null!=i&&this._strokeAlignment!=t.Stroke.CENTER){var o=this._getStrokeOffset();switch(e){case"x":case"y":i-=o;break;case"width":case"height":i+=2*o}}t.ToolkitUtils.setAttrNullNS(this._elem,e,i,n)},t.Rect.prototype.setStrokeAlignment=function(t){this._strokeAlignment!=t&&(this._strokeAlignment=t,this._updateElemStrokeDimensions())},t.Rect.prototype.getStrokeAlignment=function(){return this._strokeAlignment},t.Rect.prototype._updateElemStrokeDimensions=function(){this._setAttributeWithStroke("x",this.getX(),0),this._setAttributeWithStroke("y",this.getY(),0),this._setAttributeWithStroke("width",this.getWidth()),this._setAttributeWithStroke("height",this.getHeight())},t.Rect.prototype._getStrokeOffset=function(){var e=0,i=this.getStroke();if(i)if(this._strokeAlignment==t.Stroke.OUTER){e=i.getWidth()/2;var n=this.GetHoverSelectionInnerStroke();null!=n&&(e+=n.getWidth())}else if(this._strokeAlignment==t.Stroke.INNER){e=-i.getWidth()/2;var o=this.GetHoverSelectionOuterStroke();null!=o&&(e-=o.getWidth())}return e},t.Rect.prototype.setStroke=function(e){t.Rect.superclass.setStroke.call(this,e),this._strokeAlignment!=t.Stroke.CENTER&&this._updateElemStrokeDimensions()},t.Rect.prototype.GetElemDimensionsWithStroke=function(){var e=t.Rect.superclass.GetElemDimensionsWithStroke.call(this);if(e&&this._strokeAlignment!=t.Stroke.CENTER){var i=this._getStrokeOffset();e.x-=i,e.y-=i,e.w+=2*i,e.h+=2*i}return e},t.Rect.prototype.setPos=function(t,e){this.setX(t).setY(e)},t.Rect.prototype.setCornerRadius=function(t,e){this.setRx(t).setRy(e)},t.Rect.prototype.setRect=function(e,i,n,o){e instanceof t.Rectangle?this.setX(e.x).setY(e.y).setWidth(e.w).setHeight(e.h):this.setX(e).setY(i).setWidth(n).setHeight(o)},t.Rect.prototype.copyShape=function(){var e=new t.Rect(this.getCtx(),this.getX(),this.getY(),this.getWidth(),this.getHeight());return e.setRx(this.getRx()).setRy(this.getRy()),e.setStrokeAlignment(this.getStrokeAlignment()),e},t.Rect.prototype.getDimensionsSelf=function(e){var i=new t.Rectangle(this.getX(),this.getY(),this.getWidth(),this.getHeight());return this.ConvertCoordSpaceRect(i,e)},t.OutputText=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.OutputText,t.Shape),t.OutputText.ELLIPSIS="…",t.OutputText.REPRESENTATIVE_TEXT="MW",t.OutputText.BIDI_ZERO_WIDTH="​",t.OutputText.H_ALIGN_LEFT="left",t.OutputText.H_ALIGN_CENTER="center",t.OutputText.H_ALIGN_RIGHT="right",t.OutputText.V_ALIGN_TOP="top",t.OutputText.V_ALIGN_MIDDLE="middle",t.OutputText.V_ALIGN_BOTTOM="bottom",t.OutputText.V_ALIGN_AUTO="auto",t.OutputText.prototype.Init=function(e,i,n,o,r){t.OutputText.superclass.Init.call(this,e,"text",r),this._x=null!=n?n:0,this._baseline=!1,t.Agent.isRightToLeft(e)&&t.Agent.isPlatformIE()&&t.ToolkitUtils.setAttrNullNS(this.getElem(),"unicode-bidi","embed"),this.alignLeft(),this.alignTop(),this.setTextString(i),this.setX(n),this.setY(o),t.ToolkitUtils.removeAttrNullNS(this.getElem(),"fill"),this.setAriaProperty("hidden","true")},t.OutputText.prototype.getTextString=function(){return this._textString},t.OutputText.prototype.setTextString=function(e){e=null!=e?t.StringUtils.trim(String(e)):"",t.OutputText.needsTextAnchorAdjustment()&&t.Agent.isPlatformIE()&&e.charAt(0)!=t.OutputText.BIDI_ZERO_WIDTH&&(e=t.OutputText.BIDI_ZERO_WIDTH+e),this._textString=e;var i=this.getElem().firstChild;return null!==i?i.nodeValue=e:(i=document.createTextNode(e),t.ToolkitUtils.appendChildElem(this.getElem(),i)),t.Agent.isPlatformIE()&&this.setX(this._x),this},t.OutputText.prototype.isTruncated=function(){return null!=this.getUntruncatedTextString()},t.OutputText.prototype.getUntruncatedTextString=function(){return this._untruncatedTextString},t.OutputText.prototype.setUntruncatedTextString=function(t){t!=this.getTextString()&&(this._untruncatedTextString=t)},t.OutputText.prototype.getX=function(){return(t.Agent.isPlatformIE()?this._x:this.GetProperty("x"))||0},t.OutputText.prototype.setX=function(e){return this._x=null!=e?e:0,t.Agent.isPlatformIE()?this.SetSvgProperty("x",this._x+this._getIEAlignmentOffset(),0):this.SetSvgProperty("x",e,0)},t.OutputText.prototype._getIEAlignmentOffset=function(){var e=this.getHorizAlignment(),i=t.Agent.isRightToLeft();return e==t.OutputText.H_ALIGN_LEFT?i?t.TextUtils.getTextStringWidth(this.getCtx(),this.getTextString(),this.getCSSStyle()):0:e==t.OutputText.H_ALIGN_CENTER?i?t.TextUtils.getTextStringWidth(this.getCtx(),this.getTextString(),this.getCSSStyle())/2:t.TextUtils.getTextStringWidth(this.getCtx(),this.getTextString(),this.getCSSStyle())/2*-1:e==t.OutputText.H_ALIGN_RIGHT?i?0:-1*t.TextUtils.getTextStringWidth(this.getCtx(),this.getTextString(),this.getCSSStyle()):void 0},t.OutputText.prototype.getY=function(){var t=this.GetProperty("y");return t||0},t.OutputText.prototype.setY=function(t){return this.SetSvgProperty("y",t,0)},t.OutputText.prototype.setFontSize=function(e){var i=this.getCSSStyle();(i=i?i.clone():new t.CSSStyle).setFontSize(t.CSSStyle.FONT_SIZE,String(e)),this.setCSSStyle(i)},t.OutputText.prototype.getHorizAlignment=function(){return this._horizAlign},t.OutputText.prototype.setHorizAlignment=function(e){e==t.OutputText.H_ALIGN_LEFT?this.alignLeft():e==t.OutputText.H_ALIGN_CENTER?this.alignCenter():e==t.OutputText.H_ALIGN_RIGHT&&this.alignRight()},t.OutputText.prototype.getVertAlignment=function(){return this._vertAlign},t.OutputText.prototype.setVertAlignment=function(e){e==t.OutputText.V_ALIGN_TOP?this.alignTop():e==t.OutputText.V_ALIGN_MIDDLE?this.alignMiddle():e==t.OutputText.V_ALIGN_BOTTOM?this.alignBottom():e==t.OutputText.V_ALIGN_AUTO&&this.alignAuto()},t.OutputText.prototype.alignLeft=function(){if(this._horizAlign!=t.OutputText.H_ALIGN_LEFT)if(this._horizAlign=t.OutputText.H_ALIGN_LEFT,t.Agent.isPlatformIE())this.setX(this._x);else{var e=t.OutputText.needsTextAnchorAdjustment();t.ToolkitUtils.setAttrNullNS(this.getElem(),"text-anchor",e?"end":"start","start")}},t.OutputText.prototype.alignCenter=function(){this._horizAlign!=t.OutputText.H_ALIGN_CENTER&&(this._horizAlign=t.OutputText.H_ALIGN_CENTER,t.Agent.isPlatformIE()?this.setX(this._x):t.ToolkitUtils.setAttrNullNS(this.getElem(),"text-anchor","middle","start"))},t.OutputText.prototype.alignRight=function(){if(this._horizAlign!=t.OutputText.H_ALIGN_RIGHT)if(this._horizAlign=t.OutputText.H_ALIGN_RIGHT,t.Agent.isPlatformIE())this.setX(this._x);else{var e=t.OutputText.needsTextAnchorAdjustment();t.ToolkitUtils.setAttrNullNS(this.getElem(),"text-anchor",e?"start":"end","start")}},t.OutputText.prototype.alignTop=function(){this._vertAlign!=t.OutputText.V_ALIGN_TOP&&(this._vertAlign==t.OutputText.V_ALIGN_BOTTOM&&t.Agent.isBrowserSafari()&&this._setBaseline(!1),this._vertAlign=t.OutputText.V_ALIGN_TOP,t.Agent.isPlatformIE()?this._setBaseline(!0):this.SetDominantBaselineAttr("text-before-edge"))},t.OutputText.prototype.alignMiddle=function(){this._vertAlign!=t.OutputText.V_ALIGN_MIDDLE&&(this._vertAlign==t.OutputText.V_ALIGN_BOTTOM&&t.Agent.isBrowserSafari()&&this._setBaseline(!1),this._vertAlign=t.OutputText.V_ALIGN_MIDDLE,t.Agent.isPlatformIE()?this._setBaseline(!0):this.SetDominantBaselineAttr("middle"))},t.OutputText.prototype.alignBottom=function(){this._vertAlign!=t.OutputText.V_ALIGN_BOTTOM&&(this._vertAlign=t.OutputText.V_ALIGN_BOTTOM,t.Agent.isPlatformIE()?this._setBaseline(!0):t.Agent.isBrowserSafari()?(this._setBaseline(!0),this.SetDominantBaselineAttr(null)):this.SetDominantBaselineAttr("text-after-edge"))},t.OutputText.prototype.alignAuto=function(){this._vertAlign!=t.OutputText.V_ALIGN_AUTO&&(this._vertAlign==t.OutputText.V_ALIGN_BOTTOM&&t.Agent.isBrowserSafari()&&this._setBaseline(!1),this._vertAlign=t.OutputText.V_ALIGN_AUTO,t.Agent.isPlatformIE()?this._setBaseline(!1):this.SetDominantBaselineAttr(null))},t.OutputText.prototype._setBaseline=function(t){this._baseline=t,this.setMatrix(this.getMatrix())},t.OutputText.prototype.SetDominantBaselineAttr=function(e){e?t.ToolkitUtils.setAttrNullNS(this.getElem(),"dominant-baseline",e):t.ToolkitUtils.removeAttrNullNS(this.getElem(),"dominant-baseline")},t.OutputText.prototype.setCSSStyle=function(e){t.OutputText.superclass.setCSSStyle.call(this,e);var i=this.getOuterElem();if(e){var n=e.getStyle("color"),o=t.ColorUtils.fixColorForPlatform(n);o&&o.color&&(t.ToolkitUtils.setAttrNullNS(i,"fill",o.color),null!=o.alpha&&t.ToolkitUtils.setAttrNullNS(i,"fill-opacity",o.alpha,1)),(n=e.getStyle("font-family"))&&!this.getCtx().isDefaultFontFamily(n)?t.ToolkitUtils.setAttrNullNS(i,"font-family",n):t.ToolkitUtils.removeAttrNullNS(i,"font-family"),(n=e.getStyle("font-size"))&&n!=this.getCtx().getDefaultFontSize()?(t.ToolkitUtils.setAttrNullNS(i,"font-size",n),(t.Agent.isPlatformIE()||t.Agent.isBrowserSafari())&&this.setMatrix(this.getMatrix())):t.ToolkitUtils.removeAttrNullNS(i,"font-size"),(n=e.getStyle("font-style"))&&t.ToolkitUtils.setAttrNullNS(i,"font-style",n),(n=e.getStyle("font-weight"))&&n!=this.getCtx().getDefaultFontWeight()?t.ToolkitUtils.setAttrNullNS(i,"font-weight",n):t.ToolkitUtils.removeAttrNullNS(i,"font-weight"),(n=e.getStyle("text-decoration"))&&t.ToolkitUtils.setAttrNullNS(i,"text-decoration",n),(n=e.getStyle("cursor"))&&t.ToolkitUtils.setAttrNullNS(i,"cursor",n),t.Agent.isPlatformIE()&&this.setX(this._x)}},t.OutputText.prototype._getBaselineTranslation=function(){if(this._baseline){if(this._textString&&!this._isRepresentativeText())return t.TextUtils.getBaselineTranslation(this);var e=this.getVertAlignment();if(e!=t.OutputText.V_ALIGN_AUTO){var i=t.ToolkitUtils.getAttrNullNS(this.getElem(),"font-size");if(i||(i=t.ToolkitUtils.getAttrNullNS(this.getOuterElem(),"font-size")),(!i||isNaN(i)&&-1==i.indexOf("px"))&&(i=t.StyleUtils.DEFAULT_FONT_SIZE),i=parseFloat(i),e==t.OutputText.V_ALIGN_TOP)return.8*i;if(e==t.OutputText.V_ALIGN_MIDDLE)return.3*i;if(e==t.OutputText.V_ALIGN_BOTTOM)return-.2*i}}return 0},t.OutputText.prototype._getBaselineAdjustedMatrix=function(e){if(this._baseline){e||(e=new t.Matrix);var i=new t.Matrix(null,null,null,null,null,this._getBaselineTranslation());i.concat(e),e=i}return e},t.OutputText.prototype.setMatrix=function(e){(t.Agent.isPlatformIE()||t.Agent.isBrowserSafari())&&(this._matrixForIE=e,e=this._getBaselineAdjustedMatrix(e)),t.OutputText.superclass.setMatrix.call(this,e)},t.OutputText.prototype.getMatrix=function(){var e=null;return(t.Agent.isPlatformIE()||t.Agent.isBrowserSafari())&&(e=this._matrixForIE),e||(e=t.OutputText.superclass.getMatrix.call(this)),e},t.OutputText.prototype._isRepresentativeText=function(){return this._textString==t.OutputText.REPRESENTATIVE_TEXT||this._textString==t.OutputText.BIDI_ZERO_WIDTH||this._textString==t.OutputText.BIDI_ZERO_WIDTH+t.OutputText.REPRESENTATIVE_TEXT},t.OutputText.prototype.GetSvgDimensions=function(){var e=t.OutputText.superclass.GetSvgDimensions.call(this);return e&&(e.y+=this._getBaselineTranslation(),this._isRepresentativeText()||(e.h=t.TextUtils.getTextStringHeight(this.getCtx(),this.getCSSStyle()))),e},t.OutputText.prototype.UpdateSelectionEffect=function(){},t.OutputText.prototype.getDimensions=function(e){var i=this.getHorizAlignment(),n=this.getVertAlignment(),o=t.TextUtils.getTextStringDimensions(this.getCtx(),this.getTextString(),this.getCSSStyle());return o.x=this.getX(),i===t.OutputText.H_ALIGN_RIGHT?o.x-=o.w:i===t.OutputText.H_ALIGN_CENTER&&(o.x-=o.w/2),n===t.OutputText.V_ALIGN_TOP?o.y=this.getY():n===t.OutputText.V_ALIGN_BOTTOM?o.y=this.getY()-o.h:n===t.OutputText.V_ALIGN_MIDDLE?o.y=this.getY()-o.h/2:n===t.OutputText.V_ALIGN_AUTO&&(o.y+=this.getY()),e&&e!==this?this.ConvertCoordSpaceRect(o,e):o},t.OutputText.prototype.copyShape=function(){var e=new t.OutputText(this.getCtx(),this.getTextString(),this.getX(),this.getY());return e.setCSSStyle(this.getCSSStyle()),e.setHorizAlignment(this.getHorizAlignment()),e.setVertAlignment(this.getVertAlignment()),e},t.OutputText.prototype.addChild=function(e){if(t.Agent.isEnvironmentTest()){print("dvt.OutputText.prototype.addChild: Text should not be used as a shape container.");null.errorShouldOccurDueToInvalidAddChild()}},t.OutputText.needsTextAnchorAdjustment=function(){return t.Agent.isRightToLeft()&&!t.Agent.isEnvironmentBatik()},t.BackgroundOutputText=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)},t.Obj.createSubclass(t.BackgroundOutputText,t.Container),t.BackgroundOutputText._PADDING=.15,t.BackgroundOutputText.prototype.Init=function(e,i,n,o,r,s){t.BackgroundOutputText.superclass.Init.call(this,e,"g",s),this.TextInstance=this.CreateTextInstance(e,i,n,o,s),this._backgroundRect=null,r&&this.setCSSStyle(r),this.addChild(this.TextInstance)},t.BackgroundOutputText.prototype.getTextString=function(){return this.TextInstance.getTextString()},t.BackgroundOutputText.prototype.setTextString=function(t){return this.TextInstance.setTextString(t),this},t.BackgroundOutputText.prototype.isTruncated=function(){return this.TextInstance.isTruncated()},t.BackgroundOutputText.prototype.getUntruncatedTextString=function(){return this.TextInstance.getUntruncatedTextString()},t.BackgroundOutputText.prototype.setUntruncatedTextString=function(t){this.TextInstance.setUntruncatedTextString(t)},t.BackgroundOutputText.prototype.getX=function(){return this.TextInstance.getX()},t.BackgroundOutputText.prototype.setX=function(t){return this.TextInstance=this.TextInstance.setX(t),this._realignBackground(),this},t.BackgroundOutputText.prototype.getY=function(){return this.TextInstance.getY()},t.BackgroundOutputText.prototype.setY=function(t){return this.TextInstance=this.TextInstance.setY(t),this._realignBackground(),this},t.BackgroundOutputText.prototype.setFontSize=function(e){this.TextInstance.setFontSize(e),this._style.setFontSize(t.CSSStyle.FONT_SIZE,String(e)),this._realignBackground()},t.BackgroundOutputText.prototype.getHorizAlignment=function(){return this.TextInstance.getHorizAlignment()},t.BackgroundOutputText.prototype.setHorizAlignment=function(t){this.TextInstance.setHorizAlignment(t),this._realignBackground()},t.BackgroundOutputText.prototype.getVertAlignment=function(){return this.TextInstance.getVertAlignment()},t.BackgroundOutputText.prototype.setVertAlignment=function(t){this.TextInstance.setVertAlignment(t),this._realignBackground()},t.BackgroundOutputText.prototype.alignLeft=function(){this.TextInstance.alignLeft(),this._realignBackground()},t.BackgroundOutputText.prototype.alignCenter=function(){this.TextInstance.alignCenter(),this._realignBackground()},t.BackgroundOutputText.prototype.alignRight=function(){this.TextInstance.alignRight(),this._realignBackground()},t.BackgroundOutputText.prototype.alignTop=function(){this.TextInstance.alignTop(),this._realignBackground()},t.BackgroundOutputText.prototype.alignMiddle=function(){this.TextInstance.alignMiddle(),this._realignBackground()},t.BackgroundOutputText.prototype.alignBottom=function(){this.TextInstance.alignBottom(),this._realignBackground()},t.BackgroundOutputText.prototype.alignAuto=function(){this.TextInstance.alignAuto(),this._realignBackground()},t.BackgroundOutputText.prototype.setCSSStyle=function(e){e.getStyle(t.CSSStyle.BACKGROUND_COLOR)&&!e.getStyle(t.CSSStyle.COLOR)&&e.setStyle(t.CSSStyle.COLOR,t.ColorUtils.getContrastingTextColor(e.getStyle(t.CSSStyle.BACKGROUND_COLOR))),this.TextInstance&&this.TextInstance.setCSSStyle(e),(this._backgroundRect||t.BackgroundOutputText._hasBackgroundStyles(e))&&(this._backgroundRect||(this._backgroundRect=this.CreateBackground(this.getCtx(),this.TextInstance),this.addChildAt(this._backgroundRect,0)),this._setBackgroundCSSStyle(this._backgroundRect,e)),this._style=e},t.BackgroundOutputText.prototype.getCSSStyle=function(){return this._style},t.BackgroundOutputText.prototype.setMatrix=function(t){this.TextInstance.setMatrix(t),this._backgroundRect&&this._backgroundRect.setMatrix(t)},t.BackgroundOutputText.prototype.getMatrix=function(){return this.TextInstance.getMatrix()},t.BackgroundOutputText.prototype.getTextDimensions=function(t){return this.TextInstance.getDimensions(t)},t.BackgroundOutputText.prototype.getDimensions=function(e){var i=this.TextInstance.getDimensions(),n=i.h*t.BackgroundOutputText._PADDING;return i.x-=n,i.w+=2*n,this.ConvertCoordSpaceRect(i,e)},t.BackgroundOutputText.prototype.getDimensionsWithStroke=function(){return this.GetElemDimensionsWithStroke()},t.BackgroundOutputText.prototype.GetDimensionsWithStroke=function(t){var e=this.GetElemDimensionsWithStroke();return t&&t!==this?this.ConvertCoordSpaceRect(e,t):e},t.BackgroundOutputText.prototype.GetElemDimensionsWithStroke=function(){var t=this.getDimensions(),e=(this._backgroundRect?this._backgroundRect:this.TextInstance).getStroke();if(t&&e){var i=e.getWidth();if(i){var n=.5*i;t.x-=n,t.y-=n,t.w+=i,t.h+=i}}return t},t.BackgroundOutputText.prototype.copyShape=function(){return this.TextInstance.copyShape()},t.BackgroundOutputText.needsTextAnchorAdjustment=function(t){return this.TextInstance.needsTextAnchorAdjustment(t)},t.BackgroundOutputText.prototype.CreateTextInstance=function(e,i,n,o,r){return new t.OutputText(e,i,n,o,r)},t.BackgroundOutputText.prototype.CreateBackground=function(e,i){var n=i.getDimensions(),o=n.h*t.BackgroundOutputText._PADDING;return new t.Rect(e,n.x-o,n.y,n.w+2*o,n.h)},t.BackgroundOutputText.prototype._realignBackground=function(){if(this._backgroundRect){var e=this.TextInstance.getDimensions(),i=.15*e.h,n=this.getHorizAlignment(),o=this.getVertAlignment();n==t.OutputText.H_ALIGN_LEFT?this._backgroundRect.setX(this.getX()-i):n==t.OutputText.H_ALIGN_CENTER?this._backgroundRect.setX(this.getX()-.5*e.w-i):n==t.OutputText.H_ALIGN_RIGHT&&this._backgroundRect.setX(this.getX()-e.w-i);var r=parseFloat(this._style.getFontSize());isNaN(r)&&(r=0);var s=0;(t.Agent.isBrowserChrome()||t.Agent.isEnvironmentTest())&&o==t.OutputText.V_ALIGN_MIDDLE?s=.12*r:t.Agent.isPlatformIE()&&o==t.OutputText.V_ALIGN_BOTTOM&&(s=.4*-r);var a=this.GetTextDimensionsForRealign(e);o==t.OutputText.V_ALIGN_TOP?this._backgroundRect.setY(this.getY()):o==t.OutputText.V_ALIGN_MIDDLE?this._backgroundRect.setY(this.getY()-.5*a-s):o==t.OutputText.V_ALIGN_BOTTOM?this._backgroundRect.setY(this.getY()-a-s):o==t.OutputText.V_ALIGN_AUTO&&this._backgroundRect.setY(e.y),this._backgroundRect.setWidth(e.w+2*i),this._backgroundRect.setHeight(e.h)}},t.BackgroundOutputText.prototype._setBackgroundCSSStyle=function(e,i){if(i){var n=i.getStyle(t.CSSStyle.BACKGROUND_COLOR);null!=n?e.setSolidFill(n):e.setInvisibleFill();var o=i.getStyle(t.CSSStyle.BORDER_COLOR),r=i.getStyle(t.CSSStyle.BORDER_WIDTH),s=i.getStyle(t.CSSStyle.BORDER_RADIUS);if(o||r||s){var a=new t.CSSStyle;a.setStyle(t.CSSStyle.BORDER_COLOR,o),a.setStyle(t.CSSStyle.BORDER_WIDTH,r),a.setStyle(t.CSSStyle.BORDER_RADIUS,s),e.setCSSStyle(a)}}else e.setInvisibleFill();e.setMouseEnabled(!1)},t.BackgroundOutputText.prototype.GetTextDimensionsForRealign=function(t){return t.h},t.BackgroundOutputText._hasBackgroundStyles=function(t){return!!t&&t.hasBackgroundStyles()},t.BackgroundOutputText.prototype.includeChildSubtree=function(){return!1},t.MultilineText=function(t,e,i,n,o,r){this.Init(t,e,i,n,o,r)},t.Obj.createSubclass(t.MultilineText,t.Container),t.MultilineText._LINE_SPACE=0,t.MultilineText.H_ALIGN_LEFT="left",t.MultilineText.H_ALIGN_CENTER="center",t.MultilineText.H_ALIGN_RIGHT="right",t.MultilineText.V_ALIGN_TOP="top",t.MultilineText.V_ALIGN_MIDDLE="middle",t.MultilineText.V_ALIGN_BOTTOM="bottom",t.MultilineText.prototype.Init=function(e,i,n,o,r,s){t.MultilineText.superclass.Init.call(this,e,null,r),this._textInstance=null,this._additionalLines=[],this._lineHeight=null,this._yCoord=null,this._noWrap=!1,this._preserveNewLine=s||!1,this._preservedLines=[],this.setTextString(i),this.setX(n||0),this.setY(o||0),this.setMaxLines(1/0)},t.MultilineText.prototype.getTextString=function(){return this._textString},t.MultilineText.prototype.setTextString=function(e){this._textString=null!=e?String(e):null,this._textInstance?(this._textInstance.setTextString(e),this._removeAdditionalLines()):(this._textInstance=new t.OutputText(this.getCtx(),this._textString),this.addChild(this._textInstance)),this._preserveNewLine&&(this._generatePreservedLines(),this.wrapText(1/0,1/0,1,!1)),this._bTruncated=!1},t.MultilineText.prototype._getTextLines=function(){var t=this._additionalLines.slice();return this._textInstance.getParent()==this&&t.unshift(this._textInstance),t},t.MultilineText.prototype.getX=function(){return this._textInstance.getX()},t.MultilineText.prototype.setX=function(e){return t.ArrayUtils.forEach(this._getTextLines(),function(t){t.setX(e)}),this},t.MultilineText.prototype.getY=function(){return this._textInstance.getY()},t.MultilineText.prototype.getYAlignCoord=function(){return this._yCoord},t.MultilineText.prototype.setY=function(e){if(this._yCoord=e,this._vertAlign)this._alignVerticalText();else{var i=e-this._textInstance.getY();i||(i=e),t.ArrayUtils.forEach(this._getTextLines(),function(t){var e=t.getY();t.setY(e?e+i:i)})}return this},t.MultilineText.prototype.getMaxLines=function(){return this.GetProperty("maxLines")},t.MultilineText.prototype.setMaxLines=function(t){if(t>0)return this.SetProperty("maxLines",t)},t.MultilineText.prototype.isTruncated=function(){return this._bTruncated},t.MultilineText.prototype.getHorizAlignment=function(){return this._textInstance.getHorizAlignment()},t.MultilineText.prototype.setHorizAlignment=function(e){return t.ArrayUtils.forEach(this._getTextLines(),function(t){t.setHorizAlignment(e)}),this},t.MultilineText.prototype.alignLeft=function(){this._horizAlign!=t.MultilineText.H_ALIGN_LEFT&&(this._horizAlign=t.MultilineText.H_ALIGN_LEFT,t.ArrayUtils.forEach(this._getTextLines(),function(t){t.alignLeft()}))},t.MultilineText.prototype.alignCenter=function(){this._horizAlign!=t.MultilineText.H_ALIGN_CENTER&&(this._horizAlign=t.MultilineText.H_ALIGN_CENTER,t.ArrayUtils.forEach(this._getTextLines(),function(t){t.alignCenter()}))},t.MultilineText.prototype.alignRight=function(){this._horizAlign!=t.MultilineText.H_ALIGN_RIGHT&&(this._horizAlign=t.MultilineText.H_ALIGN_RIGHT,t.ArrayUtils.forEach(this._getTextLines(),function(t){t.alignRight()}))},t.MultilineText.prototype.alignTop=function(){this._vertAlign!=t.MultilineText.V_ALIGN_TOP&&(this._vertAlign=t.MultilineText.V_ALIGN_TOP,this._alignVerticalText(),t.ArrayUtils.forEach(this._getTextLines(),function(t){t.alignTop()}))},t.MultilineText.prototype.alignMiddle=function(){this._vertAlign!=t.MultilineText.V_ALIGN_MIDDLE&&(this._vertAlign=t.MultilineText.V_ALIGN_MIDDLE,this._alignVerticalText(),t.ArrayUtils.forEach(this._getTextLines(),function(t){t.alignMiddle()}))},t.MultilineText.prototype.alignBottom=function(){this._vertAlign!=t.MultilineText.V_ALIGN_BOTTOM&&(this._vertAlign=t.MultilineText.V_ALIGN_BOTTOM,this._alignVerticalText(),t.ArrayUtils.forEach(this._getTextLines(),function(t){t.alignBottom()}))},t.MultilineText.prototype._alignVerticalText=function(){if(this._vertAlign)for(var e=this.getYAlignCoord(),i=this.getLineCount(),n=this.getLineHeight(),o=this._getTextLines(),r=0,s=0;s<o.length;s++){var a=o[s];if(this._vertAlign==t.MultilineText.V_ALIGN_TOP)r=n*s;else if(this._vertAlign==t.MultilineText.V_ALIGN_MIDDLE){r=n*s-n*(i-1)/2}else this._vertAlign==t.MultilineText.V_ALIGN_BOTTOM&&(r=-n*(i-s-1));a.setY(e+r)}},t.MultilineText.prototype.getCSSStyle=function(){return this._textInstance.getCSSStyle()},t.MultilineText.prototype.setCSSStyle=function(e){return this._lineHeight=null,t.ArrayUtils.forEach(this._getTextLines(),function(t){t.setCSSStyle(e)}),this},t.MultilineText.prototype.copyShape=function(){var e=new t.MultilineText(this.getCtx(),this.getTextString(),this.getX(),this.getY());return e.setCSSStyle(this.getCSSStyle()).setHorizAlignment(this.getHorizAlignment()).setMaxLines(this.getMaxLines()),e},t.MultilineText.prototype._removeAdditionalLines=function(){for(var t=0;t<this._additionalLines.length;t++)this.removeChild(this._additionalLines[t]);this._additionalLines=[]},t.MultilineText.prototype._generatePreservedLines=function(){if(this._preserveNewLine){this._preservedLines=[];var t=this.getTextString().split(/\n+/),e=this._textInstance,i=null;this._preservedLines.push(e);for(var n=0;n<t.length;n++)if(i=t[n].replace(/\s+/g," "),e.setTextString(i),n<t.length-1){var o=e.copyShape();this._preservedLines.push(o),e=o}}},t.MultilineText.prototype.__fitText=function(e,i,n){if(!this._preserveNewLine){if(this._textInstance.setTextString(this.getTextString()),this._removeAdditionalLines(),!t.TextUtils.fitText(this._textInstance,e,i,this,n))return this.getParent().removeChild(this),!1;if(!this._textInstance.isTruncated())return!0;if(!this.isWrapEnabled())return!0}return this.wrapText(e,i,n,!1)},t.MultilineText.prototype.wrapText=function(e,i,n,o){this.getLineCount()>1&&this._removeAdditionalLines();var r=this.getLineHeight(),s=r*t.MultilineText._LINE_SPACE,a=this.getMaxLines(),l=Math.min(i,a*(r+s)-s)-r-s;if(this._preserveNewLine){for(var h=!1,u=null,c=0;c<this._preservedLines.length;c++){var p=this._preservedLines[c];if(l<s+r)return this._bTruncated=!0,h;if(t.TextUtils.fitText(p,e,1/0,this,n)){if(h=!0,l-=s+r,p.isTruncated()&&!this.isTruncated()&&(this._bTruncated=!0),c>0){this._additionalLines.push(p);var _=u?u.getY()+s+r:this.getY();p.setY(_),this.addChild(p)}u=p}}return h}p=this._textInstance;var g=null,d=this.getTextString().split(/\s+/);d.reverse();for(var S=!0;d.length>0;){var f=d.pop(),y=g?g+" "+f:f;if(p.setTextString(y),p.setUntruncatedTextString(null),!t.TextUtils.fitText(p,e,1/0,this,n,!0))return!S;if(p.isTruncated()){if(l<s+r)return this._bTruncated=!0,!0;if(g)p.setTextString(g),d.push(f);else{if(o)return this._textInstance.setTextString(this.getTextString()),this._removeAdditionalLines(),!1;this._bTruncated=!0}if(d.length>0){var E=p.copyShape();E.setY(p.getY()+s+r),this.addChild(E),this._additionalLines.push(E),p=E,g=null,l-=s+r}}else g=y;S=!1}return!0},t.MultilineText.prototype.GetSvgDimensions=function(e){var i=this._getTextLines();if(0==i.length)return new t.Rectangle(0,0,0,0);var n=new t.Rectangle(1/0,1/0,0,0);return t.ArrayUtils.forEach(i,function(t){var e=t.getDimensions();n.x=Math.min(n.x,e.x),n.y=Math.min(n.y,e.y),n.w=Math.max(n.w,e.w),n.h+=e.h}),this.ConvertCoordSpaceRect(n,e)},t.MultilineText.prototype.getLineCount=function(){return this._additionalLines.length+1},t.MultilineText.prototype.getLineHeight=function(){return this._lineHeight||(this._lineHeight=t.TextUtils.getTextStringHeight(this.getCtx(),this.getCSSStyle())),this._lineHeight},t.MultilineText.prototype.setWrapEnabled=function(t){0==t&&(this._textInstance.getParent()!=this&&this.addChild(this._textInstance),this._textInstance.getTextString()||this._textInstance.setTextString(this.getTextString()),this._removeAdditionalLines()),this._noWrap=!t},t.MultilineText.prototype.isWrapEnabled=function(){return 0==this._noWrap},t.MultilineText.prototype.getUntruncatedTextString=function(){return this.isTruncated()?this.getTextString():null},t.MultilineText.prototype.setUntruncatedTextString=function(t){},t.MultilineText.prototype.getDimensions=function(t){return this.GetSvgDimensions(t)},t.MultilineText.prototype.UpdateSelectionEffect=function(){},t.MultilineText.prototype.getHorizAlignment=function(){return this._horizAlign},t.MultilineText.prototype.setHorizAlignment=function(e){e==t.MultilineText.H_ALIGN_LEFT?this.alignLeft():e==t.MultilineText.H_ALIGN_CENTER?this.alignCenter():e==t.MultilineText.H_ALIGN_RIGHT&&this.alignRight()},t.MultilineText.prototype.getVertAlignment=function(){return this._vertAlign},t.MultilineText.prototype.setVertAlignment=function(e){e==t.MultilineText.V_ALIGN_TOP?this.alignTop():e==t.MultilineText.V_ALIGN_MIDDLE?this.alignMiddle():e==t.MultilineText.V_ALIGN_BOTTOM&&this.alignBottom()},t.BackgroundMultilineText=function(t,e,i,n,o,r,s){this.Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.BackgroundMultilineText,t.BackgroundOutputText),t.BackgroundMultilineText.prototype.Init=function(e,i,n,o,r,s,a){this._preserveNewLine=a||!1,t.BackgroundMultilineText.superclass.Init.call(this,e,i,n,o,r,s)},t.BackgroundMultilineText.prototype.wrapText=function(t,e,i,n){return this.TextInstance.wrapText(t,e,i,n)},t.BackgroundMultilineText.prototype.CreateTextInstance=function(e,i,n,o,r){return new t.MultilineText(e,i,n,o,r,this._preserveNewLine)},t.BackgroundMultilineText.prototype.GetTextDimensionsForRealign=function(){return this.getLineHeight()},t.BackgroundMultilineText.prototype.getDimensions=function(e){var i=this.TextInstance.getDimensions(),n=i.h*t.BackgroundOutputText._PADDING/this.getLineCount();return i.x-=n,i.w+=2*n,this.ConvertCoordSpaceRect(i,e)},t.BackgroundMultilineText.prototype.__fitText=function(t,e,i){return this.TextInstance.__fitText(t,e,i)},t.BackgroundMultilineText.prototype._getTextLines=function(){return this.TextInstance._getTextLines()},t.BackgroundMultilineText.prototype.getLineHeight=function(){return this.TextInstance.getLineHeight()},t.BackgroundMultilineText.prototype.getLineCount=function(){return this.TextInstance.getLineCount()},t.BackgroundMultilineText.prototype.getYAlignCoord=function(){return this.TextInstance.getYAlignCoord()},t.BackgroundMultilineText.prototype.setWrapEnabled=function(t){this.TextInstance.setWrapEnabled(t)},t.BackgroundMultilineText.prototype.isWrapEnabled=function(){return this.TextInstance.isWrapEnabled()},t.BackgroundMultilineText.prototype.UpdateSelectionEffect=function(){},t.Use=function(t,e,i,n,o){this.Init(t,e,i,n,o)},t.Obj.createSubclass(t.Use,t.Displayable),t.Use._uniqueSeed=0,t.Use.prototype.Init=function(e,i,n,o,r){t.Use.superclass.Init.call(this,e,"use",r);var s=o.getId();if(s||(s="use"+t.Use._uniqueSeed++,o.setId(s)),e.existsGlobalDefReference(s))e.increaseGlobalDefReference(s);else{var a=o.getElem();t.ToolkitUtils.setAttrNullNS(a,"id",s),e.appendDefs(a),e.increaseGlobalDefReference(s)}this._targetId=s,t.ToolkitUtils.setHref(this._elem,t.ToolkitUtils.getUrlPathById(s)),this.setX(i).setY(n)},t.Use.prototype.getX=function(){return this.GetProperty("x")},t.Use.prototype.setX=function(t){return this.SetSvgProperty("x",t,0)},t.Use.prototype.getY=function(){return this.GetProperty("y")},t.Use.prototype.setY=function(t){return this.SetSvgProperty("y",t,0)},t.Use.prototype.destroy=function(){this.getCtx().decreaseGlobalDefReference(this._targetId),t.Use.superclass.destroy.call(this)},t.StyleUtils={},t.Obj.createSubclass(t.StyleUtils,t.Obj),t.StyleUtils.DEFAULT_FONT_FAMILY="Tahoma,Verdana,Helvetica,sans-serif",t.StyleUtils.DEFAULT_FONT_SIZE="11px",t.StyleUtils.DEFAULT_FONT_COLOR="black",t.StyleUtils.getStyle=function(t,e,i){return t&&null!==t[e]&&void 0!==t[e]?t[e]:i},t.StyleUtils.setStyle=function(t,e,i){t&&null!=i&&(t[e]=i)},t.StyleUtils.getShadow=function(e){var i=null;if(null!=e&&"none"!=e){var n,o=0,r=0,s=0,a=e.replace(/, /g,",").split(" ");if(null==e.match(/rgb/i)&&(a[a.length]="rgba(0, 0, 0, 0.2)"),a.length<3)return null;for(var l=0;l<a.length;l++)0==l?o=parseInt(a[0]):1==l?r=parseInt(a[1]):2==l&&null==a[l].match(/rgb/i)?s=parseInt(a[l]):a[l].match(/rgb/i)&&(n=a[l]);var h=Math.sqrt(o*o+r*r),u=180*Math.atan2(r,o)/Math.PI;i=new t.Shadow(n,h,s,s,u,1,3,!1,!1,!1)}return i},t.StyleUtils.getTimeMilliseconds=function(t){return"string"==typeof t&&(t="ms"==t.slice(-2)?parseInt(t.slice(0,-2)):"s"==t.slice(-1)?1e3*parseFloat(t.slice(0,-1)):parseInt(t)),t},t.CSSGradient=function(t){this.Init(t)},t.Obj.createSubclass(t.CSSGradient,t.Obj),t.CSSGradient.LINEAR=0,t.CSSGradient.RADIAL=1,t.CSSGradient.prototype.Init=function(t){this._type=t},t.CSSGradient.prototype.getGradientType=function(){return this._type},t.CSSGradient.prototype.getAlphas=function(){return this._arAlphas},t.CSSGradient.prototype.setAlphas=function(t){this._arAlphas=t},t.CSSGradient.prototype.getColors=function(){return this._arColors},t.CSSGradient.prototype.setColors=function(t){this._arColors=t},t.CSSGradient.prototype.getRatios=function(){return this._arRatios},t.CSSGradient.prototype.setRatios=function(t){this._arRatios=t};var C=function(){this.Init()};t.Obj.createSubclass(C,t.CSSGradient),C.LEFT=0,C.BOTTOM_LEFT=45,C.BOTTOM=90,C.BOTTOM_RIGHT=135,C.RIGHT=180,C.TOP_RIGHT=225,C.TOP=270,C.TOP_LEFT=315,C.prototype.Init=function(){C.superclass.Init.call(this,t.CSSGradient.LINEAR)},C.prototype.getAngle=function(){return this._angle},C.prototype.setAngle=function(t){this._angle=t},t.GradientParser=function(){},t.Obj.createSubclass(t.GradientParser,t.Obj),t.GradientParser.WEBKIT_GD_LINEAR="-webkit-linear-gradient",t.GradientParser.FIREFOX_GD_LINEAR="-moz-linear-gradient",t.GradientParser.IE_GD_LINEAR="progid:DXImageTransform.Microsoft.gradient",t.GradientParser.IE_GD_LINEAR2="progid:DXImageTransform.Microsoft.Gradient",t.GradientParser.IE7_GD_FILTER="filter",t.GradientParser.IE8_GD_FILTER="-ms-filter",t.GradientParser.IE10_GD_LINEAR="-ms-linear-gradient",t.GradientParser.IE_GD_START_COLOR_STR="startColorstr",t.GradientParser.IE_GD_END_COLOR_STR="endColorstr",t.GradientParser.IE_GD_GRADIENT_TYPE="GradientType",t.GradientParser.OLD_WEBKIT_GD_LINEAR="-webkit-gradient",t.GradientParser.GD_LINEAR="linear-gradient",t.GradientParser.GD_RADIAL="radial-gradient",t.GradientParser.GD_TOP="top",t.GradientParser.GD_BOTTOM="bottom",t.GradientParser.GD_LEFT="left",t.GradientParser.GD_RIGHT="right",t.GradientParser.GD_CENTER="center",t.GradientParser.GD_TO="to",t.GradientParser.parseCSSGradient=function(e){if(null!=e){if(e=t.StringUtils.trim(e),t.GradientParser._startsWith(e,t.GradientParser.WEBKIT_GD_LINEAR))return e=t.GradientParser._removeParenthesis(e,t.GradientParser.WEBKIT_GD_LINEAR),t.GradientParser._parseLinearGradient(e);if(t.GradientParser._startsWith(e,t.GradientParser.FIREFOX_GD_LINEAR))return e=t.GradientParser._removeParenthesis(e,t.GradientParser.FIREFOX_GD_LINEAR),t.GradientParser._parseLinearGradient(e);if(t.GradientParser._startsWith(e,t.GradientParser.IE_GD_LINEAR))return e=t.GradientParser._removeParenthesis(e,t.GradientParser.IE_GD_LINEAR),t.GradientParser._parseIELinearGradient(e);if(t.GradientParser._startsWith(e,t.GradientParser.IE_GD_LINEAR2))return e=t.GradientParser._removeParenthesis(e,t.GradientParser.IE_GD_LINEAR2),t.GradientParser._parseIELinearGradient(e);if(t.GradientParser._startsWith(e,t.GradientParser.IE10_GD_LINEAR))return e=t.GradientParser._removeParenthesis(e,t.GradientParser.IE10_GD_LINEAR),t.GradientParser._parseLinearGradient(e);if(t.GradientParser._startsWith(e,t.GradientParser.GD_LINEAR))return e=t.GradientParser._removeParenthesis(e,t.GradientParser.GD_LINEAR),t.GradientParser._parseLinearGradient(e)}return null},t.GradientParser._parseLinearGradient=function(e){var i=new RegExp("(-?(?:\\d*\\.)?\\d+)"),n=new RegExp("(deg|rad|grad|turn)"),o=new RegExp("(left|right)"),r=new RegExp("(top|bottom)"),s=new RegExp("(?:(to)\\s+)"),a=new RegExp("(?:"+i.source+n.source+")"),l=new RegExp("(?:"+o.source+"(?:\\s+"+r.source+")?)"),h=new RegExp("(?:"+r.source+"(?:\\s+"+o.source+")?)"),u=new RegExp("(?:"+l.source+"|"+h.source+")"),c=new RegExp("(?:"+a.source+"|(?:"+s.source+"?"+u.source+"))"),p=new RegExp("(?:\\s*"+c.source+"\\s*,\\s*)","i"),_=e.match(p);if(null==_||0==_.length)return null;_.length;var g=new C,d=_[5]==t.GradientParser.GD_TOP||_[6]==t.GradientParser.GD_TOP,S=_[5]==t.GradientParser.GD_BOTTOM||_[6]==t.GradientParser.GD_BOTTOM,f=_[4]==t.GradientParser.GD_LEFT||_[7]==t.GradientParser.GD_LEFT,y=_[4]==t.GradientParser.GD_RIGHT||_[7]==t.GradientParser.GD_RIGHT;if(_[3]==t.GradientParser.GD_TO&&((d||S)&&(d=!d,S=!S),(f||y)&&(f=!f,y=!y)),d)f?g.setAngle(C.TOP_LEFT):y?g.setAngle(C.TOP_RIGHT):g.setAngle(C.TOP);else if(S)f?g.setAngle(C.BOTTOM_LEFT):y?g.setAngle(C.BOTTOM_RIGHT):g.setAngle(C.BOTTOM);else if(f)g.setAngle(C.LEFT);else if(y)g.setAngle(C.RIGHT);else if(_[2]){a=parseFloat(_[1]);isNaN(a)||("grad"==_[2]?a=a/200*180:"rad"==_[2]?a=a/Math.PI*180:"turn"==_[2]&&(a=a/.5*180),g.setAngle(a))}return e=e.substring(_[0].length),t.GradientParser._parseCSSColorStops(e,g),g},t.GradientParser._parseIELinearGradient=function(e){var i,n=e.split(","),o=n.length,r=[],s=new C;s.setAngle(C.TOP);for(var a=0;a<o;a++)2==(i=t.StringUtils.trim(n[a]).split("=")).length&&(i[0]=t.StringUtils.trim(i[0]),i[0]==t.GradientParser.IE_GD_START_COLOR_STR?r[0]=t.GradientParser.removeQuotes(i[1],t.CSSStyle.SINGLE_QUOTE):i[0]==t.GradientParser.IE_GD_END_COLOR_STR?r[1]=t.GradientParser.removeQuotes(i[1],t.CSSStyle.SINGLE_QUOTE):i[0]==t.GradientParser.IE_GD_GRADIENT_TYPE&&"1"==i[1]&&s.setAngle(C.LEFT));return t.GradientParser._parseColorStops(r,s),s},t.GradientParser._parseCSSColorStops=function(e,i){var n=e.match(/(#[0-9a-f]+|rgb\(\s*(\d+),\s*(\d+),\s*(\d+)\s*\)|rgba\(\s*(\d+),\s*(\d+),\s*(\d+),\s*(\d?)(\.\d+)?\s*\)|[a-z]+)(\s+\d+\.?\d*%)?/gi);null!=n&&n.length>0&&t.GradientParser._parseColorStops(n,i)},t.GradientParser._parseColorStops=function(e,i){for(var n,o,r,s=e.length,a=[],l=[],h=[],u=!0,c=[],p=0;p<e.length;p++)r=t.CSSStyle.parseBorderColor(e[p],c),n=c.pop(),l[p]=n,a[p]=t.ColorUtils.getAlpha(n),(r=t.StringUtils.trim(r)).length>0&&(o=parseFloat(r),isNaN(o)||t.StringUtils.endsWith(r,"%")&&(h[p]=o/100,u=!1));if(s>1&&u)for(var _=0;_<s;_++)h[_]=_/(s-1);else u&&(h[0]=0);i.setColors(l),i.setAlphas(a),i.setRatios(h)},t.GradientParser._removeParenthesis=function(e,i){return")"!=e.charAt(e.length-1)?null:(e=e.substring(i.length),t.GradientParser.removeQuotes(e,"(",")"))},t.GradientParser.removeQuotes=function(e,i,n){if((e=t.StringUtils.trim(e)).charAt(0)!=i)return e;null==n&&(n=i);var o=e.lastIndexOf(n);return o<0?e.substring(1):e.substring(1,o)},t.GradientParser._startsWith=function(t,e){return 0==t.indexOf(e)},t.CSSStyle=function(t){this.Init(t)},t.Obj.createSubclass(t.CSSStyle,t.Obj),t.CSSStyle.SKIN_FUSION="fusion",t.CSSStyle.SKIN_SKYROS="skyros",t.CSSStyle.SKIN_ALTA="alta",t.CSSStyle.SKIN_NEXT="next",t.CSSStyle.BACKGROUND="background",t.CSSStyle.BACKGROUND_COLOR="background-color",t.CSSStyle.BACKGROUND_IMAGE="background-image",t.CSSStyle.BACKGROUND_REPEAT="background-repeat",t.CSSStyle.BACKGROUND_POSITION="background-position",t.CSSStyle.BORDER="border",t.CSSStyle.BORDER_TOP="border-top",t.CSSStyle.BORDER_BOTTOM="border-bottom",t.CSSStyle.BORDER_LEFT="border-left",t.CSSStyle.BORDER_RIGHT="border-right",t.CSSStyle.BORDER_WIDTH="border-width",t.CSSStyle.BORDER_TOP_WIDTH="border-top-width",t.CSSStyle.BORDER_BOTTOM_WIDTH="border-bottom-width",t.CSSStyle.BORDER_LEFT_WIDTH="border-left-width",t.CSSStyle.BORDER_RIGHT_WIDTH="border-right-width",t.CSSStyle.BORDER_COLOR="border-color",t.CSSStyle.BORDER_TOP_COLOR="border-top-color",t.CSSStyle.BORDER_BOTTOM_COLOR="border-bottom-color",t.CSSStyle.BORDER_LEFT_COLOR="border-left-color",t.CSSStyle.BORDER_RIGHT_COLOR="border-right-color",t.CSSStyle.BORDER_STYLE="border-style",t.CSSStyle.BORDER_RADIUS="border-radius",t.CSSStyle.BORDER_TOP_LEFT_RADIUS="border-top-left-radius",t.CSSStyle.BORDER_TOP_RIGHT_RADIUS="border-top-right-radius",t.CSSStyle.BORDER_BOTTOM_RIGHT_RADIUS="border-bottom-right-radius",t.CSSStyle.BORDER_BOTTOM_LEFT_RADIUS="border-bottom-left-radius",t.CSSStyle.MARGIN="margin",t.CSSStyle.MARGIN_TOP="margin-top",t.CSSStyle.MARGIN_BOTTOM="margin-bottom",t.CSSStyle.MARGIN_LEFT="margin-left",t.CSSStyle.MARGIN_RIGHT="margin-right",t.CSSStyle.PADDING="padding",t.CSSStyle.PADDING_TOP="padding-top",t.CSSStyle.PADDING_BOTTOM="padding-bottom",t.CSSStyle.PADDING_LEFT="padding-left",t.CSSStyle.PADDING_RIGHT="padding-right",t.CSSStyle.COLOR="color",t.CSSStyle.FONT_FAMILY="font-family",t.CSSStyle.FONT_SIZE="font-size",t.CSSStyle.FONT_STYLE="font-style",t.CSSStyle.FONT_WEIGHT="font-weight",t.CSSStyle.TEXT_DECORATION="text-decoration",t.CSSStyle.TEXT_ALIGN="text-align",t.CSSStyle.BORDER_BOX="border-box",t.CSSStyle.CONTENT_BOX="content-box",t.CSSStyle.HEIGHT="height",t.CSSStyle.WIDTH="width",t.CSSStyle.MAX_WIDTH="max-width",t.CSSStyle.NONE="none",t.CSSStyle.NO_REPEAT="no-repeat",t.CSSStyle.REPEAT="repeat",t.CSSStyle.REPEAT_X="repeat-x",t.CSSStyle.REPEAT_Y="repeat-y",t.CSSStyle.AUTO="auto",t.CSSStyle.AUTO_MARGIN="8",t.CSSStyle.BORDER_TYPE="border-type",t.CSSStyle.FILL_TYPE="fill-type",t.CSSStyle.CONTENT="content",t.CSSStyle.INNER_COLOR="-tr-inner-color",t.CSSStyle.OUTER_COLOR="-tr-outer-color",t.CSSStyle.WHITE_SPACE="white-space",t.CSSStyle._NAMED_FONT_SIZE_MAP={"xx-small":"9","x-small":"10",small:"13",medium:"16",large:"18","x-large":"24","xx-large":"32"},t.CSSStyle._NAMED_WIDTH_MAP={thin:"2",medium:"4",thick:"6"},t.CSSStyle._NAMED_COLOR_MAP={aqua:"#00FFFF",black:"#000000",blue:"#0000FF",white:"#FFFFFF",fuchsia:"#FF00FF",gray:"#848284",lime:"#00FF00",maroon:"#840000",green:"#008200",navy:"#000084",olive:"#848200",red:"#FF0000",silver:"#C6C3C6",teal:"#008284",yellow:"#FFFF00",purple:"#800080",cyan:"#D2B48C",goldenrod:"#DAA520",lightblue:"#ADD8E6",lightyellow:"#FFFFE0",orange:"#FFA500",paleGoldenRod:"#EEE8AA",paleturquoise:"#AFEEEE",peachpuff:"#FFDAB9",pink:"#FFC0CB",tan:"#D2B48C",thistle:"#D8BFD8",transparent:"transparent"},t.CSSStyle._numericAttrsList=[t.CSSStyle.MAX_WIDTH,t.CSSStyle.WIDTH,t.CSSStyle.HEIGHT,t.CSSStyle.BORDER_WIDTH,t.CSSStyle.BORDER_TOP_WIDTH,t.CSSStyle.BORDER_BOTTOM_WIDTH,t.CSSStyle.BORDER_LEFT_WIDTH,t.CSSStyle.BORDER_RIGHT_WIDTH,t.CSSStyle.MARGIN,t.CSSStyle.MARGIN_TOP,t.CSSStyle.MARGIN_BOTTOM,t.CSSStyle.MARGIN_LEFT,t.CSSStyle.MARGIN_RIGHT,t.CSSStyle.PADDING,t.CSSStyle.PADDING_TOP,t.CSSStyle.PADDING_BOTTOM,t.CSSStyle.PADDING_LEFT,t.CSSStyle.PADDING_RIGHT],t.CSSStyle._DOUBLE_QUOTE='"',t.CSSStyle._SINGLE_QUOTE="'",t.CSSStyle.COLORS_SKYROS=["#003366","#CC3300","#666699","#006666","#FF9900","#993366","#99CC33","#624390","#669933","#FFCC33","#006699","#EBEA79"],t.CSSStyle.COLORS_ALTA=["#237bb1","#68c182","#fad55c","#ed6647","#8561c8","#6ddbdb","#ffb54d","#e371b2","#47bdef","#a2bf39","#a75dba","#f7f37b"],t.CSSStyle.prototype.Init=function(t){this._styleMap={},this.parseInlineStyle(t)},t.CSSStyle.prototype.parseInlineStyle=function(e){if(e){var i=this;if(e instanceof Object)for(var n in e){var o=e[n];n=n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i.setStyle(n,o)}else t.CSSStyle._parseStyleString(e,function(t,e){i.setStyle(t,e)})}},t.CSSStyle.prototype.setStyle=function(e,i){if(null==i)this._setStyleAttr(e,i);else switch(e){case"background-repeat":this._setBackgroundRepeat(e,i);break;case"color":case"background-color":case"border-top-color":case"border-bottom-color":case"border-left-color":case"border-right-color":this._setColorAttr(e,i);break;case"border-top":case"border-bottom":case"border-left":case"border-right":this._setBorderSide(e,i);break;case"border":this._setBorderShorthand(e,i);break;case"border-color":this._setBorderColorShorthand(e,i);break;case"border-width":this._setBorderWidthShorthand(e,i);break;case"border-radius":this._setBorderRadius(e,i);break;case"padding":this._setPaddingShorthand(e,i);break;case"margin":this._setMarginShorthand(e,i);break;case"font-size":this.setFontSize(e,i);break;case"background-image":(n=t.GradientParser.parseCSSGradient(i))&&(i=n),this._setStyleAttr(e,i);break;case t.GradientParser.IE7_GD_FILTER:case t.GradientParser.IE8_GD_FILTER:var n,o=t.GradientParser.removeQuotes(i,t.CSSStyle._DOUBLE_QUOTE);(n=t.GradientParser.parseCSSGradient(o))&&(e=t.CSSStyle.BACKGROUND_IMAGE,i=n),this._setStyleAttr(e,i);break;default:this._setStyleAttr(e,i)}return this},t.CSSStyle.prototype.getStyle=function(t){return this._styleMap[t]},t.CSSStyle.prototype._setStyleAttr=function(t,e){return null!=e?this._styleMap[t]=e:delete this._styleMap[t],this},t.CSSStyle.prototype.setFontSize=function(e,i){var n=t.StringUtils.trim(i),o=t.CSSStyle._NAMED_FONT_SIZE_MAP[n];o?this._setStyleAttr(e,String(o)+"px"):this._setStyleAttr(e,isNaN(parseFloat(n))?t.StyleUtils.DEFAULT_FONT_SIZE:n)},t.CSSStyle.prototype._setBorderWidthShorthand=function(e,i){var n=i.split(" "),o=null;switch(n.length){case 1:this._setStyleAttr(e,t.CSSStyle._getBorderWidth(n[0])),this._setStyleAttr(t.CSSStyle.BORDER_TOP_WIDTH,null),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_WIDTH,null),this._setStyleAttr(t.CSSStyle.BORDER_RIGHT_WIDTH,null),this._setStyleAttr(t.CSSStyle.BORDER_LEFT_WIDTH,null);break;case 2:o=t.CSSStyle._getBorderWidth(n[0]),this._setStyleAttr(t.CSSStyle.BORDER_TOP_WIDTH,o),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_WIDTH,o),o=t.CSSStyle._getBorderWidth(n[1]),this._setStyleAttr(t.CSSStyle.BORDER_LEFT_WIDTH,o),this._setStyleAttr(t.CSSStyle.BORDER_RIGHT_WIDTH,o);break;case 3:this._setStyleAttr(t.CSSStyle.BORDER_TOP_WIDTH,t.CSSStyle._getBorderWidth(n[0])),o=t.CSSStyle._getBorderWidth(n[1]),this._setStyleAttr(t.CSSStyle.BORDER_LEFT_WIDTH,o),this._setStyleAttr(t.CSSStyle.BORDER_RIGHT_WIDTH,o),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_WIDTH,t.CSSStyle._getBorderWidth(n[2]));break;case 4:this._setStyleAttr(t.CSSStyle.BORDER_TOP_WIDTH,t.CSSStyle._getBorderWidth(n[0])),this._setStyleAttr(t.CSSStyle.BORDER_RIGHT_WIDTH,t.CSSStyle._getBorderWidth(n[1])),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_WIDTH,t.CSSStyle._getBorderWidth(n[2])),this._setStyleAttr(t.CSSStyle.BORDER_LEFT_WIDTH,t.CSSStyle._getBorderWidth(n[3]))}},t.CSSStyle._getBorderWidth=function(e){var i=t.StringUtils.trim(e),n=t.CSSStyle._NAMED_WIDTH_MAP[i];return n||(n=isNaN(parseFloat(i))?"0px":i),n},t.CSSStyle.prototype._setBorderSide=function(e,i){for(var n,o=i.split(" "),r=null,s=!1,a=0;a<o.length;a++)if(n=e,0==(r=o[a]).indexOf("rgb")){for(var l=a+1;l<o.length&&(r+=o[l],a++,-1==o[l].indexOf(")"));l++);t.StringUtils.endsWith(e,"-"+t.CSSStyle.COLOR)||(n=e+"-"+t.CSSStyle.COLOR),this._setStyleAttr(n,r)}else t.CSSStyle._isColorValue(r)?(t.StringUtils.endsWith(e,"-"+t.CSSStyle.COLOR)||(n=e+"-"+t.CSSStyle.COLOR),this._setStyleAttr(n,t.CSSStyle._parseHexColor(r))):t.CSSStyle._isBorderWidthValue(r)?(t.StringUtils.endsWith(e,"-"+t.CSSStyle.WIDTH)||(n=e+"-"+t.CSSStyle.WIDTH),this._setStyleAttr(n,r)):"none"==i&&(s=!0);s&&this._setStyleAttr(e+"-"+t.CSSStyle.WIDTH,"0")},t.CSSStyle.prototype.getBorderSideWidth=function(e){return this._getSideWidth(e,t.CSSStyle.BORDER_WIDTH)},t.CSSStyle.prototype.getMargin=function(e){return this._getSideWidth(e,t.CSSStyle.MARGIN)},t.CSSStyle.prototype.getPadding=function(e){return this._getSideWidth(e,t.CSSStyle.PADDING)},t.CSSStyle.prototype.getBorderWidth=function(){var e=this.getStyle(t.CSSStyle.BORDER_WIDTH);return e?t.CSSStyle.toNumber(e):(e=this.getStyle(t.CSSStyle.BORDER_TOP_WIDTH))?t.CSSStyle.toNumber(e):(e=this.getStyle(t.CSSStyle.BORDER_RIGHT_WIDTH))?t.CSSStyle.toNumber(e):(e=this.getStyle(t.CSSStyle.BORDER_BOTTOM_WIDTH))?t.CSSStyle.toNumber(e):(e=this.getStyle(t.CSSStyle.BORDER_LEFT_WIDTH))?t.CSSStyle.toNumber(e):0},t.CSSStyle.prototype.getMaxWidth=function(){return this.getStyle(t.CSSStyle.MAX_WIDTH)},t.CSSStyle.prototype.getWidth=function(){return this.getStyle(t.CSSStyle.WIDTH)},t.CSSStyle.prototype.getHeight=function(){return this.getStyle(t.CSSStyle.HEIGHT)},t.CSSStyle.toNumber=function(t){return t?(t=parseFloat(t),isNaN(t)?0:t):0},t.CSSStyle.isInheritable=function(e){switch(e){case t.CSSStyle.COLOR:case t.CSSStyle.FONT_FAMILY:case t.CSSStyle.FONT_SIZE:case t.CSSStyle.FONT_STYLE:case t.CSSStyle.FONT_WEIGHT:case t.CSSStyle.TEXT_ALIGN:return!0;default:return!1}},t.CSSStyle.prototype._setBorderColorShorthand=function(e,i){var n,o=t.CSSStyle._parseBorderColorString(e,i);switch(o.length){case 1:this._setStyleAttr(e,o[0]),this._setStyleAttr(t.CSSStyle.BORDER_TOP_COLOR,null),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_COLOR,null),this._setStyleAttr(t.CSSStyle.BORDER_RIGHT_COLOR,null),this._setStyleAttr(t.CSSStyle.BORDER_LEFT_COLOR,null);break;case 2:n=o[0],this._setStyleAttr(t.CSSStyle.BORDER_TOP_COLOR,n),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_COLOR,n),n=o[1],this._setStyleAttr(t.CSSStyle.BORDER_LEFT_COLOR,n),this._setStyleAttr(t.CSSStyle.BORDER_RIGHT_COLOR,n);break;case 3:this._setStyleAttr(t.CSSStyle.BORDER_TOP_COLOR,o[0]),n=o[1],this._setStyleAttr(t.CSSStyle.BORDER_LEFT_COLOR,n),this._setStyleAttr(t.CSSStyle.BORDER_RIGHT_COLOR,n),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_COLOR,o[2]);break;case 4:this._setStyleAttr(t.CSSStyle.BORDER_TOP_COLOR,o[0]),this._setStyleAttr(t.CSSStyle.BORDER_RIGHT_COLOR,o[1]),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_COLOR,o[2]),this._setStyleAttr(t.CSSStyle.BORDER_LEFT_COLOR,o[3])}},t.CSSStyle.prototype._setPaddingShorthand=function(e,i){var n=i.split(" "),o=null;switch(n.length){case 1:this._setStyleAttr(e,this._getPercent(n[0])),this._setStyleAttr(t.CSSStyle.PADDING_TOP,null),this._setStyleAttr(t.CSSStyle.PADDING_BOTTOM,null),this._setStyleAttr(t.CSSStyle.PADDING_RIGHT,null),this._setStyleAttr(t.CSSStyle.PADDING_LEFT,null);break;case 2:o=this._getPercent(n[0]),this._setStyleAttr(t.CSSStyle.PADDING_TOP,o),this._setStyleAttr(t.CSSStyle.PADDING_BOTTOM,o),o=this._getPercent(n[1]),this._setStyleAttr(t.CSSStyle.PADDING_LEFT,o),this._setStyleAttr(t.CSSStyle.PADDING_RIGHT,o);break;case 3:this._setStyleAttr(t.CSSStyle.PADDING_TOP,this._getPercent(n[0])),o=this._getPercent(n[1]),this._setStyleAttr(t.CSSStyle.PADDING_LEFT,o),this._setStyleAttr(t.CSSStyle.PADDING_RIGHT,o),this._setStyleAttr(t.CSSStyle.PADDING_BOTTOM,this._getPercent(n[2]));break;case 4:this._setStyleAttr(t.CSSStyle.PADDING_TOP,this._getPercent(n[0])),this._setStyleAttr(t.CSSStyle.PADDING_RIGHT,this._getPercent(n[1])),this._setStyleAttr(t.CSSStyle.PADDING_BOTTOM,this._getPercent(n[2])),this._setStyleAttr(t.CSSStyle.PADDING_LEFT,this._getPercent(n[3]))}},t.CSSStyle.prototype._setMarginShorthand=function(e,i){var n=i.split(" "),o=null;switch(n.length){case 1:this._setStyleAttr(e,this._getMargin(n[0])),this._setStyleAttr(t.CSSStyle.MARGIN_TOP,null),this._setStyleAttr(t.CSSStyle.MARGIN_BOTTOM,null),this._setStyleAttr(t.CSSStyle.MARGIN_RIGHT,null),this._setStyleAttr(t.CSSStyle.MARGIN_LEFT,null);break;case 2:o=this._getMargin(n[0]),this._setStyleAttr(t.CSSStyle.MARGIN_TOP,o),this._setStyleAttr(t.CSSStyle.MARGIN_BOTTOM,o),o=this._getMargin(n[1]),this._setStyleAttr(t.CSSStyle.MARGIN_LEFT,o),this._setStyleAttr(t.CSSStyle.MARGIN_RIGHT,o);break;case 3:this._setStyleAttr(t.CSSStyle.MARGIN_TOP,this._getMargin(n[0])),o=this._getMargin(n[1]),this._setStyleAttr(t.CSSStyle.MARGIN_LEFT,o),this._setStyleAttr(t.CSSStyle.MARGIN_RIGHT,o),this._setStyleAttr(t.CSSStyle.MARGIN_BOTTOM,this._getMargin(n[2]));break;case 4:this._setStyleAttr(t.CSSStyle.MARGIN_TOP,this._getMargin(n[0])),this._setStyleAttr(t.CSSStyle.MARGIN_RIGHT,this._getMargin(n[1])),this._setStyleAttr(t.CSSStyle.MARGIN_BOTTOM,this._getMargin(n[2])),this._setStyleAttr(t.CSSStyle.MARGIN_LEFT,this._getMargin(n[3]))}},t.CSSStyle.prototype._getMargin=function(e){var i=t.StringUtils.trim(e);return t.CSSStyle.AUTO==i?t.CSSStyle.AUTO_MARGIN:this._getPercent(i)},t.CSSStyle.prototype._getPercent=function(e){return t.StringUtils.trim(e)},t.CSSStyle.prototype._setBorderShorthand=function(e,i){for(var n=i.split(" "),o=null,r=!1,s=0;s<n.length;s++)if(0==(o=n[s]).indexOf("rgb")){for(var a=s+1;a<n.length&&(o+=n[a],s++,-1==n[a].indexOf(")"));a++);this._setBorderColorShorthand(t.CSSStyle.BORDER_COLOR,o)}else t.CSSStyle._isColorValue(o)?this._setBorderColorShorthand(t.CSSStyle.BORDER_COLOR,o):t.CSSStyle._isBorderWidthValue(o)?this._setBorderWidthShorthand(t.CSSStyle.BORDER_WIDTH,o):"none"==i&&(r=!0);r&&this._setBorderWidthShorthand(t.CSSStyle.BORDER_WIDTH,"0")},t.CSSStyle._getBorderRadius=function(e){var i=t.StringUtils.trim(e);return isNaN(parseFloat(i))?"0px":i},t.CSSStyle.prototype._setBorderRadius=function(e,i){var n=i.split("/");if(null!=n[0]){var o=t.StringUtils.trim(n[0]).split(" ");switch(o.length){case 1:default:this._setStyleAttr(e,t.CSSStyle._getBorderRadius(o[0])),this._setStyleAttr(t.CSSStyle.BORDER_TOP_LEFT_RADIUS,null),this._setStyleAttr(t.CSSStyle.BORDER_TOP_RIGHT_RADIUS,null),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_RIGHT_RADIUS,null),this._setStyleAttr(t.CSSStyle.BORDER_BOTTOM_LEFT_RADIUS,null)}if(2==n.length&&null!=n[1]){var r=t.StringUtils.trim(n[1]).split(" ");switch(r.length){case 1:this.getStyle(e)?this._setStyleAttr(e,this.getStyle(e)+" "+t.CSSStyle._getBorderRadius(r[0])):this._setStyleAttr(e,t.CSSStyle._getBorderRadius(r[0]))}}}else this._setStyleAttr(e,"0px")},t.CSSStyle.prototype.getBorderRadius=function(){return"undefined"!==this.getStyle(t.CSSStyle.BORDER_RADIUS)&&null!==this.getStyle(t.CSSStyle.BORDER_RADIUS)?t.CSSStyle.toNumber(this.getStyle(t.CSSStyle.BORDER_RADIUS)):0},t.CSSStyle.prototype._setBackgroundRepeat=function(e,i){var n=i.split(" ");2==n.length&&(n[0]==n[1]?i=n[0]:n[0]==t.CSSStyle.REPEAT&&n[1]==t.CSSStyle.NO_REPEAT&&(i=t.CSSStyle.REPEAT_X),n[0]==t.CSSStyle.NO_REPEAT&&n[1]==t.CSSStyle.REPEAT&&(i=t.CSSStyle.REPEAT_Y)),this._setStyleAttr(e,i)},t.CSSStyle.prototype._setColorAttr=function(e,i){var n=t.CSSStyle._toColorVal(i);n?this._setStyleAttr(e,n):t.CSSStyle._isColorValue(i)&&this._setStyleAttr(e,i)},t.CSSStyle._toColorVal=function(e){e=t.StringUtils.trim(e);var i=t.CSSStyle._NAMED_COLOR_MAP[e.toLowerCase()];return i||null},t.CSSStyle.prototype.setColor=function(t,e){this._setStyleAttr(t,e)},t.CSSStyle._isValueInEM=function(t){return t.toLowerCase().indexOf("em")>=0},t.CSSStyle.prototype._resolveEMx=function(e,i){var n=this.getStyle(e);return!n||!t.CSSStyle._isValueInEM(n)||!!i&&(this._setStyleAttr(e,String(Math.round(parseFloat(n)*parseFloat(i)))+"px"),!0)},t.CSSStyle.prototype.getAbsoluteFontSize=function(){var e=this.getFontSize();return e&&!t.CSSStyle._isValueInEM(e)?e:null},t.CSSStyle.prototype.resolveEM=function(e){var i=this.getFontSize();i&&(t.CSSStyle._isValueInEM(i)?this._resolveEMx(t.CSSStyle.FONT_SIZE,e):e=i);for(var n=t.CSSStyle._numericAttrsList,o=0;o<n.length;o++)if(!this._resolveEMx(n[o],e))return!1;return!0},t.CSSStyle.prototype.clone=function(){var e=new t.CSSStyle;for(var i in this._styleMap)e._setStyleAttr(i,this.getStyle(i));return e},t.CSSStyle.prototype.merge=function(t){if(t)for(var e in t._styleMap)this._setStyleAttr(e,t.getStyle(e));return this},t.CSSStyle.prototype.mergeUnder=function(t){if(t)for(var e in t._styleMap)this.getStyle(e)||this._setStyleAttr(e,t.getStyle(e));return this},t.CSSStyle.prototype.toString=function(){var t="";for(var e in this._styleMap)t+=e+":"+this.getStyle(e)+"; ";return t},t.CSSStyle.prototype.getBackgroundImage=function(){var e,i,n=this.getStyle(t.CSSStyle.BACKGROUND_IMAGE);return n&&n instanceof t.CSSGradient?n:(n&&(e=n.indexOf("url("),i=n.lastIndexOf(")"),0==e&&i==n.length-1&&(n=n.substring(4,i))),n&&(e=n.indexOf(t.CSSStyle._SINGLE_QUOTE),i=n.lastIndexOf(t.CSSStyle._SINGLE_QUOTE),0==e&&i==n.length-1?n=n.substring(1,i):(e=n.indexOf(t.CSSStyle._DOUBLE_QUOTE),i=n.lastIndexOf(t.CSSStyle._DOUBLE_QUOTE),0==e&&i==n.length-1&&(n=n.substring(1,i)))),n)},t.CSSStyle.prototype.hasBackgroundStyles=function(){return!!(this.getStyle(t.CSSStyle.BORDER_COLOR)||this.getStyle(t.CSSStyle.BORDER_WIDTH)||this.getStyle(t.CSSStyle.BORDER_RADIUS)||this.getStyle(t.CSSStyle.BACKGROUND_COLOR))},t.CSSStyle._isColorValue=function(e){return 0==(e=t.StringUtils.trim(e)).indexOf("rgb")||0==e.indexOf("#")||!!t.CSSStyle._NAMED_COLOR_MAP[e.toLowerCase()]},t.CSSStyle._isBorderWidthValue=function(e){var i=t.StringUtils.trim(e);return!!t.CSSStyle._NAMED_WIDTH_MAP[i]||!isNaN(parseFloat(i))},t.CSSStyle._parseBorderColorString=function(e,i){i=t.StringUtils.trim(i);for(var n=[];null!=i&&i.length>0;)i=t.CSSStyle.parseBorderColor(i,n);return n},t.CSSStyle.parseBorderColor=function(e,i){var n,o=(e=t.StringUtils.trim(e)).length,r=-1;if(!e)return e;if(0==e.indexOf("rgb"))r=e.indexOf(")")+1,n=e.slice(0,r);else{-1==(r=e.indexOf(" "))&&(r=o);var s=e.slice(0,r);(n=t.CSSStyle._toColorVal(s))||(n=t.CSSStyle._parseHexColor(s))}return n&&(i.push(n),e=e.slice(r)),e},t.CSSStyle._parseHexColor=function(t){var e,i;if(t&&t.length>0){var n=t.length>7;if(e=Number("0x"+t.substring(1)),isNaN(e)&&(e=0),n)i="#"+t.substring(3);else i=t}return i},t.CSSStyle.prototype._getSideWidth=function(e,i){var n=this.getStyle(e);return n||(n=this.getStyle(i)),t.CSSStyle.toNumber(n)},t.CSSStyle.prototype.getFontSize=function(){return this.getStyle(t.CSSStyle.FONT_SIZE)},t.CSSStyle.mergeStyles=function(e){var i=new t.CSSStyle;if(e)for(var n=0;n<e.length;n++)i.merge(e[n]);return i},t.CSSStyle.prototype.isEmpty=function(){for(var t in this._styleMap)return!1;return!0},t.CSSStyle.prototype.isTextAlignEnd=function(e){var i=this.getStyle(t.CSSStyle.TEXT_ALIGN);return"end"==i||(t.Agent.isRightToLeft(e)?"left"==i:"right"==i)},t.CSSStyle.prototype.parseBackgroundPosition=function(){var e=this.getStyle(t.CSSStyle.BACKGROUND_POSITION);if(!e)return null;var i=e.split(" ");if(0==i.length)return["0%","0%"];var n,o=["50%","50%"];return i.length>0&&("left"==(n=t.StringUtils.trim(i[0]))?o[0]="0%":"right"==n?o[0]="100%":"top"==n?o[1]="0%":"bottom"==n?o[1]="100%":"center"!=n&&(o[0]=n)),i.length>1&&("left"==(n=t.StringUtils.trim(i[1]))?o[0]="0%":"right"==n?o[0]="100%":"top"==n?o[1]="0%":"bottom"==n?o[1]="100%":"center"!=n&&(o[1]=n)),o},t.CSSStyle.prototype.getIconUrl=function(){return this.getStyle(t.CSSStyle.CONTENT)},t.CSSStyle.prototype.setIconUrl=function(e){this._setStyleAttr(t.CSSStyle.CONTENT,e)},t.CSSStyle.prototype.hashCodeForTextMeasurement=function(){for(var e="",i=t.CSSStyle.getTextMeasurementProperties(),n=0;n<i.length;n++){var o=this.getStyle(i[n]);o&&(e+=o)}return e},t.CSSStyle.getTextMeasurementProperties=function(){return[t.CSSStyle.FONT_FAMILY,t.CSSStyle.FONT_SIZE,t.CSSStyle.FONT_STYLE,t.CSSStyle.FONT_WEIGHT]},t.CSSStyle.afterSkinAlta=function(e){return null!=e&&e!=t.CSSStyle.SKIN_FUSION&&e!=t.CSSStyle.SKIN_SKYROS},t.CSSStyle.cssObjectToString=function(t){var e="";return t&&JSON.parse(JSON.stringify(t),function(t,i){t&&(t=t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),e+=t+":"+i+";")}),e},t.CSSStyle.cssStringToObject=function(e){var i={};return t.CSSStyle._parseStyleString(e,function(e,n){e=t.CSSStyle.cssStringToObjectProperty(e),i[e]=n}),i},t.CSSStyle.cssStringToObjectProperty=function(t){return t&&(t=t.replace(/-([a-z])/g,function(t){return t[1].toUpperCase()})),t},t.CSSStyle._parseStyleString=function(e,i){if(e&&e.length>0)for(var n=e.split(";"),o=0;o<n.length;o++){var r=n[o];if(r&&r.length>0){var s=r.indexOf(":");if(s>-1){var a=t.StringUtils.trim(r.substring(0,s)),l=t.StringUtils.trim(r.substring(s+1));a&&a.length>0&&l&&l.length>0&&(a==t.CSSStyle.BACKGROUND_IMAGE&&l.indexOf("data:image/")>=0&&(l=l+";"+n[o+1],o++),i(a,l))}}}},t.BaseComponent=function(){},t.Obj.createSubclass(t.BaseComponent,t.Container),t.BaseComponent.prototype.Init=function(e,i,n){t.BaseComponent.superclass.Init.call(this,e),this._callback=i,this._callbackObj=n,this.Defaults=null,this.Options=null,this.Width=0,this.Height=0,this.EventManager=null,this.Animation=null,this.AnimationStopped=!1,this._optionsCache=new t.BaseComponentCache,this._cache=new t.BaseComponentCache,this._SHARED_DEFS_DIV_ID="_dvtSharedDefs"},t.BaseComponent.prototype.GetDefaults=function(t){return this.Defaults?this.Defaults.getDefaults(t):{}},t.BaseComponent.prototype.GetComponentDescription=function(){return t.Bundle.getTranslation(this.getOptions(),"componentName")},t.BaseComponent.prototype.IsParentRoot=function(){return this.getParent()==this.getCtx().getStage()},t.BaseComponent.prototype.UpdateAriaAttributes=function(){this.IsParentRoot()&&(this.getCtx().setAriaRole("application"),this.getCtx().setAriaLabel(t.Bundle.getTranslatedString(t.Bundle.UTIL_PREFIX,"COLON_SEP_LIST",[t.Bundle.getTranslatedString(t.Bundle.UTIL_PREFIX,"DATA_VISUALIZATION"),t.StringUtils.processAriaLabel(this.GetComponentDescription())])))},t.BaseComponent.prototype.SetOptions=function(t){},t.BaseComponent.prototype.getOptions=function(){return this.Options||(this.Options=this.GetDefaults()),this.Options},t.BaseComponent.prototype.applyOptions=function(e,i){this.Options&&e&&this.SetOptions(t.JsonUtils.merge(e,this.Options,i))},t.BaseComponent.prototype.render=function(t,e,i){},t.BaseComponent.prototype.RenderComplete=function(){this.Animation=null,this.AnimationStopped=!1,this.getCtx().resetIsOffscreen(),this.dispatchEvent(t.EventFactory.newReadyEvent())},t.BaseComponent.prototype.getWidth=function(){return this.Width},t.BaseComponent.prototype.getHeight=function(){return this.Height},t.BaseComponent.prototype.highlight=function(t){},t.BaseComponent.prototype.select=function(t){},t.BaseComponent.prototype.dispatchEvent=function(e){t.EventDispatcher.dispatchEvent(this._callback,this._callbackObj,this,e)},t.BaseComponent.prototype.getDimensionsWithStroke=function(t){return this.getDimensions(t)},t.BaseComponent.prototype.getEventManager=function(){return this.EventManager},t.BaseComponent.prototype.getKeyboardFocus=function(){var t=this.getEventManager();return t&&t.getFocus()?t.getFocus().getTargetElem():null},t.BaseComponent.prototype.getCache=function(){return this._cache},t.BaseComponent.prototype.getOptionsCache=function(){return this._optionsCache},t.BaseComponent.prototype.StopAnimation=function(t){this.Animation&&(this.AnimationStopped=!0,this.Animation.stop(t||!1),this.Animation=null)},t.BaseComponent.prototype.appendSharedDefs=function(e){var i=document.getElementById(this._SHARED_DEFS_DIV_ID);if(!i){(i=document.createElement("div")).id=this._SHARED_DEFS_DIV_ID,i.style.visibility="hidden",i.style.width="0px",i.style.height="0px",i.style.left="0px",i.style.top="0px",i.style.position="absolute";var n=t.ToolkitUtils.createSvgDocument();t.ToolkitUtils.setAttrNullNS(n,"width","0px"),t.ToolkitUtils.setAttrNullNS(n,"height","0px");var o=t.SvgShapeUtils.createElement("defs");n.appendChild(o),i.appendChild(n),document.body.appendChild(i)}return(o=i.childNodes[0].childNodes[0]).appendChild(e),e},t.BaseComponent.prototype.destroy=function(){this.StopAnimation(),this.EventManager&&(this.EventManager.removeListeners(this),this.EventManager.destroy(),this.EventManager=null);var e=1===document.getElementsByClassName("oj-dvtbase").length,i=document.getElementById(this._SHARED_DEFS_DIV_ID);e&&i&&document.body.removeChild(i),t.BaseComponent.superclass.destroy.call(this)},t.BaseComponentDefaults=function(){this.Init()},t.Obj.createSubclass(t.BaseComponentDefaults,t.Obj),t.BaseComponentDefaults.FONT_SIZE="font-size: ",t.BaseComponentDefaults.FONT_SIZE_11=t.BaseComponentDefaults.FONT_SIZE+"11px;",t.BaseComponentDefaults.FONT_SIZE_12=t.BaseComponentDefaults.FONT_SIZE+"12px;",t.BaseComponentDefaults.FONT_SIZE_13=t.BaseComponentDefaults.FONT_SIZE+"13px;",t.BaseComponentDefaults.FONT_SIZE_14=t.BaseComponentDefaults.FONT_SIZE+"14px;",t.BaseComponentDefaults.FONT_WEIGHT_BOLD="font-weight: bold;",t.BaseComponentDefaults.FONT_FAMILY_SKYROS="font-family: tahoma, sans-serif;",t.BaseComponentDefaults.FONT_FAMILY_ALTA="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;",t.BaseComponentDefaults.FONT_FAMILY_ALTA_11=t.BaseComponentDefaults.FONT_FAMILY_ALTA+t.BaseComponentDefaults.FONT_SIZE_11,t.BaseComponentDefaults.FONT_FAMILY_ALTA_12=t.BaseComponentDefaults.FONT_FAMILY_ALTA+t.BaseComponentDefaults.FONT_SIZE_12,t.BaseComponentDefaults.FONT_FAMILY_ALTA_13=t.BaseComponentDefaults.FONT_FAMILY_ALTA+t.BaseComponentDefaults.FONT_SIZE_13,t.BaseComponentDefaults.FONT_FAMILY_ALTA_14=t.BaseComponentDefaults.FONT_FAMILY_ALTA+t.BaseComponentDefaults.FONT_SIZE_14,t.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD=t.BaseComponentDefaults.FONT_FAMILY_ALTA+t.BaseComponentDefaults.FONT_WEIGHT_BOLD,t.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD_11=t.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD+t.BaseComponentDefaults.FONT_SIZE_11,t.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD_12=t.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD+t.BaseComponentDefaults.FONT_SIZE_12,t.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD_13=t.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD+t.BaseComponentDefaults.FONT_SIZE_13,t.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD_14=t.BaseComponentDefaults.FONT_FAMILY_ALTA_BOLD+t.BaseComponentDefaults.FONT_SIZE_14,t.BaseComponentDefaults._SKINS=[t.CSSStyle.SKIN_FUSION,t.CSSStyle.SKIN_SKYROS,t.CSSStyle.SKIN_ALTA,t.CSSStyle.SKIN_NEXT],t.BaseComponentDefaults.prototype.Init=function(t){this._defaults=t||{},this.constructor.defaultsCache||(this.constructor.defaultsCache={})},t.BaseComponentDefaults.prototype.getBaseSkinName=function(){return t.CSSStyle.SKIN_NEXT},t.BaseComponentDefaults.prototype.calcOptions=function(e){var i=e?e.skin:null,n=this.getDefaults(i);if(!e)return n;var o=t.JsonUtils.merge(e,n,this.getNoCloneObject());return 0==this.getAnimationDuration(o)&&(o.animationOnDataChange="none",o.animationOnDisplay="none"),o},t.BaseComponentDefaults.prototype.getDefaults=function(e){if(e||(e=this.getBaseSkinName()),this.constructor.defaultsCache[e])return t.JsonUtils.clone(this.constructor.defaultsCache[e]);for(var i=Math.max(t.ArrayUtils.getIndex(t.BaseComponentDefaults._SKINS,e),0),n=t.JsonUtils.clone(this._defaults[t.BaseComponentDefaults._SKINS[0]]),o=1;o<=i;o++)n=t.JsonUtils.merge(this._defaults[t.BaseComponentDefaults._SKINS[o]],n);return this.constructor.defaultsCache[e]=t.JsonUtils.clone(n),n},t.BaseComponentDefaults.prototype.getNoCloneObject=function(){return{}},t.BaseComponentDefaults.prototype.getAnimationDuration=function(t){return t.styleDefaults?t.styleDefaults.animationDuration:null},t.BaseComponentCache=function(){this.Init()},t.BaseComponentCache.prototype.Init=function(){this.Cache={}},t.BaseComponentCache.prototype.clearCache=function(){this.Cache={}},t.BaseComponentCache.prototype.getFromCache=function(t){return this.Cache[t]},t.BaseComponentCache.prototype.putToCache=function(t,e){this.Cache[t]=e},t.BaseComponentCache.prototype.getFromCachedMap=function(t,e){return this._getCachedMap(t)[e]},t.BaseComponentCache.prototype._getCachedMap=function(t){var e=this.getFromCache(t);return e||(e={},this.putToCache(t,e)),e},t.BaseComponentCache.prototype.putToCachedMap=function(t,e,i){this._getCachedMap(t)[e]=i},t.BaseComponentCache.prototype.getFromCachedMap2D=function(t,e,i){return this._getCachedMap2D(t).get(e,i)},t.BaseComponentCache.prototype._getCachedMap2D=function(e){var i=this.getFromCache(e);return i||(i=new t.Map2D,this.putToCache(e,i)),i},t.BaseComponentCache.prototype.putToCachedMap2D=function(t,e,i,n){this._getCachedMap2D(t).put(e,i,n)},t.ShowPopupBehavior=function(t,e,i,n){this._popupId=t,this._triggerType=e,this._alignId=i,this._align=n},t.Obj.createSubclass(t.ShowPopupBehavior,t.Obj),t.ShowPopupBehavior.TRIGGER_TYPE_ACTION="action",t.ShowPopupBehavior.TRIGGER_TYPE_CLICK="click",t.ShowPopupBehavior.TRIGGER_TYPE_CONTEXT_MENU="contextMenu",t.ShowPopupBehavior.TRIGGER_TYPE_DBL_CLICK="dblClick",t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_HOVER="mouseHover",t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_OVER="mouseOver",t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_DOWN="mouseDown",t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_MOVE="mouseMove",t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_UP="mouseUp",t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_OUT="mouseOut",t.ShowPopupBehavior.TRIGGER_TYPE_KEY_DOWN="keyDown",t.ShowPopupBehavior.TRIGGER_TYPE_KEY_UP="keyUp",t.ShowPopupBehavior.TRIGGER_TYPE_KEY_PRESS="keyPress",t.ShowPopupBehavior.TRIGGER_TYPE_FOCUS="focus",t.ShowPopupBehavior.TRIGGER_TYPE_BLUR="blur",t.ShowPopupBehavior.ALIGN_AFTER_START="afterStart",t.ShowPopupBehavior.ALIGN_AFTER_END="afterEnd",t.ShowPopupBehavior.ALIGN_BEFORE_START="beforeStart",t.ShowPopupBehavior.ALIGN_BEFORE_END="beforeEnd",t.ShowPopupBehavior.ALIGN_END_AFTER="endAfter",t.ShowPopupBehavior.ALIGN_END_BEFORE="endBefore",t.ShowPopupBehavior.ALIGN_START_AFTER="startAfter",t.ShowPopupBehavior.ALIGN_START_BEFORE="startBefore",t.ShowPopupBehavior.ALIGN_OVERLAP="overlap",t.ShowPopupBehavior.createBehaviors=function(e){for(var i=[],n=0;n<e.length;n++){var o=e[n];i.push(t.ShowPopupBehavior.newInstance(o))}return i},t.ShowPopupBehavior.newInstance=function(e){return new t.ShowPopupBehavior(e.popupId,e.triggerType,e.alignId,e.align)},t.ShowPopupBehavior.prototype.getPopupId=function(){return this._popupId},t.ShowPopupBehavior.prototype.getTriggerType=function(){return this._triggerType},t.ShowPopupBehavior.prototype.getAlignId=function(){return this._alignId},t.ShowPopupBehavior.prototype.getAlign=function(){return this._align},t.ClientBehavior=function(t,e){this._type=t,this._triggerType=e,this._props={}},t.Obj.createSubclass(t.ClientBehavior,t.Obj),t.ClientBehavior.TRIGGER_TYPE_ACTION="action",t.ClientBehavior.TRIGGER_TYPE_CLICK="click",t.ClientBehavior.TYPE_ROW_DISCLOSURE="DvtRowDisclosureBehavior",t.ClientBehavior.TYPE_DRILL="DvtDrillBehavior",t.ClientBehavior.TYPE_ISOLATE_LEVELS="DvtIsolateLevelsBehavior",t.ClientBehavior.TYPE_RESTORE="DvtRestoreBehavior",t.ClientBehavior.prototype.getType=function(){return this._type},t.ClientBehavior.prototype.getTriggerType=function(){return this._triggerType},t.ClientBehavior.prototype.setProperty=function(t,e){this._props[t]=e},t.ClientBehavior.prototype.getProperty=function(t){return this._props[t]},t.ClientBehavior.prototype.getProperties=function(){return this._props},t.SimpleScrollbar=function(e,i,n,o){t.SimpleScrollbar.superclass.Init.call(this,e),this._callback=i,this._callbackObj=n,this._dragTarget=o},t.Obj.createSubclass(t.SimpleScrollbar,t.Container),t.SimpleScrollbar._THUMB_MIN_SIZE=12,t.SimpleScrollbar.prototype.render=function(e,i,n){this._width=i,this._height=n,this._globalMin=e.min,this._globalMax=e.max,this._isHoriz=e.isHorizontal,this._isReversed=e.isReversed;var o=new t.Rect(this.getCtx(),0,0,i,n);o.setSolidFill(e.backgroundColor),o.setPixelHinting(!0),this.addChild(o),this._thumb=new t.Rect(this.getCtx(),0,0,i,n),this._thumb.setSolidFill(e.color),this._thumb.setPixelHinting(!0),this.addChild(this._thumb),this._thumbMin=this._globalMin,this._thumbMax=this._globalMax,this._renderedThumbMin=this._thumbMin,this._renderedThumbMax=this._thumbMax;var r=t.Agent.isTouchDevice()?8:4,s=new t.Rect(this.getCtx(),-r,-r,this._width+2*r,this._height+2*r);s.setInvisibleFill(),this.addChild(s);var a=null!=this._dragTarget;t.SvgDocumentUtils.addDragListeners(a?this._dragTarget:this,this._onDragStart,this._onDragMove,this._onDragEnd,this,!a),t.Agent.isTouchDevice()||a||this.addEvtListener(t.MouseEvent.CLICK,this._onClick,!1,this),this._dragged=!1},t.SimpleScrollbar.prototype.setViewportRange=function(e,i,n,o){null!=n&&(this._globalMin=n),null!=o&&(this._globalMax=o),this._thumbMin=e,this._thumbMax=i;var r=i-e,s=this._globalMax-this._globalMin,a=Math.min(t.SimpleScrollbar._THUMB_MIN_SIZE/(this._isHoriz?this._width:this._height)*s,s);r<a&&(i+=(a-r)/2,(e-=(a-r)/2)<this._globalMin&&(e=this._globalMin,i=this._globalMin+a),i>this._globalMax&&(i=this._globalMax,e=this._globalMax-a)),this._renderedThumbMin=e,this._renderedThumbMax=i;var l=this._getCoord(e),h=this._getCoord(i);this._isHoriz?(this._thumb.setX(Math.min(l,h)),this._thumb.setWidth(Math.abs(h-l))):(this._thumb.setY(Math.min(l,h)),this._thumb.setHeight(Math.abs(h-l)))},t.SimpleScrollbar.prototype._getCoord=function(t){var e=(t-this._globalMin)/(this._globalMax-this._globalMin);return this._isReversed&&(e=1-e),this._isHoriz?e*this._width:e*this._height},t.SimpleScrollbar.prototype._getValue=function(t,e){var i=this.stageToLocal(this.getCtx().pageToStageCoords(t,e)),n=this._isHoriz?i.x/this._width:i.y/this._height;return this._isReversed&&(n=1-n),n=Math.min(Math.max(n,0),1),this._globalMin+n*(this._globalMax-this._globalMin)},t.SimpleScrollbar.prototype._onClick=function(e){var i=this._getValue(e.pageX,e.pageY);if(!(i>=this._renderedThumbMin&&i<=this._renderedThumbMax)){var n=this._thumbMax-this._thumbMin;this._setViewportRange(i-n/2,i+n/2,t.SimpleScrollbarEvent.SUBTYPE_END)}},t.SimpleScrollbar.prototype._onDragStart=function(t){var e;if(t.touches){if(1!=t.touches.length)return!1;e=this._getValue(t.touches[0].pageX,t.touches[0].pageY)}else e=this._getValue(t.pageX,t.pageY);return!!(this._dragTarget||e>=this._renderedThumbMin&&e<=this._renderedThumbMax)&&(this._prevVal=Math.min(Math.max(e,this._thumbMin),this._thumbMax),this._dragged=!0,!0)},t.SimpleScrollbar.prototype._onDragMove=function(e){if(this._dragged){var i;if(e.touches){if(1!=e.touches.length)return;i=this._getValue(e.touches[0].pageX,e.touches[0].pageY)}else i=this._getValue(e.pageX,e.pageY);var n=i-this._prevVal;this._dragTarget&&(n*=-1),this._setViewportRange(this._thumbMin+n,this._thumbMax+n,t.SimpleScrollbarEvent.SUBTYPE_MOVE),this._prevVal=i,e.preventDefault()}},t.SimpleScrollbar.prototype._onDragEnd=function(e){if(this._dragged){if(e.touches)this._setViewportRange(this._thumbMin,this._thumbMax,t.SimpleScrollbarEvent.SUBTYPE_END);else{var i=this._getValue(e.pageX,e.pageY)-this._prevVal;this._setViewportRange(this._thumbMin+i,this._thumbMax+i,t.SimpleScrollbarEvent.SUBTYPE_END)}this._dragged=!1}},t.SimpleScrollbar.prototype._setViewportRange=function(e,i,n){var o=i-e;if(e<this._globalMin&&(e=this._globalMin,i=this._globalMin+o),i>this._globalMax&&(i=this._globalMax,e=this._globalMax-o),this.setViewportRange(e,i),this._callback){var r=new t.SimpleScrollbarEvent(n,e,i);this._callback.call(this._callbackObj,r,this)}},t.SimpleScrollableContainer=function(e,i,n,o){t.SimpleScrollableContainer.superclass.Init.call(this,e),this._contentSize=o?i:n,this._width=i,this._height=n,this._background=new t.Rect(e,0,0,i,n),this._background.setInvisibleFill(),this.addChild(this._background),this._container=new t.Container(e),this.addChild(this._container),this._isHorizontalScrolling=o,this._isScrollbarVisible=!1,t.Agent.isTouchDevice()||this.addEvtListener(t.MouseEvent.MOUSEWHEEL,this._onMouseWheel,!1,this)},t.Obj.createSubclass(t.SimpleScrollableContainer,t.Container),t.SimpleScrollableContainer._SCROLLBAR_WIDTH=3,t.SimpleScrollableContainer._SCROLLBAR_GAP=2,t.SimpleScrollableContainer.prototype.getScrollingPane=function(){return this._container},t.SimpleScrollableContainer.prototype.prepareContentPane=function(){var e=this._container.getDimensions();if(this._isHorizontalScrolling?this._contentSize=e.w+e.x:this._contentSize=e.h+e.y,this.hasScrollingContent()){if(this._isHorizontalScrolling?this._contentSize+=e.x:this._contentSize+=e.y,!this._maskContainer){var i=new t.Rectangle(0,0,this._width,this._height);this._fadeTop=new t.Mask(new t.LinearGradientFill(this._isHorizontalScrolling?0:270,["#FFFFFF","#FFFFFF"],[0,1],[0,.1]),i),this._fadeBottom=new t.Mask(new t.LinearGradientFill(this._isHorizontalScrolling?180:90,["#FFFFFF","#FFFFFF"],[0,1],[0,.1]),i),this._fadeTopBottom=new t.Mask(new t.LinearGradientFill(this._isHorizontalScrolling?180:90,["#FFFFFF","#FFFFFF","#FFFFFF","#FFFFFF"],[0,1,1,0],[0,.1,.9,1]),i),this._maskContainer=new t.Container(this.getCtx()),this.addChild(this._maskContainer);var n=new t.ClipPath;n.addRect(0,0,this._width,this._height),this._container.setClipPath(n),this._maskContainer.addChild(this._container),this._scrollbar=new t.SimpleScrollbar(this.getCtx(),this._handleScrollbar,this,this),this._scrollbarTimer=new t.Timer(this.getCtx(),100,this._hideScrollbar,this)}this._maskContainer.setMask(this._fadeBottom);var o={color:"#9E9E9E",backgroundColor:"#F0F0F0",isHorizontal:this._isHorizontalScrolling,isReversed:!1,min:0,max:this._contentSize};this._isHorizontalScrolling?(this._scrollbar.render(o,this._getScrollbarWidth(),t.SimpleScrollableContainer._SCROLLBAR_WIDTH),this._scrollbar.setTranslate(t.SimpleScrollableContainer._SCROLLBAR_GAP,this._height-(t.SimpleScrollableContainer._SCROLLBAR_WIDTH+t.SimpleScrollableContainer._SCROLLBAR_GAP))):(this._scrollbar.render(o,t.SimpleScrollableContainer._SCROLLBAR_WIDTH,this._getScrollbarWidth()),this._scrollbar.setTranslate(t.Agent.isRightToLeft(this.getCtx())?t.SimpleScrollableContainer._SCROLLBAR_GAP:this._width-(t.SimpleScrollableContainer._SCROLLBAR_WIDTH+t.SimpleScrollableContainer._SCROLLBAR_GAP),t.SimpleScrollableContainer._SCROLLBAR_GAP)),this._scrollbar.setViewportRange(0,this._getAvailSize()),t.Agent.isEnvironmentTest()||this._scrollbar.setAlpha(0),this.addChild(this._scrollbar)}else this.addChild(this._container),this.removeChild(this._maskContainer),this.removeChild(this._scrollbar)},t.SimpleScrollableContainer.prototype._getScrollbarWidth=function(){return(this._isHorizontalScrolling?this._width:this._height)-2*t.SimpleScrollableContainer._SCROLLBAR_GAP},t.SimpleScrollableContainer.prototype._getAvailSize=function(){return this._isHorizontalScrolling?this._width:this._height},t.SimpleScrollableContainer.prototype._hideScrollbar=function(e){this._isScrollbarVisible&&(this._isScrollbarVisible=!1,this._scrollbarTimer.reset(),this._fadeOutAnim=new t.AnimFadeOut(this.getCtx(),this._scrollbar,.2),this._fadeOutAnim.play())},t.SimpleScrollableContainer.prototype._showScrollbar=function(t){this._isScrollbarVisible?(this._scrollbarTimer.reset(),this._scrollbarTimer.start()):(this._fadeOutAnim&&(this._fadeOutAnim.stop(!0),this._fadeOutAnim=null),this._scrollbar.setAlpha(1),this._isScrollbarVisible=!0,this._scrollbarTimer.start())},t.SimpleScrollableContainer.prototype._updateFade=function(t){0==t?this._maskContainer.setMask(this._fadeBottom):t+this._getAvailSize()>=this._contentSize?this._maskContainer.setMask(this._fadeTop):this._maskContainer.setMask(this._fadeTopBottom)},t.SimpleScrollableContainer.prototype._onMouseWheel=function(t){if(this.hasScrollingContent()){this._showScrollbar();var e=null!=t.wheelDelta?t.wheelDelta:0,i=-1*(this._isHorizontalScrolling?this._container.getTranslateX():this._container.getTranslateY())-4*e,n=Math.max(this._contentSize-this._getAvailSize(),0),o=Math.max(Math.min(i,n),0);this._isHorizontalScrolling?(this._container.setTranslateX(-1*o),this._scrollbar.setViewportRange(o+this._width,o)):(this._container.setTranslateY(-1*o),this._scrollbar.setViewportRange(o,o+this._height)),this._updateFade(o),t.preventDefault()}},t.SimpleScrollableContainer.prototype._handleScrollbar=function(t){this._showScrollbar(),this._isHorizontalScrolling?this._container.setTranslateX(-1*t.getNewMin()):this._container.setTranslateY(-1*t.getNewMin()),this._updateFade(t.getNewMin())},t.SimpleScrollableContainer.prototype.getWidth=function(){return this._width},t.SimpleScrollableContainer.prototype.getHeight=function(){return this._height},t.SimpleScrollableContainer.prototype.scrollIntoView=function(t){if(this.hasScrollingContent()){var e,i=t.getDimensions(t.getParent()),n=this._container.getDimensions();if(this._isHorizontalScrolling){var o=-1*this._container.getTranslateX(),r=i.x-n.x,s=i.x+i.w-this._width+n.x;o<s?(this._container.setTranslateX(-1*s),this._scrollbar.setViewportRange(s+this._width,s),e=s):o>r&&(this._container.setTranslateX(-1*r),this._scrollbar.setViewportRange(r+this._width,r),e=r)}else{var a=-1*this._container.getTranslateY(),l=i.y-n.y,h=i.y+i.h-this._height+n.y;a<h?(this._container.setTranslateY(-1*h),this._scrollbar.setViewportRange(h,h+this._height),e=h):a>l&&(this._container.setTranslateY(-1*l),this._scrollbar.setViewportRange(l,l+this._height),e=l)}null!=e&&this._updateFade(e)}},t.SimpleScrollableContainer.prototype.hasScrollingContent=function(){return this._contentSize>this._getAvailSize()},t.DragRecognizer=function(){},t.Obj.createSubclass(t.DragRecognizer,t.Obj),t.DragRecognizer.prototype.prepDrag=function(){},t.DragRecognizer.prototype.abortPrep=function(){},t.DragRecognizer.prototype.recognizeDrag=function(){return!0},t.DragSource=function(t){this.Init(t)},t.Obj.createSubclass(t.DragSource,t.Obj),t.DragSource.DRAG_FEEDBACK_MARGIN=2,t.DragSource.prototype.Init=function(t){this._context=t,this._dragCandidate=null,this._dragObj=null,this._dragCoords=null},t.DragSource.prototype.getDragCandidate=function(){return this._dragCandidate},t.DragSource.prototype.setDragCandidate=function(t){t&&t.isDragAvailable&&t.getDragTransferable?this._dragCandidate=t:this._dragCandidate=null},t.DragSource.prototype.isDragAvailable=function(t){return null!=this._dragCandidate?this._dragCandidate.isDragAvailable(t):null},t.DragSource.prototype.getDragTransferable=function(t,e){return this._dragCandidate?(this._dragObj=this._dragCandidate,this._dragCoords={x:t,y:e},this._dragCandidate.getDragTransferable(t,e)):null},t.DragSource.prototype.getDragOverFeedback=function(t,e){this._context.getTooltipManager().hideTooltip();var i=this.getDragObject();return i&&i.getDragFeedback?i.getDragFeedback(t,e):null},t.DragSource.prototype.getDragContext=function(t,e){return this._dragObj&&this._dragObj.getDragContext?this._dragObj.getDragContext(t,e):null},t.DragSource.prototype.getDragObject=function(){return this._dragObj},t.DragSource.prototype.getDragCoords=function(){return this._dragCoords},t.DragSource.prototype.getDragOffset=function(e,i){var n={},o=this.getDragOverFeedback(e,i);if(o){var r=t.DragAndDropUtils.getDragFeedbackBounds(o,this._context.getStage()),s=this.getDragObject();s&&s.afterDragOverFeedback&&s.afterDragOverFeedback(o),r&&(n.x=e-r.x,n.y=i-r.y,n.x+=t.DragSource.DRAG_FEEDBACK_MARGIN,n.y+=t.DragSource.DRAG_FEEDBACK_MARGIN)}else n.x=0,n.y=0;return n},t.DragSource.prototype.getPointerOffset=function(t,e){return{x:0,y:0}},t.DragSource.prototype.initiateDrag=function(){var e=this.getTouchManager();t.Agent.isTouchDevice()&&e&&e.cancelTouchHold()},t.DragSource.prototype.dragDropEnd=function(){this._dragCandidate=null,this._dragObj=null,this._dragCoords=null},t.DragSource.prototype.setTouchManager=function(t){this._touchManager=t},t.DragSource.prototype.getTouchManager=function(){return this._touchManager},t.DropTarget=function(){},t.Obj.createSubclass(t.DropTarget,t.Obj),t.DropTarget.prototype.acceptDrag=function(t,e,i,n){return null},t.DropTarget.prototype.dragEnter=function(){},t.DropTarget.prototype.dragExit=function(){},t.DropTarget.prototype.getDropSite=function(t,e){return null},t.Button=function(t,e,i,n,o,r,s,a){this.Init(t,e,i,n,o,r,s,a)},t.Obj.createSubclass(t.Button,t.Container),t.Button.STATE_ENABLED=0,t.Button.STATE_OVER=1,t.Button.STATE_DOWN=2,t.Button.STATE_DISABLED=3,t.Button.NO_EVENT_LISTENERS=!0,t.Button.prototype.Init=function(e,i,n,o,r,s,a,l){t.Button.superclass.Init.call(this,e,null,s),this.setCallback(a,l),this._bDuringInit=!0,this.setUpState(i),this.setOverState(n),this.setDownState(o),r&&this.setDisabledState(r),this.setEnabled(!0),this.drawUpState(),this._tooltip=null,this._bToggleEnabled=!1,this._bToggled=!1,this._bDuringInit=!1},t.Button.prototype.isEnabled=function(){return this._enabled},t.Button.prototype.setEnabled=function(e){if(this._enabled!=e){this._enabled=e;var i=t.Agent.isTouchDevice()?t.TouchEvent.TOUCHSTART:t.MouseEvent.CLICK;e?(this.addEvtListener(t.MouseEvent.MOUSEOVER,this.OnMouseOver,!1,this),this.addEvtListener(t.MouseEvent.MOUSEOUT,this.OnMouseOut,!1,this),this.addEvtListener(t.MouseEvent.MOUSEDOWN,this.OnMouseDown,!1,this),this.addEvtListener(t.MouseEvent.MOUSEUP,this.OnMouseUp,!1,this),this.addEvtListener(i,this.OnClick,!1,this),this.setCursor(t.SelectionEffectUtils.getSelectingCursor())):(this.removeEvtListener(t.MouseEvent.MOUSEOVER,this.OnMouseOver,!1,this),this.removeEvtListener(t.MouseEvent.MOUSEOUT,this.OnMouseOut,!1,this),this.removeEvtListener(t.MouseEvent.MOUSEDOWN,this.OnMouseDown,!1,this),this.removeEvtListener(t.MouseEvent.MOUSEUP,this.OnMouseUp,!1,this),this.removeEvtListener(i,this.OnClick,!1,this),this.setCursor(null)),this.initState()}},t.Button.prototype.OnMouseOver=function(t){this._bToggled?this.drawOverDownState():this.drawOverState()},t.Button.prototype.OnMouseOut=function(t){this._bToggled?this.drawDownState():this.drawUpState()},t.Button.prototype.OnMouseDown=function(t){this.drawDownState()},t.Button.prototype.OnMouseUp=function(e){this._bToggled?t.Agent.isTouchDevice()?this.drawDownState():this.drawOverDownState():t.Agent.isTouchDevice()?this.drawUpState():this.drawOverState()},t.Button.prototype.OnClick=function(e){this._bToggleEnabled&&(this._bToggled=!this._bToggled,this._bToggled?t.Agent.isTouchDevice()?this.drawDownState():this.drawOverDownState():t.Agent.isTouchDevice()?this.drawUpState():this.drawOverState()),this._callback&&(this._callback.call(this._callbackObj,e,this),e.stopPropagation(),e.preventDefault())},t.Button.prototype.drawUpState=function(){this._enableButton(this.upState,!0),this._enableButton(this.downState,!1),this._enableButton(this.overState,!1),this._enableButton(this.disabledState,!1),this._enableButton(this.overDownState,!1)},t.Button.prototype.drawOverState=function(){this._enableButton(this.upState,!1),this._enableButton(this.downState,!1),this._enableButton(this.overState,!0),this._enableButton(this.disabledState,!1),this._enableButton(this.overDownState,!1)},t.Button.prototype.drawDownState=function(){this._enableButton(this.upState,!1),this._enableButton(this.downState,!0),this._enableButton(this.overState,!1),this._enableButton(this.disabledState,!1),this._enableButton(this.overDownState,!1)},t.Button.prototype.drawDisabledState=function(){this._enableButton(this.upState,!1),this._enableButton(this.overState,!1),this._enableButton(this.downState,!1),this._enableButton(this.disabledState,!0),this._enableButton(this.overDownState,!1)},t.Button.prototype.drawOverDownState=function(){this.overDownState?(this._enableButton(this.upState,!1),this._enableButton(this.overState,!1),this._enableButton(this.downState,!1),this._enableButton(this.disabledState,!1),this._enableButton(this.overDownState,!0)):this.drawDownState()},t.Button.prototype._enableButton=function(t,e){t&&t.setAlpha(e?1:0)},t.Button.prototype._enableMouseEvents=function(t,e){t.setMouseEnabled&&t.setMouseEnabled(e);for(var i=t.firstChild;null!=i;)this._enableMouseEvents(i,e),i=i.nextSibling},t.Button.prototype.setUpState=function(t){if(!this.upState||this.upState!=t){var e=!1;if(this.upState)e=this._isButtonEnabled(this.upState),this.removeChild(this.upState);else if(!this._bDuringInit){var i=!1,n=!1,o=!1;this.downState&&(i=this._isButtonEnabled(this.downState)),this.overState&&(n=this._isButtonEnabled(this.overState)),this.disabledState&&(o=this._isButtonEnabled(this.disabledState)),i||n||o||(e=!0)}t&&this.addChild(t),this.upState=t,this._enableButton(this.upState,e)}},t.Button.prototype.setDownState=function(t){if(!this.downState||this.downState!=t){var e=!1;this.downState&&(e=this._isButtonEnabled(this.downState),this.removeChild(this.downState)),t&&this.addChild(t),this.downState=t,this._enableButton(this.downState,e)}},t.Button.prototype.setOverState=function(t){if(!this.overState||this.overState!=t){var e=!1;this.overState&&(e=this._isButtonEnabled(this.overState),this.removeChild(this.overState)),t&&this.addChild(t),this.overState=t,this._enableButton(this.overState,e)}},t.Button.prototype.setDisabledState=function(t){if(!this.disabledState||this.disabledState==t){var e=!1;this.disabledState&&(e=this._isButtonEnabled(this.disabledState),this.removeChild(this.disabledState)),t&&this.addChild(t),this.disabledState=t,this._enableButton(this.disabledState,e)}},t.Button.prototype.setOverDownState=function(t){if(!this.overDownState||this.overDownState==t){var e=!1;this.overDownState&&(e=this._isButtonEnabled(this.overDownState),this.removeChild(this.overDownState)),t&&this.addChild(t),this.overDownState=t,this._enableButton(this.overDownState,e)}},t.Button.prototype.setCallback=function(t,e){this._callback=t,this._callbackObj=e},t.Button.prototype.setTooltip=function(t){this._tooltip=t,t&&(this.setAriaRole("button"),this.setAriaProperty("label",t))},t.Button.prototype.getTooltip=function(){return this._tooltip},t.Button.prototype.isClickEventPropagationStopped=function(){return!0},t.Button.prototype.initState=function(){this.isEnabled()?this.drawUpState():this.drawDisabledState()},t.Button.prototype.setSize=function(t,e){var i=this.upState;i&&(i.setWidth&&t&&i.setWidth(t),i.setHeight&&e&&i.setHeight(e));var n=this.downState;n&&(n.setWidth&&t&&n.setWidth(t),n.setHeight&&e&&n.setHeight(e));var o=this.overState;o&&(o.setWidth&&t&&o.setWidth(t),o.setHeight&&e&&o.setHeight(e));var r=this.disabledState;r&&(r.setWidth&&t&&r.setWidth(t),r.setHeight&&e&&r.setHeight(e))},t.Button.prototype.rightAlign=function(t,e,i){var n=t-e,o=this.upState;o&&t&&(i?o.setTranslateX(n):this._setChildX(o,n));var r=this.downState;r&&t&&(i?r.setTranslateX(n):this._setChildX(r,n));var s=this.overState;s&&t&&(i?s.setTranslateX(n):this._setChildX(s,n));var a=this.disabledState;a&&(i?a.setTranslateX(n):this._setChildX(a,n))},t.Button.prototype._setChildX=function(e,i){for(var n=0;n<e.getNumChildren();n++){var o=e.getChildAt(n);o instanceof t.Displayable&&o.setTranslateX(i)}},t.Button.prototype.setToggleEnabled=function(t){this._bToggleEnabled=t},t.Button.prototype.isToggleEnabled=function(){return this._bToggleEnabled},t.Button.prototype.setToggled=function(t){this._bToggleEnabled&&(this._bToggled=t,this._bToggled?this.drawDownState():this.drawUpState())},t.Button.prototype.isToggled=function(){return this._bToggled},t.Button.prototype._isButtonEnabled=function(t){var e=!1;return t&&(e=t.getAlpha()>0),e},t.Button.prototype.getUpState=function(){return this.upState},t.Button.prototype.getDownState=function(){return this.downState},t.Button.prototype.getOverState=function(){return this.overState},t.Button.prototype.showKeyboardFocusEffect=function(){this._keyboardFocusEffect||(this._keyboardFocusEffect=this.CreateKeyboardFocusEffect()),this._keyboardFocusEffect.show(),this._isShowingKeyboardFocusEffect=!0,this.getCtx().setActiveElement(this)},t.Button.prototype.hideKeyboardFocusEffect=function(){this._keyboardFocusEffect&&this._keyboardFocusEffect.hide(),this._isShowingKeyboardFocusEffect=!1},t.Button.prototype.isShowingKeyboardFocusEffect=function(){return this._isShowingKeyboardFocusEffect},t.Button.prototype.CreateKeyboardFocusEffect=function(){return new t.KeyboardFocusEffect(this.getCtx(),this,this.getDimensions(),null,null,!0)},t.Button.prototype.handleKeyboardEvent=function(e){var i=e.keyCode;i!=t.KeyboardEvent.ENTER&&i!=t.KeyboardEvent.SPACE||this._callback&&(this._callback.call(this._callbackObj,e,this),e.stopPropagation(),e.preventDefault())},t.TransientButton=function(t,e,i,n,o,r,s){this.Init(t,e,i,n,o,r,s)},t.Obj.createSubclass(t.TransientButton,t.Button),t.TransientButton._DEFAULT_RADIUS=15.5,t.TransientButton.prototype.Init=function(e,i,n,o,r,s,a){t.TransientButton.superclass.Init.call(this,e,i,n,o,r,null,a,s);var l=e.getStage();l.addEvtListener(f.FOCUS,this._onFocus,!0,this),l.addEvtListener(f.BLUR,this._onBlur,!0,this),t.Agent.isTouchDevice()||(t.Agent.isPlatformIE()?(l.addEvtListener("mouseenter",this._onMouseOver,!1,this),l.addEvtListener("mouseleave",this._onMouseOut,!1,this)):(l.addEvtListener(t.MouseEvent.MOUSEOVER,this._onMouseOver,!1,this),l.addEvtListener(t.MouseEvent.MOUSEOUT,this._onMouseOut,!1,this)))},t.TransientButton.getStateFromURL=function(e,i,n,o,r,s){var a=t.TransientButton._DEFAULT_RADIUS,l=a/2,h=new t.Circle(e,a,a,a);h.setSolidFill(r),h.setSolidStroke(s);var u=new t.Image(e,i,l,l,n,o);return h.addChild(u),h},t.TransientButton.prototype.show=function(){this.setAlpha(1)},t.TransientButton.prototype.hide=function(){this.setAlpha(0)},t.TransientButton.prototype._onFocus=function(t){this._isFocused=!0,this.show()},t.TransientButton.prototype._onBlur=function(t){this._isFocused=!1,this._isMouseOver||this.hide()},t.TransientButton.prototype._onMouseOver=function(t){this._mouseOutTimer&&this._mouseOutTimer.isRunning()&&this._mouseOutTimer.stop(),this._isMouseOver=!0,this.show()},t.TransientButton.prototype._onMouseOut=function(e){this._mouseOutTimer||(this._mouseOutTimer=new t.Timer(this.getCtx(),10,this._onMouseOutTimerEnd,this,1)),this._mouseOutTimer.reset(),this._mouseOutTimer.start()},t.TransientButton.prototype._onMouseOutTimerEnd=function(){this._isMouseOver=!1,this._isFocused||this.hide()},t.TransientButton.prototype.OnMouseDown=function(e){t.TransientButton.superclass.OnMouseDown.call(this,e),e.stopPropagation()},t.TransientButton.prototype.OnMouseUp=function(e){t.TransientButton.superclass.OnMouseUp.call(this,e),e.stopPropagation()};var A=function(){};t.Obj.createSubclass(A,t.Obj),A.prototype.getDisplayables=function(){},A.prototype.getAriaLabel=function(){};var O=function(){};t.Obj.createSubclass(O,t.Obj),O.prototype.getTooltip=function(t,e,i){},O.prototype.getDatatip=function(t,e,i){},O.prototype.getDatatipColor=function(){};var b=function(){};t.Obj.createSubclass(b,t.Obj),b.prototype.isSelectable=function(){},b.prototype.isSelected=function(){},b.prototype.setSelected=function(t,e){},b.prototype.showHoverEffect=function(){},b.prototype.hideHoverEffect=function(){};var I=function(){};I.prototype.handleKeyboardEvent=function(t){},I.prototype.hideKeyboardFocusEffect=function(){};var P=function(){};t.Obj.createSubclass(P,t.Obj),P.prototype.getNextNavigable=function(t){},P.prototype.getTargetElem=function(){},P.prototype.getKeyboardBoundingBox=function(t){},P.prototype.showKeyboardFocusEffect=function(){},P.prototype.hideKeyboardFocusEffect=function(){},P.prototype.isShowingKeyboardFocusEffect=function(){},P.prototype.getContextMenuLocation=function(){},P.prototype.getKeyboardTooltipLocation=function(){};var M=function(){};t.Obj.createSubclass(M,t.Obj),M.prototype.getCategories=function(){},M.prototype.highlight=function(t,e){};var D=function(){};t.Obj.createSubclass(D,t.Obj),D.prototype.getContextMenuLocation=function(){};var R=function(){};t.Obj.createSubclass(R,t.Obj),R.prototype.getId=function(){},R.prototype.getShowPopupBehaviors=function(){},t.Automation=function(t){},t.Obj.createSubclass(t.Automation,t.Obj),t.Automation.TOOLTIP_SUBID="tooltip",t.Automation.prototype.getSubIdForDomElement=function(e){var i=t.Automation._findDisplayable(e);return!i||i instanceof Array?e&&this.IsTooltipElement(e)?t.Automation.TOOLTIP_SUBID:null:this.GetSubIdForDomElement(i)},t.Automation.prototype.GetSubIdForDomElement=function(t){return null},t.Automation.prototype.getDomElementForSubId=function(t){return null},t.Automation._findDisplayable=function(t){for(;t;){if(t._obj)return t._obj;t=t.parentNode}return null},t.Automation.prototype.GetTooltipElement=function(t,e){if(t){var i=t.getCtx().getTooltipManager(e).getTooltipElem();return"hidden"==i.style.visibility?null:i}return null},t.Automation.prototype.IsTooltipElement=function(e){var i=e.getAttribute("id");return!(!i||0!=i.indexOf(t.HtmlTooltipManager._TOOLTIP_DIV_ID))},t.CustomDatatipPeer=function(t,e,i,n){this.Init(t,e,i,n)},t.Obj.createSubclass(t.CustomDatatipPeer,t.Obj),t.CustomDatatipPeer.prototype.Init=function(t,e,i,n){this._tooltipManager=t,this._tooltipFunc=e,this._datatipColor=i,this._dataContext=n},t.CustomDatatipPeer.prototype.getDatatip=function(t){return this._tooltipManager.getCustomTooltip(this._tooltipFunc,this._dataContext)},t.CustomDatatipPeer.prototype.getDatatipColor=function(t){return this._datatipColor},t.SimpleObjPeer=function(t,e,i,n){this.Init(t,e,i,n)},t.Obj.createSubclass(t.SimpleObjPeer,t.Obj),t.SimpleObjPeer.prototype.Init=function(t,e,i,n){this._tooltip=t,this._datatip=e,this._datatipColor=i,this._params=n},t.SimpleObjPeer.prototype.setTooltip=function(t){this._tooltip=t},t.SimpleObjPeer.prototype.setDatatip=function(t){this._datatip=t},t.SimpleObjPeer.prototype.setDatatipColor=function(t){this._datatipColor=t},t.SimpleObjPeer.prototype.getParams=function(){return this._params},t.SimpleObjPeer.prototype.getTooltip=function(t){return this._tooltip},t.SimpleObjPeer.prototype.getDatatip=function(t){return this._datatip},t.SimpleObjPeer.prototype.getDatatipColor=function(t){return this._datatipColor},t.Agent=function(){},t.Obj.createSubclass(t.Agent,t.Obj),t.Agent.UNKNOWN_VERSION=-1,t.Agent.IE_PLATFORM="ie",t.Agent.GECKO_PLATFORM="gecko",t.Agent.WEBKIT_PLATFORM="webkit",t.Agent.UNKNOWN_PLATFORM="unknown",t.Agent.WINDOWS_OS="Windows",t.Agent.SOLARIS_OS="Solaris",t.Agent.MAC_OS="Mac",t.Agent.UNKNOWN_OS="Unknown",t.Agent.FOCUS_COLOR_DEFAULT="#0645AD",t.Agent.FOCUS_COLOR_IE="#090909",t.Agent.deferAriaCreation=function(){return!t.Agent.isTouchDevice()&&!t.Agent.isEnvironmentTest()},t.Agent.getDevicePixelRatio=function(){return t.Agent._initialize(),t.Agent._devicePixelRatio},t.Agent.getElementPosition=function(e){return t.Agent.isPlatformIE()?t.Agent._getElementPositionIE(e):t.Agent._getElementPositionDefault(e)},t.Agent.getPlatform=function(){return t.Agent._initialize(),t.Agent._platform},t.Agent.getOS=function(){return t.Agent._initialize(),t.Agent._os},t.Agent.getVersion=function(){return t.Agent._initialize(),t.Agent._version},t.Agent.isBrowserChrome=function(){return t.Agent._initialize(),t.Agent._bChrome},t.Agent.isBrowserSafari=function(){return t.Agent.isPlatformWebkit()&&!t.Agent.isBrowserChrome()},t.Agent.isPlatformGecko=function(){return t.Agent.getPlatform()==t.Agent.GECKO_PLATFORM},t.Agent.isPlatformIE=function(){return t.Agent.getPlatform()==t.Agent.IE_PLATFORM},t.Agent.isPlatformWebkit=function(){return t.Agent.getPlatform()==t.Agent.WEBKIT_PLATFORM},t.Agent.isRightToLeft=function(e){return t.Agent._initialize(),e&&null!=e.getReadingDirection()?"rtl"==e.getReadingDirection():t.Agent._bRtl},t.Agent.isTouchDevice=function(){return t.Agent._initialize(),t.Agent._bTouchDevice},t.Agent.setEnvironment=function(e){t.Agent._environment=e},t.Agent.isEnvironmentTest=function(){return"test"==t.Agent._environment},t.Agent.isEnvironmentBatik=function(){return"batik"==t.Agent._environment},t.Agent.isEnvironmentBrowser=function(){return!t.Agent.isEnvironmentTest()&&!t.Agent.isEnvironmentBatik()},t.Agent.setHighContrast=function(e){t.Agent._highContrast=e},t.Agent.isHighContrast=function(){return!0===t.Agent._highContrast},t.Agent.workaroundFirefoxRepaint=function(e){if(t.Agent.isPlatformGecko()){var i=e.getParent();if(i){var n=i.getChildIndex(e);i.removeChildAt(n),i.addChildAt(e,n)}}},t.Agent._initialize=function(){if(!t.Agent._bInitialized){var e=navigator&&navigator.userAgent?navigator.userAgent.toLowerCase():null;t.Agent._os=t.Agent._determineOS(e),t.Agent._platform=t.Agent._determinePlatform(e),t.Agent._bChrome=e&&-1!=e.indexOf("chrome/")&&-1===e.indexOf("edge"),t.Agent._version=t.Agent._determineVersion(e,t.Agent._platform),t.Agent._bRtl=!(!document||!document.documentElement)&&"rtl"==document.documentElement.dir,t.Agent._bTouchDevice=t.Agent._platform==t.Agent.WEBKIT_PLATFORM&&e&&(-1!=e.indexOf("mobile")||-1!=e.indexOf("android")),t.Agent._devicePixelRatio=window&&null!=window.devicePixelRatio?window.devicePixelRatio:1,t.Agent._bInitialized=!0}},t.Agent._determineOS=function(e){if(e){if(-1!=e.indexOf("win"))return t.Agent.WINDOWS_OS;if(-1!=e.indexOf("mac"))return t.Agent.MAC_OS;if(-1!=e.indexOf("sunos"))return t.Agent.SOLARIS_OS}return t.Agent.UNKNOWN_OS},t.Agent._determinePlatform=function(e){if(e){if(-1!=e.indexOf("opera"))return t.Agent.UNKNOWN_PLATFORM;if(-1!=e.indexOf("trident")||-1!=e.indexOf("msie")||-1!=e.indexOf("edge"))return t.Agent.IE_PLATFORM;if(-1!=e.indexOf("applewebkit")||-1!=e.indexOf("safari"))return t.Agent.WEBKIT_PLATFORM;if(-1!=e.indexOf("gecko/"))return t.Agent.GECKO_PLATFORM}return t.Agent.UNKNOWN_PLATFORM},t.Agent._determineVersion=function(e,i){if(e){if(i==t.Agent.GECKO_PLATFORM)return t.Agent._parseFloatVersion(e,/rv:(\d+[.]\d+)/);if(i==t.Agent.IE_PLATFORM){var n=t.Agent._parseFloatVersion(e,/trident\/(\d+[.]\d+)/);if(n!=t.Agent.UNKNOWN_VERSION)return n+4;var o=t.Agent._parseFloatVersion(e,/edge\/(\d+[.]\d+)/);if(o!=t.Agent.UNKNOWN_VERSION)return o;var r=t.Agent._parseFloatVersion(e,/msie (\d+\.\d+);/);return r!=t.Agent.UNKNOWN_VERSION?r:t.Agent._parseFloatVersion(e,/msie (\d+\.\d+)b;/)}if(i==t.Agent.WEBKIT_PLATFORM)return t.Agent._bChrome?t.Agent._parseFloatVersion(e,/chrome\/(\d+([.]\d+)*)/):t.Agent._parseFloatVersion(e,/applewebkit\/(\d+([.]\d+)*)/)}return t.Agent.UNKNOWN_VERSION},t.Agent._parseFloatVersion=function(e,i){try{var n=e.match(i);return n&&n[1]?parseFloat(n[1]):t.Agent.UNKNOWN_VERSION}catch(e){return console.error("dvt.Agent._parseFloatVersion error: "),console.error(e),t.Agent.UNKNOWN_VERSION}},t.Agent._getElementPositionDefault=function(e){var i=e.getBoundingClientRect(),n=Math.round(i.top),o=i.left,r=e.ownerDocument.documentElement,s=e.ownerDocument.body;return o+=r.scrollLeft||s.scrollLeft,n+=r.scrollTop||s.scrollTop,new t.Point(o,n)},t.Agent._getElementPositionIE=function(e){var i=e.getBoundingClientRect(),n=i.top,o=i.left,r=e.ownerDocument.documentElement,s=r.scrollLeft;return o-=r.clientLeft-s,n-=r.clientTop-r.scrollTop,new t.Point(o,n)},t.Agent.getFocusColor=function(){if(t.Agent._initialize(),!t.Agent._focusColor){var e;if(t.Agent.isPlatformWebkit()&&!t.Agent.isEnvironmentTest()){var i=document.getElementsByTagName("body")[0],n=document.createElement("div");i.appendChild(n),n.style.outline="-webkit-focus-ring-color",e=window.getComputedStyle(n).getPropertyValue("outline-color"),i.removeChild(n)}else t.Agent.isPlatformIE()&&(e=t.Agent.FOCUS_COLOR_IE);t.Agent._focusColor=e||t.Agent.FOCUS_COLOR_DEFAULT}return t.Agent._focusColor},t.Bundle=function(){},t.Bundle._localizedStrings={},t.Bundle._defaultStrings={},t.Obj.createSubclass(t.Bundle,t.Obj),t.Bundle.SUBCOMPONENT_PREFIX="DvtSubcomponentBundle",t.Bundle.AFCOMPONENT_PREFIX="DvtAfComponentBundle",t.Bundle.UTIL_PREFIX="DvtUtilBundle",t.Bundle.CHART_PREFIX="DvtChartBundle",t.Bundle.GAUGE_PREFIX="DvtGaugeBundle",t.Bundle.TREEMAP_PREFIX="DvtTreemapBundle",t.Bundle.SUNBURST_PREFIX="DvtSunburstBundle",t.Bundle.NBOX_PREFIX="DvtNBoxBundle",t.Bundle.HIERARCHYVIEWER_PREFIX="DvtHierarchyViewerBundle",t.Bundle.ADF_DIAGRAM_PREFIX="DvtAdfDiagramBundle",t.Bundle.DIAGRAM_PREFIX="DvtDiagramBundle",t.Bundle.TAGCLOUD_PREFIX="DvtTagCloudBundle",t.Bundle.TIMELINE_PREFIX="DvtTimelineBundle",t.Bundle.addLocalizedStrings=function(e){for(var i in e)t.Bundle._localizedStrings[i]=e[i]},t.Bundle.addDefaultStrings=function(e,i){for(var n in i)t.Bundle._defaultStrings[e+"."+n]=i[n]},t.Bundle.format=function(t,e){return t.replace(/\{(\d+)\}/g,function(){return e[arguments[1]]})},t.Bundle.getTranslatedString=function(e,i,n){var o=e+"."+i,r=t.Bundle._localizedStrings[o];return r||(r=t.Bundle._defaultStrings[o]),r&&null!=n&&(r=n instanceof Array?t.Bundle.format(r,n):t.Bundle.format(r,[n])),r},t.Bundle.getTranslation=function(e,i,n,o,r){var s=e&&e.translations?e.translations[i]:null;if(!s){var a=n+"."+o;(s=t.Bundle._localizedStrings[a])||(s=t.Bundle._defaultStrings[a])}return s&&null!=r&&(s=r instanceof Array?t.Bundle.format(s,r):t.Bundle.format(s,[r])),s},t.ContextMenuHandler=function(t,e){this._context=t,this._menus=e},t.Obj.createSubclass(t.ContextMenuHandler,t.Obj),t.ContextMenuHandler.TYPE_BODY_CONTEXT_MENU="bodyContextMenu",t.ContextMenuHandler.TYPE_CONTEXT_MENU="contextMenu",t.ContextMenuHandler.TYPE_MULTI_SELECT_CONTEXT_MENU="multiSelectContextMenu",t.ContextMenuHandler._ATTR_MENU_CONTAINER_TYPE="t",t.ContextMenuHandler._ATTR_MENU_CONTAINER_POPUP_ID="id",t.ContextMenuHandler.prototype.show=function(e,i){for(var n=0;n<this._menus.length;n++){var o=this._menus[n];if(i==o[t.ContextMenuHandler._ATTR_MENU_CONTAINER_TYPE]){var r=o[t.ContextMenuHandler._ATTR_MENU_CONTAINER_POPUP_ID];return t.EventFactory.newAdfContextMenuEvent(e.getNativeEvent(),r)}}return null};var x=function(e,i,n){this._context=e,this._callback=i,this._callbackObj=n,this._popupPosition=null,this._mouseTarget=null,this._behavior=null,this._hoverPopupShown=!1,this._hoverTimer=new t.Timer(e,500,this._onHoverDelay,this,1),this._overTimer=new t.Timer(e,500,this._onOverDelay,this,1)};t.Obj.createSubclass(x,t.Obj),x.prototype.processPopupHelper=function(e,i,n,o,r,s){var a=!1;if(e&&i&&i.length>0)for(var l=0;l<i.length;l++){var h=i[l];if(h&&-1!=t.ArrayUtils.getIndex(n,h.getTriggerType())){this.HidePopup(r),this._behavior=h;var u=this._createShowPopupEvent(e,h,o),c=this,p=function(){t.EventDispatcher.dispatchEvent(c._callback,c._callbackObj,c,u)};s?setTimeout(p,100):p(),a=!0}}return a},x.prototype.processMousePopup=function(e,i,n,o,r,s){if(e===this._mouseTarget)return!0;if(e&&i&&i.length>0)for(var a=0;a<i.length;a++){var l=i[a],h=l?l.getTriggerType():null;if(h==t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_HOVER&&(h=t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_OVER),s==h)return this.HidePopup(r),this._mouseTarget=e,this._behavior=l,this._hoverDisplayable=o,this._popupPosition=n,s==t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_HOVER||s==t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_OVER?l.getTriggerType()==t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_HOVER?this._hoverTimer.start():this._overTimer.start():this._onOverDelay(),!0}return!1},x.prototype.processMouseOut=function(e,i,n){var o=!1;i&&(o=i.length<1),this._mouseTarget&&this._behavior&&(e===this._mouseTarget||o)&&(i&&this._hoverDisplayable&&t.ArrayUtils.getIndex(i,this._hoverDisplayable)>-1||this.HidePopup(n))},x.prototype.HidePopup=function(e){if(this._hoverPopupShown){var i=t.EventFactory.newAdfHidePopupEvent(this._behavior.getPopupId(),e.getNativeEvent().relatedTarget);t.EventDispatcher.dispatchEvent(this._callback,this._callbackObj,this,i)}else this._hoverTimer.stop();this._mouseTarget=null,this._behavior=null,this._hoverPopupShown=!1,this._hoverDisplayable=null},x.prototype.processMouseMove=function(t){this._popupPosition=t},x.prototype._createShowPopupEvent=function(e,i,n){var o=i,r=i,s=o.getAlign()&&!o.getAlignId();s&&(r=new t.ShowPopupBehavior(o.getPopupId(),o.getTriggerType(),null,null));var a=e.getPopupBounds?e.getPopupBounds(r):null,l=!o.getAlign()&&!o.getAlignId()&&"contextMenu"==o.getTriggerType();if(s&&!a||l){var h=this._context.pageToStageCoords(n.x,n.y);a=new t.Rectangle(h.x,h.y-5,1,5)}else a&&(o=new t.ShowPopupBehavior(o.getPopupId(),o.getTriggerType(),null,o.getAlign()));var u=t.EventFactory.newAdfShowPopupEvent(o,a,null,o.getTriggerType());return t.EventManager._addContextInfo(e,u),u},x.prototype._onHoverDelay=function(){if(this._mouseTarget&&this._behavior){this._hoverPopupShown=!0;var e=this._createShowPopupEvent(this._mouseTarget,this._behavior,this._popupPosition);t.EventDispatcher.dispatchEvent(this._callback,this._callbackObj,this,e)}},x.prototype._onOverDelay=function(){if(this._mouseTarget&&this._behavior){var e=this._createShowPopupEvent(this._mouseTarget,this._behavior,this._popupPosition);t.EventDispatcher.dispatchEvent(this._callback,this._callbackObj,this,e)}},x.prototype.hasPopup=function(e,i){if(!e||!e.getShowPopupBehaviors)return!1;var n=e.getShowPopupBehaviors();if(n)for(var o=0;o<n.length;o++){var r=n[o];if(r&&-1!=t.ArrayUtils.getIndex(i,r.getTriggerType()))return!0}return!1},t.ClientBehaviorHandler=function(t,e,i){this.Init(t,e,i)},t.Obj.createSubclass(t.ClientBehaviorHandler,t.Obj),t.ClientBehaviorHandler.prototype.Init=function(t,e,i){this._context=t,this._callback=e,this._callbackObj=i},t.ClientBehaviorHandler.prototype.processClick=function(e,i){var n=!1;if(e&&i&&i.length>0)for(var o=0;o<i.length;o++){var r=i[o];if(r&&(r.getTriggerType()==t.ClientBehavior.TRIGGER_TYPE_ACTION||r.getTriggerType()==t.ClientBehavior.TRIGGER_TYPE_CLICK)){var s=this.CreateClientBehaviorEvent(e,r);t.EventDispatcher.dispatchEvent(this._callback,this._callbackObj,null,s),n=!0}}return n},t.ClientBehaviorHandler.prototype.CreateClientBehaviorEvent=function(e,i){var n=new t.ClientBehaviorEvent(i);return t.EventManager._addContextInfo(e,n),n},t.SelectionHandler=function(t,e){this.Init(t,e)},t.Obj.createSubclass(t.SelectionHandler,t.Obj),t.SelectionHandler.TYPE_SINGLE="s",t.SelectionHandler.TYPE_MULTIPLE="m",t.SelectionHandler.prototype.Init=function(e,i){this._context=e,this._selection=[],this._type=i||t.SelectionHandler.TYPE_SINGLE,this._hiddenSelectedIds=[]},t.SelectionHandler.prototype.getType=function(){return this._type},t.SelectionHandler.prototype.getSelectedCount=function(){return this._selection.length},t.SelectionHandler.prototype.getSelection=function(){return this._selection.slice(0)},t.SelectionHandler.prototype.getSelectedIds=function(){for(var t=[],e=0;e<this._selection.length;e++)t.push(this._selection[e].getId());return t.concat(this._hiddenSelectedIds)},t.SelectionHandler.prototype.processInitialSelections=function(t,e){if(this.clearSelection(!0),t&&e){for(var i=new this._context.oj.KeySetImpl(t),n=new Map,o=0,r=0;o!==t.length&&r<e.length;r++){if((a=e[r]).isSelectable&&a.isSelectable()){var s=i.get(a.getId());null!=s&&(o++,n.set(s,a))}}for(r=0;r<t.length;r++){var a;(a=n.get(t[r]))?this._addToSelection(a,!0,!0):this._hiddenSelectedIds.push(t[r])}}},t.SelectionHandler.prototype.processClick=function(e,i){if(e&&e.isUnrelatedToSelection&&e.isUnrelatedToSelection())return!1;var n=!1;return i&&this._type==t.SelectionHandler.TYPE_MULTIPLE?e&&e.isSelectable&&e.isSelectable()&&(n=e.isSelected()?this.removeFromSelection(e):this._addToSelection(e,!0)):n=e&&e.isSelectable&&e.isSelectable()?this._addToSelection(e,!1):this.clearSelection(),n},t.SelectionHandler.prototype.processGroupSelection=function(t,e){var i;e||this.clearSelection();for(var n=0;n<t.length;n++)(i=t[n])&&i.isUnrelatedToSelection&&i.isUnrelatedToSelection()||this._addToSelection(i,!0)},t.SelectionHandler.prototype.processMouseOver=function(t){t&&t.isSelectable&&t.isSelectable()&&t.showHoverEffect&&t.showHoverEffect()},t.SelectionHandler.prototype.processMouseOut=function(t){t&&t.isSelectable&&t.isSelectable()&&t.hideHoverEffect&&t.hideHoverEffect()},t.SelectionHandler.prototype._addToSelection=function(t,e,i){return!(t.isSelected()||t.isSelectable&&!t.isSelectable())&&(e||this.clearSelection(i),t.setSelected(!0,i),this._selection.push(t),!0)},t.SelectionHandler.prototype.removeFromSelection=function(t){if(!t.isSelected())return!1;t.setSelected(!1);for(var e=0;e<this._selection.length;e++)if(this._selection[e]==t){this._selection.splice(e,1);break}return!0},t.SelectionHandler.prototype.clearSelection=function(t){if(this._selection.length<=0&&this._hiddenSelectedIds.length<=0)return!1;for(;this._selection.length>0;){this._selection.pop().setSelected(!1,t)}return this._hiddenSelectedIds.length=0,!0},t.SelectionHandler._isEquals=function(t,e){return t==e||!(t instanceof String)&&(!(!t||!t.equals)&&t.equals(e))},t.KeyboardHandler=function(t){this.Init(t)},t.Obj.createSubclass(t.KeyboardHandler,t.Obj),t.KeyboardHandler._OPTIMAL_ANGLE1=15/180*Math.PI,t.KeyboardHandler._OPTIMAL_ANGLE2=40/180*Math.PI,t.KeyboardHandler._SUBOPTIMAL_ANGLE_PENALTY1=2,t.KeyboardHandler._SUBOPTIMAL_ANGLE_PENALTY2=6,t.KeyboardHandler.prototype.Init=function(t){this._eventManager=t},t.KeyboardHandler.prototype.processKeyDown=function(e){var i=this._eventManager.getFocus();if(i&&(this.isNavigationEvent(e)||this.isMultiSelectEvent(e))){t.EventManager.consumeEvent(e);var n=i.getNextNavigable(e);return n!=i&&(n&&this._showPopupHelper(n,[t.ShowPopupBehavior.TRIGGER_TYPE_FOCUS],e),this._showPopupHelper(i,[t.ShowPopupBehavior.TRIGGER_TYPE_BLUR],e)),n}return e.keyCode!=t.KeyboardEvent.TAB&&i&&this._showPopupHelper(i,[t.ShowPopupBehavior.TRIGGER_TYPE_KEY_DOWN],e),null},t.KeyboardHandler.prototype.processKeyUp=function(e,i){var n=this._eventManager.getFocus();n&&e.keyCode==t.KeyboardEvent.TAB?this._showPopupHelper(n,[t.ShowPopupBehavior.TRIGGER_TYPE_FOCUS],e):!n||this.isNavigationEvent(e)||this.isMultiSelectEvent(e)||this._showPopupHelper(n,i,e)},t.KeyboardHandler.getNextNavigable=function(e,i,n,o,r){var s=null,a=0,l=0,h=i.keyCode;if(!e)return!n||n.length<1?null:n[0];for(var u,c=e.getKeyboardBoundingBox(r),p=0;p<n.length;p++){var _=n[p];e!==_&&(u=_.getKeyboardBoundingBox(r),(o||t.KeyboardHandler._isInBounds(c,u,h))&&(l=t.KeyboardHandler._computeDelta(c,u,h),((h==t.KeyboardEvent.UP_ARROW||h==t.KeyboardEvent.LEFT_ARROW)&&l<0&&(!s||l>a)||(h==t.KeyboardEvent.DOWN_ARROW||h==t.KeyboardEvent.RIGHT_ARROW)&&l>0&&(!s||l<a))&&(s=_,a=l)))}return s||e},t.KeyboardHandler.prototype._showPopupHelper=function(t,e,i){var n=this._eventManager.getCtx(),o=t.getKeyboardBoundingBox(n.getStage()).getCenter(),r=n.stageToPageCoords(o.x,o.y),s=t.getShowPopupBehaviors?t.getShowPopupBehaviors():null;return this._eventManager.getPopupHandler().processPopupHelper(t,s,e,r,i)},t.KeyboardHandler.prototype.getDefaultNavigable=function(e){if(!e||e.length<=0)return null;for(var i,n,o=e[0],r=o.getKeyboardBoundingBox(),s=1;s<e.length;s++)(((n=(i=e[s]).getKeyboardBoundingBox()).x==r.x&&n.y<r.y||n.x<r.x)&&!t.Agent.isRightToLeft(this._eventManager.getCtx())||(n.x+n.w==r.x+r.w&&n.y<r.y||n.x+n.w>r.x+r.w)&&t.Agent.isRightToLeft(this._eventManager.getCtx()))&&(r=(o=i).getKeyboardBoundingBox());return o},t.KeyboardHandler.prototype.isNavigationEvent=function(e){switch(e.keyCode){case t.KeyboardEvent.UP_ARROW:case t.KeyboardEvent.DOWN_ARROW:case t.KeyboardEvent.LEFT_ARROW:case t.KeyboardEvent.RIGHT_ARROW:return!0}return!1},t.KeyboardHandler.prototype.isSelectionEvent=function(t){return!1},t.KeyboardHandler.prototype.isMultiSelectEvent=function(t){return!1},t.KeyboardHandler.prototype.isContextMenuEvent=function(e){return e.keyCode==t.KeyboardEvent.M&&e.altKey&&e.ctrlKey},t.KeyboardHandler._isInBounds=function(e,i,n){if(n==t.KeyboardEvent.UP_ARROW||n==t.KeyboardEvent.DOWN_ARROW){var o=e.x,r=o+e.w,s=i.x;return!(o>=s+i.w||r<=s)}if(n==t.KeyboardEvent.LEFT_ARROW||n==t.KeyboardEvent.RIGHT_ARROW){var a=e.y,l=a+e.h,h=i.y;return!(a>=h+i.h||l<=h)}},t.KeyboardHandler._computeDelta=function(e,i,n){var o=0,r=e.getCenter().x,s=e.getCenter().y,a=i.getCenter().x,l=i.getCenter().y;return n==t.KeyboardEvent.UP_ARROW||n==t.KeyboardEvent.DOWN_ARROW?o=l-s:n!=t.KeyboardEvent.LEFT_ARROW&&n!=t.KeyboardEvent.RIGHT_ARROW||(o=a-r),o},t.KeyboardHandler.getNextAdjacentNavigable=function(e,i,n){var o=i.keyCode;if(!n)return null;if(!e)return n[0];for(var r=e,s=Number.MAX_VALUE,a=!1,l=!1,h=0;h<n.length;h++){var u=n[h];if(u!==e){if(t.KeyboardHandler._isValidDestination(u,e,o)){var c=t.KeyboardHandler._calcInContact(u,e,o);if(!a||c){var p=t.KeyboardHandler._calcDistanceAngleWeighted(u,e,o);(0!=p||l)&&(!a&&c||p<s&&(a&&c||!a))&&(s=p,r=u,a=c)}}}else l=!0}return r},t.KeyboardHandler._calcInContact=function(e,i,n){var o=e.getKeyboardBoundingBox(),r=i.getKeyboardBoundingBox();switch(n){case t.KeyboardEvent.UP_ARROW:return t.KeyboardHandler._isVerticallyAligned(o,r)&&(r.y<=o.y+o.h||t.KeyboardHandler._areEqualWithinTolerance(r.y,o.y+o.h));case t.KeyboardEvent.DOWN_ARROW:return t.KeyboardHandler._isVerticallyAligned(o,r)&&(o.y<=r.y+r.h||t.KeyboardHandler._areEqualWithinTolerance(o.y,r.y+r.h));case t.KeyboardEvent.RIGHT_ARROW:return t.KeyboardHandler._isHorizontallyAligned(o,r)&&(o.x<=r.x+r.w||t.KeyboardHandler._areEqualWithinTolerance(o.x,r.x+r.w));case t.KeyboardEvent.LEFT_ARROW:return t.KeyboardHandler._isHorizontallyAligned(o,r)&&(r.x<=o.x+o.w||t.KeyboardHandler._areEqualWithinTolerance(r.x,o.x+o.w))}return!1},t.KeyboardHandler._isVerticallyAligned=function(t,e){return t.x>=e.x&&t.x<=e.x+e.w||e.x>=t.x&&e.x<=t.x+t.w},t.KeyboardHandler._isHorizontallyAligned=function(t,e){return t.y>=e.y&&t.y<=e.y+e.h||e.y>=t.y&&e.y<=t.y+t.h},t.KeyboardHandler._calcDistanceAngleWeighted=function(e,i,n){var o=e.getKeyboardBoundingBox(),r=o.x+o.w/2,s=o.y+o.h/2,a=i.getKeyboardBoundingBox(),l=a.x+a.w/2,h=a.y+a.h/2,u=Math.abs(r-l),c=Math.abs(s-h),p=Math.atan2(c,u),_=Math.sqrt(u*u+c*c);return(p>t.KeyboardHandler._OPTIMAL_ANGLE1&&(n==t.KeyboardEvent.RIGHT_ARROW||n==t.KeyboardEvent.LEFT_ARROW)||p<t.Math.HALF_PI-t.KeyboardHandler._OPTIMAL_ANGLE1&&(n==t.KeyboardEvent.UP_ARROW||n==t.KeyboardEvent.DOWN_ARROW))&&(p>t.KeyboardHandler._OPTIMAL_ANGLE2&&(n==t.KeyboardEvent.RIGHT_ARROW||n==t.KeyboardEvent.LEFT_ARROW)||p<t.Math.HALF_PI-t.KeyboardHandler._OPTIMAL_ANGLE2&&(n==t.KeyboardEvent.UP_ARROW||n==t.KeyboardEvent.DOWN_ARROW)?_*=t.KeyboardHandler._SUBOPTIMAL_ANGLE_PENALTY2:_*=t.KeyboardHandler._SUBOPTIMAL_ANGLE_PENALTY1),_},t.KeyboardHandler._isValidDestination=function(e,i,n){var o=e.getKeyboardBoundingBox(),r=i.getKeyboardBoundingBox();switch(n){case t.KeyboardEvent.UP_ARROW:return o.y<r.y||t.KeyboardHandler._areEqualWithinTolerance(o.y,r.y);case t.KeyboardEvent.DOWN_ARROW:return o.y>r.y||t.KeyboardHandler._areEqualWithinTolerance(o.y,r.y);case t.KeyboardEvent.RIGHT_ARROW:return o.x>r.x||t.KeyboardHandler._areEqualWithinTolerance(o.x,r.x);case t.KeyboardEvent.LEFT_ARROW:return o.x<r.x||t.KeyboardHandler._areEqualWithinTolerance(o.x,r.x)}return!0},t.KeyboardHandler._areEqualWithinTolerance=function(t,e){return Math.abs(t-e)<=1e-7},t.MarqueeHandler=function(t,e,i,n,o,r,s,a,l){this.Init(t,e,i,n,o,r,s,a,l)},t.Obj.createSubclass(t.MarqueeHandler,t.Obj),t.MarqueeHandler.prototype.Init=function(e,i,n,o,r,s,a,l,h){this._context=e.getCtx(),this._container=e,this._bounds=i,this._fill=o,this._stroke=r,this._allowHoriz=null==s||s,this._allowVert=null==a||a,this._horizBounds=l,this._vertBounds=h,this._glassPane=new t.Rect(this._context,n.x,n.y,n.w,n.h),this._glassPane.setInvisibleFill(),this._marqueeOn=!1,this._marqueeDrawn=!1,this._resizeHoriz=!1,this._resizeVert=!1},t.MarqueeHandler.prototype.processDragStart=function(e,i){if(!this._marqueeOn){if(this._origPt=this._container.stageToLocal(e),this._resizeHoriz=this._allowHoriz,this._resizeVert=this._allowVert,!this._bounds.containsPoint(this._origPt.x,this._origPt.y))if(this._vertBounds&&this._vertBounds.containsPoint(this._origPt.x,this._origPt.y))this._resizeHoriz=!1;else{if(!this._horizBounds||!this._horizBounds.containsPoint(this._origPt.x,this._origPt.y))return null;this._resizeVert=!1}return this._marqueeOn=!0,this._marquee=null,this._createMarqueeEvent(t.MarqueeEvent.SUBTYPE_START,i)}return null},t.MarqueeHandler.prototype.processDragMove=function(e,i){if(!this._marqueeOn)return null;this._marqueeDrawn||(this._container.addChild(this._glassPane),this._marquee=new t.Rect(this._context,this._bounds.x,this._bounds.y,this._bounds.w,this._bounds.h),this._marquee.getElem().setAttribute("pointer-events","none"),this._resizeHoriz&&(this._marquee.setX(this._origPt.x),this._marquee.setWidth(0)),this._resizeVert&&(this._marquee.setY(this._origPt.y),this._marquee.setHeight(0)),this._marquee.setStroke(this._stroke),this._marquee.setFill(this._fill),this._marquee.setPixelHinting(!0),this._glassPane.addChild(this._marquee),this._marqueeDrawn=!0);var n=this._container.stageToLocal(e);return n.x=Math.max(n.x,this._bounds.x),n.x=Math.min(n.x,this._bounds.x+this._bounds.w),n.y=Math.max(n.y,this._bounds.y),n.y=Math.min(n.y,this._bounds.y+this._bounds.h),this._resizeHoriz&&(this._marquee.setWidth(Math.abs(n.x-this._origPt.x)),n.x<this._origPt.x?this._marquee.setX(n.x):this._marquee.setX(this._origPt.x)),this._resizeVert&&(this._marquee.setHeight(Math.abs(n.y-this._origPt.y)),n.y<this._origPt.y?this._marquee.setY(n.y):this._marquee.setY(this._origPt.y)),this._createMarqueeEvent(t.MarqueeEvent.SUBTYPE_MOVE,i)},t.MarqueeHandler.prototype.processDragEnd=function(e,i){return this._marqueeOn&&(this._marqueeOn=!1,this._marqueeDrawn)?(this._glassPane.removeChild(this._marquee),this._container.removeChild(this._glassPane),this._marqueeDrawn=!1,this._createMarqueeEvent(t.MarqueeEvent.SUBTYPE_END,i)):null},t.MarqueeHandler.prototype.cancelMarquee=function(){return!(!this._marqueeOn||(this._marqueeOn=!1,!this._marqueeDrawn))&&(this._glassPane.removeChild(this._marquee),this._container.removeChild(this._glassPane),this._marqueeDrawn=!1,!0)},t.MarqueeHandler.prototype._createMarqueeEvent=function(e,i){var n=null,o=null,r=null,s=null;return this._resizeHoriz&&(n=this._marquee?this._marquee.getX():this._origPt.x,r=this._marquee?this._marquee.getWidth():0),this._resizeVert&&(o=this._marquee?this._marquee.getY():this._origPt.y,s=this._marquee?this._marquee.getHeight():0),new t.MarqueeEvent(e,n,o,r,s,i)},t.MarqueeHandler.prototype.getCursor=function(t){var e=this._container.stageToLocal(t),i=this._bounds.containsPoint(e.x,e.y),n=this._vertBounds&&this._vertBounds.containsPoint(e.x,e.y),o=this._horizBounds&&this._horizBounds.containsPoint(e.x,e.y);return i||n||o?"crosshair":"inherit"},t.MarqueeHandler.prototype.getGlassPane=function(){return this._glassPane},t.PanZoomHandler=function(t,e,i,n){this.Init(t,e,i,n)},t.Obj.createSubclass(t.PanZoomHandler,t.Obj),t.PanZoomHandler.prototype.Init=function(e,i,n,o){this._context=e.getCtx(),this._container=e,this._bounds=i,this._zoomRate=o,this._glassPane=new t.Rect(this._context,n.x,n.y,n.w,n.h),this._glassPane.setInvisibleFill(),this._panOn=!1,this._glassPaneDrawn=!1,this._pinchOn=!1},t.PanZoomHandler.prototype.processDragStart=function(e){return this._panOn?null:(this._origPt=this._container.stageToLocal(e),this._lastPt=this._origPt,this._bounds.containsPoint(this._origPt.x,this._origPt.y)?(this._panOn=!0,new t.PanZoomEvent(t.PanZoomEvent.SUBTYPE_PAN_START,0,0,0,0,0,0,0,0)):null)},t.PanZoomHandler.prototype.processDragMove=function(e){if(!this._panOn)return null;this._glassPaneDrawn||(this._container.addChild(this._glassPane),this._glassPaneDrawn=!0);var i=this._container.stageToLocal(e),n=i.x-this._lastPt.x,o=i.y-this._lastPt.y,r=i.x-this._origPt.x,s=i.y-this._origPt.y;return this._lastPt=i,new t.PanZoomEvent(t.PanZoomEvent.SUBTYPE_PAN_MOVE,-n,-n,-o,-o,-r,-r,-s,-s)},t.PanZoomHandler.prototype.processDragEnd=function(e){if(this._panOn&&(this._panOn=!1,this._glassPaneDrawn)){this._container.removeChild(this._glassPane),this._glassPaneDrawn=!1;var i=e?this._container.stageToLocal(e):this._lastPt,n=i.x-this._lastPt.x,o=i.y-this._lastPt.y,r=i.x-this._origPt.x,s=i.y-this._origPt.y;return this._lastPt=null,new t.PanZoomEvent(t.PanZoomEvent.SUBTYPE_PAN_END,-n,-n,-o,-o,-r,-r,-s,-s)}return null},t.PanZoomHandler.prototype.processMouseWheel=function(e,i){var n=this._container.stageToLocal(e);if(!this._bounds.containsPoint(n.x,n.y))return null;var o=(i*=this._zoomRate)*(n.x-this._bounds.x),r=-i*(this._bounds.x+this._bounds.w-n.x),s=i*(n.y-this._bounds.y),a=-i*(this._bounds.y+this._bounds.h-n.y);return new t.PanZoomEvent(t.PanZoomEvent.SUBTYPE_ZOOM,o,r,s,a,o,r,s,a)},t.PanZoomHandler.prototype.processPinchStart=function(e,i){return this._pinchOn?null:(this._origPt1=this._container.stageToLocal(e),this._origPt2=this._container.stageToLocal(i),this._lastPt1=this._origPt1,this._lastPt2=this._origPt2,this._bounds.containsPoint(this._origPt1.x,this._origPt1.y)&&this._bounds.containsPoint(this._origPt2.x,this._origPt2.y)?(this._pinchOn=!0,new t.PanZoomEvent(t.PanZoomEvent.SUBTYPE_PINCH_START,0,0,0,0,0,0,0,0)):null)},t.PanZoomHandler.prototype.processPinchMove=function(e,i){if(!this._pinchOn)return null;var n=this._container.stageToLocal(e),o=this._container.stageToLocal(i),r=this._computePinchDeltas(n,o,this._lastPt1,this._lastPt2),s=this._computePinchDeltas(n,o,this._origPt1,this._origPt2);return this._lastPt1=n,this._lastPt2=o,new t.PanZoomEvent(t.PanZoomEvent.SUBTYPE_PINCH_MOVE,r.dxMin,r.dxMax,r.dyMin,r.dyMax,s.dxMin,s.dxMax,s.dyMin,s.dyMax)},t.PanZoomHandler.prototype.processPinchEnd=function(){if(this._pinchOn){this._pinchOn=!1;var e=this._computePinchDeltas(this._lastPt1,this._lastPt2,this._origPt1,this._origPt2);return this._lastPt1=null,this._lastPt2=null,new t.PanZoomEvent(t.PanZoomEvent.SUBTYPE_PINCH_END,0,0,0,0,e.dxMin,e.dxMax,e.dyMin,e.dyMax)}return null},t.PanZoomHandler.prototype._computePinchDeltas=function(t,e,i,n){var o=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y),s=Math.abs(i.x-n.x),a=Math.abs(i.y-n.y),l=o>r/2?s/o:1,h=r>o/2?a/r:1,u=(t.x+e.x)/2,c=(t.y+e.y)/2,p=u-(i.x+n.x)/2,_=c-(i.y+n.y)/2,g=(1-l)*(u-this._bounds.x),d=(l-1)*(this._bounds.x+this._bounds.w-u),S=(1-h)*(c-this._bounds.y),f=(h-1)*(this._bounds.y+this._bounds.h-c);return{dxMin:g-=p,dxMax:d-=p,dyMin:S-=_,dyMax:f-=_}},t.PanZoomHandler.prototype.zoomBy=function(e){var i=(1/e-1)/2,n=-i*this._bounds.w,o=i*this._bounds.w,r=-i*this._bounds.h,s=i*this._bounds.h;return new t.PanZoomEvent(t.PanZoomEvent.SUBTYPE_ZOOM,n,o,r,s,n,o,r,s)},t.PanZoomHandler.prototype.panBy=function(e,i){var n=e*this._bounds.w*(t.Agent.isRightToLeft(this._context)?-1:1),o=i*this._bounds.h;return new t.PanZoomEvent(t.PanZoomEvent.SUBTYPE_PAN_END,n,n,o,o,n,n,o,o)},t.PanZoomHandler.prototype.setPanCursor=function(e,i){t.Agent.isPlatformIE()||(e&&(this._panUpCursor="url("+e+") 8 8, auto"),i&&(this._panDownCursor="url("+i+") 8 8, auto"))},t.PanZoomHandler.prototype.getCursor=function(t){return null==t||this.isWithinBounds(t)?this._panOn?this._panDownCursor?this._panDownCursor:"move":this._panUpCursor?this._panUpCursor:"move":"inherit"},t.PanZoomHandler.prototype.isWithinBounds=function(t){var e=this._container.stageToLocal(t);return this._bounds.containsPoint(e.x,e.y)},t.TooltipManager=function(){},t.Obj.createSubclass(t.TooltipManager,t.Obj),t.TooltipManager.prototype.showDatatip=function(t,e,i,n){},t.TooltipManager.prototype.showTooltip=function(t,e,i,n,o,r){},t.TooltipManager.prototype.hideTooltip=function(){},t.CategoryRolloverHandler=function(e,i){this._callback=e,this._callbackObj=i,this._source=i,this._bHighlightMode=!1,this._hoverDelayCallback=null,this._highlightModeTimeout=null,this._hoverDelay=t.CategoryRolloverHandler._HOVER_DELAY},t.Obj.createSubclass(t.CategoryRolloverHandler,t.Obj),t.CategoryRolloverHandler._HOVER_DELAY=50,t.CategoryRolloverHandler._HOVER_TIMEOUT=1e3,t.CategoryRolloverHandler._ROLLOUT_TIMEOUT=250,t.CategoryRolloverHandler._FADE_OUT_OPACITY=.35,t.CategoryRolloverHandler.prototype.processEvent=function(e,i,n,o,r){if(e&&i&&0!=i.length){this._hoverDelayCallback&&(clearTimeout(this._hoverDelayCallback),this._hoverDelayCallback=null);var s=e._highlightType;if("over"==s){var a=this._bHighlightMode?this._hoverDelay:n;this._hoverDelayCallback=setTimeout(this.GetRolloverCallback(e,i,o,r),a),this._highlightModeTimeout&&(clearInterval(this._highlightModeTimeout),this._highlightModeTimeout=null)}else if("out"==s){var l=this._bHighlightMode?this._hoverDelay:t.CategoryRolloverHandler._ROLLOUT_TIMEOUT;this._hoverDelayCallback=setTimeout(this.GetRolloutCallback(e,i,o,r),l)}}},t.CategoryRolloverHandler.prototype.GetRolloverCallback=function(e,i,n,o){return t.Obj.createCallback(this,function(){this._bHighlightMode=!0,t.CategoryRolloverHandler.highlight(e.categories,i,n,o),this._callback&&this._callback.call(this._callbackObj,e,this._source)})},t.CategoryRolloverHandler.prototype.GetRolloutCallback=function(e,i,n,o){return t.Obj.createCallback(this,function(){t.CategoryRolloverHandler.highlight(e.categories,i,n,o),this.SetHighlightModeTimeout(),this._callback&&this._callback.call(this._callbackObj,e,this._source)})},t.CategoryRolloverHandler.highlight=function(e,i,n,o){if(i)for(var r=o||t.CategoryRolloverHandler._FADE_OUT_OPACITY,s=0;s<i.length;s++){var a=i[s];if(a&&a.getCategories){var l=n?t.CategoryRolloverHandler._hasAnyCategory(a,e):t.CategoryRolloverHandler._hasAllCategories(a,e),h=e&&e.length>0&&!l;t.CategoryRolloverHandler._highlightObj(a,h,r)}}},t.CategoryRolloverHandler._highlightObj=function(e,i,n){var o=i?n:1;if(e.highlight)e.highlight(i,o);else{var r=e.getDisplayables();t.CategoryRolloverHandler._updateAlpha(r,o)}},t.CategoryRolloverHandler._updateAlpha=function(t,e){if(t)for(var i=0;i<t.length;i++)t[i].setAlpha(e)},t.CategoryRolloverHandler._hasAnyCategory=function(e,i){return!(!e||!e.getCategories)&&t.ArrayUtils.hasAnyItem(e.getCategories(),i)},t.CategoryRolloverHandler._hasAllCategories=function(e,i){return!(!e||!e.getCategories)&&t.ArrayUtils.hasAllItems(e.getCategories(),i)},t.CategoryRolloverHandler.prototype.SetHighlightMode=function(t){this._bHighlightMode=t},t.CategoryRolloverHandler.prototype.SetHighlightModeTimeout=function(){var e=t.Obj.createCallback(this,function(){this.SetHighlightMode(!1)});this._highlightModeTimeout=setTimeout(e,t.CategoryRolloverHandler._HOVER_TIMEOUT)},t.CategoryRolloverHandler.prototype.setHoverDelay=function(t){this._hoverDelay=t},t.EventManager=function(t,e,i){this.Init(t,e,i)},t.Obj.createSubclass(t.EventManager,t.Obj),t.EventManager.CLEAR_SELECTION_ACTION_TYPE="clearSelectionActionType",t.EventManager.TOUCH_RESPONSE_TOUCH_START="touchStart",t.EventManager.TOUCH_RESPONSE_TOUCH_HOLD="touchHold",t.EventManager.TOUCH_RESPONSE_AUTO="auto",t.EventManager._TOUCH_RESPONSE_PADDING_CHECK=10,t.EventManager._EVENT_INFO_TOOLTIP_DISPLAYED_KEY="tooltipDisplayed",t.EventManager._EVENT_INFO_CURRENT_TARGET_KEY="currentTarget",t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY="popupDisplayed",t.EventManager.prototype.Init=function(e,i,n){this._context=e,this._callback=i,this._callbackObj=n,this._touchMap={},this._selectionHandler=null,this.PopupHandler=new x(e,i,n),this.ClientBehaviorHandler=this.CreateClientBehaviorHandler(e,i,n),this.KeyboardHandler=null,this.RolloverHandler=this.CreateCategoryRolloverHandler(i,n),this.setTooltipsEnabled(!0);var o=e.getStage().getId();o||(o="undefinedId"),this.CustomTooltipManager=this._context.getCustomTooltipManager(),this.CustomTooltipManager.addTooltipEventListener(y.TOOLTIP_CLOSED_TYPE,this.OnActionTooltipClosed,this),this.CustomTooltipManager.addTooltipEventListener(y.TOOLTIP_STARTED_TYPE,this.OnActionTooltipStarted,this),this.TouchManager=null,t.Agent.isTouchDevice()&&(this.TouchManager=new t.TouchManager("touchmanager",this._context,this)),this._focusedObj=null,this._shouldDisplayKeyboardFocus=!1,this._rolloverTypes=[],this._keyboardHandlers=[this],this._currentKeyboardHandlerIdx=-1,this._dndListeners={}},t.EventManager.prototype.getCtx=function(){return this._context},t.EventManager.prototype.associate=function(e,i,n){e&&(e._logicalObjects&&!n||(e._logicalObjects=[]),e._logicalObjects.push({logicalObject:i,eventManager:this}),!t.Agent.isEnvironmentBrowser()&&e.getImpl().setLogicalObj&&e.getImpl().setLogicalObj(i))},t.EventManager.prototype.addListeners=function(e){if(e&&(t.Agent.isTouchDevice()?(this.hideTooltip(),e.addEvtListener(t.TouchEvent.TOUCHSTART,this.OnTouchStartBubble,!1,this),e.addEvtListener(t.TouchEvent.TOUCHMOVE,this.OnTouchMoveBubble,!1,this),e.addEvtListener(t.TouchEvent.TOUCHEND,this.OnTouchEndBubble,!1,this),this.TouchManager.addTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_START_TYPE,this._preOnComponentTouchHoverStart,this),this.TouchManager.addTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE,this._preOnComponentTouchHoverMove,this),this.TouchManager.addTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_END_TYPE,this._preOnComponentTouchHoverEnd,this),this.TouchManager.addTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,this._preOnComponentTouchHoverOut,this),this.TouchManager.addTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,this._preOnComponentTouchHoverOver,this),this.TouchManager.addTouchEventListener(t.ComponentTouchEvent.TOUCH_CLICK_TYPE,this._preOnComponentTouchClick,this),this.TouchManager.addTouchEventListener(t.ComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE,this._preOnComponentTouchDblClick,this)):(e.addEvtListener(t.MouseEvent.CLICK,this.PreOnClick,!1,this),e.addEvtListener(t.MouseEvent.DBLCLICK,this.PreOnDblClick,!1,this),e.addEvtListener("contextmenu",this.PreOnContextMenu,!1,this),e.addEvtListener(t.MouseEvent.MOUSEMOVE,this.PreOnMouseMove,!1,this),e.addEvtListener(t.MouseEvent.MOUSEOVER,this.PreOnMouseOver,!1,this),e.addEvtListener(t.MouseEvent.MOUSEOUT,this.PreOnMouseOut,!1,this),e.addEvtListener(t.MouseEvent.MOUSEDOWN,this.PreOnMouseDown,!1,this),e.addEvtListener(t.MouseEvent.MOUSEUP,this.PreOnMouseUp,!1,this),e.addEvtListener(t.KeyboardEvent.KEYDOWN,this.OnKeyDown,!1,this),e.addEvtListener(t.KeyboardEvent.KEYPRESS,this.OnKeyPress,!1,this),e.addEvtListener(t.KeyboardEvent.KEYUP,this.OnKeyUp,!1,this),e.addEvtListener(f.FOCUS,this.OnFocus,!1,this),e.addEvtListener(f.BLUR,this.OnBlur,!1,this)),this.isDndSupported())){var i=this.getCtx();this.setDragSource(new t.DragSource(i)),this._addDndListener("dragstart",this.OnDndDragStart),this._addDndListener("drag",this.OnDndDrag),this._addDndListener("dragend",this.OnDndDragEnd),this._addDndListener("dragenter",this.OnDndDragEnter),this._addDndListener("dragover",this.OnDndDragOver),this._addDndListener("dragleave",this.OnDndDragLeave),this._addDndListener("drop",this.OnDndDrop);var n=i.getContainer();for(var o in this._dndListeners)t.ToolkitUtils.addDomEventListener(n,o,this._dndListeners[o],!1);this._context.addDndEventManager(this)}},t.EventManager.prototype._addDndListener=function(e,i){var n=t.SvgDocumentUtils.createStaticCallback(this.getCtx(),i,this);this._dndListeners[e]=n},t.EventManager.prototype.removeListeners=function(t,e){t&&(e||this.hideTooltip(),this.RemoveListeners(t))},t.EventManager.prototype.RemoveListeners=function(e){if(t.Agent.isTouchDevice()?(e.removeEvtListener(t.TouchEvent.TOUCHSTART,this.OnTouchStartBubble,!1,this),e.removeEvtListener(t.TouchEvent.TOUCHMOVE,this.OnTouchMoveBubble,!1,this),e.removeEvtListener(t.TouchEvent.TOUCHEND,this.OnTouchEndBubble,!1,this),this.TouchManager.removeTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_START_TYPE,this._preOnComponentTouchHoverStart,this),this.TouchManager.removeTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE,this._preOnComponentTouchHoverMove,this),this.TouchManager.removeTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_END_TYPE,this._preOnComponentTouchHoverEnd,this),this.TouchManager.removeTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,this._preOnComponentTouchHoverOut,this),this.TouchManager.removeTouchEventListener(t.ComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,this._preOnComponentTouchHoverOver,this),this.TouchManager.removeTouchEventListener(t.ComponentTouchEvent.TOUCH_CLICK_TYPE,this._preOnComponentTouchClick,this),this.TouchManager.removeTouchEventListener(t.ComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE,this._preOnComponentTouchDblClick,this)):(e.removeEvtListener(t.MouseEvent.CLICK,this.PreOnClick,!1,this),e.removeEvtListener(t.MouseEvent.DBLCLICK,this.PreOnDblClick,!1,this),e.removeEvtListener("contextmenu",this.PreOnContextMenu,!1,this),e.removeEvtListener(t.MouseEvent.MOUSEMOVE,this.PreOnMouseMove,!1,this),e.removeEvtListener(t.MouseEvent.MOUSEOVER,this.PreOnMouseOver,!1,this),e.removeEvtListener(t.MouseEvent.MOUSEOUT,this.PreOnMouseOut,!1,this),e.removeEvtListener(t.MouseEvent.MOUSEDOWN,this.PreOnMouseDown,!1,this),e.removeEvtListener(t.MouseEvent.MOUSEUP,this.PreOnMouseUp,!1,this),e.removeEvtListener(t.KeyboardEvent.KEYDOWN,this.OnKeyDown,!1,this),e.removeEvtListener(t.KeyboardEvent.KEYUP,this.OnKeyUp,!1,this),e.removeEvtListener(t.KeyboardEvent.KEYPRESS,this.OnKeyPress,!1,this),e.removeEvtListener(f.FOCUS,this.OnFocus,!1,this),e.removeEvtListener(f.BLUR,this.OnBlur,!1,this)),this.isDndSupported()){var i=this.getCtx().getContainer();for(var n in this._dndListeners)t.ToolkitUtils.removeDomEventListener(i,n,this._dndListeners[n],!1);this._dndListeners={},this._context.removeDndEventManager(this)}},t.EventManager.prototype.destroy=function(){this.CustomTooltipManager&&(this.CustomTooltipManager.removeTooltipEventListener(y.TOOLTIP_CLOSED_TYPE,this.OnActionTooltipClosed,this),this.CustomTooltipManager.removeTooltipEventListener(y.TOOLTIP_STARTED_TYPE,this.OnActionTooltipStarted,this))},t.EventManager.prototype.PreEventBubble=function(t){this.TouchManager.preEventBubble(t)},t.EventManager.prototype.setSelectionHandler=function(t){this._selectionHandler=t},t.EventManager.prototype.getSelectionHandler=function(t){return this._selectionHandler},t.EventManager.prototype.getPopupHandler=function(){return this.PopupHandler},t.EventManager.prototype.getMarqueeGlassPane=function(){return null},t.EventManager.prototype.setDragSource=function(e){this.DragSource=e,t.Agent.isTouchDevice()&&this.DragSource.setTouchManager(this.TouchManager)},t.EventManager.prototype.setContextMenuHandler=function(t){this.ContextMenuHandler=t},t.EventManager.prototype.setKeyboardHandler=function(e){t.Agent.isTouchDevice()||(this.KeyboardHandler=e)},t.EventManager.prototype.getKeyboardHandler=function(){return this.KeyboardHandler},t.EventManager.prototype.setFocusObj=function(t){var e=this.getFocus();if(t!=e&&(this.setFocus(t),e&&e.hideKeyboardFocusEffect(),this.ShowKeyboardFocusByDefault()&&t.showKeyboardFocusEffect(),this._currentKeyboardHandlerIdx>-1&&this._currentKeyboardHandlerIdx<this._keyboardHandlers.length)){var i=this._keyboardHandlers[this._currentKeyboardHandlerIdx];i!=this&&i.hideKeyboardFocusEffect()}this.setCurrentKeyboardHandler(this)},t.EventManager.prototype.setFocus=function(t){this.KeyboardHandler&&(this._focusedObj=t)},t.EventManager.prototype.getFocus=function(){return this.KeyboardHandler?this._focusedObj:null},t.EventManager.prototype.setFocused=function(t){var e=this.getFocus();e&&this.KeyboardHandler&&(t?this._shouldDisplayKeyboardFocus&&this._currentKeyboardHandlerIdx>=0&&this._currentKeyboardHandlerIdx<this._keyboardHandlers.length&&this._keyboardHandlers[this._currentKeyboardHandlerIdx]===this&&e.showKeyboardFocusEffect():e.hideKeyboardFocusEffect()),t||(this._shouldDisplayKeyboardFocus=!1)},t.EventManager.prototype.ShowKeyboardFocusByDefault=function(){return!1},t.EventManager.prototype.setTooltipsEnabled=function(t){this._tooltipsEnabled=t},t.EventManager.prototype.getTooltipsEnabled=function(t){return this._tooltipsEnabled},t.EventManager.prototype.GetLogicalObject=function(t,e){var i=this.GetLogicalObjectAndDisplayable(t,e);return i?i.logicalObject:null},t.EventManager.prototype.GetLogicalObjectAndDisplayable=function(t,e){for(var i=t;i;){if(i._logicalObjects)for(var n=0;n<i._logicalObjects.length;n++){var o=i._logicalObjects[n];if(o.eventManager==this){var r={};return r.logicalObject=o.logicalObject,r.displayable=i,r}}i=e?null:i.getParent()}return null},t.EventManager.prototype._getShowPopupBehaviors=function(t){if(t&&t.getShowPopupBehaviors)return t.getShowPopupBehaviors()},t.EventManager.prototype._getClientBehaviors=function(t){if(t&&t.getClientBehaviors)return t.getClientBehaviors()},t.EventManager.prototype.GetContextMenuType=function(e){var i=this.getSelectionHandler(e),n=i?i.getSelection().length:0;return n<=0?t.ContextMenuHandler.TYPE_BODY_CONTEXT_MENU:1==n?t.ContextMenuHandler.TYPE_CONTEXT_MENU:t.ContextMenuHandler.TYPE_MULTI_SELECT_CONTEXT_MENU},t.EventManager.prototype.GetTooltipColor=function(t,e,i){if(t&&t.getDatatipColor)return t.getDatatipColor()},t.EventManager.prototype.FireEvent=function(t,e){this._callback&&this._callback.call(this._callbackObj,t,e)},t.EventManager.prototype.fireSelectionEvent=function(e){var i=this.getSelectionHandler(e);if(i){var n=i.getSelectedIds(),o=t.EventFactory.newSelectionEvent(n);this._callback.call(this._callbackObj,o)}},t.EventManager.prototype.PreOnClick=function(e){if(this.IsDoubleClickable(e)){if(this._clickTimer&&this._clickTimer.isRunning()){var i=this._savedClickEvent;if(e.pageX==i.pageX&&e.pageY==i.pageY)return void this._savedClickCount++;this._clickTimer.stop(),this._onClickTimerEnd()}this._savedClickEvent=e,this._savedClickCount=1,this._clickTimer||(this._clickTimer=new t.Timer(this._context,250,this._onClickTimerEnd,this,1)),this._clickTimer.reset(),this._clickTimer.start()}else this._propagateEvent(t.MouseEvent.CLICK,e,this.OnClick)},t.EventManager.prototype._onClickTimerEnd=function(){var e=this._savedClickEvent;this._savedClickEvent=null,this._savedClickCount=0,e&&this._propagateEvent(t.MouseEvent.CLICK,e,this.OnClick)},t.EventManager.prototype.OnClick=function(e){var i=this.GetLogicalObject(this.GetCurrentTargetForEvent(e));if(this.OnClickInternal(e),this.ProcessSelectionEventHelper(i,e.ctrlKey),this._shouldDisplayKeyboardFocus=!1,i){if(this.KeyboardHandler&&i.getNextNavigable){var n=i.getNextNavigable(e);this.setFocusObj(n)}var o=!1;if(this._hasEventInfo(e)&&(o=this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)),!o){var r=new t.Point(e.pageX,e.pageY);(o=this.PopupHandler.processPopupHelper(i,this._getShowPopupBehaviors(i),[t.ShowPopupBehavior.TRIGGER_TYPE_ACTION,t.ShowPopupBehavior.TRIGGER_TYPE_CLICK],r,e))&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}if(!o){var s=this._getClientBehaviors(i);s&&(o=this.ClientBehaviorHandler.processClick(i,s))}if(!o&&i.isCommandComponent&&i.isCommandComponent()){e=t.EventFactory.newActionEvent("action",i.getId());t.EventManager._addContextInfo(i,e),this._callback.call(this._callbackObj,e)}}},t.EventManager.prototype.IsDoubleClickable=function(e){for(var i=e.target,n=this.GetLogicalObject(this.GetCurrentTargetForEvent(e));i;){var o=this.GetLogicalObject(i,!0);if(o){if(o.isDoubleClickable&&o.isDoubleClickable()||this.PopupHandler.hasPopup(n,[t.ShowPopupBehavior.TRIGGER_TYPE_DBL_CLICK]))return!0;if(!this.IsPropagationEnabled(t.MouseEvent.DBLCLICK,null,i))return!1}i=i.getParent()}return!1},t.EventManager.prototype.ProcessSelectionEventHelper=function(t,e){var i=this.getSelectionHandler(t);i&&(i.processClick(t,e)&&this.fireSelectionEvent(t))},t.EventManager.prototype.PreOnDblClick=function(e){var i=this.IsDoubleClickable(e);(i&&2===this._savedClickCount||!i)&&this._propagateEvent(t.MouseEvent.DBLCLICK,e,this.OnDblClick),this._savedClickCount=0},t.EventManager.prototype.OnDblClick=function(e){var i=this.GetLogicalObject(this.GetCurrentTargetForEvent(e));if(this._clickTimer&&this._clickTimer.isRunning())this._clickTimer.stop(),this._savedClickEvent=null;else if(t.Agent.isPlatformIE()&&t.Agent.getVersion()<11){if(!i)return;if(!(i.isDoubleClickable&&i.isDoubleClickable()||this.PopupHandler.hasPopup(i,[t.ShowPopupBehavior.TRIGGER_TYPE_DBL_CLICK])))return void this.OnClick(e)}if(this.OnDblClickInternal(e),i){var n=!1;if(this._hasEventInfo(e)&&(n=this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)),!n){var o=new t.Point(e.pageX,e.pageY);(n=this.PopupHandler.processPopupHelper(i,this._getShowPopupBehaviors(i),[t.ShowPopupBehavior.TRIGGER_TYPE_DBL_CLICK],o,e))&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}}},t.EventManager.prototype.PreOnContextMenu=function(t){this._propagateEvent("contextmenu",t,this.OnContextMenu)},t.EventManager.prototype.OnContextMenu=function(t){var e=this.GetLogicalObject(this.GetCurrentTargetForEvent(t));e&&e.getNextNavigable&&this.setFocus(e),this._onContextMenuHelper(t,e)},t.EventManager.prototype._onContextMenuHelper=function(e,i){if(this.OnContextMenuInternal(e),this._processActionPopup(this.GetCurrentTargetForEvent(e),new t.Point(e.pageX,e.pageY))&&e.preventDefault(),i&&i.isSelectable&&i.isSelectable()&&this.ProcessSelectionEventHelper(i,e.ctrlKey),this.ContextMenuHandler){var n=this.GetContextMenuType(i);this.ProcessContextMenuHandler(e,n)}else this.ProcessContextMenuPopup(e,i)},t.EventManager.prototype.ProcessContextMenuHandler=function(t,e){var i=this.ContextMenuHandler.show(t,e);return!!i&&(this._context.getTooltipManager().hideTooltip(),this.PopupHandler.HidePopup(t),this._callback.call(this._callbackObj,i),!0)},t.EventManager.prototype.ProcessContextMenuPopup=function(e,i){var n=!1;if(this._hasEventInfo(e)&&(n=this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)),!n){var o=this._getShowPopupBehaviors(i);if(o){var r,s;if(t.Agent.isTouchDevice()){var a=e.touch;r=a.pageX,s=a.pageY}else r=e.pageX,s=e.pageY;var l=new t.Point(r,s);n=this.PopupHandler.processPopupHelper(i,o,[t.ShowPopupBehavior.TRIGGER_TYPE_CONTEXT_MENU],l,e)}n&&(this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0),e.preventDefault())}},t.EventManager.prototype.OnKeyDown=function(e){this._bKeyDown=!0;var i,n,o=e.keyCode,r=!1;for(i=this._currentKeyboardHandlerIdx<0||this._currentKeyboardHandlerIdx>this._keyboardHandlers.length?o==t.KeyboardEvent.TAB&&e.shiftKey?this._keyboardHandlers.length-1:0:this._currentKeyboardHandlerIdx,n=o==t.KeyboardEvent.TAB&&e.shiftKey?-1:1;i>=0&&i<this._keyboardHandlers.length&&!r;i+=n){var s=this._keyboardHandlers[i];(r=s===this?this.ProcessKeyboardEvent(e):s.handleKeyboardEvent(e))&&(this._currentKeyboardHandlerIdx=i)}return r||e.keyCode!=t.KeyboardEvent.UP_ARROW&&e.keyCode!=t.KeyboardEvent.DOWN_ARROW&&e.keyCode!=t.KeyboardEvent.LEFT_ARROW&&e.keyCode!=t.KeyboardEvent.RIGHT_ARROW||t.EventManager.consumeEvent(e),r||o!=t.KeyboardEvent.TAB||(this._currentKeyboardHandlerIdx=-1),r},t.EventManager.prototype.handleKeyboardEvent=function(t){return this.OnKeyDown(t)},t.EventManager.prototype.hideKeyboardFocusEffect=function(){var t=this.getFocus();t&&t.isShowingKeyboardFocusEffect()&&t.hideKeyboardFocusEffect()},t.EventManager.prototype.ProcessKeyboardEvent=function(e){if(!this.KeyboardHandler)return!1;this.hideTooltip();var i,n,o=this.getFocus();if(e.keyCode==t.KeyboardEvent.TAB&&o)return o.isShowingKeyboardFocusEffect()?(this._bKeyDown=!1,o.hideKeyboardFocusEffect(),this.ProcessRolloverEvent(e,o,!1),!!(n=e.shiftKey?this._context.previousKeyboardFocus():this._context.nextKeyboardFocus())&&(n.FireListener(e,!1),t.EventManager.consumeEvent(e),!0)):(this.ShowFocusEffect(e,o),this.ProcessRolloverEvent(e,o,!0),t.EventManager.consumeEvent(e),!0);if(o&&this.KeyboardHandler.isContextMenuEvent(e)){var r;if(o.getContextMenuLocation)r=o.getContextMenuLocation();else{var s=o.getKeyboardBoundingBox();r=t.Agent.isRightToLeft(this._context)?new t.Point(s.x,s.y):new t.Point(s.x+s.w,s.y)}var a=t.DomEventFactory.generateMouseEventFromKeyboardEvent(e,this._context,t.MouseEvent.CLICK,this._context.getStage(),r.x,r.y);return a.ctrlKey=!1,this._onContextMenuHelper(a,o),!0}return!!(i=this.KeyboardHandler.processKeyDown(e))&&(this.setFocus(i),this._shouldDisplayKeyboardFocus=!0,o&&(o.hideKeyboardFocusEffect(),this.ProcessRolloverEvent(e,o,!1)),this.KeyboardHandler.isSelectionEvent(e)?this.ProcessSelectionEventHelper(i,e.shiftKey):this.KeyboardHandler.isMultiSelectEvent(e)&&this.ProcessSelectionEventHelper(i,e.ctrlKey),this.ShowFocusEffect(e,i),this.ProcessRolloverEvent(e,i,!0),!0)},t.EventManager.prototype.ShowFocusEffect=function(t,e){e.showKeyboardFocusEffect();var i=e.getKeyboardTooltipLocation?e.getKeyboardTooltipLocation():e.getKeyboardBoundingBox(this.getCtx().getStage()).getCenter(),n=this.getCtx().stageToPageCoords(i.x,i.y);this.ProcessObjectTooltip(t,n.x,n.y,e,e.getTargetElem()),this.UpdateActiveElement(e)},t.EventManager.prototype.OnKeyUp=function(e){this._bKeyDown=!1,!0===this._handleExternalKeyboardFocus&&e.keyCode==t.KeyboardEvent.TAB&&(this._handleExternalKeyboardFocus=!1,this._callbackObj.dispatchDisplayableEvent(t.KeyboardEvent.KEYDOWN,e)),this.KeyboardHandler.processKeyUp(e,[t.ShowPopupBehavior.TRIGGER_TYPE_KEY_UP])},t.EventManager.prototype.OnKeyPress=function(e){this.KeyboardHandler.processKeyUp(e,[t.ShowPopupBehavior.TRIGGER_TYPE_KEY_PRESS])},t.EventManager.prototype.PreOnMouseMove=function(e){this._propagateEvent(t.MouseEvent.MOUSEMOVE,e,this.OnMouseMove)},t.EventManager.prototype.OnMouseMove=function(e){var i=e.pageX,n=e.pageY,o=this.GetCurrentTargetForEvent(e),r=this.GetLogicalObject(o);if(r){this.ProcessObjectTooltip(e,i,n,r,o);var s=new t.Point(i,n);if(this.PopupHandler.processMouseMove(s),!this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)){var a=this.GetLogicalObjectAndDisplayable(o);a&&this.PopupHandler.processMousePopup(r,this._getShowPopupBehaviors(r),s,a.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_MOVE)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}this.DragSource&&!e.dragSourceSet&&this.IsDragCandidate(r)&&(this.DragSource.setDragCandidate(r),e.dragSourceSet=!0)}},t.EventManager.prototype.PreOnMouseOver=function(e){this._propagateEvent(t.MouseEvent.MOUSEOVER,e,this.OnMouseOver),this._handlePreOverEvent(e)},t.EventManager.prototype._getDisplayableHierarchy=function(t,e,i){for(var n=[],o=t;o;){var r=!0;e&&(r=e.call(i,o)),r&&n.unshift(o),o=o.getParent()}return n},t.EventManager.prototype._getRolloverHierarchy=function(t){return this._getDisplayableHierarchy(t,this._isRolloverType,this)},t.EventManager.prototype._isRolloverType=function(t){var e=this.GetLogicalObject(t,!0);if(e)for(var i=0;i<this._rolloverTypes.length;i++)if(e instanceof this._rolloverTypes[i])return!0;return!1},t.EventManager.prototype.addRolloverType=function(t){this._rolloverTypes.push(t)},t.EventManager.prototype.removeRolloverType=function(e){var i=t.ArrayUtils.getIndex(this._rolloverTypes,e);-1!=i&&this._rolloverTypes.splice(i,1)},t.EventManager.prototype.OnRollOver=function(t){},t.EventManager.prototype.OnMouseOver=function(e){var i=this.GetCurrentTargetForEvent(e),n=this.GetLogicalObjectAndDisplayable(i),o=null;n&&(o=n.logicalObject);var r=new t.Point(e.pageX,e.pageY);if(o){var s=this.getSelectionHandler(o);s&&s.processMouseOver(o),this.ProcessRolloverEvent(e,o,!0),this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)||n&&this.PopupHandler.processMousePopup(o,this._getShowPopupBehaviors(o),r,n.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_OVER)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0),this.UpdateActiveElement(o,i)}},t.EventManager.prototype.PreOnMouseOut=function(e){this._handlePreOutEvent(t.MouseEvent.MOUSEOUT,e,this.OnMouseOut)},t.EventManager.prototype.OnRollOut=function(t){},t.EventManager.prototype.OnMouseOut=function(e){var i=this.GetCurrentTargetForEvent(e),n=this.GetLogicalObject(i);if(n&&n!=this.GetLogicalObject(e.relatedTarget)){var o=this.getSelectionHandler(n);if(o&&o.processMouseOut(n),this.ProcessRolloverEvent(e,n,!1),this.hideTooltip(),this.DragSource&&!e.dragSourceSet&&(this.DragSource.setDragCandidate(null),e.dragSourceSet=!0),!this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)){var r=new t.Point(e.pageX,e.pageY),s=this.GetLogicalObjectAndDisplayable(i);s&&this.PopupHandler.processMousePopup(n,this._getShowPopupBehaviors(n),r,s.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_OUT)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}}},t.EventManager.prototype.PreOnMouseDown=function(e){this._propagateEvent(t.MouseEvent.MOUSEDOWN,e,this.OnMouseDown)},t.EventManager.prototype.OnMouseDown=function(e){this.isInActionPopup()&&this.CustomTooltipManager.closeActionTooltip();var i=this.GetCurrentTargetForEvent(e),n=this.GetLogicalObject(i);if(this.DragSource&&!e.dragSourceSet&&this.IsDragCandidate(n)&&(this.DragSource.setDragCandidate(n),e.dragSourceSet=!0),!this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)){var o=new t.Point(e.pageX,e.pageY),r=this.GetLogicalObjectAndDisplayable(i);r&&this.PopupHandler.processMousePopup(n,this._getShowPopupBehaviors(n),o,r.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_DOWN)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}},t.EventManager.prototype.PreOnMouseUp=function(e){this._propagateEvent(t.MouseEvent.MOUSEUP,e,this.OnMouseUp)},t.EventManager.prototype.OnMouseUp=function(e){var i=this.GetCurrentTargetForEvent(e),n=this.GetLogicalObject(i);if(!this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)){var o=new t.Point(e.pageX,e.pageY),r=this.GetLogicalObjectAndDisplayable(i);r&&this.PopupHandler.processMousePopup(n,this._getShowPopupBehaviors(n),o,r.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_UP)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}},t.EventManager.prototype._processTouchTooltip=function(e){var i=this.TouchManager.getTooltipInfo(),n=i.touchIds,o=i.tooltipTarget;if(this.GetEventInfo(e,t.EventManager._EVENT_INFO_TOOLTIP_DISPLAYED_KEY)||0!=n.length&&o){var r=this.TouchManager.calcAveragePosition(n),s=this.GetLogicalObject(o);this.ProcessObjectTooltip(e,r.x,r.y,s,null)}else this.hideTooltip()},t.EventManager.prototype.OnTouchStartBubble=function(e){if(this.PreEventBubble(e),e.isInitialTouch()&&(this._popupJustClosed=!1),this.DragSource){var i=this.GetLogicalObject(e.target);!e.dragSourceSet&&this.IsDragCandidate(i)&&(this.DragSource.setDragCandidate(i),e.dragSourceSet=!0)}this.isInActionPopup()&&(this.CustomTooltipManager.closeActionTooltip(),this.TouchManager.resetTouchHold()),this.HandleImmediateTouchStartInternal(e),this.TouchManager.fireLogicalEvents(e),this.TouchManager.postEventBubble(e),this.isTouchResponseTouchStart()?(this._touchResponseHandled=!0,this.TouchManager.processAssociatedTouchAttempt(e,t.EventManager.TOUCH_RESPONSE_TOUCH_START,this._saveTouchStart,this)):(this._touchResponseHandled=!1,this._processTouchTooltip(e))},t.EventManager.prototype.OnTouchMoveBubble=function(t){this.PreEventBubble(t),this.TouchManager&&(this._prevActionClear=!1,this.HandleImmediateTouchMoveInternal(t),this.TouchManager.fireLogicalEvents(t),this.TouchManager.postEventBubble(t),this._processTouchTooltip(t))},t.EventManager.prototype._handleTouchEndTimer=function(){for(var t=0;t<this._touchEndTimer.length;t++){var e=this._touchEndTimer[t];e.timer.stop();var i=e.event;this.TouchManager&&(this.HandleImmediateTouchEndInternal(i),this.TouchManager.fireLogicalEvents(i),this.TouchManager.postEventBubble(i))}this.DragSource&&!i.dragSourceSet&&(this.DragSource.setDragCandidate(null),i.dragSourceSet=!0),this._touchEndTimer=new Array},t.EventManager.prototype.OnTouchEndBubble=function(e){this.PreEventBubble(e);var i=new t.Timer(this._context,0,this._handleTouchEndTimer,this,1);this._touchEndTimer||(this._touchEndTimer=new Array),this._touchEndTimer.push({event:e,timer:i}),i.start()},t.EventManager.prototype.HandleImmediateTouchStartInternal=function(t){},t.EventManager.prototype.HandleImmediateTouchMoveInternal=function(t){},t.EventManager.prototype.HandleImmediateTouchEndInternal=function(t){},t.EventManager.prototype._preOnComponentTouchHoverStart=function(e){this._propagateEvent(t.ComponentTouchEvent.TOUCH_HOVER_START_TYPE,e,this.OnComponentTouchHoverStart)},t.EventManager.prototype.OnComponentTouchHoverStart=function(t){this.HandleTouchHoverStartInternal(t),this._touchResponseHandled||this.HandleTouchActionsStart(t)},t.EventManager.prototype._preOnComponentTouchHoverMove=function(e){this._propagateEvent(t.ComponentTouchEvent.TOUCH_HOVER_MOVE_TYPE,e,this.OnComponentTouchHoverMove)},t.EventManager.prototype.OnComponentTouchHoverMove=function(t){this.HandleTouchHoverMoveInternal(t),this._touchResponseHandled||this.HandleTouchActionsMove(t)},t.EventManager.prototype._preOnComponentTouchHoverEnd=function(e){this._propagateEvent(t.ComponentTouchEvent.TOUCH_HOVER_END_TYPE,e,this.OnComponentTouchHoverEnd)},t.EventManager.prototype.OnComponentTouchHoverEnd=function(e){var i=this.GetCurrentTargetForEvent(e),n=this.GetLogicalObject(i);if(this.HandleTouchHoverEndInternal(e),this.ProcessTouchContextMenu(e,n),this._callbackObj instanceof t.BaseComponent){var o=this.getCtx().getStageAbsolutePosition(),r=e.touch.pageX,s=e.touch.pageY;r<=o.x+this._callbackObj.getWidth()&&r>=o.x&&s<=o.y+this._callbackObj.getHeight()&&s>=o.y&&this._callback.call(this._callbackObj,t.EventFactory.newTouchHoldReleaseEvent(e.getNativeEvent()))}this._touchResponseHandled||this.HandleTouchActionsEnd(e)},t.EventManager.prototype._preOnComponentTouchHoverOut=function(e){this._handlePreOutEvent(t.ComponentTouchEvent.TOUCH_HOVER_OUT_TYPE,e,this.OnComponentTouchHoverOut)},t.EventManager.prototype.OnComponentTouchHoverOut=function(t){this.HandleTouchHoverOutInternal(t),this._touchResponseHandled||this.HandleTouchActionsOut(t)},t.EventManager.prototype._preOnComponentTouchHoverOver=function(e){this._propagateEvent(t.ComponentTouchEvent.TOUCH_HOVER_OVER_TYPE,e,this.OnComponentTouchHoverOver),this._handlePreOverEvent(e)},t.EventManager.prototype.OnComponentTouchHoverOver=function(t){this.HandleTouchHoverOverInternal(t),this._touchResponseHandled||this.HandleTouchActionsOver(t)},t.EventManager.prototype._preOnComponentTouchDblClick=function(e){this._propagateEvent(t.ComponentTouchEvent.TOUCH_DOUBLE_CLICK_TYPE,e,this.OnComponentTouchDblClick)},t.EventManager.prototype.OnComponentTouchDblClick=function(e){var i=this.GetCurrentTargetForEvent(e),n=e.touch,o=this.GetLogicalObject(i),r=new t.Point(n.pageX,n.pageY),s=!1;this._hasEventInfo(e)&&(s=this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)),s||this.PopupHandler.processPopupHelper(o,this._getShowPopupBehaviors(o),[t.ShowPopupBehavior.TRIGGER_TYPE_DBL_CLICK],r,e)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0),this.HandleTouchDblClickInternal(e)},t.EventManager.prototype._preOnComponentTouchClick=function(e){this._propagateEvent(t.ComponentTouchEvent.TOUCH_CLICK_TYPE,e,this.OnComponentTouchClick)},t.EventManager.prototype.OnComponentTouchClick=function(e){var i=this.GetCurrentTargetForEvent(e),n=e.touch,o=this.GetLogicalObject(i),r=new t.Point(n.pageX,n.pageY),s=!1;if(this._hasEventInfo(e)&&(s=this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)),s||this.PopupHandler.processPopupHelper(o,this._getShowPopupBehaviors(o),[t.ShowPopupBehavior.TRIGGER_TYPE_ACTION,t.ShowPopupBehavior.TRIGGER_TYPE_CLICK],r,e,!0)&&(this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0),s=!0),!s){var a=this._getClientBehaviors(o);a&&this.ProcessClientBehaviorForTouch(o,a)}if(!this.HandleTouchClickInternal(e)&&(this.isTouchResponseTouchStart()||this._processTouchSelection(o),this._popupJustClosed||this._processTouchSelectionClear(o),this.CustomTooltipManager.displayActionPopup()&&(this.UpdateActionTooltipLaunchedFeedback(i,new t.Point(n.pageX,n.pageY)),this.CustomTooltipManager.startActionPopupAtPosition(n.pageX,n.pageY,i)),o&&!s&&o.isCommandComponent&&o.isCommandComponent())){e=t.EventFactory.newActionEvent("action",o.getId());t.EventManager._addContextInfo(o,e),this._callback.call(this._callbackObj,e)}},t.EventManager.prototype._processTouchSelection=function(t){var e=this.getSelectionHandler(t);e&&t&&t.isSelectable&&t.isSelectable()&&e.processClick(t,!0)&&this.fireSelectionEvent(t),this._prevActionClear=!1},t.EventManager.prototype._processTouchSelectionClear=function(e){var i=this.getSelectionHandler(e);if(i&&(!e||!e.isSelectable||!e.isSelectable())&&!this._prevActionClear){var n=!1;if(this.isClearMenuAllowed(e))i.getType()==t.SelectionHandler.TYPE_MULTIPLE&&i.getSelectedCount()>1&&(n=!0);n?this.addClearAllActionItem():i.processClick(null,!1)&&this.fireSelectionEvent(e)}},t.EventManager.prototype.OnActionTooltipClosed=function(e){var i=e.target;this._popupJustClosed=!0,this._isInActionPopup=!1,this.CustomTooltipManager.getActionTooltip().containsMenuId(t.EventManager.CLEAR_SELECTION_ACTION_TYPE)&&(this._prevActionClear=!0),this.CustomTooltipManager.clearActionTooltip(),this.UpdateActionTooltipClosedFeedback(i)},t.EventManager.prototype.OnActionTooltipStarted=function(t){this._isInActionPopup=!0},t.EventManager.prototype._getTooltipInfo=function(t,e,i,n){var o=null,r=!1;return e&&e.getDatatip&&(o=e.getDatatip(t,i,n))&&(r=!0),!o&&e&&e.getTooltip&&(o=e.getTooltip(t,i,n)),{text:o,isDatatip:r}},t.EventManager.prototype._processShowTooltip=function(t,e,i,n){if(this.getTooltipsEnabled(e)){var o=this._context.pageToStageCoords(i,n),r=o.x,s=o.y,a=this._getTooltipInfo(t,e,r,s),l=a.isDatatip,h=a.text;if(h){this.CustomTooltipManager.clearActionTooltip();var u=this.GetTooltipColor(e,r,s),c=this._context.getTooltipManager();return l?c.showDatatip(i,n,h,u):c.showTooltip(i,n,h,null,!0,u),this.TooltipLaunched(h,u),this.DispatchElementEvent("tooltiplaunched"),!0}this.hideTooltip()}else this.hideTooltip();return!1},t.EventManager.prototype.hideTooltip=function(){var t=this._context.getTooltipManager();t&&t.hideTooltip(),this.TooltipHidden()},t.EventManager.prototype.ProcessTouchContextMenu=function(e,i){if(this.ContextMenuHandler){var n=this.GetContextMenuType(i),o=!1;return i&&i.isSelected&&i.isSelected()?o=!0:(i&&i.isSelectable&&i.isSelectable()||(n=t.ContextMenuHandler.TYPE_BODY_CONTEXT_MENU),n==t.ContextMenuHandler.TYPE_BODY_CONTEXT_MENU&&(o=!0)),!!o&&this.ProcessContextMenuHandler(e,n)}this.ProcessContextMenuPopup(e,i)},t.EventManager.prototype._processActionPopup=function(t,e){return this.CustomTooltipManager.displayActionPopup()?(this.SetupTouchTooltip(t),this.UpdateActionPopupShownFeedback(t),this.CustomTooltipManager.startActionPopupAtPosition(e.x,e.y,t),!0):(this.UpdateActionPopupHiddenFeedback(t),!1)},t.EventManager.prototype.TooltipLaunched=function(t,e){},t.EventManager.prototype.TooltipHidden=function(){},t.EventManager.prototype.SetupTouchTooltip=function(t){var e=this.GetLogicalObject(t),i=this.CustomTooltipManager.getActionTooltip();if(null==i.getTooltipBorderColor()){var n=this.GetTooltipColor(e);i.setTooltipBorderColor(n)}},t.EventManager.prototype.OnContextMenuInternal=function(t){},t.EventManager.prototype.OnClickInternal=function(t){},t.EventManager.prototype.OnDblClickInternal=function(t){},t.EventManager.prototype.HandleTouchHoverStartInternal=function(t){},t.EventManager.prototype.HandleTouchHoverMoveInternal=function(t){},t.EventManager.prototype.HandleTouchHoverEndInternal=function(t){},t.EventManager.prototype.HandleTouchHoverOverInternal=function(t){},t.EventManager.prototype.HandleTouchHoverOutInternal=function(t){},t.EventManager.prototype.HandleTouchClickInternal=function(t){return!1},t.EventManager.prototype.HandleTouchDblClickInternal=function(t){},t.EventManager.prototype.UpdateActionPopupShownFeedback=function(t){},t.EventManager.prototype.UpdateActionPopupHiddenFeedback=function(t){},t.EventManager.prototype.UpdateActionTooltipClosedFeedback=function(t){},t.EventManager.prototype.UpdateActionTooltipLaunchedFeedback=function(t,e){},t.EventManager.prototype.isInActionPopup=function(){return this._isInActionPopup},t.EventManager.prototype.GetClearSelectionText=function(){return t.Bundle.getTranslatedString(t.Bundle.UTIL_PREFIX,"CLEAR_SELECTION")},t.EventManager.prototype.addClearAllActionItem=function(){var e=this.CustomTooltipManager.getActionTooltip(),i=e.getMenuItems();e&&i.length>0&&i[i.length-1].getId()===t.EventManager.CLEAR_SELECTION_ACTION_TYPE||(this.addActionTooltipMenuItem(t.EventManager.CLEAR_SELECTION_ACTION_TYPE,this.GetClearSelectionText(),this._actionTooltipClearListener,this),e&&e.setTooltipBorderColor(k.DEFAULT_BORDER_COLOR))},t.EventManager.prototype.isClearMenuAllowed=function(t){return!0},t.EventManager.prototype.addActionTooltipMenuItem=function(t,e,i,n){this.CustomTooltipManager.getActionTooltip().addMenuItem(new B(this._context,t,e,i,n))},t.EventManager.prototype.ContextMenuItemListener=function(t){var e=t.menuItem.getEvent();this._callback.call(this._callbackObj,e)},t.EventManager.prototype._actionTooltipClearListener=function(t){var e=t.target,i=this.GetLogicalObject(e);this.getSelectionHandler(i).processClick(null,!1)&&this.fireSelectionEvent(i)},t.EventManager.prototype._actionTooltipSelectListener=function(t){var e=t.target,i=this.GetLogicalObject(e);this.getSelectionHandler(i).processClick(i,!0)&&this.fireSelectionEvent(i)},t.EventManager.consumeEvent=function(t){t&&(t.preventDefault(),t.stopPropagation())},t.EventManager._addContextInfo=function(e,i){if(e.getContextCallback&&e.getContextCallbackObj){var n=e.getContextCallback(),o=e.getContextCallbackObj();n&&o&&n.call(o,i)}else i[t.BaseComponentEvent.CLIENT_ROW_KEY]=e.getId()},t.EventManager.prototype.IsPropagationEnabled=function(t,e,i){return!1},t.EventManager.prototype.GetCurrentTargetForEvent=function(e){var i=this.GetEventInfo(e,t.EventManager._EVENT_INFO_CURRENT_TARGET_KEY);return i||e.target},t.EventManager.prototype._propagateEvent=function(e,i,n){if(this.GetLogicalObject(i.target)){var o=i.target;try{for(;o;){if(this.GetLogicalObject(o,!0)&&(this.SetEventInfo(i,t.EventManager._EVENT_INFO_CURRENT_TARGET_KEY,o),n.call(this,i),!this.IsPropagationEnabled(e,i,o)))return;o=o.getParent()}}finally{this.SetEventInfo(i,t.EventManager._EVENT_INFO_CURRENT_TARGET_KEY,null)}}else n.call(this,i)},t.EventManager.prototype.ConsumesClick=function(t){return t.isSelectable&&t.isSelectable()||t.isClickEventPropagationStopped&&t.isClickEventPropagationStopped()||this._hasClickPopup(t)||this._hasClickClientBehavior(t)},t.EventManager.prototype._hasClickPopup=function(e){return this.PopupHandler.hasPopup(e,[t.ShowPopupBehavior.TRIGGER_TYPE_ACTION,t.ShowPopupBehavior.TRIGGER_TYPE_CLICK])},t.EventManager.prototype.addComponentKeyboardHandler=function(t){t&&this._keyboardHandlers.push(t)},t.EventManager.prototype.addComponentKeyboardHandlerAt=function(t,e){e>this._keyboardHandlers.length||t&&(this._keyboardHandlers.splice(e,0,t),e<=this._currentKeyboardHandlerIdx&&this._currentKeyboardHandlerIdx++)},t.EventManager.prototype.removeComponentKeyboardHandler=function(t){if(t){var e=this._findHandler(t);e>-1&&(this._currentKeyboardHandlerIdx==e&&0==e?this._currentKeyboardHandlerIdx=0:e<=this._currentKeyboardHandlerIdx&&this._currentKeyboardHandlerIdx--,this._keyboardHandlers.splice(e,1))}},t.EventManager.prototype._findHandler=function(t){for(var e=-1,i=this._keyboardHandlers.length,n=0;n<i;n++)this._keyboardHandlers[n]===t&&(e=n);return e},t.EventManager.prototype.setCurrentKeyboardHandler=function(t){var e=this._findHandler(t);e>=0&&(this._currentKeyboardHandlerIdx=e)},t.EventManager.prototype._hasClickClientBehavior=function(e){var i=this._getClientBehaviors(e);if(i)for(var n=0;n<i.length;n++){var o=i[n];if(o&&(o.getTriggerType()==t.ClientBehavior.TRIGGER_TYPE_ACTION||o.getTriggerType()==t.ClientBehavior.TRIGGER_TYPE_CLICK))return!0}return!1},t.EventManager.prototype.CreateClientBehaviorHandler=function(e,i,n){return new t.ClientBehaviorHandler(e,i,n)},t.EventManager.prototype.ProcessClientBehaviorForTouch=function(t,e){return this.ClientBehaviorHandler.processClick(t,e)},t.EventManager.prototype.IsDragCandidate=function(t){return!0},t.EventManager._getActiveElementId=function(){return"_dvtActiveElement"+Math.floor(1e9*Math.random())},t.EventManager.prototype.UpdateActiveElement=function(e,i){if(i||(i=e.getDisplayable?e.getDisplayable():e.getDisplayables?e.getDisplayables()[0]:e),i instanceof t.Displayable){if(e.getAriaLabel){var n=e.getAriaLabel();n&&i.setAriaProperty("label",n)}else for(;!i.getAriaRole()&&i.getParent();)i=i.getParent();i!=this.getCtx().getStage()&&this.getCtx().setActiveElement(i)}},t.EventManager.prototype._handlePreOverEvent=function(e){var i=this._getRolloverHierarchy(e.target),n=this._getRolloverHierarchy(e.relatedTarget);if(i.length>0){var o=i[i.length-1];if(o!=(0==n.length?null:n[n.length-1]))try{this.SetEventInfo(e,t.EventManager._EVENT_INFO_CURRENT_TARGET_KEY,o),this.OnRollOver(e)}finally{this.SetEventInfo(e,t.EventManager._EVENT_INFO_CURRENT_TARGET_KEY,null)}}},t.EventManager.prototype._handlePreOutEvent=function(e,i,n){var o=this.GetLogicalObject(i.relatedTarget),r=i.target;try{var s=this._getRolloverHierarchy(i.target),a=this._getRolloverHierarchy(i.relatedTarget);if(s.length>0){var l=s[s.length-1];l!=(0==a.length?null:a[a.length-1])&&(this.SetEventInfo(i,t.EventManager._EVENT_INFO_CURRENT_TARGET_KEY,l),this.OnRollOut(i))}var h=this.GetLogicalObject(r);if(h)for(this.PopupHandler.processMouseOut(h,this._getDisplayableHierarchy(i.relatedTarget),i);r;){var u=this.GetLogicalObject(r,!0);if(u){if(o===u)break;if(this.SetEventInfo(i,t.EventManager._EVENT_INFO_CURRENT_TARGET_KEY,r),n.call(this,i),!this.IsPropagationEnabled(e,i,r))break}r=r.getParent()}else n.call(this,i)}finally{this.SetEventInfo(i,t.EventManager._EVENT_INFO_CURRENT_TARGET_KEY,null)}},t.EventManager.prototype.getTouchManager=function(){return this.TouchManager},t.EventManager.prototype.endDrag=function(){return null},t.EventManager.prototype._hasEventInfo=function(t){return null!=t&&!!t.getNativeEvent()._eventInfo},t.EventManager.prototype.GetEventInfo=function(t,e){if(!this._hasEventInfo(t)||null==e)return null;var i;if(this.StoreInfoByEventType(e)){var n=t.type?t.type:t.getType();i=t.getNativeEvent()._eventInfo[n]}else i=t.getNativeEvent()._eventInfo;return i?i[e]:null},t.EventManager.prototype.SetEventInfo=function(t,e,i){if(null!=t&&null!=e){var n=t.getNativeEvent();if(n._eventInfo||(n._eventInfo={}),this.StoreInfoByEventType(e)){var o=t.type?t.type:t.getType();n._eventInfo[o]||(n._eventInfo[o]={}),n._eventInfo[o][e]=i}else n._eventInfo[e]=i}},t.EventManager.prototype.StoreInfoByEventType=function(e){return e!=t.EventManager._EVENT_INFO_TOOLTIP_DISPLAYED_KEY},t.EventManager.prototype.ProcessObjectTooltip=function(e,i,n,o,r){this.GetEventInfo(e,t.EventManager._EVENT_INFO_TOOLTIP_DISPLAYED_KEY)||this._processShowTooltip(r,o,i,n)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_TOOLTIP_DISPLAYED_KEY,!0)},t.EventManager.prototype._resetExternalKeyboardFocus=function(){this._handleExternalKeyboardFocus=!1},t.EventManager.prototype.OnFocus=function(e){this._handleExternalKeyboardFocus=!1,this._bKeyDown||e.isPropagationStopped()||(this._handleExternalKeyboardFocus=!0,this._keyboardFocusTimer||(this._keyboardFocusTimer=new t.Timer(this._context,200,this._resetExternalKeyboardFocus,this,1)),this._keyboardFocusTimer.reset(),this._keyboardFocusTimer.start(),e.stopPropagation())},t.EventManager.prototype.OnBlur=function(t){this._bKeyDown=!1;var e=this.getFocus();e&&e.isShowingKeyboardFocusEffect()&&e.hideKeyboardFocusEffect()},t.EventManager.prototype.ProcessRolloverEvent=function(t,e,i){},t.EventManager.prototype.CreateCategoryRolloverHandler=function(e,i){return new t.CategoryRolloverHandler(e,i)},t.EventManager.prototype.GetTouchResponse=function(){return t.EventManager.TOUCH_RESPONSE_TOUCH_START},t.EventManager.prototype.isTouchResponseTouchStart=function(){var e=this.GetTouchResponse();if(e===t.EventManager.TOUCH_RESPONSE_TOUCH_START)return!0;if(e===t.EventManager.TOUCH_RESPONSE_TOUCH_HOLD)return!1;for(var i=this.getCtx().getSvgDocument().parentElement.parentElement;i&&"HTML"!==i.nodeName;){var n=window.getComputedStyle(i);if("hidden"!==n.overflow&&(i.scrollWidth>i.clientWidth+t.EventManager._TOUCH_RESPONSE_PADDING_CHECK&&"hidden"!==n["overflow-x"]||i.scrollHeight>i.clientHeight+t.EventManager._TOUCH_RESPONSE_PADDING_CHECK&&"hidden"!==n["overflow-y"])||window.frameElement&&"IFRAME"==window.frameElement.nodeName)return!1;i=i.parentElement}return!0},t.EventManager.prototype._saveTouchStart=function(e,i){this.TouchManager.getTouchIdsForObj(t.EventManager.TOUCH_RESPONSE_TOUCH_START).length<=1&&(this.TouchManager.saveProcessedTouch(i.identifier,t.TouchManager.HOVER_TOUCH_KEY,null,t.TouchManager.HOVER_TOUCH_KEY,t.TouchManager.HOVER_TOUCH_KEY,this.HandleTouchActionsMove,this.HandleTouchActionsEnd,this),this.HandleTouchActionsStart(e))},t.EventManager.prototype.HandleTouchActionsStart=function(e){var i=this.GetCurrentTargetForEvent(e),n=this.GetLogicalObject(i),o=e instanceof t.ComponentTouchEvent?e.touch:e.touches[0],r=o.pageX,s=o.pageY;if(e instanceof t.ComponentTouchEvent||(this._touchMap[o.identifier]||(this._touchMap[o.identifier]={}),this._touchMap[o.identifier][t.TouchManager.PREV_HOVER_OBJ]=null,n&&this.HandleTouchActionsOver(e),this._touchMap[o.identifier][t.TouchManager.PREV_HOVER_OBJ]=n),n&&this.ProcessRolloverEvent(e,n,!0),this._processTouchTooltip(e),this._prevActionClear=!1,!this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)){var a=new t.Point(r,s),l=(i=this.GetCurrentTargetForEvent(e),this.GetLogicalObjectAndDisplayable(i));l&&this.PopupHandler.processMousePopup(n,this._getShowPopupBehaviors(n),a,l.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_DOWN)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}},t.EventManager.prototype.HandleTouchActionsMove=function(e){var i,n,o=e instanceof t.ComponentTouchEvent?e.touch:e.touches[0];if(e instanceof t.ComponentTouchEvent)i=this.GetCurrentTargetForEvent(e),n=this.GetLogicalObject(i);else{e.preventDefault(),i=t.SvgDocumentUtils.elementFromTouch(o),n=this.GetLogicalObject(i);var r=this._touchMap[o.identifier][t.TouchManager.PREV_HOVER_OBJ];if(r!=n){var s;if(r)r.getDisplayable?s=r.getDisplayable():r.getDisplayables&&(s=r.getDisplayables()[0]),s&&(e.target=s,this.HandleTouchActionsOut(e,o));e.target=i,n&&this.HandleTouchActionsOver(e)}this._touchMap[o.identifier][t.TouchManager.PREV_HOVER_OBJ]=n}n&&this.ProcessRolloverEvent(e,n,!0);var a=new t.Point(o.pageX,o.pageY);if(this.PopupHandler.processMouseMove(a),!this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)){var l=this.GetLogicalObjectAndDisplayable(i);l&&this.PopupHandler.processMousePopup(n,this._getShowPopupBehaviors(n),a,l.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_MOVE)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}},t.EventManager.prototype.HandleTouchActionsEnd=function(e,i){var n,o,r;e instanceof t.ComponentTouchEvent?(n=this.GetCurrentTargetForEvent(e),o=this.GetLogicalObject(n),i=e.touch):(e.preventDefault(),n=t.SvgDocumentUtils.elementFromTouch(i),(o=this.GetLogicalObject(n))&&(o.getDisplayable?r=o.getDisplayable():o.getDisplayables&&(r=o.getDisplayables()[0])),r&&(e.target=r,this.HandleTouchActionsOut(e,i)),this._touchMap[i.identifier][t.TouchManager.PREV_HOVER_OBJ]=null);var s=i.pageX,a=i.pageY;if(this._processTouchSelection(o),this._processActionPopup(n,new t.Point(s,a)),!this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)){var l=new t.Point(s,a),h=this.GetLogicalObjectAndDisplayable(n);h&&this.PopupHandler.processMousePopup(o,this._getShowPopupBehaviors(o),l,h.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_UP)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}},t.EventManager.prototype.HandleTouchActionsOver=function(e){var i=this.GetCurrentTargetForEvent(e),n=this.GetLogicalObject(i),o=e instanceof t.ComponentTouchEvent?e.touch:e.touches[0],r=new t.Point(o.pageX,o.pageY);n&&this.ProcessRolloverEvent(e,n,!0);var s=this.getSelectionHandler(n);if(s&&s.processMouseOver(n),!this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)){var a=this.GetLogicalObjectAndDisplayable(i);a&&this.PopupHandler.processMousePopup(n,this._getShowPopupBehaviors(n),r,a.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_OVER)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}},t.EventManager.prototype.HandleTouchActionsOut=function(e,i){var n=this.GetCurrentTargetForEvent(e),o=this.GetLogicalObject(n);e instanceof t.ComponentTouchEvent&&(i=e.touch),o&&this.ProcessRolloverEvent(e,o,!1);var r=this.getSelectionHandler(o);if(r&&r.processMouseOut(o),!this.GetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY)){var s=new t.Point(i.pageX,i.pageY),a=this.GetLogicalObjectAndDisplayable(n);a&&this.PopupHandler.processMousePopup(o,this._getShowPopupBehaviors(o),s,a.displayable,e,t.ShowPopupBehavior.TRIGGER_TYPE_MOUSE_OUT)&&this.SetEventInfo(e,t.EventManager._EVENT_INFO_POPUP_DISPLAYED_KEY,!0)}},t.EventManager.getComponent=function(){return null},t.EventManager.DROP_OFFSET_X_DATA_TYPE="text/_dvtDropOffsetX",t.EventManager.DROP_OFFSET_Y_DATA_TYPE="text/_dvtDropOffsetY",t.EventManager.prototype.isDndSupported=function(){return!1},t.EventManager.prototype.OnDndDragStart=function(e){var i=t.ToolkitUtils.getEventForSyntax(this._context,e),n=i.dataTransfer;if(!(i.dataTransfer.types&&i.dataTransfer.types.length>0)){var o=this._context.pageToStageCoords(e.pageX,e.pageY),r=this.DragSource.getDragTransferable(o.x,o.y),s=this.GetDragSourceType(e);if(null!=r&&null!=s){this._context.getTooltipManager().hideTooltip();var a=this._getDragOptions(e),l=a.dataTypes,h=a.dragStart;if(null!=l||h){var u=this.DragSource.getDragObject(),c=this.getSelectionHandler(u);if(c&&u.isSelected&&!u.isSelected()&&c.processClick(u,!1),u.hideHoverEffect&&u.hideHoverEffect(),null!=l){t.ArrayUtils.isArray(l)||(l=[l]);for(var p=this._getDragData(e),_=0;_<l.length;_++)n.setData(l[_],p)}var g=t.ToolkitUtils.getDragFeedback(this.DragSource.getDragOverFeedback(o.x,o.y),this._context.getStage()),d=g.svg,S=this.DragSource.getDragOffset(o.x,o.y);d.style.width=g.width+"px",d.style.height=g.height+"px",d.style.left=e.pageX-S.x+"px",d.style.top=e.pageY-S.y+"px",d.style.position="absolute",d.style.fontFamily=this._context.getDefaultFontFamily(),d.style.fontSize=this._context.getDefaultFontSize(),t.SvgDocumentUtils.disableMouseEvents(d),document.body.appendChild(d),t.Context.requestAnimationFrame(function(){document.body.removeChild(d)}),n.setDragImage(d,S.x,S.y);var f=this.GetDropOffset(e);if(f&&(n.setData(t.EventManager.DROP_OFFSET_X_DATA_TYPE,f.x),n.setData(t.EventManager.DROP_OFFSET_Y_DATA_TYPE,f.y)),h)h(i,this._getDragEventPayload(e))}else this._context.isLastDndEventManager(this)&&e.preventDefault()}else this._context.isLastDndEventManager(this)&&e.preventDefault()}},t.EventManager.prototype.OnDndDrag=function(t){this._handleDragSourceEvent(t,"drag")},t.EventManager.prototype.OnDndDragEnd=function(t){this._handleDragSourceEvent(t,"dragEnd")},t.EventManager.prototype.GetDragSourceType=function(t){return null},t.EventManager.prototype.GetDragDataContexts=function(){return[]},t.EventManager.prototype.GetDropOffset=function(t){return null},t.EventManager.prototype._getDragOptions=function(t){var e=this.GetDragSourceType(t);return this.getComponent().getOptions().dnd.drag[e]},t.EventManager.prototype._getDragEventPayload=function(t){var e={};return e[this.GetDragSourceType(t)]=this.GetDragDataContexts(),e},t.EventManager.prototype._getDragData=function(t){for(var e=this.GetDragDataContexts(),i=0;i<e.length;i++)e[i].component=void 0;return JSON.stringify(e)},t.EventManager.prototype._handleDragSourceEvent=function(e,i){if(null!=this.GetDragSourceType(e)){var n=this._getDragOptions(e)[i];if(n)n(t.ToolkitUtils.getEventForSyntax(this._context,e))}},t.EventManager.prototype.OnDndDragEnter=function(t){this._handleDropTargetEvent(t,"dragEnter",!0)},t.EventManager.prototype.OnDndDragOver=function(t){this._handleDropTargetEvent(t,"dragOver",!0)},t.EventManager.prototype.OnDndDragLeave=function(t){this._handleDropTargetEvent(t,"dragLeave",!1)},t.EventManager.prototype.OnDndDrop=function(t){this._handleDropTargetEvent(t,"drop",!1)},t.EventManager.prototype.GetDropTargetType=function(t){return null},t.EventManager.prototype.GetDropEventPayload=function(t){return null},t.EventManager.prototype.ShowDropEffect=function(t){},t.EventManager.prototype.ShowRejectedDropEffect=function(t){this.ClearDropEffect()},t.EventManager.prototype.ClearDropEffect=function(){},t.EventManager.prototype._getDropOptions=function(t){var e=this.GetDropTargetType(t);return this.getComponent().getOptions().dnd.drop[e]},t.EventManager.prototype._handleDropTargetEvent=function(t,e,i){var n=this._handleDropTargetEventHelper(t,e);n||t.preventDefault(),!n&&i?this.ShowDropEffect(t):n&&i?this.ShowRejectedDropEffect(t):this.ClearDropEffect()},t.EventManager.prototype._handleDropTargetEventHelper=function(e,i){if(null==this.GetDropTargetType(e))return!0;var n=t.ToolkitUtils.getEventForSyntax(this._context,e),o=this._getDropOptions(e),r=o[i];if(r){var s=r(n,this.GetDropEventPayload(e));if(e.getNativeEvent().defaultPrevented)return!1;if(null!=s&&!this._context.isCustomElement())return s}var a=o.dataTypes;if(null!=a){t.ArrayUtils.isArray(a)||(a=[a]);for(var l=0;l<a.length;l++)if(t.ArrayUtils.getIndex(n.dataTransfer.types,a[l])>=0)return!1}return!0},t.EventManager.prototype.DispatchElementEvent=function(t,e){this.getCtx().getSvgDocument().dispatchEvent(new CustomEvent(t,{detail:e}))};var N=function(t,e){this.Init(t,e)};t.Obj.createSubclass(N,t.Obj),N.prototype.Init=function(t,e){this._context=t,this._id=e,this._actionTooltip=new k(this._context,this._id+"ActionPopup")},N.prototype.GetRichTooltipManager=function(){if(!this._RichTooltipManager){var t=this._id+"Tooltip";this._RichTooltipManager=this._context.getImplFactory().newRichTooltipManager(t),this._RichTooltipManager.InitializeTooltipElem();var e=this._RichTooltipManager.GetStoredContext();if(e)new U(e,this,null,null).addListeners(this._actionTooltip)}return this._RichTooltipManager},N.prototype.clearActionTooltip=function(){this._actionTooltip&&this._actionTooltip.clearContent()},N.prototype.getActionTooltip=function(){return this._actionTooltip},N.prototype.hideTooltip=function(){this.clearActionTooltip(),this._RichTooltipManager&&this._RichTooltipManager.hideTooltip()},N.prototype.closeActionTooltip=function(){var t=new y(y.TOOLTIP_CLOSED_TYPE,this._actionPopupObj);this.FireListener(t),this._actionPopupObj=null,this.hideTooltip()},N.prototype.showDatatip=function(t,e,i,n){var o=this.getActionTooltip();i=N._formatTextString(i),o.setTooltipText(i),null!=n&&o.setTooltipBorderColor(n),this.GetRichTooltipManager().showRichElement(t,e,o,!0)},N.prototype.showTextAtPosition=function(t,e,i,n,o,r){var s=this.getActionTooltip();i=N._formatTextString(i),s.setTooltipText(i),null!=n&&s.setTooltipBorderColor(n),this.GetRichTooltipManager().showRichElement(t,e,s,o)},N.prototype.displayActionPopup=function(){var t=this.getActionTooltip();return!(!t||!t.hasMenuItems())},N.prototype.startActionPopupAtPosition=function(t,e,i,n){var o=this.getActionTooltip();if(o){this.GetRichTooltipManager().showRichElementAtPosition(t,e,o,!0,!1);var r=new y(y.TOOLTIP_STARTED_TYPE,i);this.FireListener(r),this._actionPopupObj=i}},N.prototype.addTooltipEventListener=function(t,e,i){var n=this._getListeners(t,!0);n.push(e),n.push(i)},N.prototype.removeTooltipEventListener=function(t,e,i){var n=this._getListeners(t,!1);if(null!==n)for(var o=0;o<n.length;o+=2)if(n[o]===e&&n[o+1]===i){n.splice(o,2);break}},N.prototype._getListeners=function(t,e){if(!this._listenerObj){if(!e)return null;this._listenerObj={}}var i=t,n=this._listenerObj[i];return!n&&e&&(n=[],this._listenerObj[i]=n),n},N.prototype.FireListener=function(t){var e=this._getListeners(t.getType(),!1);if(e)for(var i=0;i<e.length;i+=2){var n=e[i+1];e[i].call(n,t)}},N._formatTextString=function(t){var e="";if(!t)return e;var i=(t=t.replace(/\n/g,"<br>")).split("<br>");if(i){for(var n=new Array,o=0;o<i.length;o++){var r=i[o];null!=r&&""!=r&&n.push(r)}for(o=0;o<n.length;o++)e+=n[o],o<n.length-1&&(e+="\n")}return e};var U=function(t,e,i,n){this._customTooltipManager=e,this.Init(t,i,n)};t.Obj.createSubclass(U,t.EventManager),U.prototype.OnClickInternal=function(t){var e=t.target;this._handleMenuClick(e)},U.prototype.HandleImmediateTouchStartInternal=function(t,e){t.blockTouchHold(),this._handleMenuClick(t.target)},U.prototype.HandleTouchClickInternal=function(t){var e=t.target;this._handleMenuClick(e)},U.prototype._handleMenuClick=function(t){var e=this._customTooltipManager._actionPopupObj,i=t._menu;if(i){var n=!0;i instanceof L&&i._menuItem.isDisabled()&&(n=!1),n&&(this._customTooltipManager.closeActionTooltip(),i.FireActionTooltipItem(e))}};var k=function(t,e){this._Init(t,e)};t.Obj.createSubclass(k,t.Container),k.DEFAULT_BORDER_COLOR="gray",k.DEFAULT_BACKGROUND_COLOR="#ffffff",k.TOOLTIP_ONLY="tooltipOnly",k.MENU_ONLY="menuOnly",k.MENU_AND_TOOLTIP="menuAndTooltip",k.EMPTY="empty",k.MENU_PADDING_LEFT=21,k.MENU_PADDING_RIGHT=10,k.prototype._Init=function(e,i){this._context=e,this.getImpl()||this.setImpl(e.getImplFactory().newContainer("customTT")),k.superclass.Init.call(this,e),this._tooltipText=null,this._tooltipBorderColor=null,this._menuFontSize=11,this._tooltipFill=new t.SolidFill(k.DEFAULT_BACKGROUND_COLOR),this._fontSize=11,this._includePointer=!1,this._pointerLocation=new t.Point(0,0)},k.prototype.setIncludePointer=function(t){this._includePointer=t},k.prototype.getRootDisplayable=function(){return this},k.prototype.UpdateTooltipSize=function(t,e){this._displayWidth=t,this._displayHeight=e},k.prototype.getDisplayWidth=function(){return this._displayWidth},k.prototype.getDisplayHeight=function(){return this._displayHeight},k.prototype.clearContent=function(){this.clearMenuItems(),this.setTooltipBorderColor(null),this.setTooltipText(null)},k.prototype.setMenuFontSize=function(t){this._menuFontSize=t},k.prototype.setTooltipBorderColor=function(t){this._tooltipBorderColor=t},k.prototype.getTooltipBorderColor=function(){return this._tooltipBorderColor},k.prototype.setTooltipFill=function(t){this._tooltipFill=t},k.prototype.setTooltipText=function(t){this._tooltipText=t},k.prototype.getTooltipText=function(){return this._tooltipText},k.prototype.addMenuItem=function(t){this.getMenuItems().push(t)},k.prototype.hasMenuItems=function(){var t=this.getMenuItems();return t&&t.length>0},k.prototype.clearMenuItems=function(){this._menuItems&&(this._menuItems=[])},k.prototype.getMenuItems=function(){return this._menuItems||(this._menuItems=new Array),this._menuItems},k.prototype.containsMenuId=function(t){for(var e=this.getMenuItems(),i=0;i<e.length;i++){if(e[i].getId()==t)return!0}return!1},k.prototype.getTooltipType=function(){return this.hasMenuItems()?k.MENU_ONLY:k.EMPTY},k.prototype.Render=function(){var e=this.getRootDisplayable();e.removeChildren();var i=this.getTooltipType();if(i!=k.EMPTY){var n=4,o=2;this._includePointer&&(o=3,n=10);var r=this.hasMenuItems(),s=n+o/2,a=0,l=0;i==k.TOOLTIP_ONLY?e.setAlpha(.9):e.setAlpha(1);var h=new Array,u=new Array;if(i==k.MENU_AND_TOOLTIP?a+=5:i==k.MENU_ONLY&&(a+=2.5),r)for(var c=this.getMenuItems(),p=0;p<c.length;p++){var _=c[p],g=new t.OutputText(this._context,_.getText(),0,0,null);g.alignBottom(),g.setFontSize(this._menuFontSize),_ instanceof L&&_._menuItem.isDisabled()&&g.setAlpha(.5),g._menu=_;var d=g.getDimensions();d.y=s+a;var S=d.w;u.push(d),l=Math.max(S+k.MENU_PADDING_LEFT+k.MENU_PADDING_RIGHT,l),g.setY(d.y),a+=d.h,p<c.length-1&&(a+=5),h.push(g),g.alignLeft(),g.alignTop()}i!=k.MENU_ONLY&&i!=k.MENU_AND_TOOLTIP||(a+=2.5);var f=l+2*n,y=f+o,E=s+a+n+o/2;this._cursorText&&this._cursorText.setTranslateX(n+o/2);var T=12,v=this._pointerLocation.x>y,m=-this._pointerLocation.x,C=this._pointerLocation.y;if(this._includePointer){E/2<T&&(T=E/3);var A,O=E+o;O=Math.max(C+o,O),v?(this.UpdateTooltipSize(this._pointerLocation.x,O),A=o/2):(this.UpdateTooltipSize(y+m+o,O),A=o/2+m),e.setTranslate(A,o/2)}else this.UpdateTooltipSize(y+o,E+o),e.setTranslate(o/2,o/2);var b=new t.Rect(this._context,0,0,y,E);if(this._includePointer){var I=E/2;if(v){var P=new t.Point(0,0),M=new t.Point(y,0),D=new t.Point(y,I),R=new t.Point(this._pointerLocation.x,C),x=new t.Point(y,I+T),N=new t.Point(y,E),U=new t.Point(0,E),B=t.PathUtils.moveTo(P.x+5,P.y)+t.PathUtils.lineTo(M.x-5,M.y)+t.PathUtils.arcTo(5,5,Math.PI/2,1,M.x,M.y+5)+t.PathUtils.lineTo(D.x,D.y)+t.PathUtils.lineTo(R.x,R.y)+t.PathUtils.lineTo(x.x,x.y)+t.PathUtils.lineTo(N.x,N.y-5)+t.PathUtils.arcTo(5,5,Math.PI/2,1,N.x-5,N.y)+t.PathUtils.lineTo(U.x+5,U.y)+t.PathUtils.arcTo(5,5,Math.PI/2,1,U.x,U.y-5)+t.PathUtils.lineTo(0,5)+t.PathUtils.arcTo(5,5,Math.PI/2,1,5,0)+t.PathUtils.closePath();b=new t.Path(this._context,B,null)}else{P=new t.Point(0,0),M=new t.Point(y,0),D=new t.Point(y,E),R=new t.Point(0,E),x=new t.Point(0,I+T),N=new t.Point(-m,C),U=new t.Point(0,I),B=t.PathUtils.moveTo(P.x+5,P.y)+t.PathUtils.lineTo(M.x-5,M.y)+t.PathUtils.arcTo(5,5,Math.PI/2,1,M.x,M.y+5)+t.PathUtils.lineTo(D.x,D.y-5)+t.PathUtils.arcTo(5,5,Math.PI/2,1,D.x-5,D.y)+t.PathUtils.lineTo(R.x+5,R.y)+t.PathUtils.arcTo(5,5,Math.PI/2,1,R.x,R.y-5)+t.PathUtils.lineTo(x.x,x.y)+t.PathUtils.lineTo(N.x,N.y)+t.PathUtils.lineTo(U.x,U.y)+t.PathUtils.lineTo(0,5)+t.PathUtils.arcTo(5,5,Math.PI/2,1,5,0)+t.PathUtils.closePath();b=new t.Path(this._context,B,null)}}b.setSolidStroke("rgb(229,232,238)"),this._tooltipFill||(this._tooltipFill=new t.SolidFill(k.DEFAULT_BACKGROUND_COLOR)),b.setFill(this._tooltipFill),e.addChildAt(b,0);var w=.95*f,H=(y-w)/2;for(p=0;p<h.length;p++){var F=h[p];e.addChild(F);S=u[p].w;if(F._menu){var G=new t.Rectangle(0,u[p].y-2.5,y,u[p].h+5),Y=new t.Rect(this._context,G.x,G.y,G.w,G.h);if(Y.setInvisibleFill(),Y._menu=F._menu,e.addChild(Y),p>0){var K=F._menu._menuItem;if(h[p-1]._menu instanceof L&&K.hasSeparatorBefore()){var j=new t.SolidFill("gray",.5);this.renderDivider(e,H,u[p].y-2.5,w,j)}}}F.setTranslateX(k.MENU_PADDING_LEFT)}}},k.prototype.renderDivider=function(e,i,n,o,r){var s=new t.Rect(this._context,i,n,o,1);s.setFill(r),e.addChild(s)};var B=function(t,e,i,n,o){this.Init(t,e,i,n,o)};t.Obj.createSubclass(B,t.Obj),B.prototype.Init=function(t,e,i,n,o){this._context=t,this._id=e,this._text=i,this._listener=n,this._listenerObj=o},B.prototype.getId=function(){return this._id},B.prototype.getText=function(){return this._text},B.prototype.FireActionTooltipItem=function(e){if(this._listenerObj&&this._listener){var i=new Object;i.target=e,i.menuItem=this._menuItem,this._menuItemTimer=new t.Timer(this._context,1,this._handleMenuTimer,this),this._menuItemTimer.evt=i,this._menuItemTimer.start()}},B.prototype._handleMenuTimer=function(){this._menuItemTimer&&this._menuItemTimer.stop(),this._listener.call(this._listenerObj,this._menuItemTimer.evt)};var L=function(t,e,i,n,o){this.Init(t,e,i,n,o)};t.Obj.createSubclass(L,B),L.prototype.Init=function(t,e,i,n,o){L.superclass.Init.call(this,t,e,o.getText(),i,n),this._menuItem=o},t.XmlParser=function(t){this._impl||(this._impl=t.getImplFactory().newParser())},t.Obj.createSubclass(t.XmlParser,t.Obj),t.XmlParser.prototype.parse=function(t){return this._impl&&this._impl.parse?this._impl.parse(t):null},t.XmlNode=function(){},t.Obj.createSubclass(t.XmlNode,t.Obj),t.XmlNode.prototype.getAttr=function(t){return null},t.XmlNode.prototype.getChildNodes=function(){return new Array},t.XmlNode.prototype.getChild=function(t){var e=this.getChildNodes();return null!=e&&e.length>t?e[t]:null},t.XmlNode.prototype.getFirstChild=function(){return this.getChild(0)},t.XmlNode.prototype.getName=function(){return null},t.XmlNode.prototype.getAttributes=function(){return null},t.XmlNode.prototype.getAllChildNodes=function(){return new Array},t.XmlNode.prototype.getNodeValue=function(){return null},t.XmlNode.prototype.getTextContent=function(){return null},t.XmlNode.prototype.getElementsByTagName=function(t){return null},t.HtmlTooltipManager=function(t,e){this.Init(t,e)},t.Obj.createSubclass(t.HtmlTooltipManager,t.TooltipManager),t.HtmlTooltipManager._TOOLTIP_DIV_ID="_dvtTooltip",t.HtmlTooltipManager._SHOW_DELAY=500,t.HtmlTooltipManager._BORDER_COLOR="#9ba2b0",t.HtmlTooltipManager._FONT_COLOR="#383a47",t.HtmlTooltipManager._VIEWPORT_BUFFER=15,t.HtmlTooltipManager.prototype.Init=function(e,i){this._context=e,this._domElementId=i||t.HtmlTooltipManager._TOOLTIP_DIV_ID,this._isTooltip=!0},t.HtmlTooltipManager.prototype.showDatatip=function(t,e,i,n,o){null==o&&(o=!0),this._isTooltip=!1,this._showTextAtPosition(t,e,i,n,o,this._context.getDatatipStyleClass())},t.HtmlTooltipManager.prototype._showTextAtPosition=function(e,i,n,o,r,s){var a,l=this.getTooltipElem();if("string"==typeof n){for(;l.hasChildNodes();)l.removeChild(l.firstChild);n=(n=n.replace(/(<|&#60;)/g,"&lt;")).replace(/(>|&#62;)/g,"&gt;"),n=t.HtmlTooltipManager._restoreTag(n,"b"),n=t.HtmlTooltipManager._restoreTag(n,"i"),n=t.HtmlTooltipManager._restoreTag(n,"table"),n=t.HtmlTooltipManager._restoreTag(n,"tr"),n=(n=(n=(n=t.HtmlTooltipManager._restoreTag(n,"td")).replace(/\n/g,"<br>")).replace(/\\n/g,"<br>")).replace(/&#92;n/g,"<br>"),n=t.HtmlTooltipManager._restoreTag(n,"br"),(a=document.createElement("span")).style.visibility="inherit",a.style.width=null,a.style.height=null,a.innerHTML=n}else 1!=n&&(a=n);this._isCustomClassName||(l.className=s),this._isCustomClassName=!1,o||(o=t.HtmlTooltipManager._BORDER_COLOR),this._isCustomBorderColor||(l.style.borderColor=o),this._isCustomBorderColor=!1,l.style.position="absolute",l.style.zIndex=2147483647,null!=a&&l.appendChild(a),this.PostElement(l,e,i,!0,r)},t.HtmlTooltipManager.prototype.PostElement=function(t,e,i,n,o){if(t.style["pointer-events"]=n?"none":"auto",t.style.width=null,t.style.height=null,t.style.left="0px",t.style.top="0px",o){var r=this._getOffsets(t);this.positionTip(e+r.x,i+r.y,e,i)}else this.positionTip(e,i,e,i);t.style.visibility="visible";var s=this._context.getTooltipAttachedCallback();s&&s(t)},t.HtmlTooltipManager.prototype.hideTooltip=function(){this.clearTooltip(),this._tooltipDisplayed=!1,this._timerIsRunning=!1;var e=document.getElementById(this._domElementId);e&&(e.style.visibility="hidden",e.style.overflow=null,e.style.width="0px",e.style.height="0px",t.Agent.isRightToLeft(this._context)?e.style.left=e.style.right:e.style.left="0px",e.style.top="0px","undefined"!=typeof $&&this._bCleanupChildren&&$(e).children().remove())},t.HtmlTooltipManager.prototype.getTooltipElem=function(){var t=document.getElementById(this._domElementId);return t||(t=this.InitializeTooltipElem()),t},t.HtmlTooltipManager.prototype.InitializeTooltipElem=function(){var t=document.createElement("div");return t.id=this._domElementId,t.style.visibility="hidden",document.body.appendChild(t),this.InitContent(t),t},t.HtmlTooltipManager.prototype.InitContent=function(t){},t.HtmlTooltipManager.prototype.showTooltip=function(e,i,n,o,r,s){if(n&&0!=n.length&&(this._x=e,this._y=i,this._text=n,this._trackMouse=r,!this._timerIsRunning)){var a=document.createElement("span");a.className="OraDVTTooltipText",a.innerHTML=n,a.style.color=t.HtmlTooltipManager._FONT_COLOR,s||(s=t.HtmlTooltipManager._BORDER_COLOR),this.getTooltipElem().style.borderColor=s,t.Agent.isTouchDevice()||this._tooltipDisplayed&&this._trackMouse?this._displayTooltip(this._x,this._y,this._text,this._borderColor):(this._timerIsRunning=!0,this._showTimerId=window.setTimeout(t.Obj.createCallback(this,this._handleShowTimer),t.HtmlTooltipManager._SHOW_DELAY))}},t.HtmlTooltipManager.prototype.clearTooltip=function(){this._showTimerId&&(window.clearTimeout(this._showTimerId),this._showTimerId=void 0,this._x=void 0,this._y=void 0,this._text=void 0,this._trackMouse=void 0),this._hideTimerId&&(window.clearTimeout(this._hideTimerId),this._hideTimerId=void 0)},t.HtmlTooltipManager.prototype._handleShowTimer=function(t){this._timerIsRunning=!1,this._displayTooltip(this._x,this._y,this._text,this._borderColor),this._tooltipDisplayed=!0},t.HtmlTooltipManager.prototype._displayTooltip=function(t,e,i,n){this._isTooltip=!0,this._showTextAtPosition(t,e,i,n,!0,this._context.getTooltipStyleClass())},t.HtmlTooltipManager.prototype._getOffsets=function(e){var i=this.getTooltipBounds(e);if(t.Agent.isTouchDevice())return new t.Point(0-i.w/2,-30-i.h);var n=-8-i.h,o=8;return this._isTooltip&&(n=22,o=0),t.Agent.isRightToLeft(this._context)&&(o=-o-i.w),new t.Point(o,n)},t.HtmlTooltipManager.prototype.getTooltipBounds=function(){var e=this.getTooltipElem();return e.style.height="auto",new t.Rectangle(parseInt(e.style.left),parseInt(e.style.top),e.offsetWidth,e.offsetHeight)},t.HtmlTooltipManager.prototype.positionTip=function(e,i){var n=this.getTooltipElem(),o=this.getTooltipBounds(),r=o.w,s=o.h,a=new t.Rectangle(window.pageXOffset+t.HtmlTooltipManager._VIEWPORT_BUFFER,window.pageYOffset+t.HtmlTooltipManager._VIEWPORT_BUFFER,window.innerWidth-2*t.HtmlTooltipManager._VIEWPORT_BUFFER,window.innerHeight-2*t.HtmlTooltipManager._VIEWPORT_BUFFER);r>a.w-2*t.HtmlTooltipManager._VIEWPORT_BUFFER&&(r=a.w-2*t.HtmlTooltipManager._VIEWPORT_BUFFER,n.style.width=r+"px");var l=e;l=Math.max(l,a.x),l=Math.min(l,a.x+a.w-r),Math.abs(a.x)>t.HtmlTooltipManager._VIEWPORT_BUFFER&&(n.style.width=Math.min(n.clientWidth,a.x+a.w-l)+"px",i+=s-n.offsetHeight,s=n.offsetHeight,n.style.overflow="hidden");var h=i;h=Math.min(h,a.y+a.h-s),h=Math.max(h,a.y),n.style.left=l+"px",n.style.top=h+"px"},t.HtmlTooltipManager.prototype.getCustomTooltip=function(t,e){for(var i=this.getTooltipElem();i.hasChildNodes();)i.removeChild(i.firstChild);e.parentElement=i,i.className="",i.style.borderColor="";var n=t(e=this._context.fixRendererContext(e));return i.className&&(this._isCustomClassName=!0),i.style.borderColor&&(this._isCustomBorderColor=!0),this._bCleanupChildren=null!=e._templateCleanup,!(n||!i.hasChildNodes())||n},t.HtmlTooltipManager._restoreTag=function(t,e){var i=new RegExp("&lt;(/?)"+e+"([^&]*)(/?)&gt;","g");return t.replace(i,"<$1"+e+"$2$3>")},t.HtmlTooltipManager.createStartTag=function(t,e){return"<"+t+' style="'+e.toString()+'">'},t.HtmlKeyboardListenerUtils=function(){},t.Obj.createSubclass(t.HtmlKeyboardListenerUtils,t.Obj),t.HtmlKeyboardListenerUtils.ATTR_IGNORE_EVENTS_FROM_TARGET="_dvtIgnoreEventsFromTarget",t.HtmlKeyboardListenerUtils.getListener=function(e){return e?t.HtmlKeyboardListenerUtils._captureListener:t.HtmlKeyboardListenerUtils._bubbleListener},t.HtmlKeyboardListenerUtils._bubbleListener=function(e){t.HtmlKeyboardListenerUtils._commonListener.call(this,e,!1)},t.HtmlKeyboardListenerUtils._captureListener=function(e){t.HtmlKeyboardListenerUtils._commonListener.call(this,e,!0)},t.HtmlKeyboardListenerUtils._commonListener=function(e,i){var n;if(!t.HtmlKeyboardListenerUtils._checkIgnoreTarget(e))if(this._currentObj){if("focus"==e.type)return void(this._focusEvent=e);var o=this._currentObj.getCtx();this._focusEvent&&(o.resetCurrentKeyboardFocus(e),n=t.DomEventFactory.newEvent(this._focusEvent,o),this._currentObj.FireListener(n,i),this._focusEvent=null),n=t.DomEventFactory.newEvent(e,o),this._currentObj.FireListener(n,i)}else if(this._obj&&this._obj instanceof Array){var r,s,a=this._obj.length;for(r=0;r<a;r++)s=this._obj[r],n=t.DomEventFactory.newEvent(e,s.getCtx()),s.FireListener(n,i)}},t.HtmlKeyboardListenerUtils._checkIgnoreTarget=function(e){return!!(e&&e.target&&e.target[t.HtmlKeyboardListenerUtils.ATTR_IGNORE_EVENTS_FROM_TARGET])};var w=function(){this._parser=new DOMParser};t.Obj.createSubclass(w,t.Obj),w.prototype.parse=function(e){var i=this._parser.parseFromString(e,"text/xml").documentElement;return new t.DomXmlNode(i)},t.DomXmlNode=function(t){this._node=t},t.Obj.createSubclass(t.DomXmlNode,t.XmlNode),t.DomXmlNode.prototype.getAttr=function(t){return this._node.getAttribute(t)},t.DomXmlNode.prototype.getChildNodes=function(){for(var e=new Array,i=this._node.firstChild;null!=i;)1==i.nodeType&&e.push(new t.DomXmlNode(i)),i=i.nextSibling;return e},t.DomXmlNode.prototype.getName=function(){return this._node.nodeName},t.DomXmlNode.prototype.getAttributes=function(){for(var t=[],e=this._node.attributes.length,i=0;i<e;i++){var n=this._node.attributes[i];n.name&&void 0!==n.value&&null!=n.value&&t.push({name:n.name,value:n.value})}return t},t.DomXmlNode.prototype.getAllChildNodes=function(){for(var e=new Array,i=this._node.firstChild;null!=i;)e.push(new t.DomXmlNode(i)),i=i.nextSibling;return e},t.DomXmlNode.prototype.getNodeValue=function(){return this._node.nodeValue},t.DomXmlNode.prototype.getTextContent=function(){return this._node.textContent},t.DomXmlNode.prototype.getElementsByTagName=function(e){var i=[],n=this._node.getElementsByTagName(e);if(n)for(var o=0;o<n.length;o++)i.push(new t.DomXmlNode(n[o]));return i},t.EventFactory=new Object,t.Obj.createSubclass(t.EventFactory,t.Obj),t.EventFactory.newEvent=function(t,e){var i={type:t};return e&&(i.id=e),i},t.EventFactory.newOptionChangeEvent=function(e,i,n){var o=t.EventFactory.newEvent("optionChange");return o.key=e,o.value=i,o.optionMetadata=n,o},t.EventFactory.newAdfPropertyChangeEvent=function(e,i){var n=t.EventFactory.newEvent("adfPropertyChange");return n.properties={},null!=e&&(n.properties[e]=i),n},t.EventFactory.newAdfContextMenuEvent=function(e,i){var n=t.EventFactory.newEvent("adfContextMenu");return n.nativeEvent=e,n.menuId=i,n},t.EventFactory.newAdfHidePopupEvent=function(e,i){var n=t.EventFactory.newEvent("adfHidePopup");return n.popupId=e,n.relatedTarget=i,n},t.EventFactory.newAdfLogEvent=function(e,i){var n=t.EventFactory.newEvent("adfLog");return n.level=e,n.message=i,n},t.EventFactory.newAdfShowPopupEvent=function(e,i,n,o){var r=t.EventFactory.newEvent("adfShowPopup");return r.showPopupBehavior=e,r.launcherBounds=i,r.launcherId=n,r.triggerType=o,r},t.EventFactory.newActionEvent=function(e,i,n){var o=t.EventFactory.newEvent("action");return o.commandId=i,o.clientId=n,o.subType=e,o},t.EventFactory.newCategoryHideEvent=function(e,i){var n=t.EventFactory.newEvent("categoryHide");return n.category=e,n.hiddenCategories=i,n},t.EventFactory.newCategoryShowEvent=function(e,i){var n=t.EventFactory.newEvent("categoryShow");return n.category=e,n.hiddenCategories=i,n},t.EventFactory.newCategoryHighlightEvent=function(e,i){var n=t.EventFactory.newEvent("categoryHighlight");return n._highlightType=i?"over":"out",e=e||[],n.categories=e instanceof Array?e:[e],n},t.EventFactory.newDrillEvent=function(e){return t.EventFactory.newEvent("drill",e)},t.EventFactory.newReadyEvent=function(){return t.EventFactory.newEvent("ready")},t.EventFactory.newSelectionEvent=function(e){var i=t.EventFactory.newEvent("selection");return i.selection=e,i},t.EventFactory.newTouchHoldReleaseEvent=function(e){var i=t.EventFactory.newEvent("touchHoldRelease");return i.nativeEvent=e,i},t.EventFactory.newValueChangeEvent=function(e,i,n){var o=t.EventFactory.newEvent("valueChange");return o.oldValue=e,o.newValue=i,o.complete=n,o},t.EventFactory.newChartDrillEvent=function(e,i,n){var o=t.EventFactory.newDrillEvent(e);return o.series=i,o.group=n,o},t.EventFactory.newChartSelectionEvent=function(e,i,n,o,r,s,a,l,h,u){var c=t.EventFactory.newSelectionEvent(e);return c.complete=i,c.xMin=n,c.xMax=o,c.startGroup=r,c.endGroup=s,c.yMin=a,c.yMax=l,c.y2Min=h,c.y2Max=u,c},t.EventFactory.newChartViewportChangeEvent=function(e,i,n,o,r,s,a){var l=t.EventFactory.newEvent("viewportChange");return l.complete=e,l.xMin=i,l.xMax=n,l.startGroup=o,l.endGroup=r,l.yMin=s,l.yMax=a,l},t.EventFactory.newSunburstExpandCollapseEvent=function(e,i,n,o,r){var s=t.EventFactory.newEvent(e,i);return s.expanded=r,s.data=n,s.component=o,s},t.EventFactory.newTreeDrillEvent=function(e,i,n){var o=t.EventFactory.newDrillEvent(e);return o.data=i,o.component=n,o},t.EventFactory.newSunburstRotationEvent=function(e,i){var n=t.EventFactory.newEvent("rotation");return n.complete=i,n.startAngle=e%360,n},t.EventFactory.newThematicMapViewportChangeEvent=function(e,i,n){var o=t.EventFactory.newEvent("viewportChange");return o.panX=e,o.panY=i,o.zoom=n,o},t.EventFactory.newTimelineViewportChangeEvent=function(e,i,n){var o=t.EventFactory.newEvent("viewportChange");return o.viewportStart=e,o.viewportEnd=i,o.minorAxisScale=n,o},t.EventFactory.newGanttViewportChangeEvent=function(e,i,n,o){var r=t.EventFactory.newTimelineViewportChangeEvent(e,i,o);return r.majorAxisScale=n,r},t.EventFactory.newGanttMoveEvent=function(e,i,n,o,r,s,a){var l=t.EventFactory.newEvent("move");return l.taskContexts=e,l.value=i,l.start=n,l.end=o,l.baselineStart=r,l.baselineEnd=s,l.rowContext=a,l},t.EventFactory.newTreemapIsolateEvent=function(e){return t.EventFactory.newEvent("isolate",e)},t.ClientBehaviorEvent=function(e){this.Init(t.ClientBehaviorEvent.TYPE),this._clientBehavior=e},t.Obj.createSubclass(t.ClientBehaviorEvent,t.BaseComponentEvent),t.ClientBehaviorEvent.TYPE="clientBehavior",t.ClientBehaviorEvent.prototype.getClientBehavior=function(){return this._clientBehavior},t.EventDispatcher={},t.Obj.createSubclass(t.EventDispatcher,t.Obj),t.EventDispatcher.dispatchEvent=function(t,e,i,n){t&&t.call&&t.call(e,n,i)},t.ToolkitUtils={},t.Obj.createSubclass(t.ToolkitUtils,t.Obj),t.ToolkitUtils.SVG_NS="http://www.w3.org/2000/svg",t.ToolkitUtils.XLINK_NS="http://www.w3.org/1999/xlink",t.ToolkitUtils._IMAGE_URL_CACHE={},t.ToolkitUtils.createSvgDocument=function(e){var i=document.createElementNS(t.ToolkitUtils.SVG_NS,"svg");return null!=e&&t.ToolkitUtils.setAttrNullNS(i,"id",e),t.ToolkitUtils.setAttrNullNS(i,"width","100%"),t.ToolkitUtils.setAttrNullNS(i,"height","100%"),t.Agent.isPlatformIE()&&t.ToolkitUtils.setAttrNullNS(i,"focusable","false"),i},t.ToolkitUtils.getDragFeedback=function(e,i){var n=new Object;if(!e)return n.width=1,n.height=1,n.svg=t.ToolkitUtils.createSvgDocument("dnd"),n;e instanceof Array||(e=[e]);var o=t.DragAndDropUtils.getDragFeedbackBounds(e,i),r=t.ToolkitUtils._getDragFeedbackSVG(e,o);return n.width=o.w+2*t.DragSource.DRAG_FEEDBACK_MARGIN,n.height=o.h+2*t.DragSource.DRAG_FEEDBACK_MARGIN,r&&(n.svg=r),n},t.ToolkitUtils._getDragFeedbackSVG=function(e,i){var n=t.ToolkitUtils.createSvgDocument("dnd");t.ToolkitUtils.setAttrNullNS(n,"class","oj-drag");var o="translate("+(t.DragSource.DRAG_FEEDBACK_MARGIN-i.x)+","+(t.DragSource.DRAG_FEEDBACK_MARGIN-i.y)+")",r=t.SvgShapeUtils.createElement("g");t.ToolkitUtils.setAttrNullNS(r,"transform",o),t.ToolkitUtils.appendChildElem(n,r);for(var s=0;s<e.length;s++){var a=e[s],l=a.getImpl().getElem().cloneNode(!0);t.ToolkitUtils.getAttrNullNS(l,"filter")&&t.ToolkitUtils.setAttrNullNS(l,"filter",null);var h=t.SvgShapeUtils.createElement("g");t.ToolkitUtils.appendChildElem(r,h);for(var u=a.getPathToStage(),c=null,p=1;p<u.length;p++)c?(c=c.clone()).concat(u[p].getMatrix()):c=u[p].getMatrix();if(c){var _="matrix("+c.getA()+","+c.getC()+","+c.getB()+","+c.getD()+","+c.getTx()+","+c.getTy()+")";t.ToolkitUtils.setAttrNullNS(h,"transform",_)}t.ToolkitUtils.appendChildElem(h,l)}return n},t.ToolkitUtils.addDomEventListener=function(t,e,i,n){t&&t.addEventListener&&t.addEventListener(e,i,n)},t.ToolkitUtils.removeDomEventListener=function(t,e,i,n){t&&t.removeEventListener&&t.removeEventListener(e,i,n)},t.ToolkitUtils.appendChildElem=function(t,e){return t.appendChild(e)},t.ToolkitUtils.getAttrNullNS=function(t,e){return t.getAttribute(e)},t.ToolkitUtils.hasAttrNullNS=function(t,e){return t.hasAttribute(e)},t.ToolkitUtils.setAttrNullNS=function(e,i,n,o){null==o||n!=o?e.setAttribute(i,n):t.ToolkitUtils.hasAttrNullNS(e,i)&&t.ToolkitUtils.removeAttrNullNS(e,i)},t.ToolkitUtils.removeAttrNullNS=function(e,i){t.ToolkitUtils.hasAttrNullNS(e,i)&&e.removeAttribute(i)},t.ToolkitUtils.setHref=function(e,i){t.Agent.isBrowserSafari()||t.Agent.isPlatformGecko()&&t.Agent.getVersion()<51?e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i):t.ToolkitUtils.setAttrNullNS(e,"href",i)},t.ToolkitUtils.getLinkCallback=function(t,e){if(t||e){return function(){if(null==t)self.location=e;else{var i=window.open(e,t);i&&i.focus()}}}return null},t.ToolkitUtils.roundDecimal=function(e){return t.Agent.isEnvironmentTest()?Math.round(1e3*e)/1e3:e},t.ToolkitUtils.getUrlPathById=function(e){return((t.Agent.isPlatformIE()?null!=document.querySelector("base"):document.URL!=document.baseURI)?document.URL.split("#")[0]+"#":"#")+e},t.ToolkitUtils.getUrlById=function(e){return"url("+t.ToolkitUtils.getUrlPathById(e)+")"},t.ToolkitUtils.setSvgSize=function(e,i,n){var o=e.getSvgDocument();t.ToolkitUtils.setAttrNullNS(o,"width",i+"px"),t.ToolkitUtils.setAttrNullNS(o,"height",n+"px")},t.ToolkitUtils.getOuterDivSize=function(e){var i=e.getSvgDocument().parentNode,n=window.getComputedStyle(i);return new t.Dimension(parseFloat(n.width),parseFloat(n.height))},t.ToolkitUtils.getEventForSyntax=function(t,e){var i=e.getNativeEvent();if(!t.isCustomElement()&&"undefined"!=typeof $){var n=$.event.fix(i);return n.dataTransfer=i.dataTransfer,n}return i},t.ToolkitUtils.getImageUrl=function(e,i){if("undefined"==typeof $||-1!=i.indexOf("."))return i;var n=t.ToolkitUtils._IMAGE_URL_CACHE[i];if(null!=n)return n;var o=$(document.createElement("div"));return o.attr("style","display:none;"),o.addClass(i),$(e.getContainer()).append(o),n=(n=o.css("background-image"))&&-1!==n.indexOf("url(")?n.slice(n.indexOf("url(")+4,n.length-1).replace(/["']/g,""):i,o.remove(),t.ToolkitUtils._IMAGE_URL_CACHE[i]=n,n},t.ToolkitUtils.addClassName=function(e,i){if(e&&i)if(t.ToolkitUtils.hasAttrNullNS(e,"class")){var n=t.ToolkitUtils.getAttrNullNS(e,"class").split(" ");-1==t.ArrayUtils.getIndex(n,i)&&(n.push(i),t.ToolkitUtils.setAttrNullNS(e,"class",n.join(" ")))}else t.ToolkitUtils.setAttrNullNS(e,"class",i)},t.ToolkitUtils.removeClassName=function(e,i){if(e&&i&&t.ToolkitUtils.hasAttrNullNS(e,"class")){var n=t.ToolkitUtils.getAttrNullNS(e,"class").split(" "),o=t.ArrayUtils.getIndex(n,i);o>=0&&(n.splice(o,1),t.ToolkitUtils.setAttrNullNS(e,"class",n.join(" ")))}},t.Bundle.addDefaultStrings(t.Bundle.UTIL_PREFIX,{SCALING_SUFFIX_THOUSAND:"K",SCALING_SUFFIX_MILLION:"M",SCALING_SUFFIX_BILLION:"B",SCALING_SUFFIX_TRILLION:"T",SCALING_SUFFIX_QUADRILLION:"Q",NUMBER_FORMAT_DECIMAL_SEPARATOR:".",NUMBER_FORMAT_GROUPING_SEPARATOR:",",NUMBER_FORMAT_GROUPING_SIZE:3,MONTH_JANUARY:"January",MONTH_FEBRUARY:"February",MONTH_MARCH:"March",MONTH_APRIL:"April",MONTH_MAY:"May",MONTH_JUNE:"June",MONTH_JULY:"July",MONTH_AUGUST:"August",MONTH_SEPTEMBER:"September",MONTH_OCTOBER:"October",MONTH_NOVEMBER:"November",MONTH_DECEMBER:"December",MONTH_SHORT_JANUARY:"Jan",MONTH_SHORT_FEBRUARY:"Feb",MONTH_SHORT_MARCH:"Mar",MONTH_SHORT_APRIL:"Apr",MONTH_SHORT_MAY:"May",MONTH_SHORT_JUNE:"Jun",MONTH_SHORT_JULY:"Jul",MONTH_SHORT_AUGUST:"Aug",MONTH_SHORT_SEPTEMBER:"Sep",MONTH_SHORT_OCTOBER:"Oct",MONTH_SHORT_NOVEMBER:"Nov",MONTH_SHORT_DECEMBER:"Dec",DAY_MONDAY:"Monday",DAY_TUESDAY:"Tuesday",DAY_WEDNESDAY:"Wednesday",DAY_THURSDAY:"Thursday",DAY_FRIDAY:"Friday",DAY_SATURDAY:"Saturday",DAY_SUNDAY:"Sunday",DAY_SHORT_MONDAY:"Mon",DAY_SHORT_TUESDAY:"Tue",DAY_SHORT_WEDNESDAY:"Wed",DAY_SHORT_THURSDAY:"Thu",DAY_SHORT_FRIDAY:"Fri",DAY_SHORT_SATURDAY:"Sat",DAY_SHORT_SUNDAY:"Sun",TIME_AM:"AM",TIME_PM:"PM",DURATION_DAYS:"{0} days",DURATION_HOURS:"{0} hours",ROW_INFO:"Row {0}",TASK_INFO:"Start time is {0}, end time is {1}, duration is {2}",MILESTONE_INFO:"Time is {0}",ITEM_START:"Start time is {0}.",ITEM_END:"End time is {0}.",ITEM_TITLE:"Title is {0}.",ITEM_DESCRIPTION:"Description is {0}.",INVALID_DATA:"Invalid data",NO_DATA:"No data to display",CLEAR_SELECTION:"Clear Selection",EXPAND:"Expand",COLLAPSE:"Collapse",DATA_VISUALIZATION:"Data Visualization",STATE_SELECTED:"Selected",STATE_UNSELECTED:"Unselected",STATE_MAXIMIZED:"Maximized",STATE_MINIMIZED:"Minimized",STATE_EXPANDED:"Expanded",STATE_COLLAPSED:"Collapsed",STATE_ISOLATED:"Isolated",STATE_HIDDEN:"Hidden",STATE_VISIBLE:"Visible",STATE_DRILLABLE:"Drillable",ARIA_LABEL_STATE_DELIMITER:", ",ARIA_LABEL_DESC_DELIMITER:". ",COLON_SEP_LIST:"{0}: {1}",COUNT_WITH_TOTAL:"{0} of {1}",ZOOM_IN:"Zoom In",ZOOM_OUT:"Zoom Out",CHART:"Chart",DIAGRAM:"Diagram",GANTT:"Gantt",GAUGE:"Gauge",HIERARCHY_VIEWER:"Hierarchy Viewer",LEGEND:"Legend",NBOX:"{0} Box",PICTOCHART:"Picture Chart",SUNBURST:"Sunburst",TAG_CLOUD:"Tag Cloud",THEMATIC_MAP:"Thematic Map",TIME_AXIS:"Time Axis",TIMELINE:"Timeline",TIMELINE_SERIES:"Series",TREEMAP:"Treemap"}),t.SvgDocumentUtils=function(){},t.Obj.createSubclass(t.SvgDocumentUtils,t.Obj),t.SvgDocumentUtils.elementFromPoint=function(t,e){for(var i=document.elementFromPoint(t,e);i;){if(i._obj&&i._obj.getObj&&i._obj.getObj())return i._obj.getObj();i=i.parentNode}return null},t.SvgDocumentUtils.elementFromTouch=function(t){return this.elementFromPoint(t.clientX,t.clientY)},t.SvgDocumentUtils.isFilterSupported=function(e){return!(t.Agent.isPlatformIE()&&t.Agent.getVersion()<10||t.Agent.isBrowserSafari()&&t.Agent.getVersion()<536||t.Agent.isTouchDevice()&&!t.Agent.isBrowserSafari())},t.SvgDocumentUtils.isEventAvailableOutsideClip=function(){return t.Agent.isBrowserSafari()},t.SvgDocumentUtils.isFilterStraightLineAdjustmentNeeded=function(){return t.Agent.isPlatformGecko()},t.SvgDocumentUtils.fixGeckoContainerForFilter=function(e){if(e&&t.Agent.isPlatformGecko()){var i=e.getImpl().getElem();if(i){var n=t.ToolkitUtils.getAttrNullNS(i,"transform");n||(n="matrix(1 0 0 1 0 0)"),t.ToolkitUtils.setAttrNullNS(i,"transform",n)}}},t.SvgDocumentUtils.cancelDomEvent=function(t){t&&(t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.cancelBubble=!0,t.cancel=!0,t.returnValue=!1)},t.SvgDocumentUtils.addDragListeners=function(e,i,n,o,r,s){var a=t.Agent.isTouchDevice(),l=e.getCtx(),h=t.Agent.isEnvironmentBrowser()?document.body.style:{},u=function(t){t.stopPropagation()},c=function(e){i.call(r,e)&&(a?(document.addEventListener("touchmove",p,!0),document.addEventListener("touchend",_,!0)):(document.addEventListener("mousemove",p,!0),document.addEventListener("mouseup",_,!0),s&&document.addEventListener("click",u,!0)),t.SvgDocumentUtils._webkitUserSelect=h.webkitUserSelect,t.SvgDocumentUtils._mozUserSelect=h.MozUserSelect,h.webkitUserSelect="none",h.MozUserSelect="none")},p=t.SvgDocumentUtils.createStaticCallback(l,n,r),_=function(e){a?(document.removeEventListener("touchmove",p,!0),document.removeEventListener("touchend",_,!0)):(document.removeEventListener("mousemove",p,!0),document.removeEventListener("mouseup",_,!0),a||setTimeout(function(){document.removeEventListener("click",u,!0)},50)),h.webkitUserSelect=t.SvgDocumentUtils._webkitUserSelect,h.MozUserSelect=t.SvgDocumentUtils._mozUserSelect;var i=t.DomEventFactory.newEvent(e,l);o.call(r,i)};a?e.addEvtListener(t.TouchEvent.TOUCHSTART,c):e.addEvtListener(t.MouseEvent.MOUSEDOWN,c)},t.SvgDocumentUtils.createStaticCallback=function(e,i,n){return function(o){var r=t.DomEventFactory.newEvent(o,e);i.call(n,r)}},t.SvgDocumentUtils.disableMouseEvents=function(e){if(e.style&&(e.style.pointerEvents="none"),e.childNodes)for(var i=0;i<e.childNodes.length;i++)t.SvgDocumentUtils.disableMouseEvents(e.childNodes[i])};var H={_cache:{}};t.Obj.createSubclass(H,t.Obj),H.addBubbleEventListener=function(e,i,n){return window.addEventListener?(t.ToolkitUtils.addDomEventListener(e,i,n,!1),!0):!!window.attachEvent&&(e.attachEvent("on"+i,n),!0)},H.loadImage=function(t,e){var i=this._cache[t];if(i){if(!i._image)return e&&e(i),i;H._addListenerToQueue(i._listeners,e)}else this.loadNewImage(t,e);return null},H.loadNewImage=function(t,e){var i=document.createElement("img"),n={_listeners:[],url:t,_image:i};e&&H._addListenerToQueue(n._listeners,e),this._cache[t]=n,H.addBubbleEventListener(i,"load",function(t){var e;n.width=i.width,n.height=i.height,delete n._image;var o=n._listeners.length;for(e=0;e<o;e++)n._listeners[e]&&n._listeners[e](n);delete n._listeners}),i.src=t},H._addListenerToQueue=function(t,e){if(e){for(var i=0;i<t.length;i++)if(t[i]===e)return;t.push(e)}};var F=function(t,e){this.Init(t,e)};t.Obj.createSubclass(F,t.HtmlTooltipManager),F.prototype.Init=function(t,e){this._storedContexts=new Object,F.superclass.Init.call(this,t,e)},F.prototype.InitContent=function(e){e.innerHTML="";var i=new t.Context(e,"DvtCustomTooltip");this._storedContexts[this._domElementId]=i},F.prototype.GetStoredContext=function(){return this._storedContexts[this._domElementId]},F.prototype.showRichElement=function(t,e,i,n){this.showRichElementAtPosition(t,e,i,n,!1)},F.prototype.showRichElementAtPosition=function(e,i,n,o,r){var s=this.getTooltipElem();s.style.position="absolute",s.style.zIndex=2147483647;var a=this.GetStoredContext();if(a){var l=a.getStage();l.removeChildren();var h=n.getRootDisplayable();l.addChild(h),n&&n.Render&&n.Render();var u=l.getImpl().getSVGRoot();t.ToolkitUtils.setAttrNullNS(u,"width",n.getDisplayWidth()),t.ToolkitUtils.setAttrNullNS(u,"height",n.getDisplayHeight()),this.PostElement(s,e,i,r,o)}},F.prototype.hideTooltip=function(){F.superclass.hideTooltip.call(this);var t=this.GetStoredContext();t&&t.getStage().removeChildren()};var G=function(t){this._context=t};t.Obj.createSubclass(G,t.Obj),G.prototype.newDefs=function(){return t.SvgShapeUtils.createElement("defs")},G.prototype.getImageLoader=function(){return t.Agent.isEnvironmentBrowser()?H:t.JavaImageLoader},G.prototype.getDocumentUtils=function(){return t.SvgDocumentUtils},G.prototype.newParser=function(){return t.Agent.isEnvironmentBrowser()?new w:new DvtJavaXmlParser},G.prototype.newTooltipManager=function(e){return new t.HtmlTooltipManager(this._context,e)},G.prototype.newRichTooltipManager=function(t){return new F(this._context,t)};var Y=function(){this.Init()};t.Obj.createSubclass(Y,t.Obj),Y.prototype.Init=function(){this._regionPctRect=new t.Rectangle(-10,-10,120,120),this._counter=0,this._resultIdsUnder=[],this._resultIdsOver=[]},Y.prototype.getRegionPctRect=function(){return this._regionPctRect},Y.prototype.getResultIdsUnder=function(){return this._resultIdsUnder},Y.prototype.getResultIdsOver=function(){return this._resultIdsOver},Y.prototype.createResultId=function(t){return t||(t="filtRes"),t+this._counter++};var K=function(){};t.Obj.createSubclass(K,t.Obj),K._counter=0,K.createFilter=function(e,i){for(var n=t.SvgShapeUtils.createElement("filter",K.CreateFilterId()),o=new Y,r=0;r<e.length;r++){var s=e[r];s&&K.CreateFilterPrimitives(n,s,i,o)}var a=!1;if(i){var l=i.getElem().getBBox();if(l){var h=l.width,u=l.height;if(0==u||0==h){var c;i.getStroke&&(c=i.getStroke());var p=10;c&&(p=c.getWidth());var _=l.x,g=l.y;if(t.SvgDocumentUtils.isFilterStraightLineAdjustmentNeeded()&&i instanceof t.Polyline){var d=t.ArrayUtils.copy(i.getPoints());0==h&&(d[0]=d[0]+.01),0==u&&(d[1]=d[1]+.01);var S=t.SvgShapeUtils.convertPointsArray(d);t.ToolkitUtils.setAttrNullNS(i.getElem(),"points",S)}0==u&&(u=2*p,g-=p),0==h&&(h=2*p,_-=p),t.ToolkitUtils.setAttrNullNS(n,"x",_),t.ToolkitUtils.setAttrNullNS(n,"y",g),t.ToolkitUtils.setAttrNullNS(n,"width",h),t.ToolkitUtils.setAttrNullNS(n,"height",u),t.ToolkitUtils.setAttrNullNS(n,"filterUnits","userSpaceOnUse"),a=!0}}}a||(-10!=o.getRegionPctRect().x&&"Infinity"!=o.getRegionPctRect().x&&"-Infinity"!=o.getRegionPctRect().x&&t.ToolkitUtils.setAttrNullNS(n,"x",o.getRegionPctRect().x+"%"),-10!=o.getRegionPctRect().y&&"Infinity"!=o.getRegionPctRect().y&&"-Infinity"!=o.getRegionPctRect().y&&t.ToolkitUtils.setAttrNullNS(n,"y",o.getRegionPctRect().y+"%"),120!=o.getRegionPctRect().w&&"Infinity"!=o.getRegionPctRect().w&&"-Infinity"!=o.getRegionPctRect().w&&t.ToolkitUtils.setAttrNullNS(n,"width",o.getRegionPctRect().w+"%"),120!=o.getRegionPctRect().h&&"Infinity"!=o.getRegionPctRect().h&&"-Infinity"!=o.getRegionPctRect().h&&t.ToolkitUtils.setAttrNullNS(n,"height",o.getRegionPctRect().h+"%"));var f,y,E=o.getResultIdsUnder().length,T=o.getResultIdsOver().length,v=t.SvgShapeUtils.createElement("feMerge");if(E>0)for(y=0;y<E;y++)f=t.SvgShapeUtils.createElement("feMergeNode"),t.ToolkitUtils.setAttrNullNS(f,"in",o.getResultIdsUnder()[y]),t.ToolkitUtils.appendChildElem(v,f);if(f=t.SvgShapeUtils.createElement("feMergeNode"),t.ToolkitUtils.setAttrNullNS(f,"in","SourceGraphic"),t.ToolkitUtils.appendChildElem(v,f),T>0)for(y=0;y<T;y++)f=t.SvgShapeUtils.createElement("feMergeNode"),t.ToolkitUtils.setAttrNullNS(f,"in",o.getResultIdsOver()[y]),t.ToolkitUtils.appendChildElem(v,f);return t.ToolkitUtils.appendChildElem(n,v),n},K.CreateFilterPrimitives=function(e,i,n,o){return i instanceof t.Shadow&&X.createFilterPrimitives(e,i,n,o),null},K.CreateFilterId=function(){return"filt"+K._counter++};var j=function(){};t.Obj.createSubclass(j,t.Obj),j.createElem=function(e,i){var n,o=e instanceof t.LinearGradientFill||e instanceof t.LinearGradientStroke,r=t.SvgShapeUtils.createElement(o?"linearGradient":"radialGradient",i),s=e.getColors(),a=e.getAlphas(),l=e.getStops(),h=e.getBounds(),u=s.length;for(n=0;n<u;n++){var c=t.SvgShapeUtils.createElement("stop");t.ToolkitUtils.setAttrNullNS(c,"offset",100*l[n]+"%");var p=s[n];if(p){var _=a[n];(t.Agent.isEnvironmentBatik()||t.Agent.isBrowserSafari())&&-1!==p.indexOf("rgba")?(t.ToolkitUtils.setAttrNullNS(c,"stop-color",t.ColorUtils.getRGB(p)),null!=_?t.ToolkitUtils.setAttrNullNS(c,"stop-opacity",t.ColorUtils.getAlpha(p)*_,1):t.ToolkitUtils.setAttrNullNS(c,"stop-opacity",t.ColorUtils.getAlpha(p),1)):(t.ToolkitUtils.setAttrNullNS(c,"stop-color",p),null!=_&&t.ToolkitUtils.setAttrNullNS(c,"stop-opacity",_,1))}t.ToolkitUtils.appendChildElem(r,c)}var g=!h||0==h[0]&&0==h[1]&&0==h[2]&&0==h[3];if(o){var d=e.getAngle(),S="0%",f="0%",y="100%",E="0%",T=!0;if(g)45===d?(f="100%",y="100%"):90===d?(f="100%",y="0%"):135===d?(S="100%",y="0%",E="100%"):270===d?(y="0%",E="100%"):0!==d&&(d=-d,t.ToolkitUtils.setAttrNullNS(r,"gradientTransform","rotate("+t.ToolkitUtils.roundDecimal(d)+" .5 .5)"),T=!1);else{t.ToolkitUtils.setAttrNullNS(r,"gradientUnits","userSpaceOnUse"),S="0",f="0.5",y="1",E="0.5";var v=h[2],m=h[3],C=h[0],A=h[1];d=-d;var O="rotate("+t.ToolkitUtils.roundDecimal(d)+" .5 .5)",b="scale("+t.ToolkitUtils.roundDecimal(v)+" "+t.ToolkitUtils.roundDecimal(m)+")",I="translate("+t.ToolkitUtils.roundDecimal(C)+" "+t.ToolkitUtils.roundDecimal(A)+")",P=b+" "+O;0==C&&0==A||(P=I+" "+P),t.ToolkitUtils.setAttrNullNS(r,"gradientTransform",P)}T&&(t.ToolkitUtils.setAttrNullNS(r,"x1",S),t.ToolkitUtils.setAttrNullNS(r,"y1",f),t.ToolkitUtils.setAttrNullNS(r,"x2",y),t.ToolkitUtils.setAttrNullNS(r,"y2",E))}else g||(t.ToolkitUtils.setAttrNullNS(r,"gradientUnits","userSpaceOnUse"),t.ToolkitUtils.setAttrNullNS(r,"cx",e.getCx()),t.ToolkitUtils.setAttrNullNS(r,"cy",e.getCy()),t.ToolkitUtils.setAttrNullNS(r,"fx",e.getCx()),t.ToolkitUtils.setAttrNullNS(r,"fy",e.getCy()),t.ToolkitUtils.setAttrNullNS(r,"r",e.getRadius()));return r};var W=function(){};t.Obj.createSubclass(W,t.Obj),W.createElem=function(e,i){var n=t.SvgShapeUtils.createElement("pattern",i),o=t.SvgShapeUtils.createElement("image",i),r=e.getSrc(),s=e.getBound();e.getRepeat();return s&&(t.ToolkitUtils.setAttrNullNS(n,"x",s.x),t.ToolkitUtils.setAttrNullNS(n,"y",s.y),t.ToolkitUtils.setAttrNullNS(o,"x",s.x),t.ToolkitUtils.setAttrNullNS(o,"y",s.y),t.ToolkitUtils.setAttrNullNS(n,"width",s.w),t.ToolkitUtils.setAttrNullNS(n,"height",s.h),t.ToolkitUtils.setAttrNullNS(o,"width",s.w),t.ToolkitUtils.setAttrNullNS(o,"height",s.h),t.ToolkitUtils.setAttrNullNS(n,"patternUnits","userSpaceOnUse"),r&&t.ToolkitUtils.setHref(o,r)),t.ToolkitUtils.appendChildElem(n,o),n};var V=function(){};t.Obj.createSubclass(V,t.Obj),V._SM_WIDTH=8,V._SM_HEIGHT=8,V._LG_WIDTH=16,V._LG_HEIGHT=16,V.createElem=function(e,i){var n,o,r=t.SvgShapeUtils.createElement("pattern",i),s=e.getPattern();V.IsSmallPattern(s)?(n=V._SM_WIDTH,o=V._SM_HEIGHT):(n=V._LG_WIDTH,o=V._LG_HEIGHT),t.ToolkitUtils.setAttrNullNS(r,"x",0),t.ToolkitUtils.setAttrNullNS(r,"y",0),t.ToolkitUtils.setAttrNullNS(r,"width",n),t.ToolkitUtils.setAttrNullNS(r,"height",o),t.ToolkitUtils.setAttrNullNS(r,"patternUnits","userSpaceOnUse");var a=e.getMatrix();if(a){var l="matrix("+a.getA()+","+a.getC()+","+a.getB()+","+a.getD()+","+a.getTx()+","+a.getTy()+")";t.ToolkitUtils.setAttrNullNS(r,"patternTransform",l)}return V.CreatePatternElems(e,r),r},V.IsSmallPattern=function(t){return"s"===t.charAt(0)},V.CreatePatternElems=function(e,i){var n,o,r,s,a,l,h,u=e.getPattern(),c=e.getColor(),p=t.ColorUtils.getRGB(c),_=t.ColorUtils.getAlpha(c),g=e.getBackgroundColor(),d=t.ColorUtils.getRGB(g),S=t.ColorUtils.getAlpha(g);V.IsSmallPattern(u)?(n=V._SM_WIDTH,o=V._SM_HEIGHT,r=V._SM_WIDTH,s=V._SM_HEIGHT):(n=V._LG_WIDTH,o=V._LG_HEIGHT,r=V._LG_WIDTH,s=V._LG_HEIGHT),d&&S>0&&(h=t.SvgShapeUtils.createElement("rect"),t.ToolkitUtils.setAttrNullNS(h,"stroke",d),t.ToolkitUtils.setAttrNullNS(h,"stroke-opacity",S),t.ToolkitUtils.setAttrNullNS(h,"stroke-width",1),t.ToolkitUtils.setAttrNullNS(h,"fill",d),t.ToolkitUtils.setAttrNullNS(h,"fill-opacity",S),t.ToolkitUtils.setAttrNullNS(h,"x",0),t.ToolkitUtils.setAttrNullNS(h,"y",0),t.ToolkitUtils.setAttrNullNS(h,"width",n),t.ToolkitUtils.setAttrNullNS(h,"height",o),t.ToolkitUtils.appendChildElem(i,h)),u===t.PatternFill.SM_DIAG_UP_LT||u===t.PatternFill.LG_DIAG_UP_LT?(h=t.SvgShapeUtils.createElement("path"),t.ToolkitUtils.setAttrNullNS(h,"stroke",p),t.ToolkitUtils.setAttrNullNS(h,"stroke-opacity",_),t.ToolkitUtils.setAttrNullNS(h,"stroke-width",1),t.ToolkitUtils.setAttrNullNS(h,"stroke-linecap","square"),t.ToolkitUtils.setAttrNullNS(h,"d",t.PathUtils.moveTo(0,-s/2)+t.PathUtils.lineTo(3*r/2,s)+t.PathUtils.moveTo(-r/2,0)+t.PathUtils.lineTo(r/2,s)),t.ToolkitUtils.appendChildElem(i,h)):u===t.PatternFill.SM_DIAG_UP_RT||u===t.PatternFill.LG_DIAG_UP_RT?(h=t.SvgShapeUtils.createElement("path"),t.ToolkitUtils.setAttrNullNS(h,"stroke",p),t.ToolkitUtils.setAttrNullNS(h,"stroke-opacity",_),t.ToolkitUtils.setAttrNullNS(h,"stroke-width",1),t.ToolkitUtils.setAttrNullNS(h,"stroke-linecap","square"),t.ToolkitUtils.setAttrNullNS(h,"d",t.PathUtils.moveTo(-r/2,s)+t.PathUtils.lineTo(r,-s/2)+t.PathUtils.moveTo(0,3*s/2)+t.PathUtils.lineTo(3*r/2,0)),t.ToolkitUtils.appendChildElem(i,h)):u===t.PatternFill.SM_CROSSHATCH||u===t.PatternFill.LG_CROSSHATCH?(h=t.SvgShapeUtils.createElement("path"),t.ToolkitUtils.setAttrNullNS(h,"stroke",p),t.ToolkitUtils.setAttrNullNS(h,"stroke-opacity",_),t.ToolkitUtils.setAttrNullNS(h,"stroke-width",1),t.ToolkitUtils.setAttrNullNS(h,"d","M0,0L"+n+","+o+"M"+n+",0L0,"+o),t.ToolkitUtils.appendChildElem(i,h)):u===t.PatternFill.SM_CHECK||u===t.PatternFill.LG_CHECK?(a=r/2,l=s/2,h=t.SvgShapeUtils.createElement("path"),t.ToolkitUtils.setAttrNullNS(h,"stroke",p),t.ToolkitUtils.setAttrNullNS(h,"stroke-opacity",_),t.ToolkitUtils.setAttrNullNS(h,"stroke-width",1),t.ToolkitUtils.setAttrNullNS(h,"fill",p),t.ToolkitUtils.setAttrNullNS(h,"fill-opacity",_),t.ToolkitUtils.setAttrNullNS(h,"d","M"+a+",0L"+r+",0L"+r+","+l+"L"+a+","+l+"ZM0,"+l+"L"+a+","+l+"L"+a+","+s+"L0,"+s+"Z"),t.ToolkitUtils.appendChildElem(i,h)):u===t.PatternFill.SM_TRIANGLE_CHECK||u===t.PatternFill.LG_TRIANGLE_CHECK?(h=t.SvgShapeUtils.createElement("polygon"),t.ToolkitUtils.setAttrNullNS(h,"stroke",p),t.ToolkitUtils.setAttrNullNS(h,"stroke-opacity",_),t.ToolkitUtils.setAttrNullNS(h,"stroke-width",1),t.ToolkitUtils.setAttrNullNS(h,"fill",p),t.ToolkitUtils.setAttrNullNS(h,"fill-opacity",_),t.ToolkitUtils.setAttrNullNS(h,"points","0,"+o+" "+n+",0 "+n+","+o),t.ToolkitUtils.appendChildElem(i,h)):u!==t.PatternFill.SM_DIAMOND_CHECK&&u!==t.PatternFill.LG_DIAMOND_CHECK||(a=r/2,l=s/2,h=t.SvgShapeUtils.createElement("polygon"),t.ToolkitUtils.setAttrNullNS(h,"stroke",p),t.ToolkitUtils.setAttrNullNS(h,"stroke-opacity",_),t.ToolkitUtils.setAttrNullNS(h,"stroke-width",1),t.ToolkitUtils.setAttrNullNS(h,"fill",p),t.ToolkitUtils.setAttrNullNS(h,"fill-opacity",_),t.ToolkitUtils.setAttrNullNS(h,"points","0,"+l+" "+a+",0 "+n+","+a+" "+a+","+o),t.ToolkitUtils.appendChildElem(i,h))};var X=function(){};return t.Obj.createSubclass(X,t.Obj),X.RADS_PER_DEGREE=Math.PI/180,X.createFilter=function(e,i){var n;if(!e.isLocked()){var o=new Y;n=t.SvgShapeUtils.createElement("filter",e._Id),X.createFilterPrimitives(n,e,i,o);var r=t.SvgShapeUtils.createElement("feMerge"),s=t.SvgShapeUtils.createElement("feMergeNode");t.ToolkitUtils.setAttrNullNS(s,"in",o.getResultIdsUnder()[0]);var a=t.SvgShapeUtils.createElement("feMergeNode");t.ToolkitUtils.setAttrNullNS(a,"in","SourceGraphic"),t.ToolkitUtils.appendChildElem(n,r),t.ToolkitUtils.appendChildElem(r,s),t.ToolkitUtils.appendChildElem(r,a)}return n},X.createFilterPrimitives=function(t,e,i,n){e._bInner?X.CreateInnerFilterPrimitives(t,e,i,n):X.CreateOuterFilterPrimitives(t,e,i,n)},X.CreateOuterFilterPrimitives=function(e,i,n,o){var r=i._rgba,s=t.ColorUtils.getRed(r)/255,a=t.ColorUtils.getGreen(r)/255,l=t.ColorUtils.getBlue(r)/255,h=t.ColorUtils.getAlpha(r),u=i._strength,c=i._blurX,p=i._blurY,_=0,g=0;i._blurX>0&&(_=Math.max(i._blurX/3,1)),i._blurY>0&&(g=Math.max(i._blurY/3,1));var d=i._distance,S=i._angle*X.RADS_PER_DEGREE,f=Math.cos(S)*d,y=Math.sin(S)*d,E=n.getDimensions(n.getParent());if(E){var T=Math.abs(d),v=2*c,m=2*c,C=2*p,A=2*p;d>0?(v-=T,C-=T,m+=T,A+=T):d<0&&(v+=T,C+=T,m-=T,A-=T),v<0&&(v=0),C<0&&(C=0),m<0&&(m=0),A<0&&(A=0);var O=v/E.w*100,b=m/E.w*100,I=C/E.h*100,P=A/E.h*100;o.getRegionPctRect().x>-O&&(o.getRegionPctRect().x=-O),o.getRegionPctRect().y>-I&&(o.getRegionPctRect().y=-I),o.getRegionPctRect().w<100+O+b&&(o.getRegionPctRect().w=100+O+b),o.getRegionPctRect().h<100+I+P&&(o.getRegionPctRect().h=100+I+P)}if(n instanceof t.Polyline){var M=n.getStroke().getWidth();M>1&&(o.getRegionPctRect().h=o.getRegionPctRect().h+M,o.getRegionPctRect().y=o.getRegionPctRect().y-M)}var D=t.SvgShapeUtils.createElement("feColorMatrix");t.ToolkitUtils.setAttrNullNS(D,"in","SourceGraphic"),t.ToolkitUtils.setAttrNullNS(D,"type","matrix"),t.ToolkitUtils.setAttrNullNS(D,"values","0 0 0 "+s+" 0 0 0 0 "+a+" 0 0 0 0 "+l+" 0 0 0 0 "+h*u+" 0");var R=t.SvgShapeUtils.createElement("feGaussianBlur"),x=_;_!==g&&(x+=" "+g),t.ToolkitUtils.setAttrNullNS(R,"stdDeviation",x);var N=o.createResultId("blur");t.ToolkitUtils.setAttrNullNS(R,"result",N);var U=t.SvgShapeUtils.createElement("feOffset");t.ToolkitUtils.setAttrNullNS(U,"dx",f),t.ToolkitUtils.setAttrNullNS(U,"dy",y),t.ToolkitUtils.setAttrNullNS(U,"in",N);var k=o.createResultId("offset");t.ToolkitUtils.setAttrNullNS(U,"result",k),o.getResultIdsUnder().push(k),t.ToolkitUtils.appendChildElem(e,D),t.ToolkitUtils.appendChildElem(e,R),t.ToolkitUtils.appendChildElem(e,U)},X.CreateInnerFilterPrimitives=function(e,i,n,o){var r=i._rgba,s=t.ColorUtils.getRed(r)/255,a=t.ColorUtils.getGreen(r)/255,l=t.ColorUtils.getBlue(r)/255,h=t.ColorUtils.makeRGB(s,a,l),u=t.ColorUtils.getAlpha(r),c=(i._blurX,i._blurY,Math.max(i._blurX/2,1)),p=Math.max(i._blurY/2,1),_=i._distance,g=i._angle,d=i._strength,S=g*X.RADS_PER_DEGREE,f=Math.cos(S)*_,y=Math.sin(S)*_,E=t.SvgShapeUtils.createElement("feFlood");t.ToolkitUtils.setAttrNullNS(E,"in","SourceGraphic"),t.ToolkitUtils.setAttrNullNS(E,"flood-opacity",u),t.ToolkitUtils.setAttrNullNS(E,"flood-color",h);var T=o.createResultId("flood");t.ToolkitUtils.setAttrNullNS(E,"result",T);var v=t.SvgShapeUtils.createElement("feComposite");t.ToolkitUtils.setAttrNullNS(v,"operator","out"),t.ToolkitUtils.setAttrNullNS(v,"in",T),t.ToolkitUtils.setAttrNullNS(v,"in2","SourceGraphic");var m=t.SvgShapeUtils.createElement("feGaussianBlur"),C=c;c!==p&&(C+=" "+p),t.ToolkitUtils.setAttrNullNS(m,"stdDeviation",C);var A=o.createResultId("blur");t.ToolkitUtils.setAttrNullNS(m,"result",A);var O=t.SvgShapeUtils.createElement("feColorMatrix");t.ToolkitUtils.setAttrNullNS(O,"in",A),t.ToolkitUtils.setAttrNullNS(O,"type","matrix"),t.ToolkitUtils.setAttrNullNS(O,"values","1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 "+d+" 0");var b=o.createResultId("colMat");t.ToolkitUtils.setAttrNullNS(O,"result",b);var I=t.SvgShapeUtils.createElement("feOffset");t.ToolkitUtils.setAttrNullNS(I,"dx",f),t.ToolkitUtils.setAttrNullNS(I,"dy",y),t.ToolkitUtils.setAttrNullNS(I,"in",b);var P=o.createResultId("offset");t.ToolkitUtils.setAttrNullNS(I,"result",P);var M=t.SvgShapeUtils.createElement("feComposite");t.ToolkitUtils.setAttrNullNS(M,"operator","in"),t.ToolkitUtils.setAttrNullNS(M,"in",P),t.ToolkitUtils.setAttrNullNS(M,"in2","SourceGraphic");var D=o.createResultId("comp");t.ToolkitUtils.setAttrNullNS(M,"result",D),o.getResultIdsOver().push(D),t.ToolkitUtils.appendChildElem(e,E),t.ToolkitUtils.appendChildElem(e,v),t.ToolkitUtils.appendChildElem(e,m),t.ToolkitUtils.appendChildElem(e,O),t.ToolkitUtils.appendChildElem(e,I),t.ToolkitUtils.appendChildElem(e,M)},t.exportProperty(t,"Agent",t.Agent),t.exportProperty(t.Agent,"setEnvironment",t.Agent.setEnvironment),t.exportProperty(t.Agent,"setHighContrast",t.Agent.setHighContrast),t.exportProperty(t.Automation.prototype,"getDomElementForSubId",t.Automation.prototype.getDomElementForSubId),t.exportProperty(t.Automation.prototype,"getSubIdForDomElement",t.Automation.prototype.getSubIdForDomElement),t.exportProperty(t.BaseComponent.prototype,"applyOptions",t.BaseComponent.prototype.applyOptions),t.exportProperty(t.BaseComponent.prototype,"render",t.BaseComponent.prototype.render),t.exportProperty(t.BaseComponent.prototype,"highlight",t.BaseComponent.prototype.highlight),t.exportProperty(t.BaseComponent.prototype,"select",t.BaseComponent.prototype.select),t.exportProperty(t.BaseComponent.prototype,"getKeyboardFocus",t.BaseComponent.prototype.getKeyboardFocus),t.exportProperty(t,"Bundle",t.Bundle),t.exportProperty(t.Bundle,"addLocalizedStrings",t.Bundle.addLocalizedStrings),t.exportProperty(t,"Context",t.Context),t.exportProperty(t.Context,"resetCaches",t.Context.resetCaches),t.exportProperty(t.Context,"resetUniqueSeeds",t.Context.resetUniqueSeeds),t.exportProperty(t.Context.prototype,"getStage",t.Context.prototype.getStage),t.exportProperty(t.Context.prototype,"getSvgDocument",t.Context.prototype.getSvgDocument),t.exportProperty(t.Context.prototype,"hideTooltips",t.Context.prototype.hideTooltips),t.exportProperty(t.Context.prototype,"isReadyToRender",t.Context.prototype.isReadyToRender),t.exportProperty(t.Context.prototype,"setDatatipStyleClass",t.Context.prototype.setDatatipStyleClass),t.exportProperty(t.Context.prototype,"setLocaleHelpers",t.Context.prototype.setLocaleHelpers),t.exportProperty(t.Context.prototype,"setReadingDirection",t.Context.prototype.setReadingDirection),t.exportProperty(t.Context.prototype,"setOverlayAttachedCallback",t.Context.prototype.setOverlayAttachedCallback),t.exportProperty(t.Context.prototype,"setTooltipAttachedCallback",t.Context.prototype.setTooltipAttachedCallback),t.exportProperty(t.Context.prototype,"setTooltipStyleClass",t.Context.prototype.setTooltipStyleClass),t.exportProperty(t.Context.prototype,"setDefaultFontFamily",t.Context.prototype.setDefaultFontFamily),t.exportProperty(t.Context.prototype,"setDefaultFontSize",t.Context.prototype.setDefaultFontSize),t.exportProperty(t.Context.prototype,"setFixContextCallback",t.Context.prototype.setFixContextCallback),t.exportProperty(t.Context.prototype,"setCustomElement",t.Context.prototype.setCustomElement),t.exportProperty(t.Dimension.prototype,"getWidth",t.Dimension.prototype.getWidth),t.exportProperty(t.Dimension.prototype,"getHeight",t.Dimension.prototype.getHeight),t.exportProperty(t,"JsonUtils",t.JsonUtils),t.exportProperty(t.JsonUtils,"clone",t.JsonUtils.clone),t.exportProperty(t.JsonUtils,"merge",t.JsonUtils.merge),t.exportProperty(T.prototype,"addChild",T.prototype.addChild),t}();
    return dvt;
  });
  